Java modGame Mechanics
KeyboardJS
by LirxOwO
KeyboardJS adds keyboard and mouse input events to KubeJS scripts on Minecraft 1.20.1 Forge, working on both client and server without a client-side bridge.
Our summary
What this project does
What it does KeyboardJS is a KubeJS addon that lets scripts react to keyboard and mouse input. It supports press, release, and repeat events for keys and mouse buttons, plus a polling API to check whether a key is currently held. Client scripts handle input locally without sending packets. Server scripts receive player input through KeyboardJS's own Forge network channel, so no extra client-side bridge script is required. The mod works on Minecraft 1.20.1 with Forge 47 or newer and KubeJS 2001.6.4 or newer. Both the client and the server must have the mod installed when playing multiplayer. ## Who it suits Pack developers and server owners who want custom keybinds, macros, or interactive mechanics driven by player input. It fits scripts that need to run on the server - such as granting experience, running commands, or changing world state - while keeping the client lightweight. ## Main capabilities - Keyboard and mouse press, release, and repeat events in client and server scripts. - Key state polling with
Reactions
Log in to react.
Compatibility
Versions and loaders
Gallery
