Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REQUEST] Arrow Keys and cursor control? #262

Closed
scherrey opened this issue Sep 1, 2020 · 2 comments
Closed

[REQUEST] Arrow Keys and cursor control? #262

scherrey opened this issue Sep 1, 2020 · 2 comments

Comments

@scherrey
Copy link

scherrey commented Sep 1, 2020

I have a little language interpreter/repl that is begging for integration with rich. What I really need to be able to support, however, is a rapid input history access (via up/down arrows) and support cursor movements on a line of text.

Is there a method for getting access to individual keystroke input with rich?

My target environment in linux but it would be nice if the feature was platform independent. I'm running Python 3.8.

Just being able to use up arrow to repeat the last input command and (preferably) being able to edit it before executing would be a godsend in terms of usability improvements. Pretty much something like what bash presently offers.

@willmcgugan
Copy link
Collaborator

Rich doesn't offer any interactivity yet. It might in the future.

In the meantime, you might want to look at prompt-toolkit.

@scherrey
Copy link
Author

scherrey commented Sep 2, 2020

Thanks I will check it out! Will see how prompt-toolkit and rich can co-exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants