[Scummvm-tracker] [ScummVM :: Bugs] #16667: GRIM: Action keys no longer work after bringing up the ScummVM Global Main Menu

ScummVM :: Bugs trac at scummvm.org
Sat Apr 11 12:44:47 UTC 2026


#16667: GRIM: Action keys no longer work after bringing up the ScummVM Global Main
Menu
--------------------------+--------------------------
Reporter:  antoniou79     |      Owner:  (none)
    Type:  defect         |     Status:  new
Priority:  normal         |  Component:  Engine: Grim
 Version:                 |   Keywords:
    Game:  Grim Fandango  |
--------------------------+--------------------------
 Tested with ScummVM 2026.2.0 and a recent daily 2026.2.1git on Windows 10.

 Steps to reproduce:
 1. Start Grim Fandango
 2. In the first screen (after the prologue ends) walk Manny up to the
 pneumatic tube until he looks at it.
 3. Press the "E" key. Manny should say "It looks like I've got a message".
 4. Bring up the Global Main Menu (GMM).
 5. Click Resume from the Global Main Menu to return back to the game.
 6. Press "E" again. Manny won't say anything. In fact other action keys
 won't work now (eg. "A" for opening the message).

 This was mentioned on the forums a few weeks ago but there was no ticket
 created here for reference.

 I think I understand the cause of this but I am unsure about the fix, so
 I'll be issuing it as a PR.

 This issue is particularly triggered on Windows, because the default key
 combo for the ScummVM GMM is "Ctrl + F5". When those keys are pressed the
 Grim engine registers that Ctrl is in pressed state, but then the global
 pause happens, and the KEYUP is consumed externally but not by the Grim
 engine (because it's paused), so when resuming back to the game, the Ctrl
 is still "stuck" as pressed. So now the action keys don't work because the
 engine applies the Ctrl modifier for them.

 So the quick "workaround" is to just press Ctrl by itself again, and the
 engine will handle it and its key-up event and clear it.

 I'm not entirely sure how the clearing up should be handled by the code,
 because I don't have a good grasp on all the LUA stuff and how that's
 affected by key pressed/unpressed registration.

 There's a GrimEngine::clearEventQueue() in grim.cpp but that could be
 used, but that might be an overkill (and have potential unwanted side-
 effects with clearing other valid events that might be pending). Its
 internal loop for clearing the _controlState array should suffice, but
 again I'm not sure if that's 100% safe to do without creating some
 inconsistent state to the engine. Nonetheless, my PR will be proposing to
 use the latter loop.
-- 
Ticket URL: <https://bugs.scummvm.org/ticket/16667>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM


More information about the Scummvm-tracker mailing list