You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guide/input.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -185,6 +185,15 @@ You can create priority key bindings by setting `priority=True` on the Binding o
185
185
The [footer](../widgets/footer.md) widget can inspect bindings to display available keys. If you don't want a binding to display in the footer you can set `show=False`. The default bindings on App do this so that the standard ++ctrl+c++, ++tab++ and ++shift+tab++ bindings don't typically appear in the footer.
186
186
187
187
188
+
### Dynamic bindings?
189
+
190
+
You may find you have bindings which are not always applicable given the current state of your app.
191
+
For instance a "Save file" binding when there are no changes to save.
192
+
It wouldn't be a good user experience if the save key did nothing, or raised an error.
193
+
194
+
Textual doesn't support modifying the bindings at runtime, but you can accomplish this with [dynamic actions](./actions.md#dynamic-actions) which offers greater flexibility.
195
+
196
+
188
197
## Mouse Input
189
198
190
199
Textual will send events in response to mouse movement and mouse clicks. These events contain the coordinates of the mouse cursor relative to the terminal or widget.
0 commit comments