summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaumit Dinesan <justsaumit@protonmail.com>2022-10-26 16:00:37 +0530
committerSaumit Dinesan <justsaumit@protonmail.com>2022-10-26 16:00:37 +0530
commitc0ba78cd05ff5567ece4dee1664ba61306886ac6 (patch)
tree638fb7ef6d71ee2196c339c1b9437f56e69459bd
parentf7374c955f21fed6eb4e57d7541097547fd7a196 (diff)
XK_{v/V} (Ctrl+v) for paste
-rw-r--r--dmenu.12
-rw-r--r--dmenu.c6
2 files changed, 7 insertions, 1 deletions
diff --git a/dmenu.1 b/dmenu.1
index b76b9cf..dbd35b9 100644
--- a/dmenu.1
+++ b/dmenu.1
@@ -173,6 +173,8 @@ Paste from primary X selection
.TP
.B C\-Y
Paste from X clipboard
+.B C\-V
+Paste from X clipboard
.TP
.B M\-b
Move cursor to the start of the current word
diff --git a/dmenu.c b/dmenu.c
index 1564d86..1c5a42e 100644
--- a/dmenu.c
+++ b/dmenu.c
@@ -439,7 +439,11 @@ keypress(XKeyEvent *ev)
case XK_Y:
XConvertSelection(dpy, (ev->state & ShiftMask) ? clip : XA_PRIMARY,
utf8, utf8, win, CurrentTime);
- return;
+ case XK_v: /* paste selection */
+ case XK_V:
+ XConvertSelection(dpy, (ev->state & ShiftMask) ? clip : XA_PRIMARY,
+ utf8, utf8, win, CurrentTime);
+ return;
case XK_Left:
case XK_KP_Left:
movewordedge(-1);