
Almost all Hotkeys stop working after switching Keyboard layout.
gamescom15 opened this issue ยท 4 comments
Steps to reproduce:
- have multiple Keyboard layouts installed in windows (de + en in my case)
- open the game, verify that hotkeys work (e.g
m
in litematica,x+c
in tweakeroo etc,alt+click
in itemscroller) - switch between layouts with
win+space
- it won't break if you switch it using the UI in the taskbar, but other windows hotkeys like
alt+shift
orctrl+shift
might break it as well
- it won't break if you switch it using the UI in the taskbar, but other windows hotkeys like
- (optional) switch back to your original layout
- most hotkeys stop working until you tab out -> tab in again
In this state you can't open any mailib menus and most hotkeys stop working.
Note: For some reason, the Zoom hotkey (in this case c
) keeps working (definitely the tweakeroo hotkey, the scroll zoom works and shows the tweakeroo zoom level)
I'm assuming some of the keys used to switch the layout are then getting stuck, because the game doesn't see the key release event? Most of the "feature toggle" or "action" type hotkeys are by default set to not allow any extra keys to be held, whereas the "modifier" type keys like zoom activation do allow extra keys by default.
You can check if and which keys get stuck when you do this using the malilib keybindDebugging
option (A + C
or via Mod Menu). It will show you any key presses and which keys are being held (as far as seeing the press and release events goes). If it's a key getting stuck, then there is nothing I can do in the mod to fix it, since it's simply the game not seeing the key release event, so it has no way of knowing that the key is actually not down anymore. The only "fix" is to press again the key(s) that are getting stuck.
The best "fix" is to find and press once the key that got stuck. But you can also work around this by changing the Allow Extra Keys
settings to true
for the hotkeys that you most often encounter this with. Or alternatively if the key that gets stuck is a key that you don't use in any hotkeys in malilib-based mods, then you can also add that key to the ignoredKeys
setting in malilib, and then malilib will not track presses of that key at all.