[ltp] thinkpad-acpi and input layer events

Henrique de Moraes Holschuh linux-thinkpad@linux-thinkpad.org
Wed, 1 Aug 2007 10:07:43 -0300


On Wed, 01 Aug 2007, Igor V. Rafienko wrote:
> Previously, a lot of hotkey presses generated ACPI events. This was all 
> nice and dandy and I had my acpid execute certain things upon receiving 
> these events. Latest thinkpad-acpi provides a choice: setting 
> THINKPAD_ACPI_INPUT_ENABLED gives one input layer events, rather than ACPI 
> events.

Actually, it still gives you both, but it maps the input layer keys by
default, so you get those events instead of acpi ones.

You can use input-kbd to map everything to KEY_UNKNOWN or KEY_RESERVED, and
that will cause all usual ACPI events to be generated, as documented.

> I am wondering how I can make my thinkpad respond to the events from the 
> input layer. That is, with ACPI events, I had a few scripts set up in 

HAL is the easiest way.  You need a very, very new one, though.  You can
probably get new enough X.org with the event-based keyboard driver to
respond to the keys without hassle even without HAL, but I didn't try that.

If it will help you guys any, let's just say that I run it with
THINKPAD_ACPI_INPUT_ENABLED *disabled* for now, and enable stuff I need by
hand (hotkey_enable, hotkey_mask) by hand.  You don't lose any
functionality, just some automated "enable stuff at driver load", and that's
because I didn't want people getting on my case for changing the interface,
otherwise it would enable hotkeys by default always.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh