pajato0
pajato0

Reputation: 3676

Emacs on a Mac (short) keyboard: how does one make the Command and Control equivalent?

The recent MacBook Pro keyboard and the bluetooth keyboard layout has only one Control key but two Command keys. And symmetric keys at that. For a while I attempted to remap the modifier keys using the System preferences which works OK for me but drives anyone else using my computers crazy. This got me to wondering, is there a simpler way to achieve equivalence between Control (C-) and Command (S-) other than rebinding all the existing S-* keybindings?

To be clear, I am looking to have the keys labeled "command" execute as a Ctrl- prefix while I do not care what the key labeled "control" does, i.e. having three Control keys is OK.

Upvotes: 2

Views: 458

Answers (2)

Hamza Yerlikaya
Hamza Yerlikaya

Reputation: 49339

You can set mac-command-modifier,

mac-command-modifier is a variable defined in `ns-win.el'. Its value is super

This variable is an alias for `ns-command-modifier'.

Documentation: This variable describes the behavior of the command key. Set to control, meta, alt, super, or hyper means it is taken to be that key.

Upvotes: 3

Nicholas Riley
Nicholas Riley

Reputation: 44331

I'd suggest you try mapping Caps Lock to Control instead, and keeping Command as Meta. Otherwise you don't have any modifiers left to use as Meta, other than the rather awkward Option (which is pretty useful for typing special characters, anyway).

If you're really set on making Command into Control, you can use KeyRemap4Macbook to set up an application-specific keyboard remapping.

Upvotes: 3

Related Questions