Re: [hatari-devel] Recent symbolic keyboard mapping change

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


Am Fri, 4 Oct 2024 14:05:00 -0400
schrieb Brad Smith <rainwarrior@xxxxxxxxx>:

> >
> > While changes look OK in general, please use the defines from "tos.h"
> > instead of magic numbers in Keymap_SetCountry()!
> >  
> 
> I'll add that to the PR branch.
> 
> But "perfect is enemy of good", and this clearly improves what Hatari
> > had earlier...
> >  
> 
> The reason I started doing it was because of the argument about the minus
> key mapping. It was unfeasible to try and maintain one symbolic map when it
> cannot be agreed what TOS it was even aiming for.
> 
> At least when each is broken into pairs with host and TOS intending the
> same language, there is a lot less controversy.
> 
> I think almost all of the mappings I have chose should be uncontroversial,
> however I noted 3 keys in FR and 1 in SE
> 
> I would suggest having comment updates/additions as separate commit, and
> > larger code changes split per language (updates for just couple of lines
> > could maybe go to same commit).
> >  
> 
> There are no logical code changes in my PR. All changes are to individual
> case statements to correct things Thomas missed or altered when translating
> mine.

But you are mixing multiple topics in one big patch, and that makes it very
hard to discuss and apply single topics.

For example, you are adding a "/* ST Undo */" comment to SDLK_END (and some
other similar comments). Pretty straight forward, if that would be in a
separate patch, I could simply cherry-pick it and merge it.

OTOH, there are some changes in there that are debatable.

First, why did you switch back from "return 0x..." to "code = 0x..." in all
the new functions? Using "return" was way less source code, so I don't
quite see the point here?

Second, I'm not convinced that e.g. mapping SDLK_EXCLAIM to 0x02 is really
such a good idea. I thought we agreed that keeping the symbolic mapping
available in Hatari was good for people being able to get the same
character in their emulated system when they press the corresponding key on
their host system. Now if a user of a French keyboard presses "!" on their
host system (which seems to be a key in the lower right of their keyboard),
they end up with a "1" in their emulated system. That's certainly not what
they expected. Ok, if the press Shift-! they finally get the "!" on the ST
side, but from a host keyboard perspective, that's not a "!" anymore, but a
"µ". So I think that's rather confusing than helpful. So in my opinion we
should 1) only map keys when there is a 1:1 mapping possible (without
pressing shift or another modifier key) and 2) provide some mappings for
keys that are not reachable at all by other means (e.g. the ST's UNDO key).

 Thomas



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