|Re: [hatari-devel] Keyboard scancode table inconsistencies|
[ Thread Index |
| More lists.tuxfamily.org/hatari-devel Archives
This is a multi-part message in MIME format.
On 10.10.2021 11.41, Eero Tamminen wrote:
In Hatari code, exactly the same value that is
used to index KeyStates in keymap.c:
Is passed to IKBD_PressSTKey(), and used as-is
to index ScanCodeState in ikbd.c:
So there actually should be some sync with them
to avoid accidental array overwrites.
Attached is IMHO better solution. It removes
KeyStates array completely.
As to LoadedKeymap array size being taken from
same define (KBD_MAX_SCANCODE) as ScanCodeState
size (with offset of 1), that tie-in was already
in Hatari code, I did change it, just increased
the array size.
Using the same define for SDL -> ST mapping table
size just means that one can specify what SDL key
produces each of the ST scancodes in the keymap
file. I doubt anybody would ever specify that
many mappings though. :-)