Class Keybind

  • Direct Known Subclasses:

    public class Keybind
    extends Object
    A combination of zero or more modifier keys (Ctrl, alt, shift, meta) and an optional non-modifier key
    • Field Detail

      • NOT_SET

        public static final Keybind NOT_SET
      • CTRL

        public static final Keybind CTRL
      • ALT

        public static final Keybind ALT
      • SHIFT

        public static final Keybind SHIFT
    • Constructor Detail

      • Keybind

        protected Keybind​(int keyCode,
                          int modifiers,
                          boolean ignoreModifiers)
      • Keybind

        public Keybind​(int keyCode,
                       int modifiers)
      • Keybind

        public Keybind​(KeyEvent e)
        Constructs a keybind with that matches the passed KeyEvent
    • Method Detail

      • matches

        public boolean matches​(KeyEvent e)
        If the KeyEvent is from a KeyPressed event this returns if the Event is this hotkey being pressed. If the KeyEvent is a KeyReleased event this returns if the event is this hotkey being released
      • matches

        protected boolean matches​(KeyEvent e,
                                  boolean ignoreModifiers)
      • getModifierForKeyCode

        public static Integer getModifierForKeyCode​(int keyCode)
      • getKeyCode

        public int getKeyCode()
      • getModifiers

        public int getModifiers()
      • canEqual

        protected boolean canEqual​(Object other)
      • hashCode

        public int hashCode()
        hashCode in class Object