Fix SUPER+1..9 not switching workspaces on an AZERTY layout
AUDITED Audited against its sources and confirmed accurate.
Symptom
On a French AZERTY (or similar) layout, SUPER+1..9 do not switch workspaces at all, while SUPER+letter binds work fine.
Cause
Keys used in binds must be reachable without modifiers in your keyboard layout. On AZERTY the digit row produces &, é, ", ' etc. unmodified: the digits require SHIFT. So bind = SUPER, 1, workspace, 1 describes a chord that never occurs.
Fix
Bind the unmodified keysym names instead of the digits.
# French AZERTY
bind = $mainMod, ampersand, workspace, 1
bind = $mainMod, eacute, workspace, 2
bind = $mainMod, quotedbl, workspace, 3
bind = $mainMod, apostrophe, workspace, 4
bind = $mainMod, parenleft, workspace, 5
Find the right names for your layout with:
sudo pacman -S wev
wev # press the key, read the `sym` field
The canonical list is the XKB_KEY_ suffixes in xkbcommon-keysyms.h.
Alternatively bind by keycode, which is layout-independent:
bind = SUPER, code:10, workspace, 1 # top-row "1" position
hl.bind("SUPER + code:10", hl.dsp.focus({ workspace = "1" }))
Verify
hyprctl binds shows the bind, and pressing SUPER+<key> switches workspace.
Sources
workspace-binds-broken-non-qwerty-layout