Opened 5 months ago

Closed 5 months ago

#14781 closed defect (fixed)

SCUMM: Numpad keys get picked up multiple times in Dial a Pirate test for Monkey Island EGA

Reported by: antoniou79 Owned by: AndywinXp
Priority: normal Component: Engine: SCUMM
Version: Keywords: EGA, copy protection, dial a pirate, numpad
Cc: Game: Monkey Island 1


This was tested on ScummVM 2.8.0 and ScummVM 2.9.0git current build from master HEAD on Windows 10 x64.

The bug was originally reported on the forum by member Wronschien here:

Steps to reproduce:

  • Launch Secret of the Monkey Island EGA version, and reach the copy-protection check screen
  • Press the numpad keys on your keyboard to write the year reponse.

What happens:

  • Pressing the numpad keys may cause the corresponding number digit to be "pressed" twice.

What should happen:

  • Each keystroke of the numpad keys should be picked up once, without repetition (unless it's held down past the repetition duration threshold)

This bug seems to be a regression, since 2.7.1 version does not have this issue.

Bisecting points to this commit as the offender for this behavior:
"SCUMM: Fix remapping of numpad keys on EVENT_KEYUP"

Change History (4)

comment:1 by eriktorbjorn, 5 months ago

This can also be reproduced with the VGA floppy and (some) Mac versions of Monkey Island 1 (if you enable the copy protection) and Monkey Island 2. (Probably others, but those are the ones I own.) This isn't surprising, I'm just mentioning it because I imagine at least Monkey Island 2 to be a lot more commonly available among ScummVM developers.

Last edited 5 months ago by eriktorbjorn (previous) (diff)

comment:2 by antoniou79, 5 months ago

If it helps further, the commit was from this Pull Request:

And, as mentioned in the comments sections, there was a follow-up commit for this that also reads as relevant:

SCUMM: Improve numpad remapping following PR #5406
In particular we set the _keyPressed object only when we find
an event.kbd for the numpad keys. Otherwise we immediately
get double events when pressing any key.

comment:4 by AndywinXp, 5 months ago

Owner: set to AndywinXp
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.