Files
Mahmoud Ben Hassine e3cb93791d Update documentation
2025-04-25 10:13:56 +02:00

22 lines
630 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 to all key events:
[source, java, indent=0]
----
include::{snippets}/KeyHandlingSnippets.java[tag=sample]
----
`KeyEvent` is a record containing information 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 in
xref:appendices/tui/viewdev.adoc#register-bindings[Register Bindings].