Skip to Content

Mac 101: change keyboard modifier keys with a Windows keyboard



You may recall that one of Apple's slogans when the Mac mini was released was BYOKM-bring your own keyboard and mouse. Well a lot of those keyboards will of course be Windows keyboards, and while they work fine on a Mac, there's one particularly annoying thing. For some reason the keyboard Windows key is mapped to the Mac Command key and the keyboard Alt key is mapped to the Mac Alt or option key. The reason this is a problem is that on a Windows keyboard the Alt key is right next to the spacebar (where the Command key is on a Mac keyboard). So if, like me, your keyboard shortcut muscle memory is to the key next to the spacebar then all your shortcuts get messed up on a Windows keyboard. Fortunately, there's a simple solution to this problem in the Keyboard tab of the Keyboard & Mouse Preference Pane. There if you click on the "Modifier Keys..." button you'll be taken to a dialog where you can easily remap the keys. So to make a Windows keyboard work like a Mac keyboard just change the option key to the command key and the command key to the option key as follows:

You'll also note that the Modifier Keys dialog lets you take care of another annoyance, the anachronistic Caps Lock key. Personally I find Caps Lock worse than useless as I sometimes inadvertently hit it. So you can turn it off altogether as I've done here, or you can set it to emulate one of the other keys (as Unix and Linux aficionados sometimes like to do).

So if you like to use a Windows keyboard with your Mac for whatever reason, these modifier keys settings will help keep you sane. Since my preferred keyboard is an old-school buckling-spring EnduraPro 104, these settings have been a great boon to me.

Categories

Switchers Mac 101

You may recall that one of Apple's slogans when the Mac mini was released was BYOKM-bring your own keyboard and mouse. Well a lot of those...
 

Add a Comment

*0 / 3000 Character Maximum

21 Comments

Filter by:
Jon S

@4 - liar, liar pants on fire - where was your follow-up article?

October 10 2007 at 9:02 PM Report abuse rate up rate down Reply
John Carroll

THANK YOU VERY MUCH ~ i clicked the 'no action' and feel better already!

thanks alot!

JohnC :]

October 08 2007 at 6:39 PM Report abuse rate up rate down Reply
ZuDfunck

I sure want to thank you for that
I bought a bluetooth Apple keyboard and I have been hitting that key constantly and this tip will save my sanity!

Thanx ZuD

October 08 2007 at 10:39 AM Report abuse rate up rate down Reply
Robert Brodrecht

@Paul

I recently grabbed that script and modified it. The problem I had with it was that the author changed all the modifier keys back to defaults. I personally am sick of the caps lock key. So, I disable it. When the script resets to default, it turns the caps lock key back on.

In addition to changing the delay to .1 to speed the script up, I replaced:

else
-- We're in PC keyboard mode. Swap back to the defaults
click button "Restore Defaults"
end if

with:

-- We're in PC keyboard mode. Swap back to the defaults
click pop up button 3
click menu item 3 of menu 1 of pop up button 3
delay 0.1
click pop up button 4
click menu item 4 of menu 1 of pop up button 4
delay 0.1

I run this script when I login. When I'm at work, I've already plugged in my eternal keyboad, mouse, and monitor. Nothing fancy, but it works.

The only bug I've found is that if you have been playing with the system prefs and don't have the "Keyboard & Mouse" tab open when you quit, the script errors out. For whatever reason, it doesn't swap to the correct tab before continuing, or AppleScript doesn't do the "tell" correctly. I'm not sure, since I don't know AppleScript well. So, make sure you click back to the correct tab before closing system prefs.

I also popped off my alt key and windows key and swapped them to make it a little more Mac-like.

September 14 2007 at 11:21 AM Report abuse rate up rate down Reply
Ron

I use the Microsoft Intellitype drivers (they work with any external keyboard), which allow you to specify key layouts for your external keyboard separately from the MacBook keyboard.

It also allows you to do some additional functionality which can't be done with the standard Apple preferences pane, such as assigning keys to change the volume, pause and start iTunes, etc.

September 13 2007 at 7:55 PM Report abuse rate up rate down Reply
nevan

I use Doublecommand to do this. It's a little easier than the Keyboard pref pane, but still a pain to do every time.
http://doublecommand.sourceforge.net/


The developer promises:
"The highest priority now is having settings per keyboard, or at least only applying DoubleCommand to a single keyboard."

September 13 2007 at 6:23 PM Report abuse rate up rate down Reply
2 replies to nevan's comment
Jake

You don't have to set DoubleCommand every time if you use the 'system' preference inside of the DC control panel; of course I have the opposite problem than described above. I like to use the CTRL key as my Command key but for some reason when I set that up, I lose my ALT key altogether, and can no longer select my operating system upon startup with Boot Camp. Very annoying.

December 08 2007 at 11:28 AM Report abuse rate up rate down Reply
nevan

@Jake: My problem is that I use a PC keyboard with a laptop, so I keep changing my settings. At home, I use the PC keyboard, but outside I use the laptop keyboard. Doublecommand has promised that they'll make it so that any keyboard is detected, but it hasn't happened yet.

BTW, I always use the 'user' setting, so I don't have to type in my password. What I've been looking for is a script I can run to automatically set Doublecommand to setting "80" (swapped alt and command) if it's set to '0' and vice versa.

December 09 2007 at 10:54 PM Report abuse rate up rate down Reply
David Fischer

Or use Microsoft's Keyboard drivers for MS USB or Wireless keyboards. It enables modifier key swapping without affecting a laptop's built in keyboard setup.

As for Apple keyboards...I'll buy one when they've got a curved or ergo keyboard.

September 13 2007 at 5:56 PM Report abuse rate up rate down Reply
PC

Here is a somewhat lengthy way to automatically switch the keyboard. The method uses a program called MarcoPolo as well as applescripts...

Link: http://fall-line.com/2007/07/02/change-keyboard-modifier-keys-automatically-on-osx-with-applescript

September 13 2007 at 5:08 PM Report abuse rate up rate down Reply
Max

Does this button only appear when a non-mac keyboard is plugged in? On my Mac Pro (10.4.10) with a Mac keyboard & Mighty Mouse I do not have a "modifier keys" button at all.

September 13 2007 at 4:58 PM Report abuse rate up rate down Reply
Brian Bush

Try controllermate (http://www.orderedbytes.com/controllermate/). I use it to change the modifier keys on a logitech G15 while simultaneously leaving the modifier keys as they are for the macbook keyboard. =)

September 13 2007 at 4:51 PM Report abuse rate up rate down Reply
Buy an ad here

Hot Apps on TUAW

Tweets

© 2012 AOL Inc. All Rights Reserved.