gnotclub / xst

st fork that uses Xresources and some pretty good patches
MIT License
536 stars 73 forks source link

shortcut ^V doesn't work? #92

Closed tmpm697 closed 4 years ago

tmpm697 commented 4 years ago

I want to use ctrl-v instead of ctrl-shift-v as in default of config.h:

{ TERMMOD,              XK_V,           clippaste,      {.i =  0} },
{ TERMMOD,              XK_v,           clippaste,      {.i =  0} }, // test

after rebuild xst and try to paste with ctrl-v it shows ^V, ctrl-shift-v works as expected.

Why ctrl-v doesn't work but ctrl-shift-v does?

xst-git from aur archlinux.

neeasade commented 4 years ago

Were you making an edit to config.h in your package definition? the location of the default config.h changed in a recent update ./config.h/./config.def.h instead of ./src/config.h -- you might need to update your patch location? ctrl-v isn't in the old config and won't be in the new one -- I'm working on a way to bind keys from xresources soon though, so that might also be a way to get ctrl-v binding

tmpm697 commented 4 years ago

I use xst-git from aur so I edit src/xst/config.h (a copy from config.def.h)

neeasade commented 4 years ago

right -- you'll have to update where you edit your config.h because now it's at the top level (no more src folder)

tmpm697 commented 4 years ago

so where to update where you edit your config.h after I edit xst-git/src/xst/config.h?

tmpm697 commented 4 years ago

I change { XK_ANY_MOD, Button3, selpaste, {.i = 0}, 1 }, (Button2 to Button3) in xst-git/src/xst/config.h and it worked. Why can't ctrl-v?

avih commented 4 years ago

Unless you modified it, your config.h has #define TERMMOD (ControlMask|ShiftMask), so if you want control instead of control+shift, you need to change

{ TERMMOD,              XK_V,           clippaste,      {.i =  0} },

to

{ ControlMask,              XK_v,           clippaste,      {.i =  0} },

Note that also the capital XK_V needs to change to lower-case XK_v, because capital V is still shift+v .

However, ctrl+v specifically is used by various programs like vim and your shell to insert a literal keypress escape sequence (e.g. try pressing ctrl+v and then F5), so overriding it with anything - lilke clippaste, will also override this functionality.

tmpm697 commented 4 years ago

@avih right, have ControlMask work, I forgot it, thanks.