Richbits

How to get the ThinkVantage Key Working

I have a Lenovo Thinkpad X201 that I use for all things.

It has a blue button near the top that, currently, doesn't do anything:

None

I want this button to do something awesome.

How?

First, I need it's keycode:

sudo apt-get install xbindkeys
xbindkeys --defaults-guile > ~/.xbindkeysrc.scm
xbindkeys --key

Then I press The Key. This returns:

Press combination of keys or/and click under the window.
You can use one of the two lines after "NoCommand"
in $HOME/.xbindkeysrc to bind a key.
"NoCommand"
    m:0x0 + c:156
    XF86Launch1

Great, so I know it's keycode is 156 and, even better, it has a symbol XF86Launch1.

I've gotta clean up that config file:

rm ~/.xbindkeysrc.scm

Great. Now, I'll edit ~/.config/openbox/lubuntu-rc.xml to read:

<keyboard>
  ...
  <keybind key="XF86Launch1">
    <action name="Execute">
      <command>/home/my_user/bin/_blue_key_of_doom_</command>
    </action>
  </keybind>
  ...
</keyboard>

Running openbox --reconfigure reloads the keybindings. And, sure enough, the test script runs.

For now, I'll just make the script execute

xterm -fullscreen -e cmatrix

which will immediately plunge the screen into the Matrix.