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.
Share
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
@4 - liar, liar pants on fire - where was your follow-up article?
October 10 2007 at 9:02 PM Report abuse Permalink rate up rate down ReplyTHANK YOU VERY MUCH ~ i clicked the 'no action' and feel better already!
thanks alot!
JohnC :]
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
@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.
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.
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."
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 Permalink rate up rate down Reply@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.
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.
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
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 Permalink rate up rate down ReplyTry 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. =)
Hot Apps on TUAW
Deals of the Day
more deals- Refurb Apple MacBook Air Laptops: 12" 64GB SSD for $699 + free shipping
- JVC Motion Sensing Clock Radio with Dual iPod Docks for $55 + free shipping
- Apple iPhone Headset with Mic for $4 + $2 s&h
- miFrame Picture Frame Dock for iPad for $64 + $8 s&h
- Refurb Apple iPod nano 8GB MP3 Player for $99 + free shipping, 16GB for $119
- Hannspree Apple-Shaped 28" 1080p LCD HDTV for $270 + free shipping
Software Updates
more updates- EFI Firmware Update brings Lion Internet Recovery to 2010-model Macs
- OS X Lion 10.7.3 released with Safari 5.1.3, Wi-Fi bug fix
- Aperture updated to 3.2.2, addresses Photo Stream issue
- Apple updates Keynote to address Lion issues
- Google Search app gets new look on iPad
- Apple releases Apple TV Software Update 4.4.3



21 Comments