awesome
awesome copied to clipboard
Having more than one variants of a keyboard causes some (non modified) keybinds to be dropped.
$ awesome --version
awesome v4.3 (Too long)
• 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.2
Issue:
-
Change your keyboard layout to have more than one layout and variant.
$ setxkbmap -layout "us,us,us,us" -variant "dvorak,dvorak-l,dvorak-r,"
-
We get
us(dvorak)
as our layout in Awesome. -
The hotkeys
Super+fmnot
do not work.Those keys with modifiers work fine, such as
Ctrl+Super+m
andShift+Super+m
.
I have tested this with the following six commands.
setxkbmap -layout "us" -variant "dvorak"
# All work.
setxkbmap -layout "us,us,us,us" -variant "dvorak,dvorak-l,dvorak-r,"
# Fail: Super+fmnot
setxkbmap -layout "us,us" -variant "dvorak,dvorak-l"
# Fail: Super+fo
setxkbmap -layout "us,us" -variant "dvorak,dvorak-r"
# Fail: Super+fm
setxkbmap -layout "us,us,us" -variant "dvorak,dvorak-r,dvorak-l"
# Fail: Super+fmo
setxkbmap -layout "us,us" -variant "dvorak,"
# Fail: Super+not
I'm having the same problem too. For me, only key bindings that are assigned to clients get's effected (but not all keys). Global keys still work.
I played around with xev and putting some printf in the source, and it looks like when pressing those keys, the client loses focus just before the key press, which causes awesome to look for global keys instead of client's keys. I'm not sure what causes that though. Can be problem from xcb?
Right now I'm kind of stuck. If anyone else have an idea on where to look at, I can dig more into it.
I don't need to change variants to reproduce this. If my layouts include Hungarian (QWERTZ) or French (AZERTY) my Super+Q and Super+F client bindings break even if the active layout is still US.
awesome v4.3 (Too long) • Compiled against Lua 5.3.3 (running with Lua 5.3) • D-Bus support: ✔ • execinfo support: ✔ • xcb-randr version: 1.6 • LGI version: 0.9.2
I seem to have the same (or very similar) issue:
I noticed that some keybindings did not work, mainly Super+n (minimize) and Super+f (fullscreen).
I was able to "fix" fullscreen with this change in my config
diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua
index 2ac8e09..c658123 100644
--- a/.config/awesome/rc.lua
+++ b/.config/awesome/rc.lua
@@ -395,7 +395,7 @@ globalkeys = gears.table.join(
)
clientkeys = gears.table.join(
- awful.key({ modkey, }, "f",
+ awful.key({ modkey, }, "g",
function (c)
c.fullscreen = not c.fullscreen
c:raise()
i.e. it works with g but not with f.
Then today I noticed that it works when I load just one keyboard layout instead of the two I usually load, i.e.
setxkbmap us
makes it (Super+n for minimize) work, while
setxkbmap de,us bone,
breaks it. This is reproducible.
This is on Debian stable.
Can I provide any further information or test anything to help find the cause for this issue?
PS: I also found #1389 which seems very similar. There the 'de'-keyboard layout variant 'neo' is mentioned. 'bone' (which I use) is very similar to 'neo'. Just thought I should mention that.
(some wild guesses that need more investigations)
I think the issue here is that xcb need a keycode to grab the keyuser event.
In Awesome, we translate the symbol to an actual keycode with xcb_key_symbols_get_keycode
: https://github.com/awesomeWM/awesome/blob/b54e50ad6cfdcd864a21970b31378f7c64adf3f4/xwindow.c#L121-L142
I guess the different keyboard layouts tried here doesn't use the exact same symbol/keycode combination for every key.
IIRC some users from the Discord chat said that they use keycode in their config to mitigate this problem. Maybe we should ungrab/regrab every keybindings when the keyboard layout is changed to update the keycode :thinking:
it's apparently a dup of https://github.com/awesomeWM/awesome/issues/1389
I'm sorry but I'm unable to mitigate the bug using keycode.
I have:
awful.key({ modkey, }, "c", function (c)
c:kill()
end),
That I change with:
awful.key({ modkey, }, "#54", function (c)
c:kill()
end),
Work as expected.
When I do: setxkbmap fr,us oss,dvorak
. It doesn't work anymore.
I will try to replace every keybindings with keycode but I'm not confident.
Edit: I should have been confident.
If I replace every keybinding by the corresponding keycode (didn't do it for Mod4, Ctrl and Switch), it actually works !