awesomeWM / awesome

awesome window manager
https://awesomewm.org/
GNU General Public License v2.0
6.36k stars 598 forks source link

Keyboard layout broken on login #2480

Open tmtvl opened 5 years ago

tmtvl commented 5 years ago

Hello,

I am using the US Dvorak layout, but when I log in the layout is broken.

When I type setxkbmap -print -verbose 10 in my terminal it returns:

Setting verbose level to 10 locale is C Trying to load rules file ./rules/evdev... Trying to load rules file /usr/share/X11/xkb/rules/evdev... Success. Applied rules from evdev: rules: evdev model: pc104 layout: us variant: dvorak options: caps:hyper,compose:menu,terminate:ctrl_alt_bksp,compose:menu,terminate:ctrl_alt_bksp Trying to build keymap using the following components: keycodes: evdev+aliases(qwerty) types: complete compat: complete symbols: pc+us(dvorak)+inet(evdev)+capslock(hyper)+compose(menu)+terminate(ctrl_alt_bksp) geometry: pc(pc104) xkb_keymap { xkb_keycodes { include "evdev+aliases(qwerty)" }; xkb_types { include "complete" }; xkb_compat { include "complete" }; xkb_symbols { include "pc+us(dvorak)+inet(evdev)+capslock(hyper)+compose(menu)+terminate(ctrl_alt_bksp)" }; xkb_geometry { include "pc(pc104)" }; };

Localcetl output:

  X11 Layout: us
   X11 Model: pc104
 X11 Variant: dvorak
 X11 Options: caps:hyper,compose:menu,terminate:ctrl_alt_bksp

Yet when I type any key it is read as though the layout was the standard US layout. I have tried the following:

Output of awesome --version:

awesome v4.2 (Human after all) • Compiled against Lua 5.3.5 (running with Lua 5.3) • D-Bus support: ✔ • execinfo support: ✔ • xcb-randr version: 1.6 • LGI version: 0.9.

How to reproduce the issue: Login, type any key that differs from standard us layout

Actual result: Input is read as though from standard US layout

Expected result: Input should be from Dvorak layout

tmtvl commented 5 years ago

When I restart awesome with ctrl + r the keymap is set correctly to dvorak.

psychon commented 5 years ago

When I restart awesome with ctrl + r the keymap is set correctly to dvorak.

Hm... Do you have the keyboard layout indicator in your config? Does it display anything? Do you happen to know what/how sets the keyboard layout when you log in?

I just tried starting awesome, running two xterms, running setxkbmap dvorak and afterwards Mod4+j no longer switched between keys, i.e. I no longer was using the previous layout, but dvorak. Of course, restarting awesome also does not make a difference here.

Also, if I were to give you some patch to awesome's C code, would you be able to build awesome with this patch and see if it helps?

tmtvl commented 5 years ago

Hm... Do you have the keyboard layout indicator in your config? Does it display anything?

I enabled it to check and it shows us(dvorak), even when the standard us layout is in effect.

Do you happen to know what/how sets the keyboard layout when you log in?

No, my xorg.conf.d/00-keyboard.conf is set up for dvorak, fcitx as well, and I am using an autostart script to setxkbmap the dvorak layout.

Also, if I were to give you some patch to awesome's C code, would you be able to build awesome with this patch and see if it helps?

Yes, I can apply patches and compile. Thanks for taking time to investigate.