KeyCode. This is the recommended way to specify a shortcut
that does not involve a symbol or punctuation (for such a shortcut a
KeyCharacterCombination is preferred).
| Modifier and Type | Field and Description |
|---|---|
| private KeyCode | code
The key code associated with this key combination. |
| Access | Constructor and Description |
|---|---|
| public | KeyCodeCombination(final KeyCode
the key code of the main key code, final KeyCombination.the value of the shift,shift modifier keythe value of the control,control modifier keythe value of the alt,alt modifier keythe value of the meta,meta modifier keythe value of the shortcutshortcut modifier keyConstructs a |
| public | KeyCodeCombination(final KeyCode
the key code of the main key code, final KeyCombination.the list of modifier keys and their corresponding values modifiersConstructs a |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if the objects are equal, false otherwisethe object to compare to obj)Overrides javafx. Tests whether this |
| public final KeyCode | Returns: The key code associated with this key combinationGets the key code associated with this key combination. |
| public String | getDisplayText()
Overrides javafx. Returns a string representation of this |
| public String | Returns: the string representation of thisKeyCodeCombinationOverrides javafx. Returns a string representation of this |
| private static char | getSingleChar(KeyCode code)
Compute a single suitable char summarizing the code, if any, and 0 otherwise. |
| public int | Returns: the hash code valueOverrides javafx. Returns a hash code value for this |
| public boolean | Returns: true if the key combinations match, false
otherwisethe key event event)Overrides javafx. Tests whether this key combination matches the key combination in the
given |
| private static void |
| code | back to summary |
|---|---|
| private KeyCode code The key code associated with this key combination. | |
| KeyCodeCombination | back to summary |
|---|---|
| public KeyCodeCombination(final KeyCode code, final KeyCombination. Constructs a
| |
| KeyCodeCombination | back to summary |
|---|---|
| public KeyCodeCombination(final KeyCode code, final KeyCombination. Constructs a
All possible modifiers which change the default modifier value are
defined as constants in the
| |
| equals | back to summary |
|---|---|
| public boolean equals(final Object obj) Overrides javafx. Tests whether this | |
| getCode | back to summary |
|---|---|
| public final KeyCode getCode() Gets the key code associated with this key combination.
| |
| getDisplayText | back to summary |
|---|---|
| public String getDisplayText() Overrides javafx. Doc from javafx. Returns a string representation of this
| |
| getName | back to summary |
|---|---|
| public String getName() Overrides javafx. Returns a string representation of this The string representation consists of sections separated by plus characters. Each section specifies either a modifier key or the main key.
A modifier key section contains the The main key section contains the key code name of the main key and is the last section in the returned string. | |
| getSingleChar | back to summary |
|---|---|
| private static char getSingleChar(KeyCode code) Compute a single suitable char summarizing the code, if any, and 0 otherwise. | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides javafx. Returns a hash code value for this
| |
| match | back to summary |
|---|---|
| public boolean match(final KeyEvent event) Overrides javafx. Tests whether this key combination matches the key combination in the
given | |
| validateKeyCode | back to summary |
|---|---|
| private static void validateKeyCode(final KeyCode keyCode) | |