Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How Can I Override Visual Studio's Menu Accelerator Shortcuts?

I'm a Mac-based .Net developer so over the years I've got into the habit of remapping certain common functions to a more 'Macish' set of keyboard shortcuts:

CUT: Ctrl + X => Alt + X
COPY: Ctrl + C => Alt + C
PASTE: Ctrl + V => Alt + V
SELECT ALL: Ctrol + A => Alt + A
SAVE: Ctrl + S => Alt + S

and so on.

with this fancy schmancy VS 2010 Premium edition we've just got we've got extra menus e.g.

 Test
 Data  

whose menu accessor (accelerator?)shortcuts are Alt + S and Alt + A which take precedence over my user-defined shortcuts for SAVE and SELECT ALL.

Is there a way of disabling these accessors so my overrides will work?

like image 679
indra Avatar asked Feb 14 '11 09:02

indra


People also ask

What is override keyboard shortcuts?

Override or define the keyboard shortcut Override or define a new keyboard shortcut behavior instead of preventing the keyboard shortcut. For example, Ctrl + S keyboard shortcut saves the document in SFDT format by default, and there is no behavior for Ctrl + Alt + S .

How do I change the shortcut keys in Visual Studio?

Customize a keyboard shortcutOn the menu bar, choose Tools > Options. Expand Environment, and then choose Keyboard.

What is the shortcut for running Visual Studio's debugger choose one?

CTRL+SHIFT+F5 to Stop and Re-Build This shortcut combines three debugging Visual Studio code commands in one. CTRL+SHIFT+F5 lets you end the debugging session, rebuild it, and create a new debugging session.

How do I stop Visual Studio shortcut debugging?

Shift+F5 - Stop Debugging - Ends your debugging session.


1 Answers

Here's how to change the shortcut key for a Visual Studio menu, using the 'Test' menu as an example:

  1. Go to Tools, Customize.
  2. Click the Commands tab.
  3. Ensure the Menu bar option is selected, and that Menu Bar is chosen for editing from the drop-down (this is the primary application menu bar).
  4. In the Controls section, click on the Test menu.
  5. Click on the Modify Selection ▼ button.
  6. Change the text for the Name property:
    • Any letter prefixed with an '&' ampersand will act as the shortcut key.
    • The ampersand is not required if you don't need to reach this menu with the keyboard.
  7. Press Enter to keep the setting.

Editing the Test menu

'Modify Selection' for the Test menu

like image 156
Alex Angas Avatar answered Sep 22 '22 01:09

Alex Angas