Xinqi Bao's Git
projects
/
dmenu.git
/ diff
summary
|
log
|
commit
|
diff
|
tree
raw
|
patch
|
inline
| side by side (parent:
a0a99d1
)
rebound paste to ^Y
author
Connor Lane Smith <
[email protected]
>
Fri, 12 Nov 2010 00:00:32 +0000
(
00:00
+0000)
committer
Connor Lane Smith <
[email protected]
>
Fri, 12 Nov 2010 00:00:32 +0000
(
00:00
+0000)
dmenu.c
diff
|
blob
|
history
diff --git
a/dmenu.c
b/dmenu.c
index
9d6088b
..
5c77560
100644
(file)
--- a/
dmenu.c
+++ b/
dmenu.c
@@
-227,6
+227,9
@@
keypress(XKeyEvent *ev) {
while(cursor > 0 && text[nextrune(-1)] != ' ')
insert(NULL, nextrune(-1) - cursor);
break;
while(cursor > 0 && text[nextrune(-1)] != ' ')
insert(NULL, nextrune(-1) - cursor);
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;
calcoffsets();
break;
sel = curr = matches;
calcoffsets();
break;
- case XK_Insert: /* paste selection */
- if(ev->state & ShiftMask)
- XConvertSelection(dc->dpy, XA_PRIMARY, utf8, utf8, win, CurrentTime);
- return;
case XK_Left:
if(cursor > 0 && (!sel || !sel->left || lines > 0)) {
cursor = nextrune(-1);
case XK_Left:
if(cursor > 0 && (!sel || !sel->left || lines > 0)) {
cursor = nextrune(-1);