Re: [hatari-devel] Enhanced keymap support

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


I was able to apply these patches starting from 2024-10-05 01aa0777ebf639ba04a222fa76ed8de0f3a676f1

If it helps anyone else, for the purpose of review I have formatted it as a github PR on my personal fork here:

https://github.com/bbbradsmith/hatari_hatari/pull/2

So, I'm trying to summarize:
- Add a concept of modifier keys to the symbolic mapping system so that we can get an alternative ST scancode when some modifier keys are pressed.
- Add text parsing for these modifiers in keyboard configuration files.
- Add ALT_XXX capability for adding the anonymous numbered symbolic keys to the mapping from configuration files?
- Add some ST scancode defines like ST_CONTROL and ST_LSHIFT for code convenience.

I'm wondering what happens if the modifier key is released before the key is released. Will KeyMap_KeyUp leave the ST key hanging in that case? I would expect that for this, since the same input host key can now have multiple output mappings due to modifiers, a keyup should attempt to release all versions of that key that are in the map.

I think this is a good capability to have, especially for someone who wants to do a lot of serious text input with the emulator. For most purposes, I would personally prefer 1 host key to map to only 1 ST key, but I think such a system could be a nice capability for some users.

I also have a question whether there is a shared repository for keyboard configuration files? We don't seem to include a collection of these in the public downloads, and I don't see anything like this mentioned in the manual.


As an aside could I ask a different question about mappings without this feature. In the non-enhanced system we already have, where we can only map one output to a single host key, for a French host keyboard and French TOS:
1. How would you map the three French ST keys $0D (-_), $29 (`£), and $2B (#|@~) which do not seem to have direct analogs on a French host keyboard?
2. How would you map the three French host keys SDLK_EXCLAIM (!§), 176 (²), and SDLK_ASTERISK (*µ) which do not seem to have direct analogs on a French ST keyboard?

-- Brad Smith


On Tue, Oct 8, 2024 at 12:35 PM Yves Le Berre <yves.le_berre@xxxxxxxxx> wrote:
Following last keymap.c changes (applied last 5 days) and in
case anyone still wants to use enhanced keymap patches series,
I rebased it from master.

The patches are filed in enhanced_keymap_patches.tar.gz (attachment)
and need to be applied to master before building Hatari.

A configuration file : keymap_fr_pc.cfg (found in attachment)
explains the format of the configuration file and gives an example
of Hatari key mapping for french PC keyboard layout (105 keys)

Another configuration : file keymap_fr_pc_default_symbolic.cfg (also
found in attachment)
is lighter than first one and uses new symbolic default for most keys on
keyboard that
do not need LALT or RALT modifier.

Yves


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