首页 > 解决方案 > Visual Studio 2017 SQL editor how to change keyboard shortcut to execute selection

问题描述

Using Visual Studio 2017, if I open a .SQL file and connect to an instance of SQL Server, what is the name of the keyboard short to change that executes the statement. Currently, if I hover over the green arrow, I see "Ctl+Shift+E", but I want it to be just Ctl+E, just as I have in SSMS.

I changed the keyboard shortcut for what I thought would be the command - SQL.TSqlEditorExecuteQuery and set it to Ctl+E, restarted VS yet the keyboard combination Ctl+E still does not respond and instead prompts me "(Ctl+E) was pressed. Waiting for second key of chord..."

标签: visual-studio

解决方案


The shortcut you are referring to (Ctrl+Shift+E) is: TSql Editor Execute Query

Here is how you can change shortcut keys:

On the menu bar, choose Tools, Options.

Expand the Environment folder, and then choose Keyboard.

Reference:

https://docs.microsoft.com/en-gb/visualstudio/ide/identifying-and-customizing-keyboard-shortcuts-in-visual-studio


推荐阅读