Class KeyCodeKeyBinding


  • public class KeyCodeKeyBinding
    extends KeyBinding
    A KeyBinding that matches by key code/modifiers pair.
    • Constructor Detail

      • KeyCodeKeyBinding

        public KeyCodeKeyBinding​(@NotNull
                                 @NotNull KeyEvent2 keyEvent,
                                 @NotNull
                                 @NotNull CommandList commands,
                                 boolean isDefault)
        Creates a KeyBinding that matches by key code/modifiers pair.
        Parameters:
        keyEvent - the key to match
        commands - the commands to associate with this binding
        isDefault - whether the key binding is a "default" binding which should not be saved
    • Method Detail

      • getKeyEvent2

        @NotNull
        public @NotNull KeyEvent2 getKeyEvent2()
        Returns the key to match.
        Returns:
        the key to match
      • equals

        public boolean equals​(@Nullable
                              @Nullable java.lang.Object obj)
        Specified by:
        equals in class KeyBinding
      • matchesKeyCode

        public boolean matchesKeyCode​(@NotNull
                                      @NotNull KeyEvent2 keyEvent)
        Description copied from class: KeyBinding
        Checks whether this key binding matches a key code/modifiers pair.
        Specified by:
        matchesKeyCode in class KeyBinding
        Parameters:
        keyEvent - the key to check
        Returns:
        whether the key binding matches the parameters
      • matchesKeyChar

        public boolean matchesKeyChar​(char keyChar)
        Description copied from class: KeyBinding
        Check whether this key binding matches a key character.
        Specified by:
        matchesKeyChar in class KeyBinding
        Parameters:
        keyChar - the key character to check
        Returns:
        whether the key binding matches the parameters
      • getBindingDescription

        @NotNull
        public @NotNull java.lang.String getBindingDescription()
        Description copied from class: KeyBinding
        Return the binding as a human-readable text.
        Specified by:
        getBindingDescription in class KeyBinding
        Returns:
        the human-readable text