bbbradsmith / hatariB

Libretro core for Hatari emulation of Atari ST STE TT Falcon
GNU General Public License v2.0
20 stars 3 forks source link

Host keyboard remapping #21

Closed bbbradsmith closed 5 months ago

bbbradsmith commented 1 year ago

RetroArch only provides scancode-based mapping so the actual host keyboard layout is unknown. Hatari has a "symbolic" option which can use SDL's symbolic key symbols to remap key semantics to a scancode instead, but this is unavailable here.

This mostly doesn't matter if the user's host keyboard layout matches the TOS language they're using.

Could provide some basic remapping, like QWERTY to AZERTY etc. but the permutations get difficult. Would be much easier if we could get the symbolic key info from retroarch but it's just not available. We could maybe supply a few host key assignments but then whether or not to remap becomes TOS specific too (which is actually the current issue with Hatari's symbolic mapping, it's only for US TOS).

For the time being, this can be resolved by users manually changing their input key assignments in RetroArch, but this is cumbersome.

At least the on-screen keyboard doesn't have this issue, since it's a virtual keyboard. It's also a helpful display when trying to figure out your own keymappings since the host keypresses will show up there.

(As an aside: I plan to submit suitable symbolic keymappings to the main Hatari project, since it has a more direct interface with the keyboard.)