diff --git a/404.html b/404.html index a203f761a9..e7bd804b99 100644 --- a/404.html +++ b/404.html @@ -3878,8 +3878,6 @@ - - @@ -4022,27 +4020,6 @@ -
CommandCallback
+
+
+
BINDINGS
+
+
+
COMMAND_PALETTE_BINDING
+
+
+
+
COMMAND_PALETTE_DISPLAY
+
+
+
TOOLTIP_DELAY
+
+
+
action_hide_help_panel
+
+
+
action_show_help_panel
+
+
+
key
+
binding
@@ -6306,6 +6346,30 @@
get_system_commands
+
+
+
+
+
SystemCommand
+
+
+
+
+
get_system_commands
+
get_system_commands_provider
@@ -8840,6 +8955,15 @@
+
CommandCallback
+
+
+
BINDINGS
+
+
+
COMMAND_PALETTE_BINDING
+
+
+
+
COMMAND_PALETTE_DISPLAY
+
+
+
TOOLTIP_DELAY
+
+
+
action_hide_help_panel
+
+
+
action_show_help_panel
+
+
+
key
+
binding
@@ -10179,6 +10357,30 @@
get_system_commands
+
+
+
+
+
SystemCommand
+
+
+
+
+
get_system_commands
+
get_system_commands_provider
@@ -11339,21 +11592,46 @@
ActionError
+
CommandCallback
-¶module-attribute
+
+¶
- Bases: Exception
Signature for callbacks used in get_system_commands
ActionError
+
+
+¶
+ Bases: Exception
BINDINGS
+
+
+
+ class-attribute
+
+
+¶BINDINGS = [
+ Binding(
+ "ctrl+c", "quit", "Quit", show=False, priority=True
+ )
+]
+
The default key bindings.
+
CLOSE_TIMEOUT
@@ -11587,7 +11892,7 @@ COMMANDS = {get_system_commands}
+COMMANDS = {get_system_commands_provider}
@@ -11602,6 +11907,52 @@
+
+
COMMAND_PALETTE_BINDING
+
+
+
+ class-attribute
+
+
+¶
+
+
+
+
+ The key that launches the command palette (if enabled by App.ENABLE_COMMAND_PALETTE
).
+
+
+
+
+
+
+
+
+
+
COMMAND_PALETTE_DISPLAY
+
+
+
+ class-attribute
+
+
+¶
+
+
+
+
+ How the command palette key should be displayed in the footer (or None
for default).
+
+
+
+
+
+
+
+
CSS
@@ -11819,6 +12170,30 @@
+
+
TOOLTIP_DELAY
+
+
+
+ class-attribute
+ instance-attribute
+
+
+¶
+
+
+
+
+ The time in seconds after which a tooltip gets displayed.
+
+
+
+
+
+
+
+
active_bindings
@@ -11854,7 +12229,7 @@
- Active binding information
+ A dict that maps keys on to binding information.
@@ -13043,6 +13418,25 @@
+
+
action_hide_help_panel
+
+
+¶
+
+
+
+
+ Hide the keys panel (if present).
+
+
+
+
+
+
+
+
action_pop_screen
@@ -13279,6 +13673,25 @@
+
+
action_show_help_panel
+
+
+¶
+
+
+
+
+ Show the keys panel.
+
+
+
+
+
+
+
+
action_simulate_key
@@ -13571,7 +13984,7 @@ base_screen
¶
- str | Screen | Callable[[], Screen]
+ str | Callable[[], Screen]
@@ -14874,17 +15287,16 @@
¶
-get_key_display(key)
+get_key_display(binding)
- For a given key, return how it should be displayed in an app
-(e.g. in the Footer widget).
-By key, we refer to the string used in the "key" argument for
-a Binding instance. By overriding this method, you can ensure that
-keys are displayed consistently throughout your app, without
-needing to add a key_display to every binding.
+ Format a bound key for display in footer / key panel etc.
+
+Note
+You can implement this in a subclass if you want to change how keys are displayed in your app.
+
Parameters:
@@ -14900,14 +15312,14 @@
- key
-¶
+ binding
+¶
- str
+ Binding
- The binding key string.
+ A Binding.
@@ -14933,7 +15345,7 @@
-
The display string for the input key.
+ A string used to represent the key.
@@ -15086,6 +15498,89 @@
+
+
get_system_commands
+
+
+¶
+get_system_commands(screen)
+
+
+
+
+ A generator of system commands used in the command palette.
+
+
+Parameters:
+
+
+
+ Name
+ Type
+ Description
+ Default
+
+
+
+
+
+ screen
+¶
+
+ Screen
+
+
+
+ The screen where the command palette was invoked from.
+
+
+
+ required
+
+
+
+
+ Implement this method in your App subclass if you want to add custom commands.
+Here is an example:
+def get_system_commands(self) -> Iterable[SystemCommand]:
+ yield from super().get_system_commands()
+ yield SystemCommand("Bell", "Ring the bell", self.bell)
+
+
+Note
+Requires that SystemCommandsProvider
is in App.COMMANDS
class variable.
+
+
+
+ Yields:
+
+
+
+ Type
+ Description
+
+
+
+
+
+ Iterable[SystemCommand]
+
+
+
+ SystemCommand instances.
+
+
+
+
+
+
+
+
+
+
+
+
+
get_widget_at
@@ -18089,6 +18584,144 @@
+
+
SystemCommand
+
+
+¶
+
+
+
+
+ Bases: NamedTuple
+
+
+
+ Defines a system command used in the command palette (yielded from get_system_commands
).
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
callback
+
+
+
+ instance-attribute
+
+
+¶
+
+
+
+
+ A callback to invoke when the command is selected.
+
+
+
+
+
+
+
+
+
+
discover
+
+
+
+ class-attribute
+ instance-attribute
+
+
+¶
+
+
+
+
+ Should the command show when the search is empty?
+
+
+
+
+
+
+
+
+
+
help
+
+
+
+ instance-attribute
+
+
+¶
+
+
+
+
+ Additional help text, shown under the title.
+
+
+
+
+
+
+
+
+
+
title
+
+
+
+ instance-attribute
+
+
+¶
+
+
+
+
+ The title of the command (used in search).
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
UnknownModeError
@@ -18118,12 +18751,12 @@
-
-
get_system_commands
+
+
get_system_commands_provider
-¶
-get_system_commands()
+¶
+
@@ -18142,7 +18775,7 @@
- type[SystemCommands]
+ type[SystemCommandsProvider]
diff --git a/api/await_complete/index.html b/api/await_complete/index.html
index 34029e9d88..9c0a83c649 100644
--- a/api/await_complete/index.html
+++ b/api/await_complete/index.html
@@ -3891,8 +3891,6 @@
-
-
@@ -4035,27 +4033,6 @@
-
-
-
-
-
- ClassicFooter
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/api/await_remove/index.html b/api/await_remove/index.html
index 42ae0f4a57..62531d72d2 100644
--- a/api/await_remove/index.html
+++ b/api/await_remove/index.html
@@ -3891,8 +3891,6 @@
-
-
@@ -4035,27 +4033,6 @@
-
-
-
-
-
- ClassicFooter
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/api/binding/index.html b/api/binding/index.html
index e2cab426d1..3c4396702a 100644
--- a/api/binding/index.html
+++ b/api/binding/index.html
@@ -3891,8 +3891,6 @@
-
-
@@ -4035,27 +4033,6 @@
-
-
-
-
-
- ClassicFooter
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -5058,6 +5035,15 @@
+
+
+
+
+
+
tooltip
+
+
+
@@ -5127,6 +5113,24 @@
+
+
+
+
+
+
tooltip
+
+
+
+
+
+
+
+
+
parse_key
+
+
+
@@ -6753,6 +6757,15 @@
+
+
+
+
+
+
tooltip
+
+
+
@@ -6822,6 +6835,24 @@
+
+
+
+
+
+
tooltip
+
+
+
+
+
+
+
+
+
parse_key
+
+
+
@@ -7189,6 +7220,30 @@
+
+
+
+
+
+
tooltip
+
+
+
+ class-attribute
+ instance-attribute
+
+
+¶
+
+
+
+
+ Optional tooltip shown in Footer.
+
+
+
+
@@ -7219,7 +7274,8 @@
show=True,
key_display=None,
priority=False,
-)
+ tooltip="",
+)
@@ -7386,7 +7442,73 @@
+
+
+
+
+
+
tooltip
+
+
+
+ class-attribute
+ instance-attribute
+
+
+¶
+
+
+
+
+ Optional tooltip to show in footer.
+
+
+
+
+
+
diff --git a/api/cache/index.html b/api/cache/index.html
index 4e51b546da..77087cfebd 100644
--- a/api/cache/index.html
+++ b/api/cache/index.html
@@ -3891,8 +3891,6 @@
-
-
@@ -4035,27 +4033,6 @@
-
-
-
-
-
- ClassicFooter
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/api/color/index.html b/api/color/index.html
index 3c8f07bd01..71cf8b8c30 100644
--- a/api/color/index.html
+++ b/api/color/index.html
@@ -3891,8 +3891,6 @@
-
-
@@ -4035,27 +4033,6 @@
-
-
-
-
-
- ClassicFooter
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/api/command/index.html b/api/command/index.html
index d9db51849f..51643a0c0c 100644
--- a/api/command/index.html
+++ b/api/command/index.html
@@ -3891,8 +3891,6 @@
-
-
@@ -4035,27 +4033,6 @@
-
-
-
-
-
- ClassicFooter
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/api/constants/index.html b/api/constants/index.html
index 01d10e83cc..5d8d627dd3 100644
--- a/api/constants/index.html
+++ b/api/constants/index.html
@@ -3891,8 +3891,6 @@
-
-
@@ -4035,27 +4033,6 @@
-
-
-
-
-
- ClassicFooter
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/api/containers/index.html b/api/containers/index.html
index 89d5cf117c..2aeb164148 100644
--- a/api/containers/index.html
+++ b/api/containers/index.html
@@ -3891,8 +3891,6 @@
-
-
@@ -4035,27 +4033,6 @@
-
-
-
-
-
- ClassicFooter
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/api/coordinate/index.html b/api/coordinate/index.html
index 8a6945ab61..57a53864c1 100644
--- a/api/coordinate/index.html
+++ b/api/coordinate/index.html
@@ -3891,8 +3891,6 @@
-
-
@@ -4035,27 +4033,6 @@
-
-
-
-
-
- ClassicFooter
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/api/dom_node/index.html b/api/dom_node/index.html
index 1d5c52b22c..e10c0cb942 100644
--- a/api/dom_node/index.html
+++ b/api/dom_node/index.html
@@ -3891,8 +3891,6 @@
-
-
@@ -4035,27 +4033,6 @@
-
-
-
-
-
- ClassicFooter
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -5207,6 +5184,24 @@