fix paste from clipboard (ctrl+shift+y)
[dmenu.git] / dmenu.c
diff --git a/dmenu.c b/dmenu.c
index 32a8330..509e566 100644 (file)
--- a/dmenu.c
+++ b/dmenu.c
@@ -7,6 +7,7 @@
 #include <string.h>
 #include <strings.h>
 #include <time.h>
+
 #include <X11/Xlib.h>
 #include <X11/Xatom.h>
 #include <X11/Xutil.h>
@@ -319,6 +320,7 @@ keypress(XKeyEvent *ev)
                                insert(NULL, nextrune(-1) - cursor);
                        break;
                case XK_y: /* paste selection */
+               case XK_Y:
                        XConvertSelection(dpy, (ev->state & ShiftMask) ? clip : XA_PRIMARY,
                                          utf8, utf8, win, CurrentTime);
                        return;
@@ -622,7 +624,7 @@ main(int argc, char *argv[])
                if (!strcmp(argv[i], "-v")) {      /* prints version information */
                        puts("dmenu-"VERSION);
                        exit(0);
-               } else if (!strcmp(argv[i], "-b"))   /* appears at the bottom of the screen */
+               } else if (!strcmp(argv[i], "-b")) /* appears at the bottom of the screen */
                        topbar = false;
                else if (!strcmp(argv[i], "-f"))   /* grabs keyboard before reading stdin */
                        fast = true;