Reputation: 447
I'm trying to set a Keyboard Shortcut in Visual Studio 2013 to Shift + Tab. However, when I put my cursor in the 'Press shortcut keys' textbox and attempt to press the Shift + Tab combination it doesn't put anything into the textbox and tabs back to the previous control!
Is there something that I am missing to let Visual Studio know that I am in fact entering a keyboard shortcut, and not using the command?
Upvotes: 8
Views: 5263
Reputation: 262
I know the question is a little old, but I found, I think, a better answer. It is in fact possible to bind the TAB key using the Visual Studio GUI interface. The trick is to select Text Editor in the drop-down box for Use new shortcut in, like this:
The screen shot shows setting the TAB key to Edit.FormatSelection, so that pressing TAB correctly indents the current cursor line or block of lines (like Emacs! yay!) rather than inserting tab or space characters.
If you still want access to inserting a tab character, you can add it to another key combination, like Ctrl-TAB.
Upvotes: 9
Reputation: 3704
I think that tab and shift-tab are bound to Windows, therefore even unassigning the Edit.SelectNextControl and Edit.SelectPreviousControl won't do much...
You can hack the XML though -- VS2013 saves changed keyboard shortcuts to CurrentSettings.vssettings under Documents\Visual Studio 2013\Settings
Good luck fighting Windows :)
Upvotes: 2
Reputation: 16153
I believe, though I am not positive, that Tab and Shift-Tab cannot be bound in VS. They're tied intimately to indent and unindent. Tab (and maybe Shift-Tab) is tied to code that triggers completion actions as well.
You might try removing the bindings of Tab and Shift-Tab and then try to bind them to the desired functionality. Make sure you remember what the bindings were if you remove anything.
Upvotes: 0