diff options
author | Connor Lane Smith <cls@lubutu.com> | 2010-11-12 00:00:32 +0000 |
---|---|---|
committer | Connor Lane Smith <cls@lubutu.com> | 2010-11-12 00:00:32 +0000 |
commit | eeba6221b1f2863800dc3490eb80f3b7adb14675 (patch) | |
tree | a6a5fc45f0d9c409bb418e5fc95967a6a2c48492 | |
parent | a0a99d10e1a019f74a8b2af4d5f8b47348e08a75 (diff) |
rebound paste to ^Y
-rw-r--r-- | dmenu.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -227,6 +227,9 @@ keypress(XKeyEvent *ev) { | |||
227 | while(cursor > 0 && text[nextrune(-1)] != ' ') | 227 | while(cursor > 0 && text[nextrune(-1)] != ' ') |
228 | insert(NULL, nextrune(-1) - cursor); | 228 | insert(NULL, nextrune(-1) - cursor); |
229 | break; | 229 | break; |
230 | case XK_y: /* paste selection */ | ||
231 | XConvertSelection(dc->dpy, XA_PRIMARY, utf8, utf8, win, CurrentTime); | ||
232 | return; | ||
230 | } | 233 | } |
231 | } | 234 | } |
232 | switch(ksym) { | 235 | switch(ksym) { |
@@ -264,10 +267,6 @@ keypress(XKeyEvent *ev) { | |||
264 | sel = curr = matches; | 267 | sel = curr = matches; |
265 | calcoffsets(); | 268 | calcoffsets(); |
266 | break; | 269 | break; |
267 | case XK_Insert: /* paste selection */ | ||
268 | if(ev->state & ShiftMask) | ||
269 | XConvertSelection(dc->dpy, XA_PRIMARY, utf8, utf8, win, CurrentTime); | ||
270 | return; | ||
271 | case XK_Left: | 270 | case XK_Left: |
272 | if(cursor > 0 && (!sel || !sel->left || lines > 0)) { | 271 | if(cursor > 0 && (!sel || !sel->left || lines > 0)) { |
273 | cursor = nextrune(-1); | 272 | cursor = nextrune(-1); |