Detecing any key of keyboard and mouse on Windows + Linux

I am trying to detect keys pressed on a keyboard and mouse on both, Windows and Linux but I am unsure what would be the best practice way to do so. Will I have to detect the keys for each platform individually? Would you make use of an event listener? What's the best way to detect the input-devices?

Thanks in advance.
For Linux you can look at how SDL handles it. HINT: It goes through Xlib/XCB.

You can make a test SDL example and use strace. Linux interface is just a file that you open and read.
Topic archived. No new replies allowed.