
Modrinth · Minecraft mod
Modern KeyBinding
Port KeyModifier && KeyConflictContext back to Fabric & Early Forge
Quick answer
Which Modern KeyBinding release should I use?
Modern KeyBinding 1.20.4-1.3.0 targets 1.20.4 with Fabric. It must be installed on the client. Do not install it on the dedicated server. No extra mods listed for this file.
Where it goes
Is Modern KeyBinding required on the client, server, or both?
It must be installed on the client. Do not install it on the dedicated server.
This file is marked client-only.
What else does Modern KeyBinding 1.20.4-1.3.0 need?
1.20.4-1.3.0. Change the file and its required mods may change too.
This file does not list any required mods. Do not add a library just because a different file uses it.
This file does not list any required or optional mods.
Before you install it
Add Modern KeyBinding without breaking your instance.
Built for Modern KeyBinding 1.20.4-1.3.0. Pick another file and the loader, install side or required mods may change.
- 01
Stick to this file
Use 1.20.4-1.3.0. It targets 1.20.4 with Fabric; another release may have different loader, side or dependency requirements.
- 02
Bring the mods it needs
This file does not list any required mods. Do not add a library just because a different file uses it.
- 03
Put it on the correct side
It must be installed on the client. Do not install it on the dedicated server.
- 04
Pick the file you checked
Use the “Get this file” button beside 1.20.4-1.3.0. It opens that exact file at the source.
About this project
What does Modern KeyBinding add?
Modern KeyBinding
The mod ported the newer version's KeyModifier && KeyConflictContext back to Fabric & Early Forge.
Features
You can now define a keybinding's activation key with key modifiers. Like "Ctrl + G" or "Alt + S";
The keybindings with the same activation key but different key conflict contexts no longer conflict.
"Non-conflict keys" (disabled by default): The keybindings with the same key will all be activated if the key is pressed.
Attention:
The mod will crash with NEI. Use NEI Unofficial(Dependencies: CodeChickenCore | CodeChickenLib) by GTNH instead.
Import as a Gradle dependency
repositories {
//...
maven {
url "https://maven.nova-committee.cn/releases"
}
}
dependencies {
//...
// Forge
implementation "committee.nova.mkb.forge:mkb-${mc_version}:${mod_version}"
// Fabric
modImplementation "committee.nova.mkb.fabric:mkb-${mc_version}:${mod_version}"
}
Register a keybinding
Register a keybinding that:
Activates when Alt and C are pressed;
Only available in GUI.
ClientProxy.java
public class ClientProxy {
public void init(final FMLInitializationEvent event) {
//...
yourKeyBinding = KeyBindingRegistry.INSTANCE.registerKeyBinding("key.exampleKey", KeyConflictContext.GUI, KeyModifier.ALT, Keyboard.KEY_C, "key.categories.example");
}
}
Change the properties of an existing keybinding
ClientProxy.java
public class ClientProxy {
//...
public void postInit(final FMLPostInitializationEvent event) {
final IKeyBinding extended = (IKeyBinding) yourKeyBinding;
// Change the key's keyCode and modifier, as their default values.
extended.setInitialKeyModifierAndCode(KeyModifier.ALT, Keyboard.KEY_E);
// Change the key's keyCode and modifier.
extended.setKeyModifierAndCode(KeyModifier.ALT, Keyboard.KEY_E);
// Change the key's conflict context.
extended.setKeyConflictContext(KeyConflictContext.IN_GAME);
}
}
Project description from Modrinth.
Pick your setup
Modern KeyBinding by Minecraft version and loader
Choose the version and loader you play, then open the matching release.
1.20.1
1 loader build1.20
1 loader build1.19.4
1 loader build1.19.2
1 loader build1.18.2
1 loader build1.16.5
1 loader build1.8.9
2 loader builds1.7.10
2 loader buildsCheck the dependencies, then try the file in a copied instance before changing a world you care about.
Recent files
Modern KeyBinding versions and loaders
1.20.4-1.3.0
ModernKeyBinding-Fabric-1.20.4-1.3.0.jar
12 Jan 2024
1.20.X-1.2.0
ModernKeyBinding-Fabric-1.20-1.2.0.jar
16 Jul 2023
1.20-1.1.0
ModernKeyBinding-Fabric-1.20-1.1.0.jar
9 Jun 2023
1.19.4-1.1.0
ModernKeyBinding-Fabric-1.19.4-1.1.0.jar
2 Jun 2023
1.19.2-1.1.0
ModernKeyBinding-Fabric-1.19.2-1.1.0.jar
2 Jun 2023
1.18.2-1.1.0
ModernKeyBinding-Fabric-1.18.2-1.1.0.jar
2 Jun 2023
1.16.5-1.1.0
ModernKeyBinding-Fabric-1.16.5-1.1.0.jar
2 Jun 2023
1.19.4-1.0.0
ModernKeyBinding-Fabric-1.19.4-1.0.0.jar
23 May 2023
1.19.2-1.0.0
ModernKeyBinding-Fabric-1.19.2-1.0.0.jar
23 May 2023
1.18.2-1.0.0
ModernKeyBinding-Fabric-1.18.2-1.0.0.jar
23 May 2023
1.16.5-1.0.0
ModernKeyBinding-Fabric-1.16.5-1.0.0.jar
23 May 2023
LegacyFabric-1.8.9-1.0.0
ModernKeyBinding-LegacyFabric-1.8.9-1.0.0.jar
24 Oct 2022
Looking for an older file? The official Modrinth project page is in Resources.