All Mods Resource Packs Data Packs Shaders Modpacks Plugins
Keybindery

Keybindery

by trevlar • Downloads: 0 • Followers: 0
Description
Gallery
Changelog
Versions

Keybindery

Keybindery lets any keybind in the game use a combination of keys, and makes your keybinds easier to find and change. You can bind Ctrl + Shift + K or X + Z to any action, vanilla or modded, search and filter the Key Binds menu, and edit a mod's keybinds from inside that mod's own settings.

I also built it as a library, so my other mods can put keybind buttons in their own settings screens, and other modders can do the same.

It runs on the client. You can also install it on a server, where it does nothing by itself, so that mods that require it, like Inventory Plus, can load there too.

Features

Chord keybinds

  • Bind a combination like Ctrl + Shift + K or X + Z to any keybind, vanilla or modded. Mouse buttons can be part of a chord too.
  • Single-key keybinds keep working as they did.
  • Simultaneous Mode, which is off by default, makes the keys of a chord go down together within a short window you set.

A better Key Binds menu

  • A search box, a Search by key chord button, and Sort and Filter dropdowns sit along the top.
  • Each row has a Conflicts icon that shows every keybind sharing a key with it, and a Reset icon.
  • Categories fold up with a click, and keybinds that vanilla would put under Miscellaneous are grouped by the mod they come from.

Keybinds button in the pause menu

  • A small button at the end of the pause menu's row of icon buttons opens the Key Binds menu.

Keybinds in each mod's settings

  • A mod with a YACL config screen gets a Keybinds tab that lists its keybinds.
  • Other config screens opened from Mod Menu get a Keybinds button that opens the Key Binds menu filtered to that mod.

Keybinds inside other mods

  • Mods built on Keybindery can put chord keybind buttons right in their own settings. Inventory Plus shows its keybinds next to the settings they belong to, and Sandboxes gives each sandbox its own key.

Requirements

  • Fabric API, for registering keybinds and hooking into the game's client events.
  • MenuKit 7.4.0 or newer, below 8.0.0. It draws the toolbar at the top of the Key Binds menu and the Keybinds button on other mods' config screens.

YACL 3.9.7 comes bundled inside the jar, so there is nothing extra to install for it.

Pairs well with

  • Mod Menu. Keybindery's own settings open from Mod Menu, and the Keybinds button on other mods' config screens needs it.

Compatibility

  • Minecraft 26.3 with Fabric Loader 0.15.0 or newer.
  • Required on the client and optional on the server.
  • Keybindery changes KeyMapping through narrow mixin injections and never overwrites a vanilla method, so other mods that touch the same code still run. That's how it works alongside input mods such as Controlify.
  • If you'd rather use another mod's controls screen, like Controlling's, or vanilla's, you can turn off Keybindery's replacement in its settings.
  • Chords are saved in vanilla's options.txt. If you remove Keybindery later, every keybind goes back to a single key.

How to use

Open the Key Binds menu

  • Press Escape in game. At the right end of the row of small square buttons there is a button with a K key icon. Hovering over it shows "Keybinds".
  • Click it to open the Key Binds menu. Done takes you back to the pause menu.
  • The menu also opens the usual way, through Options, Controls, Key Binds.

Bind a chord to a keybind

  • Each row is a wide button with the keybind's name on the left and its current key on the right.
  • Click the row, then hold down every key of the chord and release them. The chord is the set of keys you held at once, up to six keys, and it saves when the last key comes up.
  • Mouse buttons pressed while the row is waiting for keys become part of the chord. The click that opens the row doesn't count. A click can come before or after the keys, as long as everything is held at once.
  • While the row is waiting for keys, Escape, Delete, or Backspace clears the keybind so it's unbound.
  • A chord fires when all of its keys are held down. Every keybind that matches fires, so if Y is bound to one action and Shift + Y to another, pressing Shift + Y fires both.
  • Long keybind names scroll inside the row.

Conflicts and Reset

  • Two keybinds conflict when they share any key. A keybind bound to S conflicts with vanilla's Walk Backwards on S, and X + Z conflicts with X. The one overlap that isn't flagged is two vanilla keybinds that are both still at their default keys.
  • A conflicting keybind shows its key in yellow brackets.
  • The warning icon next to each row filters the list to every keybind that shares a key with that row. Hovering over it shows "Show Conflicts". It is grayed out when the row has no conflicts.
  • The reset icon puts the keybind back on its default key. It is grayed out when the keybind is already at its default.

Search, sort, and filter

The toolbar at the top of the Key Binds menu has two rows.

  • Search by name. Type part of a keybind's name or its category to narrow the list. Case doesn't matter. Separate terms with | to show keybinds that match any of them, as in Inventory Plus | Hotbar Pockets.
  • Search by key chord. Click the button, hold a chord, and release. The list shows every bound keybind that shares a key with that chord. Escape, Delete, or Backspace while it's waiting for keys clears it.
  • Sort. Category (the default), Alphabetical, or Key Chord. Alphabetical and Key Chord show one list without category headings.
  • Filter. None (the default), Conflicts, or Not Bound.
  • Changing the search, sort, or filter scrolls the list back to the top.
  • The menu opens with Category sort and no filter each time.

Fold categories

  • With Category sort, each category heading has an arrow. Click a heading to fold its keybinds away, and click it again to unfold them.
  • The Collapse All button folds every category in view. When they're all folded, it changes to Expand All.
  • Folded categories stay folded until you close the game.
  • Keybinds that vanilla would put under Miscellaneous are grouped by the mod they come from instead, under a heading made from the mod's ID.

Use vanilla's controls screen instead

Keybindery's settings have a Controls Screen tab with one setting.

Setting Default What it does
Disable controls-screen replacement Off When on, the game uses vanilla's Key Binds screen instead of Keybindery's. Close and reopen the screen for it to take effect.

Simultaneous Mode

Normally a chord fires while all of its keys are held, however long ago each one went down. With Simultaneous Mode on, the first presses of all its keys also have to land within a set window, so holding Ctrl for a while and then tapping K no longer counts as Ctrl + K.

Open Keybindery's settings from Mod Menu. Simultaneous Mode is on the Chord Detection tab.

Setting Default Range What it does
Simultaneous Mode Off On or off Requires a chord's keys to go down together.
Simultaneous Window (ms) 100 50 to 500, in steps of 10 The most time allowed between the first and last key of a chord. Larger is more forgiving, smaller is stricter. It can only be changed while Simultaneous Mode is on.

To switch the mode while playing, bind the Simultaneous Mode key.

Key Category Default What it does
Simultaneous Mode Keybindery Unbound Turns Simultaneous Mode on or off and shows the new state above your hotbar.

Find a mod's keybinds from its settings

Keybindery matches keybinds to a mod by the mod's ID in the keybind's name, which is the usual convention for Fabric mods. A mod with no keybinds gets neither the tab nor the button.

  • YACL config screens get a Keybinds tab at the end of their tabs, with one row per keybind. Click a row, then hold and release a chord to bind it. Escape cancels and keeps the old key, and Delete or Backspace clears it. The warning icon opens the Key Binds menu filtered to that keybind's conflicts, and the reset icon puts it back on its default. Changes apply when you save the config screen, like any other YACL setting.
  • The last row of the tab, Keybind Menu, has an Open button that opens the full Key Binds menu with no filter.
  • Other config screens opened from Mod Menu get a Keybinds button in the top-right corner. It opens the Key Binds menu with the search box filled in with that mod's category, so you can see the filter and clear it.

For mod developers

Other mods can use Keybindery to put chord keybind buttons in their own settings screens and to create key bindings while the game runs.

What the API provides

  • Read and set the chord on any KeyMapping.
  • Add a keybind row to a YACL config with one call. It adds a label, then a row with the chord button, the warning icon for conflicts, and the reset icon.
  • Open the Key Binds menu filtered to one mod or several, and check whether a mod has any keybinds.
  • Give a mapping a chord as its default with setDefaultChord, so a fresh install and Reset both land on the chord.
  • Check whether every key of a mapping's chord is held right now, with isHeld. It works while a screen is open, unlike KeyMapping.isDown().
  • Register key bindings while the game runs, one for each thing the player makes, like a sandbox. These aren't in the Key Binds menu, and the mod shows and saves them itself.
  • Get a vanilla button that captures a chord, for any screen or list.
  • For MenuKit screens, ChordButton is a MenuKit element with the chord button, the warning icon, and the reset icon in one row. It lives in the Keybindery jar rather than the API jar, so a mod that uses it requires Keybindery.
  • Without Keybindery installed, every API call does nothing safely, so a mod can support it without requiring it.

Example

ConfigCategory keybindsCategory = ConfigCategory.createBuilder()
        .name(Component.literal("Controls"))
        .options(KeybinderyAPI.getInstance().createYACLChordOption(
                myKey, Component.literal("My action"), OptionDescription.EMPTY))
        .build();

Getting started

The public interface and the Chord class are in a separate jar, keybindery-api. Compile against it. Keybindery bundles keybindery-api inside its own jar, so players install Keybindery and nothing else. A mod that uses ChordButton depends on Keybindery itself.

Read or set a chord

KeybinderyAPI api = KeybinderyAPI.getInstance();

Chord chord = api.getChord(myKey);     // current chord, or Chord.UNBOUND
api.setChord(myKey, newChord);          // overwrite

setChord saves the game's options right away, so the chord survives a restart.

Open the Key Binds menu for a mod

KeybinderyAPI api = KeybinderyAPI.getInstance();
if (api.hasKeybinds("mymod")) {
    api.openModKeybinds("mymod", currentScreen);                 // one mod
    api.openModKeybinds(List.of("mymod", "myaddon"), currentScreen); // several at once
}

The menu opens over currentScreen with the search box already filled in, so the player can see the filter and clear it.

Register key bindings at runtime

For a key binding that belongs to something the player makes while playing, like a sandbox or a lock group, register it with bindings() instead of creating a KeyMapping.

RuntimeBindings bindings = KeybinderyAPI.getInstance().bindings();
Identifier id = Identifier.fromNamespaceAndPath("mymod", "sandbox/nether_test");

bindings.register(id, Component.literal("Sandbox: Nether test"), chord, () -> openSandbox());
List<BindingConflict> clashes = bindings.conflicts(chord, id); // everything else sharing a key
bindings.unregister(id);

Registering again with the same id replaces the binding. A binding fires on the same presses vanilla passes to key mappings, follows the player's chord mode (including Simultaneous Mode), and runs on the client thread. The label is what shows when the binding comes up as a conflict. conflicts checks the player's key mappings by the same rule as the Key Binds menu, plus every other runtime binding. Runtime bindings aren't saved, so store the chord with Chord.serialize() and register it again at startup.

A chord button for your own screen

captureWidget returns a vanilla button that captures a chord.

AbstractWidget button = KeybinderyAPI.getInstance().captureWidget(x, y, 150, 20, chord, newChord -> {
    saveChord(newChord.serialize());
    bindings.register(id, label, newChord, onPress);
});
if (button != null) addRenderableWidget(button);

The player clicks it, presses a chord, and lets go, and onChange gets the chord. Escape or Delete while capturing clears it. The button keeps showing the latest chord, and the mod stores it.

Without Keybindery installed

keybindery-api has no runtime dependency on Keybindery. If a player doesn't have Keybindery, every call goes to a stub. Chords read as UNBOUND and writes do nothing. createYACLChordOption returns one disabled label that reads "\

License

MIT. See LICENSE.

Credits

Inspired by Amecs for multi-key bindings and Controlling for controls-screen search.

How to Install Keybindery (Mod)

Keybindery by trevlar is verified for Fabric across Minecraft versions 1.21.11, 26.2, 26.3 (latest release: 1.5.0+26.3, file size: 2.2 MB). Follow the steps below to install it safely from ModCraft.tv:

  1. Click the Download button above and select your Minecraft version (1.21.11, 26.2, 26.3) and platform (Fabric).
  2. Make sure you have the compatible loader or environment installed for Fabric.
  3. Move the downloaded Keybindery file into your Minecraft .minecraft/mods folder and launch the game.

All Versions

+ Add Version
Name Game version Platforms Published Downloads Actions
26.3
Fabric
1mo ago 1
26.3
Fabric
1mo ago 1
26.3
Fabric
1mo ago 1
26.3
Fabric
1mo ago 1
26.3
Fabric
1mo ago 1
26.3
Fabric
1mo ago 1
26.2
Fabric
1mo ago 1
26.2
Fabric
2mo ago 1
26.2
Fabric
2mo ago 1
26.2
Fabric
3mo ago 1
26.2
Fabric
3mo ago 1
1.21.11
Fabric
5mo ago 1
## 1.5.0

#### Changed

  • Right-clicking a keybind button no longer clears it. Escape, Delete, or Backspace while it waits for keys still does.
  • Once a keybind button is waiting for keys, every mouse button joins the chord, so a chord can include a right or middle click. The click can come before or after the keys, as long as everything is held at once.
  • Requires MenuKit 7.4.0 or newer, below 8.0.0.

#### Fixed

  • Chords with a mouse button now work in Simultaneous Mode.

#### For mod developers

  • setDefaultChord gives a keybind a chord as its default.
  • The API now works no matter which mod loads first.

## 1.3.1

### Changed

  • Requires MenuKit 7.4.0 or newer, below 8.0.0.

Nothing changes in the Key Binds menu in this release. The additions are for other mods, and players see them through those mods, like the key on each sandbox in Sandboxes 2.1.0.

### Added

  • Keybindery has its own icon in Mod Menu.
  • For mod developers, runtime key bindings. KeybinderyAPI.getInstance().bindings() registers key bindings while the game runs, one for each thing the player makes, like a sandbox. register(id, label, chord, onPress) adds or replaces one, and unregister(id) removes it. A binding fires on the same presses as vanilla's key mappings, follows the player's chord mode, and runs on the client thread. Runtime bindings don't show in the Key Binds menu and aren't saved, so the mod stores the chord with Chord.serialize() and registers it again at startup. conflicts(chord, id) lists every key mapping and other runtime binding that shares a key with it.
  • For mod developers, a chord button for any screen. captureWidget(x, y, w, h, chord, onChange) returns a vanilla button that captures a chord and passes it to onChange. Escape, Delete, or a right-click clears it.
  • Without Keybindery installed, runtime bindings do nothing, conflicts returns an empty list, and captureWidget returns null.

### Changed

  • Requires MenuKit 7.2.0 or newer, below 8.0.0.

You can now search the Key Binds menu for several things at once. Separate them with |, as in Inventory Plus | Hotbar Pockets, and the list shows every keybind that matches any of them.

Requires MenuKit 7.1.0 or newer, below 8.0.0.

For mod developers: the API adds openModKeybinds, which opens the Key Binds menu filtered to one mod or a list of mods, and hasKeybinds, which says whether a mod has any keybinds.

Updated for MenuKit 7.0.0. Requires MenuKit 7.0.0 or newer, below 8.0.0. Nothing changes in game.

Keybindery's section in Controls shows its name again, Keybindery, instead of a raw text key.

The search tools along the top of the Key Binds menu have clearer names: Search by name and Search by key chord. Together they now span the full width of the toolbar. The sort option Keybind Assignment is now called Key Chord.

The F1 Demo Chord keybind is gone. It was a developer demo and had no business in everyone's Controls screen.

A mod with no category of its own groups correctly under its own name again in Controls, instead of folding into Miscellaneous.

Built against MenuKit 6.2.0. Requires MenuKit 6.2.0 or newer, below 7.0.0.

Now runs on Minecraft 26.3.

Key names now match everywhere. A single key gets the same name in mod settings as in Controls, so Left Shift reads Left Shift in both places instead of just Shift. Chords still list every key, as in Shift+Q.

Built against MenuKit 6.1.0. Requires MenuKit 6.1.0 or newer, below 7.0.0.

The pause menu has a new Keybinds button. It sits at the right end of the row of square buttons (Report Bugs, Give Feedback, Friends, Player Reporting) and opens the Key Binds menu. Done takes you back to the pause menu.

Mods built on MenuKit can now put a chord button, with its Conflicts and Reset icons, in their own menus.

Built against MenuKit 6.0.0. Requires MenuKit 6.0.0 or newer, below 7.0.0.

Built against MenuKit 5.0.0. Requires MenuKit 5.0.0 or newer, below 6.0.0. No feature changes.

Built against MenuKit 3.0.0. Requires MenuKit 3.0.0 or newer. No feature changes.

Now runs on Minecraft 26.2. Same chords and same keybind screen as 1.0.2. The config library (YACL 3.9.6) is bundled, so there is nothing extra to install. Mod Menu integration targets the stable 20.0 release.

[1.0.2] Keybindery 1.0.2 by trevlar on Jul 02, 2026
Download
Keybindery 1.0.2

Updated for MenuKit 2.0. Keybindery now requires MenuKit 2.0.0 or newer (a separate download).
Keybindery Icon
Download Keybindery
Select game version
Select platform