#!/bin/sh # This is written based on the information from a Thinkpad T400 laptop #F1 "button/fnf1 FNF1 00000080 00000000" #F2 "button/screenlock SCRNLCK 00000080 00000000" #F3 "button/battery BAT 00000080 00000000" #F4 "button/sleep SBTN 00000080 00000000" #F5 "button/wlan WLAN 00000080 00000000" #F6 "button/fnf6 FNF6 00000080 00000000" #F7 "video/switchmode VMOD 00000080 00000000" #F8 BLANK #F9 "button/f24 F24 00000080 00000000" #F10 BLANK #F11 "button/fnf11 FF11 00000080 00000000" #F12 "button/suspend SUSP 00000080 00000000" # Sample contents (from Fn F3): # $1: button/battery $2: BAT $3: 00000080 $4: 00000000 case "$1" in "button/fnf1") [ "$2" == "FNF1" ] && logger "No action defined for FnF1." ;; "button/screenlock") [ "$2" == "SCRNLCK" ] && logger "No action defined for FnF2." ;; "button/battery") [ "$2" == "BAT" ] && logger "No action defined for FnF3." ;; "button/sleep") [ "$2" == "SBTN" ] && /etc/acpi/actions/s2ram.sh ;; "button/wlan") [ "$2" == "WLAN" ] && logger "No action defined for FnF5." ;; "button/fnf6") [ "$2" == "FNF6" ] && logger "No action defined for FnF6." ;; "video/switchmode") [ "$2" == "VMOD" ] && /etc/acpi/actions/switch_video.sh toggle ;; "button/f24") [ "$2" == "F24" ] && logger "No action defined for FnF9." ;; "button/fnf11") [ "$2" == "FF11" ] && logger "No action defined for FnF11." ;; "button/suspend") [ "$2" == "SUSP" ] && /etc/acpi/actions/s2disk.sh ;; esac