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

10.4: Break the correct behaviour of keybindings in X11 Apps
Tiger only hintI've been using nedit under X11 on MacOS X for a long time. After upgrading to 10.4, I noted that now the Alt key really did work as the Alt key, which it didn't under 10.3. One might probably ask why this is newsworthy at all. Well, if you're using an international keyboard (like me), you've got to type Alt-L to get the '@' symbol (this is a bit awkward at the beginning, but you get quickly used to it).

However, with Alt-L really working as the modifier key under 10.4, Alt-L is a keyboard shortcut to open the 'Shell' menu in nedit. As I'm using nedit mainly for perl programming, this behaviour is annoying (to say the least), as you need the '@' for array variables. I tried to switch back to the old (admittedly incorrect) behaviour using's preferences. But switching off "Use the system keyboard layout" as well as "Enable keyboard shortcuts" wasn't sufficient. I also needed to put a .Xmodmap file into my home folder containing the following lines:
remove mod1 = Mode_switch
remove mod2 = Meta_L
add mod2 = Mode_switch
add mod1 = Meta_L
This will swap the command key and the alt key for all X11 programs. So you keep the menu shortcuts (only use Command instead of Alt), and you can still type all those strange symbols which you can usually reach via the Alt key (@,€,¥, etc.) without invoking a menu.
  • Currently 1.50 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)

10.4: Break the correct behaviour of keybindings in X11 | 2 comments | Create New Account
Click here to return to the '10.4: Break the correct behaviour of keybindings in X11' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Break the correct behaviour of keybindings in X11
Authored by: n8gray on Jul 28, '05 07:05:00PM

As an occasional NEdit developer, I'm happy to hear there are a few other OS X users out there who like it. Alt actually worked fine for me under 10.3, but I think I might have had to do some xmodmap trickery to make it so.

A better way to accomplish what you're trying to do might be to just disable the 'L' mnemonic for the Shell menu. To see if that works, try this:

nedit -xrm 'nedit*menuBar.shellMenu.mnemonic:'

You'll notice the l in the Shell menu's label is no longer underlined and Alt-L no longer drops down the menu. To make it permanent, put this line in your ~/.Xdefaults file:


I don't know if this is all you need to regain access to the @, but if it is then it has the advantage of not changing any of your other accelerators or mnemonics. Personally, if I couldn't use Alt-P,L to get to the Language Mode submenu I would be pretty annoyed.

[ Reply to This | # ]
10.4: Break the correct behaviour of keybindings in X11
Authored by: korbi on Aug 02, '05 05:23:01AM

Thanks for the hint. It does work perfect locally, so it's definitely the preferable solution if you do use nedit only on the Mac. (In fact I was looking for a solution like that in the beginning, but unfortunately at only accelerator keys are mentioned, no 'mnemonics' there, or at least I couldn't find them ;-)

I do, however, also use nedit from some of our unix servers via X and then I'm stuck with the same problem. I also can't (don't want to) change the .Xdefaults on the unix boxes as the account there is used by more than one person. And you don't really lose the functionality of the accelerator keys, you just have to use the 'command' key instead of 'alt'...

[ Reply to This | # ]