[2.1.14] Regression in modifier key handling when linux remaps with .xkb

Post your bugs and problems so we can fix them.
annash
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sat Aug 08, 2026 7:32 pm
Contact:

[2.1.14] Regression in modifier key handling when linux remaps with .xkb

Post by annash »

Original post content:
When I try to bind a control with right-alt as a modifier, the game ignores it and uses the other key. If I tap it with no other key, the game uses KEY_257.
I do have an unusual xkb map, which lets me use this as MOD_5 In my window manager, I'm not sure if this is related.
---
I have tested changing my keymap and controls in various ways, and discovered that the problem is actually my xkb map. It seems that factorio 2.1 is detecting modifier keys, but not normal keys, on a higher level that is disturbed by this map.
In 2.0, any modifier key I pressed would be detected as intended
In 2.1, any modifier key I do not have bound through works as intended
But in 2.1, any modifier key I have bound to a non-standard level does not work.
Other keys on the new layer do not get remapped for factorio (for example, I press 'alt' to activate level 3, and 'e' on level 3 to emit the key for '5', but factorio picks up 'key_257' + 'e' and since 'key_257' is not a modifier it is ignored, so the resulting control is just 'e')
---
My keyboard is a custom very small one and I need to use a layer on alt for symbol keys, so I completely lose one of the 3 modifiers under the current implementation
I think the best solution is to revert the change:
- to make .xkb ignored for modifiers (so that pressing alt-e results in 'alt-e' instead of 'e')
If this behavior is intended, then two alternative solutions to my problem would be:
- to make mod5 or layer3 valid modifier layers (so that pressing alt-e results in 'mod5-e' or 'lvl3-e' instead of 'e')
- to make regular keypresses also use the .xkb mapping (so that pressing alt-e results in '5' instead of 'e')
Post Reply

Return to “Bug Reports”