[ltp] How are hotkey and ACPI events handled on newer Thinkpads (2010+) with 3.x kernels?

Ethan Schoonover linux-thinkpad@linux-thinkpad.org
Sun, 20 Jan 2013 17:38:29 -0800


--20cf30780a7e1ae62f04d3c2876f
Content-Type: text/plain; charset=UTF-8

On Sun, Jan 20, 2013 at 5:01 PM, Jonas Camillus Jeppesen
<wuhtzu@gmail.com>wrote:

> I am trying to understand how hotkeys (special keys, thinkpad extra keys,
> fn-combinations) and ACPI events are handled on newer Thinkpads (lets say
> from 2010 and onwards. I am hoping to cover my own T420) when they run
> Linux with a 3.x kernel. The reason being that I would like to use no
> established desktop environment, but just a window manager and status bar
> (xmonad+xmobar).
>

I'm using xmonad and xmobar exclusively with my own power/display/system
management, acpi and hotkey scripts. No desktop environment.

My acpi handler is as minimal as possible as I currently prefer to deal
with most keys via xmonad directly. Here it is:
https://gist.github.com/4582988

My xmonad config is here
https://github.com/altercation/es-etc/blob/master/xorg/.xmonad/xmonad.hs -
See the "keysMedia" and "keysSystem" and "keysSystemCodes" functions for
how I handle them (including the battery key which, in this case, doesn't
have a functioning symbol).

This is all on Arch Linux, 3.6 kernel.

If useful, you can see my "system" "displays" and "power" bash scripts in
this repo: https://github.com/altercation/es-bin They are all from scratch,
minimal bash scripts to handle almost everything a normal desktop
environment does, specific for my thinkpad, but relatively adaptable to
other makes/models.


> Right now only brightness up/down (fn+home/end) works if I choose not to
> launch gnome-settings-daemon (i.e. toggle touchpad, volume etc. does not
> work).
>

Nothing reported by xev? there are lower level ways of defining hotkeys
which can be tried. it may take some work but even in cases where there was
absolutely no response I've been able to eventually assign proper behaviors
to most hotkeys on this and other thinkpads. I'd be happy to detail the
methodology as best I can that I used to sort this out in the past.

Best,
Ethan Schoonover

http://ethanschoonover.com/solarized

--20cf30780a7e1ae62f04d3c2876f
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Sun, Jan 20, 2013 at 5:01 PM, Jonas Camillus Jeppesen <=
span dir=3D"ltr">&lt;<a href=3D"mailto:wuhtzu@gmail.com" target=3D"_blank">=
wuhtzu@gmail.com</a>&gt;</span> wrote:<br><div class=3D"gmail_extra"><div c=
lass=3D"gmail_quote">

<blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-=
left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;p=
adding-left:1ex">I am trying to understand how hotkeys (special keys, think=
pad extra keys, fn-combinations) and ACPI events are handled on newer Think=
pads (lets say from 2010 and onwards. I am hoping to cover my own T420) whe=
n they run Linux with a 3.x kernel. The reason being that I would like to u=
se no established desktop environment, but just a window manager and status=
 bar (xmonad+xmobar).<br>

</blockquote><div><br></div><div style>I&#39;m using xmonad and xmobar excl=
usively with my own power/display/system management, acpi and hotkey script=
s. No desktop environment.</div><div style><br></div><div style>My acpi han=
dler is as minimal as possible as I currently prefer to deal with most keys=
 via xmonad directly. Here it is:=C2=A0<a href=3D"https://gist.github.com/4=
582988">https://gist.github.com/4582988</a></div>

<div style><br></div><div style>My xmonad config is here=C2=A0<a href=3D"ht=
tps://github.com/altercation/es-etc/blob/master/xorg/.xmonad/xmonad.hs">htt=
ps://github.com/altercation/es-etc/blob/master/xorg/.xmonad/xmonad.hs</a>=
=C2=A0- See the &quot;keysMedia&quot; and &quot;keysSystem&quot; and &quot;=
keysSystemCodes&quot; functions for how I handle them (including the batter=
y key which, in this case, doesn&#39;t have a functioning symbol).<br>

</div><div style><br></div><div style>This is all on Arch Linux, 3.6 kernel=
.</div><div style><br></div><div style>If useful, you can see my &quot;syst=
em&quot; &quot;displays&quot; and &quot;power&quot; bash scripts in this re=
po:=C2=A0<a href=3D"https://github.com/altercation/es-bin">https://github.c=
om/altercation/es-bin</a>=C2=A0They are all from scratch, minimal bash scri=
pts to handle almost everything a normal desktop environment does, specific=
 for my thinkpad, but relatively adaptable to other makes/models.</div>

<div style><br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px =
0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);bord=
er-left-style:solid;padding-left:1ex">
<br>
Right now only brightness up/down (fn+home/end) works if I choose not to la=
unch gnome-settings-daemon (i.e. toggle touchpad, volume etc. does not work=
).<br></blockquote><div><br></div><div style>Nothing reported by xev? there=
 are lower level ways of defining hotkeys which can be tried. it may take s=
ome work but even in cases where there was absolutely no response I&#39;ve =
been able to eventually assign proper behaviors to most hotkeys on this and=
 other thinkpads. I&#39;d be happy to detail the methodology as best I can =
that I used to sort this out in the past.</div>

<div><br></div><div>Best,</div><div style>Ethan Schoonover</div><div style>=
<br></div><div style><a href=3D"http://ethanschoonover.com/solarized">http:=
//ethanschoonover.com/solarized</a></div></div></div></div>

--20cf30780a7e1ae62f04d3c2876f--