Class KeyBindingState

java.lang.Object
com.realtime.crossfire.jxclient.gui.keybindings.KeyBindingState

public class KeyBindingState extends Object
Manages the state for the key binding dialog.
  • Constructor Details

    • KeyBindingState

      public KeyBindingState(@Nullable @Nullable KeyBindings keyBindings, @Nullable @Nullable KeyBindings keyBindings2, @Nullable @Nullable CommandList commands)
      Creates a new instance.
      Parameters:
      keyBindings - the KeyBindings to modify; may be null when removing bindings
      keyBindings2 - the KeyBindings to modify; only used when removing bindings; may be null when removing bindings
      commands - the commands to bind, or null to unbind
  • Method Details

    • keyPressed

      public void keyPressed(@NotNull @NotNull KeyEvent2 keyEvent)
      Records a binding by key code.
      Parameters:
      keyEvent - the key that was pressed
    • keyReleased

      public boolean keyReleased()
      Records a key released event.
      Returns:
      true if the dialog has finished, or false if the dialog is still active