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

get_key_nb() returns 0 for either no input or "Esc" input #3

Open
nathandunk opened this issue Jun 17, 2020 · 1 comment
Open

get_key_nb() returns 0 for either no input or "Esc" input #3

nathandunk opened this issue Jun 17, 2020 · 1 comment

Comments

@nathandunk
Copy link
Member

nathandunk commented Jun 17, 2020

If there was no key pressed, get_key_nb() returns 0. But pressing Enter returns the KEY_ESC enum, which is also 0. We could either:

  • Change return for get_key_nb() and get_ch_nb() to be -1
  • Change the 0 enum to be something like KEY_NO_INPUT so that they result in the same thing
@nathandunk nathandunk changed the title get_key_nb() returns 0 for either no input or "Enter" input get_key_nb() returns 0 for either no input or "Esc" input Jun 17, 2020
@nathandunk
Copy link
Member Author

And actually, after doing some testing, it looks like a bunch of the special characters are wrong. I think you said that it hadn't been tested, @epezent . If that is right, I can make some changes to the windows case based on my testing.

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

No branches or pull requests

1 participant