Skip to main content

Input Lock

InputLockService is owned by Packet Utils. It blocks game-canvas keyboard, mouse, wheel, and RuneLite menu-click input while active n3 automation plugins request the lock.

The lock is controlled by Packet Utils config:

  • Block user input during automation defaults to on.
  • Turning it off leaves automation behavior unchanged but allows manual canvas input to reach the game.

Coverage

The lock uses RuneLite KeyManager, MouseManager, an AWT listener filtered to client.getCanvas(), VarClientInt.BLOCK_KEYPRESS, and MenuOptionClicked.consume().

It does not block OS-level actions, RuneLite side-panel controls, plugin config edits, or closing the client. The AWT listener is canvas-filtered so users can still use RuneLite UI outside the game canvas.

Ownership

Automation plugins request the lock only while they own active work:

  • Market Alcher while its controller is ticking and not break-paused.
  • Tree Woodcutter while its controller state is not STOPPED.
  • Tutorial Island while it is not complete, halted, or manual-paused.
  • Guardians of the Rift while its controller is running and not waiting or break-paused.
  • Questing Assistant while enabled after account bootstrap.
  • Walk Assistant while it owns an active path.
  • Mule Orchestrator while the slave workflow has an active command.
  • Dialogue Helper only while a visible continue or Quest Helper option is being handled.

Packet Utils refreshes the lock from PacketUtilsPlugin.onGameTick. Owners must request again from their active tick path; stale owners expire after a short game-cycle window so a stopped plugin cannot hold the lock indefinitely.

Synthetic Input

CanvasInput and KeyboardHelper wrap suite-dispatched AWT events with InputLockBypass.withSyntheticInput(...). This lets n3 automation continue to type, click, move the camera, or dismiss menus without being blocked by the same lock that blocks manual user input.

Verification

Unit tests cover request/release, stale-owner expiry, config disablement, synthetic bypass, key/mouse/wheel/menu consumption, and BLOCK_KEYPRESS refresh. Live RuneLite verification is still required before claiming complete coverage for revision-sensitive client input behavior.