Textualize / trogon

Easily turn your Click CLI into a powerful terminal application
MIT License
2.46k stars 56 forks source link

Bind escape and q to exit without running anything #40

Open Julian opened 1 year ago

Julian commented 1 year ago

This adds a key binding for exiting the TUI via the same key bindings as closing modals.

ISTM perhaps it'd be nicer for escape to be bound to work sort of like a back button, so that if you hit it in the right pane of the TUI you "jump outward" back into the left sidebar. But that is obviously more work than just this 3 line change (and seems more subjective). I'm not sure I can commit to figuring out how to wire that in even if interested, but let me know what you folks think.

fresh2dev commented 1 year ago

These are my interpretation of vim-friendly hacker :ninja: keybindings:

https://github.com/Textualize/trogon/pull/38/commits/13c91887d835395574a0d25e92b5e525cb82d48d https://github.com/Textualize/trogon/pull/38/commits/20a26bcd9b36f5b99664336364582ff90290c362

From the command tree:

From the selected command form:

Globally: