Page 1 of 1

Fn+F6 and Ubuntu

Posted: Mon Oct 24, 2005 10:26 am
by Edward Mendelson
Question about the Fn keys and a T4x with Bluetooth.

Under Ubuntu, Fn+F5 seems to toggle all wireless devices. I'm trying to set up Fn+F6 to toggle Bluetooth only, as described in the second message here:

http://www.ubuntuforums.org/showthread. ... oth+marius

Can't get this to work under Ubuntu Breezy on a T42. Has anyone else tried this with any success?

Posted: Mon Oct 24, 2005 10:59 am
by kaiser
you will have to enable all Fn+FX-Combinations. by default only the ones which are predefined (i.e. got a function-symbol) are enabled.
ibm-acpi README wrote:Hot keys -- /proc/acpi/ibm/hotkey
---------------------------------

Without this driver, only the Fn-F4 key (sleep button) generates an
ACPI event. With the driver loaded, the hotkey feature enabled and the
mask set (see below), the various hot keys generate ACPI events in the
following format:

ibm/hotkey HKEY 00000080 0000xxxx

The last four digits vary depending on the key combination pressed.
All labeled Fn-Fx key combinations generate distinct events. In
addition, the lid microswitch and some docking station buttons may
also generate such events.

The following commands can be written to this file:

echo enable > /proc/acpi/ibm/hotkey -- enable the hot keys feature
echo disable > /proc/acpi/ibm/hotkey -- disable the hot keys feature
echo 0xffff > /proc/acpi/ibm/hotkey -- enable all possible hot keys
echo 0x0000 > /proc/acpi/ibm/hotkey -- disable all possible hot keys
... any other 4-hex-digit mask ...
echo reset > /proc/acpi/ibm/hotkey -- restore the original mask
after "echo 0xffff > /proc/acpi/ibm/hotkey" i used my Fn+F6 successfully for a Bluetooth-Switch-Script, but i don't know how to enable all Hotkeys on every Startup.

Posted: Mon Oct 24, 2005 12:39 pm
by Edward Mendelson
Yes, that's the answer. The next (but not, unfortunately, the last) step is to put this into a script that you make executable in /etc/init.d - something like this:

Code: Select all

#! /bin/sh
# /etc/init.d/my-custom-startup.sh

echo 0xffff > /proc/acpi/ibm/hotkey &
exit 0
Save it as /etc/init.d/my-custom-startup.sh, make it executable with sudo chmod +x.

But I can't seem to make this run at the right time (after acpid is loaded), not even with the command "sudo update-rc.d my-custom-startup 99 ."

Any suggestions would be helpful here...