title: input_event structure description (from linux/input.h)
body: <p>Can someone please tell me what are the properties of the datatypes used by the input_event structure?</p>
  
  <p>It is defined as follows in the input.h file:</p>
  
  <pre><code>struct input_event {
  struct timeval time;
  __u16 type;
  __u16 code;
  __s32 value;
  };
  </code></pre>
  
  <p>but there are no other descriptions! Even googling gave me nothing interesting. </p>
  
  <p>The only thing I know is that <code>time</code> gives seconds or miliseconds from epoch and <code>value</code> gives code of pressed button. But even value of <code>value</code> property isn't really clear for me. In my program every keystroke generates six events. Following events are response for pressing ENTER key:</p>
  
  <pre><code>type=4,code=4,value=458792
  type=1,code=28,value=1
  type=0,code=0,value=0
  type=4,code=4,value=458792
  type=1,code=28,value=0
  type=0,code=0,value=0 
  </code></pre>
  
  <p>and those are for <code>a</code> letter:</p>
  
  <pre><code>type=4,code=4,value=458756
  type=1,code=30,value=1
  type=0,code=0,value=0
  atype=4,code=4,value=458756
  type=1,code=30,value=0
  type=0,code=0,value=0
  </code></pre>
  
  <p>I would like to decode value to the real letter, but I don't understand the meaning of the properties.</p>
  
  <p>Please help!</p>