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

Clarify READ_CHAR buffering #3

Open
ivar-rummelhoff opened this issue Sep 11, 2023 · 0 comments
Open

Clarify READ_CHAR buffering #3

ivar-rummelhoff opened this issue Sep 11, 2023 · 0 comments
Labels
question Further information is requested

Comments

@ivar-rummelhoff
Copy link

As discussed, we should perhaps clarify whether READ_CHAR is supposed to receive each key press, or whether there should be some form of buffering. Ideally, a CLI interface would switch between the two: When the user must answer Y/N or select from a (short) menu, reading each key press is best; whereas if the input is – say – a complex search query, line buffering is more convenient, as it would allow the user to make corrections and adjustments using arrow keys, etc.

One solution might be to add one or more instructions for specifying the buffering, but maybe it is better to state that the user should be allowed to turn buffering on/off themselves? Alas, this could be rather confusing. For instance, if the user only remembers to turn on buffering after entering a few characters, then it would be too late to edit those characters. Moreover, we usually do not want the application to echo the input when using line buffering.

@ivar-rummelhoff ivar-rummelhoff added the question Further information is requested label Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant