how to specify left shift
Is it possible to differentiate left-shift key from right-shift key in my i3 config bindsym commands?
Is it possible to differentiate left-shift key from right-shift key in my i3 config bindsym commands?
Depending on your keyboard layout you can use bindcode command to distinguish between the two.
Run xbindkeys -k
, it will prompt you to press a key and it will give a number code. Use that code with bindcode.
You can install xbindkeys from most linux distributions.
For example after running that command I press left key on my keyboard:
Press combination of keys or/and click under the window.
You can use one of the two lines after "NoCommand"
in $HOME/.xbindkeysrc to bind a key.
"(Scheme function)"
m:0x1 + c:37
Shift + Shift_L
Then I press right shift:
Press combination of keys or/and click under the window.
You can use one of the two lines after "NoCommand"
in $HOME/.xbindkeysrc to bind a key.
"(Scheme function)"
m:0x1 + c:105
Shift + Shift_R
So the way to distinguish both keys are:
bindcode 37
bindcode 105
Asked: 2014-06-14 20:23:51 +0000
Seen: 678 times
Last updated: Jun 15 '14