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. 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) 
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.
 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 , and while symbolic key support could handle those, it's currently *very* incomplete, as currently there's *no* per-keymap support.
 There are a lot of Atari keyboard layouts, and they share surprising small number of key locations:
 due to differences between Atari keyboard layout and USB standard SDL uses for the scancodes.