Skip to content

Conversation

mitsuhiko
Copy link
Collaborator

Proposed API to read a key with cursor hidden. This would make the common case of cursors disappearing on ctrl-c less common as this is the most common case right now where cursors are hidden.

So rather than hiding cursors all the time, this would hide the cursor just while waiting for the key press and reset it afterwards.

Refs console-rs/dialoguer#294

@mitsuhiko
Copy link
Collaborator Author

I think solving this on windows will be a pain, likewise killing the program by sending a signal in is also going to bypass this. I wonder now if it would not be better to provide an API to just reset the terminal to a reasonable default on shutdown with a utility function and to encourage people to use this.

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

Successfully merging this pull request may close these issues.

1 participant