Key binding

Key bind adds new key action for client that causes selected event result.

NeoForge 26.1.2NeoForge 1.21.1

Step-by-step guide: how to make key binding →

Fields you fill in

Category

Key binding category is category shown in controls section of Minecraft settings.

All keybindings belonging to the same category should have the same category key.

To actually set category name, go to **${l10n.t("tab.workspace")} -> ${l10n.t("workspace.category.localization")} ->

${l10n.t("workspace.localization.add_entry")}** and use key.categories.${data.keyBindingCategoryKey} for the entry name

and then set the value to desired category name.

Key

This parameter defines the key used to execute the key binding procedure.

Players can always change it inside the Controls.

Creative tab name

This parameter controls the name of the key shown inside the Controls tab in Minecraft settings.

When key pressed

This procedure will be executed when the selected key is pressed.

When key released

This procedure will be executed when the selected key is released (after the player has pressed the key).

You can use pressedms dependency to determine for how long the key was pressed in your custom procedures.