[ltp] HAL and ThinkVantage

Marius Gedminas linux-thinkpad@linux-thinkpad.org
Mon, 22 Dec 2008 15:19:35 +0200


--osDK9TLjxFScVI/L
Content-Type: text/plain; charset=windows-1257
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, Dec 21, 2008 at 11:28:24PM +0100, Joachim Breitner wrote:
> Am Montag, den 15.12.2008, 23:28 +0100 schrieb Yves-Alexis Perez:
> > On jeu, 2008-10-23 at 23:44 +0200, Damjan wrote:
> > > Now the question is whats the correct keymap data for the ThinkVantage
> > > button? It's not 0x17!
> > >=20
> > > The input event value for volume-up is=20
> > > #define KEY_VOLUMEUP            115
> > > and in HAL we have 0x14?!?
> > >=20
> > > For ThinkVantage
> > > #define KEY_VENDOR              0x168
> > > (it's hex now)
> > >=20
> > > what's the HAL keymap??
> > >=20
> > Did you manage to get a keycode for ThinkVantage key?
> >=20
> > I'm kind-of running into the same issue as you, so if you have new stuff
> > on this it'd be nice to share them :)
>=20
> I worked around this issue by using:
>=20
> $ cat /etc/hal/fdi/information/40-thinkvantage-KEY_PROG1.fdi=20
> <?xml version=3D"1.0" encoding=3D"ISO-8859-1"?> <!-- -*- SGML -*- -->
>=20
> <deviceinfo version=3D"0.2">
>   <device>
>     <!-- These are buttons synthesized in the thinkpad-acpi kernel module=
 -->
>     <match key=3D"input.product" string=3D"ThinkPad Extra Buttons">
>       <!-- Lenovo systems have a similar but different layout to IBM syst=
ems -->
>       <match key=3D"/org/freedesktop/Hal/devices/computer:system.hardware=
=2Evendor" prefix=3D"LENOVO">
>         <append key=3D"input.keymap.data" type=3D"strlist">0x17:prog1</ap=
pend>
>         <append key=3D"info.capabilities" type=3D"strlist">input.keymap</=
append>

This is awesome.  Could you point me towards some documentation about
this?  Where does the 0x17 come from (hardware scancode)?  Where is the
set of names that include 'prog1' defined?  Is it evdev that does the
remapping defined by HAL?

>       </match>
>     </match>
>   </device>
> </deviceinfo>
>=20
>=20
> With this change, I the key is reported as XF86Launch1 to X
> applications, and I could successfully bind this key in xmonad.
>=20
> Of course, it=92d be cleaner if I could bind XF86Vendor, but this does not
> exist yet, it seems.

Marius Gedminas
--=20
What goes up, must come down. Ask any system administrator.

--osDK9TLjxFScVI/L
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iD8DBQFJT5PnkVdEXeem148RAroNAJ9iyG1EyRHJRq5kESZo5NyeGmQ3cQCdF7rd
WxbZtPs/5sG87gADdGm5dX0=
=f2JH
-----END PGP SIGNATURE-----

--osDK9TLjxFScVI/L--