Home | History | Annotate | Download | only in input

Lines Matching full:code

19 <p>Key layout files (<code>.kl</code> files) are responsible for mapping Linux key codes
34 <li><code>/system/usr/keylayout/Vendor_XXXX_Product_XXXX_Version_XXXX.kl</code></li>
35 <li><code>/system/usr/keylayout/Vendor_XXXX_Product_XXXX.kl</code></li>
36 <li><code>/system/usr/keylayout/DEVICE_NAME.kl</code></li>
37 <li><code>/data/system/devices/keylayout/Vendor_XXXX_Product_XXXX_Version_XXXX.kl</code></li>
38 <li><code>/data/system/devices/keylayout/Vendor_XXXX_Product_XXXX.kl</code></li>
39 <li><code>/data/system/devices/keylayout/DEVICE_NAME.kl</code></li>
40 <li><code>/system/usr/keylayout/Generic.kl</code></li>
41 <li><code>/data/system/devices/keylayout/Generic.kl</code></li>
46 <p>The system provides a special built-in generic key layout file called <code>Generic.kl</code>.
54 <p>Key declarations each consist of the keyword <code>key</code> followed by a Linux key code
55 number and an Android key code name, or the keyword `usage` followed by a HID
56 usage and an Android key code name. The HID usage is represented as a 32-bit
60 <pre><code>
65 </code></pre>
68 <li><code>WAKE</code>: The key should wake the device when it is asleep. For historical reasons,
69 this flag behaves in the same manner as <code>WAKE_DROPPED</code> below.</li>
70 <li><code>WAKE_DROPPED</code>: The key should wake the device when it is asleep but the key itself
73 <li><code>SHIFT</code>: The key should be interpreted as if the SHIFT key were also pressed.</li>
74 <li><code>CAPS_LOCK</code>: The key should be interpreted as if the CAPS LOCK key were also pressed.</li>
75 <li><code>ALT</code>: The key should be interpreted as if the ALT key were also pressed.</li>
76 <li><code>ALT_GR</code>: The key should be interpreted as if the RIGHT ALT key were also pressed.</li>
77 <li><code>FUNCTION</code>: The key should be interpreted as if the FUNCTION key were also pressed.</li>
78 <li><code>VIRTUAL</code>: The key is a virtual soft key (capacitive button) that is adjacent to
80 <li><code>MENU</code>: Deprecated. Do not use.</li>
81 <li><code>LAUNCHER</code>: Deprecated. Do not use.</li>
84 <p>Axis declarations each consist of the keyword <code>axis</code> followed by a Linux axis code
86 one Android axis code name.</p>
88 <p>A basic axis simply maps a Linux axis code to an Android axis code name.</p>
89 <p>The following declaration maps <code>ABS_X</code> (indicated by <code>0x00</code>) to <code>AXIS_X</code> (indicated by <code>X</code>).</p>
90 <pre><code>axis 0x00 X
91 </code></pre>
92 <p>In the above example, if the value of <code>ABS_X</code> is <code>5</code> then <code>AXIS_X</code> will be set to <code>5</code>.</p>
94 <p>A split axis maps a Linux axis code to two Android axis code names, such that
98 <p>The following declaration maps values of the <code>ABS_Y</code> axis (indicated by <code>0x01</code>) to
99 <code>AXIS_GAS</code> when less than <code>0x7f</code> or to <code>AXIS_BRAKE</code> when greater than <code>0x7f</code>.</p>
100 <pre><code>axis 0x01 split 0x7f GAS BRAKE
101 </code></pre>
102 <p>In the above example, if the value of <code>ABS_Y</code> is <code>0x7d</code> then <code>AXIS_GAS</code> is set
103 to <code>2</code> (<code>0x7f - 0x7d</code>) and <code>AXIS_BRAKE</code> is set to <code>0</code>. Conversely, if the value of
104 <code>ABS_Y</code> is <code>0x83</code> then <code>AXIS_GAS</code> is set to <code>0</code> and <code>AXIS_BRAKE</code> is set to <code>4</code>
105 (<code>0x83 - 0x7f</code>). Finally, if the value of <code>ABS_Y</code> equals the split value of <code>0x7f</code>
106 then both <code>AXIS_GAS</code> and <code>AXIS_BRAKE</code> are set to <code>0</code>.</p>
109 <p>The following declaration maps <code>ABS_RZ</code> (indicated by <code>0x05</code>) to <code>AXIS_BRAKE</code>
110 (indicated by <code>BRAKE</code>), and inverts the output by negating it.</p>
111 <pre><code>axis 0x05 invert BRAKE
112 </code></pre>
113 <p>In the above example, if the value of <code>ABS_RZ</code> is <code>2</code> then
114 <code>AXIS_BRAKE</code> is set to <code>-2</code>.</p>
122 <p>To resolve this issue, an axis declaration may be followed by a <code>flat</code>
124 <pre><code>axis 0x03 Z flat 4096
125 </code></pre>
126 <p>In the above example, the center flat position is set to <code>4096</code>.</p>
129 <pre><code># A comment!
130 </code></pre>
134 <pre><code># This is an example of a key layout file for a keyboard.
152 </code></pre>
154 <pre><code># This is an example of a key layout file for basic system controls, such as
161 </code></pre>
163 <pre><code># This is an example of a key layout file for a touch device with capacitive buttons.
169 </code></pre>
171 <pre><code># This is an example of a key layout file for headset mounted media controls.
180 </code></pre>
182 <pre><code># This is an example of a key layout file for a joystick.
213 </code></pre>
218 <p>To make a key be a wake key, set the <code>WAKE_DROPPED</code> flag in the key layout file
220 <p>Note that the <code>WindowManagerPolicy</code> component is responsible for implementing wake
223 <code>PhoneWindowManager.interceptKeyBeforeQueueing</code>.</p>
245 appropriate key mapping and include the <code>VIRTUAL</code> flag for each key.</p>
254 appropriate key mapping and include the <code>VIRTUAL</code> flag for each key.</p>
267 input device with the <code>VIRTUAL</code> flag set for each key.</p>
268 <pre><code>key 139 MENU VIRTUAL
272 </code></pre>
274 for the framework <code>config.xml</code> resource.</p>
275 <pre><code>&lt;!-- Specifies the amount of time to disable virtual keys after the screen is touched
281 </code></pre>