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

Use the Command key for shortcuts in X11 apps Apps
Problem: native applications under OS X use the Command key for keyboard shortcuts, while X11 applications use the Control key. This is confusing and avoids effective use of X11 apps.

Solution: place the following lines inside the file .Xmodmap in your user's folder (at the top level):
! ~/.Xmodmap
clear Mod2
clear control
keycode 63 = Control_L
keycode 67 = Control_L
add control = Control_L
This will change the keyboard mapping under X11, such that the Command key acts like the Control key, so you will be able to use either the Command key or the Control key within X11 apps for shortcuts. More details can be found in this article.

[robg adds: We've run a number of other hints on modifying .Xmodmap for various purposes.]
    •    
  • Currently 3.20 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (5 votes cast)
 
[15,642 views]  

Use the Command key for shortcuts in X11 apps | 8 comments | Create New Account
Click here to return to the 'Use the Command key for shortcuts in X11 apps' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Use the Command key for shortcuts in X11 apps
Authored by: Pedro Estarque on Feb 09, '07 08:55:12AM

That would be great for Gimpshop but it didn't work for me.
I created a .Xmodmap file at $HOME like you said.
control still rules X11.
I have auto focus windows on.
Any thoughts ?



[ Reply to This | # ]
Use the Command key for shortcuts in X11 apps
Authored by: verdon on Feb 09, '07 11:02:26AM

I think if you're using a powerbook, the key mappings may be different. I'm trying to sort mine out now, as I'm tired of contorting my hands when working in OpenOffice ;-)



[ Reply to This | # ]
Useful, but not universal!
Authored by: GaelicWizard on Feb 09, '07 02:28:01PM

Almost *all* Mac apps use the command key to designate commands (due to Apple's HIG) (Photoshop and Maya are notable (cross-platform) exceptions, due to their many many many many options). Most windows apps use the control key, out of convention. X11 doesn't even have a convention. Many use control, many use alt, many use meta (don't ask). Control seems to be getting more popular due simply to its conventional use on windoze.

The point? This hint will make many things easier to remember and use, but it will not make everything use command. In fact, I would imagine that it would make some apps (perticularly those that use meta, I'd imagine) extremely hard to use because it will be confusing as all heck.

Just keep aware if you run into an app later on that doesn't seem to respond to any key-combos.

JP

---
Pell



[ Reply to This | # ]
Useful, but not universal!
Authored by: pajai on Feb 10, '07 03:45:28AM

Hi GalicWizard,

Yes, you are completely right. Under X11 there is (unfortunately) no unified use of a shortcut key like under Mac OS X (native apps) or windows. For instance, this hint is not useful for Emacs users, as this app is using the Meta key for shortcuts.

However in my case, as I am not an Emacs user and lots of X11 apps I need (like inkscape, gimp, openoffice, ...) are using the control key for shortcuts, it is useful to remap the command key. But I agree with you, there is no universal solution for that problem.

Cheers,



[ Reply to This | # ]
Use the Command key for shortcuts in X11 apps
Authored by: debyld on Feb 09, '07 07:15:54PM

That's great, do you know how to do the same for the 'alt' key? X11 apps such as OpenOffice.org allow you top navigate the menus using the 'alt' keys - just like Windows. Can a similar trick be applied for this?

Daniel.



[ Reply to This | # ]
Use the Command key for shortcuts in X11 apps
Authored by: pajai on Feb 10, '07 03:48:16AM

Hi Daniel,

What would you like to do exactly with the alt key? Which remapping?

Cheers,



[ Reply to This | # ]
Important!
Authored by: jedik on Feb 10, '07 09:04:34PM

For this to work, you must make sure that in the X11 preferences on the "Input" tab "Follow system keyboard layout" is *unchecked*. Also, if you uncheck "Enable keyboard shortcuts under X11" will prevent that some shortcuts will be used by X11 itself, like COMMAND+Q, etc.

Cheers

---
:: Jedi Knight ::
-- Mac Rules! --



[ Reply to This | # ]
Important!
Authored by: Pedro Estarque on Feb 11, '07 04:53:29PM

I unchecked it and it's still not working....



[ Reply to This | # ]