Re: [hatari-devel] Insert button of Inputs dialog (emulation menu of hatariui)

[ Thread Index | Date Index | More Archives ]

I am interested in the answer to Yves Le Berre on the correspondence between keyboard. In a given language the keyboards ST, STE MegaST, MegaSte, TT and Falcon do not have the same scancode? If I limit myself to Apple  and Hatari French keyboards, will I have several transcoding tables to do?
  - Miguel 

Le 14 janv. 2023 à 14:43, Eero Tamminen <oak@xxxxxxxxxxxxxx> a écrit :


On 13.1.2023 19.40, Yves Le Berre wrote:
The Insert button of Inputs dialog (emulation menu of Hatari UI)
does not insert correct string ST side.
The dialog box correctly displays the PC string but
when the insert button is pressed, the ST string is
a mix between american and french ST keys (letters capitalized).

That's actually a pretty hard thing to solve.

Hatari UI does not know which language / keymap user has selected in TOS, so it uses remote API scancodes.

I think best way to solve that would be:

1. Creating (C-code) mappings from SDL key symbols to Atari scancodes for keys in all Atari keyboard layouts [2]

2. Hatari using those mappings to do SDL key symbol -> Atari scancode based on what keyboard layout TOS is using (based on TOS country code & VRAM settings, and which TOS version is in question) [1]

3. Hatari UI changing to using symbolic keys instead of scancodes

But 1) is a lot of work. And 2) assumes that user does not use some later functionality (MiNT keymaps, some ACC etc) to map keys further.

[1] That's needed any way for users to be able to input all TOS supported keys from their keyboards, in all TOS supported languages.

While scancode support gives 95-99% of that (depending on language), there are few keys that it cannot cover [3], and while symbolic key support could handle those, it's currently *very* incomplete, as currently there's *no* per-keymap support.

[2] There are a lot of Atari keyboard layouts, and they share surprising small number of key locations:

- Eero

[3] due to differences between Atari keyboard layout and USB standard SDL uses for the scancodes.

M et Y Saro
Méaudre:  04 76 94 79 32
Seyssinet: 04 76 21 61 02
// locations. vercors. free. fr
// cocoa. pod. free. fr

Mail converted by MHonArc 2.6.19+