How do I prevent OS X keybindings from over-riding my applications?
March 1, 2005 8:56 AM   Subscribe

How do I prevent OS X keybindings from over-riding my applications? For example, when programming in Emacs the auto-complete feature is normally bound to command-tab. By default, if I press command-tab in my Emacs session it will try to tab out to other open programs. How do I let OS X know to leave command-tab alone?

I've got uControl and I looked at the System Preferences/Mouse and Keyboard settings but I don't think any of these do what I want... My control freak obsessive-compulsive disorders are starting to get riled, please help!
posted by onalark to Computers & Internet (5 answers total)
 
Response by poster: Using Escape as my meta key is not an option, though if someone knows off-hand how to map alt/option to meta, that would be useful.

And I'm using the (Cocoa?) Emacs which comes as a binary application, not one of the X-based Emacsi...
posted by onalark at 9:01 AM on March 1, 2005


Best answer: Command-Tab is deeply embedded into the OS. Looks like you need to modify emacs to call the Cocoa SetSystemUIMode with an option of kUIOptionDisableProcessSwitch. See this Apple technote.

You could also use PullTab, a haxie that disables Command-Tab globally, but that may be overkill.

Why not just change the Emacs auto-complete feature to some other keystroke?
posted by kindall at 9:09 AM on March 1, 2005


Best answer: Changing cmd-tab is hard; changing the meta key to option is easy. Just add the following to your .emacs: (setq mac-command-key-is-meta nil)
posted by boaz at 9:32 AM on March 1, 2005


Response by poster: kindall, I was considering that, but I was kinda hoping I could kick OS X in the pants somewhere I didn't know about in case this ever became an option.

And oh man should I have had (setq mac-command-key-is-meta nil) in my .emacs a year ago.

Thanks guys, I'm happily editing with the option key instead.

So umnn, as a followup, what's this new A- prefix I have for the Command key, and do I get to bind whatever I want to it?
posted by onalark at 11:18 AM on March 1, 2005


Hmmm, I don't get that A- prefix. However, I downloaded a third-party build (don't remember where) that has about 20 files worth of crazy voodoo to make it more 'Mac-like'. To tell the truth, I often find myself wishing it would be more emacs-like instead. Looking through it, I see a bunch of lines like this: (global-set-key [(alt x)] 'kill-region), which seems to be what makes cmd-X into a pseudo-Cut command in my build. I'm guessing you could do the same kinda thing to set up your command key prefs as you want.
posted by boaz at 2:20 PM on March 1, 2005


« Older Where is the world's population centre of gravity?   |   traveling across europe Newer »
This thread is closed to new comments.