VMware
1 2 Previous Next 23 Replies Last post: Oct 15, 2007 5:04 AM by Caffeino  

tip: swap option and command keys (or windows and alt keys) in VM posted: Jan 8, 2007 4:35 PM

Click to view magi's profile Master 2,096 posts since
Aug 8, 2003
Here's a tip for those running Fusion who are accustomed to non-Apple keyboards and have their fingers trained that the alt key is next to the spacebar and the key to the left of that is the Windows key. (Note that Apple keyboards have the Command or Apple key where the Alt key belongs and the Alt or Option key where the Windows key belongs.)

In Fusion beta 1, we've implemented an option to swap the Option and Command keys for the guest's consumption, so if you're using a non-Apple keyboard (or you are using an Apple keyboard but you can ignore what your eyes tell you about the labels on the keys, and just go with what your fingers already know), you can still drive Windows/Linux/etc. the way you're used to:

Open ~/Library/Preferences/VMware Fusion/config in a text editor (create that file as a plain text file if it doesn't already exist), and add this:

[code]
mks.keyboard.swapAlt = TRUE
[/code]

Let us know if this is helpful!
Click to view rcardona2k's profile Champion 5,211 posts since
Oct 20, 2005
Thanks! Seems to work fine. I fixed the keyboard differences between my work PC and my MacBook Pro by attaching an Apple USB keyboard to a Dell workstation (horror!) so my keyboards match everywhere. :)
Click to view Guddler's profile Hot Shot 160 posts since
Aug 7, 2006
Heh, i did exactly that here too. After upgrading the Mac mini to the iMac i had a spare apple keyboard so i use it on my Dell (for work) all day. Now i really struggle with a standard UK keyboard. Just as well these apple one's are about the best feeling keyboards i've ever used. If they were "natural" shape too i'd be completely sorted.

I'd love to see some support for Apple UK keyboards in VM Additions. The downloadable UK map that someone privately produced isn't entirely 100% correct and i'm not sure if it will work in a Vista guest anyway. The only other guest i'm using right now is DOS and there aren't any additions for that anyway.
Click to view rcardona2k's profile Champion 5,211 posts since
Oct 20, 2005
the same "mks.keyboard.swapAlt=TRUE" may come in handy if you run VMware Workstation or Player under Windows or Linux with that Apple keyboard. FYI.

I was going to ask this but I thought it might be presumptuous. Thanks for sharing!
Click to view rcardona2k's profile Champion 5,211 posts since
Oct 20, 2005
I think I'm having trouble undoing this setting. I tried to comment out this config by using # and the swap appears to remain. I also renamed config to xconfig so now I'm a bit baffled.

Is there any possibility this puts something in the Windows XP registry that is NOT undone by removing the option on the host?

Next time I look at vmware.log, I'll see if this setting is getting picked up somewhere else.
Click to view oefe's profile Lurker 1 posts since
Feb 13, 2007
How about an option to swap ctrl and command keys so that standard Mac shortcuts like command+C would be mapped to the corresponding Windows shortcuts, i.e. ctrl+C?
Click to view coopermj's profile Enthusiast 64 posts since
Dec 22, 2006
Actually, what I'd love to see is a way of creating an <Insert> key on a MBP (<enter> seems an obvious choice). NetWare really likes the <Insert> key and there are a few other things that use it and I've searched from time to time for a Mac keyboard remapper that handles <Insert>, but haven't found one.
Click to view bigrock0's profile Enthusiast 56 posts since
Dec 29, 2006
key mapping would be grreat. for example, if i can map "delete" key to be "backspace" in fusion. i'm used to using backspace key for deleting characters, and now on fusion i have to use function and delete key at the same time.

also, it would be great if key mapping can be customized based on the type of keyboard. for example, when i plug in my microsoft usb keyboard, i don't want the same key mapping as i would on apple keyboard.
Click to view dmgraham's profile Lurker 4 posts since
Dec 23, 2006
I've been a frustrated Parallels user for months, having to resort to a Registry hack to swap the keys. I'm testing RC1 now (I love it!) and this tip has sealed the deal; I'm placing my order right now.

Thanks!

- Dave

p.s. It would be nice to have in the GUI for those not inclined to go hunting through the forums, etc.
Click to view dmgraham's profile Lurker 4 posts since
Dec 23, 2006
I spoke just a little too soon. It turns out that the key swapping--which is an absolute lifesaver btw--doesn't work in Unity mode; just full screen and single window. My fingers are crossed tightly hoping this gets fixed prior to release.

- Dave
Click to view dmgraham's profile Lurker 4 posts since
Dec 23, 2006
Bummer... key swap still doesn't work under Unity in the 1.0 (51348).
Click to view wdeboer's profile Enthusiast 102 posts since
Nov 30, 2006
Hmm, would that be the reason why Ctrl-C for copying and such didn't work in Unity mode for me earlier this evening?

VMware Developer

SDKs, APIs, Videos, Learn and much more in the Developer community.

Learn More

Developer Sample Code

Increase your developer productivity with VMware API sample code.

Learn More

VMworld Sessions & Labs

Online access to the latest VMworld Sessions & Labs and online services.

Learn more

Purchase PSO Credits Online

Purchase credits to redeem training and consulting services online.

Buy Now

Community Hardware Software

View reported configurations or report your own.

Learn More

VMware vSphere

Come witness the next giant leap in virtualization.

Register Today

Communities