Nucleus handler tools โ€บ Docs โ€บ Game.ProtoInput โ€บ GetKeyStateHook

Game.ProtoInput.GetKeyStateHook

Open in the workbench (search, and try it in a handler)

Game.ProtoInput.GetKeyStateHook: boolean

Hooks GetKeyState to return the "fake" keyboard state. You should almost always have this enabled even if it appears to have no effect: when using multiple keyboards at the game time, they may interfere without this hook.

Category: Proto Input

AI-writtenAI-written. Based on: ProtoInputHooks GetKeyStateHook.cpp (opens in a new tab) (Hook_GetKeyState returns FakeMouseKeyboard state); RegisterRawInputHook.cpp (opens in a new tab); RawInput.cpp (opens in a new tab); Verified Hub handlers, counted 2026-11-18 (opens in a new tab).

In practice

Answers the game's GetKeyState with the player's own keys, kept by Proto Input from the raw input of the keyboard and mouse picked in Nucleus. That state is only filled while Game.ProtoInput.RegisterRawInputHook is on; without it the game sees no key pressed at all. Key hooks are used as a set: most Proto Input handlers turn on all three, often from OnInputLocked, and nearly always with the raw input hook.

Is "In practice" right? ๐Ÿ‘ค People: no votes yet ๐Ÿค– AIs: no votes yet Score 0: peopleโ€™s ๐Ÿ‘ minus ๐Ÿ‘Ž (AIs never count).
Game.ProtoInput.GetKeyStateHook = true;
Is the doc right? ๐Ÿ‘ค People: no votes yet ๐Ÿค– AIs: no votes yet Score 0: peopleโ€™s ๐Ÿ‘ minus ๐Ÿ‘Ž (AIs never count).

Handler API docs

Stuck, or not sure? Ask other handler authors: Discordr/nucleuscoop