OverviewUsing Visual Studio (in Parallels) on my Mac works pretty well, except when I try to use Command+Arrow to move to the beginning or end of a line. When you press Command+Arrow in Visual Studio on a Mac, the window moves around the screen, which is quite surprising and not at all helpful.
I did some research and found some useful information about mapping Mac Keyboard Shortcuts to Visual Studio (and Windows) in the following areas:
- Comments from the post in #1 above
Below is a summary of the steps required to use Mac keyboard shortcuts such as Command+Left Arrow from within a Parallels or similar Windows VM and Visual Studio.
Note this tutorial is for Windows 10 and Visual Studio 2015.
- Install AutoHotKey
- Download the MacKeyboard.ahk file (note this modifies more than just Visual Studio keys and incorporates changes from the links above.The file is a fork from here).
- Setup the .ahk file to run at startup
- Type Command+R to open the run window, then type shell:startup
- Copy the MacKeyboard.ahk file into the startup folder.
- Open Visual Studio
- Press Ctrl+Q and type Keyboard to open keyboard settings.
- Type “Edit.LineStart” in “Show commands containing” to select the LineStart command
- Select “Text Editor” in the “Use new shortcut in:” box
- Type Shift+Control+Option+Left Arrow into “Press shortcut keys:” and click Assign
- Click OK to close the Options window.
- Double click on the MacKeyboard.ahk script to run it.
- Open a project in Visual Studio and Command+Left Arrow should bring your cursor to the home position. Alt+Left Arrow should move a word at a time.