Files
textual/docs/events/key.md
Will McGugan 28d395f774 code in events
2022-09-26 10:41:36 +01:00

18 lines
526 B
Markdown

# Key
The `Key` event is sent to a widget when the user presses a key on the keyboard.
- [x] Bubbles
- [ ] Verbose
## Attributes
| attribute | type | purpose |
| --------- | ----------- | ----------------------------------------------------------- |
| `key` | str | Name of the key that was pressed. |
| `char` | str or None | The character that was pressed, or None it isn't printable. |
## Code
::: textual.events.Key