Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Make the Alt key work in OpenOffice103 and X11Beta3 UNIX
I really appreciate the big effort from the OOo.org mac porting team to release the GM of OpenOffice for X11. I expericened one annoying bug: The alt/option key does not work as intended. You cannot activate the menus form the OOo with Alt. The problem is X11 and not OOo. Here is my solution:
  1. Open xterm/Terminal in X11
  2. Type pico to start the pico editor

  3. Type this code:
    clear Mod1
    keycode 66 = Alt_L
    keycode 69 = Alt_R
    add Mod1 = Alt_L
    add Mod1 = Alt_R
    
  4. Enter Control-O to save this as .xmodmap in your home folder (/users -> username -> .xmodmap).

  5. Use Control-X to quit pico

  6. Quit X11

  7. Restart X11 and start OpenOffice.org 103
If you'd like to revert to the default X11Beta keys, remove .xmodmap from your home folder.

I think the X11 standard generally use Apple Option key as a compose key for entering foreign and special characters, and so does the default setting in X11Beta3.
    •    
  • Currently 2.50 / 5
  You rated: 1 / 5 (4 votes cast)
 
[16,174 views]  

Make the Alt key work in OpenOffice103 and X11Beta3 | 18 comments | Create New Account
Click here to return to the 'Make the Alt key work in OpenOffice103 and X11Beta3' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Make the Alt key work in OpenOffice103 and X11Beta3
Authored by: seancorfield on Jul 08, '03 04:20:25PM

I assume the intent of this tip is to allow Alt+F to open the File menu, Alt+E to open the Edit menu etc? If so, I couldn't get it to work by following these instructions :(

---
"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood



[ Reply to This | # ]
Make the Alt key work in OpenOffice103 and X11Beta3
Authored by: Anonymous on Jul 08, '03 10:19:17PM

Agreed. Zip here. But I'm interested in getting it to work!



[ Reply to This | # ]
Make the Alt key work in OpenOffice103 and X11Beta3
Authored by: bucweat on Jul 08, '03 10:41:50PM

open a terminal, execute "xmodmap .xmodmap" (assuming you saved the info in the hint into a file called .xmodmap). Now ALT should work. I didn't try with openOffice, but this worked with NEdit.



[ Reply to This | # ]
Make the Alt key work in OpenOffice103 and X11Beta3
Authored by: seancorfield on Jul 10, '03 01:09:24AM

Hmm, weird. If I *explicitly* run xmodmap .Xmodmap in an Xterm before I start OpenOffice.org, it works. The same command in .xinitrc does not seem to work however. What a pain! Any ideas?

---
"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood



[ Reply to This | # ]
Make the Alt key work in OpenOffice103 and X11Beta3
Authored by: chicorico81@hotm on Jul 10, '03 09:29:09AM

I was having the same problem myself...
After some tinkering i found out that going into X11 preferences and unchecking "Follow system keyboard layout" fixes things.



[ Reply to This | # ]
Make the Alt key work in OpenOffice103 and X11Beta3
Authored by: ben.forrest on Aug 10, '10 04:36:25PM

Hi - this could be the hint that saves my association with mac as an avid original windows keyboard & menus user!

alas no luck despite the magnitude of assistance here, nothing seems to work for me. console.log shows no errors (although I did have to upgrade to the latest X11 project as there was an error with reading xkb rules) now no errors visible.

have outlined all the steps taken, am i missing something stupid (probably!).

i really hope someone can help so i can resume my productivity!

thanks
Ben

1. run X11.app separately and run openoffice within that
2. tried restarting / rebooting
3. attempted to run using quartz (e.g. standard window mgr)
3. run x11.app separately or via "x" at terminal
4. updated my quartz version to latest 2.4.2 - which fixes the xkb error but still not alt+<key> for menus!?
5. "Follow system keyboard layout" is unchecked


OS X 10.5.8

cat .Xmodmap
clear Mod1
keycode 66 = Alt_L
keycode 69 = Alt_R
add Mod1 = Alt_L
add Mod1 = Alt_R

cat .xinitrc
xmodmap $HOME/.Xmodmap
exec quartz-wm



[ Reply to This | # ]
Make the Alt key work in OpenOffice103 and X11Beta3
Authored by: GaelicWizard on Jul 08, '03 10:22:57PM
This hint is exceedingly meaningless if X11 doesn't look at the .Xmodmap file. to make it look at the file add
xmodmap ~/.Xmodmap
to your .xinitrc file in your home folder.

---
Pell

[ Reply to This | # ]

Make the Alt key work in OpenOffice103 and X11Beta3
Authored by: stib on Jul 09, '03 08:51:36PM
When I went to modify my .xinitrc file I found that I didn't already have one. Adding one with just
xmodmap ~/.Xmodmap
in it cause X11 to go a bit spazzy on me - my openoffice windows didn't have the usual OSX frames around them, which made them un-draggable. Deleting the file brought everything back to normal. Any hints about what I need to put in my .xinitrc file to make everything sweet again?

[ Reply to This | # ]
Make the Alt key work in OpenOffice103 and X11Beta3
Authored by: chicorico81@hotm on Jul 10, '03 09:36:41AM

If you don't have an .xinitrc, Apple's X11 is hard-coded to launch the Quartz window manager (quartz-wm) and bring up an xterm. If you supply an .xinitrc, however, you must do this yourself. Your .xinitrc should look something like this:

xmodmap $HOME/.Xmodmap
exec quartz-wm



[ Reply to This | # ]
Make the Alt key work in OpenOffice103 and X11Beta3
Authored by: Anonymous on Jul 16, '03 11:27:44PM

Bingo! Thanks.



[ Reply to This | # ]
Works! But :(
Authored by: VEGx on Jul 09, '03 04:29:57AM

Works, but the problem now is that I use a lot of Spanish, etc. and now I can't type accented letters easily :(

I hope it would be possible to use SHIFT-ALT instead as ALT and use Option for accents etc.



[ Reply to This | # ]
Works! But :(
Authored by: Hulot on Aug 01, '03 07:00:01AM

Hi,

please check my lastest comment with 2 new .xmodmap files.



[ Reply to This | # ]
What about swapping cmd and ctrl as well?
Authored by: sms on Jul 09, '03 06:51:51AM

Can this also be used to swap cmd and ctrl keys in X11.app -> I hate that everything is the other way round in X11 applications.

Thanks for any help!

---


DonĀ“t drink and root!



[ Reply to This | # ]
What about swapping cmd and ctrl as well?
Authored by: Hulot on Aug 01, '03 07:03:35AM

Hi,

please check my lastest comment with 2 new .xmodmap files.



[ Reply to This | # ]
More modmap settings
Authored by: Hulot on Jul 28, '03 08:34:01AM
More .modmap files: Alt+Cmd for accents, Swap control and command ... please unset key equivalents under X11 in the Preferences in AppleX11Beta3.

Using the pico editor in Terminal.app from /Applications -> Utilities, save the script .xmodmap to your home folder, remove file to revert to default. Quit X11 and restart, start OpenOffice.org103.

A. Alt to access Menus, AppleCmd for accented letters etc.:
! Alt       -->  acess Menus with underscore
! AppleCMD  -->  type accented letters etc (was Alt)

clear Mod1
clear Mod2
keycode 63 = Mode_switch
keycode 66 = Alt_L
keycode 69 = Alt_R
add Mod1 = Alt_L
add Mod1 = Alt_R
add Mod2 = Mode_switch
B. Alt key for menus, Control type accents, AppleCmd is Modifier for shortcuts:
! -Modifier-   function   
! Alt          -->  access Menus with underscore
! AppleCmd     -->  for shortcuts (was control)
! Control      -->  type accents  (was alt)

clear control
clear Mod1
clear Mod2
keycode 63 = Control_L
keycode 66 = Alt_L
keycode 67 = Mode_switch
keycode 69 = Alt_R
keycode 70 = Mode_switch
add control = Mode_switch
add Mod1 = Alt_L
add Mod1 = Alt_R
add Mod2 = Control_L
There is one drawback with swaping Control with AppleCmd. The following keys still work in OOo and X11B3:
AppleCmd  +         H   Hide Applicaton
AppleCmd  + Alt   + H   hide others
AppleCmd  + Shift + 3   Screenshot
AppleCmd  + Shift + 4   Scrennshot window etc.
AppleCmd  + Alt   + D   show/hide Dock
AppleCmd  + Shift + Q   Logout
AppleCmd  + Alt   + F12 Sleep
Keep this in mind if you customize the keys in OpenOffice.org103. In OOo, the AppleCmd is called Mode_switch. Don't wonder, it's the correct key.

Warning: Use this .xmodmap to patch the keys only if OpenOffice is your only application in AppleX11Beta3!! The last version can cause strong behaviour in X11, because the control is the main modifier like AppleCMD in MacOS.

I recommand to use the Version A. I test it with X11Beta3. Maybe someone can test it with OrborOSX or XDarwin.

Hulot

[ Reply to This | # ]
I had to use "Meta_L" & "Meta_R"...
Authored by: nicksay on Sep 05, '03 10:41:49PM

Well, I don't run Open Office, but I do regularly ssh into some remote unix machines and run a emacs session over X11.

This hint held great promise for me, because I could never get simple things like "page up" to work in emacs, which requires the keystroke "Meta-V". Furthermore, I couldn't find ANY info on the aforementioned "xve" command, but I DID find info for the "xev" command. Using that program, I found that without any .Xmodmap file, the option key was representing "Mode_switch" and my command key was representing "Meta_L".

So, modifying the above "version a", my .Xmodmap file looks like this:

clear Mod1
clear Mod2
keycode 63 = Mode_switch
keycode 66 = Meta_L
keycode 69 = Meta_R
add Mod1 = Meta_L
add Mod1 = Meta_R
add Mod2 = Mode_switch

This enabled the option key to work as the "meta" key in emacs, as it is supposed to.

Hope this helps anyone still having problems with this.



[ Reply to This | # ]
Make the Alt key work in OpenOffice103 and X11Beta3
Authored by: vieuxnez on Dec 28, '04 06:57:59PM

I tried your X11 option/alt key fix, and it didn't work for me. After further review, I realized, that it's probably due to a keyboard map difference, since you have a file that indicates two alt keys, one for the left, and one for the right, as I'm sure you know, and I'm working with a Powerbook G4 17" that only has a option/alt key on the left, that probably has a different keycode to type in than 66. Am I right about this? Do you know how I would find out the code? I'm trying to figure out how to use
/usr/X11R6/bin/dumpkeymap, but to be honest, I'm not having much luck deciphering the docs, and could use a few tips if they are to be had. Thanks for your time,

Dustin

---
,Dustin



[ Reply to This | # ]
Make the Alt key work in OpenOffice103 and X11Beta3
Authored by: diederik@cs on Mar 02, '07 08:27:49AM

If you have X11 1.1 - XFree86 4.4.0
Just creating .Xmodmap isn't enough. One should also go to preferences in X11 and uncheck the middle check box to make sure os x doesn't override your .Xmodmap file. Also be sure to name it ".Xmodmap" CASE SENSITIVE!!! or else the default .xinitrc won't recognize it!! Because it attempts to load .Xmodmap automatically.

FYI the default .xinitrc is located in: "/private/etc/X11/xinit/xinitrc" :)

Have fun!!

PS my .Xmodmap looks as follows:

clear Mod1
keycode 66 = Alt_L
add Mod1 = Alt_L
keycode 69 = Mode_switch
add Mod1 = Mode_switch

---

press and hold combining it with other keys works as modifier and press and release will activate the menu's :)



[ Reply to This | # ]