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

Game.ProtoInput.GetKeyboardStateHook

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

Game.ProtoInput.GetKeyboardStateHook: boolean

Basically the same as Get Key State, except it returns the state of the entire keyboard. Should almost always be enabled.

Category: Proto Input

AI-writtenAI-written. Based on: ProtoInputHooks GetKeyboardStateHook.cpp (opens in a new tab) (Hook_GetKeyboardState 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 GetKeyboardState 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.GetKeyboardStateHook = 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