trogon icon indicating copy to clipboard operation
trogon copied to clipboard

Vim keybindings

Open fresh2dev opened this issue 2 years ago • 5 comments

It would be nice to use ctrl+h/j/k/l to navigate the form, or at least the command-tree.

fresh2dev avatar Jun 23 '23 22:06 fresh2dev

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.

darrenburns avatar Jun 26 '23 10:06 darrenburns

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 happily tab/shift+tab my way through the form.

fresh2dev avatar Jun 27 '23 18:06 fresh2dev

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).

davep avatar Jun 27 '23 19:06 davep

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.

liancheng avatar Sep 07 '23 19:09 liancheng