Adding support for ctrl+v to paste

This commit is contained in:
bakkeby 2021-05-23 13:16:26 +02:00
parent 39faa8f5c3
commit b6103ff6a7
3 changed files with 11 additions and 0 deletions

View File

@ -26,6 +26,8 @@ dmenu, how to install it and how it works.
### Changelog:
2021-05-23 - Adding support for `ctrl+v` to paste
2021-05-17 - Added the restrict return, no sort, gridnav and plain-prompt (listfullwidth) patches
2021-05-15 - Added the tsv and printindex patches

View File

@ -828,6 +828,10 @@ keypress(XKeyEvent *ev)
break;
case XK_y: /* paste selection */
case XK_Y:
#if CTRL_V_TO_PASTE_PATCH
case XK_v:
case XK_V:
#endif // CTRL_V_TO_PASTE_PATCH
XConvertSelection(dpy, (ev->state & ShiftMask) ? clip : XA_PRIMARY,
utf8, utf8, win, CurrentTime);
return;

View File

@ -31,6 +31,11 @@
*/
#define COLOR_EMOJI_PATCH 0
/* Minor patch to enable the use of Ctrl+v (XA_PRIMARY) and Ctrl+Shift+v (CLIPBOARD) to paste.
* By default dmenu only supports Ctrl+y and Ctrl+Shift+y to paste.
*/
#define CTRL_V_TO_PASTE_PATCH 0
/* This patch adds a flag (-dy) which makes dmenu run the command given to it whenever input
* is changed with the current input as the last argument and update the option list according
* to the output of that command.