A mod that allows modpack creators to use KubeJS to register, modify, and remove key bindings.
Below is an example of changing the default accessory menu key to ALT+X (moved under vanilla's Misc category) and removing the jump key binding:
KeyBindEvents.modify(event => {
event.modifyKey('key.curios.open.desc', GLFM.GLFM_KEY_X)
event.modifyModifier('key.curios.open.desc', KeyModifier.ALT)
event.modifyCategory('key.curios.open.desc', 'key.categories.misc')
event.remove('key.jump')
})
Note: Do NOT install this mod on servers.
How to Install keybindjs (Mod)
keybindjs by yiran1457 is verified for Forge, Neoforge across Minecraft versions 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2 (latest release: 2001-2.2.3, file size: 18 KB). Follow the steps below to install it safely from ModCraft.tv:
- Click the Download button above and select your Minecraft version (1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2) and platform (Forge, Neoforge).
- Make sure you have the compatible loader or environment installed for Forge, Neoforge.
- Move the downloaded keybindjs file into your Minecraft
.minecraft/modsfolder and launch the game.
All Versions
+ Add VersionAll events are transferred to the client. <br>
中文 <br>
所有事件都转移至client
Allow Extra to directly enter the keymapping name<br>
中文<br>
允许Extra直接填写keymapping name
KeyBindEvents in startup. Added JSIO for reading and writing JS files (although this has little to do with the content of this mod).ALT, CTRL, SHIFT as key bindings for monitoring).``
js
KeyBindEvents.keyRelease('customName', event => {})
KeyBindEvents.keyReleaseInGui('customName', event => {})
KeyBindEvents.firstKeyPress('customName', event => {})
KeyBindEvents.firstKeyPressInGui('customName', event => {})
``Example usage:
``
js
KeyBindEvents.modify(event => {
event.addListener('www', 'key.forward')
event.addListener('sss', 'key.back')
})
``Allows detecting key presses as if using self-registered key bindings.
@key_name and @category_name to retrieve the name of the key and the name of the type, similar to ProbeJS snippets.