Modern KeyBinding

Modern KeyBinding

Port KeyModifier && KeyConflictContext back to Fabric & Early Forge

by
625.1K Downloads
fabricforgelibraryutility
Configure a Compatible Minecraft Server

About this Mod

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);
    }
}

Available Versions

Fabric-1.20.4-1.3.0release
MC 1.20.4fabric
January 12, 2024
Fabric-1.20.X-1.2.0release
MC 1.20, 1.20.1fabric
July 16, 2023
Fabric-1.20-1.1.0release
MC 1.20fabric
June 9, 2023
Fabric-1.19.4-1.1.0release
MC 1.19.4fabric
June 2, 2023
Fabric-1.19.2-1.1.0release
MC 1.19.2fabric
June 2, 2023

How to Install Modern KeyBinding on Your Client

1

Install the Mod Loader Locally

Install fabric for your local Minecraft version.

2

Download the Matching File

Choose the Modern KeyBinding file for fabric and Minecraft 1.20.4.

3

Install Mod

Place the .jar file in your local .minecraft/mods folder and restart Minecraft. No server-side installation is required.

Compatibility

Mod Loaders

fabricforge

Minecraft Versions

1.20.4, 1.20.1, 1.20 (+6 more)

Server-side

Unsupported

Recommended RAM

4 GB(min. 3 GB)

Frequently Asked Questions

Does Modern KeyBinding need to be installed on the Minecraft server?

No. Modrinth marks Modern KeyBinding as unsupported on the server side. Install it only in your local Minecraft mods folder. Your server can remain unchanged unless the mod page lists an additional dependency.

Which version and loader does Modern KeyBinding require?

Use a file for fabric, forge and your exact Minecraft version. Supported versions include 1.20.4, 1.20.1, 1.20. Files for different loaders are not interchangeable.

Modern KeyBinding is not working – what should I check?

First check the Minecraft version, loader version and required dependencies. Put the .jar file in your local .minecraft/mods folder and remove older duplicates. Because this mod is client-side, adding server RAM will not fix it.

Minecraft Server for Your Group

Modern KeyBinding stays on your client. Host a compatible world for your group.

Recommended RAM
4 GBfrom €5.2/mo
Minimum 3 GB | per 8 players
Create Server Now
Client Compatibility Guide
NVMe SSD Storage
DDoS Protection included

Details

License
LicenseRef-All-Rights-Reserved
Server-side
Unsupported

Supported Versions

1.20.41.20.11.201.19.41.19.21.18.21.16.51.8.91.7.10