Files
Janne Valkealahti 90df641750 Update hotkey docs
- Relates #826
2023-12-10 09:53:20 +00:00

22 lines
627 B
Plaintext

[[tui-events-key]]
= Key Handling
:page-section-summary-toc: 1
ifndef::snippets[:snippets: ../../../../../src/test/java/org/springframework/shell/docs]
Views have their own default bindings which can be changed.
You can subscribe into all key events:
[source, java, indent=0]
----
include::{snippets}/KeyHandlingSnippets.java[tag=sample]
----
`KeyEvent` is a record containing info about a binding coming out
from a terminal.
Some views allow you to register hot keys which are processed before
normal key handling. More about this can be found from
xref:appendices/tui/viewdev.adoc#register-bindings[Register Bindings].