Open fresh2dev opened 1 year ago
It's difficult for this to work in the form because ctrl+k
for example deletes the text between the cursor and the end of the line. It could work for the command tree through.
That's an easter egg I was not aware of. Implementing this specific to the command-tree would be great, since that's the most applicable use-case anyway. I can happilytab/shift+tab
my way through the form.
Just for clarity: it's not an easter egg, it's one of the documented bindings for the Textual Input widget (being well known to macOS users, amongst others).
To have Vim-style key bindings, I think you need to make the entire UI modal, which requires Textual to have the ability to enable/disable key bindings dynamically, which can further be useful in many other scenarios, e.g., enabling/disabling tab-specific hotkeys when switching tabs.
It would be nice to use
ctrl+h/j/k/l
to navigate the form, or at least the command-tree.