textual_enhanced.tools
Provides assorted tools that help with Textual things.
add_key
Add a key name to a label.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
str
|
The label to add the key to. |
required |
|
str
|
The display name of the key to add. |
required |
|
App[Any] | Widget | None
|
The widget, screen or application. |
None
|
Returns:
Type | Description |
---|---|
str
|
The label with a display of the key added. |
Notes
By default the key label will use the current theme's accent colour,
if that can't be derived from the context them dim
will be used.