Here is how I do it in Arch XFCE with xset...
Using xev, I saw that Fn+F3 is mapped to XF86Battery.
Code:
KeyPress event, serial 41, synthetic NO, window 0x2e00001,
root 0xb0, subw 0x0, time 382189, (797,429), root:(803,503),
state 0x10, keycode 244 (keysym 0x1008ff93, XF86Battery), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 41, synthetic NO, window 0x2e00001,
root 0xb0, subw 0x0, time 382189, (797,429), root:(803,503),
state 0x10, keycode 244 (keysym 0x1008ff93, XF86Battery), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
I created the following file
/etc/acpi/actions/blank.sh as root and made it executable.
Code:
#! /bin/sh
/usr/bin/xset dpms force off
I created a keyboard shortcut (an option in XFCE: Applications Menu > Settings > Keyboard > Application Shortcuts).
Command:
/etc/acpi/actions/blank.shShortcut:
XF86BatteryFn+F3 now turns off the backlight. Moving the trackpoint or pressing a keyboard key turns the backlight back on.
FWIW, for other Fn+F* keys that aren't already mapped and create only an acpi event, I have a corresponding file in /etc/acpi/events/
ACPI events can be seen by running
acpi_listen from terminal.
Code:
$ acpi_listen
button/f24 F24 00000080 00000000 K
button/fnf11 FF11 00000080 00000000 K
One example is how I turn on and off bluetooth with Fn+F9.
/etc/acpi/events/bluetoothconfCode:
event=button/f24.*
action=/etc/acpi/actions/bluetooth.sh
/etc/acpi/actions/bluetooth.shCode:
#!/bin/bash
BT_RFKILL=$(rfkill list | grep tpacpi_bluetooth_sw | sed 's/\([0-9]\+\):.*/\1/')
BT_STATE=$(/usr/sbin/rfkill list $BT_RFKILL | grep "Soft blocked: yes")
if [ "x" == "x$BT_STATE" ]; then
/usr/sbin/rfkill block $BT_RFKILL
else
/usr/sbin/rfkill unblock $BT_RFKILL
fi
exit 0
Another example is how I connect and disconnect my home WiFi profile with Fn+F11.
/etc/acpi/events/netcfg_home-wirelessconfCode:
event=button/fnf11.*
action=/etc/acpi/actions/netcfg_home-wireless.sh
/etc/acpi/actions/netcfg_home-wireless.shCode:
#!/bin/bash
WLAN_STATE=$(netcfg current)
if [ "x" == "x$WLAN_STATE" ]; then
/usr/bin/netcfg home-wireless
else
/usr/bin/netcfg -a
fi
exit 0