Browse Source

rebound paste to ^Y

master
Connor Lane Smith 14 years ago
parent
commit
eeba6221b1
1 changed files with 3 additions and 4 deletions
  1. +3
    -4
      dmenu.c

+ 3
- 4
dmenu.c View File

@ -227,6 +227,9 @@ keypress(XKeyEvent *ev) {
while(cursor > 0 && text[nextrune(-1)] != ' ') while(cursor > 0 && text[nextrune(-1)] != ' ')
insert(NULL, nextrune(-1) - cursor); insert(NULL, nextrune(-1) - cursor);
break; break;
case XK_y: /* paste selection */
XConvertSelection(dc->dpy, XA_PRIMARY, utf8, utf8, win, CurrentTime);
return;
} }
} }
switch(ksym) { switch(ksym) {
@ -264,10 +267,6 @@ keypress(XKeyEvent *ev) {
sel = curr = matches; sel = curr = matches;
calcoffsets(); calcoffsets();
break; break;
case XK_Insert: /* paste selection */
if(ev->state & ShiftMask)
XConvertSelection(dc->dpy, XA_PRIMARY, utf8, utf8, win, CurrentTime);
return;
case XK_Left: case XK_Left:
if(cursor > 0 && (!sel || !sel->left || lines > 0)) { if(cursor > 0 && (!sel || !sel->left || lines > 0)) {
cursor = nextrune(-1); cursor = nextrune(-1);


Loading…
Cancel
Save