It works but still needs improvements. I need to detect the keyboard automatically and I will need to find I believe a non blocking read for this to be efficient.
What my main concern is, is that when I type a key after compiling this the program reads the event but so does the terminal it is running in. Generally this is fine but when lots of keys get pushed I am worried that something unexpected may happen in the terminal.
I am reading directly from the device but what I want to know is when I capture the event can I remove it so that only my application uses it???