<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.thinkwiki.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Eternallinux</id>
	<title>ThinkWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.thinkwiki.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Eternallinux"/>
	<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/wiki/Special:Contributions/Eternallinux"/>
	<updated>2026-05-10T23:57:26Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.12</generator>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Tablet_Hardware_Buttons&amp;diff=54241</id>
		<title>Tablet Hardware Buttons</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Tablet_Hardware_Buttons&amp;diff=54241"/>
		<updated>2013-01-04T17:19:35Z</updated>

		<summary type="html">&lt;p&gt;Eternallinux: Add section on using xbindkeys to bind the tablet buttons.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;padding-right:20px;width:10px;&amp;quot; |&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin: 0; margin-right:10px; border: 1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#F8F8FF; align:right;&amp;quot;&amp;gt;&lt;br /&gt;
===Tablet Hardware Buttons===&lt;br /&gt;
The Thinkpad tablets includes hardware buttons located on the&lt;br /&gt;
LCD screen bezel. They are designed to be used when the ThinkPad is&lt;br /&gt;
converted to the tablet configuration (though they are still&lt;br /&gt;
accessible when in the laptop configuration).&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Buttons==&lt;br /&gt;
The X41 Tablet hardware buttons include:&lt;br /&gt;
*Power (with sliding lock)&lt;br /&gt;
*Cltr-Alt-Del [sic]&lt;br /&gt;
*Page up&lt;br /&gt;
*Page down&lt;br /&gt;
*Enter&lt;br /&gt;
*Escape&lt;br /&gt;
*Screen Rotation&lt;br /&gt;
*Tablet shortcut menu&lt;br /&gt;
&lt;br /&gt;
X61 Tablet: [http://www.tabletpcreview.com/picture.asp?f=3104 picture] from [http://www.tabletpcreview.com/default.asp?newsID=896 here].&lt;br /&gt;
&lt;br /&gt;
X200 Tablet: see below.&lt;br /&gt;
&lt;br /&gt;
==Linux Support==&lt;br /&gt;
The hardware buttons (except power) are recognized by the standard atkbd kernel driver which emits the following scancodes:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
! Key !! X41 Scancode || {{X60t}} Scancode || {{X61_Tablet}} Scancode || {{X200_Tablet}} Scancode || {{X201_Tablet}} Scancode&lt;br /&gt;
|-&lt;br /&gt;
| Page up   || 0x6D || NA || NA || NA || NA&lt;br /&gt;
|-&lt;br /&gt;
| Page down || 0x6E || NA || NA || NA || NA&lt;br /&gt;
|-&lt;br /&gt;
| Enter || 0x69 || 0x69 || 0x69 || NA || NA&lt;br /&gt;
|-&lt;br /&gt;
| Esc || 0x6B || 0x6B || 0x6b || NA || NA&lt;br /&gt;
|-&lt;br /&gt;
| Toolbox || 0x68 || 0x68 || 0x68 || 0x66 || 0x68&lt;br /&gt;
|-&lt;br /&gt;
| Rotate || 0x6C || 0x6c || 0x6c || 0x6b || 0x6c&lt;br /&gt;
|-&lt;br /&gt;
| (Unlabeled) || 0x67 || NA || 0x67 || 0xe0 0x12 || 0x67&lt;br /&gt;
|-&lt;br /&gt;
| Padlock || NA || NA || NA || (nothing?) || 0x66&lt;br /&gt;
|-&lt;br /&gt;
| Right || NA || 0x6D || 0x6d || NA || NA&lt;br /&gt;
|-&lt;br /&gt;
| Left || NA || 0x6E || 0x6e || NA || NA&lt;br /&gt;
|-&lt;br /&gt;
| Up || NA || 0x71 || 0x71 || NA || NA&lt;br /&gt;
|-&lt;br /&gt;
| Down || NA || 0x6F || 0x6f || NA || NA&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* X200 Tablet&lt;br /&gt;
*: Layout: power (with sliding lock); clockwise-arrow (formerly unlabeled); rotate (two boxes and an arrow); Toolbox (the icon is now a menu); padlock.&lt;br /&gt;
*: The padlock button seems to do nothing.  It generates no scancode, and has no effect on the other buttons.&lt;br /&gt;
*: The clockwise-arrow button returns a scancode pair.  So you say {{cmduser|setkeycodes e012 ''whatever''}}.&lt;br /&gt;
* X201 Tablet&lt;br /&gt;
*: Layout: as X200 Tablet&lt;br /&gt;
The utility setkeycodes can be used to map these scancodes to keycodes. Read {{cmduser|man setkeycodes}} for usage.&lt;br /&gt;
For example, the following command will map the page up and page down buttons to their respective keys:&lt;br /&gt;
&lt;br /&gt;
{{cmdroot|setkeycodes 6e 109 6d 104}}&lt;br /&gt;
&lt;br /&gt;
==Models featuring this Device==&lt;br /&gt;
* {{X41_Tablet}}, {{X60t}}, {{X61_Tablet}}, {{X200_Tablet}}, {{X201_Tablet}}&lt;br /&gt;
&lt;br /&gt;
==Configuration with xbindkeys==&lt;br /&gt;
The &amp;lt;tt&amp;gt;xbindkeys&amp;lt;/tt&amp;gt; utility can be used to bind actions to the buttons once they have key codes (which they have by default in Debian). This example is for an {{X200_Tablet}} running Debian Wheezy, but should be applicable to other models and distributions.&lt;br /&gt;
&lt;br /&gt;
First create a default {{path|~/.xbindkeysrc}} file with this command:&lt;br /&gt;
&lt;br /&gt;
{{cmduser|xbindkeys --defaults &amp;gt; ~/.xbindkeysrc}}&lt;br /&gt;
&lt;br /&gt;
This file will contain the key bindings for each key, and the commands associated with them. More information on the file can be found on [https://wiki.archlinux.org/index.php/Xbindkeys ArchWiki's Xbindkeys page].&lt;br /&gt;
&lt;br /&gt;
Next, use the {{cmduser|xbindkeys -k}} command to generate the bindings to add to it. When the command is run, a window with a white background will appear. Select it and press the key you wish to bind. It will close and the binding will be printed to the terminal. For example (for the {{ibmkey|Tablet rotate|#494949}} button):&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;(Scheme function)&amp;quot;&lt;br /&gt;
     m:0x0 + c:161&lt;br /&gt;
     NoSymbol&lt;br /&gt;
&lt;br /&gt;
Copy and paste this into your {{path|~/.xbindkeysrc}} file, replacing &amp;lt;tt&amp;gt;&amp;quot;(Scheme function)&amp;quot;&amp;lt;/tt&amp;gt; with the command you wish to execute when the button is pressed.&lt;br /&gt;
&lt;br /&gt;
A {{path|~/.xbindkeysrc}} for an {{X200_Tablet}} might look like this:&lt;br /&gt;
&lt;br /&gt;
 # (Automatically generated documentation)&lt;br /&gt;
 # ...&lt;br /&gt;
 &lt;br /&gt;
 #Tablet Rotate button (run rotate script)&lt;br /&gt;
 &amp;quot;~/scripts/rotate.sh&amp;quot;&lt;br /&gt;
 # Replace the line above with the path to the script&lt;br /&gt;
     m:0x0 + c:161&lt;br /&gt;
     NoSymbol&lt;br /&gt;
 &lt;br /&gt;
 #Tablet Toolbox button (show cellwriter)&lt;br /&gt;
 &amp;quot;cellwriter --show-window&amp;quot;&lt;br /&gt;
     m:0x0 + c:149&lt;br /&gt;
     NoSymbol&lt;br /&gt;
&lt;br /&gt;
This file binds the {{ibmkey|Tablet rotate|#494949}} button to a bash script that rotates the display (see below), and the {{ibmkey|Tablet shortcut|#494949}} button to the [http://www.risujin.org/cellwriter/ cellwriter input panel].&lt;br /&gt;
&lt;br /&gt;
The bindings will only work while {{cmduser|xbindkeys}} is running, however. Most desktop environments have a GUI to run commands at login. In Gnome 3, this is the Startup Applications app.&lt;br /&gt;
&lt;br /&gt;
===Screen rotation script===&lt;br /&gt;
&lt;br /&gt;
The example {{path|~/.xbindkeysrc}} file above references a bash script that performs screen rotation. This is listed below:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 tablet=&amp;quot;Serial Wacom Tablet stylus&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 # Get the current orientation of the tablet&lt;br /&gt;
 rotate=$(xsetwacom get &amp;quot;$tablet&amp;quot; Rotate)&lt;br /&gt;
 &lt;br /&gt;
 # Work out the next tablet and screen orientations (rotating clockwise)&lt;br /&gt;
 case &amp;quot;$rotate&amp;quot; in&lt;br /&gt;
     none) nextRotate=&amp;quot;cw&amp;quot;&lt;br /&gt;
           nextOrient=&amp;quot;right&amp;quot; ;;&lt;br /&gt;
     cw)   nextRotate=&amp;quot;half&amp;quot;&lt;br /&gt;
           nextOrient=&amp;quot;inverted&amp;quot; ;;&lt;br /&gt;
     half) nextRotate=&amp;quot;ccw&amp;quot;&lt;br /&gt;
           nextOrient=&amp;quot;left&amp;quot; ;;&lt;br /&gt;
     ccw)  nextRotate=&amp;quot;none&amp;quot;&lt;br /&gt;
           nextOrient=&amp;quot;normal&amp;quot; ;;&lt;br /&gt;
 esac&lt;br /&gt;
 &lt;br /&gt;
 # Rotate the screen&lt;br /&gt;
 xrandr -o $nextOrient&lt;br /&gt;
 &lt;br /&gt;
 # Rotate the tablet&lt;br /&gt;
 xsetwacom set &amp;quot;$tablet&amp;quot; Rotate $nextRotate&lt;br /&gt;
&lt;br /&gt;
Save this as a text file with the extension &amp;lt;tt&amp;gt;.sh&amp;lt;/tt&amp;gt; somewhere on your system, mark it executable with {{cmduser|chmod +x &amp;lt;path to script&amp;gt;}}, and put the path in your {{path|~/.xbindkeysrc}}, on the appropriate line.&lt;br /&gt;
&lt;br /&gt;
You may have to replace &amp;lt;tt&amp;gt;&amp;quot;Serial Wacom Tablet stylus&amp;quot;&amp;lt;/tt&amp;gt; with the name of your Wacom tablet. You can find this with the {{cmduser|xsetwacom list devices}} command.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[How to get special keys to work]]&lt;br /&gt;
*[https://code.edge.launchpad.net/~karl.hegbloom/tabuntu/tablet-screen-rotation-support Tablet Screen Rotation Support] (Launchpad).&lt;br /&gt;
[[Category:Components]]&lt;/div&gt;</summary>
		<author><name>Eternallinux</name></author>
		
	</entry>
</feed>