Is there any way to bind keys? #2310
Answered
by
davidism
suddenlyToday
asked this question in
Q&A
|
Is there any way to bind keys? If i want to bind a shortcut key in my cli which is powred by Click. |
Answered by
davidism
Jun 17, 2022
Replies: 3 comments 1 reply
|
Click is not an interactive terminal UI (look at |
1 reply
|
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 |
0 replies
Answer selected by
suddenlyToday
|
Yes, that's what I want. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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