title: Linux input event interface numbering
body: <p>In Linux, how do you create an input event interface with a user specified event number and map that to a specific device event? </p>
  
  <p>I'm using the gpio-keys driver to translate key presses from a keypad.  I define the keys to be used in my board configuration source file as shown below</p>
  
  <pre><code>static struct gpio_keys_button ev_keys[] = {
      [0] = {
          .type           = EV_KEY,
          .active_low     = 1,
          .wakeup         = 0,
          .debounce_interval  = KEYS_DEBOUNCE_MS,
          .code           = KEY_MUTE,
         .desc           = "mute", 
         .gpio           = PUSHBUTTON_MUTE, 
      }
  };
  </code></pre>
  
  <p>and register this with the kernel.</p>
  
  <p>And I enable the event interface and GPIO buttons when building the kernel.</p>
  
  <p><code>Device Drivers ---&gt; Input device support --&gt; Event interface</code></p>
  
  <p><code>Device Drivers ---&gt; Input device support --&gt; Keyboards --&gt; GPIO buttons</code></p>
  
  <p>This creates a node to the event at <code>/dev/input/event0</code> to which the GPIO button events are mapped. In a system that uses only one event interface I can call <code>poll()</code> on the fd to <code>/dev/input/event0</code> and everything works as expected.</p>
  
  <p>Now, I have second peripheral on my system that uses <code>/dev/input/event0</code> by default and I need to map the events from the gpio-keys driver to another event. Any suggestions on how I go about creating an event with a number/id I can specify and then map this to the gpio-keys events? </p>
  
  <p>Thanks.</p>