Nucleus handler tools โ€บ Docs โ€บ ProtoInput โ€บ EnableMessageFilter

ProtoInput.EnableMessageFilter

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

ProtoInput.EnableMessageFilter(
  instanceHandle: number,
  filterID: number
): void
AI-writtenAI-written. Based on: Nucleus ProtoInput.cs (opens in a new tab) (EnableMessageFilter); ProtoInputLoader InstallMessageFilter.cpp (opens in a new tab); ProtoInputHooks PipeCommunication.cpp (opens in a new tab) (SetupMessageFilter); MessageFilterHook.cpp (opens in a new tab) (FilterMessage).

Turns on a window message filter in the game instance. Parameters: the instance handle (Player.ProtoInputInstanceHandle) and a filter ID from ProtoInput.Values (the ...FilterID values). Filters only act while the MessageFilterHookID hook is installed.

AI-writtenAI-written. Based on: Nucleus ProtoInput.cs (opens in a new tab) (EnableMessageFilter, ExposedValues); PlayerInfo.cs (opens in a new tab) (ProtoInputInstanceHandle).
  • instanceHandle: The player's Proto Input instance, Player.ProtoInputInstanceHandle (or PlayerList[i].ProtoInputInstanceHandle).
  • filterID: Which filter to turn on: a ProtoInput.Values.*FilterID value, e.g. ProtoInput.Values.RawInputFilterID or ProtoInput.Values.WindowActivateFilterID.
AI-writtenAI-written. Based on: Nucleus ProtoInput.cs (opens in a new tab) (EnableMessageFilter, ExposedValues); ProtoInputHooks MessageFilterHook.cpp (opens in a new tab); Verified Hub handlers, counted 2026-11-17 (opens in a new tab).

In practice

Turns a message filter on for one instance. It only acts with Game.ProtoInput.MessageFilterHook on. Handlers call it in Game.ProtoInput.OnInputLocked and the matching ProtoInput.DisableMessageFilter in Game.ProtoInput.OnInputUnlocked; RawInputFilterID and MouseButtonFilterID are the common filters.

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

Example: From Hub handlers

for (var i = 0; i < PlayerList.Count; i++) {
  var player = PlayerList[i];
  ProtoInput.EnableMessageFilter(
    player.ProtoInputInstanceHandle,
    ProtoInput.Values.MouseButtonFilterID
  );
}
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