title: Getting raw keyboard and mouse input in c++ without external library
body: <p>So, i have a problem; i'm trying to figure out how to either use the standard library or inline assembly to get raw keyboard or mouse input in a C/C++ program. I'm using Xubuntu 15 and GCC/code::blocks to build my programs. </p>
  
  <p>I'm familiar with using inline assembly, so if it's possible to, say, move a specific register or memory address into a variable that just contained the current mouse position or last keyboard key pressed (This has to include the special keys like function keys or arrow keys.) That would be great for my C++ project.</p>
  
  <p>Preferably, this would be compatible with any OS/x86-based architecture.</p>