Package snap.view
Class KeyCombo
java.lang.Object
snap.view.KeyCombo
A class to model specific key strokes, including the key code and modifiers (shift, alt, etc.).
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Standard equals implementation.static KeyCombo
Creates a new KeyCombo for given string.int
Returns the KeyCode.getName()
Returns the name.int
hashCode()
Standard hashCode implementation.boolean
Returns whether alt is down.boolean
Returns whether command is down.boolean
Returns whether control is down.boolean
Returns whether alt is down.boolean
Returns whether shortcut is down.toString()
Standard toString implementation.
-
Constructor Details
-
KeyCombo
protected KeyCombo()Creates a new KeyCombo. -
KeyCombo
protected KeyCombo(int aKC, boolean isAlt, boolean isCmd, boolean isCntr, boolean isShift) Creates a new KeyCombo for key code and modifiers.
-
-
Method Details
-
get
Creates a new KeyCombo for given string. -
getKeyCode
public int getKeyCode()Returns the KeyCode. -
getName
Returns the name. -
isAltDown
public boolean isAltDown()Returns whether alt is down. -
isCommandDown
public boolean isCommandDown()Returns whether command is down. -
isControlDown
public boolean isControlDown()Returns whether control is down. -
isShiftDown
public boolean isShiftDown()Returns whether alt is down. -
isShortcutDown
public boolean isShortcutDown()Returns whether shortcut is down. -
hashCode
public int hashCode()Standard hashCode implementation. -
equals
Standard equals implementation. -
toString
Standard toString implementation.
-