Is there any way to bind keys? #2310
-
Is there any way to bind keys? If i want to bind a shortcut key in my cli which is powred by Click. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Click is not an interactive terminal UI (look at |
Beta Was this translation helpful? Give feedback.
-
No, Click is a CLI, it executes a command and exits, there's nothing long running that would listen for keys. Maybe you're looking for a terminal UI framework, something like https://github.com/Textualize/textual or https://github.com/prompt-toolkit/python-prompt-toolkit |
Beta Was this translation helpful? Give feedback.
-
Yes, that's what I want. |
Beta Was this translation helpful? Give feedback.
No, Click is a CLI, it executes a command and exits, there's nothing long running that would listen for keys. Maybe you're looking for a terminal UI framework, something like https://github.com/Textualize/textual or https://github.com/prompt-toolkit/python-prompt-toolkit