Key availability FAQ redux

This commit is contained in:
Dave Pearson
2023-03-30 15:30:54 +01:00
parent 01be13d7c6
commit b5b4623427
2 changed files with 39 additions and 11 deletions

26
FAQ.md
View File

@@ -181,14 +181,28 @@ Textual can only ever support key combinations that are passed on by your
terminal application. Which keys get passed on can differ from terminal to
terminal, and from operating system to operating system.
Because of this it's best to stick to key combinations that are known to be
universally-supported; these include the likes of:
- Letters
- Numbers
- Numbered function keys (especially F1 through F10)
- Space
- Return
- Arrow, home, end and page keys
- Control
- Shift
When [creating bindings for your
application](https://textual.textualize.io/guide/input/#bindings) we
recommend picking keys and key combinations that are supported on as many
platforms as possible.
recommend picking keys and key combinations from the above.
The easiest way to test different environments to see which
[keys](https://textual.textualize.io/guide/input/#keyboard-input) can be
detected is to use `textual keys`.
Keys that aren't normally passed through by terminals include Cmd and Option
on macOS, and the Windows key on Windows.
If you need to test what [key
combinations](https://textual.textualize.io/guide/input/#keyboard-input)
work in different environments you can try them out with `textual keys`.
<a name="why-doesn't-textual-look-good-on-macos"></a>
## Why doesn't Textual look good on macOS?
@@ -216,4 +230,4 @@ There is currently a light and dark version of the design system, but more are p
<hr>
Generated by [FAQtory](https://github.com/willmcgugan/faqtory)
Generated by [FAQtory](https://github.com/willmcgugan/faqtory)

View File

@@ -12,11 +12,25 @@ Textual can only ever support key combinations that are passed on by your
terminal application. Which keys get passed on can differ from terminal to
terminal, and from operating system to operating system.
Because of this it's best to stick to key combinations that are known to be
universally-supported; these include the likes of:
- Letters
- Numbers
- Numbered function keys (especially F1 through F10)
- Space
- Return
- Arrow, home, end and page keys
- Control
- Shift
When [creating bindings for your
application](https://textual.textualize.io/guide/input/#bindings) we
recommend picking keys and key combinations that are supported on as many
platforms as possible.
recommend picking keys and key combinations from the above.
The easiest way to test different environments to see which
[keys](https://textual.textualize.io/guide/input/#keyboard-input) can be
detected is to use `textual keys`.
Keys that aren't normally passed through by terminals include Cmd and Option
on macOS, and the Windows key on Windows.
If you need to test what [key
combinations](https://textual.textualize.io/guide/input/#keyboard-input)
work in different environments you can try them out with `textual keys`.