Changing default key bind

The getKeyBind() method within DynamicHudIntegration retrieves a Key Bind that is utilized to open the previously specified AbstractMoveableScreen during gameplay.

The default keybind passed is:

KeyBinding EDITOR_SCREEN_KEY_BINDING = KeyBindingHelper.registerKeyBinding(new KeyBinding(
        "DynamicHud Editor Screen",
        InputUtil.Type.KEYSYM,
        GLFW.GLFW_KEY_RIGHT_SHIFT,
        "DynamicHud"
));

In order to change the default keybind, you need to override the getKeyBind() method.

public class MyIntegration implements DynamicHudIntegration{

  @Override
  public KeyBinding getKeyBind() {
     return KeyBindingHelper.registerKeyBinding(new KeyBinding(
           "My Translation",
           INPUT_TYPE,
           KEY,
           "My Category"
     ));
  }
}

Last updated

Was this helpful?