Nucleus handler tools β€Ί Docs β€Ί Checks

Key or cursor hooks without raw input

Infoprotoinput-needs-raw-inputA Nucleus check Β· Worth knowing: it works, with a catch.

Why it matters

GetCursorPosHook and the key state hooks answer the game with the player's own cursor and keys. Proto Input only reads those keyboards and mice when Game.ProtoInput.RegisterRawInputHook is on, so without it the game sees no key pressed and a frozen cursor.

Example

βœ— Wrong

Game.ProtoInput.InjectStartup = true;
Game.SupportsMultipleKeyboardsAndMice = true;
Game.ProtoInput.GetKeyStateHook = true;

βœ“ Right

Game.ProtoInput.InjectStartup = true;
Game.SupportsMultipleKeyboardsAndMice = true;
Game.ProtoInput.RegisterRawInputHook = true;
Game.ProtoInput.GetKeyStateHook = true;

How to fix it

Turn the raw input hook on (the quick fix adds it). Shown only in handlers with Game.SupportsMultipleKeyboardsAndMice; for controller-only players a frozen cursor is harmless.

Turn it off, or change how it shows

Each check can be shown as an error, warning, info or hint, or turned off. VS Code: "splitscreenme.lint.rules": { "protoinput-needs-raw-input": "off" } in your settings. Notepad++: Plugins β€Ί Nucleus Co-op handlers β€Ί Settings. Command line: ncdev lint --rule protoinput-needs-raw-input=off. Other editors: the lint.rules setting of ncdev lsp.

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