Key Handling

视图有自己的默认绑定,这些绑定可以更改。

Views have their own default bindings which can be changed.

你可以订阅所有按键事件:

You can subscribe into all key events:

Unresolved include directive in modules/ROOT/pages/tui/events/key.adoc - include::../../../../../src/test/java/org/springframework/shell/docs/KeyHandlingSnippets.java[]

KeyEvent 是一个记录,它包含来自终端的绑定信息。

KeyEvent is a record containing info about a binding coming out from a terminal.

某些视图允许您注册在正常按键处理之前处理的热键。可以在 Register Bindings 中找到更多内容。

Some views allow you to register hot keys which are processed before normal key handling. More about this can be found from Register Bindings.