https://www.thinkwiki.org/w/api.php?action=feedcontributions&user=Wyrfel&feedformat=atomThinkWiki - User contributions [en]2024-03-28T08:43:47ZUser contributionsMediaWiki 1.31.12https://www.thinkwiki.org/w/index.php?title=Default_meanings_of_special_keys&diff=29855Default meanings of special keys2007-05-18T05:39:49Z<p>Wyrfel: /* T Series */</p>
<hr />
<div>{| width="100%" columns="2"<br />
|style="vertical-align:top;padding-right:20px;width:10px;white-space:nowrap;" rowspan="2" | __TOC__<br />
|style="vertical-align:top" |<br />
<br />
The following table lists the associated functionalities for special keys on ThinkPads.<br />
|}<br />
<br />
{| width="100%" {{prettytable}}<br />
! style="background:#ffdead;"| Models<br />
! style="background:#ffdead;"| {{key|Fn}}{{key|F1}}<br />
! style="background:#ffdead;"| {{key|Fn}}{{key|F2}}<br />
! style="background:#ffdead;"| {{key|Fn}}{{key|F3}}<br />
! style="background:#ffdead;"| {{key|Fn}}{{key|F4}}<br />
! style="background:#ffdead;"| {{key|Fn}}{{key|F5}}<br />
! style="background:#ffdead;"| {{key|Fn}}{{key|F6}}<br />
! style="background:#ffdead;"| {{key|Fn}}{{key|F7}}<br />
! style="background:#ffdead;"| {{key|Fn}}{{key|F8}}<br />
! style="background:#ffdead;"| {{key|Fn}}{{key|F9}}<br />
! style="background:#ffdead;"| {{key|Fn}}{{key|F10}}<br />
! style="background:#ffdead;"| {{key|Fn}}{{key|F11}}<br />
! style="background:#ffdead;"| {{key|Fn}}{{key|F12}}<br />
! style="background:#ffdead;"| {{key|Fn}}{{key|Home}}<br />
! style="background:#ffdead;"| {{key|Fn}}{{key|End}}<br />
! style="background:#ffdead;"| {{key|Fn}}{{key|PageUp}}<br />
! style="background:#ffdead;"| {{key|Fn}}{{key|Space}}<br />
! style="background:#ffdead;"| {{key|Fn}}{{key|left}}<br />
! style="background:#ffdead;"| {{key|Fn}}{{key|right}}<br />
! style="background:#ffdead;"| {{key|Fn}}{{key|up}}<br />
! style="background:#ffdead;"| {{key|Fn}}{{key|down}}<br />
|-<br />
! colspan=21 style="text-align:center;background:#efefef;" |<br />
<br />
===Numbered===<br />
|-<br />
| {{240}}, {{240X}}, 240Z<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{365C}}, {{365CD}}, {{365CS}}, {{365CSD}}, {{365E}}, {{365ED}}, {{365X}}, {{365XD}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{380}}, {{380D}}, {{380E}}, {{380ED}}, {{385D}}, {{385ED}}, {{380XD}}, {{385XD}}, {{380Z}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{390}}, {{390E}}, {{390X}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{560}}, {{560E}}, {{560X}}, {{560Z}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{570}}, {{570E}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{600}}, {{600E}}, {{600X}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{750}}, {{750CS}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{755C}}, {{755CS}}, {{755CE}}, {{755CSE}}, {{755CD}}, {{755CX}}, {{755CV}}, {{755CDV}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{760C}}, {{760CD}}, {{760L}}, {{760LD}}, {{760E}}, {{760ED}}, {{760EL}}, {{760ELD}}, {{760XD}}, {{765D}}, {{765L}}, {{760XL}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{770}}, {{770E}}, {{770ED}}, {{770X}}, {{770Z}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
! colspan=21 style="text-align:center;background:#efefef;" |<br />
<br />
===i Series===<br />
|-<br />
| {{i1720}}, {{i1721}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
! colspan=21 style="text-align:center;background:#efefef;" |<br />
<br />
===A Series===<br />
|-<br />
| {{A20m}}, {{A20p}}, {{A21e}}, {{A21m}}, {{A21p}}, {{A22e}}, {{A22m}}, {{A22m}}, {{A22p}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{A30}}, {{A30p}}, {{A31}}, {{A31p}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
! colspan=21 style="text-align:center;background:#efefef;" |<br />
===G Series===<br />
|-<br />
| {{G40}}, {{G41}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
! colspan=21 style="text-align:center;background:#efefef;" |<br />
===R Series===<br />
|-<br />
| {{R30}}, {{R31}}, {{R32}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{R40}}, {{R40e}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{R50}}, {{R50e}}, {{R50p}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{R51}}, {{R51e}}, {{R52}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{R60}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
! colspan=21 style="text-align:center;background:#efefef;" |<br />
<br />
===T Series===<br />
|-<br />
| {{T20}}, {{T21}}, {{T22}}, {{T23}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{T30}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{T40}}, {{T40p}}, {{T41}}, {{T41p}}, {{T42}}, {{T42p}}, {{T43}}, {{T43p}}<br />
|<br />
|<br />
| blank screen<br />
| suspend to ram<br />
| switch wireless<br />
|<br />
| switch display<br />
| zoom(?)<br />
| (un)dock<br />
|<br />
|<br />
| suspend to disk<br />
| brightness increase<br />
| brightness decrease<br />
| thinklight<br />
| zoom<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{T60}}, {{T60p}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
! colspan=21 style="text-align:center;background:#efefef;" |<br />
<br />
===X Series===<br />
|-<br />
| {{X20}}, {{X21}}, {{X22}}, {{X23}}, {{X24}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{X30}}, {{X31}}, {{X32}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{X40}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{X41}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{X41T}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{X60}}, {{X60s}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{X60t}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
! colspan=21 style="text-align:center;background:#efefef;" |<br />
<br />
===Z Series===<br />
|-<br />
| {{Z60m}}, {{Z60t}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{Z61e}}, {{Z61m}}, {{Z61p}}, {{Z61t}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
! colspan=21 style="text-align:center;background:#efefef;" |<br />
<br />
===Other===<br />
|-<br />
| {{TransNote}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|}<br />
<br />
[[Category:Tables]]</div>Wyrfelhttps://www.thinkwiki.org/w/index.php?title=Template:Key&diff=29854Template:Key2007-05-18T05:37:06Z<p>Wyrfel: </p>
<hr />
<div><span style="background-color:white; border: 3pt outset #888888;-moz-border-radius:5pt;text-align:center;vertical-align:middle;padding-left:2px;padding-top:0px;padding-bottom:1px;padding-right:2px;font-family:sans-serif;font-size:smaller;font-weight:bold;">{{{1}}}</span></div>Wyrfelhttps://www.thinkwiki.org/w/index.php?title=Template:Key&diff=29853Template:Key2007-05-18T05:36:21Z<p>Wyrfel: </p>
<hr />
<div><span background-color:white; style="border: 3pt outset #888888;-moz-border-radius:5pt;text-align:center;vertical-align:middle;padding-left:2px;padding-top:0px;padding-bottom:1px;padding-right:2px;font-family:sans-serif;font-size:smaller;font-weight:bold;">{{{1}}}</span></div>Wyrfelhttps://www.thinkwiki.org/w/index.php?title=Default_meanings_of_special_keys&diff=29852Default meanings of special keys2007-05-18T05:35:38Z<p>Wyrfel: &lt;autosumm-new&gt;</p>
<hr />
<div>{| width="100%" columns="2"<br />
|style="vertical-align:top;padding-right:20px;width:10px;white-space:nowrap;" rowspan="2" | __TOC__<br />
|style="vertical-align:top" |<br />
<br />
The following table lists the associated functionalities for special keys on ThinkPads.<br />
|}<br />
<br />
{| width="100%" {{prettytable}}<br />
! style="background:#ffdead;"| Models<br />
! style="background:#ffdead;"| {{key|Fn}}{{key|F1}}<br />
! style="background:#ffdead;"| {{key|Fn}}{{key|F2}}<br />
! style="background:#ffdead;"| {{key|Fn}}{{key|F3}}<br />
! style="background:#ffdead;"| {{key|Fn}}{{key|F4}}<br />
! style="background:#ffdead;"| {{key|Fn}}{{key|F5}}<br />
! style="background:#ffdead;"| {{key|Fn}}{{key|F6}}<br />
! style="background:#ffdead;"| {{key|Fn}}{{key|F7}}<br />
! style="background:#ffdead;"| {{key|Fn}}{{key|F8}}<br />
! style="background:#ffdead;"| {{key|Fn}}{{key|F9}}<br />
! style="background:#ffdead;"| {{key|Fn}}{{key|F10}}<br />
! style="background:#ffdead;"| {{key|Fn}}{{key|F11}}<br />
! style="background:#ffdead;"| {{key|Fn}}{{key|F12}}<br />
! style="background:#ffdead;"| {{key|Fn}}{{key|Home}}<br />
! style="background:#ffdead;"| {{key|Fn}}{{key|End}}<br />
! style="background:#ffdead;"| {{key|Fn}}{{key|PageUp}}<br />
! style="background:#ffdead;"| {{key|Fn}}{{key|Space}}<br />
! style="background:#ffdead;"| {{key|Fn}}{{key|left}}<br />
! style="background:#ffdead;"| {{key|Fn}}{{key|right}}<br />
! style="background:#ffdead;"| {{key|Fn}}{{key|up}}<br />
! style="background:#ffdead;"| {{key|Fn}}{{key|down}}<br />
|-<br />
! colspan=21 style="text-align:center;background:#efefef;" |<br />
<br />
===Numbered===<br />
|-<br />
| {{240}}, {{240X}}, 240Z<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{365C}}, {{365CD}}, {{365CS}}, {{365CSD}}, {{365E}}, {{365ED}}, {{365X}}, {{365XD}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{380}}, {{380D}}, {{380E}}, {{380ED}}, {{385D}}, {{385ED}}, {{380XD}}, {{385XD}}, {{380Z}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{390}}, {{390E}}, {{390X}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{560}}, {{560E}}, {{560X}}, {{560Z}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{570}}, {{570E}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{600}}, {{600E}}, {{600X}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{750}}, {{750CS}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{755C}}, {{755CS}}, {{755CE}}, {{755CSE}}, {{755CD}}, {{755CX}}, {{755CV}}, {{755CDV}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{760C}}, {{760CD}}, {{760L}}, {{760LD}}, {{760E}}, {{760ED}}, {{760EL}}, {{760ELD}}, {{760XD}}, {{765D}}, {{765L}}, {{760XL}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{770}}, {{770E}}, {{770ED}}, {{770X}}, {{770Z}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
! colspan=21 style="text-align:center;background:#efefef;" |<br />
<br />
===i Series===<br />
|-<br />
| {{i1720}}, {{i1721}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
! colspan=21 style="text-align:center;background:#efefef;" |<br />
<br />
===A Series===<br />
|-<br />
| {{A20m}}, {{A20p}}, {{A21e}}, {{A21m}}, {{A21p}}, {{A22e}}, {{A22m}}, {{A22m}}, {{A22p}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{A30}}, {{A30p}}, {{A31}}, {{A31p}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
! colspan=21 style="text-align:center;background:#efefef;" |<br />
===G Series===<br />
|-<br />
| {{G40}}, {{G41}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
! colspan=21 style="text-align:center;background:#efefef;" |<br />
===R Series===<br />
|-<br />
| {{R30}}, {{R31}}, {{R32}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{R40}}, {{R40e}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{R50}}, {{R50e}}, {{R50p}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{R51}}, {{R51e}}, {{R52}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{R60}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
! colspan=21 style="text-align:center;background:#efefef;" |<br />
<br />
===T Series===<br />
|-<br />
| {{T20}}, {{T21}}, {{T22}}, {{T23}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{T30}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{T40}}, {{T40p}}, {{T41}}, {{T41p}}, {{T42}}, {{T42p}}, {{T43}}, {{T43p}}<br />
|<br />
|<br />
| blank screen<br />
| sleep<br />
| switch wireless<br />
|<br />
| switch display<br />
| zoom(?)<br />
| (un)dock<br />
|<br />
|<br />
| hibernate<br />
| brightness increase<br />
| brightness decrease<br />
| thinklight<br />
| zoom<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{T60}}, {{T60p}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
! colspan=21 style="text-align:center;background:#efefef;" |<br />
<br />
===X Series===<br />
|-<br />
| {{X20}}, {{X21}}, {{X22}}, {{X23}}, {{X24}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{X30}}, {{X31}}, {{X32}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{X40}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{X41}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{X41T}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{X60}}, {{X60s}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{X60t}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
! colspan=21 style="text-align:center;background:#efefef;" |<br />
<br />
===Z Series===<br />
|-<br />
| {{Z60m}}, {{Z60t}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| {{Z61e}}, {{Z61m}}, {{Z61p}}, {{Z61t}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|-<br />
! colspan=21 style="text-align:center;background:#efefef;" |<br />
<br />
===Other===<br />
|-<br />
| {{TransNote}}<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|<br />
|}<br />
<br />
[[Category:Tables]]</div>Wyrfelhttps://www.thinkwiki.org/w/index.php?title=How_to_get_special_keys_to_work&diff=29851How to get special keys to work2007-05-18T04:49:05Z<p>Wyrfel: /* External Sources */</p>
<hr />
<div>==Overview==<br />
The following table gives an overview over the special keys found on ThinkPads and what is needed to make them work.<br />
{| {{prettytable}}<br />
! key !! standard function{{footnote|1}} !! tools supporting key{{footnote|2}} !! configurability{{footnote|3}} !! remarks<br />
|-<br />
| {{key|Fn}} || - || [[#xmodmap configuration|xmodmap]], [[#tpb configuration|tpb]] || full || on release without completed key combination<br />
|-<br />
| {{key|Fn}}{{key|F1}} || - || [[#ibm-acpi events|ibm-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|F2}} || lock screen || [[#ibm-acpi events|ibm-acpi]] || full || in models from T/X/Z 60 onwards<br />
|-<br />
| {{key|Fn}}{{key|F3}} || blank screen || [[#ibm-acpi events|ibm-acpi]], [[thinkpad-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|F4}} || suspend to ram || [[#ibm-acpi events|ibm-acpi]], [[thinkpad-acpi]] || full || may generate ACPI event when not enabled in the ibm-acpi hotkey mask<br />
|-<br />
| {{key|Fn}}{{key|F5}} || switch bluetooth || [[#ibm-acpi events|ibm-acpi]], [[thinkpad-acpi]] || full || in models starting from 2002<br />
|-<br />
| {{key|Fn}}{{key|F6}} || - || [[#ibm-acpi events|ibm-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|F7}} || switch display || [[#ibm-acpi events|ibm-acpi]], [[thinkpad-acpi]], [[#tpb configuration|tpb]] || additional actions || <br />
|-<br />
| {{key|Fn}}{{key|F8}} || toggle display expansion || [[#ibm-acpi events|ibm-acpi]], [[thinkpad-acpi]], [[#tpb configuration|tpb]] || additional actions ||<br />
|-<br />
| {{key|Fn}}{{key|F9}} || eject from dock || [[#ibm-acpi events|ibm-acpi]], [[thinkpad-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|F10}} || - || [[#ibm-acpi events|ibm-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|F11}} || - || [[#ibm-acpi events|ibm-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|F12}} || hibernate || [[#ibm-acpi events|ibm-acpi]], [[thinkpad-acpi]] || full || may generate ACPI event when not enabled in the ibm-acpi hotkey mask<br />
|-<br />
| {{key|Fn}}{{key|Home}} / {{key|Fn}}{{key|Pos1}} || brightness up || [[#ibm-acpi events|ibm-acpi]], [[#tpb configuration|tpb]], [[KMilo]] || additional actions ||<br />
|-<br />
| {{key|Fn}}{{key|End}} || brightness down || [[#tpb configuration|tpb]], [[KMilo]] || additional actions ||<br />
|-<br />
| {{key|Fn}}{{key|PageUp}} || toggle thinklight || [[#tpb configuration|tpb]], [[KMilo]] || additional actions ||<br />
|-<br />
| {{key|Fn}}{{key|Space}} || toggle zoom || [[#tpb configuration|tpb]], [[KMilo]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|Ins}} || - || [[#ibm-acpi events|ibm-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|Del}} || - || [[#ibm-acpi events|ibm-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|Backspace}} || - || [[#ibm-acpi events|ibm-acpi]] || full ||<br />
|-<br />
| {{key|NumLock}} || - || [[#xmodmap configuration|xmodmap]] || make working ||<br />
|-<br />
| {{key|Windows}} || - || [[#xmodmap configuration|xmodmap]] || remapping ||<br />
|-<br />
| {{ibmkey|Access IBM|#495988}} or {{ibmkey|ThinkPad|#494949}} || help application || [[#tpb configuration|tpb]], [[KMilo]] || full ||<br />
|-<br />
| {{ibmkey|Home|#494949}} || open web browser || [[#xmodmap configuration|xmodmap]], [[#tpb configuration|tpb]], [[KMilo]] || full || only {{A30}}, {{A30p}}, {{A31}}, {{A31p}} and ext. keyboards<br />
|-<br />
| {{ibmkey|Search|#494949}} || open search application || [[#xmodmap configuration|xmodmap]], [[#tpb configuration|tpb]], [[KMilo]] || full || only {{A30}}, {{A30p}}, {{A31}}, {{A31p}} and ext. keyboards<br />
|-<br />
| {{ibmkey|Mail|#494949}} || open mail application || [[#xmodmap configuration|xmodmap]], [[#tpb configuration|tpb]], [[KMilo]] || full || only {{A30}}, {{A30p}}, {{A31}}, {{A31p}} and ext. keyboards<br />
|-<br />
| {{ibmkey|Favorites|#494949}} || open favorites || [[#xmodmap configuration|xmodmap]], [[#tpb configuration|tpb]] || full || only {{A30}}, {{A30p}}, {{A31}}, {{A31p}} and ext. keyboards<br />
|-<br />
| {{ibmkey|Reload|#494949}} || reload web page || [[#xmodmap configuration|xmodmap]], [[#tpb configuration|tpb]] || full || only {{A30}}, {{A30p}}, {{A31}}, {{A31p}} and ext. keyboards<br />
|-<br />
| {{ibmkey|Abort|#494949}} || abort loading page || [[#xmodmap configuration|xmodmap]], [[#tpb configuration|tpb]] || full || only {{A30}}, {{A30p}}, {{A31}}, {{A31p}} and ext. keyboards<br />
|-<br />
| {{ibmkey|Backward|#494949}} || previous page || [[#xmodmap configuration|xmodmap]], [[#tpb configuration|tpb]] || full || ext. keyboards and ThinkPads starting from 2002<br />
|-<br />
| {{ibmkey|Forward|#494949}} || next page || [[#xmodmap configuration|xmodmap]], [[#tpb configuration|tpb]] || full || ext. keyboards and ThinkPads starting from 2002<br />
|-<br />
| {{ibmkey|Volume up|#494949}} || volume up || [[#tpb configuration|tpb]], [[KMilo]] || additional actions ||<br />
|-<br />
| {{ibmkey|Volume down|#494949}} || volume down || [[#tpb configuration|tpb]], [[KMilo]] || additional actions ||<br />
|-<br />
| {{ibmkey|Volume mute|#494949}} || mute volume || [[#tpb configuration|tpb]], [[KMilo]] || additional actions ||<br />
|-<br />
| {{ibmkey|Play/Pause|#494949}} || start/pause playback || [[#xmodmap configuration|xmodmap]] || full || {{X60s}} (Fn+Arrow Down)<br />
|-<br />
| {{ibmkey|Stop|#494949}} || stop playback || [[#xmodmap configuration|xmodmap]] || full || {{X60s}} (Fn+Arrow Up)<br />
|-<br />
| {{ibmkey|Next|#494949}} || play next || [[#xmodmap configuration|xmodmap]] || full || {{X60s}} (Fn+Arrow Right)<br />
|-<br />
| {{ibmkey|Previous|#494949}} || play previous || [[#xmodmap configuration|xmodmap]] || full || {{X60s}} (Fn+Arrow Left)<br />
|-<br />
| {{ibmkey|Power|#494949}} || shutdown || [[#ibm-acpi events|ibm-acpi]] || full || triggered on pressing 3secs, but notebook goes off on 5sec press<br />
|-<br />
| Display lid || blank screen || [[#ibm-acpi events|ibm-acpi]] || full ||<br />
|-<br />
| Ultrabay lid || announce ultrabay change || [[#ibm-acpi events|ibm-acpi]] || full ||<br />
|-<br />
| Dock eject || eject from dock || [[#ibm-acpi events|ibm-acpi]] || full ||<br />
|-<br />
| {{ibmkey|Tablet power|#494949}} || shutdown || [[#ibm-acpi events|ibm-acpi]] || full || triggered on pressing 3secs, but notebook goes off on 5sec press<br />
|-<br />
| {{ibmkey|Tablet orientation|#494949}} || rotates screen || [[#Mapping keys with setkeycodes|setkeycodes]] || full ||<br />
|-<br />
| {{ibmkey|Tablet shortcut|#494949}} || shortcut menu || [[#Mapping keys with setkeycodes|setkeycodes]] || full ||<br />
|-<br />
| {{ibmkey|Tablet Esc|#494949}} || esc key || [[#Mapping keys with setkeycodes|setkeycodes]] || full ||<br />
|-<br />
| {{ibmkey|Tablet Enter|#494949}} || enter key || [[#mapping keys with setkeycodes|setkeycodes]] || full ||<br />
|-<br />
| {{ibmkey|Tablet Up|#494949}} || up key || [[#Mapping keys with setkeycodes|setkeycodes]] || full ||<br />
|-<br />
| {{ibmkey|Tablet Down|#494949}} || down key || [[#Mapping keys with setkeycodes|setkeycodes]] || full ||<br />
|-<br />
| {{ibmkey|Tablet (unlabeled)|#494949}} || down key || [[#Mapping keys with setkeycodes|setkeycodes]] || full ||<br />
|}<br />
<br />
==Triggering key events==<br />
===ibm-acpi events===<br />
Some of the following events require a {{cmdroot|echo enable,0xffff >/proc/acpi/ibm/hotkey}} in order to make acpi able to get information on them. These events can be used to [[How to configure acpid|configure acpid]].<br />
<br />
{| {{prettytable}}<br />
|+ events triggered by [[ibm-acpi]] for {{path|/etc/acpi/events}} files. <br />
! key !! event<br />
|-<br />
| {{key|Fn}}{{key|F1}} || ibm/hotkey HKEY 00000080 00001001<br />
|-<br />
| {{key|Fn}}{{key|F2}} || ibm/hotkey HKEY 00000080 00001002<br />
|-<br />
| {{key|Fn}}{{key|F3}} || ibm/hotkey HKEY 00000080 00001003<br />
|-<br />
| {{key|Fn}}{{key|F4}} || ibm/hotkey HKEY 00000080 00001004<br />
|-<br />
| {{key|Fn}}{{key|F5}} || ibm/hotkey HKEY 00000080 00001005<br />
|-<br />
| {{key|Fn}}{{key|F6}} || ibm/hotkey HKEY 00000080 00001006<br />
|-<br />
| {{key|Fn}}{{key|F7}} || ibm/hotkey HKEY 00000080 00001007<br />
|-<br />
| {{key|Fn}}{{key|F8}} || ibm/hotkey HKEY 00000080 00001008<br />
|-<br />
| {{key|Fn}}{{key|F9}} || ibm/hotkey HKEY 00000080 00001009<br />
|-<br />
| {{key|Fn}}{{key|F10}} || ibm/hotkey HKEY 00000080 0000100a<br />
|-<br />
| {{key|Fn}}{{key|F11}} || ibm/hotkey HKEY 00000080 0000100b<br />
|-<br />
| {{key|Fn}}{{key|F12}} || ibm/hotkey HKEY 00000080 0000100c<br />
|-<br />
| {{key|Fn}}{{key|Backspace}} || ibm/hotkey HKEY 00000080 0000100d<br />
|-<br />
| {{key|Fn}}{{key|Ins}} || ibm/hotkey HKEY 00000080 0000100e<br />
|-<br />
| {{key|Fn}}{{key|Del}} || ibm/hotkey HKEY 00000080 0000100f<br />
|-<br />
| {{key|Fn}}{{key|Home}}/{{key|Fn}}{{key|Pos1}} || ibm/hotkey HKEY 00000080 00001010<br />
|-<br />
| {{ibmkey|Power|#494949}} || button/power PWRF 00000080 xxxxxxxx<br />
|-<br />
| Display lid || button/lid LID 00000080 xxxxxxxx<br />
|-<br />
| Ultrabay eject || ibm/bay MSTR 00000003 00000000<br />
|-<br />
| Ultrabay inserted || ibm/bay MSTR 00000001 00000000<br />
|-<br />
| Dock eject || ibm/dock GDCK 00000003 00000001<br />
|-<br />
| Wireless switch || ibm/hotkey HKEY 00000080 00007000<br />
|}<br />
<br />
By disassembling and editing the DSDT, more events can be added. HKEY events are triggered by calls to the MKHQ function, e.g. <tt>\_SB.PCI0.LPC.EC.HKEY.MHKQ(0×1007)</tt> will trigger "ibm/hotkey HKEY 00000080 00001007". Most of these can be found in <tt>_Qxx</tt> methods within the DSDT, which are executed on embedded controller events, e.g. _Q10 is triggered by pressing Fn-F7. You can add a call to MKHQ into an existing <tt>_Qxx</tt> method to get it recognized by ibm-acpi as well as creating new <tt>_Qxx</tt> methods, which if you're lucky will correspond to an EC event that IBM never used (e.g. A 770 will send Fn-Home/End/PgUp/PgDn to ibm-acpi if hacked in this fashion). For example, [http://www.wormnet.eu/ibm-g40/morebuttons.dsl this is a modified block of DSDT for a G40].<br />
<br />
=== Pure ACPI events ===<br />
<br />
A few keys can generate ACPI events of their own on certain ThinkPads, as long as they are masked off in the ibm-acpi hotkey's mask (or the hotkey feature is disabled in ibm-acpi).<br />
<br />
If you want the ThinkPad's BIOS and ACPI methods to know about these keys being pressed, you probably want to leave them masked out from ibm-acpi, and use their non-HKEY events listed below, instead.<br />
<br />
{| {{prettytable}}<br />
|+ events triggered by ACPI when hotkey is masked out or disabled. <br />
! key !! event<br />
|-<br />
| {{key|Fn}}{{key|F4}} || button/sleep SLPB 00000080 00000001<br />
|-<br />
| {{key|Fn}}{{key|F12}} || ibm/hotkey HKEY 00000080 0000100c<br />
|}<br />
<br />
===tpb configuration===<br />
{| {{prettytable}}<br />
|+ configuration keywords for [[tpb]] (to put in {{path|/etc/tpbrc}})<br />
! key !! config keyword<br />
|-<br />
| {{ibmkey|Access IBM|#495988}} or {{ibmkey|ThinkPad|#494949}} || THINKPAD<br />
|-<br />
| {{ibmkey|Home|#494949}} || HOME<br />
|-<br />
| {{ibmkey|Search|#494949}} || SEARCH<br />
|-<br />
| {{ibmkey|Mail|#494949}} || MAIL<br />
|-<br />
| {{ibmkey|Favorites|#494949}} || FAVORITES<br />
|-<br />
| {{ibmkey|Reload|#494949}} || RELOAD<br />
|-<br />
| {{ibmkey|Abort|#494949}} || ABORT<br />
|-<br />
| {{ibmkey|Backward|#494949}} || BACKWARD<br />
|-<br />
| {{ibmkey|Forward|#494949}} || FORWARD<br />
|-<br />
| {{key|Fn}} || FN<br />
|-<br />
| {{key|Fn}}{{key|Space}} || CALLBACK (zoom on/off)<br />
|-<br />
| {{key|Fn}}{{key|PageUp}} || CALLBACK (thinklight on/off)<br />
|-<br />
| {{key|Fn}}{{key|F7}} || CALLBACK (display lcd/crt/both)<br />
|-<br />
| {{key|Fn}}{{key|F8}} || CALLBACK (expand on/off)<br />
|-<br />
| {{key|Fn}}{{key|Home}} / {{key|Fn}}{{key|Pos1}} || CALLBACK (brightness <percent>)<br />
|-<br />
| {{key|Fn}}{{key|End}} || CALLBACK (brightness <percent>)<br />
|-<br />
| {{ibmkey|Volume up|#494949}} || CALLBACK (volume <percent>)<br />
|-<br />
| {{ibmkey|Volume down|#494949}} || CALLBACK (volume <percent>)<br />
|-<br />
| {{ibmkey|Volume mute|#494949}} || CALLBACK (mute on/off)<br />
|}<br />
<br />
To all parameter keywords should be assigned the full path to the executables supposed to be started on key press.<br />
The exectable provided for the CALLBACK keyword should take the parameters given in parentheses and act according to them.<br />
If you want to use xmodmap for the HOME, SEARCH, MAIL, FAVORITES, RELOAD, ABORT, BACKWARD, FORWARD and FN keys you should<br />
provide a <tt>XEVENTS OFF</tt> in your {{path|/etc/tpbrc}}. <br />
You can use an appropriate executable to [[How to inject fake keystrokes|inject fake keystrokes]].<br />
<br />
For Debian users, tpb is started from {{path|/etc/X11/Xsession.d/90tpb}}.<br />
<br />
'''Sound Button configuration'''<br />
<br />
''Note: Tested on T60p with Ubuntu 6.06 LTS''<br />
<br />
Most Thinkpads have a hardware sound mixer, thus the volumes buttons should work without configuration. However, this change is not reflected in the software mixer. tpb has a switch to enable software mixer support via OSS. The manual recommends this only for devices without a hardware mixer, but it also works for other hadware mixer enabled devices, even with the ALSA system. Just put MIXER ON in your {{path|/etc/tpbrc}} file and you can see the effect immediately in any ALSA mixer (e.g. kmix). For this to work you need write permissions to {{path|/dev/nvram}}.<br />
<br />
''Note: Tested on X21 with Ubuntu 6.06 LTS''<br />
<br />
On the ThinkPad X21 (and maybe some other older models) ACPI causes problems with tpb. On an X21 using acpi the volume buttons would work occasionally, and the OSD for tpb functions would rarely work. If a volume buttons was pressed too often, sometimes the computer would enter a low power (unplugged state) and would require a reboot. The solution is to use APM instead of ACPI. Instructions can be found in [[How_to_make_APM_work]].<br />
<br />
===KMilo configuration===<br />
The programs to be executed by [[KMilo]] are configured via the KDE Control Center (<tt>kcontrol</tt>), under <tt>System Administration --> IBM Thinkpad Laptop</tt>. Note that you can use appropriate commands to [[How to inject fake keystrokes|inject fake keystrokes]].<br />
<br />
===xmodmap configuration===<br />
xmodmap enables you to edit the modifier map and keymap tables that are used to translate keycodes into keysyms.<br />
Understood? Well, basically it allows you to give the X server a dictionary for the translation of keycodes like "97" into more human readable synonyms like "Home". This way xmodmap allows you to make the special keys of your keyboard known to X applications.<br />
<br />
To discover the keycode that a certain keypress produces, use the tool {{cmduser|xev}} <br />
<br />
Usually you should write your keycode-keysym associations into the file {{path|~/.Xmodmap}}. This file is usually read by the X session startup scripts of your system, so that the mappings automatically get included everytime you run the X server.<br />
<br />
The {{path|~/.Xmodmap}} lines for our purpose are in the form of<br />
keycode <keycode> = <keysym><br />
<br />
Load the assocation using the command<br />
<br />
{{cmduser|xmodmap ~/.Xmodmap}} <br />
<br />
(some configurations do this automatically upon X startup). <br />
<br />
The following table shows the keycodes generated by the ThinkPad special keys and sensible keysyms to assign them to.<br />
{| {{prettytable}}<br />
|+ keycodes and recommended keysyms<br />
! key !! keycode !! keysym<br />
|-<br />
| {{ibmkey|Access IBM|#495988}} or {{ibmkey|ThinkPad|#494949}} || 159 || XF86LaunchA<br />
|-<br />
| {{ibmkey|Backward|#494949}} || 234 || XF86Back or F19<br />
|-<br />
| {{ibmkey|Forward|#494949}} || 233 || XF86Forward or F20<br />
|-<br />
| {{ibmkey|Play/Pause|#494949}} || 162 || XF86AudioPlay<br />
|-<br />
| {{ibmkey|Stop|#494949}} || 164 || XF86AudioStop<br />
|-<br />
| {{ibmkey|Next|#494949}} || 153 || XF86AudioNext<br />
|-<br />
| {{ibmkey|Previous|#494949}} || 144 || XF86AudioPrev<br />
|-<br />
<br />
<br />
| {{ibmkey|Home|#494949}} || 178 || XF86HomePage<br />
|-<br />
| {{ibmkey|Search|#494949}} || 229 || XF86Search<br />
|-<br />
| {{ibmkey|Mail|#494949}} || 236 || XF86Mail<br />
|-<br />
| {{ibmkey|Favorites|#494949}} || 230 || XF86AddFavorite or XF86Favorites<br />
|-<br />
| {{ibmkey|Reload|#494949}} || 231 || XF86Reload<br />
|-<br />
| {{ibmkey|Abort|#494949}} || 232 || XF86Stop<br />
|-<br />
| {{key|Fn}} || 227 || F35<br />
|}<br />
<br />
Note: You can also using xkeycaps(a tool graphically display and edit the X keyboard mapping) to generate proper .Xmodmap.<br />
<br />
Note: if you are running [[tpb]] you might need to add the line <tt>XEVENTS=off</tt> into your tpbrc to stop it from grabbing the key events and allow them to get through to X instead. See [[http://www.thinkwiki.org/wiki/Tpb]] for more detailed instruction on how to use tpb and xmodmap.<br />
<br />
Note: XF86Forward and XF86Back do not work correctly in Firefox. You may want to map them to F19 and F20 instead if you use Firefox.<br />
<br />
=====Enabling the Windows and Menu Keys=====<br />
On some systems the Windows and Menu keys may not be recognized. You can enable then by<br />
making the following changes:<br />
<br />
keycode 115 = F13<br />
keycode 227 = F35<br />
<br />
F13 and F35 are used for the Windows and and Menu keys respectively. Labelling keycpode 227 as "Menu" may conflict with the right-mouse-click event.<br />
<br />
=====Using Caps Lock as Super L (Windows key)=====<br />
You can easily use Caps Lock as Win key by adding the following in your ~/.Xmodmap:<br />
! No Caps Lock<br />
clear lock<br />
! Caps Lock as Win key<br />
add mod4 = Caps_Lock<br />
=====NumLock=====<br />
On the ThinkPad {{600}}, {{T20}}, {{T21}}, {{T22}}, {{T30}}, {{X20}}, {{X21}}, {{X31}}, {{T43}}, {{R51}}, {{R52}} and possibly other models, X does not recognize the keycode for {{key|NumLk}} = {{key|Shift}}+{{key|ScrLk}}. To fix this, add the following to {{path|~/.Xmodmap}} in your home directory or {{path|/etc/X11/Xmodmap}} and run <tt>xmodmap</tt>, ex: <tt>xmodmap ~/.Xmodmap</tt>:<br />
keycode 77 = Num_Lock<br />
<br />
===Mapping keys with setkeycodes===<br />
You can use the setkeycodes command to remap certain keys. I.e. you can use {{cmdroot|setkeycodes 6e 109 6d 104 69 28 6b 1}} to map the Tablets Up and Down keys to the standard PageUp and PageDown keys and Tablet Escape and Enter to their respective keys.<br />
<br />
The following table shows the keycodes generated by the ThinkPad keys.<br />
{| {{prettytable}}<br />
|+ keycodes<br />
! key !! keycode<br />
|-<br />
| {{ibmkey|Tablet orientation|#494949}} || 0x6d<br />
|-<br />
| {{ibmkey|Tablet Shortcut|#494949}} || 0x6e<br />
|-<br />
| {{ibmkey|Tablet Esc|#494949}} || 0x6b<br />
|-<br />
| {{ibmkey|Tablet Enter|#494949}} || 0x69<br />
|-<br />
| {{ibmkey|Tablet Up|#494949}} || 0x68<br />
|-<br />
| {{ibmkey|Tablet Down|#494949}} || 0x6c<br />
|-<br />
| {{ibmkey|Tablet (unlabeled)|#494949}} || 0x67<br />
|}<br />
<br />
==Example Applications==<br />
===Web Browsers===<br />
====Firefox====<br />
To have firefox make use of the browser keys you need to modify one of its files{{footnote|4}}.<br />
To do this you will first need to extract it from the {{path|browser.jar}} archive. Do...<br />
<br />
:{{cmdroot|cd <firefox-directory>/chrome}}<br /><br />
:{{cmdroot|unzip browser.jar}}<br />
<br />
The file of interest is {{path|content/browser/browser.xul}}. Edit it {and don't forget to make a backup copy first}...<br />
:{{cmdroot|vi content/browser/browser.xul}}<br />
<br />
Look for the '''<keyset id="mainKeyset">''' section and add the following lines within...<br />
<key id="goBackKb" keycode="VK_F19" command="Browser:Back" /><br />
<key id="goForwardKb" keycode="VK_F20" command="Browser:Forward" /><br />
<br />
The Command you need for Next Tab <br />
<key id="goBackTabKb" keycode="VK_F19" oncommand="gBrowser.mTabContainer.advanceSelectedTab(-1)" /><br />
For the Previous Tab <br />
<key id="goForwardTabKb" keycode="VK_F20" oncommand="gBrowser.mTabContainer.advanceSelectedTab(1)" /><br />
<br />
Now save the file and repackage the {{path|browser.jar}} archive...<br />
:{{cmdroot|zip -rD0 browser.jar content/browser/}}<br />
<br />
That's it.<br />
<br />
{{HINT|For Firefox 2.0, just edit <firefox-directory>/chrome/browser/content/browser/browser.xul}}<br />
<br />
{{HINT|Another interesting Page on Firefox is http://dqd.com/~mayoff/notes/thinkpad/dqdnavkeys/ It uses different key mappings (F19 resp. F20) but a ready [http://dqd.com/~mayoff/notes/thinkpad/dqdnavkeys/dqdnavkeys-1.2.xpi .xpi] is provided which is pretty comfortable. However, this xpi file does not install on Firefox 1.5.}}<br />
<br />
{{HINT|You can also use the [http://extensionroom.mozdev.org/more-info/keyconfig keyconfig] extension to configure custom keys. This extension works with Firefox 1.5. The Command you need for Next Tab is gBrowser.mTabContainer.advanceSelectedTab(1,true); For Previous Tab its gBrowser.mTabContainer.advanceSelectedTab(-1,true); }}.<br />
<br />
====Konqueror====<br />
KDE allows you set key mappings for KDE applications (Go to KMenu > System > Control Center > Regional & Accessibility > Keyboard Shortcuts). By default (at least in KDE 3.5), XF86Back and XF86Forward are set as alternatives to Alt-Left and Alt-Right, and are mapped to KDE Back and Forward navigation actions. <br />
<br />
If you use Konqueror as your only browser, you only need to set up {{path|~/.Xmodmap}} as described [[#xmodmap configuration|above]] to assign ThinkPad back/forward keys to the symbols XF86Back/XF86Forward. This also make these keys work for other KDE applications such as Quanta Plus, KPackage and so on (not all KDE applications honor this setting, e.g. KDE help system doesn't).<br />
<br />
If you want to use Firefox, however, the above settings do not work. You will have to map ThinkPad back/forward keys to F19/F20 as described [[#Firefox|above]], and change KDE navigation key settings to use F19/F20 instead of the default.<br />
<br />
====Opera====<br />
However this isn't a simple configration file, you can set your browser manually.<br /><br />
Go to <i>Tool > Settings > Mouse and keyboard > Keyboard settings > Edit > Browser Window</i>. There add F19 - Back and F20 - Forward. Now you can surf using your TP keys ;-)<br />
<br />
===Window Managers===<br />
====fvwm====<br />
To get the {{ibmkey|Forward|#494949}} and {{ibmkey|Backward|#494949}} keys to cycle through pages in the virtual desktop, add this to your {{path|~/.fvwmrc}}:<br />
Key XF86Back A A Scroll -100000 0<br />
Key XF86Forward A A Scroll +100000 0<br />
If you use multiple virtual desktops, you could instead use the keys to flip between them by using GotoDesk.<br />
<br />
====fluxbox====<br />
To get the keys to cycle through pages in the virtual desktop, add this to your {{path|~/.fluxbox/keys}}:<br />
None F19 :PrevWorkspace<br />
None F20 :NextWorkspace<br />
<br />
====pekwm configuration====<br />
You can make the two browser keys switch workspaces in pekwm, by adding the following two lines to the {{path|~/.pekwm/keys}} file:<br />
KeyPress = "Mod1 XF86Back" { Actions = "GoToWorkspace prev" }<br />
KeyPress = "Mod1 XF86Forward" { Actions = "GoToWorkspace next" }<br />
<br />
====pwm====<br />
Another example how to use these two keys to switch between pwm tabs. These two lines should be added to {{path|~/.pwm/keys-default.conf}} or {{path|/etc/pwm/keys-default.conf}}:<br />
kbind "Back", "switch_rot", -1<br />
kbind "Forward", "switch_rot", 1<br />
<br />
====icewm====<br />
Some applications use {{key|Ctrl}}{{key|Left}} and {{key|Ctrl}}{{key|Right}} to set the cursor to the beginning of the previous / next word. In icewm, though, they're bound to previous / next workspace. Change these two options in {{path|~/.icewm/preferences}} to bind those to {{ibmkey|Forward|#494949}} and {{ibmkey|Backward|#494949}}: (Provided you assigned keysyms F19 and F20 with xmodmap)<br />
# "Previous workspace" shortcut<br />
KeySysWorkspacePrev="F19"<br />
# "Next workspace" shortcut<br />
KeySysWorkspaceNext="F20"<br />
<br />
===Other Uses===<br />
====Console tools configuraton====<br />
To make the {{ibmkey|Forward|#494949}} and {{ibmkey|Backward|#494949}} keys useful in console, add this to your keymap ({{path|/etc/console/boottime.kmap.gz}} in {{Debian}}):<br />
keycode 158 = Decr_Console<br />
keycode 159 = Incr_Console<br />
<br />
Alternatively you can load this script (perhaps on system startup) to enable Backward/Forward button console (VT) switch:<br />
<br />
#!/bin/sh<br />
setkeycodes e06a 126 e069 127<br />
echo keycode 126 = Decr_Console | loadkeys<br />
echo keycode 127 = Incr_Console | loadkeys<br />
<br />
It should work with any distro.<br />
<br />
==External Sources==<br />
*[http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-51537 IBMs page on configuring the ThinkPad buttons (ThinkPad, Access IBM, Mail, Search, and Home buttons) under Linux]<br />
*[http://dqd.com/~mayoff/notes/thinkpad/dqdnavkeys/ Rob Mayoffs page on using IBM Keyboard Navigation Keys in Linux Mozilla and Firefox]<br />
*[http://snarfed.org/space/thinkpad+keys+in+firefox Ryan Barretts blog article about using the browser keys in Firefox]<br />
<br />
{{footnotes|<br />
#Note that the associated functionality for Fn-F* key combinations is not consistent amongst all ThinkPads. We are maintaining [[Default meanings of special keys|a table of associated meanings]].<br />
#if there are more than one tool listed, one is sufficient<br />
#'full' means you can completely reassign any action to be triggered by the key, 'additional actions' means you can trigger actions in addition to the standard function of the key, which can not be changed.<br />
#Thanks go to Ryan Barrett for writing the [http://snarfed.org/space/thinkpad+keys+in+firefox little howto] on [http://snarfed.org/space/start his blog].<br />
}}</div>Wyrfelhttps://www.thinkwiki.org/w/index.php?title=How_to_get_special_keys_to_work&diff=29850How to get special keys to work2007-05-18T04:48:24Z<p>Wyrfel: /* External Sources */</p>
<hr />
<div>==Overview==<br />
The following table gives an overview over the special keys found on ThinkPads and what is needed to make them work.<br />
{| {{prettytable}}<br />
! key !! standard function{{footnote|1}} !! tools supporting key{{footnote|2}} !! configurability{{footnote|3}} !! remarks<br />
|-<br />
| {{key|Fn}} || - || [[#xmodmap configuration|xmodmap]], [[#tpb configuration|tpb]] || full || on release without completed key combination<br />
|-<br />
| {{key|Fn}}{{key|F1}} || - || [[#ibm-acpi events|ibm-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|F2}} || lock screen || [[#ibm-acpi events|ibm-acpi]] || full || in models from T/X/Z 60 onwards<br />
|-<br />
| {{key|Fn}}{{key|F3}} || blank screen || [[#ibm-acpi events|ibm-acpi]], [[thinkpad-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|F4}} || suspend to ram || [[#ibm-acpi events|ibm-acpi]], [[thinkpad-acpi]] || full || may generate ACPI event when not enabled in the ibm-acpi hotkey mask<br />
|-<br />
| {{key|Fn}}{{key|F5}} || switch bluetooth || [[#ibm-acpi events|ibm-acpi]], [[thinkpad-acpi]] || full || in models starting from 2002<br />
|-<br />
| {{key|Fn}}{{key|F6}} || - || [[#ibm-acpi events|ibm-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|F7}} || switch display || [[#ibm-acpi events|ibm-acpi]], [[thinkpad-acpi]], [[#tpb configuration|tpb]] || additional actions || <br />
|-<br />
| {{key|Fn}}{{key|F8}} || toggle display expansion || [[#ibm-acpi events|ibm-acpi]], [[thinkpad-acpi]], [[#tpb configuration|tpb]] || additional actions ||<br />
|-<br />
| {{key|Fn}}{{key|F9}} || eject from dock || [[#ibm-acpi events|ibm-acpi]], [[thinkpad-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|F10}} || - || [[#ibm-acpi events|ibm-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|F11}} || - || [[#ibm-acpi events|ibm-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|F12}} || hibernate || [[#ibm-acpi events|ibm-acpi]], [[thinkpad-acpi]] || full || may generate ACPI event when not enabled in the ibm-acpi hotkey mask<br />
|-<br />
| {{key|Fn}}{{key|Home}} / {{key|Fn}}{{key|Pos1}} || brightness up || [[#ibm-acpi events|ibm-acpi]], [[#tpb configuration|tpb]], [[KMilo]] || additional actions ||<br />
|-<br />
| {{key|Fn}}{{key|End}} || brightness down || [[#tpb configuration|tpb]], [[KMilo]] || additional actions ||<br />
|-<br />
| {{key|Fn}}{{key|PageUp}} || toggle thinklight || [[#tpb configuration|tpb]], [[KMilo]] || additional actions ||<br />
|-<br />
| {{key|Fn}}{{key|Space}} || toggle zoom || [[#tpb configuration|tpb]], [[KMilo]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|Ins}} || - || [[#ibm-acpi events|ibm-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|Del}} || - || [[#ibm-acpi events|ibm-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|Backspace}} || - || [[#ibm-acpi events|ibm-acpi]] || full ||<br />
|-<br />
| {{key|NumLock}} || - || [[#xmodmap configuration|xmodmap]] || make working ||<br />
|-<br />
| {{key|Windows}} || - || [[#xmodmap configuration|xmodmap]] || remapping ||<br />
|-<br />
| {{ibmkey|Access IBM|#495988}} or {{ibmkey|ThinkPad|#494949}} || help application || [[#tpb configuration|tpb]], [[KMilo]] || full ||<br />
|-<br />
| {{ibmkey|Home|#494949}} || open web browser || [[#xmodmap configuration|xmodmap]], [[#tpb configuration|tpb]], [[KMilo]] || full || only {{A30}}, {{A30p}}, {{A31}}, {{A31p}} and ext. keyboards<br />
|-<br />
| {{ibmkey|Search|#494949}} || open search application || [[#xmodmap configuration|xmodmap]], [[#tpb configuration|tpb]], [[KMilo]] || full || only {{A30}}, {{A30p}}, {{A31}}, {{A31p}} and ext. keyboards<br />
|-<br />
| {{ibmkey|Mail|#494949}} || open mail application || [[#xmodmap configuration|xmodmap]], [[#tpb configuration|tpb]], [[KMilo]] || full || only {{A30}}, {{A30p}}, {{A31}}, {{A31p}} and ext. keyboards<br />
|-<br />
| {{ibmkey|Favorites|#494949}} || open favorites || [[#xmodmap configuration|xmodmap]], [[#tpb configuration|tpb]] || full || only {{A30}}, {{A30p}}, {{A31}}, {{A31p}} and ext. keyboards<br />
|-<br />
| {{ibmkey|Reload|#494949}} || reload web page || [[#xmodmap configuration|xmodmap]], [[#tpb configuration|tpb]] || full || only {{A30}}, {{A30p}}, {{A31}}, {{A31p}} and ext. keyboards<br />
|-<br />
| {{ibmkey|Abort|#494949}} || abort loading page || [[#xmodmap configuration|xmodmap]], [[#tpb configuration|tpb]] || full || only {{A30}}, {{A30p}}, {{A31}}, {{A31p}} and ext. keyboards<br />
|-<br />
| {{ibmkey|Backward|#494949}} || previous page || [[#xmodmap configuration|xmodmap]], [[#tpb configuration|tpb]] || full || ext. keyboards and ThinkPads starting from 2002<br />
|-<br />
| {{ibmkey|Forward|#494949}} || next page || [[#xmodmap configuration|xmodmap]], [[#tpb configuration|tpb]] || full || ext. keyboards and ThinkPads starting from 2002<br />
|-<br />
| {{ibmkey|Volume up|#494949}} || volume up || [[#tpb configuration|tpb]], [[KMilo]] || additional actions ||<br />
|-<br />
| {{ibmkey|Volume down|#494949}} || volume down || [[#tpb configuration|tpb]], [[KMilo]] || additional actions ||<br />
|-<br />
| {{ibmkey|Volume mute|#494949}} || mute volume || [[#tpb configuration|tpb]], [[KMilo]] || additional actions ||<br />
|-<br />
| {{ibmkey|Play/Pause|#494949}} || start/pause playback || [[#xmodmap configuration|xmodmap]] || full || {{X60s}} (Fn+Arrow Down)<br />
|-<br />
| {{ibmkey|Stop|#494949}} || stop playback || [[#xmodmap configuration|xmodmap]] || full || {{X60s}} (Fn+Arrow Up)<br />
|-<br />
| {{ibmkey|Next|#494949}} || play next || [[#xmodmap configuration|xmodmap]] || full || {{X60s}} (Fn+Arrow Right)<br />
|-<br />
| {{ibmkey|Previous|#494949}} || play previous || [[#xmodmap configuration|xmodmap]] || full || {{X60s}} (Fn+Arrow Left)<br />
|-<br />
| {{ibmkey|Power|#494949}} || shutdown || [[#ibm-acpi events|ibm-acpi]] || full || triggered on pressing 3secs, but notebook goes off on 5sec press<br />
|-<br />
| Display lid || blank screen || [[#ibm-acpi events|ibm-acpi]] || full ||<br />
|-<br />
| Ultrabay lid || announce ultrabay change || [[#ibm-acpi events|ibm-acpi]] || full ||<br />
|-<br />
| Dock eject || eject from dock || [[#ibm-acpi events|ibm-acpi]] || full ||<br />
|-<br />
| {{ibmkey|Tablet power|#494949}} || shutdown || [[#ibm-acpi events|ibm-acpi]] || full || triggered on pressing 3secs, but notebook goes off on 5sec press<br />
|-<br />
| {{ibmkey|Tablet orientation|#494949}} || rotates screen || [[#Mapping keys with setkeycodes|setkeycodes]] || full ||<br />
|-<br />
| {{ibmkey|Tablet shortcut|#494949}} || shortcut menu || [[#Mapping keys with setkeycodes|setkeycodes]] || full ||<br />
|-<br />
| {{ibmkey|Tablet Esc|#494949}} || esc key || [[#Mapping keys with setkeycodes|setkeycodes]] || full ||<br />
|-<br />
| {{ibmkey|Tablet Enter|#494949}} || enter key || [[#mapping keys with setkeycodes|setkeycodes]] || full ||<br />
|-<br />
| {{ibmkey|Tablet Up|#494949}} || up key || [[#Mapping keys with setkeycodes|setkeycodes]] || full ||<br />
|-<br />
| {{ibmkey|Tablet Down|#494949}} || down key || [[#Mapping keys with setkeycodes|setkeycodes]] || full ||<br />
|-<br />
| {{ibmkey|Tablet (unlabeled)|#494949}} || down key || [[#Mapping keys with setkeycodes|setkeycodes]] || full ||<br />
|}<br />
<br />
==Triggering key events==<br />
===ibm-acpi events===<br />
Some of the following events require a {{cmdroot|echo enable,0xffff >/proc/acpi/ibm/hotkey}} in order to make acpi able to get information on them. These events can be used to [[How to configure acpid|configure acpid]].<br />
<br />
{| {{prettytable}}<br />
|+ events triggered by [[ibm-acpi]] for {{path|/etc/acpi/events}} files. <br />
! key !! event<br />
|-<br />
| {{key|Fn}}{{key|F1}} || ibm/hotkey HKEY 00000080 00001001<br />
|-<br />
| {{key|Fn}}{{key|F2}} || ibm/hotkey HKEY 00000080 00001002<br />
|-<br />
| {{key|Fn}}{{key|F3}} || ibm/hotkey HKEY 00000080 00001003<br />
|-<br />
| {{key|Fn}}{{key|F4}} || ibm/hotkey HKEY 00000080 00001004<br />
|-<br />
| {{key|Fn}}{{key|F5}} || ibm/hotkey HKEY 00000080 00001005<br />
|-<br />
| {{key|Fn}}{{key|F6}} || ibm/hotkey HKEY 00000080 00001006<br />
|-<br />
| {{key|Fn}}{{key|F7}} || ibm/hotkey HKEY 00000080 00001007<br />
|-<br />
| {{key|Fn}}{{key|F8}} || ibm/hotkey HKEY 00000080 00001008<br />
|-<br />
| {{key|Fn}}{{key|F9}} || ibm/hotkey HKEY 00000080 00001009<br />
|-<br />
| {{key|Fn}}{{key|F10}} || ibm/hotkey HKEY 00000080 0000100a<br />
|-<br />
| {{key|Fn}}{{key|F11}} || ibm/hotkey HKEY 00000080 0000100b<br />
|-<br />
| {{key|Fn}}{{key|F12}} || ibm/hotkey HKEY 00000080 0000100c<br />
|-<br />
| {{key|Fn}}{{key|Backspace}} || ibm/hotkey HKEY 00000080 0000100d<br />
|-<br />
| {{key|Fn}}{{key|Ins}} || ibm/hotkey HKEY 00000080 0000100e<br />
|-<br />
| {{key|Fn}}{{key|Del}} || ibm/hotkey HKEY 00000080 0000100f<br />
|-<br />
| {{key|Fn}}{{key|Home}}/{{key|Fn}}{{key|Pos1}} || ibm/hotkey HKEY 00000080 00001010<br />
|-<br />
| {{ibmkey|Power|#494949}} || button/power PWRF 00000080 xxxxxxxx<br />
|-<br />
| Display lid || button/lid LID 00000080 xxxxxxxx<br />
|-<br />
| Ultrabay eject || ibm/bay MSTR 00000003 00000000<br />
|-<br />
| Ultrabay inserted || ibm/bay MSTR 00000001 00000000<br />
|-<br />
| Dock eject || ibm/dock GDCK 00000003 00000001<br />
|-<br />
| Wireless switch || ibm/hotkey HKEY 00000080 00007000<br />
|}<br />
<br />
By disassembling and editing the DSDT, more events can be added. HKEY events are triggered by calls to the MKHQ function, e.g. <tt>\_SB.PCI0.LPC.EC.HKEY.MHKQ(0×1007)</tt> will trigger "ibm/hotkey HKEY 00000080 00001007". Most of these can be found in <tt>_Qxx</tt> methods within the DSDT, which are executed on embedded controller events, e.g. _Q10 is triggered by pressing Fn-F7. You can add a call to MKHQ into an existing <tt>_Qxx</tt> method to get it recognized by ibm-acpi as well as creating new <tt>_Qxx</tt> methods, which if you're lucky will correspond to an EC event that IBM never used (e.g. A 770 will send Fn-Home/End/PgUp/PgDn to ibm-acpi if hacked in this fashion). For example, [http://www.wormnet.eu/ibm-g40/morebuttons.dsl this is a modified block of DSDT for a G40].<br />
<br />
=== Pure ACPI events ===<br />
<br />
A few keys can generate ACPI events of their own on certain ThinkPads, as long as they are masked off in the ibm-acpi hotkey's mask (or the hotkey feature is disabled in ibm-acpi).<br />
<br />
If you want the ThinkPad's BIOS and ACPI methods to know about these keys being pressed, you probably want to leave them masked out from ibm-acpi, and use their non-HKEY events listed below, instead.<br />
<br />
{| {{prettytable}}<br />
|+ events triggered by ACPI when hotkey is masked out or disabled. <br />
! key !! event<br />
|-<br />
| {{key|Fn}}{{key|F4}} || button/sleep SLPB 00000080 00000001<br />
|-<br />
| {{key|Fn}}{{key|F12}} || ibm/hotkey HKEY 00000080 0000100c<br />
|}<br />
<br />
===tpb configuration===<br />
{| {{prettytable}}<br />
|+ configuration keywords for [[tpb]] (to put in {{path|/etc/tpbrc}})<br />
! key !! config keyword<br />
|-<br />
| {{ibmkey|Access IBM|#495988}} or {{ibmkey|ThinkPad|#494949}} || THINKPAD<br />
|-<br />
| {{ibmkey|Home|#494949}} || HOME<br />
|-<br />
| {{ibmkey|Search|#494949}} || SEARCH<br />
|-<br />
| {{ibmkey|Mail|#494949}} || MAIL<br />
|-<br />
| {{ibmkey|Favorites|#494949}} || FAVORITES<br />
|-<br />
| {{ibmkey|Reload|#494949}} || RELOAD<br />
|-<br />
| {{ibmkey|Abort|#494949}} || ABORT<br />
|-<br />
| {{ibmkey|Backward|#494949}} || BACKWARD<br />
|-<br />
| {{ibmkey|Forward|#494949}} || FORWARD<br />
|-<br />
| {{key|Fn}} || FN<br />
|-<br />
| {{key|Fn}}{{key|Space}} || CALLBACK (zoom on/off)<br />
|-<br />
| {{key|Fn}}{{key|PageUp}} || CALLBACK (thinklight on/off)<br />
|-<br />
| {{key|Fn}}{{key|F7}} || CALLBACK (display lcd/crt/both)<br />
|-<br />
| {{key|Fn}}{{key|F8}} || CALLBACK (expand on/off)<br />
|-<br />
| {{key|Fn}}{{key|Home}} / {{key|Fn}}{{key|Pos1}} || CALLBACK (brightness <percent>)<br />
|-<br />
| {{key|Fn}}{{key|End}} || CALLBACK (brightness <percent>)<br />
|-<br />
| {{ibmkey|Volume up|#494949}} || CALLBACK (volume <percent>)<br />
|-<br />
| {{ibmkey|Volume down|#494949}} || CALLBACK (volume <percent>)<br />
|-<br />
| {{ibmkey|Volume mute|#494949}} || CALLBACK (mute on/off)<br />
|}<br />
<br />
To all parameter keywords should be assigned the full path to the executables supposed to be started on key press.<br />
The exectable provided for the CALLBACK keyword should take the parameters given in parentheses and act according to them.<br />
If you want to use xmodmap for the HOME, SEARCH, MAIL, FAVORITES, RELOAD, ABORT, BACKWARD, FORWARD and FN keys you should<br />
provide a <tt>XEVENTS OFF</tt> in your {{path|/etc/tpbrc}}. <br />
You can use an appropriate executable to [[How to inject fake keystrokes|inject fake keystrokes]].<br />
<br />
For Debian users, tpb is started from {{path|/etc/X11/Xsession.d/90tpb}}.<br />
<br />
'''Sound Button configuration'''<br />
<br />
''Note: Tested on T60p with Ubuntu 6.06 LTS''<br />
<br />
Most Thinkpads have a hardware sound mixer, thus the volumes buttons should work without configuration. However, this change is not reflected in the software mixer. tpb has a switch to enable software mixer support via OSS. The manual recommends this only for devices without a hardware mixer, but it also works for other hadware mixer enabled devices, even with the ALSA system. Just put MIXER ON in your {{path|/etc/tpbrc}} file and you can see the effect immediately in any ALSA mixer (e.g. kmix). For this to work you need write permissions to {{path|/dev/nvram}}.<br />
<br />
''Note: Tested on X21 with Ubuntu 6.06 LTS''<br />
<br />
On the ThinkPad X21 (and maybe some other older models) ACPI causes problems with tpb. On an X21 using acpi the volume buttons would work occasionally, and the OSD for tpb functions would rarely work. If a volume buttons was pressed too often, sometimes the computer would enter a low power (unplugged state) and would require a reboot. The solution is to use APM instead of ACPI. Instructions can be found in [[How_to_make_APM_work]].<br />
<br />
===KMilo configuration===<br />
The programs to be executed by [[KMilo]] are configured via the KDE Control Center (<tt>kcontrol</tt>), under <tt>System Administration --> IBM Thinkpad Laptop</tt>. Note that you can use appropriate commands to [[How to inject fake keystrokes|inject fake keystrokes]].<br />
<br />
===xmodmap configuration===<br />
xmodmap enables you to edit the modifier map and keymap tables that are used to translate keycodes into keysyms.<br />
Understood? Well, basically it allows you to give the X server a dictionary for the translation of keycodes like "97" into more human readable synonyms like "Home". This way xmodmap allows you to make the special keys of your keyboard known to X applications.<br />
<br />
To discover the keycode that a certain keypress produces, use the tool {{cmduser|xev}} <br />
<br />
Usually you should write your keycode-keysym associations into the file {{path|~/.Xmodmap}}. This file is usually read by the X session startup scripts of your system, so that the mappings automatically get included everytime you run the X server.<br />
<br />
The {{path|~/.Xmodmap}} lines for our purpose are in the form of<br />
keycode <keycode> = <keysym><br />
<br />
Load the assocation using the command<br />
<br />
{{cmduser|xmodmap ~/.Xmodmap}} <br />
<br />
(some configurations do this automatically upon X startup). <br />
<br />
The following table shows the keycodes generated by the ThinkPad special keys and sensible keysyms to assign them to.<br />
{| {{prettytable}}<br />
|+ keycodes and recommended keysyms<br />
! key !! keycode !! keysym<br />
|-<br />
| {{ibmkey|Access IBM|#495988}} or {{ibmkey|ThinkPad|#494949}} || 159 || XF86LaunchA<br />
|-<br />
| {{ibmkey|Backward|#494949}} || 234 || XF86Back or F19<br />
|-<br />
| {{ibmkey|Forward|#494949}} || 233 || XF86Forward or F20<br />
|-<br />
| {{ibmkey|Play/Pause|#494949}} || 162 || XF86AudioPlay<br />
|-<br />
| {{ibmkey|Stop|#494949}} || 164 || XF86AudioStop<br />
|-<br />
| {{ibmkey|Next|#494949}} || 153 || XF86AudioNext<br />
|-<br />
| {{ibmkey|Previous|#494949}} || 144 || XF86AudioPrev<br />
|-<br />
<br />
<br />
| {{ibmkey|Home|#494949}} || 178 || XF86HomePage<br />
|-<br />
| {{ibmkey|Search|#494949}} || 229 || XF86Search<br />
|-<br />
| {{ibmkey|Mail|#494949}} || 236 || XF86Mail<br />
|-<br />
| {{ibmkey|Favorites|#494949}} || 230 || XF86AddFavorite or XF86Favorites<br />
|-<br />
| {{ibmkey|Reload|#494949}} || 231 || XF86Reload<br />
|-<br />
| {{ibmkey|Abort|#494949}} || 232 || XF86Stop<br />
|-<br />
| {{key|Fn}} || 227 || F35<br />
|}<br />
<br />
Note: You can also using xkeycaps(a tool graphically display and edit the X keyboard mapping) to generate proper .Xmodmap.<br />
<br />
Note: if you are running [[tpb]] you might need to add the line <tt>XEVENTS=off</tt> into your tpbrc to stop it from grabbing the key events and allow them to get through to X instead. See [[http://www.thinkwiki.org/wiki/Tpb]] for more detailed instruction on how to use tpb and xmodmap.<br />
<br />
Note: XF86Forward and XF86Back do not work correctly in Firefox. You may want to map them to F19 and F20 instead if you use Firefox.<br />
<br />
=====Enabling the Windows and Menu Keys=====<br />
On some systems the Windows and Menu keys may not be recognized. You can enable then by<br />
making the following changes:<br />
<br />
keycode 115 = F13<br />
keycode 227 = F35<br />
<br />
F13 and F35 are used for the Windows and and Menu keys respectively. Labelling keycpode 227 as "Menu" may conflict with the right-mouse-click event.<br />
<br />
=====Using Caps Lock as Super L (Windows key)=====<br />
You can easily use Caps Lock as Win key by adding the following in your ~/.Xmodmap:<br />
! No Caps Lock<br />
clear lock<br />
! Caps Lock as Win key<br />
add mod4 = Caps_Lock<br />
=====NumLock=====<br />
On the ThinkPad {{600}}, {{T20}}, {{T21}}, {{T22}}, {{T30}}, {{X20}}, {{X21}}, {{X31}}, {{T43}}, {{R51}}, {{R52}} and possibly other models, X does not recognize the keycode for {{key|NumLk}} = {{key|Shift}}+{{key|ScrLk}}. To fix this, add the following to {{path|~/.Xmodmap}} in your home directory or {{path|/etc/X11/Xmodmap}} and run <tt>xmodmap</tt>, ex: <tt>xmodmap ~/.Xmodmap</tt>:<br />
keycode 77 = Num_Lock<br />
<br />
===Mapping keys with setkeycodes===<br />
You can use the setkeycodes command to remap certain keys. I.e. you can use {{cmdroot|setkeycodes 6e 109 6d 104 69 28 6b 1}} to map the Tablets Up and Down keys to the standard PageUp and PageDown keys and Tablet Escape and Enter to their respective keys.<br />
<br />
The following table shows the keycodes generated by the ThinkPad keys.<br />
{| {{prettytable}}<br />
|+ keycodes<br />
! key !! keycode<br />
|-<br />
| {{ibmkey|Tablet orientation|#494949}} || 0x6d<br />
|-<br />
| {{ibmkey|Tablet Shortcut|#494949}} || 0x6e<br />
|-<br />
| {{ibmkey|Tablet Esc|#494949}} || 0x6b<br />
|-<br />
| {{ibmkey|Tablet Enter|#494949}} || 0x69<br />
|-<br />
| {{ibmkey|Tablet Up|#494949}} || 0x68<br />
|-<br />
| {{ibmkey|Tablet Down|#494949}} || 0x6c<br />
|-<br />
| {{ibmkey|Tablet (unlabeled)|#494949}} || 0x67<br />
|}<br />
<br />
==Example Applications==<br />
===Web Browsers===<br />
====Firefox====<br />
To have firefox make use of the browser keys you need to modify one of its files{{footnote|4}}.<br />
To do this you will first need to extract it from the {{path|browser.jar}} archive. Do...<br />
<br />
:{{cmdroot|cd <firefox-directory>/chrome}}<br /><br />
:{{cmdroot|unzip browser.jar}}<br />
<br />
The file of interest is {{path|content/browser/browser.xul}}. Edit it {and don't forget to make a backup copy first}...<br />
:{{cmdroot|vi content/browser/browser.xul}}<br />
<br />
Look for the '''<keyset id="mainKeyset">''' section and add the following lines within...<br />
<key id="goBackKb" keycode="VK_F19" command="Browser:Back" /><br />
<key id="goForwardKb" keycode="VK_F20" command="Browser:Forward" /><br />
<br />
The Command you need for Next Tab <br />
<key id="goBackTabKb" keycode="VK_F19" oncommand="gBrowser.mTabContainer.advanceSelectedTab(-1)" /><br />
For the Previous Tab <br />
<key id="goForwardTabKb" keycode="VK_F20" oncommand="gBrowser.mTabContainer.advanceSelectedTab(1)" /><br />
<br />
Now save the file and repackage the {{path|browser.jar}} archive...<br />
:{{cmdroot|zip -rD0 browser.jar content/browser/}}<br />
<br />
That's it.<br />
<br />
{{HINT|For Firefox 2.0, just edit <firefox-directory>/chrome/browser/content/browser/browser.xul}}<br />
<br />
{{HINT|Another interesting Page on Firefox is http://dqd.com/~mayoff/notes/thinkpad/dqdnavkeys/ It uses different key mappings (F19 resp. F20) but a ready [http://dqd.com/~mayoff/notes/thinkpad/dqdnavkeys/dqdnavkeys-1.2.xpi .xpi] is provided which is pretty comfortable. However, this xpi file does not install on Firefox 1.5.}}<br />
<br />
{{HINT|You can also use the [http://extensionroom.mozdev.org/more-info/keyconfig keyconfig] extension to configure custom keys. This extension works with Firefox 1.5. The Command you need for Next Tab is gBrowser.mTabContainer.advanceSelectedTab(1,true); For Previous Tab its gBrowser.mTabContainer.advanceSelectedTab(-1,true); }}.<br />
<br />
====Konqueror====<br />
KDE allows you set key mappings for KDE applications (Go to KMenu > System > Control Center > Regional & Accessibility > Keyboard Shortcuts). By default (at least in KDE 3.5), XF86Back and XF86Forward are set as alternatives to Alt-Left and Alt-Right, and are mapped to KDE Back and Forward navigation actions. <br />
<br />
If you use Konqueror as your only browser, you only need to set up {{path|~/.Xmodmap}} as described [[#xmodmap configuration|above]] to assign ThinkPad back/forward keys to the symbols XF86Back/XF86Forward. This also make these keys work for other KDE applications such as Quanta Plus, KPackage and so on (not all KDE applications honor this setting, e.g. KDE help system doesn't).<br />
<br />
If you want to use Firefox, however, the above settings do not work. You will have to map ThinkPad back/forward keys to F19/F20 as described [[#Firefox|above]], and change KDE navigation key settings to use F19/F20 instead of the default.<br />
<br />
====Opera====<br />
However this isn't a simple configration file, you can set your browser manually.<br /><br />
Go to <i>Tool > Settings > Mouse and keyboard > Keyboard settings > Edit > Browser Window</i>. There add F19 - Back and F20 - Forward. Now you can surf using your TP keys ;-)<br />
<br />
===Window Managers===<br />
====fvwm====<br />
To get the {{ibmkey|Forward|#494949}} and {{ibmkey|Backward|#494949}} keys to cycle through pages in the virtual desktop, add this to your {{path|~/.fvwmrc}}:<br />
Key XF86Back A A Scroll -100000 0<br />
Key XF86Forward A A Scroll +100000 0<br />
If you use multiple virtual desktops, you could instead use the keys to flip between them by using GotoDesk.<br />
<br />
====fluxbox====<br />
To get the keys to cycle through pages in the virtual desktop, add this to your {{path|~/.fluxbox/keys}}:<br />
None F19 :PrevWorkspace<br />
None F20 :NextWorkspace<br />
<br />
====pekwm configuration====<br />
You can make the two browser keys switch workspaces in pekwm, by adding the following two lines to the {{path|~/.pekwm/keys}} file:<br />
KeyPress = "Mod1 XF86Back" { Actions = "GoToWorkspace prev" }<br />
KeyPress = "Mod1 XF86Forward" { Actions = "GoToWorkspace next" }<br />
<br />
====pwm====<br />
Another example how to use these two keys to switch between pwm tabs. These two lines should be added to {{path|~/.pwm/keys-default.conf}} or {{path|/etc/pwm/keys-default.conf}}:<br />
kbind "Back", "switch_rot", -1<br />
kbind "Forward", "switch_rot", 1<br />
<br />
====icewm====<br />
Some applications use {{key|Ctrl}}{{key|Left}} and {{key|Ctrl}}{{key|Right}} to set the cursor to the beginning of the previous / next word. In icewm, though, they're bound to previous / next workspace. Change these two options in {{path|~/.icewm/preferences}} to bind those to {{ibmkey|Forward|#494949}} and {{ibmkey|Backward|#494949}}: (Provided you assigned keysyms F19 and F20 with xmodmap)<br />
# "Previous workspace" shortcut<br />
KeySysWorkspacePrev="F19"<br />
# "Next workspace" shortcut<br />
KeySysWorkspaceNext="F20"<br />
<br />
===Other Uses===<br />
====Console tools configuraton====<br />
To make the {{ibmkey|Forward|#494949}} and {{ibmkey|Backward|#494949}} keys useful in console, add this to your keymap ({{path|/etc/console/boottime.kmap.gz}} in {{Debian}}):<br />
keycode 158 = Decr_Console<br />
keycode 159 = Incr_Console<br />
<br />
Alternatively you can load this script (perhaps on system startup) to enable Backward/Forward button console (VT) switch:<br />
<br />
#!/bin/sh<br />
setkeycodes e06a 126 e069 127<br />
echo keycode 126 = Decr_Console | loadkeys<br />
echo keycode 127 = Incr_Console | loadkeys<br />
<br />
It should work with any distro.<br />
<br />
==External Sources==<br />
*[http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-51537 IBMs page on configuring the ThinkPad buttons (ThinkPad, Access IBM, Mail, Search, and Home buttons) under Linux]<br />
*[http://dqd.com/~mayoff/notes/thinkpad/dqdnavkeys/ Rob Mayoffs page on using IBM Keyboard Navigation Keys in Linux Mozilla and Firefox]<br />
*[http://snarfed.org/space/thinkpad+keys+in+firefox Ryan Barretts blog article about using the browser keys in Firefox]<br />
<br />
{{footnotes|<br />
#Note that the associated functionality for {{key|Fn}}{{key|F*}} key combinations is not consistent amongst all ThinkPads. We are maintaining [[Default meanings of special keys|a table of associated meanings]].<br />
#if there are more than one tool listed, one is sufficient<br />
#'full' means you can completely reassign any action to be triggered by the key, 'additional actions' means you can trigger actions in addition to the standard function of the key, which can not be changed.<br />
#Thanks go to Ryan Barrett for writing the [http://snarfed.org/space/thinkpad+keys+in+firefox little howto] on [http://snarfed.org/space/start his blog].<br />
}}</div>Wyrfelhttps://www.thinkwiki.org/w/index.php?title=How_to_get_special_keys_to_work&diff=29849How to get special keys to work2007-05-18T04:43:23Z<p>Wyrfel: /* Firefox */</p>
<hr />
<div>==Overview==<br />
The following table gives an overview over the special keys found on ThinkPads and what is needed to make them work.<br />
{| {{prettytable}}<br />
! key !! standard function{{footnote|1}} !! tools supporting key{{footnote|2}} !! configurability{{footnote|3}} !! remarks<br />
|-<br />
| {{key|Fn}} || - || [[#xmodmap configuration|xmodmap]], [[#tpb configuration|tpb]] || full || on release without completed key combination<br />
|-<br />
| {{key|Fn}}{{key|F1}} || - || [[#ibm-acpi events|ibm-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|F2}} || lock screen || [[#ibm-acpi events|ibm-acpi]] || full || in models from T/X/Z 60 onwards<br />
|-<br />
| {{key|Fn}}{{key|F3}} || blank screen || [[#ibm-acpi events|ibm-acpi]], [[thinkpad-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|F4}} || suspend to ram || [[#ibm-acpi events|ibm-acpi]], [[thinkpad-acpi]] || full || may generate ACPI event when not enabled in the ibm-acpi hotkey mask<br />
|-<br />
| {{key|Fn}}{{key|F5}} || switch bluetooth || [[#ibm-acpi events|ibm-acpi]], [[thinkpad-acpi]] || full || in models starting from 2002<br />
|-<br />
| {{key|Fn}}{{key|F6}} || - || [[#ibm-acpi events|ibm-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|F7}} || switch display || [[#ibm-acpi events|ibm-acpi]], [[thinkpad-acpi]], [[#tpb configuration|tpb]] || additional actions || <br />
|-<br />
| {{key|Fn}}{{key|F8}} || toggle display expansion || [[#ibm-acpi events|ibm-acpi]], [[thinkpad-acpi]], [[#tpb configuration|tpb]] || additional actions ||<br />
|-<br />
| {{key|Fn}}{{key|F9}} || eject from dock || [[#ibm-acpi events|ibm-acpi]], [[thinkpad-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|F10}} || - || [[#ibm-acpi events|ibm-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|F11}} || - || [[#ibm-acpi events|ibm-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|F12}} || hibernate || [[#ibm-acpi events|ibm-acpi]], [[thinkpad-acpi]] || full || may generate ACPI event when not enabled in the ibm-acpi hotkey mask<br />
|-<br />
| {{key|Fn}}{{key|Home}} / {{key|Fn}}{{key|Pos1}} || brightness up || [[#ibm-acpi events|ibm-acpi]], [[#tpb configuration|tpb]], [[KMilo]] || additional actions ||<br />
|-<br />
| {{key|Fn}}{{key|End}} || brightness down || [[#tpb configuration|tpb]], [[KMilo]] || additional actions ||<br />
|-<br />
| {{key|Fn}}{{key|PageUp}} || toggle thinklight || [[#tpb configuration|tpb]], [[KMilo]] || additional actions ||<br />
|-<br />
| {{key|Fn}}{{key|Space}} || toggle zoom || [[#tpb configuration|tpb]], [[KMilo]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|Ins}} || - || [[#ibm-acpi events|ibm-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|Del}} || - || [[#ibm-acpi events|ibm-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|Backspace}} || - || [[#ibm-acpi events|ibm-acpi]] || full ||<br />
|-<br />
| {{key|NumLock}} || - || [[#xmodmap configuration|xmodmap]] || make working ||<br />
|-<br />
| {{key|Windows}} || - || [[#xmodmap configuration|xmodmap]] || remapping ||<br />
|-<br />
| {{ibmkey|Access IBM|#495988}} or {{ibmkey|ThinkPad|#494949}} || help application || [[#tpb configuration|tpb]], [[KMilo]] || full ||<br />
|-<br />
| {{ibmkey|Home|#494949}} || open web browser || [[#xmodmap configuration|xmodmap]], [[#tpb configuration|tpb]], [[KMilo]] || full || only {{A30}}, {{A30p}}, {{A31}}, {{A31p}} and ext. keyboards<br />
|-<br />
| {{ibmkey|Search|#494949}} || open search application || [[#xmodmap configuration|xmodmap]], [[#tpb configuration|tpb]], [[KMilo]] || full || only {{A30}}, {{A30p}}, {{A31}}, {{A31p}} and ext. keyboards<br />
|-<br />
| {{ibmkey|Mail|#494949}} || open mail application || [[#xmodmap configuration|xmodmap]], [[#tpb configuration|tpb]], [[KMilo]] || full || only {{A30}}, {{A30p}}, {{A31}}, {{A31p}} and ext. keyboards<br />
|-<br />
| {{ibmkey|Favorites|#494949}} || open favorites || [[#xmodmap configuration|xmodmap]], [[#tpb configuration|tpb]] || full || only {{A30}}, {{A30p}}, {{A31}}, {{A31p}} and ext. keyboards<br />
|-<br />
| {{ibmkey|Reload|#494949}} || reload web page || [[#xmodmap configuration|xmodmap]], [[#tpb configuration|tpb]] || full || only {{A30}}, {{A30p}}, {{A31}}, {{A31p}} and ext. keyboards<br />
|-<br />
| {{ibmkey|Abort|#494949}} || abort loading page || [[#xmodmap configuration|xmodmap]], [[#tpb configuration|tpb]] || full || only {{A30}}, {{A30p}}, {{A31}}, {{A31p}} and ext. keyboards<br />
|-<br />
| {{ibmkey|Backward|#494949}} || previous page || [[#xmodmap configuration|xmodmap]], [[#tpb configuration|tpb]] || full || ext. keyboards and ThinkPads starting from 2002<br />
|-<br />
| {{ibmkey|Forward|#494949}} || next page || [[#xmodmap configuration|xmodmap]], [[#tpb configuration|tpb]] || full || ext. keyboards and ThinkPads starting from 2002<br />
|-<br />
| {{ibmkey|Volume up|#494949}} || volume up || [[#tpb configuration|tpb]], [[KMilo]] || additional actions ||<br />
|-<br />
| {{ibmkey|Volume down|#494949}} || volume down || [[#tpb configuration|tpb]], [[KMilo]] || additional actions ||<br />
|-<br />
| {{ibmkey|Volume mute|#494949}} || mute volume || [[#tpb configuration|tpb]], [[KMilo]] || additional actions ||<br />
|-<br />
| {{ibmkey|Play/Pause|#494949}} || start/pause playback || [[#xmodmap configuration|xmodmap]] || full || {{X60s}} (Fn+Arrow Down)<br />
|-<br />
| {{ibmkey|Stop|#494949}} || stop playback || [[#xmodmap configuration|xmodmap]] || full || {{X60s}} (Fn+Arrow Up)<br />
|-<br />
| {{ibmkey|Next|#494949}} || play next || [[#xmodmap configuration|xmodmap]] || full || {{X60s}} (Fn+Arrow Right)<br />
|-<br />
| {{ibmkey|Previous|#494949}} || play previous || [[#xmodmap configuration|xmodmap]] || full || {{X60s}} (Fn+Arrow Left)<br />
|-<br />
| {{ibmkey|Power|#494949}} || shutdown || [[#ibm-acpi events|ibm-acpi]] || full || triggered on pressing 3secs, but notebook goes off on 5sec press<br />
|-<br />
| Display lid || blank screen || [[#ibm-acpi events|ibm-acpi]] || full ||<br />
|-<br />
| Ultrabay lid || announce ultrabay change || [[#ibm-acpi events|ibm-acpi]] || full ||<br />
|-<br />
| Dock eject || eject from dock || [[#ibm-acpi events|ibm-acpi]] || full ||<br />
|-<br />
| {{ibmkey|Tablet power|#494949}} || shutdown || [[#ibm-acpi events|ibm-acpi]] || full || triggered on pressing 3secs, but notebook goes off on 5sec press<br />
|-<br />
| {{ibmkey|Tablet orientation|#494949}} || rotates screen || [[#Mapping keys with setkeycodes|setkeycodes]] || full ||<br />
|-<br />
| {{ibmkey|Tablet shortcut|#494949}} || shortcut menu || [[#Mapping keys with setkeycodes|setkeycodes]] || full ||<br />
|-<br />
| {{ibmkey|Tablet Esc|#494949}} || esc key || [[#Mapping keys with setkeycodes|setkeycodes]] || full ||<br />
|-<br />
| {{ibmkey|Tablet Enter|#494949}} || enter key || [[#mapping keys with setkeycodes|setkeycodes]] || full ||<br />
|-<br />
| {{ibmkey|Tablet Up|#494949}} || up key || [[#Mapping keys with setkeycodes|setkeycodes]] || full ||<br />
|-<br />
| {{ibmkey|Tablet Down|#494949}} || down key || [[#Mapping keys with setkeycodes|setkeycodes]] || full ||<br />
|-<br />
| {{ibmkey|Tablet (unlabeled)|#494949}} || down key || [[#Mapping keys with setkeycodes|setkeycodes]] || full ||<br />
|}<br />
<br />
==Triggering key events==<br />
===ibm-acpi events===<br />
Some of the following events require a {{cmdroot|echo enable,0xffff >/proc/acpi/ibm/hotkey}} in order to make acpi able to get information on them. These events can be used to [[How to configure acpid|configure acpid]].<br />
<br />
{| {{prettytable}}<br />
|+ events triggered by [[ibm-acpi]] for {{path|/etc/acpi/events}} files. <br />
! key !! event<br />
|-<br />
| {{key|Fn}}{{key|F1}} || ibm/hotkey HKEY 00000080 00001001<br />
|-<br />
| {{key|Fn}}{{key|F2}} || ibm/hotkey HKEY 00000080 00001002<br />
|-<br />
| {{key|Fn}}{{key|F3}} || ibm/hotkey HKEY 00000080 00001003<br />
|-<br />
| {{key|Fn}}{{key|F4}} || ibm/hotkey HKEY 00000080 00001004<br />
|-<br />
| {{key|Fn}}{{key|F5}} || ibm/hotkey HKEY 00000080 00001005<br />
|-<br />
| {{key|Fn}}{{key|F6}} || ibm/hotkey HKEY 00000080 00001006<br />
|-<br />
| {{key|Fn}}{{key|F7}} || ibm/hotkey HKEY 00000080 00001007<br />
|-<br />
| {{key|Fn}}{{key|F8}} || ibm/hotkey HKEY 00000080 00001008<br />
|-<br />
| {{key|Fn}}{{key|F9}} || ibm/hotkey HKEY 00000080 00001009<br />
|-<br />
| {{key|Fn}}{{key|F10}} || ibm/hotkey HKEY 00000080 0000100a<br />
|-<br />
| {{key|Fn}}{{key|F11}} || ibm/hotkey HKEY 00000080 0000100b<br />
|-<br />
| {{key|Fn}}{{key|F12}} || ibm/hotkey HKEY 00000080 0000100c<br />
|-<br />
| {{key|Fn}}{{key|Backspace}} || ibm/hotkey HKEY 00000080 0000100d<br />
|-<br />
| {{key|Fn}}{{key|Ins}} || ibm/hotkey HKEY 00000080 0000100e<br />
|-<br />
| {{key|Fn}}{{key|Del}} || ibm/hotkey HKEY 00000080 0000100f<br />
|-<br />
| {{key|Fn}}{{key|Home}}/{{key|Fn}}{{key|Pos1}} || ibm/hotkey HKEY 00000080 00001010<br />
|-<br />
| {{ibmkey|Power|#494949}} || button/power PWRF 00000080 xxxxxxxx<br />
|-<br />
| Display lid || button/lid LID 00000080 xxxxxxxx<br />
|-<br />
| Ultrabay eject || ibm/bay MSTR 00000003 00000000<br />
|-<br />
| Ultrabay inserted || ibm/bay MSTR 00000001 00000000<br />
|-<br />
| Dock eject || ibm/dock GDCK 00000003 00000001<br />
|-<br />
| Wireless switch || ibm/hotkey HKEY 00000080 00007000<br />
|}<br />
<br />
By disassembling and editing the DSDT, more events can be added. HKEY events are triggered by calls to the MKHQ function, e.g. <tt>\_SB.PCI0.LPC.EC.HKEY.MHKQ(0×1007)</tt> will trigger "ibm/hotkey HKEY 00000080 00001007". Most of these can be found in <tt>_Qxx</tt> methods within the DSDT, which are executed on embedded controller events, e.g. _Q10 is triggered by pressing Fn-F7. You can add a call to MKHQ into an existing <tt>_Qxx</tt> method to get it recognized by ibm-acpi as well as creating new <tt>_Qxx</tt> methods, which if you're lucky will correspond to an EC event that IBM never used (e.g. A 770 will send Fn-Home/End/PgUp/PgDn to ibm-acpi if hacked in this fashion). For example, [http://www.wormnet.eu/ibm-g40/morebuttons.dsl this is a modified block of DSDT for a G40].<br />
<br />
=== Pure ACPI events ===<br />
<br />
A few keys can generate ACPI events of their own on certain ThinkPads, as long as they are masked off in the ibm-acpi hotkey's mask (or the hotkey feature is disabled in ibm-acpi).<br />
<br />
If you want the ThinkPad's BIOS and ACPI methods to know about these keys being pressed, you probably want to leave them masked out from ibm-acpi, and use their non-HKEY events listed below, instead.<br />
<br />
{| {{prettytable}}<br />
|+ events triggered by ACPI when hotkey is masked out or disabled. <br />
! key !! event<br />
|-<br />
| {{key|Fn}}{{key|F4}} || button/sleep SLPB 00000080 00000001<br />
|-<br />
| {{key|Fn}}{{key|F12}} || ibm/hotkey HKEY 00000080 0000100c<br />
|}<br />
<br />
===tpb configuration===<br />
{| {{prettytable}}<br />
|+ configuration keywords for [[tpb]] (to put in {{path|/etc/tpbrc}})<br />
! key !! config keyword<br />
|-<br />
| {{ibmkey|Access IBM|#495988}} or {{ibmkey|ThinkPad|#494949}} || THINKPAD<br />
|-<br />
| {{ibmkey|Home|#494949}} || HOME<br />
|-<br />
| {{ibmkey|Search|#494949}} || SEARCH<br />
|-<br />
| {{ibmkey|Mail|#494949}} || MAIL<br />
|-<br />
| {{ibmkey|Favorites|#494949}} || FAVORITES<br />
|-<br />
| {{ibmkey|Reload|#494949}} || RELOAD<br />
|-<br />
| {{ibmkey|Abort|#494949}} || ABORT<br />
|-<br />
| {{ibmkey|Backward|#494949}} || BACKWARD<br />
|-<br />
| {{ibmkey|Forward|#494949}} || FORWARD<br />
|-<br />
| {{key|Fn}} || FN<br />
|-<br />
| {{key|Fn}}{{key|Space}} || CALLBACK (zoom on/off)<br />
|-<br />
| {{key|Fn}}{{key|PageUp}} || CALLBACK (thinklight on/off)<br />
|-<br />
| {{key|Fn}}{{key|F7}} || CALLBACK (display lcd/crt/both)<br />
|-<br />
| {{key|Fn}}{{key|F8}} || CALLBACK (expand on/off)<br />
|-<br />
| {{key|Fn}}{{key|Home}} / {{key|Fn}}{{key|Pos1}} || CALLBACK (brightness <percent>)<br />
|-<br />
| {{key|Fn}}{{key|End}} || CALLBACK (brightness <percent>)<br />
|-<br />
| {{ibmkey|Volume up|#494949}} || CALLBACK (volume <percent>)<br />
|-<br />
| {{ibmkey|Volume down|#494949}} || CALLBACK (volume <percent>)<br />
|-<br />
| {{ibmkey|Volume mute|#494949}} || CALLBACK (mute on/off)<br />
|}<br />
<br />
To all parameter keywords should be assigned the full path to the executables supposed to be started on key press.<br />
The exectable provided for the CALLBACK keyword should take the parameters given in parentheses and act according to them.<br />
If you want to use xmodmap for the HOME, SEARCH, MAIL, FAVORITES, RELOAD, ABORT, BACKWARD, FORWARD and FN keys you should<br />
provide a <tt>XEVENTS OFF</tt> in your {{path|/etc/tpbrc}}. <br />
You can use an appropriate executable to [[How to inject fake keystrokes|inject fake keystrokes]].<br />
<br />
For Debian users, tpb is started from {{path|/etc/X11/Xsession.d/90tpb}}.<br />
<br />
'''Sound Button configuration'''<br />
<br />
''Note: Tested on T60p with Ubuntu 6.06 LTS''<br />
<br />
Most Thinkpads have a hardware sound mixer, thus the volumes buttons should work without configuration. However, this change is not reflected in the software mixer. tpb has a switch to enable software mixer support via OSS. The manual recommends this only for devices without a hardware mixer, but it also works for other hadware mixer enabled devices, even with the ALSA system. Just put MIXER ON in your {{path|/etc/tpbrc}} file and you can see the effect immediately in any ALSA mixer (e.g. kmix). For this to work you need write permissions to {{path|/dev/nvram}}.<br />
<br />
''Note: Tested on X21 with Ubuntu 6.06 LTS''<br />
<br />
On the ThinkPad X21 (and maybe some other older models) ACPI causes problems with tpb. On an X21 using acpi the volume buttons would work occasionally, and the OSD for tpb functions would rarely work. If a volume buttons was pressed too often, sometimes the computer would enter a low power (unplugged state) and would require a reboot. The solution is to use APM instead of ACPI. Instructions can be found in [[How_to_make_APM_work]].<br />
<br />
===KMilo configuration===<br />
The programs to be executed by [[KMilo]] are configured via the KDE Control Center (<tt>kcontrol</tt>), under <tt>System Administration --> IBM Thinkpad Laptop</tt>. Note that you can use appropriate commands to [[How to inject fake keystrokes|inject fake keystrokes]].<br />
<br />
===xmodmap configuration===<br />
xmodmap enables you to edit the modifier map and keymap tables that are used to translate keycodes into keysyms.<br />
Understood? Well, basically it allows you to give the X server a dictionary for the translation of keycodes like "97" into more human readable synonyms like "Home". This way xmodmap allows you to make the special keys of your keyboard known to X applications.<br />
<br />
To discover the keycode that a certain keypress produces, use the tool {{cmduser|xev}} <br />
<br />
Usually you should write your keycode-keysym associations into the file {{path|~/.Xmodmap}}. This file is usually read by the X session startup scripts of your system, so that the mappings automatically get included everytime you run the X server.<br />
<br />
The {{path|~/.Xmodmap}} lines for our purpose are in the form of<br />
keycode <keycode> = <keysym><br />
<br />
Load the assocation using the command<br />
<br />
{{cmduser|xmodmap ~/.Xmodmap}} <br />
<br />
(some configurations do this automatically upon X startup). <br />
<br />
The following table shows the keycodes generated by the ThinkPad special keys and sensible keysyms to assign them to.<br />
{| {{prettytable}}<br />
|+ keycodes and recommended keysyms<br />
! key !! keycode !! keysym<br />
|-<br />
| {{ibmkey|Access IBM|#495988}} or {{ibmkey|ThinkPad|#494949}} || 159 || XF86LaunchA<br />
|-<br />
| {{ibmkey|Backward|#494949}} || 234 || XF86Back or F19<br />
|-<br />
| {{ibmkey|Forward|#494949}} || 233 || XF86Forward or F20<br />
|-<br />
| {{ibmkey|Play/Pause|#494949}} || 162 || XF86AudioPlay<br />
|-<br />
| {{ibmkey|Stop|#494949}} || 164 || XF86AudioStop<br />
|-<br />
| {{ibmkey|Next|#494949}} || 153 || XF86AudioNext<br />
|-<br />
| {{ibmkey|Previous|#494949}} || 144 || XF86AudioPrev<br />
|-<br />
<br />
<br />
| {{ibmkey|Home|#494949}} || 178 || XF86HomePage<br />
|-<br />
| {{ibmkey|Search|#494949}} || 229 || XF86Search<br />
|-<br />
| {{ibmkey|Mail|#494949}} || 236 || XF86Mail<br />
|-<br />
| {{ibmkey|Favorites|#494949}} || 230 || XF86AddFavorite or XF86Favorites<br />
|-<br />
| {{ibmkey|Reload|#494949}} || 231 || XF86Reload<br />
|-<br />
| {{ibmkey|Abort|#494949}} || 232 || XF86Stop<br />
|-<br />
| {{key|Fn}} || 227 || F35<br />
|}<br />
<br />
Note: You can also using xkeycaps(a tool graphically display and edit the X keyboard mapping) to generate proper .Xmodmap.<br />
<br />
Note: if you are running [[tpb]] you might need to add the line <tt>XEVENTS=off</tt> into your tpbrc to stop it from grabbing the key events and allow them to get through to X instead. See [[http://www.thinkwiki.org/wiki/Tpb]] for more detailed instruction on how to use tpb and xmodmap.<br />
<br />
Note: XF86Forward and XF86Back do not work correctly in Firefox. You may want to map them to F19 and F20 instead if you use Firefox.<br />
<br />
=====Enabling the Windows and Menu Keys=====<br />
On some systems the Windows and Menu keys may not be recognized. You can enable then by<br />
making the following changes:<br />
<br />
keycode 115 = F13<br />
keycode 227 = F35<br />
<br />
F13 and F35 are used for the Windows and and Menu keys respectively. Labelling keycpode 227 as "Menu" may conflict with the right-mouse-click event.<br />
<br />
=====Using Caps Lock as Super L (Windows key)=====<br />
You can easily use Caps Lock as Win key by adding the following in your ~/.Xmodmap:<br />
! No Caps Lock<br />
clear lock<br />
! Caps Lock as Win key<br />
add mod4 = Caps_Lock<br />
=====NumLock=====<br />
On the ThinkPad {{600}}, {{T20}}, {{T21}}, {{T22}}, {{T30}}, {{X20}}, {{X21}}, {{X31}}, {{T43}}, {{R51}}, {{R52}} and possibly other models, X does not recognize the keycode for {{key|NumLk}} = {{key|Shift}}+{{key|ScrLk}}. To fix this, add the following to {{path|~/.Xmodmap}} in your home directory or {{path|/etc/X11/Xmodmap}} and run <tt>xmodmap</tt>, ex: <tt>xmodmap ~/.Xmodmap</tt>:<br />
keycode 77 = Num_Lock<br />
<br />
===Mapping keys with setkeycodes===<br />
You can use the setkeycodes command to remap certain keys. I.e. you can use {{cmdroot|setkeycodes 6e 109 6d 104 69 28 6b 1}} to map the Tablets Up and Down keys to the standard PageUp and PageDown keys and Tablet Escape and Enter to their respective keys.<br />
<br />
The following table shows the keycodes generated by the ThinkPad keys.<br />
{| {{prettytable}}<br />
|+ keycodes<br />
! key !! keycode<br />
|-<br />
| {{ibmkey|Tablet orientation|#494949}} || 0x6d<br />
|-<br />
| {{ibmkey|Tablet Shortcut|#494949}} || 0x6e<br />
|-<br />
| {{ibmkey|Tablet Esc|#494949}} || 0x6b<br />
|-<br />
| {{ibmkey|Tablet Enter|#494949}} || 0x69<br />
|-<br />
| {{ibmkey|Tablet Up|#494949}} || 0x68<br />
|-<br />
| {{ibmkey|Tablet Down|#494949}} || 0x6c<br />
|-<br />
| {{ibmkey|Tablet (unlabeled)|#494949}} || 0x67<br />
|}<br />
<br />
==Example Applications==<br />
===Web Browsers===<br />
====Firefox====<br />
To have firefox make use of the browser keys you need to modify one of its files{{footnote|4}}.<br />
To do this you will first need to extract it from the {{path|browser.jar}} archive. Do...<br />
<br />
:{{cmdroot|cd <firefox-directory>/chrome}}<br /><br />
:{{cmdroot|unzip browser.jar}}<br />
<br />
The file of interest is {{path|content/browser/browser.xul}}. Edit it {and don't forget to make a backup copy first}...<br />
:{{cmdroot|vi content/browser/browser.xul}}<br />
<br />
Look for the '''<keyset id="mainKeyset">''' section and add the following lines within...<br />
<key id="goBackKb" keycode="VK_F19" command="Browser:Back" /><br />
<key id="goForwardKb" keycode="VK_F20" command="Browser:Forward" /><br />
<br />
The Command you need for Next Tab <br />
<key id="goBackTabKb" keycode="VK_F19" oncommand="gBrowser.mTabContainer.advanceSelectedTab(-1)" /><br />
For the Previous Tab <br />
<key id="goForwardTabKb" keycode="VK_F20" oncommand="gBrowser.mTabContainer.advanceSelectedTab(1)" /><br />
<br />
Now save the file and repackage the {{path|browser.jar}} archive...<br />
:{{cmdroot|zip -rD0 browser.jar content/browser/}}<br />
<br />
That's it.<br />
<br />
{{HINT|For Firefox 2.0, just edit <firefox-directory>/chrome/browser/content/browser/browser.xul}}<br />
<br />
{{HINT|Another interesting Page on Firefox is http://dqd.com/~mayoff/notes/thinkpad/dqdnavkeys/ It uses different key mappings (F19 resp. F20) but a ready [http://dqd.com/~mayoff/notes/thinkpad/dqdnavkeys/dqdnavkeys-1.2.xpi .xpi] is provided which is pretty comfortable. However, this xpi file does not install on Firefox 1.5.}}<br />
<br />
{{HINT|You can also use the [http://extensionroom.mozdev.org/more-info/keyconfig keyconfig] extension to configure custom keys. This extension works with Firefox 1.5. The Command you need for Next Tab is gBrowser.mTabContainer.advanceSelectedTab(1,true); For Previous Tab its gBrowser.mTabContainer.advanceSelectedTab(-1,true); }}.<br />
<br />
====Konqueror====<br />
KDE allows you set key mappings for KDE applications (Go to KMenu > System > Control Center > Regional & Accessibility > Keyboard Shortcuts). By default (at least in KDE 3.5), XF86Back and XF86Forward are set as alternatives to Alt-Left and Alt-Right, and are mapped to KDE Back and Forward navigation actions. <br />
<br />
If you use Konqueror as your only browser, you only need to set up {{path|~/.Xmodmap}} as described [[#xmodmap configuration|above]] to assign ThinkPad back/forward keys to the symbols XF86Back/XF86Forward. This also make these keys work for other KDE applications such as Quanta Plus, KPackage and so on (not all KDE applications honor this setting, e.g. KDE help system doesn't).<br />
<br />
If you want to use Firefox, however, the above settings do not work. You will have to map ThinkPad back/forward keys to F19/F20 as described [[#Firefox|above]], and change KDE navigation key settings to use F19/F20 instead of the default.<br />
<br />
====Opera====<br />
However this isn't a simple configration file, you can set your browser manually.<br /><br />
Go to <i>Tool > Settings > Mouse and keyboard > Keyboard settings > Edit > Browser Window</i>. There add F19 - Back and F20 - Forward. Now you can surf using your TP keys ;-)<br />
<br />
===Window Managers===<br />
====fvwm====<br />
To get the {{ibmkey|Forward|#494949}} and {{ibmkey|Backward|#494949}} keys to cycle through pages in the virtual desktop, add this to your {{path|~/.fvwmrc}}:<br />
Key XF86Back A A Scroll -100000 0<br />
Key XF86Forward A A Scroll +100000 0<br />
If you use multiple virtual desktops, you could instead use the keys to flip between them by using GotoDesk.<br />
<br />
====fluxbox====<br />
To get the keys to cycle through pages in the virtual desktop, add this to your {{path|~/.fluxbox/keys}}:<br />
None F19 :PrevWorkspace<br />
None F20 :NextWorkspace<br />
<br />
====pekwm configuration====<br />
You can make the two browser keys switch workspaces in pekwm, by adding the following two lines to the {{path|~/.pekwm/keys}} file:<br />
KeyPress = "Mod1 XF86Back" { Actions = "GoToWorkspace prev" }<br />
KeyPress = "Mod1 XF86Forward" { Actions = "GoToWorkspace next" }<br />
<br />
====pwm====<br />
Another example how to use these two keys to switch between pwm tabs. These two lines should be added to {{path|~/.pwm/keys-default.conf}} or {{path|/etc/pwm/keys-default.conf}}:<br />
kbind "Back", "switch_rot", -1<br />
kbind "Forward", "switch_rot", 1<br />
<br />
====icewm====<br />
Some applications use {{key|Ctrl}}{{key|Left}} and {{key|Ctrl}}{{key|Right}} to set the cursor to the beginning of the previous / next word. In icewm, though, they're bound to previous / next workspace. Change these two options in {{path|~/.icewm/preferences}} to bind those to {{ibmkey|Forward|#494949}} and {{ibmkey|Backward|#494949}}: (Provided you assigned keysyms F19 and F20 with xmodmap)<br />
# "Previous workspace" shortcut<br />
KeySysWorkspacePrev="F19"<br />
# "Next workspace" shortcut<br />
KeySysWorkspaceNext="F20"<br />
<br />
===Other Uses===<br />
====Console tools configuraton====<br />
To make the {{ibmkey|Forward|#494949}} and {{ibmkey|Backward|#494949}} keys useful in console, add this to your keymap ({{path|/etc/console/boottime.kmap.gz}} in {{Debian}}):<br />
keycode 158 = Decr_Console<br />
keycode 159 = Incr_Console<br />
<br />
Alternatively you can load this script (perhaps on system startup) to enable Backward/Forward button console (VT) switch:<br />
<br />
#!/bin/sh<br />
setkeycodes e06a 126 e069 127<br />
echo keycode 126 = Decr_Console | loadkeys<br />
echo keycode 127 = Incr_Console | loadkeys<br />
<br />
It should work with any distro.<br />
<br />
==External Sources==<br />
*[http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-51537 IBMs page on configuring the ThinkPad buttons (ThinkPad, Access IBM, Mail, Search, and Home buttons) under Linux]<br />
*[http://dqd.com/~mayoff/notes/thinkpad/dqdnavkeys/ Rob Mayoffs page on using IBM Keyboard Navigation Keys in Linux Mozilla and Firefox]<br />
*[http://snarfed.org/space/thinkpad+keys+in+firefox Ryan Barretts blog article about using the browser keys in Firefox]<br />
<br />
{{footnotes|<br />
#if there are more than one tool listed, one is sufficient<br />
#'full' means you can completely reassign any action to be triggered by the key, 'additional actions' means you can trigger actions in addition to the standard function of the key, which can not be changed.<br />
#Thanks go to Ryan Barrett for writing the [http://snarfed.org/space/thinkpad+keys+in+firefox little howto] on [http://snarfed.org/space/start his blog].<br />
}}</div>Wyrfelhttps://www.thinkwiki.org/w/index.php?title=How_to_get_special_keys_to_work&diff=29848How to get special keys to work2007-05-18T04:42:38Z<p>Wyrfel: /* Overview */</p>
<hr />
<div>==Overview==<br />
The following table gives an overview over the special keys found on ThinkPads and what is needed to make them work.<br />
{| {{prettytable}}<br />
! key !! standard function{{footnote|1}} !! tools supporting key{{footnote|2}} !! configurability{{footnote|3}} !! remarks<br />
|-<br />
| {{key|Fn}} || - || [[#xmodmap configuration|xmodmap]], [[#tpb configuration|tpb]] || full || on release without completed key combination<br />
|-<br />
| {{key|Fn}}{{key|F1}} || - || [[#ibm-acpi events|ibm-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|F2}} || lock screen || [[#ibm-acpi events|ibm-acpi]] || full || in models from T/X/Z 60 onwards<br />
|-<br />
| {{key|Fn}}{{key|F3}} || blank screen || [[#ibm-acpi events|ibm-acpi]], [[thinkpad-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|F4}} || suspend to ram || [[#ibm-acpi events|ibm-acpi]], [[thinkpad-acpi]] || full || may generate ACPI event when not enabled in the ibm-acpi hotkey mask<br />
|-<br />
| {{key|Fn}}{{key|F5}} || switch bluetooth || [[#ibm-acpi events|ibm-acpi]], [[thinkpad-acpi]] || full || in models starting from 2002<br />
|-<br />
| {{key|Fn}}{{key|F6}} || - || [[#ibm-acpi events|ibm-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|F7}} || switch display || [[#ibm-acpi events|ibm-acpi]], [[thinkpad-acpi]], [[#tpb configuration|tpb]] || additional actions || <br />
|-<br />
| {{key|Fn}}{{key|F8}} || toggle display expansion || [[#ibm-acpi events|ibm-acpi]], [[thinkpad-acpi]], [[#tpb configuration|tpb]] || additional actions ||<br />
|-<br />
| {{key|Fn}}{{key|F9}} || eject from dock || [[#ibm-acpi events|ibm-acpi]], [[thinkpad-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|F10}} || - || [[#ibm-acpi events|ibm-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|F11}} || - || [[#ibm-acpi events|ibm-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|F12}} || hibernate || [[#ibm-acpi events|ibm-acpi]], [[thinkpad-acpi]] || full || may generate ACPI event when not enabled in the ibm-acpi hotkey mask<br />
|-<br />
| {{key|Fn}}{{key|Home}} / {{key|Fn}}{{key|Pos1}} || brightness up || [[#ibm-acpi events|ibm-acpi]], [[#tpb configuration|tpb]], [[KMilo]] || additional actions ||<br />
|-<br />
| {{key|Fn}}{{key|End}} || brightness down || [[#tpb configuration|tpb]], [[KMilo]] || additional actions ||<br />
|-<br />
| {{key|Fn}}{{key|PageUp}} || toggle thinklight || [[#tpb configuration|tpb]], [[KMilo]] || additional actions ||<br />
|-<br />
| {{key|Fn}}{{key|Space}} || toggle zoom || [[#tpb configuration|tpb]], [[KMilo]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|Ins}} || - || [[#ibm-acpi events|ibm-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|Del}} || - || [[#ibm-acpi events|ibm-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|Backspace}} || - || [[#ibm-acpi events|ibm-acpi]] || full ||<br />
|-<br />
| {{key|NumLock}} || - || [[#xmodmap configuration|xmodmap]] || make working ||<br />
|-<br />
| {{key|Windows}} || - || [[#xmodmap configuration|xmodmap]] || remapping ||<br />
|-<br />
| {{ibmkey|Access IBM|#495988}} or {{ibmkey|ThinkPad|#494949}} || help application || [[#tpb configuration|tpb]], [[KMilo]] || full ||<br />
|-<br />
| {{ibmkey|Home|#494949}} || open web browser || [[#xmodmap configuration|xmodmap]], [[#tpb configuration|tpb]], [[KMilo]] || full || only {{A30}}, {{A30p}}, {{A31}}, {{A31p}} and ext. keyboards<br />
|-<br />
| {{ibmkey|Search|#494949}} || open search application || [[#xmodmap configuration|xmodmap]], [[#tpb configuration|tpb]], [[KMilo]] || full || only {{A30}}, {{A30p}}, {{A31}}, {{A31p}} and ext. keyboards<br />
|-<br />
| {{ibmkey|Mail|#494949}} || open mail application || [[#xmodmap configuration|xmodmap]], [[#tpb configuration|tpb]], [[KMilo]] || full || only {{A30}}, {{A30p}}, {{A31}}, {{A31p}} and ext. keyboards<br />
|-<br />
| {{ibmkey|Favorites|#494949}} || open favorites || [[#xmodmap configuration|xmodmap]], [[#tpb configuration|tpb]] || full || only {{A30}}, {{A30p}}, {{A31}}, {{A31p}} and ext. keyboards<br />
|-<br />
| {{ibmkey|Reload|#494949}} || reload web page || [[#xmodmap configuration|xmodmap]], [[#tpb configuration|tpb]] || full || only {{A30}}, {{A30p}}, {{A31}}, {{A31p}} and ext. keyboards<br />
|-<br />
| {{ibmkey|Abort|#494949}} || abort loading page || [[#xmodmap configuration|xmodmap]], [[#tpb configuration|tpb]] || full || only {{A30}}, {{A30p}}, {{A31}}, {{A31p}} and ext. keyboards<br />
|-<br />
| {{ibmkey|Backward|#494949}} || previous page || [[#xmodmap configuration|xmodmap]], [[#tpb configuration|tpb]] || full || ext. keyboards and ThinkPads starting from 2002<br />
|-<br />
| {{ibmkey|Forward|#494949}} || next page || [[#xmodmap configuration|xmodmap]], [[#tpb configuration|tpb]] || full || ext. keyboards and ThinkPads starting from 2002<br />
|-<br />
| {{ibmkey|Volume up|#494949}} || volume up || [[#tpb configuration|tpb]], [[KMilo]] || additional actions ||<br />
|-<br />
| {{ibmkey|Volume down|#494949}} || volume down || [[#tpb configuration|tpb]], [[KMilo]] || additional actions ||<br />
|-<br />
| {{ibmkey|Volume mute|#494949}} || mute volume || [[#tpb configuration|tpb]], [[KMilo]] || additional actions ||<br />
|-<br />
| {{ibmkey|Play/Pause|#494949}} || start/pause playback || [[#xmodmap configuration|xmodmap]] || full || {{X60s}} (Fn+Arrow Down)<br />
|-<br />
| {{ibmkey|Stop|#494949}} || stop playback || [[#xmodmap configuration|xmodmap]] || full || {{X60s}} (Fn+Arrow Up)<br />
|-<br />
| {{ibmkey|Next|#494949}} || play next || [[#xmodmap configuration|xmodmap]] || full || {{X60s}} (Fn+Arrow Right)<br />
|-<br />
| {{ibmkey|Previous|#494949}} || play previous || [[#xmodmap configuration|xmodmap]] || full || {{X60s}} (Fn+Arrow Left)<br />
|-<br />
| {{ibmkey|Power|#494949}} || shutdown || [[#ibm-acpi events|ibm-acpi]] || full || triggered on pressing 3secs, but notebook goes off on 5sec press<br />
|-<br />
| Display lid || blank screen || [[#ibm-acpi events|ibm-acpi]] || full ||<br />
|-<br />
| Ultrabay lid || announce ultrabay change || [[#ibm-acpi events|ibm-acpi]] || full ||<br />
|-<br />
| Dock eject || eject from dock || [[#ibm-acpi events|ibm-acpi]] || full ||<br />
|-<br />
| {{ibmkey|Tablet power|#494949}} || shutdown || [[#ibm-acpi events|ibm-acpi]] || full || triggered on pressing 3secs, but notebook goes off on 5sec press<br />
|-<br />
| {{ibmkey|Tablet orientation|#494949}} || rotates screen || [[#Mapping keys with setkeycodes|setkeycodes]] || full ||<br />
|-<br />
| {{ibmkey|Tablet shortcut|#494949}} || shortcut menu || [[#Mapping keys with setkeycodes|setkeycodes]] || full ||<br />
|-<br />
| {{ibmkey|Tablet Esc|#494949}} || esc key || [[#Mapping keys with setkeycodes|setkeycodes]] || full ||<br />
|-<br />
| {{ibmkey|Tablet Enter|#494949}} || enter key || [[#mapping keys with setkeycodes|setkeycodes]] || full ||<br />
|-<br />
| {{ibmkey|Tablet Up|#494949}} || up key || [[#Mapping keys with setkeycodes|setkeycodes]] || full ||<br />
|-<br />
| {{ibmkey|Tablet Down|#494949}} || down key || [[#Mapping keys with setkeycodes|setkeycodes]] || full ||<br />
|-<br />
| {{ibmkey|Tablet (unlabeled)|#494949}} || down key || [[#Mapping keys with setkeycodes|setkeycodes]] || full ||<br />
|}<br />
<br />
==Triggering key events==<br />
===ibm-acpi events===<br />
Some of the following events require a {{cmdroot|echo enable,0xffff >/proc/acpi/ibm/hotkey}} in order to make acpi able to get information on them. These events can be used to [[How to configure acpid|configure acpid]].<br />
<br />
{| {{prettytable}}<br />
|+ events triggered by [[ibm-acpi]] for {{path|/etc/acpi/events}} files. <br />
! key !! event<br />
|-<br />
| {{key|Fn}}{{key|F1}} || ibm/hotkey HKEY 00000080 00001001<br />
|-<br />
| {{key|Fn}}{{key|F2}} || ibm/hotkey HKEY 00000080 00001002<br />
|-<br />
| {{key|Fn}}{{key|F3}} || ibm/hotkey HKEY 00000080 00001003<br />
|-<br />
| {{key|Fn}}{{key|F4}} || ibm/hotkey HKEY 00000080 00001004<br />
|-<br />
| {{key|Fn}}{{key|F5}} || ibm/hotkey HKEY 00000080 00001005<br />
|-<br />
| {{key|Fn}}{{key|F6}} || ibm/hotkey HKEY 00000080 00001006<br />
|-<br />
| {{key|Fn}}{{key|F7}} || ibm/hotkey HKEY 00000080 00001007<br />
|-<br />
| {{key|Fn}}{{key|F8}} || ibm/hotkey HKEY 00000080 00001008<br />
|-<br />
| {{key|Fn}}{{key|F9}} || ibm/hotkey HKEY 00000080 00001009<br />
|-<br />
| {{key|Fn}}{{key|F10}} || ibm/hotkey HKEY 00000080 0000100a<br />
|-<br />
| {{key|Fn}}{{key|F11}} || ibm/hotkey HKEY 00000080 0000100b<br />
|-<br />
| {{key|Fn}}{{key|F12}} || ibm/hotkey HKEY 00000080 0000100c<br />
|-<br />
| {{key|Fn}}{{key|Backspace}} || ibm/hotkey HKEY 00000080 0000100d<br />
|-<br />
| {{key|Fn}}{{key|Ins}} || ibm/hotkey HKEY 00000080 0000100e<br />
|-<br />
| {{key|Fn}}{{key|Del}} || ibm/hotkey HKEY 00000080 0000100f<br />
|-<br />
| {{key|Fn}}{{key|Home}}/{{key|Fn}}{{key|Pos1}} || ibm/hotkey HKEY 00000080 00001010<br />
|-<br />
| {{ibmkey|Power|#494949}} || button/power PWRF 00000080 xxxxxxxx<br />
|-<br />
| Display lid || button/lid LID 00000080 xxxxxxxx<br />
|-<br />
| Ultrabay eject || ibm/bay MSTR 00000003 00000000<br />
|-<br />
| Ultrabay inserted || ibm/bay MSTR 00000001 00000000<br />
|-<br />
| Dock eject || ibm/dock GDCK 00000003 00000001<br />
|-<br />
| Wireless switch || ibm/hotkey HKEY 00000080 00007000<br />
|}<br />
<br />
By disassembling and editing the DSDT, more events can be added. HKEY events are triggered by calls to the MKHQ function, e.g. <tt>\_SB.PCI0.LPC.EC.HKEY.MHKQ(0×1007)</tt> will trigger "ibm/hotkey HKEY 00000080 00001007". Most of these can be found in <tt>_Qxx</tt> methods within the DSDT, which are executed on embedded controller events, e.g. _Q10 is triggered by pressing Fn-F7. You can add a call to MKHQ into an existing <tt>_Qxx</tt> method to get it recognized by ibm-acpi as well as creating new <tt>_Qxx</tt> methods, which if you're lucky will correspond to an EC event that IBM never used (e.g. A 770 will send Fn-Home/End/PgUp/PgDn to ibm-acpi if hacked in this fashion). For example, [http://www.wormnet.eu/ibm-g40/morebuttons.dsl this is a modified block of DSDT for a G40].<br />
<br />
=== Pure ACPI events ===<br />
<br />
A few keys can generate ACPI events of their own on certain ThinkPads, as long as they are masked off in the ibm-acpi hotkey's mask (or the hotkey feature is disabled in ibm-acpi).<br />
<br />
If you want the ThinkPad's BIOS and ACPI methods to know about these keys being pressed, you probably want to leave them masked out from ibm-acpi, and use their non-HKEY events listed below, instead.<br />
<br />
{| {{prettytable}}<br />
|+ events triggered by ACPI when hotkey is masked out or disabled. <br />
! key !! event<br />
|-<br />
| {{key|Fn}}{{key|F4}} || button/sleep SLPB 00000080 00000001<br />
|-<br />
| {{key|Fn}}{{key|F12}} || ibm/hotkey HKEY 00000080 0000100c<br />
|}<br />
<br />
===tpb configuration===<br />
{| {{prettytable}}<br />
|+ configuration keywords for [[tpb]] (to put in {{path|/etc/tpbrc}})<br />
! key !! config keyword<br />
|-<br />
| {{ibmkey|Access IBM|#495988}} or {{ibmkey|ThinkPad|#494949}} || THINKPAD<br />
|-<br />
| {{ibmkey|Home|#494949}} || HOME<br />
|-<br />
| {{ibmkey|Search|#494949}} || SEARCH<br />
|-<br />
| {{ibmkey|Mail|#494949}} || MAIL<br />
|-<br />
| {{ibmkey|Favorites|#494949}} || FAVORITES<br />
|-<br />
| {{ibmkey|Reload|#494949}} || RELOAD<br />
|-<br />
| {{ibmkey|Abort|#494949}} || ABORT<br />
|-<br />
| {{ibmkey|Backward|#494949}} || BACKWARD<br />
|-<br />
| {{ibmkey|Forward|#494949}} || FORWARD<br />
|-<br />
| {{key|Fn}} || FN<br />
|-<br />
| {{key|Fn}}{{key|Space}} || CALLBACK (zoom on/off)<br />
|-<br />
| {{key|Fn}}{{key|PageUp}} || CALLBACK (thinklight on/off)<br />
|-<br />
| {{key|Fn}}{{key|F7}} || CALLBACK (display lcd/crt/both)<br />
|-<br />
| {{key|Fn}}{{key|F8}} || CALLBACK (expand on/off)<br />
|-<br />
| {{key|Fn}}{{key|Home}} / {{key|Fn}}{{key|Pos1}} || CALLBACK (brightness <percent>)<br />
|-<br />
| {{key|Fn}}{{key|End}} || CALLBACK (brightness <percent>)<br />
|-<br />
| {{ibmkey|Volume up|#494949}} || CALLBACK (volume <percent>)<br />
|-<br />
| {{ibmkey|Volume down|#494949}} || CALLBACK (volume <percent>)<br />
|-<br />
| {{ibmkey|Volume mute|#494949}} || CALLBACK (mute on/off)<br />
|}<br />
<br />
To all parameter keywords should be assigned the full path to the executables supposed to be started on key press.<br />
The exectable provided for the CALLBACK keyword should take the parameters given in parentheses and act according to them.<br />
If you want to use xmodmap for the HOME, SEARCH, MAIL, FAVORITES, RELOAD, ABORT, BACKWARD, FORWARD and FN keys you should<br />
provide a <tt>XEVENTS OFF</tt> in your {{path|/etc/tpbrc}}. <br />
You can use an appropriate executable to [[How to inject fake keystrokes|inject fake keystrokes]].<br />
<br />
For Debian users, tpb is started from {{path|/etc/X11/Xsession.d/90tpb}}.<br />
<br />
'''Sound Button configuration'''<br />
<br />
''Note: Tested on T60p with Ubuntu 6.06 LTS''<br />
<br />
Most Thinkpads have a hardware sound mixer, thus the volumes buttons should work without configuration. However, this change is not reflected in the software mixer. tpb has a switch to enable software mixer support via OSS. The manual recommends this only for devices without a hardware mixer, but it also works for other hadware mixer enabled devices, even with the ALSA system. Just put MIXER ON in your {{path|/etc/tpbrc}} file and you can see the effect immediately in any ALSA mixer (e.g. kmix). For this to work you need write permissions to {{path|/dev/nvram}}.<br />
<br />
''Note: Tested on X21 with Ubuntu 6.06 LTS''<br />
<br />
On the ThinkPad X21 (and maybe some other older models) ACPI causes problems with tpb. On an X21 using acpi the volume buttons would work occasionally, and the OSD for tpb functions would rarely work. If a volume buttons was pressed too often, sometimes the computer would enter a low power (unplugged state) and would require a reboot. The solution is to use APM instead of ACPI. Instructions can be found in [[How_to_make_APM_work]].<br />
<br />
===KMilo configuration===<br />
The programs to be executed by [[KMilo]] are configured via the KDE Control Center (<tt>kcontrol</tt>), under <tt>System Administration --> IBM Thinkpad Laptop</tt>. Note that you can use appropriate commands to [[How to inject fake keystrokes|inject fake keystrokes]].<br />
<br />
===xmodmap configuration===<br />
xmodmap enables you to edit the modifier map and keymap tables that are used to translate keycodes into keysyms.<br />
Understood? Well, basically it allows you to give the X server a dictionary for the translation of keycodes like "97" into more human readable synonyms like "Home". This way xmodmap allows you to make the special keys of your keyboard known to X applications.<br />
<br />
To discover the keycode that a certain keypress produces, use the tool {{cmduser|xev}} <br />
<br />
Usually you should write your keycode-keysym associations into the file {{path|~/.Xmodmap}}. This file is usually read by the X session startup scripts of your system, so that the mappings automatically get included everytime you run the X server.<br />
<br />
The {{path|~/.Xmodmap}} lines for our purpose are in the form of<br />
keycode <keycode> = <keysym><br />
<br />
Load the assocation using the command<br />
<br />
{{cmduser|xmodmap ~/.Xmodmap}} <br />
<br />
(some configurations do this automatically upon X startup). <br />
<br />
The following table shows the keycodes generated by the ThinkPad special keys and sensible keysyms to assign them to.<br />
{| {{prettytable}}<br />
|+ keycodes and recommended keysyms<br />
! key !! keycode !! keysym<br />
|-<br />
| {{ibmkey|Access IBM|#495988}} or {{ibmkey|ThinkPad|#494949}} || 159 || XF86LaunchA<br />
|-<br />
| {{ibmkey|Backward|#494949}} || 234 || XF86Back or F19<br />
|-<br />
| {{ibmkey|Forward|#494949}} || 233 || XF86Forward or F20<br />
|-<br />
| {{ibmkey|Play/Pause|#494949}} || 162 || XF86AudioPlay<br />
|-<br />
| {{ibmkey|Stop|#494949}} || 164 || XF86AudioStop<br />
|-<br />
| {{ibmkey|Next|#494949}} || 153 || XF86AudioNext<br />
|-<br />
| {{ibmkey|Previous|#494949}} || 144 || XF86AudioPrev<br />
|-<br />
<br />
<br />
| {{ibmkey|Home|#494949}} || 178 || XF86HomePage<br />
|-<br />
| {{ibmkey|Search|#494949}} || 229 || XF86Search<br />
|-<br />
| {{ibmkey|Mail|#494949}} || 236 || XF86Mail<br />
|-<br />
| {{ibmkey|Favorites|#494949}} || 230 || XF86AddFavorite or XF86Favorites<br />
|-<br />
| {{ibmkey|Reload|#494949}} || 231 || XF86Reload<br />
|-<br />
| {{ibmkey|Abort|#494949}} || 232 || XF86Stop<br />
|-<br />
| {{key|Fn}} || 227 || F35<br />
|}<br />
<br />
Note: You can also using xkeycaps(a tool graphically display and edit the X keyboard mapping) to generate proper .Xmodmap.<br />
<br />
Note: if you are running [[tpb]] you might need to add the line <tt>XEVENTS=off</tt> into your tpbrc to stop it from grabbing the key events and allow them to get through to X instead. See [[http://www.thinkwiki.org/wiki/Tpb]] for more detailed instruction on how to use tpb and xmodmap.<br />
<br />
Note: XF86Forward and XF86Back do not work correctly in Firefox. You may want to map them to F19 and F20 instead if you use Firefox.<br />
<br />
=====Enabling the Windows and Menu Keys=====<br />
On some systems the Windows and Menu keys may not be recognized. You can enable then by<br />
making the following changes:<br />
<br />
keycode 115 = F13<br />
keycode 227 = F35<br />
<br />
F13 and F35 are used for the Windows and and Menu keys respectively. Labelling keycpode 227 as "Menu" may conflict with the right-mouse-click event.<br />
<br />
=====Using Caps Lock as Super L (Windows key)=====<br />
You can easily use Caps Lock as Win key by adding the following in your ~/.Xmodmap:<br />
! No Caps Lock<br />
clear lock<br />
! Caps Lock as Win key<br />
add mod4 = Caps_Lock<br />
=====NumLock=====<br />
On the ThinkPad {{600}}, {{T20}}, {{T21}}, {{T22}}, {{T30}}, {{X20}}, {{X21}}, {{X31}}, {{T43}}, {{R51}}, {{R52}} and possibly other models, X does not recognize the keycode for {{key|NumLk}} = {{key|Shift}}+{{key|ScrLk}}. To fix this, add the following to {{path|~/.Xmodmap}} in your home directory or {{path|/etc/X11/Xmodmap}} and run <tt>xmodmap</tt>, ex: <tt>xmodmap ~/.Xmodmap</tt>:<br />
keycode 77 = Num_Lock<br />
<br />
===Mapping keys with setkeycodes===<br />
You can use the setkeycodes command to remap certain keys. I.e. you can use {{cmdroot|setkeycodes 6e 109 6d 104 69 28 6b 1}} to map the Tablets Up and Down keys to the standard PageUp and PageDown keys and Tablet Escape and Enter to their respective keys.<br />
<br />
The following table shows the keycodes generated by the ThinkPad keys.<br />
{| {{prettytable}}<br />
|+ keycodes<br />
! key !! keycode<br />
|-<br />
| {{ibmkey|Tablet orientation|#494949}} || 0x6d<br />
|-<br />
| {{ibmkey|Tablet Shortcut|#494949}} || 0x6e<br />
|-<br />
| {{ibmkey|Tablet Esc|#494949}} || 0x6b<br />
|-<br />
| {{ibmkey|Tablet Enter|#494949}} || 0x69<br />
|-<br />
| {{ibmkey|Tablet Up|#494949}} || 0x68<br />
|-<br />
| {{ibmkey|Tablet Down|#494949}} || 0x6c<br />
|-<br />
| {{ibmkey|Tablet (unlabeled)|#494949}} || 0x67<br />
|}<br />
<br />
==Example Applications==<br />
===Web Browsers===<br />
====Firefox====<br />
To have firefox make use of the browser keys you need to modify one of its files{{footnote|3}}.<br />
To do this you will first need to extract it from the {{path|browser.jar}} archive. Do...<br />
<br />
:{{cmdroot|cd <firefox-directory>/chrome}}<br /><br />
:{{cmdroot|unzip browser.jar}}<br />
<br />
The file of interest is {{path|content/browser/browser.xul}}. Edit it {and don't forget to make a backup copy first}...<br />
:{{cmdroot|vi content/browser/browser.xul}}<br />
<br />
Look for the '''<keyset id="mainKeyset">''' section and add the following lines within...<br />
<key id="goBackKb" keycode="VK_F19" command="Browser:Back" /><br />
<key id="goForwardKb" keycode="VK_F20" command="Browser:Forward" /><br />
<br />
The Command you need for Next Tab <br />
<key id="goBackTabKb" keycode="VK_F19" oncommand="gBrowser.mTabContainer.advanceSelectedTab(-1)" /><br />
For the Previous Tab <br />
<key id="goForwardTabKb" keycode="VK_F20" oncommand="gBrowser.mTabContainer.advanceSelectedTab(1)" /><br />
<br />
Now save the file and repackage the {{path|browser.jar}} archive...<br />
:{{cmdroot|zip -rD0 browser.jar content/browser/}}<br />
<br />
That's it.<br />
<br />
{{HINT|For Firefox 2.0, just edit <firefox-directory>/chrome/browser/content/browser/browser.xul}}<br />
<br />
{{HINT|Another interesting Page on Firefox is http://dqd.com/~mayoff/notes/thinkpad/dqdnavkeys/ It uses different key mappings (F19 resp. F20) but a ready [http://dqd.com/~mayoff/notes/thinkpad/dqdnavkeys/dqdnavkeys-1.2.xpi .xpi] is provided which is pretty comfortable. However, this xpi file does not install on Firefox 1.5.}}<br />
<br />
{{HINT|You can also use the [http://extensionroom.mozdev.org/more-info/keyconfig keyconfig] extension to configure custom keys. This extension works with Firefox 1.5. The Command you need for Next Tab is gBrowser.mTabContainer.advanceSelectedTab(1,true); For Previous Tab its gBrowser.mTabContainer.advanceSelectedTab(-1,true); }}.<br />
<br />
====Konqueror====<br />
KDE allows you set key mappings for KDE applications (Go to KMenu > System > Control Center > Regional & Accessibility > Keyboard Shortcuts). By default (at least in KDE 3.5), XF86Back and XF86Forward are set as alternatives to Alt-Left and Alt-Right, and are mapped to KDE Back and Forward navigation actions. <br />
<br />
If you use Konqueror as your only browser, you only need to set up {{path|~/.Xmodmap}} as described [[#xmodmap configuration|above]] to assign ThinkPad back/forward keys to the symbols XF86Back/XF86Forward. This also make these keys work for other KDE applications such as Quanta Plus, KPackage and so on (not all KDE applications honor this setting, e.g. KDE help system doesn't).<br />
<br />
If you want to use Firefox, however, the above settings do not work. You will have to map ThinkPad back/forward keys to F19/F20 as described [[#Firefox|above]], and change KDE navigation key settings to use F19/F20 instead of the default.<br />
<br />
====Opera====<br />
However this isn't a simple configration file, you can set your browser manually.<br /><br />
Go to <i>Tool > Settings > Mouse and keyboard > Keyboard settings > Edit > Browser Window</i>. There add F19 - Back and F20 - Forward. Now you can surf using your TP keys ;-)<br />
<br />
===Window Managers===<br />
====fvwm====<br />
To get the {{ibmkey|Forward|#494949}} and {{ibmkey|Backward|#494949}} keys to cycle through pages in the virtual desktop, add this to your {{path|~/.fvwmrc}}:<br />
Key XF86Back A A Scroll -100000 0<br />
Key XF86Forward A A Scroll +100000 0<br />
If you use multiple virtual desktops, you could instead use the keys to flip between them by using GotoDesk.<br />
<br />
====fluxbox====<br />
To get the keys to cycle through pages in the virtual desktop, add this to your {{path|~/.fluxbox/keys}}:<br />
None F19 :PrevWorkspace<br />
None F20 :NextWorkspace<br />
<br />
====pekwm configuration====<br />
You can make the two browser keys switch workspaces in pekwm, by adding the following two lines to the {{path|~/.pekwm/keys}} file:<br />
KeyPress = "Mod1 XF86Back" { Actions = "GoToWorkspace prev" }<br />
KeyPress = "Mod1 XF86Forward" { Actions = "GoToWorkspace next" }<br />
<br />
====pwm====<br />
Another example how to use these two keys to switch between pwm tabs. These two lines should be added to {{path|~/.pwm/keys-default.conf}} or {{path|/etc/pwm/keys-default.conf}}:<br />
kbind "Back", "switch_rot", -1<br />
kbind "Forward", "switch_rot", 1<br />
<br />
====icewm====<br />
Some applications use {{key|Ctrl}}{{key|Left}} and {{key|Ctrl}}{{key|Right}} to set the cursor to the beginning of the previous / next word. In icewm, though, they're bound to previous / next workspace. Change these two options in {{path|~/.icewm/preferences}} to bind those to {{ibmkey|Forward|#494949}} and {{ibmkey|Backward|#494949}}: (Provided you assigned keysyms F19 and F20 with xmodmap)<br />
# "Previous workspace" shortcut<br />
KeySysWorkspacePrev="F19"<br />
# "Next workspace" shortcut<br />
KeySysWorkspaceNext="F20"<br />
<br />
===Other Uses===<br />
====Console tools configuraton====<br />
To make the {{ibmkey|Forward|#494949}} and {{ibmkey|Backward|#494949}} keys useful in console, add this to your keymap ({{path|/etc/console/boottime.kmap.gz}} in {{Debian}}):<br />
keycode 158 = Decr_Console<br />
keycode 159 = Incr_Console<br />
<br />
Alternatively you can load this script (perhaps on system startup) to enable Backward/Forward button console (VT) switch:<br />
<br />
#!/bin/sh<br />
setkeycodes e06a 126 e069 127<br />
echo keycode 126 = Decr_Console | loadkeys<br />
echo keycode 127 = Incr_Console | loadkeys<br />
<br />
It should work with any distro.<br />
<br />
==External Sources==<br />
*[http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-51537 IBMs page on configuring the ThinkPad buttons (ThinkPad, Access IBM, Mail, Search, and Home buttons) under Linux]<br />
*[http://dqd.com/~mayoff/notes/thinkpad/dqdnavkeys/ Rob Mayoffs page on using IBM Keyboard Navigation Keys in Linux Mozilla and Firefox]<br />
*[http://snarfed.org/space/thinkpad+keys+in+firefox Ryan Barretts blog article about using the browser keys in Firefox]<br />
<br />
{{footnotes|<br />
#if there are more than one tool listed, one is sufficient<br />
#'full' means you can completely reassign any action to be triggered by the key, 'additional actions' means you can trigger actions in addition to the standard function of the key, which can not be changed.<br />
#Thanks go to Ryan Barrett for writing the [http://snarfed.org/space/thinkpad+keys+in+firefox little howto] on [http://snarfed.org/space/start his blog].<br />
}}</div>Wyrfelhttps://www.thinkwiki.org/w/index.php?title=Ultracampatch&diff=28879Ultracampatch2007-03-23T04:09:03Z<p>Wyrfel: /* Project Homepage / Availability */</p>
<hr />
<div>==IBM UltraCam II driver==<br />
Kernel patch to enable support for the IBM UltraCam II.<br />
<br />
=== Features ===<br />
* camera working on USB and Ultraport<br />
* supports the basic functions of the camera<br />
* automatic white balancing<br />
<br />
=== Project Homepage / Availability ===<br />
*[http://www.gutwin.org/cam/source/index.html patch for kernel 2.4.20]<br />
*[http://marc.theaimsgroup.com/?l=linux-usb-devel&m=111802180804300&w=4 patch for kernel 2.6.10]<br />
*[http://lists.zerezo.com/linux-usb-devel/msg12263.html patch for kernel 2.6.18]<br />
<br />
=== Status ===<br />
usable, but unstable, project seems to be dead<br />
<br />
The current driver gives a 320x240 image, with White Balance control (optionaly automatic).<br />
Contrast, and importantly Brightness Control have not been implemented, so the camera is ultra-sensitive to light; you may find you have to walk into a wardrobe to see a picture during the daytime.<br />
The driver has been included with the kernel since circa 2.4.21 (I don't remember the exact version)<br />
<br />
The present driver also needs updating to include proper support for sysfs, so having removed the camera while running Linux with sysfs, you will have to restart the system to get the camera working again (until sysfs support is added tothe driver).<br />
<br />
=== Interesting links related to this project ===<br />
<br />
*[http://linux.bytesex.org/v4l2/ Video4Linux Project Home]<br />
*[http://www.exploits.org/v4l/ Video4Linux Resources]<br />
<br />
[[Category:Drivers]]</div>Wyrfelhttps://www.thinkwiki.org/w/index.php?title=Template:View_code&diff=27828Template:View code2007-01-21T04:17:48Z<p>Wyrfel: </p>
<hr />
<div><includeonly><pre<noinclude>_</noinclude>></includeonly>{{{{{1}}}}}<includeonly><<noinclude>_</noinclude>/pre></includeonly></div>Wyrfelhttps://www.thinkwiki.org/w/index.php?title=Template:View_code_wrapper&diff=27827Template:View code wrapper2007-01-21T04:17:09Z<p>Wyrfel: </p>
<hr />
<div>{{View_code|:{{{1}}}}}</div>Wyrfelhttps://www.thinkwiki.org/w/index.php?title=Template:View_code_wrapper&diff=27826Template:View code wrapper2007-01-21T04:16:23Z<p>Wyrfel: </p>
<hr />
<div>{{View_code|:Code/tp-theft}}</div>Wyrfelhttps://www.thinkwiki.org/w/index.php?title=Template:View_code_wrapper&diff=27825Template:View code wrapper2007-01-21T04:15:50Z<p>Wyrfel: </p>
<hr />
<div>{{View_code|:{{{1|:Code/tp-theft}}}}}</div>Wyrfelhttps://www.thinkwiki.org/w/index.php?title=Template:View_code&diff=27824Template:View code2007-01-21T04:13:41Z<p>Wyrfel: </p>
<hr />
<div><includeonly><pre<noinclude>_</noinclude>></includeonly>{{{{{1|:Code/tp-theft}}}}}<includeonly><<noinclude>_</noinclude>/pre></includeonly></div>Wyrfelhttps://www.thinkwiki.org/w/index.php?title=Template:View_code_wrapper&diff=27823Template:View code wrapper2007-01-21T04:12:40Z<p>Wyrfel: </p>
<hr />
<div>{{View_code|:{{{1}}}}}</div>Wyrfelhttps://www.thinkwiki.org/w/index.php?title=Template:View_code&diff=27822Template:View code2007-01-21T04:12:29Z<p>Wyrfel: </p>
<hr />
<div><includeonly><pre<noinclude>_</noinclude>></includeonly>{{{{{1}}}}}<includeonly><<noinclude>_</noinclude>/pre></includeonly></div>Wyrfelhttps://www.thinkwiki.org/w/index.php?title=Template:View_code&diff=27821Template:View code2007-01-21T04:08:39Z<p>Wyrfel: </p>
<hr />
<div><pre<noinclude>_</noinclude>>{{{{{1}}}}}<<noinclude>_</noinclude>/pre></div>Wyrfelhttps://www.thinkwiki.org/w/index.php?title=Template:View_code&diff=27820Template:View code2007-01-21T04:04:50Z<p>Wyrfel: </p>
<hr />
<div><includeonly><pre<noinclude>_</noinclude>><includeonly>{{{{{1}}}}}<includeonly><<noinclude>_</noinclude>/pre></includeonly></div>Wyrfelhttps://www.thinkwiki.org/w/index.php?title=Template:View_code&diff=27819Template:View code2007-01-21T04:01:48Z<p>Wyrfel: </p>
<hr />
<div><pre<noinclude>f</noinclude>>{{{{{1}}}}}<<noinclude>a</noinclude>/pre></div>Wyrfelhttps://www.thinkwiki.org/w/index.php?title=Template:Code_pre&diff=27818Template:Code pre2007-01-21T04:00:12Z<p>Wyrfel: </p>
<hr />
<div><pre<noinclude>f</noinclude>></div>Wyrfelhttps://www.thinkwiki.org/w/index.php?title=Template:View_code&diff=27817Template:View code2007-01-21T03:58:53Z<p>Wyrfel: </p>
<hr />
<div><includeonly>{{Code_pre}}pre{{Code_unpre}}</includeonly>{{{{{1}}}}}{{Code_pre}}/pre{{Code_unpre}}</div>Wyrfelhttps://www.thinkwiki.org/w/index.php?title=Template:Code_pre&diff=27816Template:Code pre2007-01-21T03:58:33Z<p>Wyrfel: </p>
<hr />
<div><includeonly><pre{{{1|}}}></includeonly></div>Wyrfelhttps://www.thinkwiki.org/w/index.php?title=Template:Code_pre&diff=27815Template:Code pre2007-01-21T03:57:53Z<p>Wyrfel: </p>
<hr />
<div><pre{{{1|}}}></div>Wyrfelhttps://www.thinkwiki.org/w/index.php?title=Template:Code_unpre&diff=27814Template:Code unpre2007-01-21T03:56:55Z<p>Wyrfel: </p>
<hr />
<div><includeonly></pre{{{1|}}}></includeonly></div>Wyrfelhttps://www.thinkwiki.org/w/index.php?title=Template:Code_pre&diff=27813Template:Code pre2007-01-21T03:56:33Z<p>Wyrfel: </p>
<hr />
<div><includeonly><pre{{{1|}}}></includeonly></div>Wyrfelhttps://www.thinkwiki.org/w/index.php?title=Template:Code_unpre&diff=27812Template:Code unpre2007-01-21T03:54:57Z<p>Wyrfel: </p>
<hr />
<div><includeonly>></includeonly></div>Wyrfelhttps://www.thinkwiki.org/w/index.php?title=Template:Code_pre&diff=27811Template:Code pre2007-01-21T03:54:50Z<p>Wyrfel: </p>
<hr />
<div><includeonly><</includeonly></div>Wyrfelhttps://www.thinkwiki.org/w/index.php?title=Template:View_code&diff=27810Template:View code2007-01-21T03:54:39Z<p>Wyrfel: </p>
<hr />
<div>{{Code_pre}}pre{{Code_unpre}}{{{{{1}}}}}{{Code_pre}}/pre{{Code_unpre}}</div>Wyrfelhttps://www.thinkwiki.org/w/index.php?title=Template:Code_pre&diff=27809Template:Code pre2007-01-21T03:52:52Z<p>Wyrfel: </p>
<hr />
<div><includeonly><</includeonly>pre<includeonly>></includeonly></div>Wyrfelhttps://www.thinkwiki.org/w/index.php?title=Template:View_code&diff=27808Template:View code2007-01-21T03:50:31Z<p>Wyrfel: </p>
<hr />
<div>{{Code_pre}}{{{{{1}}}}}{{Code_unpre}}</div>Wyrfelhttps://www.thinkwiki.org/w/index.php?title=Template:Code_pre&diff=27807Template:Code pre2007-01-21T03:49:53Z<p>Wyrfel: </p>
<hr />
<div><<includeonly>pre</includeonly>></div>Wyrfelhttps://www.thinkwiki.org/w/index.php?title=Template:Code_unpre&diff=27806Template:Code unpre2007-01-21T03:49:13Z<p>Wyrfel: </p>
<hr />
<div><includeonly><pre></includeonly></div>Wyrfelhttps://www.thinkwiki.org/w/index.php?title=Template:Code_pre&diff=27805Template:Code pre2007-01-21T03:49:03Z<p>Wyrfel: </p>
<hr />
<div><includeonly><pre></includeonly></div>Wyrfelhttps://www.thinkwiki.org/w/index.php?title=Template:View_code&diff=27804Template:View code2007-01-21T03:44:04Z<p>Wyrfel: </p>
<hr />
<div><includeonly><pre></includeonly>{{{{{1}}}}}<includeonly></pre></includeonly></div>Wyrfelhttps://www.thinkwiki.org/w/index.php?title=User:Wyrfel/playground&diff=27803User:Wyrfel/playground2007-01-21T03:41:23Z<p>Wyrfel: </p>
<hr />
<div>*{{kernelconf|CONFIG_SCSI|[M]|SCSI device support|SCSI device support|Device Drivers||}}<br />
*{{kernelconf|CONFIG_SCSI|[M]|SCSI device support||||}}<br />
*{{kernelconf|CONFIG_SCSI|[M]|||||}}<br />
*{{kernelconf|CONFIG_SCSI||||||}}<br />
*{{kernelconf||[M]|SCSI device support||||}}<br />
<br />
*{{cmd|ls|<nowiki>#</nowiki>}}<br />
<br />
*{{pfl|lili|lala=huhu|lili=haha}}<br />
*{{kernelconf2|CONFIG_USB|m|short}}<br />
*{{kernelconf2|Device_Drivers||long}}<br />
*{{kernelconf2|USB_support||long}}<br />
*{{kernelconf2|CONFIG_USB|m|long}}<br />
*{{kernelconfng|(CONFIG_USB)}}<br />
*{{Iyes}}<br />
<br />
*{{View_code_wrapper|Code/tp-theft}}<br />
<nowiki>*{{View_code|:Code/tp-theft|pre}}</nowiki><br />
<br />
{| border=1 cellspacing=0 cellpadding=2<br />
|- style="background:#ffdead;white-space:nowrap;"<br />
! colspan="10" | ibm-acpi<br />
|-<br />
! colspan="4" style="background:#ffdead;" | Purpose<br />
| style="background:#efefef;" | ACPI<br />
! colspan="4" style="background:#ffdead;" | Current<br />
| style="background:#efefef;" | 0.12a<br />
|-<br />
! colspan="9" style="background:#ffdead;" | in Kernel since<br />
| style="background:#efefef;" | 2.6.10<br />
|-<br />
| colspan="10" | {{kernelconf||||||||}}<br />
|-<br />
! colspan="2" style="background:#ffdead;" | Homepage<br />
| colspan="8" style="background:#efefef;" | http://ibm-acpi.sourceforge.net<br />
|-<br />
! colspan="10" style="background:#ffdead;" | Packages<br />
|-<br />
! style="background:#efefef;" | Source<br />
| colspan="9" | http://ibm-acpi.sourceforge.net/<br />
|-<br />
! style="background:#efefef;" | Debian<br />
| colspan="9" | http://ibm-acpi.sourceforge.net/<br />
|-<br />
! style="background:#efefef;" | Gentoo<br />
| colspan="9" | http://packages.gentoo.org/packages/?category=app-laptop;name=ibm-acpi<br />
|-<br />
|}</div>Wyrfelhttps://www.thinkwiki.org/w/index.php?title=Template:View_code&diff=27802Template:View code2007-01-21T03:39:38Z<p>Wyrfel: </p>
<hr />
<div><nowiki><pre></nowiki>{{{{{1}}}}}<nowiki></pre></nowikI></div>Wyrfelhttps://www.thinkwiki.org/w/index.php?title=Template:View_code&diff=27801Template:View code2007-01-21T03:38:01Z<p>Wyrfel: </p>
<hr />
<div><{{Code_pre}}>{{{{{1}}}}}</{{Code_pre}}></div>Wyrfelhttps://www.thinkwiki.org/w/index.php?title=Template:Code_pre&diff=27800Template:Code pre2007-01-21T03:37:44Z<p>Wyrfel: </p>
<hr />
<div>pre</div>Wyrfelhttps://www.thinkwiki.org/w/index.php?title=Template:View_code&diff=27799Template:View code2007-01-21T03:36:40Z<p>Wyrfel: </p>
<hr />
<div>{{Code_pre}}{{{{{1}}}}}{{Code_unpre}}</div>Wyrfelhttps://www.thinkwiki.org/w/index.php?title=Template:View_code&diff=27798Template:View code2007-01-21T03:36:27Z<p>Wyrfel: </p>
<hr />
<div>{{Code_re}}{{{{{1}}}}}{{Code_unpre}}</div>Wyrfelhttps://www.thinkwiki.org/w/index.php?title=Template:View_code&diff=27797Template:View code2007-01-21T03:36:05Z<p>Wyrfel: </p>
<hr />
<div>{{pre}}{{{{{1}}}}}{{unpre}}</div>Wyrfelhttps://www.thinkwiki.org/w/index.php?title=Template:Code_unpre&diff=27796Template:Code unpre2007-01-21T03:35:43Z<p>Wyrfel: </p>
<hr />
<div></pre></div>Wyrfelhttps://www.thinkwiki.org/w/index.php?title=Template:Code_pre&diff=27795Template:Code pre2007-01-21T03:34:54Z<p>Wyrfel: </p>
<hr />
<div><pre></div>Wyrfelhttps://www.thinkwiki.org/w/index.php?title=Template:View_code_wrapper&diff=27794Template:View code wrapper2007-01-21T03:31:10Z<p>Wyrfel: </p>
<hr />
<div>{{View_code|:{{{1}}}|pre}}</div>Wyrfelhttps://www.thinkwiki.org/w/index.php?title=Template:View_code_wrapper&diff=27793Template:View code wrapper2007-01-21T03:30:41Z<p>Wyrfel: </p>
<hr />
<div>{{View_code|{{{1}}}|pre}}</div>Wyrfelhttps://www.thinkwiki.org/w/index.php?title=Template:View_code&diff=27792Template:View code2007-01-21T03:20:48Z<p>Wyrfel: </p>
<hr />
<div><{{{2}}}>{{{{{1}}}}}</{{{2}}}></div>Wyrfelhttps://www.thinkwiki.org/w/index.php?title=Template:View_code&diff=27791Template:View code2007-01-21T03:19:26Z<p>Wyrfel: </p>
<hr />
<div><includeonly><pre></includeonly>{{{{{1}}}}}<includeonly></pre></includeonly></div>Wyrfelhttps://www.thinkwiki.org/w/index.php?title=Template:View_code&diff=27790Template:View code2007-01-21T03:16:55Z<p>Wyrfel: </p>
<hr />
<div><pre>{{{{{1}}}}}</pre></div>Wyrfelhttps://www.thinkwiki.org/w/index.php?title=Template:View_code&diff=27789Template:View code2007-01-21T03:15:26Z<p>Wyrfel: </p>
<hr />
<div><{{{2}}}>{{{{{1}}}}}</{{{2}}}></div>Wyrfelhttps://www.thinkwiki.org/w/index.php?title=Template:View_code&diff=27788Template:View code2007-01-21T03:14:19Z<p>Wyrfel: </p>
<hr />
<div><{{{2}}}>{{{1}}}</{{{2}}}></div>Wyrfel