Skip to main content

NanoForge


npm versionnpm downloadsTests statusLast commitContributors

About

@nanoforge-dev/input is NanoForge’s built-in keyboard/mouse input library. It listens to browser keyboard and mouse events and exposes a per-frame snapshot of the current input state on Context.input. Client-only.

Installation

Node.js 26 or newer is required.

Example usage

Register InputLibrary on your client app:
Query the current input state from any library’s __run:
Context.input also exposes getPressedKeys(), getMouseState(), and getWheelState() for scroll input.

Contributing

Before creating an issue, please ensure that it hasn’t already been reported/suggested, and double-check the documentation.
See the contribution guide if you’d like to submit a PR.

Help

If you don’t understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don’t hesitate to ask questions in discussions.

Modules