https://www.thinkwiki.org/w/api.php?action=feedcontributions&user=217.93.11.239&feedformat=atomThinkWiki - User contributions [en]2024-03-28T07:59:23ZUser contributionsMediaWiki 1.31.12https://www.thinkwiki.org/w/index.php?title=How_to_get_special_keys_to_work&diff=6052How to get special keys to work2005-05-13T04:50:26Z<p>217.93.11.239: /* Firefox */</p>
<hr />
<div>==Overview==<br />
{| border="1" cellspacing="0" cellpadding="2"<br />
! key !! standard function !! tool !! configurability !! remarks<br />
|-<br />
| {{key|Fn}} || - || xmodmap, [[tpb]] || full || on release without completed key combination<br />
|-<br />
| {{key|Fn}}{{key|F3}} || blank screen || [[ibm-acpi]], [[thinkpad-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|F4}} || suspend to ram || [[ibm-acpi]], [[thinkpad-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|F5}} || switch bluetooth || [[ibm-acpi]], [[thinkpad-acpi]] || full || in models starting from 2002<br />
|-<br />
| {{key|Fn}}{{key|F7}} || switch display || [[thinkpad-acpi]], [[tpb]] || additional actions || <br />
|-<br />
| {{key|Fn}}{{key|F8}} || toggle display expansion || [[thinkpad-acpi]], [[tpb]] || additional actions ||<br />
|-<br />
| {{key|Fn}}{{key|F9}} || eject from dock || [[thinkpad-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|F12}} || hibernate || [[ibm-acpi]], [[thinkpad-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|Pos1}} || brightness up || [[tpb]] || additional actions ||<br />
|-<br />
| {{key|Fn}}{{key|End}} || brightness down || [[tpb]] || additional actions ||<br />
|-<br />
| {{key|Fn}}{{key|PageUp}} || toggle thinklight || [[ibm-acpi]], [[tpb]] || additional actions ||<br />
|-<br />
| {{key|Fn}}{{key|Space}} || toggle zoom || [[tpb]] || full ||<br />
|-<br />
| {{ibmkey|Access IBM|#495988}} or {{ibmkey|ThinkPad|#494949}} || help application || [[tpb]] || full ||<br />
|-<br />
| {{ibmkey|Home|#494949}} || open web browser || xmodmap, [[tpb]] || full || only iSeries and ext. keyboards<br />
|-<br />
| {{ibmkey|Search|#494949}} || open search application || xmodmap, [[tpb]] || full || only iSeries and ext. keyboards<br />
|-<br />
| {{ibmkey|Mail|#494949}} || open mail application || xmodmap, [[tpb]] || full || only iSeries and ext. keyboards<br />
|-<br />
| {{ibmkey|Favorites|#494949}} || open favorites || xmodmap, [[tpb]] || full || only iSeries and ext. keyboards<br />
|-<br />
| {{ibmkey|Reload|#494949}} || reload web page || xmodmap, [[tpb]] || full || only iSeries and ext. keyboards<br />
|-<br />
| {{ibmkey|Abort|#494949}} || abort loading page || xmodmap, [[tpb]] || full || only iSeries and ext. keyboards<br />
|-<br />
| {{ibmkey|Backward|#494949}} || previous page || xmodmap, [[tpb]] || full || iSeries, ext. keyboards, Thinkpads starting from 2002<br />
|-<br />
| {{ibmkey|Forward|#494949}} || next page || xmodmap, [[tpb]] || full || iSeries, ext. keyboards, Thinkpads starting from 2002<br />
|-<br />
| {{ibmkey|Volume up|#494949}} || volume up || [[tpb]] || additional actions ||<br />
|-<br />
| {{ibmkey|Volume down|#494949}} || volume down || [[tpb]] || additional actions ||<br />
|-<br />
| {{ibmkey|Volume mute|#494949}} || mute volume || [[tpb]] || additional actions ||<br />
|-<br />
| {{ibmkey|Power|#494949}} || shutdown || [[ibm-acpi]] || full || triggered on pressing 3secs, but notebook goes off on 5sec press<br />
|-<br />
| Display lid || blank screen || [[ibm-acpi]] || full ||<br />
|-<br />
| Ultrabay lid || announce ultrabay change || [[ibm-acpi]] || full ||<br />
|-<br />
| Dock eject || eject from dock || [[ibm-acpi]] || full ||<br />
|}<br />
<br />
==Triggering key events==<br />
===ibm-acpi events===<br />
{| border="1" cellspacing="0" cellpadding="2"<br />
|+ events triggered by ibm-acpi for /etc/acpi/events files<br />
! key !! event<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|F12}} || ibm/hotkey HKEY 00000080 0000100c<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 />
<br />
===tpb configuration===<br />
{| border="1" cellspacing="0" cellpadding="2"<br />
|+ configuration keywords for 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}} || 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 XEVENTS=off in your tpbrc.<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 />
Usually you should write your keycode-keysym associations into the file ~/.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 ~/.Xmodmap lines for our purpose are in the form of<br />
keycode <keycode> = <keysym><br />
<br />
The following table shows the keycodes generated by the Thinkpad special keys and sensible keysyms to assign them to.<br />
{| border="1" cellspacing="0" cellpadding="2"<br />
|+ keycodes and recommended keysyms<br />
! key !! keycode !! keysym<br />
|-<br />
| {{ibmkey|Backward|#494949}} || 234 || XF86Back or F21<br />
|-<br />
| {{ibmkey|Forward|#494949}} || 233 || XF86Forward or F22<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 />
(In case you want to use the browser keys in Firefox, you will have to assign the F21 and F22 or similar keysyms to them.)<br />
<br />
Note: if you are running tpb you might need to add the line XEVENTS=off into your tpbrc to stop it from grabbing the key events and allow them to get through to X instead.<br />
<br />
==Example Applications==<br />
===Web Browsers===<br />
====Firefox====<br />
(First of all thanks go to Ryan Barrett for writing the little howto on his blog.)<br /><br />
To have firefox make use of the browser keys you need to modify one of its files.<br />
To do this you will first need to extract it from the browser.jar archive. Do...<br />
<br />
{{cmdroot|cd <firefox-directory>/chrome}}<br /><br />
{{cmdroot|unzip browser.jar}}<br />
<br />
The file of interest is content/browser/browser.xul. Edit it...<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="goBackTP" keycode="VK_F21" command="Browser:Back" /><br />
<key id="goForwardTP" keycode="VK_F22" command="Browser:Forward" /><br />
No save the file and repackage the browser.jar archive...<br />
{{cmdroot|zip -rD0 browser.jar content/browser/}}<br />
<br />
That's it.<br />
<br />
Another interesting Page on Firefox is http://dqd.com/~mayoff/notes/thinkpad/dqdnavkeys/ It uses different key mappings (F19 resp. F20) but a ready .xpi is provided which is pretty comfortable.<br />
<br />
====Opera====<br />
However this isn't simple configration file, you can set your browser manualy.<br /><br />
Go to <i>Tool > Settings > Mouse and keyboard > Keyboard settings > Edit > Browser Window</i>. There add F21 - Back and F22 - Forward. Now you can surf using your TP keys ;-)<br />
<br />
===Window Managers===<br />
====fvwm====<br />
To get the Backwards and Forwards keys to cycle through pages in the virtual desktop, add this to your .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 />
====pekwm configuration====<br />
You can make the two browser keys switch workspaces in pekwm, by adding the following two lines to the .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 $HOME/.pwm/keys-default.conf or /etc/pwm/keys-default.conf:<br />
kbind "Back", "switch_rot", -1<br />
kbind "Forward", "switch_rot", 1<br />
<br />
===Other Uses===<br />
====Console tools configuraton====<br />
To make the prev page / next page keys (located at the cursor keys on my T42p) useful in console, add this to your keymap (/etc/console/boottime.kmap.gz in Debian):<br />
keycode 158 = Decr_Console<br />
keycode 159 = Incr_Console</div>217.93.11.239https://www.thinkwiki.org/w/index.php?title=How_to_get_special_keys_to_work&diff=4861How to get special keys to work2005-05-13T04:46:33Z<p>217.93.11.239: /* pekwm configuration */</p>
<hr />
<div>==Overview==<br />
{| border="1" cellspacing="0" cellpadding="2"<br />
! key !! standard function !! tool !! configurability !! remarks<br />
|-<br />
| {{key|Fn}} || - || xmodmap, [[tpb]] || full || on release without completed key combination<br />
|-<br />
| {{key|Fn}}{{key|F3}} || blank screen || [[ibm-acpi]], [[thinkpad-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|F4}} || suspend to ram || [[ibm-acpi]], [[thinkpad-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|F5}} || switch bluetooth || [[ibm-acpi]], [[thinkpad-acpi]] || full || in models starting from 2002<br />
|-<br />
| {{key|Fn}}{{key|F7}} || switch display || [[thinkpad-acpi]], [[tpb]] || additional actions || <br />
|-<br />
| {{key|Fn}}{{key|F8}} || toggle display expansion || [[thinkpad-acpi]], [[tpb]] || additional actions ||<br />
|-<br />
| {{key|Fn}}{{key|F9}} || eject from dock || [[thinkpad-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|F12}} || hibernate || [[ibm-acpi]], [[thinkpad-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|Pos1}} || brightness up || [[tpb]] || additional actions ||<br />
|-<br />
| {{key|Fn}}{{key|End}} || brightness down || [[tpb]] || additional actions ||<br />
|-<br />
| {{key|Fn}}{{key|PageUp}} || toggle thinklight || [[ibm-acpi]], [[tpb]] || additional actions ||<br />
|-<br />
| {{key|Fn}}{{key|Space}} || toggle zoom || [[tpb]] || full ||<br />
|-<br />
| {{ibmkey|Access IBM|#495988}} or {{ibmkey|ThinkPad|#494949}} || help application || [[tpb]] || full ||<br />
|-<br />
| {{ibmkey|Home|#494949}} || open web browser || xmodmap, [[tpb]] || full || only iSeries and ext. keyboards<br />
|-<br />
| {{ibmkey|Search|#494949}} || open search application || xmodmap, [[tpb]] || full || only iSeries and ext. keyboards<br />
|-<br />
| {{ibmkey|Mail|#494949}} || open mail application || xmodmap, [[tpb]] || full || only iSeries and ext. keyboards<br />
|-<br />
| {{ibmkey|Favorites|#494949}} || open favorites || xmodmap, [[tpb]] || full || only iSeries and ext. keyboards<br />
|-<br />
| {{ibmkey|Reload|#494949}} || reload web page || xmodmap, [[tpb]] || full || only iSeries and ext. keyboards<br />
|-<br />
| {{ibmkey|Abort|#494949}} || abort loading page || xmodmap, [[tpb]] || full || only iSeries and ext. keyboards<br />
|-<br />
| {{ibmkey|Backward|#494949}} || previous page || xmodmap, [[tpb]] || full || iSeries, ext. keyboards, Thinkpads starting from 2002<br />
|-<br />
| {{ibmkey|Forward|#494949}} || next page || xmodmap, [[tpb]] || full || iSeries, ext. keyboards, Thinkpads starting from 2002<br />
|-<br />
| {{ibmkey|Volume up|#494949}} || volume up || [[tpb]] || additional actions ||<br />
|-<br />
| {{ibmkey|Volume down|#494949}} || volume down || [[tpb]] || additional actions ||<br />
|-<br />
| {{ibmkey|Volume mute|#494949}} || mute volume || [[tpb]] || additional actions ||<br />
|-<br />
| {{ibmkey|Power|#494949}} || shutdown || [[ibm-acpi]] || full || triggered on pressing 3secs, but notebook goes off on 5sec press<br />
|-<br />
| Display lid || blank screen || [[ibm-acpi]] || full ||<br />
|-<br />
| Ultrabay lid || announce ultrabay change || [[ibm-acpi]] || full ||<br />
|-<br />
| Dock eject || eject from dock || [[ibm-acpi]] || full ||<br />
|}<br />
<br />
==Triggering key events==<br />
===ibm-acpi events===<br />
{| border="1" cellspacing="0" cellpadding="2"<br />
|+ events triggered by ibm-acpi for /etc/acpi/events files<br />
! key !! event<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|F12}} || ibm/hotkey HKEY 00000080 0000100c<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 />
<br />
===tpb configuration===<br />
{| border="1" cellspacing="0" cellpadding="2"<br />
|+ configuration keywords for 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}} || 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 XEVENTS=off in your tpbrc.<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 />
Usually you should write your keycode-keysym associations into the file ~/.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 ~/.Xmodmap lines for our purpose are in the form of<br />
keycode <keycode> = <keysym><br />
<br />
The following table shows the keycodes generated by the Thinkpad special keys and sensible keysyms to assign them to.<br />
{| border="1" cellspacing="0" cellpadding="2"<br />
|+ keycodes and recommended keysyms<br />
! key !! keycode !! keysym<br />
|-<br />
| {{ibmkey|Backward|#494949}} || 234 || XF86Back or F21<br />
|-<br />
| {{ibmkey|Forward|#494949}} || 233 || XF86Forward or F22<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 />
(In case you want to use the browser keys in Firefox, you will have to assign the F21 and F22 or similar keysyms to them.)<br />
<br />
Note: if you are running tpb you might need to add the line XEVENTS=off into your tpbrc to stop it from grabbing the key events and allow them to get through to X instead.<br />
<br />
==Example Applications==<br />
===Web Browsers===<br />
====Firefox====<br />
(First of all thanks go to Ryan Barrett for writing the little howto on his blog.)<br /><br />
To have firefox make use of the browser keys you need to modify one of its files.<br />
To do this you will first need to extract it from the browser.jar archive. Do...<br />
$ cd <firefox-directory>/chrome<br />
$ unzip browser.jar<br />
The file of interest is content/browser/browser.xul. Edit it...<br />
$ vi content/browser/browser.xul<br />
Look for the '''<keyset id="mainKeyset">''' section and add the following lines within...<br />
<key id="goBackTP" keycode="VK_F21" command="Browser:Back" /><br />
<key id="goForwardTP" keycode="VK_F22" command="Browser:Forward" /><br />
No save the file and repackage the browser.jar archive...<br />
$ zip -rD0 browser.jar content/browser/<br />
That's it.<br />
<br />
Another interesting Page on Firefox is http://dqd.com/~mayoff/notes/thinkpad/dqdnavkeys/ It uses different key mappings (F19 resp. F20) but a ready .xpi is provided which is pretty comfortable.<br />
<br />
====Opera====<br />
However this isn't simple configration file, you can set your browser manualy.<br /><br />
Go to <i>Tool > Settings > Mouse and keyboard > Keyboard settings > Edit > Browser Window</i>. There add F21 - Back and F22 - Forward. Now you can surf using your TP keys ;-)<br />
<br />
===Window Managers===<br />
====fvwm====<br />
To get the Backwards and Forwards keys to cycle through pages in the virtual desktop, add this to your .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 />
====pekwm configuration====<br />
You can make the two browser keys switch workspaces in pekwm, by adding the following two lines to the .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 $HOME/.pwm/keys-default.conf or /etc/pwm/keys-default.conf:<br />
kbind "Back", "switch_rot", -1<br />
kbind "Forward", "switch_rot", 1<br />
<br />
===Other Uses===<br />
====Console tools configuraton====<br />
To make the prev page / next page keys (located at the cursor keys on my T42p) useful in console, add this to your keymap (/etc/console/boottime.kmap.gz in Debian):<br />
keycode 158 = Decr_Console<br />
keycode 159 = Incr_Console</div>217.93.11.239https://www.thinkwiki.org/w/index.php?title=How_to_get_special_keys_to_work&diff=4860How to get special keys to work2005-05-13T04:44:38Z<p>217.93.11.239: </p>
<hr />
<div>==Overview==<br />
{| border="1" cellspacing="0" cellpadding="2"<br />
! key !! standard function !! tool !! configurability !! remarks<br />
|-<br />
| {{key|Fn}} || - || xmodmap, [[tpb]] || full || on release without completed key combination<br />
|-<br />
| {{key|Fn}}{{key|F3}} || blank screen || [[ibm-acpi]], [[thinkpad-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|F4}} || suspend to ram || [[ibm-acpi]], [[thinkpad-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|F5}} || switch bluetooth || [[ibm-acpi]], [[thinkpad-acpi]] || full || in models starting from 2002<br />
|-<br />
| {{key|Fn}}{{key|F7}} || switch display || [[thinkpad-acpi]], [[tpb]] || additional actions || <br />
|-<br />
| {{key|Fn}}{{key|F8}} || toggle display expansion || [[thinkpad-acpi]], [[tpb]] || additional actions ||<br />
|-<br />
| {{key|Fn}}{{key|F9}} || eject from dock || [[thinkpad-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|F12}} || hibernate || [[ibm-acpi]], [[thinkpad-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|Pos1}} || brightness up || [[tpb]] || additional actions ||<br />
|-<br />
| {{key|Fn}}{{key|End}} || brightness down || [[tpb]] || additional actions ||<br />
|-<br />
| {{key|Fn}}{{key|PageUp}} || toggle thinklight || [[ibm-acpi]], [[tpb]] || additional actions ||<br />
|-<br />
| {{key|Fn}}{{key|Space}} || toggle zoom || [[tpb]] || full ||<br />
|-<br />
| {{ibmkey|Access IBM|#495988}} or {{ibmkey|ThinkPad|#494949}} || help application || [[tpb]] || full ||<br />
|-<br />
| {{ibmkey|Home|#494949}} || open web browser || xmodmap, [[tpb]] || full || only iSeries and ext. keyboards<br />
|-<br />
| {{ibmkey|Search|#494949}} || open search application || xmodmap, [[tpb]] || full || only iSeries and ext. keyboards<br />
|-<br />
| {{ibmkey|Mail|#494949}} || open mail application || xmodmap, [[tpb]] || full || only iSeries and ext. keyboards<br />
|-<br />
| {{ibmkey|Favorites|#494949}} || open favorites || xmodmap, [[tpb]] || full || only iSeries and ext. keyboards<br />
|-<br />
| {{ibmkey|Reload|#494949}} || reload web page || xmodmap, [[tpb]] || full || only iSeries and ext. keyboards<br />
|-<br />
| {{ibmkey|Abort|#494949}} || abort loading page || xmodmap, [[tpb]] || full || only iSeries and ext. keyboards<br />
|-<br />
| {{ibmkey|Backward|#494949}} || previous page || xmodmap, [[tpb]] || full || iSeries, ext. keyboards, Thinkpads starting from 2002<br />
|-<br />
| {{ibmkey|Forward|#494949}} || next page || xmodmap, [[tpb]] || full || iSeries, ext. keyboards, Thinkpads starting from 2002<br />
|-<br />
| {{ibmkey|Volume up|#494949}} || volume up || [[tpb]] || additional actions ||<br />
|-<br />
| {{ibmkey|Volume down|#494949}} || volume down || [[tpb]] || additional actions ||<br />
|-<br />
| {{ibmkey|Volume mute|#494949}} || mute volume || [[tpb]] || additional actions ||<br />
|-<br />
| {{ibmkey|Power|#494949}} || shutdown || [[ibm-acpi]] || full || triggered on pressing 3secs, but notebook goes off on 5sec press<br />
|-<br />
| Display lid || blank screen || [[ibm-acpi]] || full ||<br />
|-<br />
| Ultrabay lid || announce ultrabay change || [[ibm-acpi]] || full ||<br />
|-<br />
| Dock eject || eject from dock || [[ibm-acpi]] || full ||<br />
|}<br />
<br />
==Triggering key events==<br />
===ibm-acpi events===<br />
{| border="1" cellspacing="0" cellpadding="2"<br />
|+ events triggered by ibm-acpi for /etc/acpi/events files<br />
! key !! event<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|F12}} || ibm/hotkey HKEY 00000080 0000100c<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 />
<br />
===tpb configuration===<br />
{| border="1" cellspacing="0" cellpadding="2"<br />
|+ configuration keywords for 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}} || 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 XEVENTS=off in your tpbrc.<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 />
Usually you should write your keycode-keysym associations into the file ~/.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 ~/.Xmodmap lines for our purpose are in the form of<br />
keycode <keycode> = <keysym><br />
<br />
The following table shows the keycodes generated by the Thinkpad special keys and sensible keysyms to assign them to.<br />
{| border="1" cellspacing="0" cellpadding="2"<br />
|+ keycodes and recommended keysyms<br />
! key !! keycode !! keysym<br />
|-<br />
| {{ibmkey|Backward|#494949}} || 234 || XF86Back or F21<br />
|-<br />
| {{ibmkey|Forward|#494949}} || 233 || XF86Forward or F22<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 />
(In case you want to use the browser keys in Firefox, you will have to assign the F21 and F22 or similar keysyms to them.)<br />
<br />
Note: if you are running tpb you might need to add the line XEVENTS=off into your tpbrc to stop it from grabbing the key events and allow them to get through to X instead.<br />
<br />
==Example Applications==<br />
===Web Browsers===<br />
====Firefox====<br />
(First of all thanks go to Ryan Barrett for writing the little howto on his blog.)<br /><br />
To have firefox make use of the browser keys you need to modify one of its files.<br />
To do this you will first need to extract it from the browser.jar archive. Do...<br />
$ cd <firefox-directory>/chrome<br />
$ unzip browser.jar<br />
The file of interest is content/browser/browser.xul. Edit it...<br />
$ vi content/browser/browser.xul<br />
Look for the '''<keyset id="mainKeyset">''' section and add the following lines within...<br />
<key id="goBackTP" keycode="VK_F21" command="Browser:Back" /><br />
<key id="goForwardTP" keycode="VK_F22" command="Browser:Forward" /><br />
No save the file and repackage the browser.jar archive...<br />
$ zip -rD0 browser.jar content/browser/<br />
That's it.<br />
<br />
Another interesting Page on Firefox is http://dqd.com/~mayoff/notes/thinkpad/dqdnavkeys/ It uses different key mappings (F19 resp. F20) but a ready .xpi is provided which is pretty comfortable.<br />
<br />
====Opera====<br />
However this isn't simple configration file, you can set your browser manualy.<br /><br />
Go to <i>Tool > Settings > Mouse and keyboard > Keyboard settings > Edit > Browser Window</i>. There add F21 - Back and F22 - Forward. Now you can surf using your TP keys ;-)<br />
<br />
===Window Managers===<br />
====fvwm====<br />
To get the Backwards and Forwards keys to cycle through pages in the virtual desktop, add this to your .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 />
====pekwm configuration====<br />
This is just a small example of what else you can do with your extra keys.<br /><br />
I configured the two browser keys of my T41p to switch workspaces in pekwm, by adding the following two lines to the .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 $HOME/.pwm/keys-default.conf or /etc/pwm/keys-default.conf:<br />
kbind "Back", "switch_rot", -1<br />
kbind "Forward", "switch_rot", 1<br />
<br />
===Other Uses===<br />
====Console tools configuraton====<br />
To make the prev page / next page keys (located at the cursor keys on my T42p) useful in console, add this to your keymap (/etc/console/boottime.kmap.gz in Debian):<br />
keycode 158 = Decr_Console<br />
keycode 159 = Incr_Console</div>217.93.11.239https://www.thinkwiki.org/w/index.php?title=Help:Editing&diff=6064Help:Editing2005-05-13T04:02:51Z<p>217.93.11.239: /* use semantic formatting */</p>
<hr />
<div>==general help==<br />
<br />
For general help in editing please read [[Wikipedia:How_to_edit_a_page | Wikipedias "How to edit a page" page]].<br />
<br />
==ThinkWiki editing policies==<br />
<br />
===write with other users in your mind===<br />
When you write an article, keep the following things in mind...<br />
*Respect others. Try sticking to a [http://en.wikipedia.org/wiki/Npov neutral point of view]. Respect the work of other writers. Respect your (potential) readers.<br />
*ThinkWiki is not only about the newest models. Try to write in a way that is open for older, newer and future models. This especially regards the structuring of the information you provide.<br />
*ThinkWiki is not only about your Distro. Try to make clear if something you write is valid only for your specific linux distribution.<br />
*Even though the article is written by you, it is a piece of information others might work on later. Try to avoid personal remarks in your articles.<br />
<br />
===naming policies for new pages===<br />
If you create a new page, please consider the following page naming policies. This is important to keep a persistent page naming scheme and hence to ensure that ThinkWiki still works well when it has grown more complex.<br />
<br />
Page names (the links you create to point to the page) are used as the page Title. Considering these policies has the following advantages:<br />
*the pages will have self-explaining titles<br />
*in Category views like the Model view the links to the pages are expressively labeled and similar pages are sorted together<br />
*the pages are more easily found in search engines like google<br />
<br />
====general policies====<br />
*It is allowed and in fact wanted that you use spaces within your page titles.<br />
*The name you choose for the page should be as specific as its content will be. In other words...it should not be possible to write another page with more general content about the topic that your page title indicates.<br />
<br />
====specific kinds of pages====<br />
To sort similar pages together in the Model views, we start specific pages in defined ways.<br />
The following table shows the naming schemes for several kinds of pages...<br />
{| border="1" cellspacing="0" cellpadding="2"<br />
|+page naming schemes<br />
! page type !! naming scheme !! example<br />
|-<br />
| Installation instructions overview for a model || Installation instructions for the <model> || Installation instructions for the Thinkpad T41p<br />
|-<br />
| Installation instructions for a specific distro on a model || Installing <distro> on a <model> || Installing Gentoo on a Thinkpad T41p<br />
|-<br />
| other HowTos || How to ... || How to get special keys to work<br />
|-<br />
| Problem descriptions || Problem with ... || Problem with lm-sensors<br />
|-<br />
| Drivers and Tools pages || <name of driver/tool> || ibm-acpi<br />
|-<br />
| Patches || Patch ... || Patch disabling ACPI C3<br />
|-<br />
| Components || <name of component as used by IBM> || IBM 11a/b/g Wireless LAN Mini PCI Adapter II<br />
|-<br />
| Distro pages || Category:<distro> || Category:SuSE<br />
|-<br />
| Thinkpad Models || Category:<Model without "Thinkpad"> || Category:T41p<br />
|-<br />
| Specifications || <type number-model number> || 2373-GHG<br />
|-<br />
|}<br />
<br />
=== use semantic formatting ===<br />
Please prefer semantic formatting over beauty. To help maintaining a formatting standard, you can use the following templates:<br />
{| border="1" cellspacing="0" cellpadding="2"<br />
! syntax !! resulting output<br />
|- style="vertical-align:top;"<br />
| <nowiki>{{cmd|command}}</nowiki> || {{cmd|command}}<br />
|- style="vertical-align:top;"<br />
| <nowiki>{{cmdroot|command}}</nowiki> || {{cmdroot|command}}<br />
|- style="vertical-align:top;"<br />
| <nowiki>{{HINT|A suggestion.}}</nowiki> || {{HINT|A suggestion.}}<br />
|- style="vertical-align:top;"<br />
| <nowiki>{{NOTE|Take notice!}}</nowiki> || {{NOTE|Take notice!}}<br />
|- style="vertical-align:top;"<br />
| <nowiki>{{WARN|Be careful!}}</nowiki> || {{WARN|Be careful!}}<br />
|-<br />
|<nowiki>{{key|Fn}}{{key|F4}}</nowiki> || {{key|Fn}}{{key|F4}}<br />
|-<br />
|<nowiki>{{ibmkey|Access IBM|#495988}} = {{ibmkey|ThinkPad|#494949}}</nowiki> || {{ibmkey|Access IBM|#495988}} = {{ibmkey|ThinkPad|#494949}}<br />
|}</div>217.93.11.239https://www.thinkwiki.org/w/index.php?title=Help:Editing&diff=4858Help:Editing2005-05-13T04:01:31Z<p>217.93.11.239: </p>
<hr />
<div>==general help==<br />
<br />
For general help in editing please read [[Wikipedia:How_to_edit_a_page | Wikipedias "How to edit a page" page]].<br />
<br />
==ThinkWiki editing policies==<br />
<br />
===write with other users in your mind===<br />
When you write an article, keep the following things in mind...<br />
*Respect others. Try sticking to a [http://en.wikipedia.org/wiki/Npov neutral point of view]. Respect the work of other writers. Respect your (potential) readers.<br />
*ThinkWiki is not only about the newest models. Try to write in a way that is open for older, newer and future models. This especially regards the structuring of the information you provide.<br />
*ThinkWiki is not only about your Distro. Try to make clear if something you write is valid only for your specific linux distribution.<br />
*Even though the article is written by you, it is a piece of information others might work on later. Try to avoid personal remarks in your articles.<br />
<br />
===naming policies for new pages===<br />
If you create a new page, please consider the following page naming policies. This is important to keep a persistent page naming scheme and hence to ensure that ThinkWiki still works well when it has grown more complex.<br />
<br />
Page names (the links you create to point to the page) are used as the page Title. Considering these policies has the following advantages:<br />
*the pages will have self-explaining titles<br />
*in Category views like the Model view the links to the pages are expressively labeled and similar pages are sorted together<br />
*the pages are more easily found in search engines like google<br />
<br />
====general policies====<br />
*It is allowed and in fact wanted that you use spaces within your page titles.<br />
*The name you choose for the page should be as specific as its content will be. In other words...it should not be possible to write another page with more general content about the topic that your page title indicates.<br />
<br />
====specific kinds of pages====<br />
To sort similar pages together in the Model views, we start specific pages in defined ways.<br />
The following table shows the naming schemes for several kinds of pages...<br />
{| border="1" cellspacing="0" cellpadding="2"<br />
|+page naming schemes<br />
! page type !! naming scheme !! example<br />
|-<br />
| Installation instructions overview for a model || Installation instructions for the <model> || Installation instructions for the Thinkpad T41p<br />
|-<br />
| Installation instructions for a specific distro on a model || Installing <distro> on a <model> || Installing Gentoo on a Thinkpad T41p<br />
|-<br />
| other HowTos || How to ... || How to get special keys to work<br />
|-<br />
| Problem descriptions || Problem with ... || Problem with lm-sensors<br />
|-<br />
| Drivers and Tools pages || <name of driver/tool> || ibm-acpi<br />
|-<br />
| Patches || Patch ... || Patch disabling ACPI C3<br />
|-<br />
| Components || <name of component as used by IBM> || IBM 11a/b/g Wireless LAN Mini PCI Adapter II<br />
|-<br />
| Distro pages || Category:<distro> || Category:SuSE<br />
|-<br />
| Thinkpad Models || Category:<Model without "Thinkpad"> || Category:T41p<br />
|-<br />
| Specifications || <type number-model number> || 2373-GHG<br />
|-<br />
|}<br />
<br />
=== use semantic formatting ===<br />
Please prefer semantic formatting over beauty. To help maintaining a formatting standard, you can use the following templates:<br />
{| border="1" cellspacing="0" cellpadding="2"<br />
! syntax !! resulting output<br />
|- style="vertical-align:top;"<br />
| <nowiki>{{cmd|command}}</nowiki> || {{cmd|command}}<br />
|- style="vertical-align:top;"<br />
| <nowiki>{{cmdroot|command}}</nowiki> || {{cmdroot|command}}<br />
|- style="vertical-align:top;"<br />
| <nowiki>{{HINT|A suggestion.}}</nowiki> || {{HINT|A suggestion.}}<br />
|- style="vertical-align:top;"<br />
| <nowiki>{{NOTE|Take notice!}}</nowiki> || {{NOTE|Take notice!}}<br />
|- style="vertical-align:top;"<br />
| <nowiki>{{WARN|Be careful!}}</nowiki> || {{WARN|Be careful!}}<br />
|-<br />
|<nowiki>{{key|Fn}}{{key|F4}}</nowiki> || {{key|Fn}}{{key|F4}}<br />
|-<br />
|<nowiki>{{ibmkey|Access IBM|#495988}}</nowiki> || {{ibmkey|Access IBM|#495988}}<br />
|}</div>217.93.11.239https://www.thinkwiki.org/w/index.php?title=How_to_get_special_keys_to_work&diff=4859How to get special keys to work2005-05-13T03:04:59Z<p>217.93.11.239: </p>
<hr />
<div>===Overview===<br />
{| border="1" cellspacing="0" cellpadding="2"<br />
! key !! standard function !! tool !! configurability !! remarks<br />
|-<br />
| {{key|Fn}} || - || xmodmap, [[tpb]] || full || on release without completed key combination<br />
|-<br />
| {{key|Fn}}{{key|F3}} || blank screen || [[ibm-acpi]], [[thinkpad-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|F4}} || suspend to ram || [[ibm-acpi]], [[thinkpad-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|F5}} || switch bluetooth || [[ibm-acpi]], [[thinkpad-acpi]] || full || in models starting from 2002<br />
|-<br />
| {{key|Fn}}{{key|F7}} || switch display || [[thinkpad-acpi]], [[tpb]] || additional actions || <br />
|-<br />
| {{key|Fn}}{{key|F8}} || toggle display expansion || [[thinkpad-acpi]], [[tpb]] || additional actions ||<br />
|-<br />
| {{key|Fn}}{{key|F9}} || eject from dock || [[thinkpad-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|F12}} || hibernate || [[ibm-acpi]], [[thinkpad-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|Pos1}} || brightness up || [[tpb]] || additional actions ||<br />
|-<br />
| {{key|Fn}}{{key|End}} || brightness down || [[tpb]] || additional actions ||<br />
|-<br />
| {{key|Fn}}{{key|PageUp}} || toggle thinklight || [[ibm-acpi]], [[tpb]] || additional actions ||<br />
|-<br />
| {{key|Fn}}{{key|Space}} || toggle zoom || [[tpb]] || full ||<br />
|-<br />
| {{ibmkey|Access IBM|#495988}} or {{ibmkey|ThinkPad|#494949}} || help application || [[tpb]] || full ||<br />
|-<br />
| {{ibmkey|Home|#494949}} || open web browser || xmodmap, [[tpb]] || full || only iSeries and ext. keyboards<br />
|-<br />
| {{ibmkey|Search|#494949}} || open search application || xmodmap, [[tpb]] || full || only iSeries and ext. keyboards<br />
|-<br />
| {{ibmkey|Mail|#494949}} || open mail application || xmodmap, [[tpb]] || full || only iSeries and ext. keyboards<br />
|-<br />
| {{ibmkey|Favorites|#494949}} || open favorites || xmodmap, [[tpb]] || full || only iSeries and ext. keyboards<br />
|-<br />
| {{ibmkey|Reload|#494949}} || reload web page || xmodmap, [[tpb]] || full || only iSeries and ext. keyboards<br />
|-<br />
| {{ibmkey|Abort|#494949}} || abort loading page || xmodmap, [[tpb]] || full || only iSeries and ext. keyboards<br />
|-<br />
| {{ibmkey|Backward|#494949}} || previous page || xmodmap, [[tpb]] || full || iSeries, ext. keyboards, Thinkpads starting from 2002<br />
|-<br />
| {{ibmkey|Forward|#494949}} || next page || xmodmap, [[tpb]] || full || iSeries, ext. keyboards, Thinkpads starting from 2002<br />
|-<br />
| {{ibmkey|Volume up|#494949}} || volume up || [[tpb]] || additional actions ||<br />
|-<br />
| {{ibmkey|Volume down|#494949}} || volume down || [[tpb]] || additional actions ||<br />
|-<br />
| {{ibmkey|Volume mute|#494949}} || mute volume || [[tpb]] || additional actions ||<br />
|-<br />
| {{ibmkey|Power|#494949}} || shutdown || [[ibm-acpi]] || full || triggered on pressing 3secs, but notebook goes off on 5sec press<br />
|-<br />
| Display lid || blank screen || [[ibm-acpi]] || full ||<br />
|-<br />
| Ultrabay lid || announce ultrabay change || [[ibm-acpi]] || full ||<br />
|-<br />
| Dock eject || eject from dock || [[ibm-acpi]] || full ||<br />
|}<br />
<br />
===ibm-acpi events===<br />
{| border="1" cellspacing="0" cellpadding="2"<br />
|+ events triggered by ibm-acpi for /etc/acpi/events files<br />
! key !! event<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|F12}} || ibm/hotkey HKEY 00000080 0000100c<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 />
<br />
===tpb configuration===<br />
{| border="1" cellspacing="0" cellpadding="2"<br />
|+ configuration keywords for 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}} || 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 XEVENTS=off in your tpbrc.<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 />
Usually you should write your keycode-keysym associations into the file ~/.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 ~/.Xmodmap lines for our purpose are in the form of<br />
keycode <keycode> = <keysym><br />
<br />
The following table shows the keycodes generated by the Thinkpad special keys and sensible keysyms to assign them to.<br />
{| border="1" cellspacing="0" cellpadding="2"<br />
|+ keycodes and recommended keysyms<br />
! key !! keycode !! keysym<br />
|-<br />
| {{ibmkey|Backward|#494949}} || 234 || XF86Back or F21<br />
|-<br />
| {{ibmkey|Forward|#494949}} || 233 || XF86Forward or F22<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 />
(In case you want to use the browser keys in Firefox, you will have to assign the F21 and F22 or similar keysyms to them.)<br />
<br />
Note: if you are running tpb you might need to add the line XEVENTS=off into your tpbrc to stop it from grabbing the key events and allow them to get through to X instead.<br />
<br />
===firefox configuration===<br />
(First of all thanks go to Ryan Barrett for writing the little howto on his blog.)<br /><br />
To have firefox make use of the browser keys you need to modify one of its files.<br />
To do this you will first need to extract it from the browser.jar archive. Do...<br />
$ cd <firefox-directory>/chrome<br />
$ unzip browser.jar<br />
The file of interest is content/browser/browser.xul. Edit it...<br />
$ vi content/browser/browser.xul<br />
Look for the '''<keyset id="mainKeyset">''' section and add the following lines within...<br />
<key id="goBackTP" keycode="VK_F21" command="Browser:Back" /><br />
<key id="goForwardTP" keycode="VK_F22" command="Browser:Forward" /><br />
No save the file and repackage the browser.jar archive...<br />
$ zip -rD0 browser.jar content/browser/<br />
That's it.<br />
<br />
Another interesting Page on Firefox is http://dqd.com/~mayoff/notes/thinkpad/dqdnavkeys/ It uses different key mappings (F19 resp. F20) but a ready .xpi is provided which is pretty comfortable.<br />
<br />
===pekwm configuration===<br />
This is just a small example of what else you can do with your extra keys.<br /><br />
I configured the two browser keys of my T41p to switch workspaces in pekwm, by adding the following two lines to the .pekwm/keys file:<br />
KeyPress = "Mod1 XF86Back" { Actions = "GoToWorkspace prev" }<br />
KeyPress = "Mod1 XF86Forward" { Actions = "GoToWorkspace next" }<br />
<br />
===pwm configuration===<br />
Another example how to use these two keys to switch between pwm tabs. These two lines should be added to $HOME/.pwm/keys-default.conf or /etc/pwm/keys-default.conf:<br />
kbind "Back", "switch_rot", -1<br />
kbind "Forward", "switch_rot", 1<br />
<br />
===opera configuration===<br />
However this isn't simple configration file, you can set your browser manualy.<br /><br />
Go to <i>Tool > Settings > Mouse and keyboard > Keyboard settings > Edit > Browser Window</i>. There add F21 - Back and F22 - Forward. Now you can surf using your TP keys ;-)<br />
<br />
===fvwm configuration===<br />
To get the Backwards and Forwards keys to cycle through pages in the virtual desktop, add this to your .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 />
===Console tools configuraton===<br />
To make the prev page / next page keys (located at the cursor keys on my T42p) useful in console, add this to your keymap (/etc/console/boottime.kmap.gz in Debian):<br />
keycode 158 = Decr_Console<br />
keycode 159 = Incr_Console</div>217.93.11.239https://www.thinkwiki.org/w/index.php?title=Template:Ibmkey&diff=10085Template:Ibmkey2005-05-13T02:54:51Z<p>217.93.11.239: </p>
<hr />
<div><span style="border: 3px outset {{{2}}};-moz-border-radius:3px;background-color:{{{2}}};color:white;text-align:center;vertical-align:middle;padding-left:2px;padding-top:0px;padding-bottom:1pt;padding-right:2px;font-family:sans-serif;font-size:smaller;font-weight:bold;">{{{1}}}</span></div>217.93.11.239https://www.thinkwiki.org/w/index.php?title=How_to_get_special_keys_to_work&diff=4856How to get special keys to work2005-05-13T02:53:05Z<p>217.93.11.239: /* Overview */</p>
<hr />
<div>===Overview===<br />
{| border="1" cellspacing="0" cellpadding="2"<br />
! key !! standard function !! tool !! configurability !! remarks<br />
|-<br />
| {{key|Fn}} || - || xmodmap, [[tpb]] || full || on release without completed key combination<br />
|-<br />
| {{key|Fn}}{{key|F3}} || blank screen || [[ibm-acpi]], [[thinkpad-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|F4}} || suspend to ram || [[ibm-acpi]], [[thinkpad-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|F5}} || switch bluetooth || [[ibm-acpi]], [[thinkpad-acpi]] || full || in models starting from 2002<br />
|-<br />
| {{key|Fn}}{{key|F7}} || switch display || [[thinkpad-acpi]], [[tpb]] || additional actions || <br />
|-<br />
| {{key|Fn}}{{key|F8}} || toggle display expansion || [[thinkpad-acpi]], [[tpb]] || additional actions ||<br />
|-<br />
| {{key|Fn}}{{key|F9}} || eject from dock || [[thinkpad-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|F12}} || hibernate || [[ibm-acpi]], [[thinkpad-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|Pos1}} || brightness up || [[tpb]] || additional actions ||<br />
|-<br />
| {{key|Fn}}{{key|End}} || brightness down || [[tpb]] || additional actions ||<br />
|-<br />
| {{key|Fn}}{{key|PageUp}} || toggle thinklight || [[ibm-acpi]], [[tpb]] || additional actions ||<br />
|-<br />
| {{key|Fn}}{{key|Space}} || toggle zoom || [[tpb]] || full ||<br />
|-<br />
| {{ibmkey|Access IBM}} or {{ibmkey|ThinkPad}} || help application || [[tpb]] || full ||<br />
|-<br />
| {{ibmkey|Home}} || open web browser || xmodmap, [[tpb]] || full || only iSeries and ext. keyboards<br />
|-<br />
| {{ibmkey|Search}} || open search application || xmodmap, [[tpb]] || full || only iSeries and ext. keyboards<br />
|-<br />
| {{ibmkey|Mail}} || open mail application || xmodmap, [[tpb]] || full || only iSeries and ext. keyboards<br />
|-<br />
| {{ibmkey|Favorites}} || open favorites || xmodmap, [[tpb]] || full || only iSeries and ext. keyboards<br />
|-<br />
| {{ibmkey|Reload}} || reload web page || xmodmap, [[tpb]] || full || only iSeries and ext. keyboards<br />
|-<br />
| {{ibmkey|Abort}} || abort loading page || xmodmap, [[tpb]] || full || only iSeries and ext. keyboards<br />
|-<br />
| {{ibmkey|Backward}} || previous page || xmodmap, [[tpb]] || full || iSeries, ext. keyboards, Thinkpads starting from 2002<br />
|-<br />
| {{ibmkey|Forward}} || next page || xmodmap, [[tpb]] || full || iSeries, ext. keyboards, Thinkpads starting from 2002<br />
|-<br />
| {{ibmkey|Volume up}} || volume up || [[tpb]] || additional actions ||<br />
|-<br />
| {{ibmkey|Volume down}} || volume down || [[tpb]] || additional actions ||<br />
|-<br />
| {{ibmkey|Volume mute}} || mute volume || [[tpb]] || additional actions ||<br />
|-<br />
| {{ibmkey|Power}} || shutdown || [[ibm-acpi]] || full || triggered on pressing 3secs, but notebook goes off on 5sec press<br />
|-<br />
| Display lid || blank screen || [[ibm-acpi]] || full ||<br />
|-<br />
| Ultrabay lid || announce ultrabay change || [[ibm-acpi]] || full ||<br />
|-<br />
| Dock eject || eject from dock || [[ibm-acpi]] || full ||<br />
|}<br />
<br />
===ibm-acpi events===<br />
{| border="1" cellspacing="0" cellpadding="2"<br />
|+ events triggered by ibm-acpi for /etc/acpi/events files<br />
! key !! event<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|F12}} || ibm/hotkey HKEY 00000080 0000100c<br />
|-<br />
| {{ibmkey|Power}} || 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 />
<br />
===tpb configuration===<br />
{| border="1" cellspacing="0" cellpadding="2"<br />
|+ configuration keywords for tpbrc<br />
! key !! config keyword<br />
|-<br />
| {{ibmkey|Access IBM}} or {{ibmkey|ThinkPad}} || THINKPAD<br />
|-<br />
| {{ibmkey|Home}} || HOME<br />
|-<br />
| {{ibmkey|Search}} || SEARCH<br />
|-<br />
| {{ibmkey|Mail}} || MAIL<br />
|-<br />
| {{ibmkey|Favorites}} || FAVORITES<br />
|-<br />
| {{ibmkey|Reload}} || RELOAD<br />
|-<br />
| {{ibmkey|Abort}} || ABORT<br />
|-<br />
| {{ibmkey|Backward}} || BACKWARD<br />
|-<br />
| {{ibmkey|Forward}} || 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}} || CALLBACK (brightness <percent>)<br />
|-<br />
| {{key|Fn}}{{key|End}} || CALLBACK (brightness <percent>)<br />
|-<br />
| {{ibmkey|Volume up}} || CALLBACK (volume <percent>)<br />
|-<br />
| {{ibmkey|Volume down}} || CALLBACK (volume <percent>)<br />
|-<br />
| {{ibmkey|Volume mute}} || 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 XEVENTS=off in your tpbrc.<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 />
Usually you should write your keycode-keysym associations into the file ~/.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 ~/.Xmodmap lines for our purpose are in the form of<br />
keycode <keycode> = <keysym><br />
<br />
The following table shows the keycodes generated by the Thinkpad special keys and sensible keysyms to assign them to.<br />
{| border="1" cellspacing="0" cellpadding="2"<br />
|+ keycodes and recommended keysyms<br />
! key !! keycode !! keysym<br />
|-<br />
| {{ibmkey|Backward}} || 234 || XF86Back or F21<br />
|-<br />
| {{ibmkey|Forward}} || 233 || XF86Forward or F22<br />
|-<br />
| {{ibmkey|Home}} || 178 || XF86HomePage<br />
|-<br />
| {{ibmkey|Search}} || 229 || XF86Search<br />
|-<br />
| {{ibmkey|Mail}} || 236 || XF86Mail<br />
|-<br />
| {{ibmkey|Favorites}} || 230 || XF86AddFavorite or XF86Favorites<br />
|-<br />
| {{ibmkey|Reload}} || 231 || XF86Reload<br />
|-<br />
| {{ibmkey|Abort}} || 232 || XF86Stop<br />
|-<br />
| {{key|Fn}} || 227 || F35<br />
|}<br />
<br />
(In case you want to use the browser keys in Firefox, you will have to assign the F21 and F22 or similar keysyms to them.)<br />
<br />
Note: if you are running tpb you might need to add the line XEVENTS=off into your tpbrc to stop it from grabbing the key events and allow them to get through to X instead.<br />
<br />
===firefox configuration===<br />
(First of all thanks go to Ryan Barrett for writing the little howto on his blog.)<br /><br />
To have firefox make use of the browser keys you need to modify one of its files.<br />
To do this you will first need to extract it from the browser.jar archive. Do...<br />
$ cd <firefox-directory>/chrome<br />
$ unzip browser.jar<br />
The file of interest is content/browser/browser.xul. Edit it...<br />
$ vi content/browser/browser.xul<br />
Look for the '''<keyset id="mainKeyset">''' section and add the following lines within...<br />
<key id="goBackTP" keycode="VK_F21" command="Browser:Back" /><br />
<key id="goForwardTP" keycode="VK_F22" command="Browser:Forward" /><br />
No save the file and repackage the browser.jar archive...<br />
$ zip -rD0 browser.jar content/browser/<br />
That's it.<br />
<br />
Another interesting Page on Firefox is http://dqd.com/~mayoff/notes/thinkpad/dqdnavkeys/ It uses different key mappings (F19 resp. F20) but a ready .xpi is provided which is pretty comfortable.<br />
<br />
===pekwm configuration===<br />
This is just a small example of what else you can do with your extra keys.<br /><br />
I configured the two browser keys of my T41p to switch workspaces in pekwm, by adding the following two lines to the .pekwm/keys file:<br />
KeyPress = "Mod1 XF86Back" { Actions = "GoToWorkspace prev" }<br />
KeyPress = "Mod1 XF86Forward" { Actions = "GoToWorkspace next" }<br />
<br />
===pwm configuration===<br />
Another example how to use these two keys to switch between pwm tabs. These two lines should be added to $HOME/.pwm/keys-default.conf or /etc/pwm/keys-default.conf:<br />
kbind "Back", "switch_rot", -1<br />
kbind "Forward", "switch_rot", 1<br />
<br />
===opera configuration===<br />
However this isn't simple configration file, you can set your browser manualy.<br /><br />
Go to <i>Tool > Settings > Mouse and keyboard > Keyboard settings > Edit > Browser Window</i>. There add F21 - Back and F22 - Forward. Now you can surf using your TP keys ;-)<br />
<br />
===fvwm configuration===<br />
To get the Backwards and Forwards keys to cycle through pages in the virtual desktop, add this to your .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 />
===Console tools configuraton===<br />
To make the prev page / next page keys (located at the cursor keys on my T42p) useful in console, add this to your keymap (/etc/console/boottime.kmap.gz in Debian):<br />
keycode 158 = Decr_Console<br />
keycode 159 = Incr_Console</div>217.93.11.239https://www.thinkwiki.org/w/index.php?title=How_to_get_special_keys_to_work&diff=4854How to get special keys to work2005-05-13T02:52:11Z<p>217.93.11.239: </p>
<hr />
<div>===Overview===<br />
{| border="1" cellspacing="0" cellpadding="2"<br />
! key !! standard function !! tool !! configurability !! remarks<br />
|-<br />
| {{key|Fn}} || - || xmodmap, [[tpb]] || full || on release without completed key combination<br />
|-<br />
| {{key|Fn}}{{key|F3}} || blank screen || [[ibm-acpi]], [[thinkpad-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|F4}} || suspend to ram || [[ibm-acpi]], [[thinkpad-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|F5}} || switch bluetooth || [[ibm-acpi]], [[thinkpad-acpi]] || full || in models starting from 2002<br />
|-<br />
| {{key|Fn}}{{key|F7}} || switch display || [[thinkpad-acpi]], [[tpb]] || additional actions || <br />
|-<br />
| {{key|Fn}}{{key|F8}} || toggle display expansion || [[thinkpad-acpi]], [[tpb]] || additional actions ||<br />
|-<br />
| {{key|Fn}}{{key|F9}} || eject from dock || [[thinkpad-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|F12}} || hibernate || [[ibm-acpi]], [[thinkpad-acpi]] || full ||<br />
|-<br />
| {{key|Fn}}{{key|Pos1}} || brightness up || [[tpb]] || additional actions ||<br />
|-<br />
| {{key|Fn}}{{key|End}} || brightness down || [[tpb]] || additional actions ||<br />
|-<br />
| {{key|Fn}}{{key|PageUp}} || toggle thinklight || [[ibm-acpi]], [[tpb]] || additional actions ||<br />
|-<br />
| {{key|Fn}}{{key|Space}} || toggle zoom || [[tpb]] || full ||<br />
|-<br />
| {{ibmkey|Access IBM}} or {{ibmkey|ThinkPad}} || help application || [[tpb]] || full ||<br />
|-<br />
| {{ibmkey|Home}} || open web browser || xmodmap, [[tpb]] || full || only iSeries and ext. keyboards<br />
|-<br />
| {{ibmkey|Search}} || open search application || xmodmap, [[tpb]] || full || only iSeries and ext. keyboards<br />
|-<br />
| {{ibmkey|Mail}} || open mail application || xmodmap, [[tpb]] || full || only iSeries and ext. keyboards<br />
|-<br />
| {{ibmkey|Favorites}} || open favorites || xmodmap, [[tpb]] || full || only iSeries and ext. keyboards<br />
|-<br />
| {{ibmkey|Reload}} || reload web page || xmodmap, [[tpb]] || full || only iSeries and ext. keyboards<br />
|-<br />
| {{ibmkey|Abort}} || abort loading page || xmodmap, [[tpb]] || full || only iSeries and ext. keyboards<br />
|-<br />
| {{ibmkey|Backward}} || previous page || xmodmap, [[tpb]] || full || iSeries, ext. keyboards, Thinkpads starting from 2002<br />
|-<br />
| {{ibmkey|Forward}} || next page || xmodmap, [[tpb]] || full || iSeries, ext. keyboards, Thinkpads starting from 2002<br />
|-<br />
| {{ibmkey|Volume up}} || volume up || [[tpb]] || additional actions ||<br />
|-<br />
| {{ibmkey|Volume down}} || volume down || [[tpb]] || additional actions ||<br />
|-<br />
| {{ibmkey|Volume mute}} || mute volume || [[tpb]] || additional actions ||<br />
|-<br />
| Power || shutdown || [[ibm-acpi]] || full || triggered on pressing 3secs, but notebook goes off on 5sec press<br />
|-<br />
| Display lid || blank screen || [[ibm-acpi]] || full ||<br />
|-<br />
| Ultrabay lid || announce ultrabay change || [[ibm-acpi]] || full ||<br />
|-<br />
| Dock eject || eject from dock || [[ibm-acpi]] || full ||<br />
|}<br />
<br />
===ibm-acpi events===<br />
{| border="1" cellspacing="0" cellpadding="2"<br />
|+ events triggered by ibm-acpi for /etc/acpi/events files<br />
! key !! event<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|F12}} || ibm/hotkey HKEY 00000080 0000100c<br />
|-<br />
| {{ibmkey|Power}} || 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 />
<br />
===tpb configuration===<br />
{| border="1" cellspacing="0" cellpadding="2"<br />
|+ configuration keywords for tpbrc<br />
! key !! config keyword<br />
|-<br />
| {{ibmkey|Access IBM}} or {{ibmkey|ThinkPad}} || THINKPAD<br />
|-<br />
| {{ibmkey|Home}} || HOME<br />
|-<br />
| {{ibmkey|Search}} || SEARCH<br />
|-<br />
| {{ibmkey|Mail}} || MAIL<br />
|-<br />
| {{ibmkey|Favorites}} || FAVORITES<br />
|-<br />
| {{ibmkey|Reload}} || RELOAD<br />
|-<br />
| {{ibmkey|Abort}} || ABORT<br />
|-<br />
| {{ibmkey|Backward}} || BACKWARD<br />
|-<br />
| {{ibmkey|Forward}} || 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}} || CALLBACK (brightness <percent>)<br />
|-<br />
| {{key|Fn}}{{key|End}} || CALLBACK (brightness <percent>)<br />
|-<br />
| {{ibmkey|Volume up}} || CALLBACK (volume <percent>)<br />
|-<br />
| {{ibmkey|Volume down}} || CALLBACK (volume <percent>)<br />
|-<br />
| {{ibmkey|Volume mute}} || 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 XEVENTS=off in your tpbrc.<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 />
Usually you should write your keycode-keysym associations into the file ~/.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 ~/.Xmodmap lines for our purpose are in the form of<br />
keycode <keycode> = <keysym><br />
<br />
The following table shows the keycodes generated by the Thinkpad special keys and sensible keysyms to assign them to.<br />
{| border="1" cellspacing="0" cellpadding="2"<br />
|+ keycodes and recommended keysyms<br />
! key !! keycode !! keysym<br />
|-<br />
| {{ibmkey|Backward}} || 234 || XF86Back or F21<br />
|-<br />
| {{ibmkey|Forward}} || 233 || XF86Forward or F22<br />
|-<br />
| {{ibmkey|Home}} || 178 || XF86HomePage<br />
|-<br />
| {{ibmkey|Search}} || 229 || XF86Search<br />
|-<br />
| {{ibmkey|Mail}} || 236 || XF86Mail<br />
|-<br />
| {{ibmkey|Favorites}} || 230 || XF86AddFavorite or XF86Favorites<br />
|-<br />
| {{ibmkey|Reload}} || 231 || XF86Reload<br />
|-<br />
| {{ibmkey|Abort}} || 232 || XF86Stop<br />
|-<br />
| {{key|Fn}} || 227 || F35<br />
|}<br />
<br />
(In case you want to use the browser keys in Firefox, you will have to assign the F21 and F22 or similar keysyms to them.)<br />
<br />
Note: if you are running tpb you might need to add the line XEVENTS=off into your tpbrc to stop it from grabbing the key events and allow them to get through to X instead.<br />
<br />
===firefox configuration===<br />
(First of all thanks go to Ryan Barrett for writing the little howto on his blog.)<br /><br />
To have firefox make use of the browser keys you need to modify one of its files.<br />
To do this you will first need to extract it from the browser.jar archive. Do...<br />
$ cd <firefox-directory>/chrome<br />
$ unzip browser.jar<br />
The file of interest is content/browser/browser.xul. Edit it...<br />
$ vi content/browser/browser.xul<br />
Look for the '''<keyset id="mainKeyset">''' section and add the following lines within...<br />
<key id="goBackTP" keycode="VK_F21" command="Browser:Back" /><br />
<key id="goForwardTP" keycode="VK_F22" command="Browser:Forward" /><br />
No save the file and repackage the browser.jar archive...<br />
$ zip -rD0 browser.jar content/browser/<br />
That's it.<br />
<br />
Another interesting Page on Firefox is http://dqd.com/~mayoff/notes/thinkpad/dqdnavkeys/ It uses different key mappings (F19 resp. F20) but a ready .xpi is provided which is pretty comfortable.<br />
<br />
===pekwm configuration===<br />
This is just a small example of what else you can do with your extra keys.<br /><br />
I configured the two browser keys of my T41p to switch workspaces in pekwm, by adding the following two lines to the .pekwm/keys file:<br />
KeyPress = "Mod1 XF86Back" { Actions = "GoToWorkspace prev" }<br />
KeyPress = "Mod1 XF86Forward" { Actions = "GoToWorkspace next" }<br />
<br />
===pwm configuration===<br />
Another example how to use these two keys to switch between pwm tabs. These two lines should be added to $HOME/.pwm/keys-default.conf or /etc/pwm/keys-default.conf:<br />
kbind "Back", "switch_rot", -1<br />
kbind "Forward", "switch_rot", 1<br />
<br />
===opera configuration===<br />
However this isn't simple configration file, you can set your browser manualy.<br /><br />
Go to <i>Tool > Settings > Mouse and keyboard > Keyboard settings > Edit > Browser Window</i>. There add F21 - Back and F22 - Forward. Now you can surf using your TP keys ;-)<br />
<br />
===fvwm configuration===<br />
To get the Backwards and Forwards keys to cycle through pages in the virtual desktop, add this to your .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 />
===Console tools configuraton===<br />
To make the prev page / next page keys (located at the cursor keys on my T42p) useful in console, add this to your keymap (/etc/console/boottime.kmap.gz in Debian):<br />
keycode 158 = Decr_Console<br />
keycode 159 = Incr_Console</div>217.93.11.239https://www.thinkwiki.org/w/index.php?title=Template:Ibmkey&diff=4855Template:Ibmkey2005-05-13T02:47:37Z<p>217.93.11.239: </p>
<hr />
<div><span style="border: 3px outset #000000;-moz-border-radius:3px;background-color:#666666;color:white;text-align:center;vertical-align:middle;padding-left:2px;padding-top:0px;padding-bottom:1pt;padding-right:2px;font-family:sans-serif;font-size:smaller;font-weight:bold;">{{{1}}}</span></div>217.93.11.239https://www.thinkwiki.org/w/index.php?title=Talk:Problem_with_fan_noise&diff=4863Talk:Problem with fan noise2005-05-13T02:39:58Z<p>217.93.11.239: </p>
<hr />
<div>== Problem with fan noise on R51 1829 L7G (ATI M9) ==<br />
<br />
On my R51 the fan is behaving like this:<br />
<br />
* > 45C -> fan on;<br />
* < 38C -> fan off.<br />
<br />
By using cpufreq + laptop_mode + Xorg DynamicClocks + WiFi power management, I get the fan stopped time to time, but only for 3 minutes time (transition from 38 C -> 45 C). The cooling down cycle is taking 20 minutes in the best case.<br />
<br />
I knew about the 'ibm_acpi experimental=1' trick, but in my opinion this is not very useful since nobody can guarantee that a temperature greater then 45 C will not damage the laptop and in the same time the transition time is very short (the laptop gets hot fast without fan).<br />
<br />
== Thinkpad T42 Radeon Mobility M7 ==<br />
<br />
When Xorg is running, the fan is always one and pretty loud !<br />
Setting DynamicClocks does not help<br />
<br />
it's clear that the GPU is the problem on the thinkpad :<br />
<br />
after 10minutes with the fan off<br />
temperatures: 44 47 33 52 32 -128 24 -128<br />
<br />
1: CPU<br />
2: Mini PCI Module<br />
3: HDD<br />
4: GPU<br />
5: Battery<br />
6: N/A<br />
7: Battery<br />
8: N/A<br />
<br />
Controlling the fan speed would be really cool !<br />
<br />
What is the maximum temperature not to cross ?<br />
<br />
== Thinkpad R32 with Radeon Mobility M6 ==<br />
<br />
Updating xorg-x11 from 6.7.0 to 6.8.2 and using Speedstep (with the ondemand-module in this case) helped cooling the system down from ~62 C to ~55 C in idle state, and thus lowered the fan noise significantly.<br />
But I remember using my old SuSE distribution with kernel 2.4.16, apm and some old x11 version the fan actually stopped completely from time to time.<br />
<br />
Concerning the maximum temperature, I found that the critical temperature on the R32 for the (only :-( ) sensor is 72 C<br />
<br />
----<br />
<br />
What is the maximum temperature for CPU and GPU ? 55° 60° ?</div>217.93.11.239https://www.thinkwiki.org/w/index.php?title=Problem_with_fan_noise&diff=5274Problem with fan noise2005-05-13T02:39:38Z<p>217.93.11.239: /* partial fix: */</p>
<hr />
<div>Information about the fan noise problem in Thinkpad models from 2003/2004.<br />
<br />
==Problem description==<br />
<br />
There seem to be two different occurances of the problem (or two different problems).<br />
<br />
===acceleration problem:===<br />
The Thinkpad Fan accelerates in regular intervals, making an annoying noise.<br />
<br />
===always on problem:===<br />
The Fan is always on, even though the processor is rather cool.<br />
<br />
==Affected Models==<br />
<br />
===acceleration problem:===<br />
*Thinkpad {{T40}}, {{T40p}}, {{T41}}, {{T42}}(?)<br />
<br />
===always on problem:===<br />
*Thinkpad {{T40}}, {{T40p}}, {{T41}}, {{T41p}}, {{T42}}, {{T42p}}, {{T43}}<br />
*Thinkpad {{R32}}, {{R50}}, {{R50p}}, {{R51}}, {{R52}}<br />
*Thinkpad {{X40}}<br />
*Thinkpad {{A31p}}<br />
*Thinkpad {{770X}}<br />
<br />
==Affected Operating Systems==<br />
<br />
===acceleration problem:===<br />
*Linux, all flavours<br />
<br />
===always on problem:===<br />
*Linux, all flavours<br />
*FreeBSD 5.3<br />
*Windows XP<br />
*Windows 2000 pro<br />
<br />
==Status==<br />
<br />
===acceleration problem:===<br />
IBM released an update to the embedded controller program that seems to at least partially solve this problem:<br />
<br />
Version 3.03 - 1RHT70WW<br />
NOTE: This version of Embedded Controller Program will only work with BIOS Version 3.06f (or higher).<br />
* (Fix) Reduced Fan noise in some models.<br />
<br />
The update can be found here: http://www-306.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-50279<br />
<br />
===always on problem:===<br />
The problem is yet unsolved. But see the partial fix below.<br />
<br />
IBM made a statement regarding this on their homepage:<br />
http://www-307.ibm.com/pc/support/site.wss/MIGR-56504.html<br />
<br />
It seems that it's a feature of centrino - http://mailman.linux-thinkpad.org/pipermail/linux-thinkpad/2004-September/019737.html<br />
Perhaps it's fixable by adding the fans and temps to the dsdt?<br />
<br />
==Solutions==<br />
<br />
===acceleration problem:===<br />
<br />
====Replacing the fan====<br />
Some people reported that they replaced the original fan against one of a similar notebook without the problem has worked for them, i.e. changing a {{T41}}s fan against one from a {{T41p}}.<br />
<br />
====BIOS upgrade====<br />
You can try upgrading your embedded controller program to version 3.03 or newer.<br />
<br />
The update can be found here: http://www-306.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-50279<br />
<br />
===always on problem:===<br />
<br />
It seems like for some people a combination of enabling dynamic frequency scaling and using the most recent radeon drivers (from xorg 6.8.x) with the DynamicClocks option enabled helped lowing the fan rotation and hence making it more quiet.<br />
<br />
Also the fglrx driver from ATI is said to show the same effect when used together with dynamic frequency scaling.<br />
<br />
On a 770X the fan can be fully controlled through ACPI. Thermal Zone THM5 (possibly the battery/charging circuit, it's definitely warmer when using 5v PCMCIA cards and AC) triggers it to turn on and not ever off by design. Can be solved by a custom DSDT, which also makes use of the variable-speed features of the fan (will release this once I've finished tweaking and testing it).<br />
<br />
====partial fix:====<br />
{{WARN|This circumvents the BIOS fan control, so be careful and use at your own risk! Don't toast your ThinkPad.}}<br />
<br />
When loading [[ibm-acpi]] v0.11 with experimental switch (modprobe ibm_acpi experimantal=1), it is possible to read and write the status of fan:<br />
<br />
'''#cat /proc/acpi/ibm/fan'''<br />
status: enabled<br />
speed: 3580<br />
commands: enable, disable<br />
<br />
'''#echo disable > /proc/acpi/ibm/fan'''<br />
<br />
'''cat /proc/acpi/ibm/fan'''<br />
status: disabled<br />
speed: 0<br />
commands: enable, disable<br />
<br />
But the fan will then '''never''' wake up. So, we need a [[ACPI fan control script|small script]] witch is constantly checking the temperature and setting the fan on/off when needed.</div>217.93.11.239https://www.thinkwiki.org/w/index.php?title=Problem_with_high_pitch_noises&diff=5358Problem with high pitch noises2005-05-13T02:38:40Z<p>217.93.11.239: /* Solutions */</p>
<hr />
<div>Information on strange high pitch, low volume noises emitted by ThinkPads.<br />
<br />
==Problem description==<br />
Even though ThinkPads are known as very silent notebooks, they tend to emit different, mostly high pitch noises in certain circumstances. The noises are of low volume and hence not realized by everyone or at least tolerated by most people. However, there are those with "bat like ears" that hear them and might be annoyed by that.<br />
<br />
==Affected Models==<br />
Noises have been experienced in the following situations:<br />
{| border="1" cellspacing="0" cellpadding="2"<br />
|-<br />
! style="vertical-align:top;background-color:#DDDDDD;" | situation<br />
! style="vertical-align:top;background-color:#DDDDDD;" | noise description<br />
! style="vertical-align:top;background-color:#DDDDDD;" | affected models<br />
|-<br />
| style="vertical-align:top;" |<br />
ThinkPad suspended to RAM<br />
| style="vertical-align:top;" |<br />
constant high pitch noise<br />
| style="vertical-align:top;" |<br />
*{{T42p}}<br />
|-<br />
| style="vertical-align:top;" |<br />
ThinkPad connected to power and switched off, with battery fully charged<br />
| style="vertical-align:top;" |<br />
constant high pitch noise<br />
| style="vertical-align:top;" |<br />
*{{T41p}}<br />
**2373-GHG<br />
|-<br />
| style="vertical-align:top;" |<br />
moving windows or just the mouse in xorg<br />
| style="vertical-align:top;" |<br />
strange noise like a rapid series of very short high pitch noises adding to a constant kind of whistling (only as long as the movement goes)<br />
| style="vertical-align:top;" |<br />
*{{T41p}}<br />
**2373-GHG<br />
|-<br />
| style="vertical-align:top;" |<br />
Thinkpad connected to power or working on battery, also when suspended to RAM<br />
| style="vertical-align:top;" |<br />
High pitch noise also when HD is powered down.<br />
| style="vertical-align:top;" |<br />
*{{T23}}<br />
**2647-DG4<br />
*{{X24}}<br />
**2662-MWG<br />
|-<br />
| style="vertical-align:top;" |<br />
Thinkpad connected to power battery charged less than 60%<br />
| style="vertical-align:top;" |<br />
High pitch noise till battery is charged more than 60%.<br />
| style="vertical-align:top;" |<br />
*{{T41p}}<br />
**2373-GEG<br />
|-<br />
| style="vertical-align:top;" |<br />
Constantly, if AC connected<br />
| style="vertical-align:top;" |<br />
High pitched, low volume constant noise.<br />
| style="vertical-align:top;" |<br />
*{{T40}}<br />
**2373-88U<br />
|-<br />
| style="vertical-align:top;" |<br />
When the CPU freq jumps up to 1Ghz or above, or when the laptop is in suspend mode<br />
| style="vertical-align:top;" |<br />
Constant high pitched<br />
| style="vertical-align:top;" |<br />
*{{R50}}<br />
**1829-6DM<br />
|-<br />
| style="vertical-align:top;" |<br />
(May come from harddisk.)<br />
| style="vertical-align:top;" |<br />
continuous, intermittent, low volume, high pitched<br />
| style="vertical-align:top;" |<br />
*{{600X}}<br />
|}<br />
<br />
==Affected Operating Systems==<br />
*Linux, all flavours<br />
<br />
==Status==<br />
Similar phenomena was experienced with models from the T2x aera, like i.e. on the {{T23}}. On these models the problem was related to the graphics circuitry and occured especially or only while making use of DirectDraw funktions. IBM was able to fix it through a BIOS upgrade.<br />
<br />
It is likely that the noises discovered on recent models are related to the graphics chip as well.<br />
<br />
==Solutions==<br />
*From Martin Steigerwald: I made the observation that I get at least less high pitch noises on my {{T23}} when I do not use the two ACPI modules "processor" and "thermal" (depends on the first one). I have no clue, why. Anyone with similar experiences?<br />
<br />
*Niko Ehrenfeuchter: I'm experiencing the same here on my {{X24}}. Removing the "processor" module also stops the pitch noise, which does ONLY occur when setting the CPU to maximum speed (using cpufreq). On low speed it's completely silent, even having loaded the processor module.<br />
<br />
*Rolf Adelsberger: I can confirm this: the high pitch noise is only remarkable (at least with my ears ;-) ) if the processor speed is set to maximum frequency.<br />
<br />
*Andreas Karnahl: i've read in several forums it has something to do with the "idle"-state (or "C3") of the processor. there is a frequency called "timer interrupt" (or something like that). since kernel 2.6x it is set to 1000 Hz by default (compared to 100 Hz in Kernel 2.4x). the exact reason i don't no. but it is save to change this frequency to 100 Hz in kernel 2.6x (by the way, windows up to XP uses 100 Hz by default).<br />just do the following:<br /><br />
: In <tt>[path to kernel-sources]/include/asm-i386/param.h</tt> find the line<br />
:: <code>#define HZ 1000</code><br />
: and change the value of HZ to 100: <br />
:: <code>#define HZ 100</code><br />
:Then recompile the kernel.<br />After i changed it on my ThinkPad A30 (under SuSE 9.2 and 9.3) and recompiling the kernel the high pitch noise is gone away.<br />
<br />
*Joern Heissler: I made another experience. I played around with linuxant conexant [[Modem Devices|modem]] drivers. After loading them I got some noise on my {{T42p}}.<br />
<br />
*Naheed Vora: My {{T41}} (2373-268) started to give high pitch noise ocassionally, when I upgraded to 2.6.11 kernel. I tried to unload lot of modules but finally figured out that disabling bay stops the noise. If you have [[ibm-acpi]], do (need a cleaner solution): {{cmd|echo eject >/proc/acpi/ibm/bay}} .<br />
<br />
*Mike Perry: I was able to cure an intermittent high-pitched whine on both my {{X24}} and {{X40}} by disabling the Infrared port.</div>217.93.11.239