You are not logged in.

#1 2020-06-01 16:29:11

shlyapa
Member
Registered: 2020-05-20
Posts: 33

keybindings don't work in non-us layout

I have two layouts (us and ru) but when I'm in russian my usual keybindings involving alt-, super-, ctrl- don't work (from dwm, sxhkd, tmux etc).

/etc/X11/xorg.conf.d/00-keyboard.conf

Section "InputClass"
        Identifier "system-keyboard"
        MatchIsKeyboard "on"
        Option "XkbLayout" "us,ru"
        Option "XkbModel" "kinesis"
        Option "XkbVariant" ",mac"
EndSection

(i tried other XkbModel-s and no XkbVariant too)

localectl status

   System Locale: LANG=en_US.UTF-8
       VC Keymap: n/a
      X11 Layout: us,ru
       X11 Model: kinesis
     X11 Variant: ,mac

when i run xev i get the same keycodes in these layouts, for example ctrl-f:

37  Control_L
41  f
37  Control_L
41  Cyrillic_a

what am i missing? thanks.

Last edited by shlyapa (2020-06-01 16:30:44)

Offline

#2 2020-06-01 18:08:21

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,325

Re: keybindings don't work in non-us layout

man sxhkd wrote:

If you have a non-QWERTY keyboard or a non-standard layout configuration, you should provide a COUNT of 1 to the -m option or -1 (interpreted as infinity) if you constantly switch from one layout to the other (sxhkd ignores all mapping notify events by default because the majority of those events are pointless).

?

Offline

#3 2020-06-01 21:25:46

shlyapa
Member
Registered: 2020-05-20
Posts: 33

Re: keybindings don't work in non-us layout

tried both -m 1 and -m -1 without any effect, except one thing: when i switch to russian with super-alt-r -- i see these errors from sxhkd:

No keycodes found for keysym 101.
No keycodes found for keysym 114.
No keycodes found for keysym 102.
No keycodes found for keysym 116.
No keycodes found for keysym 100.
No keycodes found for keysym 115.
No keycodes found for keysym 97.
No keycodes found for keysym 113.

Offline

#4 2020-06-02 11:26:40

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,325

Re: keybindings don't work in non-us layout

It would seem that the bound symbols (some latin char) simply don't exitst in the other layout (cyrillic)
You could try to use https://wiki.archlinux.org/index.php/Xbindkeys and bind the keycodes (as they won't change w/ the layout)

Offline

Board footer

Powered by FluxBB