Is there a way to update a Binding description? #5735
-
Hey Guys, I would like to make some of my bindings context-sensitive e.g. say "Turn Feature On" (if off) or "Turn Feature Off", that kind of thing. It seems like there is no mechanism to update bindings once created?: If that is correct, is there any other to accomplish my goal of context-sensitive key binding descriptions? Cheers! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
We found the following entry in the FAQ which you may find helpful: Feel free to close this issue if you found an answer in the FAQ. Otherwise, please give us a little time to review. This is an automated reply, generated by FAQtory |
Beta Was this translation helpful? Give feedback.
-
It's right in the quote: dynamic actions. https://textual.textualize.io/guide/actions/#dynamic-actions Define two actions, one for on and one for off, and implement a |
Beta Was this translation helpful? Give feedback.
-
I'm not getting any dimming at all for disabled keys, whether in my own app or in the sample app code from here: |
Beta Was this translation helpful? Give feedback.
It's right in the quote: dynamic actions. https://textual.textualize.io/guide/actions/#dynamic-actions
Define two actions, one for on and one for off, and implement a
check_action
to define the logic regarding which is displayed.