True if the event represents one of the 'arrow' key press.
True if the event represents one of the 'arrow' key press.
True if the event is fired within a composition session.
True if the event is fired within a composition session.
True if the given event represents a standard 'copy' keyboard sequence.
True if the given event represents a standard 'copy' keyboard sequence.
True if the given event contains a 'ctrl' key.
True if the given event contains a 'ctrl' key.
True if the event represents an 'enter' key press.
True if the event represents an 'enter' key press.
True if the event represents a keyboard sequence that is likely going to mutate the contents of the editor directly in some way and should be recorded in the undo/redo history. If this method ever returns false for a keyboard sequence that does mutate the editor, the undo/redo history will be corrupted.
True if the event represents a keyboard sequence that is likely going to mutate the contents of the editor directly.
True if the given event represents a standard 'paste' keyboard sequence.
True if the given event represents a standard 'paste' keyboard sequence.
True if the given event represents a standard 'redo' keyboard sequence.
True if the given event represents a standard 'redo' keyboard sequence.
True if the given event contains a 'shift' key.
True if the given event contains a 'shift' key.
True if the event represents a 'tab' key press.
True if the event represents a 'tab' key press.
True if the given event represents a standard 'undo' keyboard sequence.
True if the given event represents a standard 'undo' keyboard sequence.
Obtains the key code from a keyboard event. All key codes are converted to uppercase.
Obtains the key code from a keyboard event (uppercase).
Generated using TypeDoc
Keyboard Events
When a keyboard event is fired, it is wrapped in a
TextEditorViewKeyboardEvent
object. This object provides a more convenient interface for dealing with keyboard events - which avoids the need to perform string comparisons on key codes in other parts of the code.Also, it makes the event immutable, which is important because the event is passed to multiple handlers. If the event were mutable, then one handler could modify the event in a way that affects other handlers.
These event details can be used when developing an Input Processor to determine which key was pressed. See: Processors.