use Ctrl+v to paste from clipboard

This commit is contained in:
gutmet 2021-03-15 13:38:21 +01:00
parent 1a13d0465d
commit e9c79a7dc7
3 changed files with 4 additions and 8 deletions

View File

@ -10,6 +10,7 @@ MIT/X Consortium License
© 2010-2012 Connor Lane Smith <cls@lubutu.com> © 2010-2012 Connor Lane Smith <cls@lubutu.com>
© 2014-2020 Hiltjo Posthuma <hiltjo@codemadness.org> © 2014-2020 Hiltjo Posthuma <hiltjo@codemadness.org>
© 2015-2019 Quentin Rameau <quinq@fifth.space> © 2015-2019 Quentin Rameau <quinq@fifth.space>
© 2021 Alexander Weinhold <me dot dmenu at gutmet dot org>
Permission is hereby granted, free of charge, to any person obtaining a Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"), copy of this software and associated documentation files (the "Software"),

View File

@ -160,10 +160,7 @@ Delete line left
.B C\-w .B C\-w
Delete word left Delete word left
.TP .TP
.B C\-y .B C\-v
Paste from primary X selection
.TP
.B C\-Y
Paste from X clipboard Paste from X clipboard
.TP .TP
.B M\-b .B M\-b

View File

@ -354,10 +354,8 @@ keypress(XKeyEvent *ev)
while (cursor > 0 && !strchr(worddelimiters, text[nextrune(-1)])) while (cursor > 0 && !strchr(worddelimiters, text[nextrune(-1)]))
insert(NULL, nextrune(-1) - cursor); insert(NULL, nextrune(-1) - cursor);
break; break;
case XK_y: /* paste selection */ case XK_v:
case XK_Y: XConvertSelection(dpy, clip, utf8, utf8, win, CurrentTime);
XConvertSelection(dpy, (ev->state & ShiftMask) ? clip : XA_PRIMARY,
utf8, utf8, win, CurrentTime);
return; return;
case XK_Left: case XK_Left:
movewordedge(-1); movewordedge(-1);