Re: Thinkpad T61 and keyboard mappings Daniel Pittman
From: Daniel Pittman <daniel@xxxxxxxxxxxx>
To: luv-main@xxxxxxxxxx
Subject: Re: Thinkpad T61 and keyboard mappings
Date: Mon, 08 Mar 2010 23:43:22 +1100
Russell Coker <russell@xxxxxxxxxxxx> writes:
> My previous few Thinkpads had buttons on the keyboard to change the volume,
> they affected the hardware. So changing the volume by alsamixer was
> separate to the volume control in the hardware.
>
> My latest Thinkpad has keys that are labelled to control the volume but
> which don't actually do anything.
This is a T61p, isn't it? You should be able to select a keymap for the
ThinkPad through XKB[1], which will correctly map those keys to XF86VolumeUp
and similar symbols.
That binary comes from 'hotkey-setup', which I seem to have installed at some
point, and which claims to do the right thing automagically for extra buttons
on laptops.
...and, and the final one, "ThinkPad Extra Buttons", comes from ibm_acpi,
which exports an additional input device and exposes some of these.
So, um, somewhere in that mess you should find that something exports the
appropriate X keysyms to let you use those keys.
> According to "showkeys" the "mute" key gives "0x71 0xf1", the "volume down"
> button gives "0x72 0xf2", and the "volume up" button gives "0x73 0xf3". How
> can I make a KDE session on Debian/Lenny do the right thing with these
> keypresses? I've seen GNOME work with extra volume-control keys on
> keyboards before...
In turn, you can map these to global shortcuts to, say, KMixer, and instruct
it to adjust a volume when they are hit.
(Are you familiar with 'xev', which shows you the raw X events when you hit
the buttons? I find it useful to identify the KeySym mapping, if any, and
the raw codes required to let xmodmap program the key.[2]
> Also my Thinkpad has a "ThinkVantage" key that gives "0x00 0x82 0xe8 0x80
> 0x82 0xe8". Is there anything useful I can do with that?
It shows up as an X event, but has no KeySym, so you would need to map it to
something. Then, yes, you can do with it anything you do with any other key.
Daniel
Footnotes:
[1] ...though my system, with KDE 4, identifies it only as an evdev keyboard,
and still gets the key mapping right, suggesting that the 2.6.32 kernel
knows enough about the keyboard to get it right without advice.
[2] Well, I did, back when I needed to use that. These days it mostly seems
to just work. Those, which package does this I don't know.
--
✣ Daniel Pittman ✉ daniel@xxxxxxxxxxxx ☎ +61 401 155 707
♽ made with 100 percent post-consumer electrons