Does anyone know what the thinkpad forward/back keys are called in the windows version of emacs? In emacs, you can set key meanings with lisp function calls like this:
(global-set-key [f1] 'fill-paragraph-or-region)
but for the thinkpad web forward/back keys, I can't figure out what to put inside the []'s.
Alternatively, is there a way to _assign_ a symbol to these keys? This is what I've done in Linux and it works great.
Thanks,
Scott
Take a look at our
ThinkPads.com HOME PAGE
For those who might want to contribute to the blog, start here: Editors Alley Topic
Then contact Bill with a Private Message
ThinkPads.com HOME PAGE
For those who might want to contribute to the blog, start here: Editors Alley Topic
Then contact Bill with a Private Message
forward/back key in emacs
Re: forward/back key in emacs
How did you do it in linux?scotto wrote:Alternatively, is there a way to _assign_ a symbol to these keys? This is what I've done in Linux and it works great.
I used xvm to see what keycodes came out when I pressed forward/back, and then I set their keysyms with xmodmap.
This was a little complicated because I'm using Fedora Core 2 Gnome, which overrides these settings. The solution was to make a script that ran before Gnome started. Here' the "script," which I called "mapTPkeysyms:
#!/bin/sh
xmodmap -e 'keycode 233=F20'
xmodmap -e 'keycode 234=F19'
Then, I configured Fedora Core 2 gnome to run it at startup:
* FC2 main menu -> preferences -> sessions -> startup programs --> add
* add <full path to script>/mapTPkeysyms
With the forward backward keys mapped to F19 and F20, you can then configure Firefox to use them the same way that it does in Windows:
cd /usr/lib/firefox-<version>/chrome
unzip browser.jar
emacs content/browser/browser.xul
search for
<keyset id="mainKeyset">
and right after the lines below:
<key id="goBackKb" keycode="VK_LEFT" command="Browser:Back" modifiers="alt"/>
<key id="goForwardKb" keycode="VK_RIGHT" command="Browser:Forward" modifiers="alt"/>
add these two lines:
<key id="goBackKb" keycode="VK_F19" command="Browser:Back"/>
<key id="goForwardKb" keycode="VK_F20" command="Browser:Forward"/>
then
zip -rD0 browser.jar content/browser/
This was a little complicated because I'm using Fedora Core 2 Gnome, which overrides these settings. The solution was to make a script that ran before Gnome started. Here' the "script," which I called "mapTPkeysyms:
#!/bin/sh
xmodmap -e 'keycode 233=F20'
xmodmap -e 'keycode 234=F19'
Then, I configured Fedora Core 2 gnome to run it at startup:
* FC2 main menu -> preferences -> sessions -> startup programs --> add
* add <full path to script>/mapTPkeysyms
With the forward backward keys mapped to F19 and F20, you can then configure Firefox to use them the same way that it does in Windows:
cd /usr/lib/firefox-<version>/chrome
unzip browser.jar
emacs content/browser/browser.xul
search for
<keyset id="mainKeyset">
and right after the lines below:
<key id="goBackKb" keycode="VK_LEFT" command="Browser:Back" modifiers="alt"/>
<key id="goForwardKb" keycode="VK_RIGHT" command="Browser:Forward" modifiers="alt"/>
add these two lines:
<key id="goBackKb" keycode="VK_F19" command="Browser:Back"/>
<key id="goForwardKb" keycode="VK_F20" command="Browser:Forward"/>
then
zip -rD0 browser.jar content/browser/
-
- Similar Topics
- Replies
- Views
- Last post
-
-
Restart automatically when power comes back on
by Thinkpad2024 » Tue Mar 31, 2026 6:12 pm » in ThinkPad X1 / X1-Carbon / X1-Extreme and later Series - 2 Replies
- 733 Views
-
Last post by Thinkpad2024
Wed Apr 01, 2026 8:49 am
-
Who is online
Users browsing this forum: No registered users and 37 guests



