How to Make a Key Binding in Minecraft (Mod Maker guide)

Learn how to create a custom Key binding in your web browser with 9Minecraft Mod Maker. Add new client key actions that trigger your selected events without installing anything.

  1. Open the Studio and a Workspace

    Open 9Minecraft Mod Maker directly in your web browser. You do not need to download or install any software to get started.

    Open your existing workspace or create a new one. Make sure your workspace is set to one of the supported versions for this element, which are NeoForge 26.1.2 or NeoForge 1.21.1.

  2. Add a Key binding Element

    Look for the green plus button in your workspace and click it to add a new mod element.

    Find the Logic & code group and select Key binding. A Key bind adds a new key action for the client that causes a selected event result.

  3. Choose the Key and Name

    Find the Key field. This parameter defines the default key used to execute the key binding procedure. Do not worry if players prefer a different button, because they can always change it inside the Controls menu in the game.

    Next, fill in the Creative tab name field. This parameter controls the name of the key shown inside the Controls tab in Minecraft settings.

  4. Set the Category

    Fill in the Category field. The key binding category is the category shown in the controls section of Minecraft settings.

    All keybindings belonging to the same category should have the same category key. You can also set the actual display name for this category later in your workspace localization settings.

  5. Add the When key pressed Action

    Look at the When key pressed field.

    Select or create a procedure here. This procedure will be executed the moment the selected key is pressed by the player.

  6. Add the When key released Action

    Look at the When key released field. The procedure you select here will be executed when the selected key is released after the player has pressed the key.

    When building your custom procedures for this field, you can use the pressedms dependency to determine for how long the key was pressed.

  7. Test with Build & run and Export

    Save your new Key binding element. Click the Build & run button in the studio to test your new key action and make sure your procedures trigger as expected.

    Once everything works properly, export your mod file so you can use it in Minecraft.

Tips

Try it in the Studio All key binding fields explained →