Class KeyStroke


public class KeyStroke extends Object
A KeyStroke represents a key action on the keyboard, or equivalent input device.

KeyStrokes can specify modifiers (alt, shift, control or a combination thereof) which must be present during the action for an exact match.

KeyStrokes can be bound to RegisteredActions, and thus providing keyboard shortcuts to facilitate execution of those actions.

  • Constructor Details

  • Method Details

    • getKeyStroke

      public static KeyStroke getKeyStroke( keyDownEvent)
      Finds the KeyStroke for the given KeyDownEvent. If the event belongs to an unknown key (i.e. if the key is not defined in the Keys, null will be returned.
      keyDownEvent - the key event propagated by the browser
      the KeyStroke for the event; null if the given key is unknown
    • match

      public boolean match( event)
    • getKey

      public Key getKey()
    • isAlt

      public boolean isAlt()
    • isCtrl

      public boolean isCtrl()
    • isShift

      public boolean isShift()
    • hashCode

      public int hashCode()
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      equals in class Object
    • toString

      public String toString()
      toString in class Object