aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/thinkpad-acpi.txt151
1 files changed, 151 insertions, 0 deletions
diff --git a/Documentation/thinkpad-acpi.txt b/Documentation/thinkpad-acpi.txt
index bd00d14538c6..91d08921a4ca 100644
--- a/Documentation/thinkpad-acpi.txt
+++ b/Documentation/thinkpad-acpi.txt
@@ -167,6 +167,17 @@ All labeled Fn-Fx key combinations generate distinct events. In
167addition, the lid microswitch and some docking station buttons may 167addition, the lid microswitch and some docking station buttons may
168also generate such events. 168also generate such events.
169 169
170Hot keys also generate regular keyboard key press/release events through
171the input layer in addition to the ibm/hotkey ACPI events. The input
172layer support accepts the standard IOCTLs to remap the keycodes assigned
173to each hotkey.
174
175When the input device is open, the driver will suppress any ACPI hot key
176events that get translated into a meaningful input layer event, in order
177to avoid sending duplicate events to userspace. Hot keys that are
178mapped to KEY_RESERVED are not translated, and will always generate only
179ACPI hot key event, and no input layer events.
180
170The bit mask allows some control over which hot keys generate ACPI 181The bit mask allows some control over which hot keys generate ACPI
171events. Not all bits in the mask can be modified. Not all bits that can 182events. Not all bits in the mask can be modified. Not all bits that can
172be modified do anything. Not all hot keys can be individually controlled 183be modified do anything. Not all hot keys can be individually controlled
@@ -248,6 +259,146 @@ sysfs notes:
248 disabled" postition, and 1 if the switch is in the 259 disabled" postition, and 1 if the switch is in the
249 "radios enabled" position. 260 "radios enabled" position.
250 261
262input layer notes:
263
264A Hot key is mapped to a single input layer EV_KEY event, possibly
265followed by an EV_MSC MSC_SCAN event that shall contain that key's scan
266code. An EV_SYN event will always be generated to mark the end of the
267event block.
268
269Do not use the EV_MSC MSC_SCAN events to process keys. They are to be
270used as a helper to remap keys, only. They are particularly useful when
271remapping KEY_UNKNOWN keys.
272
273The events are available in an input device, with the following id:
274
275 Bus: BUS_HOST
276 vendor: 0x1014 (PCI_VENDOR_ID_IBM)
277 product: 0x5054 ("TP")
278 version: 0x4101
279
280The version will have its LSB incremented if the keymap changes in a
281backwards-compatible way. The MSB shall always be 0x41 for this input
282device. If the MSB is not 0x41, do not use the device as described in
283this section, as it is either something else (e.g. another input device
284exported by a thinkpad driver, such as HDAPS) or its functionality has
285been changed in a non-backwards compatible way.
286
287Adding other event types for other functionalities shall be considered a
288backwards-compatible change for this input device.
289
290Thinkpad-acpi Hot Key event map (version 0x4101):
291
292ACPI Scan
293event code Key Notes
294
2950x1001 0x00 FN+F1 -
2960x1002 0x01 FN+F2 -
297
2980x1003 0x02 FN+F3 Many models always report this
299 hot key, even with hot keys
300 disabled or with Fn+F3 masked
301 off
302
3030x1004 0x03 FN+F4 Sleep button (ACPI sleep button
304 semanthics, i.e. sleep-to-RAM).
305 It is always generate some kind
306 of event, either the hot key
307 event or a ACPI sleep button
308 event. The firmware may
309 refuse to generate further FN+F4
310 key presses until a S3 or S4 ACPI
311 sleep cycle is performed or some
312 time passes.
313
3140x1005 0x04 FN+F5 Radio. Enables/disables
315 the internal BlueTooth hardware
316 and W-WAN card if left in control
317 of the firmware. Does not affect
318 the WLAN card.
319
3200x1006 0x05 FN+F6 -
321
3220x1007 0x06 FN+F7 Video output cycle.
323 Do you feel lucky today?
324
3250x1008 0x07 FN+F8 -
326 .. .. ..
3270x100B 0x0A FN+F11 -
328
3290x100C 0x0B FN+F12 Sleep to disk. You are always
330 supposed to handle it yourself,
331 either through the ACPI event,
332 or through a hotkey event.
333 The firmware may refuse to
334 generate further FN+F4 key
335 press events until a S3 or S4
336 ACPI sleep cycle is performed,
337 or some time passes.
338
3390x100D 0x0C FN+BACKSPACE -
3400x100E 0x0D FN+INSERT -
3410x100F 0x0E FN+DELETE -
342
3430x1010 0x0F FN+HOME Brightness up. This key is
344 always handled by the firmware,
345 even when unmasked. Just leave
346 it alone.
3470x1011 0x10 FN+END Brightness down. This key is
348 always handled by the firmware,
349 even when unmasked. Just leave
350 it alone.
3510x1012 0x11 FN+PGUP Thinklight toggle. This key is
352 always handled by the firmware,
353 even when unmasked.
354
3550x1013 0x12 FN+PGDOWN -
356
3570x1014 0x13 FN+SPACE Zoom key
358
3590x1015 0x14 VOLUME UP Internal mixer volume up. This
360 key is always handled by the
361 firmware, even when unmasked.
3620x1016 0x15 VOLUME DOWN Internal mixer volume up. This
363 key is always handled by the
364 firmware, even when unmasked.
3650x1017 0x16 MUTE Mute internal mixer. This
366 key is always handled by the
367 firmware, even when unmasked.
368
3690x1018 0x17 THINKPAD Thinkpad/Access IBM/Lenovo key
370
3710x1019 0x18 unknown
372.. .. ..
3730x1020 0x1F unknown
374
375The ThinkPad firmware does not allow one to differentiate when most hot
376keys are pressed or released (either that, or we don't know how to, yet).
377For these keys, the driver generates a set of events for a key press and
378immediately issues the same set of events for a key release. It is
379unknown by the driver if the ThinkPad firmware triggered these events on
380hot key press or release, but the firmware will do it for either one, not
381both.
382
383If a key is mapped to KEY_RESERVED, it generates no input events at all,
384and it may generate a legacy thinkpad-acpi ACPI hotkey event.
385
386If a key is mapped to KEY_UNKNOWN, it generates an input event that
387includes an scan code, and it may also generate a legacy thinkpad-acpi
388ACPI hotkey event.
389
390If a key is mapped to anything else, it will only generate legacy
391thinkpad-acpi ACPI hotkey events if nobody has opened the input device.
392
393For userspace backwards-compatibility purposes, the keycode map is
394initially filled with KEY_RESERVED and KEY_UNKNOWN mappings for scan codes
3950x00 to 0x10 (and maybe others).
396
397Non hot-key ACPI HKEY event map:
3980x5001 Lid closed
3990x5002 Lid opened
4000x7000 Radio Switch may have changed state
401
251 402
252Bluetooth 403Bluetooth
253--------- 404---------