Nucleus handler tools › Docs › Game.ProtoInput › RegisterRawInputHook

Game.ProtoInput.RegisterRawInputHook

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

Game.ProtoInput.RegisterRawInputHook: boolean

This hook will unsubscribe the game from Raw Input (if it has already subscribed to it), and then subscribes Proto Input to receive raw input instead. Raw input received is forwarded back to the game if it uses raw input. Proto Input receives all keyboard/mouse input from this hook so it always needs to be enabled.

Category: Proto Input

AI-writtenAI-written. Based on: ProtoInputHooks RegisterRawInputHook.cpp (opens in a new tab) (InstallImpl: FindAlreadySubscribedWindows, RawInput::UnregisterGameFromRawInput, RawInput::RegisterProtoForRawInput); RawInput.cpp (opens in a new tab) (ProcessRawInput, Send…Messages); FakeMouseKeyboard.cpp (opens in a new tab); Nucleus ProtoInputLauncher.cs (opens in a new tab); Verified Hub handlers, counted 2026-11-18 (opens in a new tab).

In practice

This is the switch that makes Proto Input read each player's own keyboard and mouse: installing it is the only place Proto Input registers its raw input window, and it takes raw input away from the game (the game's own registrations are redirected to Proto Input). Everything per-player for keyboards and mice depends on it: the Send…Messages options post each player's input to their window, and the cursor and key state hooks (GetCursorPosHook, GetKeyStateHook, …) answer from the state it fills. Without it those hooks see no keys pressed and a frozen cursor. Most Proto Input handlers turn it on, many of them from Game.ProtoInput.OnInputLocked with ProtoInput.InstallHook.

Is "In practice" right? 👤 People: no votes yet 🤖 AIs: no votes yet Score 0: people’s 👍 minus 👎 (AIs never count).
Game.ProtoInput.RegisterRawInputHook = 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