mirror of
https://github.com/mintycube/dmenu.git
synced 2024-10-22 14:05:48 +02:00
Adding support for ctrl+v to paste
This commit is contained in:
parent
39faa8f5c3
commit
b6103ff6a7
@ -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
|
||||
|
4
dmenu.c
4
dmenu.c
@ -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;
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user