Re: [hatari-devel] Recent symbolic keyboard mapping change |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [hatari-devel] Recent symbolic keyboard mapping change
- From: Thomas Huth <th.huth@xxxxxxxxx>
- Date: Sat, 5 Oct 2024 06:28:22 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1728109704; bh=pxIl+SqahC1EnIxLHLObQiJow0tW7nREvlSzibQqExk=; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type: Content-Transfer-Encoding:From; b=AmvQCWJzocca8/s+s8YGO0+qZOytEdbom11NHI8IZwI7RJ/exGkv5LbyllPGJwD8t /EhLJoGv2GtJVeTe7lAJkhWuXve5VzM5RkE8MLbis2eF4MaMLzof1iD05tIXdjuz1y kIbuJ5FFw1ROzboeM9PJs1DdyBBMQT4rTveXmJ9q2SXENCrpXHccyhbYz9uvVqCxAs MpjQLOyEQOe6AYf1mEIJSl8V2TSvSA3dCtWYNw8Tf5KOSxo63MRo7lK9rppEhlunim CVE/ZRlgq75VRfeH+Ztgn8awsd58cXJEH/0YlsdJCfpC+ITuP2TtE8XSCd3ySNMgS9 1wBbvr4X8bf5w==
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