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