1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>input_event</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Linux Device Drivers"><link rel="up" href="input_subsystem.html#idp1114168316" title="Input core"><link rel="prev" href="API-struct-ff-device.html" title="struct ff_device"><link rel="next" href="API-input-inject-event.html" title="input_inject_event"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">input_event</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-struct-ff-device.html">Prev</a> </td><th width="60%" align="center">Input core</th><td width="20%" align="right"> <a accesskey="n" href="API-input-inject-event.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-input-event"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>input_event — 2 report new input event 3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">input_event </b>(</code></td><td>struct input_dev * <var class="pdparam">dev</var>, </td></tr><tr><td> </td><td>unsigned int <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>unsigned int <var class="pdparam">code</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">value</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idp1114283660"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>dev</code></em></span></dt><dd><p> 4 device that generated the event 5 </p></dd><dt><span class="term"><em class="parameter"><code>type</code></em></span></dt><dd><p> 6 type of the event 7 </p></dd><dt><span class="term"><em class="parameter"><code>code</code></em></span></dt><dd><p> 8 event code 9 </p></dd><dt><span class="term"><em class="parameter"><code>value</code></em></span></dt><dd><p> 10 value of the event 11 </p></dd></dl></div></div><div class="refsect1"><a name="idp1114288332"></a><h2>Description</h2><p> 12 This function should be used by drivers implementing various input 13 devices to report input events. See also <code class="function">input_inject_event</code>. 14</p></div><div class="refsect1"><a name="idp1114289396"></a><h2>NOTE</h2><p> 15 <code class="function">input_event</code> may be safely used right after input device was 16 allocated with <code class="function">input_allocate_device</code>, even before it is registered 17 with <code class="function">input_register_device</code>, but the event will not reach any of the 18 input handlers. Such early invocation of <code class="function">input_event</code> may be used 19 to 'seed' initial state of a switch or initial position of absolute 20 axis, etc. 21</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-struct-ff-device.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="input_subsystem.html#idp1114168316">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-input-inject-event.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">struct ff_device</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span class="phrase">input_inject_event</span></td></tr></table></div></body></html> 22