public class KeyCharKeyBinding extends KeyBinding
KeyBinding
that matches by key character.Modifier and Type | Field and Description |
---|---|
private char |
keyChar
The key character to match.
|
Constructor and Description |
---|
KeyCharKeyBinding(char keyChar,
CommandList commands,
boolean isDefault)
Creates a
KeyBinding that matches by key character. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getBindingDescription()
Return the binding as a human-readable text.
|
char |
getKeyChar()
Returns the key character to match.
|
int |
hashCode() |
boolean |
matchesKeyChar(char keyChar)
Check whether this key binding matches a key character.
|
boolean |
matchesKeyCode(KeyEvent2 keyEvent)
Checks whether this key binding matches a key code/modifiers pair.
|
getCommands, getCommandString, isDefault
public KeyCharKeyBinding(char keyChar, @NotNull CommandList commands, boolean isDefault)
KeyBinding
that matches by key character.keyChar
- the key character to matchcommands
- the commands to associate with this bindingisDefault
- whether the key binding is a "default" binding which
should not be savedpublic boolean equals(@Nullable java.lang.Object obj)
equals
in class KeyBinding
@NotNull public java.lang.String getBindingDescription()
getBindingDescription
in class KeyBinding
public char getKeyChar()
public int hashCode()
hashCode
in class KeyBinding
public boolean matchesKeyChar(char keyChar)
matchesKeyChar
in class KeyBinding
keyChar
- the key character to checkpublic boolean matchesKeyCode(@NotNull KeyEvent2 keyEvent)
matchesKeyCode
in class KeyBinding
keyEvent
- the key to check