Help: SQL Server

Sharing my knowlege about SQL Server Troubleshooting Skills

SSMS Tip: What happened to my keyboard shortcuts? Ctrl+R (Show/Hide Result) and Ctrl+E (Execute) not working!

Posted by blakhani on May 8, 2014


Long back I installed SQL Server 2014 to learn new features and of course share the knowledge. I started from CTP1, CTP2 and finally came to RTM. Earlier I was installing them on Virtual Machines and recently I installed SQL 2014 on my laptop which already has SQL Server 2012 installed.

While using SSMS of SQL Server 2014, I noticed that earlier keyboard shortcuts were not working as they used to work earlier (in SQL 2012 SSMS). Few examples are as below:

  • Ctrl + R should show/hide result pane.
  • Ctrl + E should execute the query.

If I use above, I was getting below message in the left bottom of SSMS. “(Ctrl+R) was pressed. Waiting for second key of chord…

image

Pressing Ctrl+R again I get message as “The key combination (Ctrl+R, Ctrl+R) is not a command

Same was the case with Ctrl+E command. “(Ctrl+E) was pressed. Waiting for second key of chord…” . If I take my mouse to “Execute” button, it guided me that shortcut to execute command is Ctrl+Shift+E. And it works as well.

image

But I always preferred to go back to earlier settings. There are multiple ways to achieve it.

Short Route

If you have not done any customization in SSMS and you are OK to reset all the settings then you can use this. In Management Studio menu, go to Tools –> Options –> Environment –> Keyboard –> Keyboard –> Apply the following additional keyboard mapping scheme” and choose “Reset”. You would get a confirmation pop-up, click OK there.

image

Long Route

This route would be preferred if you have done some customization with the settings and want to retain those setting. you can provide shortcuts to any action. Go to Management Studio Tools menu and Tools –> Options –> Environment –> Keyboard –> Keyboard Over there, you can choose the command and assign the “shortcuts for selected command”. The list of command can be searched. For example, I have entered “Window.ShowResultsPane” and assigned Ctrl+R to it as below. Make sure to click on “Assign” button before hitting OK.

image

In Same way , Ctrl+E can be assigned to “Query.Execute

Documentation: http://technet.microsoft.com/en-us/library/ms174205(v=sql.120).aspx (SQL Server Management Studio Keyboard Shortcuts)

More reading: http://blogs.msdn.com/b/managingsql/archive/2011/07/13/enhanced-keyboard-shortcuts-in-ssms-in-denali.aspx

Hope this helps! Please write comment and let me know your feedback.

Cheers,
Balmukund

Advertisements

8 Responses to “SSMS Tip: What happened to my keyboard shortcuts? Ctrl+R (Show/Hide Result) and Ctrl+E (Execute) not working!”

  1. Mike Ogilvie said

    Thank you!

  2. Morten said

    Thanks, this had been bugging me for a while! Guess it must have come after I updated SSMS.

  3. Bharateesh said

    Brilliant Mr. Blakhani, I was able to use this shortcut [Ctrl+R], to hide result pane in sql server 2012, but it became impossible after upgrading to sql server 2014. Your wonderful solution got this issue resolved. Thank you very, very much.

  4. Thanks. But if these are the default settings, then why do we have to Reset to Default to make this work? (if I didn’t change anything)

  5. Deivison BR said

    Thanks so much! Solved my problem!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: