I solved the problem!!!
Hello!
I use function keys, including Visual Studio, in Parallels.
- I wanted regular MacOS behaviour outside Parallels
- I wanted Windows function key behaviour when Parallels in foreground.
I solved the problem with the function keys !!!
1. Go to Mac Preferences
ENABLE "Use all F1, F2, etc. as standard function keys."
(Don't worry, the below fix will automatically turn them to MacOS keys whenever Parallels is not in foreground)
2. Go to Parallels Desktop (main menu) -> Preferences
ENABLE "MacOS X System Shortcuts"
3. Go to Parallels Desktop -> Virtual Machine -> Configure... -> Advanced
ENABLE "Optimize modifier keys for games"
(this makes CTRL / SHIFT / ALT keys work properly, like copying shortcuts or rectangle copy & pastes in Visual Studio)
4. Download and install "KeyRemap4MacBook", a freeware program.
5. Open KeyRemap4Macbook Preferences and select "Misc & Uninstall" tab.
-> Click "Open private.xml" and copy and paste the below file (between the Start and End lines, but not including the Start and End dashed lines)
6. In KeyRemap4Macbook Preferences, click "Change Key" and then enable all 5 or 6 settings in the "Macbook Air" (these also probably also works for the new Macbook Pro's with Thunderbolt port, or you can modify them)
7. Now, you have bliss!
MACOS: The icons on the Mac keys behave normally, like brightness, volume, play, pause, etc.
PARALLELS: When Windows is running in the foreground, it will now behave like normal function keys, and Visual Studio users are happy, happy, happy, happy. (You can still hold Fn key while inside Parallels to access the MacOS keys)
(Note, the below private.xml also includes a way to make PgUp/PgDn/Home/End/Insert/Delete much easier on a MacBook Air keyboard, when using Visual Studio, Word, Excel, or other Mircosoft product etc.)
And yes, Spaces still works great too!
--------Start of Custom private.xml for KeyRemap4MacBook--------
<?xml version="1.0"?>
<root>
<list>
<item>
<name>Macbook Air: Keyboard Preferences Configured to Standard Function Keys</name>
<list>
<item>
<name>F1,F2 to Brightness Adjust (except in Parallels/RDP)</name>
<appendix>F1 to Brightness Down</appendix>
<appendix>F2 to Brightness Up</appendix>
<identifier>remap.air_f1f2</identifier>
<not>VIRTUALMACHINE, REMOTEDESKTOPCONNECTION</not>
<autogen>--KeyToConsumer-- KeyCode::F1, ConsumerKeyCode::BRIGHTNESS_DOWN</autogen>
<autogen>--KeyToConsumer-- KeyCode::F2, ConsumerKeyCode::BRIGHTNESS_UP</autogen>
</item>
<item>
<name>F3,F4 to Expose/Dashboard (except in Parallels/RDP)</name>
<appendix>F3 to Expose</appendix>
<appendix>F4 to Dashboard</appendix>
<identifier>remap.air_f3f4</identifier>
<not>VIRTUALMACHINE, REMOTEDESKTOPCONNECTION</not>
<autogen>--KeyToKey-- KeyCode::F3, KeyCode::EXPOSE_ALL</autogen>
<autogen>--KeyToKey-- KeyCode::F4, KeyCode:
ASHBOARD</autogen>
</item>
<item>
<name>F6,F7,F8 to Music Controls (except in Parallels/RDP)</name>
<appendix>F6 to Music Prev</appendix>
<appendix>F7 to Music Play/Pause</appendix>
<appendix>F8 to Music Next</appendix>
<identifier>remap.air_f6f7f8</identifier>
<not>VIRTUALMACHINE, REMOTEDESKTOPCONNECTION</not>
<autogen>--KeyToConsumer-- KeyCode::F6, ConsumerKeyCode::MUSIC_PREV</autogen>
<autogen>--KeyToConsumer-- KeyCode::F7, ConsumerKeyCode::MUSIC_PLAY</autogen>
<autogen>--KeyToConsumer-- KeyCode::F8, ConsumerKeyCode::MUSIC_NEXT</autogen>
</item>
<item>
<name>F9,F10,F11 to Speaker Controls (except in Parallels/RDP)</name>
<appendix>F9 to Mute</appendix>
<appendix>F10 to Volume Down</appendix>
<appendix>F11 to Volume Up</appendix>
<identifier>remap.air_f9f10f11</identifier>
<not>VIRTUALMACHINE, REMOTEDESKTOPCONNECTION</not>
<autogen>--KeyToConsumer-- KeyCode::F9, ConsumerKeyCode::VOLUME_MUTE</autogen>
<autogen>--KeyToConsumer-- KeyCode::F10, ConsumerKeyCode::VOLUME_DOWN</autogen>
<autogen>--KeyToConsumer-- KeyCode::F11, ConsumerKeyCode::VOLUME_UP</autogen>
</item>
<item>
<name>F12(Eject) to Forward Delete/Insert</name>
<appendix>F12 to Forward Delete (Auto-Repeating!)</appendix>
<appendix>Fn+F12 to Insert</appendix>
<identifier>remap.air_f12</identifier>
<autogen>--KeyToKey-- KeyCode::F12, KeyCode::FORWARD_DELETE</autogen>
<autogen>--ConsumerToKey-- ConsumerKeyCode::EJECT, KeyCode:
C_INSERT</autogen>
</item>
<item>
<name>Disable Right Option Key, except when pressed with cursor/delete keys (Works better in Parallels)</name>
<appendix>Option_R+Up/Down/Left/Right Arrow Keys to PageUp/PageDown/Home/End (Allows one handed operation)</appendix>
<appendix>Option_R+Delete to Forward Delete</appendix>
<identifier>remap.modified_optionR_behaviours</identifier>
<autogen>--KeyToKey-- KeyCode::OPTION_R, KeyCode::VK_MODIFIER_EXTRA1</autogen>
<autogen>--KeyToKey-- KeyCode::CURSOR_UP, ModifierFlag::EXTRA1, KeyCode:
AGEUP</autogen>
<autogen>--KeyToKey-- KeyCode::CURSOR_DOWN, ModifierFlag::EXTRA1, KeyCode:
AGEDOWN</autogen>
<autogen>--KeyToKey-- KeyCode::CURSOR_LEFT, ModifierFlag::EXTRA1, KeyCode::HOME</autogen>
<autogen>--KeyToKey-- KeyCode::CURSOR_RIGHT, ModifierFlag::EXTRA1, KeyCode::END</autogen>
<autogen>--KeyToKey-- KeyCode:
ELETE, ModifierFlag::EXTRA1, KeyCode::FORWARD_DELETE</autogen>
</item>
</list>
</item>
</list>
</root>
--------End of Custom private.xml for KeyRemap4MacBook--------
Last edited: Mar 31, 2011