Opened 8 months ago

Last modified 8 months ago

#14694 new defect

Missing undocumented keystrokes: Alt+NumPad 3 and Alt+NumPad9

Reported by: CaneCraft Owned by:
Priority: low Component: Engine: SCI
Version: Keywords:
Cc: Game: Quest for Glory 4

Description (last modified by CaneCraft)


Quest for Glory IV has a few undocumented keystrokes that do not work on the ScummVM version. These must be input by holding Alt, pressing a button, and releasing Alt.

Alt + NumPad 3 | Should open the main menu (same as pressing Ctrl+C)
Alt + NumPad 9 | Should open the inventory (same as pressing Tab)

The latter is fairly irrelevant, but the former is used by speedrunners.


ScummVM 2.8.0git9303-gc59521f979f (Nov 13 2023 22:16:27)

Change History (2)

comment:1 by CaneCraft, 8 months ago

Description: modified (diff)

comment:2 by sluicebox, 8 months ago

How did you find out that these key combinations worked?

These are ALT codes, not QFG4 shortcuts. ALT codes were a IBM BIOS feature that Windows also implements for entering arbitrary characters by number:

For example, ALT+65 prints a capital A, because 'A' is character code 65.

In this case, characters 3 and 9 triggered QFG4 functionality. I have no idea how, that sounds like a bug in Sierra's interpreter that's translating them incorrectly through the event layers. I am confident that no QFG4 developer intended that to work. We can see in the decompiled scripts that they are only listening for Ctrl+C or Tab; there was no second set of shortcuts.

That implies that this worked by accident because character codes 3 and 9 happen to turn into SCI event messages 17 and 22.

I'm not saying it can't be done, but it was an unintentional feature and I don't know if we're capable of implementing given that we've got the SDL layer to go through on top of everything, and we're talking about characters that can't be typed.

To implement this you'd have to:

  1. Figure out what Sierra's keyboard driver and exe were doing to produce event code 17 from character code 3
  2. Figure out how to reproduce that in kGetEvent
  3. Figure out if we can get character codes 3 and 9 through all the SDL/ScummVM layers to the SCI engine code

Sounds hard!

Note: See TracTickets for help on using tickets.