The i3 FAQ has migrated to https://github.com/i3/i3/discussions. All content here is read-only.
Ask Your Question
1

how to specify left shift

asked 2014-06-14 20:23:51 +0000

i3er gravatar image

Is it possible to differentiate left-shift key from right-shift key in my i3 config bindsym commands?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-06-15 13:08:04 +0000

phairland gravatar image

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
edit flag offensive delete link more

Comments

Phantastic phairland! I was contemplating how nice this type of feature would be within i3 and here it is. My thanks.

TheRaven gravatar imageTheRaven ( 2015-01-22 16:51:23 +0000 )edit

Question Tools

Stats

Asked: 2014-06-14 20:23:51 +0000

Seen: 678 times

Last updated: Jun 15 '14