[ltp] Re: Bluetooth hotkey

Borislav Deianov linux-thinkpad@linux-thinkpad.org
Sun, 19 Sep 2004 18:27:32 -0700


On Sun, 19 Sep 2004 23:29:04 +0000 (UTC) Jan Kokoska <kokoskaj@seznam.cz> wrote:
>
> Now I am into fancy stuff and since my R40 doesn't have Bluetooth I
> would like to re-assign Fn+F5 to switching my wireless on and off.
> Script works fine, but I can't figure out what is the actual key to
> bind it to.

The ACPI event will be "ibm/hotkey HKEY 00000080 00001005". If you are
using acpid, create a file in /etc/acpi/events with the following
contents:

event=ibm/hotkey HKEY 00000080 00001005
action=/script/to/execute

> README for latest ibm-acpi says the last number is 0000 XXXX where
> XXXX is described further for each key, except with only 3
> numbers. Bluetooth should be 010, so I tried 0000 0010 to no avail,

The 010 is for the mask which controls which hotkey events are
enabled. Unless you specifically want to NOT enable some hotkey event,
just do:

echo enable,0xffff > /proc/acpi/ibm/hotkey

or, when loading the module:

modprobe ibm_acpi hotkey=enable,0xffff 

> So I did "echo enable > /proc/acpi/ibm/bluetooth" which switches it on,
> but neither of the above key traps worked.

If you don't have bluetooth, you don't need to mess with
/proc/acpi/ibm/bluetooth at all.

> Is pressing the button even supposed to generate an ACPI event if
> the Bluetooth device is not present?

Yes.

Wishes,
Boris