Help: SQL Server

Sharing my knowlege about SQL Server Troubleshooting Skills

    Advertisements
  • Blog Stats

    • 1,539,057 hits
  • Select GETDATE()

    May 2014
    M T W T F S S
    « Apr   Jun »
     1234
    567891011
    12131415161718
    19202122232425
    262728293031  
  • Advertisements

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

12 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!

  6. Thunderbolt said

    Cool! It Works!!

  7. Omnius said

    There are some keys that just won’t reassign, for example Ctrl-D (which I like to assign to Edit.LineDelete) would not reassign. I had to go through and specifically remove *all* of the existing associations with Ctrl-D (which by default in newer versions of SSMS changes output to grid) before I could reassign it even just for the text editor. Annoying.

  8. ralph said

    Thanks a bunch! Developers (in this case of SSMS) seem to think that new ways are always better ways, neglecting the years of habit built into unthinkingly using simple keystroke patterns. Relearning something already in place is more difficult than learning anything for the first time. All the productivity aids are worthless when I have to start over learning how to use them. I’ve been using ctrl + E and ctrl + R since it was the standard in SSMS. I’ve made these same changes years ago but did not remember where they were. Once they work, I stop thinking about it which makes your post here soooo helpful.

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 )

Google+ photo

You are commenting using your Google+ 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 )

Connecting to %s

 
%d bloggers like this: