title: Mouse event handling in Linux?
body: <p>I have an event handling code that reads Linux's /dev/input/ for my touchpad and prints result on the basis of which button is pressed/released.</p>
  
  <p>Although. as of now my code is waiting on a button press while running on terminal. My next step is to run this event handling thread along with another thread (not event based). If I continue handling event by reading input at terminal, I will not be able to execute other threads as a part of my main() as main() keeps on waiting for the button press:</p>
  
  <pre><code>int main(int argc, char** argv)
  {
      *Mouse event handling code here*
      return 0; 
  }
  </code></pre>
  
  <p>Is there a different approach like reading interrupts instead? Or can I still take this approach and make amends in my code to make this work as a part of a thread (like can I make my thread to wait on these inputs as arguments)?</p>