Fixing Inverted Caps Lock on VMWare Fusion

I use a MacBook Pro and on it I run VMWare Fusion on top of which I run Windows XP. Normally, when Caps Lock is on in the Mac, it's on in the Windows XP instance and when Caps Lock is off in the Mac, it's off in the Windows XP instance. However, from time to time, on the Windows XP instance Caps Lock becomes "inverted"--that is, Caps Lock on the Windows XP instance is reversed from what it is on the Mac. So on the Mac, Caps Lock will be off and on the Windows XP instance, Caps Lock will be on. Or, the Mac Caps Lock will be on--and so will be the light on the Caps Lock key--yet the Windows XP instance Caps Lock will be off.

Okay, now that I've established the problem, I'll go ahead and explain the solution, then for those interested, I'll backtrack into the details.

UPDATE: there is, at least in VMWare Fusion 2.0, a simpler solution than I originally detailed in this blog post (that original solution and my explanation of the cause of the problem are still included below): go to the Virtual Machine menu in VMWare Fusion and choose Send Key ==> Caps Lock. You'll note while you're there that there are a number of other keys you can send as well; I discovered this whole capability tonight while looking around to try to find a way to send the Insert key (Insert had gotten toggled on in Internet Explorer and I wanted to toggle it back off) which I didn't know how to do directly because the MacBook Pro keyboard has no Insert key.

UPDATE 2: as pointed out by Bob in one of the Comments to this entry, another simple solution is to launch the On-screen Keyboard application (generally this can be done by choosing Start ==> All Programs ==> Accessories ==> Accessibility ==> On-screen Keyboard) and toggle Caps Lock by clicking on the virtual "lock" button in the application. The On-screen Keyboard application shows--and can change--the state of Caps Lock in the Windows XP instance without any regard to the state of Caps Lock on the Mac itself.

So here is the solution: in the Windows XP instance, open an application that can toggle Caps Lock (didn't know Windows apps could do such a thing? Surprise!) such as Microsoft Word and go into whatever context is required for the app to toggle Caps Lock (in Word, that means typing in a document). Make sure Caps Lock on the Mac is off; this will mean that Caps Lock in the Windows XP instance is on. Start typing normally (that is, as if Caps Lock in the Windows XP instance is off); if you try to type "Hello" what you'll get instead is "hELLO" but as soon as you hit the space bar, the app will "correct" what you typed to "Hello" and toggle the Windows XP instance Caps Lock off--and as a result, Caps Lock will be back in synch between the Mac and the Windows XP instance. :)

Why does this problem happen in the first place? You've probably figured at least part of that out already: when you use an app that can toggle the Windows XP Caps Lock and you have Caps Lock on but type in a way that the app thinks indicates Caps Lock is on unintentionally, it "helps" you by "correcting" what you typed and turning off Caps Lock on the Windows XP instance for you. This isn't necessarily a bad thing--in a standalone Windows XP instance. However, with consideration to the fact that in this case it causes the Windows XP instance to toggle its Caps Lock but doesn't do the same for the Mac such that the Windows XP Caps Lock and the Mac Caps Lock become out of synch, it's not good. And why doesn't the toggling of Caps Lock in the Mac instance cascade up to the Mac anyway? As well as I can tell, Mac applications do not have the ability to toggle Caps Lock on and off (side note: this makes complete sense when you note the difference between what Windows & Mac do when you press the shift key while Caps Lock is on: on Windows, it's sort of a "double negative" type of thing such that the result is a lowercase letter whereas on Mac, the result is still an uppercase letter--so then it wouldn't make sense for the app to toggle Caps Lock) which means that VMWare Fusion can't toggle Caps Lock on the Mac when it is toggled in the Windows instance (now, I'm not even sure that VMWare Fusion can detect Caps Lock being toggled in the Windows instance but if VWWare Fusion can't toggle it on the Mac then really it's a moot point whether or not it can detect it being toggled in the Windows instance).

One note of interest: the behavior here makes it clear that the Mac-VMWare Fusion-Windows XP instance communication isn't along the lines of "Caps Lock on" or "Caps Lock off" but rather "toggle Caps Lock." See, you'll note that I didn't indicate that to fix the problem you just have to hit the Caps Lock key on the Mac and it will get things back in synch--that would work if the communication were "Caps Lock on" or "Caps Lock off" but since it's just "toggle Caps Lock" all that happens is that the Caps Lock gets reversed the other way around!

Comments
Martin's Gravatar Thanks for the explanation but how to toggle back the Caps Lock if I don't have MS Word on my XP instance ?
# Posted By Martin | 9/9/08 8:20 PM
Josh Adams's Gravatar @Martin--as I said, open an application that can toggle Caps Lock and go into whatever context is required for the app to toggle Caps Lock. So what if you don't have Microsoft Word installed in your Windows XP instance? Use a different application that is able to toggle Caps Lock in Windows XP. I tried to find an application that comes with Windows that is able to toggle Caps Lock but I was unable to do so and so I can't give you specific steps to follow for an application I know you will have. All I can tell you is that you certainly have an application that is able to toggle Caps Lock in Windows XP or you wouldn't be able to get Caps Lock inverted to begin with. Let me know what you figure out!
# Posted By Josh Adams | 9/10/08 12:09 AM
Jan vdP's Gravatar Yes, thanks, thanks, many thanks for the solution!
# Posted By Jan vdP | 9/21/08 7:25 AM
Martin's Gravatar Josh, finally I could revert to normal operation with Caps Lock on my XP instance. Still, I can't totally control the behavior of it. I mainly use Fusion to connect with my PC at my office with Windows Remote Desktop. I did switch back the Caps lock with Word on that XP instance. For some reason, I couldn't reproduce the error. Anyway, now that it works, I hope it won't come back any time soon! Thanks again for your help.
# Posted By Martin | 9/22/08 9:43 PM
Josh Adams's Gravatar @Jan vdP--I'm happy that it helped you; thank you for taking the time to let me know!

@Martin--I'm glad you were able to get the issue worked out; thanks for letting me know. Reproducing the issue with Word should be a matter of turning on Caps Lock and proceeding as if it is not on; note that this must be done with a word that would normally have a leading uppercase letter (so something like mICROSOFT). I may not have been as clear as I should have that in order to get Windows to toggle off Caps Lock, you have to type a word that Windws sees as "inverted" (for lack of a better word). So it has to be "jOSH," it can't just be "JOSH."
# Posted By Josh Adams | 9/23/08 1:01 AM
Bob's Gravatar @Martin: The onscreen keyboard under Start->Accessories->Accessability has the ability to toggle capslock (since its an onscreen keyboard) and should be installed by default on any windows XP instance.
# Posted By Bob | 10/9/08 3:26 PM
Josh Adams's Gravatar @Bob--great point! Thanks for the tip; I have updated the post to include that information.
# Posted By Josh Adams | 10/9/08 6:36 PM
Martin's Gravatar @Bob--Thank you for this trick. I still regularly need to revert the Caps Locks so I'm gonna use this one now !
# Posted By Martin | 10/10/08 8:12 PM
Josh Adams's Gravatar @Martin--I updated the entry a couple of weeks back, but I failed to post a comment to alert subscribers to the change, so I suspect you didn't see it. My apologies. Read the entry for the full details (you'll see a section early on that begins with "UPDATE") but in short, I noted that with VMWare Fusion (at least with version 2.0), you can choose Virtual Machine ==> Send Key ==> Caps Lock to send the Caps Lock. I think using this VMWare Fusion method to correct inverted Caps Lock on the Windows XP instance is more convenient than launching the On-screen Keyboard only for the purpose of fixing inverted Caps Lock (but I guess if you were to leave On-screen Keyboard running all the time then maybe using it would be more convenient).
# Posted By Josh Adams | 10/11/08 9:05 AM
Grey Satterfield's Gravatar Thanks a million for the tip! I don't have version 2.0 so I had to correct the inverted caps keys glitch with the Windows virtual keyboard. It worked like a charm. I feel like I have been let out of jail.
# Posted By Grey Satterfield | 11/3/08 1:36 PM
Josh Adams's Gravatar @Grey--sorry for the slow response here, but you're very welcome! I'm glad to hear I was able to help and I appreciate you taking the time to let me know about it. Once again, props to Bob for pointing out On-Screen Keyboard as an means to fixing this issue.
# Posted By Josh Adams | 11/10/08 5:30 PM
BlogCFC was created by Raymond Camden. This blog is running version 5.9.002. Contact Blog Owner