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

[osx catalina] kbhit count broken cannot get arrow keys #55

Open
Zorgatone opened this issue Apr 11, 2020 · 3 comments
Open

[osx catalina] kbhit count broken cannot get arrow keys #55

Zorgatone opened this issue Apr 11, 2020 · 3 comments

Comments

@Zorgatone
Copy link
Contributor

Zorgatone commented Apr 11, 2020

Tested on iTerm2.app and Terminal.app on OSX Catalina.

I couldn't get they arrow keys (Clang++ std=c++2a) using rlutil::getKey().
Multiple ANSI character sequences don't get handled properly because cnt variable is 0 and the ^[[A sequence in my game loop is split in multiple calls of rlutil::getKey()

As a result I never get rlutil::getKey() to equal rlutil::KEY_UP

@Zorgatone
Copy link
Contributor Author

Also I get some deprecations on the IDE (CLion) with #include <sys/time.h> (deprecated header and suggets using ctime instead)

@Zorgatone
Copy link
Contributor Author

I tried cloning the repo and building using the makefile and the test.cpp example still works with arrow_keys

@Zorgatone
Copy link
Contributor Author

I got the arrows working by wrapping the update function of my game loop in an if(kbhit()) before the rlutil::getKey. I thought the rlutil::getKey already had a call to kbhit() without requiring an additional one, weird.
Anyway with this if(kbhit()) the arrows work but the ENTER key does not :/

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