tonioni / WinUAE

WinUAE Amiga emulator
http://www.winuae.net/
528 stars 86 forks source link

The End+Ctrl+2 disk swapper shortcut doesn't work #290

Closed johnnovak closed 4 months ago

johnnovak commented 5 months ago

I find it hard to believe this, and that no one else has complained about it yet, but here we go. I've tested it at least 5 times with different versions, I think it's definitely an issue.

I tested this with only the portable EXE placed in an empty folder to make sure I'm using the defaults for everything. This seems to be broken going back at least to 4.9.2.

  1. Start WinUAE with every setting on the defaults. Then enable all four floppy drives and the native OSD, then put four floppy images in the disk swapper. Press Start.
  2. Press End+Ctrl+1 then End+1 to insert the first floppy in DF0 — works (as indicated by the OSD, and confirmed by pressing F12 and checking the state of the floppy drives).
  3. Press End+Ctrl+2 then End+2 to insert the second floppy in DF1 — DOES NOT WORK (the target drive is NOT changed, so the second floppy will be inserted in DF0!)
  4. Press End+Ctrl+3 then End+3 to insert the third floppy in DF2 — works
  5. Press End+Ctrl+4 then End+4 to insert the fourth floppy in DF3 — works

So only End+Ctrl+2 does not work, it's basically a no-op.

Doing these steps in any order does not change anything—End+Ctrl+2 never does its job.

Related: it's a bit strange that these shortcuts are not exposed in the mapper but are hardcoded. IMO, with such a good and flexible mapper that WinUAE has, nothing should be hardcoded, you should be able to redefine any shortcut. That would add 24 more mappable actions for the disk swapper, but hey, who cares 😎

tonioni commented 4 months ago

I can't duplicate this. Did you release all keys and then inserted them again? (END must be always pressed first) All the events are identical except floppy id.

They are hardcoded because they didn't fit in original input mapping system. And I don't think I want to remove these because it would mean saved input configs would change and this isn't trivial change, strange side-effects are possible.

johnnovak commented 4 months ago

I can't duplicate this. Did you release all keys and then inserted them again? (END must be always pressed first) All the events are identical except floppy id.

Hmm, super weird, and I believe you 😄

Yes, I've tried it now again (for the 10th time I believe) using the default config. I can easily select drives DF0, DF2, and DF3, and 100% of the time, so I'm pressing the shorcuts correctly, it always works. But selecting DF1 is impossible for me 🤷🏻 (and key 2 is not broken on my keyboard, yeah...)

Not sure what could break this for me.

They are hardcoded because they didn't fit in original input mapping system. And I don't think I want to remove these because it would mean saved input configs would change and this isn't trivial change, strange side-effects are possible.

Yeah, that's fine, it would be just good if End+Ctrl+2 worked on my machine too 😄

johnnovak commented 4 months ago

Ok @tonioni, mystery solved. I used a simple program to log keyboard events, and when I'm holding Home + Left Control, the 2 key simply does not generate an event on my keyboard. Interestingly, keys 1, 3, and 4 do.

If I use Right Control instead, all four number keys generate a keypress event.

So it's a physical limitation of my keyboard. This is a cheap Logitech keyboard, I guess some gaming keyboards are better and allow more non-standard key combinations.

It's not a big deal really, and like you said, if extending the mapper with more mappings is not trivial and risky, it's probably not worth it. I can live without it (I'm using the Right Ctrl as the Right Amiga button, that's more important).

tonioni commented 4 months ago

I was going to ask if perhaps your keyboard does not have "n-key rollover" (which is probably only guaranteed in "gaming" keyboards) which allows any key combinations up to 5+ keys pressed at the same time. Normal keyboards can have problems even with 3 keys depending on which keys are pressed.

I can add new events to input event list but I prefer not to add any new events (unless it is really important) that are mapped by default.

johnnovak commented 4 months ago

Fair enough. I should get a better keyboard 😎

In practice, most keyboards in use are 2-key rollover (2RKO), then common 3 (e.g., Ctrl+Shift+X, Shift+Alt+X), or even 4 key shortcuts (e.g., Ctrl+Shift+Alt+X) do work, but any random 3 or 4 keys together is not guaranteed. End+Ctrl is pretty non-standard.