title: Can SDL2 capture global keystrokes?
body: <p>I'm trying to make simple background/console tool in <strong>C++</strong> which would listen to my keystrokes. <code>SDL_PollEvent</code> nor <code>SDL_GetKeyboardState</code> listens when foreign window is focused. Question is, if it is possible to do this with <strong>SDL2</strong> or do I need to use other multi-platform library or should I just do it from scratch per OS?</p>
  <p><strong>Note:</strong>
  Right now I want to use this tool on linux and I managed to find libX11 solution: <a href="https://stackoverflow.com/questions/22749444/listening-to-keyboard-events-without-consuming-them-in-x11-keyboard-hooking">Listening to keyboard events without consuming them in X11 - Keyboard hooking</a>.</p>