I am working on a CHIP-8 emulator to be used on a Linux system. As I understand it, I need to get keyboard input from (any) 16 keys and map these to a hex keypad. Once I get the inputs, I have no trouble mapping them to the 16 CHIP-8 keys.
However, I cannot figure out how to actually tell if a key is pressed. I believe in Java I would use keylistener, but I cannot find anything analogous for Linux in C++. Is there a way I can tell what (if any) specific keys are pressed at any given time? Something like a getKeyState function I could call?
Thanks in advance.