Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ctrl-Shift-M no longer working in SQL Server Management Studio

Tags:

I find it useful and productive to use the built in Ctrl+Shift+M when creating a new stored proc in SQL Server Management Studio (2008). On one of my machines that keyboard shortcut combo has stopped working and I've been unable to work out how to restore it.

There could also be some new utility on my machine that's overriding that but I have been unable to find culprit if that's the case.

Ideas?

like image 507
Guy Avatar asked Aug 08 '09 23:08

Guy


People also ask

How do I enable keyboard shortcuts in SSMS?

SQL Server Management Studio (SSMS) offers keyboard shortcuts. By default, it uses the SQL Server scheme, with keyboard shortcuts based on Visual Studio. To change the keyboard scheme or add more keyboard shortcuts, on the Tools menu, select Options. Select the desired keyboard scheme on the Environment, Keyboard page.

What is Ctrl Shift M?

Ctrl-Shift-m. Remove a paragraph indent from the left. Ctrl-t. Create a hanging indent.

How do I select an entire line in SQL Server?

We're good to go! From now on, pressing Ctrl + L with no selection will select the current line in SQL Query Editor.

Why Ctrl +r not working in SQL Server?

SolutionsGo to the Tools Menu in SSMS and Select Options. Select Keyboard section under the Environment tab. Select "Default" from the drop down under "Apply the following additional keyboard mapping scheme". Click Reset.


2 Answers

This keyboard combination has been removed from SQL 2008. You can still get to the functionality by selecting Query >> Specify Values for Template Parameters...

This is quite confusing because most templates still reference the keyboard combo. (The menu item above even references it!!)

Unfortunately, we can't "restore" the Ctrl-Shift-M command. SQL Mgmt Studio doesn't allow adding new shortcuts. Only "query" shortcuts (Options >> Environment >> Keyboard).

The easiest way to resolve this is to just learn the new keyboard sequence: Alt >> Q >> S

Here's a confirmation by Mark Han on the MS Online Community Support team:

In order to resolve the issue, I would like to explain the following

A) I have re-produce the issue and compare it with SQL Server 2005 Management Studio. It is confirmed that the "Ctrl-Shift-M " shortcut key does not exist in SQL Server 2008 Management Studio. If you have concerns on that, please send us a feedback via the address(https://connect.microsoft.com/sql). Besides I'm consulting with our dev team with the issue; if anything updates, we will public[ize] it.

B) Ctrl-Shift-M is used to replace template parameters, we also can open Specify Values for Template Parameters manually

1) On the Query menu, click Specify Values for Template Parameters.
2) In the Specify Values for Template Parameters dialog box, the Values column contains suggested value for the parameter (Database Name in the example above). Accept the value or replace it with a new value, and then click OK to close the Replace Template Parameters dialog box and modify the script in the query editor.

Hope this helped!

like image 121
3 revs, 2 users 96%Joe Cogan Avatar answered Sep 28 '22 07:09

3 revs, 2 users 96%Joe Cogan


In SSMS click on Tools on the menu bar and select the Options menu item.

When the Options form opens... 1.) Select Keyboard in the left pane.

2.) On the right pane change the "Apply the following additional keyboard mapping scheme:" drop down list to "Visual Studio 2010 Compatible."

3.) Click on the OK button to save the changes and close the Options form.

Now when you select the Query menu on the menu bar it should display Ctrl+Shift+M as the shortcut next to the Specify Values for Template Parameters menu item.

like image 45
user3684044 Avatar answered Sep 28 '22 08:09

user3684044