lgblgblgb / xemu

Emulations (running on Linux/Unix/Windows/macOS, utilizing SDL2) of some - mainly - 8 bit machines, including the Commodore LCD, Commodore 65, and the MEGA65 as well.
https://github.com/lgblgblgb/xemu/wiki
GNU General Public License v2.0
201 stars 31 forks source link

MEGA65: Semicolon and colon misplaced in keymap-default.cfg #362

Closed nobruinfo closed 1 year ago

nobruinfo commented 1 year ago

Describe the bug

Two keys are interchanged in the default key mapping. So rectangular brackets are wrongly placed aswell. ; is mistakingly at the place of :.

Remapping using a custom keymap.cfg with alternated assignments unfortunately takes no effect.

Used version of the project

Tested with Windows binary 20220613133247

Since being reproducable by the folks in Discord console is not dumped here.

To Reproduce

  1. Start Emulator
  2. Use any stable ROM.
  3. Wait for a regular start reaching READY.
  4. Type where on a U.S. keyboard would be ; and you get : and vice versa. Same with shifted characters ] and [. See also attached picture.

Expected behavior

Screenshots

grafik

Computer/Device (please complete the following information):

Additional context

Thank you very much for your excellent emulator and fixing this slight inconvenience. It's no hurry.

lgblgblgb commented 1 year ago

Hi! Thanks for the report. Well, this is not exactly a bug, I would say, but indeed a kind of inconsistency. I'm very much unsure what to do at this point, to be honest. I mean, you're right, it would be more consistent to swap them. However since this is the default for years, maybe users got to use of it already, also it's possible to swap those by anyone with the keymap config file feature any time, without any change in the Xemu's code (at the other hand, it's also true, that people wanting the "old and inconsistent behaviour" can do the same, ie using a custom keymap file, if the change bothers them. Let me sleep one night on this :) It's a kind of hard question since it's not a technical issue too much, thus me being unsure what would be the right move here ...

nobruinfo commented 1 year ago

@lgblgblgb Oh, I really thought it only was just that - an obvious bug. Of course if it cannot be fixed without breaking stuff (even if only in user's minds) it no longer can be treated as a pure bug. Let me collect some thoughts:

  1. In terms of compatibility to an established behaviour, yeah. Changing back things only to ensure it to be right in minds of single persons does not qualify for a bug.
  2. From a technical point of view: Right of the key L there are three keys on a PC keyboard. The third (next to the PC's Enter key) is where there is = on the Mega65. On Xemu however this is the Arrow-Up-Symbol and Pi if Shift is used. Therefore you're absolutely right. Xemu is not positional in terms of the keys between the letter keys and where Backspace and Enter are on a PC.
  3. But now! On no keyboard of this world rectangular brackets are back-to-back like ] [. They are always left is "open", right is "close": [ ]. That said it gets complicated as this is not applied for : ;. Indeen this is the order on an American keyboard but not on a German where it is like now mapped: ; :. One could argue this to be a European approach. But if so, why is the rest of a Mega key layout merely American?

If you should decide to consider the behaviour correct we sure can simply close this ticket. In such case I would open a new one because I'm unable to swap those keys in keymap.cfg unfortunately. We also can discuss further in Discord.

lgblgblgb commented 1 year ago

I don't have the intent "just close" this issue, since the problem is very much valid. The other thing is interesting as well, that you couldn't swap those keys using a custom keymap.cfg. That's another issue, but also a valid one. Though I cannot reproduce it, it worked for me. My method was:

  1. find out the preferences directory
  2. copy keymap-default.cfg to keymap.cfg in the preferences directory
  3. edit keymap.cfg:

Old/default:

SEMICOLON ;
COLON '

New:

COLON ;
SEMICOLON '

So I've simply swapped the definitions of the two lines. If it sill does not work you, please send me your keymap.cfg where you tried to swap those, so I can check if there is any problem with it.

Surely, this second issue does not mean I refuse to remedy the original issue, but this is also an issue.

nobruinfo commented 1 year ago

@lgblgblgb I retried and thought to have made it like so. Apparently I must have made the reassignment wrong the first time. Please accept my apologies. It now works just fine. So no follow-up is required.

Edit: No "find the preferences" required as you could follow this instruction. ;)

lgblgblgb commented 1 year ago

No need for apologies. If you found a bug, great, we can kill one, I'm happy :) If it turns out it's not a bug, I can be happy too - at the other hand - that I coded it well, no need to fix ;) So in any way, everything is OK.

Hehe, indeed, I always write that every time to users (pref.dir ...) but honestly I guess there should be even a FAQ with common questions (not just this, but there are some typical ones ....) so it's enough to drop a pointer to that, then.

nobruinfo commented 1 year ago

@lgblgblgb Great, all fine. What now needs to be done from my side is to update the now expected design into the SVG. This will not be followed by this issue.