title: How to capture key presses in linux two applications
body: <p>I have two applications running on an embedded linux platform. I want to have the main application have focus with the keypad but I want another application in the background that can monitor key presses for the KEY_POWER to signal the system to shutdown.</p>
  
  <p>We want to make this separate from the main app because turning the system off is important if the main app has crashed or hung.</p>
  
  <p><a href="https://stackoverflow.com/questions/1485116/capturing-keystrokes-in-gnu-linux-in-c">Capturing Keystrokes in GNU/Linux in C</a> This doesn't seem to nicley if there are two apps reading from it. I think, i know evtest won't work with our main app up.</p>
  
  <p>We do not have a window manager. Our only graphical app is Qt5, the other one is a background daemon.</p>