Re: Fn keys on Acer TravelMate 220
On Tue, Nov 14, 2006 at 02:02:10PM +0100, Christian Christmann wrote:
> I'm running Sarge with kernel 2.6.14 on my Acer
> TravelMate 220 laptop. The Fn keys don't work.
> Any ideas how to get the keys running?
Download acerhk-0.5.34 from this page:
make + make install (you need a linux source tree to get the module
Then load it at boot (put a line in /etc/modules with acerhk).
Not all the scancodes sequences issued by acerhk are translated in a
corresponding keycode, so you have to write a script to assign with
setkeycodes a keycode to the unrecognized scancodes sequences. Look
at the output of /var/log/messages (with sudo tail -f
/var/log/messages while trying all the various Fn keys).
For example I have this script named
# to call *after* the loading of acerhk
# modprobe.conf or modprobe.d has to be configured to automatically
# run this script when the acerhk driver is loaded
# each scancodes sequence is usually composed by two bytes
# setkeycodes <scancodes sequence> <keycode to be bound>
# you can use dumpkeys to see which keycodes are already assigned
echo setting unrecongized scancodes
setkeycodes e025 120 # <FN>-<F1>
setkeycodes e026 121 # <FN>-<F2>
setkeycodes e027 122 # <FN>-<F3>
setkeycodes e059 224 # <Fn>-<right>, KEY_BRIGHTNESSUP
setkeycodes e004 132 # bluetooth switch
setkeycodes e055 133 # wlan button off
setkeycodes e056 134 # wlan button on
setkeycodes e074 148 # the "e" useless button, KEY_PROG1
setkeycodes e073 149 # "P", KEY_PROG2
Then you can place in /etc/modprobe.d a file like this:
# when install acerhk set the keycodes to be recognized
install acerhk \
modprobe --ignore-install acerhk\
remove acerhk \
echo off > /proc/driver/acerhk/mail_led;\
modprobe -r --ignore-install acerhk
In this way when the acerhk module is loaded the keycodes for each
possible key in the laptop keyboard should be automatically
assigned. You can use loadkeys to set keysym to be assigned to these
The interface of the driver is in /proc/acerhk: you can read the state
of the various led/hardware controlled by the driver and set the
values (read the acerhk documentation).
With acerhk loaded and with these settings, all buttons should be
recognized by xev. You can use the packages hotkeys or lineak to get
them catched by some daemon program and get them trigger useful
Final notes: the last version of acerhk supported in Debian is 0.5.31,
and I had a strange issue with hotkeys that cause it not to work when
loaded by the xinitrc script. I have to kill it and restart to get it
In each case it seems hotkeys not to be actively maintained anymore: can
someone confirm this?
The difference between the right word and the almost right word is the
difference between lightning and the lightning bug.
-- Mark Twain