Wyrmgus icon indicating copy to clipboard operation
Wyrmgus copied to clipboard

Hotkeys only recognize QWERTY keyboard layouts

Open Andrettin opened this issue 10 years ago • 8 comments

Unfortunately, hotkeys only recognize QWERTY keyboard layouts when processing inputs.

Andrettin avatar Jun 10 '15 12:06 Andrettin

Hehe I was about to report this, but it looks like it's done already.

I would expect hotkeys to work with QWERTZ German keyboard layouts though, no?

I'm using a French AZERTY keyboard layout, and it is really annoying in that the number keys are not directly accessible. See: http://fr.wikipedia.org/wiki/AZERTY#mediaviewer/Fichier:Clavier-Azerty.svg The number keys are accessed via the Shift modifier, i.e. pressing the "1 &" key will input a "&", and only Shift+"1 &" will give the expected "1". This peculiarity is a problem in many games which use number keys as hotkeys.

akien-mga avatar Jun 10 '15 16:06 akien-mga

Unfortunately, this apparently isn't just restricted to numbers, but also to letters. Hopefully I'll find the source of this issue soon.

Andrettin avatar Jun 11 '15 10:06 Andrettin

For me with AZERTY keyboards the letter hotkeys work fine, e.g. L+W to level up a fighter and improve sword wielding.

akien-mga avatar Jun 11 '15 15:06 akien-mga

Ah, that's good news. A player had reported hotkeys not working at all with the COLEMAK layout, so I assumed it would be that way with other non-QWERTY layouts as well.

Andrettin avatar Jun 11 '15 17:06 Andrettin

It's a bug in SDL....

https://bugzilla.libsdl.org/show_bug.cgi?id=3188 https://github.com/dhewm/dhewm3/pull/135

a-detiste avatar Dec 26 '15 12:12 a-detiste

I thought that could be the case, but it seems that bug is also in SDL2? That's really unfortunate, since then a move to SDL2 wouldn't fix the issue. And it seems no one has responded to his bug report or merged the patch into SDL.

Andrettin avatar Dec 26 '15 12:12 Andrettin

Implementing the same ugly workaround in every single game defeat the purpose of having an externaly updatable library... still you might want to consider a workaround like this one: https://github.com/yquake2/yquake2/blob/AZERTY-workaround/src/backends/sdl/input.c#L393

a-detiste avatar Dec 26 '15 13:12 a-detiste

I thought of that when I read the post, but it seems like it requires SDL2 =/ Well, at least it's a way to solve the issue when Stratagus gets ported to SDL2 :)

Andrettin avatar Dec 26 '15 13:12 Andrettin