Minecraft.How
Loading...
Skip to content

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 Keyboard.pressed(...) for combo detection. - Key name filters such as G, L_SHIFT, and MOUSE_LEFT. - Modifier state flags for Shift, Ctrl, Alt, and Super keys. - Automatic listener synchronization after login and /reload. - Server-side input validation and packet rate limiting. ## Compatibility caveats The mod is built for Minecraft 1.20.1 on Forge only. It requires KubeJS 2001.6.4 or newer. Client-side installation is mandatory for multiplayer; the server cannot receive input events without it. Input packets aren't trusted data - a modified client can forge them. Always validate permissions, cooldowns, held items, distance, and other game state in server scripts before performing sensitive actions. The project is licensed under MIT.

Reactions

Log in to react.

Compatibility

Versions and loaders

1 releases on record

Gallery

KeyboardJS icon

We use cookies to improve your experience. By continuing to use this site, you agree to our use of cookies. Read our Privacy Policy