public class KeyBindingState
extends java.lang.Object
Constructor and Description |
---|
KeyBindingState(@Nullable KeyBindings keyBindings,
@Nullable KeyBindings keyBindings2,
@Nullable CommandList commands)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
keyPressed(@NotNull KeyEvent2 keyEvent)
Records a binding by key code.
|
boolean |
keyReleased()
Records a key released event.
|
public KeyBindingState(@Nullable @Nullable KeyBindings keyBindings, @Nullable @Nullable KeyBindings keyBindings2, @Nullable @Nullable CommandList commands)
keyBindings
- the KeyBindings
to modify; may be null
when removing bindingskeyBindings2
- the KeyBindings
to modify; only used when
removing bindings; may be null
when removing bindingscommands
- the commands to bind, or null
to unbindpublic void keyPressed(@NotNull @NotNull KeyEvent2 keyEvent)
keyEvent
- the key that was pressedpublic boolean keyReleased()
true
if the dialog has finished, or false
if the
dialog is still active