Discussion:
i3 bindsym does not respect keyboard layout
(too old to reply)
Thomas De Schampheleire
2017-02-16 15:41:17 UTC
Permalink
Hi,

I have a problem related to key binding in the face of different
keyboard layouts.
Essentially, even though I use 'bindsym', the physical key location of
a binding stays the same if I switch keyboard layout via xorg. My
understanding is that this should only happen when using 'bindcode'.

In more detail: in my config I have binding such as:

# split in vertical orientation
bindsym $mod+v split v

My xorg settings are:

Option "XkbLayout" "us,us"
Option "XkbVariant" "dvorak,"
Option "XkbOptions" "grp:shifts_toggle,compose:ralt,caps:ctrl_modifier"

which means dvorak is the default layout, and qwerty is the second
layout reachable by pressing both shift keys.

With the above settings, I can correctly press mod+v to change the
split line of a window, in my default dvorak keyboard layout. The 'v'
is in the natural position of the dvorak layout.

However, when I switch keyboard layout to qwerty, then using mod+v
(with the 'v' position in qwerty) does NOT perform the same action. In
fact, in order to perform the same action, I need to press mod + the
key that is in the same physical location as 'v' in dvorak layout,
which is the period (.).

This is not the behavior I expect of 'bindsym'. My understanding is
that the binding should 'move' along with the logical location of 'v'
in the keyboard layout.

Is my expectation wrong?
Do you know how to fix or debug it?

Thanks,
Thomas
Ingo Bürk
2017-02-16 15:45:51 UTC
Permalink
Your expectation sounds correct to me. What does "i3 --version" say?
Post by Thomas De Schampheleire
Hi,
I have a problem related to key binding in the face of different
keyboard layouts.
Essentially, even though I use 'bindsym', the physical key location of
a binding stays the same if I switch keyboard layout via xorg. My
understanding is that this should only happen when using 'bindcode'.
# split in vertical orientation
bindsym $mod+v split v
Option "XkbLayout" "us,us"
Option "XkbVariant" "dvorak,"
Option "XkbOptions" "grp:shifts_toggle,compose:ralt,caps:ctrl_modifier"
which means dvorak is the default layout, and qwerty is the second
layout reachable by pressing both shift keys.
With the above settings, I can correctly press mod+v to change the
split line of a window, in my default dvorak keyboard layout. The 'v'
is in the natural position of the dvorak layout.
However, when I switch keyboard layout to qwerty, then using mod+v
(with the 'v' position in qwerty) does NOT perform the same action. In
fact, in order to perform the same action, I need to press mod + the
key that is in the same physical location as 'v' in dvorak layout,
which is the period (.).
This is not the behavior I expect of 'bindsym'. My understanding is
that the binding should 'move' along with the logical location of 'v'
in the keyboard layout.
Is my expectation wrong?
Do you know how to fix or debug it?
Thanks,
Thomas
Thomas De Schampheleire
2017-02-16 18:05:46 UTC
Permalink
Post by Ingo Bürk
Your expectation sounds correct to me. What does "i3 --version" say?
Sorry for not mentioning this in my initial report:
i3 version 4.13 (2016-11-08), built using Gentoo.
Ingo Bürk
2017-02-17 07:35:16 UTC
Permalink
Can you open an issue on Github, please? Thanks!
Post by Thomas De Schampheleire
Post by Ingo Bürk
Your expectation sounds correct to me. What does "i3 --version" say?
i3 version 4.13 (2016-11-08), built using Gentoo.
Thomas De Schampheleire
2017-02-17 08:47:25 UTC
Permalink
Post by Ingo Bürk
Can you open an issue on Github, please? Thanks!
Sure: https://github.com/i3/i3/issues/2686

Loading...