Class KeyBindingState


  • public class KeyBindingState
    extends java.lang.Object
    Manages the state for the key binding dialog.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void keyPressed​(@NotNull KeyEvent2 keyEvent)
      Records a binding by key code.
      boolean keyReleased()
      Records a key released event.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • 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 Detail

      • 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