Re: [hatari-devel] Keyboard scancode table inconsistencies

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


This is a multi-part message in MIME format.
Hi Thomas,

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:
https://git.tuxfamily.org/hatari/hatari.git/tree/src/keymap.c#n559

Is passed to IKBD_PressSTKey(), and used as-is
to index ScanCodeState[] in ikbd.c:
https://git.tuxfamily.org/hatari/hatari.git/tree/src/ikbd.c#n1726

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. :-)


	- Eero






Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/