You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
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.
If there was no key pressed,
get_key_nb()
returns0
. But pressing Enter returns theKEY_ESC
enum, which is also 0. We could either:get_key_nb()
andget_ch_nb()
to be-1
0
enum to be something likeKEY_NO_INPUT
so that they result in the same thingThe text was updated successfully, but these errors were encountered: