Open egrath opened 1 year ago
I'll have a look. The B-Em keyboard does not, as far as I know, track any other modifiers than Ctrl and Shift, i.e. the ones on the BBC micro keyboard. It also does not have any tables for different nationality of keyboards. What I think maybe going on here is that it is giving priority to the location of the key, i.e. where it would be be on a US/UK keyboard, rather than the unicode character the OS is providing.
As it works on Linux, i've digged a little bit into the issue by myself. It seems some strange behavior of the Allegro library. I've used a small Test application which just tracks keyboard input and it exposes the same behavior as b-em: Alt-Graph+Q is not recognized as the @-symbol in Windows, but only as 'q'.
Don't invest (currently) into this ticket, it's probably a issue upstream. Will keep the ticket here up-to-date as soon as new information regarding this surfaces.
Corresponding allegro.cc forum entry with test application: https://www.allegro.cc/forums/thread/618804/1053433
Thanks. I did do a little more checking of the debug messages in your original report and I notice that Allegro is providing the Unicode code for 'Q' (113) not '@'. It looks like you are actually trying to type the ASCII NUL character, i.e. ASCII code zero, hence holing down Alt-Gr to generate the '@' while also holding down Ctrl to get the BBC Micro to interpret the '@' key as a control character with |@ giving NUL.
What I think is happening is that Windows, or maybe Allegro, is also seeing the Ctrl modifier and that stops AltGr from selecting the tertiary level, hence the unicode 'Q' being given to B-Em.
Symptom: When using the logical Keyboard mapping on Windows, symbols which are on the tertiary level (like the @-symbol on German keyboards which is accessed with Alt-Gr+Q) are not recognized properly.
From what i can see in the in the logs, pressing Alt-Gr+Q is recognized but produces no character:
For reference, this is a Q-Key(press/release) on a German keyboard without Alt-Gr:
This issue does not occur on Linux and Macintosh, only Windows is affected.
How to reproduce