forward/backward buttons on T40 in ubuntu (gusty)
-
Pyroraptor
- Freshman Member
- Posts: 57
- Joined: Tue May 15, 2007 1:46 am
- Location: Washington, NC
- Contact:
forward/backward buttons on T40 in ubuntu (gusty)
Has anyone yet gotten these buttons working in ubuntu or any distro of linux? All I need them for is a webbrowser, I found how to get them working in music players for the most part, but I can't find any options to make them work as backwards and fowards buttons in firefox.
IBM Lenovo R61i 1.5GHz c2d T5250 | 1GB RAM | 80GB SATA | X3100 | WXGA | Win XPpro
IBM T40 2374-14U | (sold)
http://dectop.co.nr
IBM T40 2374-14U | (sold)
http://dectop.co.nr
I haven't tried this yet, but it seems like it should work.
http://www.thinkwiki.org/wiki/How_to_ge ... ys_to_work
http://www.thinkwiki.org/wiki/How_to_ge ... ys_to_work
DKB
-
Pyroraptor
- Freshman Member
- Posts: 57
- Joined: Tue May 15, 2007 1:46 am
- Location: Washington, NC
- Contact:
Hmmmm, I hadn't seen that before.
Well, I know that tbp does not work with the forwards and backwards buttons due to previous testing, but I have not tested xmodmap before. Do you know if xmodmap can map one key to two other keys, like, I could set the forwards key to do the same thing as alt-left, and backwards could be alt-right. Time to look for documentation on xmodmap I suppose...
Well, I know that tbp does not work with the forwards and backwards buttons due to previous testing, but I have not tested xmodmap before. Do you know if xmodmap can map one key to two other keys, like, I could set the forwards key to do the same thing as alt-left, and backwards could be alt-right. Time to look for documentation on xmodmap I suppose...
IBM Lenovo R61i 1.5GHz c2d T5250 | 1GB RAM | 80GB SATA | X3100 | WXGA | Win XPpro
IBM T40 2374-14U | (sold)
http://dectop.co.nr
IBM T40 2374-14U | (sold)
http://dectop.co.nr
Here's how I do it with Firefox in Kubuntu. Steps 4 and 5 are for key mapping; you can ignore the first 3 steps if you prefer to use the version of Firefox in the Ubuntu repository. I prefer to download the latest versions directly from Mozilla.
You would need to modify step 4 for a Gnome distro like Ubuntu.Firefox Installation Notes
9/15/2006
MJW
1. Download the latest Firefox package and expand to the /opt/firefox directory.
2. Modify the simlink for the firefox executable to point to the new installation:
cd /usr/bin
sudo ln -s /opt/firefox/firefox firefox
sudo ln -s /opt/firefox/firefox mozilla-firefox
3. Link to your plugins:
cd /opt/firefox/plugins
sudo ln -s /usr/lib/mozilla-firefox/plugins/* .
4 To map the browser "Forward" and "Back" keys, create the file /~/.Xmodmap
add the following two key mappings to the file:
keycode 234 = F19
keycode 233 = F20
Then create the file /~/.kde/Autostart/startup and add the following:
#! /bin/sh
# Startup script executed whenever kde starts
# Load the keymap for browser forward/back keys
xmodmap ~/.Xmodmap
exit 0
Then go to Go to KMenu > System > Control Center > Regional & Accessibility > Keyboard Shortcuts and locate the settings for browser forward/back.
Change them to be F19 (back) and F20 (forward).
Then to map the buttons in Firefox, follow the directions in the ThinkWiki:
5. To have Firefox make use of the browser keys you need to modify one of its files. To do this you will first need to extract it from the browser.jar archive. Do...
cd <firefox-directory>/chrome
sudo unzip browser.jar
The file of interest is content/browser/browser.xul. Edit it...
sudo nano content/browser/browser.xul
Look for the <keyset id="mainKeyset"> section and add the following lines within...
<key id="goBackKb" keycode="VK_F19" command="Browser:Back" />
<key id="goForwardKb" keycode="VK_F20" command="Browser:Forward" />
Now save the file and repackage the browser.jar archive...
sudo zip -rDu browser.jar content
(This replaces the changed file browser.xul in the zip archive)
-r = recursively search the starting folder (/content)
-D = don't include directory entries in the zip archive
-u = update only new or changed files
That's it.
Check about:plugins in firefox to see if java, flash, and adobe pdf plugins are recognized.
Mark
X61T 7764-CTO, Core 2 Duo L7500 LV 1.6 GHz, 4 GB RAM, 120 GB Intel X25M SSD
Multiboot w/Grub4DOS -- Windows 10, MustangPE, PartedMagic
My ex: X41T (2005 - 2009)
X61T 7764-CTO, Core 2 Duo L7500 LV 1.6 GHz, 4 GB RAM, 120 GB Intel X25M SSD
Multiboot w/Grub4DOS -- Windows 10, MustangPE, PartedMagic
My ex: X41T (2005 - 2009)
I finally got the Forward and Back browser keys to work in Mandriva. I don't know why it took this n00b so long to do it, other than the fact that I was reading so much conflicting information which applied to various versions and distros. I have been at it for several hours.
It seems that basically at least, k0lo has the right method. I am using KDE 3.5.6.
I had to create the following file .Xmodmap in the /home/userid directory.
Note; I only have tried configuring the Forward (F19) and Back (F20) browser keys in KDE so far. I discovered that NumLk is working already. XF86LaunchA is the blue Access IBM button, and F35 is the Fn button.
I had to create the following file xmodmap in the /home/userid/.kde/Autostart directory.
I had to open Konsole and log in as superuser, then navigate to /home/userid/.kde/Autostart and type in chmod a+x xmodmap and hit Enter.
Here is what to do next:
Go to System > Configuration > KDE > Region & Accessibility > Keyboard Shortcuts. Click on the Application Shortcuts tab and scroll down to Navigation, double-click on Back and click on the X to the right of Alternate shortcut, then press your back browser button. You should see F20 displayed. Scroll down to Forward and do the same, pressing the forward browser button.
In Opera, go to Tools > Preferences > Advanced > Shortcuts, and in bottom window (for keyboard) keyboard setup, expand Applications and scroll down to Forward (on right side under Actions), click on Edit, type in F19 and press Enter, then scroll down to Back (on right side under Actions), click on Edit, type in F20 and press Enter. Click on OK and OK.
For Firefox - good luck. You don't have near the configuration options that you do in Opera. I am not even going to mess with it. Try what k0lo wrote.
EDIT: Well, maybe I will mess with Firefox, but that will be another day.
It seems that basically at least, k0lo has the right method. I am using KDE 3.5.6.
I had to create the following file .Xmodmap in the /home/userid directory.
Code: Select all
! This works with ThinkPad T42 keyboard
! Use ! for comments
keycode 77 = Num_Lock
keycode 159 = XF86LaunchA
keycode 227 = F35
keycode 233 = F19
keycode 234 = F20
I had to create the following file xmodmap in the /home/userid/.kde/Autostart directory.
Code: Select all
#!/bin/sh
# Startup script executed whenever kde starts
# Load the keymap for browser forward/back keys
/usr/bin/xmodmap /home/dkb/.Xmodmap
exit 0
Here is what to do next:
Go to System > Configuration > KDE > Region & Accessibility > Keyboard Shortcuts. Click on the Application Shortcuts tab and scroll down to Navigation, double-click on Back and click on the X to the right of Alternate shortcut, then press your back browser button. You should see F20 displayed. Scroll down to Forward and do the same, pressing the forward browser button.
In Opera, go to Tools > Preferences > Advanced > Shortcuts, and in bottom window (for keyboard) keyboard setup, expand Applications and scroll down to Forward (on right side under Actions), click on Edit, type in F19 and press Enter, then scroll down to Back (on right side under Actions), click on Edit, type in F20 and press Enter. Click on OK and OK.
For Firefox - good luck. You don't have near the configuration options that you do in Opera. I am not even going to mess with it. Try what k0lo wrote.
EDIT: Well, maybe I will mess with Firefox, but that will be another day.
DKB
Glad to hear you got something working. If you do mess with Firefox, keep a copy of what you did in a text file somewhere because every time that a Firefox update is released you will have to repeat the above steps with the new version.GomJabbar wrote:For Firefox - good luck. You don't have near the configuration options that you do in Opera. I am not even going to mess with it. Try what k0lo wrote.
EDIT: Well, maybe I will mess with Firefox, but that will be another day.
Mark
X61T 7764-CTO, Core 2 Duo L7500 LV 1.6 GHz, 4 GB RAM, 120 GB Intel X25M SSD
Multiboot w/Grub4DOS -- Windows 10, MustangPE, PartedMagic
My ex: X41T (2005 - 2009)
X61T 7764-CTO, Core 2 Duo L7500 LV 1.6 GHz, 4 GB RAM, 120 GB Intel X25M SSD
Multiboot w/Grub4DOS -- Windows 10, MustangPE, PartedMagic
My ex: X41T (2005 - 2009)
Got the browser keys working in Firefox!
[It was a piece of cake compared to getting the browser keys working in the first place.]
K0lo's instructions were right on. The browser.jar file was located at /usr/lib/firefox-2.0.0.8/chrome on my system. I copied the file to another directory and then copied it again to a subdirectory (for editing purposes). I edited the file with KWrite (a standard text editor) running as superuser (or is it subsitute user as I saw someone else refer to SU -?).
So I still have a copy of the original browser.jar file in the directory I first copied it to. I have the modified file in its subdirectory and in /usr/lib/firefox-2.0.0.8/chrome. I had to close Firefox and then reopen it again for the browser keys to work.
[It was a piece of cake compared to getting the browser keys working in the first place.]
K0lo's instructions were right on. The browser.jar file was located at /usr/lib/firefox-2.0.0.8/chrome on my system. I copied the file to another directory and then copied it again to a subdirectory (for editing purposes). I edited the file with KWrite (a standard text editor) running as superuser (or is it subsitute user as I saw someone else refer to SU -?).
So I still have a copy of the original browser.jar file in the directory I first copied it to. I have the modified file in its subdirectory and in /usr/lib/firefox-2.0.0.8/chrome. I had to close Firefox and then reopen it again for the browser keys to work.
DKB
Re: forward/backward buttons on T40 in ubuntu (gusty)
I am now running Mandriva 2009.1 which uses KDE 4.2.2. The browser keys work out of the box in Firefox, but I can't seem to get them to work in Opera. I used the above method with .Xmodmap and xmodmap, but that doesn't seem to work with KDE 4. I have read some other posts where xmodmap doesn't function as expected (or maybe at all) in KDE 4.
I have tried a number of things to map the forward/backward buttons to F20 & F19 without avail. Any ideas?
I have tried a number of things to map the forward/backward buttons to F20 & F19 without avail. Any ideas?
DKB
Re: forward/backward buttons on T40 in ubuntu (gusty)
I finally had a little more time to look at this and found the solution (for Opera)!
For some strange reason, the keycodes are different in Mandriva 2009.1 KDE 4.2 than they were in Mandriva 2008.1 KDE 3.4.
Previously I used in /home/<user>/.Xmodmap
keycode 233 = F19
keycode 234 = F20
Now I use in /home/<user>/.Xmodmap
keycode 166 = F19
keycode 167 = F20
EDIT: Here are the two files I created as normal user for Mandriva 2010.
/home/<user>/.Xmodmap
/home/<user>/.kde4/Autostart/xmodmap Change permissions on this file to make it executable.
Of course you need to replace <user> with your own user login id.
I made the file executable from Dolphin, but you can do that from terminal as root: chmod +x /home/<user>/.kde4/Autostart/xmodmap
For some strange reason, the keycodes are different in Mandriva 2009.1 KDE 4.2 than they were in Mandriva 2008.1 KDE 3.4.
Previously I used in /home/<user>/.Xmodmap
keycode 233 = F19
keycode 234 = F20
Now I use in /home/<user>/.Xmodmap
keycode 166 = F19
keycode 167 = F20
EDIT: Here are the two files I created as normal user for Mandriva 2010.
/home/<user>/.Xmodmap
Code: Select all
keycode 166 = F19
keycode 167 = F20Code: Select all
#!/bin/sh
# Startup script executed whenever kde starts
# Load the keymap for browser forward/back keys
/usr/bin/xmodmap /home/<user>/.Xmodmap
exit 0I made the file executable from Dolphin, but you can do that from terminal as root: chmod +x /home/<user>/.kde4/Autostart/xmodmap
DKB
-
- Similar Topics
- Replies
- Views
- Last post
-
-
W520 trackpoint + buttons issue
by oeuvre » Sat Jan 28, 2017 11:23 pm » in ThinkPad W500/510/520 and W7x0 Series - 5 Replies
- 1450 Views
-
Last post by oeuvre
Mon Jan 30, 2017 12:13 pm
-
-
-
remove and clean under the trackpoint mouse buttons
by louisJ » Fri Feb 10, 2017 1:51 pm » in ThinkPad T430/T530 and later Series - 4 Replies
- 459 Views
-
Last post by louisJ
Fri Feb 10, 2017 3:15 pm
-
-
-
T440s trackpoint buttons quit working
by Whitieiii » Sat Mar 18, 2017 2:19 am » in ThinkPad T430/T530 and later Series - 7 Replies
- 555 Views
-
Last post by Whitieiii
Sat Mar 25, 2017 5:37 am
-
-
-
The Newest GPD Pocket with Z8750 CPU Windows 10 System or Ubuntu 16.04
by laozhu » Thu Jan 12, 2017 5:02 am » in Off-Topic Stuff - 12 Replies
- 1430 Views
-
Last post by QWERTY Andreas
Wed Feb 15, 2017 3:52 am
-
Who is online
Users browsing this forum: No registered users and 1 guest





