X11 on MacOS X and CMD-W

The most annoying thing with X11 on Mac is the shortcut CMD-W, especially when you are an Emacs user. On Emacs, CMD-W or META-W is the shortcut to put your selection into the cut buffer. But on Mac this is also the shortcut to close the window. This means that every time you type META-W on Emacs your Emacs window closes and you loose everything you are doing.

This recipe will explain how to remove the annoying CMD-W shortcut on X11.

First you need to have Apple’s developer kit called XCode installed. This is free and can be downloaded from Apple’s website here

As you can see on the screenshot below the shortcut is defined in the “Window menu” of the X11 application. To remove this short cut we just need to remove the keys definition (CMD-W) from that menu entry.

The easiest way to do that is to remove the menu item from the Window menu pane. Following these few easy steps can do this.

  1. the very first thing is to quit X11

  2. Open the Terminal.app and type the following command to open the resource file with the Interface Builder.

    
    $ open /Applications/Utilities/X11.app/Contents/Resources/English.lproj/main.nib
    
    If you are French or German select the appropriate language

  3. Select the MainMenu pane, then the menu item Window and then the item Close Window. Once the close Close Window item is selected hit the key delete.

  4. you can now save and quit the Interface builder

  5. Restart X11

The menu item Close Window and the short cut CMD-W don’t exist any more. You can type META-W in your Emacs window without losing your work.

 

Comments

Posted by: film izle Dec 23, 2009 @ 17:02

thanks for share

Posted by: deliver flowers usa Dec 27, 2009 @ 03:14

this is great thanks fior sharing

Posted by: fake rolex watches Jan 04, 2010 @ 23:31

Welcome to our website,and you will enjoy the sunshine service. Let's

abandon all the worry,and enjoy the happy shopping travel.All the

replica watches paypal and replica watches are most in fashion

boutique this year.rolex replica and rolex replica paypal and the

replica rolex paypal show your chaming temperament. In addtin, the

fake watches paypal and the other fake rolex paypal make you mold

your unique glamour this winter.The swiss rolex replica have the high

quality but low price. replica watch paypal and replica rolex have

all the style and cheapest price replica rolex watches. Enjoying the

fun of net purchase! replica rolex We will supply you the perfect

service and after sale support system. Our honest will bring you

absolute satisfaction.

Posted by: film izle Jan 17, 2010 @ 04:47

Thank you for sharing your friends. Hope to see you another day.

Posted by: divx film izle Jan 17, 2010 @ 04:50

Thank you for sharing your friends. Hope to see you another day.

Posted by: links of london Jan 19, 2010 @ 00:21

Enjoying the

fun of net purchase! replica rolex We will supply you the perfect

service and after sale support system.

Posted by: cheap augmentin Jan 23, 2010 @ 12:13

thanx for this post i really loved it

Posted by: cheapest augmentin Jan 23, 2010 @ 15:01

great infos here i will come back more often

Posted by: augmentin overnight delivery Jan 23, 2010 @ 19:28

great post i will read this more often

Posted by: order pills online Feb 18, 2010 @ 12:51

great post here as always wroth checking like usual when i come here

Posted by: evening dresses Feb 19, 2010 @ 06:11

I will be sure to look around more

Posted by: Nike Air Max Mar 02, 2010 @ 23:51

So beautiful sharing!Thank you very much.

Posted by: tag heuer watch Mar 04, 2010 @ 23:15

can show a man not only his wealthy but also his high taste.tag heuer watch As the society developed, many people are pay more attention to one's wearing than before, especially a watch. tag heuer watch If you are wearing a famous brand watch, people will look up you, also will love to do business with you. You will be a successful man with a such luxury fashion watch.

Leave a message

(Required)
(Required and not displayed)
(Optional)
obfuscated letters Enter the text shown in the image