XKB - remap arrow keys and preserve shift behaviour to select text
Posted
by
dgirardi
on Super User
See other posts from Super User
or by dgirardi
Published on 2012-11-02T22:22:38Z
Indexed on
2012/11/02
23:05 UTC
Read the original article
Hit count: 319
I realize arrow key remapping is an old problem, however I cannot seem to find a good solution that lets me select text with SHIFT + remapped keys as I would do with the vanilla arrow keys.
For instance, if I remap Caps Lock to ISO_Level3_Shift and set xkb_symbols to read either
key <AC08> { [ k, K , Down, Down] };
or
key <AC08> { type="THREE_LEVEL",
[ k, K , Down ] };
Pressing Shift+CapsLock+K will behave exactly as CapsLock+K (while Shift+Down behaves differently from Down alone).
I had somewhat more success using higher level macro utilities and generating keyboard events (i.e. generate both the shift and the arrow keypresses); hoever that approach has a whole set of different problems - often the UI response to a simulated keypress is different from the "real" keypress, and there are performance problems as well - I can type faster than the thing can handle.
Tl;dr; how can you shift-select using remapped arrow keys under X?
© Super User or respective owner