title: Ensuring that uinput (kernel module) is indeed running/loaded plus some test code
body: <p>I am trying to make sure that uinput is running/loaded and that it works.</p>
  
  <p>I can not find the device with lsmod however I can find the file /dev/uinput, what does this mean?</p>
  
  <p>I found some code through some googling which apparently tests uinput, it fails with "Unable to create UINPUT device." printed to the terminal. The relevant code is the following:</p>
  
  <pre><code>if (ioctl(uinp_fd, UI_DEV_CREATE))
  {
    printf("Unable to create UINPUT device.");
    return -1;
  }
  </code></pre>
  
  <p>Full code can be read here: <a href="http://pastebin.com/tJdUgiDz" rel="nofollow">http://pastebin.com/tJdUgiDz</a></p>
  
  <p>So my question goes something like this:</p>
  
  <p>Is uinput loaded? If it is, why isn't this code working properly?</p>
  
  <p>Thanks.</p>