Replies: 3 comments 2 replies
-
You can add define a keymap, and conditionally load in the keymap you want depending on the program mode: https://darren.codes/posts/textual-keymaps/ |
Beta Was this translation helpful? Give feedback.
-
Thanks for your quick reply. I looked at your reference, but I don't see how that can change the number of keys displayed in the footer. |
Beta Was this translation helpful? Give feedback.
-
My modes are very similar, so I will investigate your hint of returning False from check_action. Thanks |
Beta Was this translation helpful? Give feedback.
-
I have an application I'd like to run in two "modes" (specified by a program parameter). The set of bindings would be different depending on the mode (think "read only" mode vs. "modify" mode). I see where one can disable bindings use check_actions, but they still show up (greyed out) in the tool bar. Before launching the class based on App, I'd like to set the bindings. I suspect I just don't know enough about how to do this; a simple setting of the class-wide variable "BINDINGS" after the App object is created gives a "FrozenInstanceError".
Beta Was this translation helpful? Give feedback.
All reactions