Adding a new keyboard shortcut in SSMS.

5

July 6, 2015 by Kenneth Fisher

I love keyboard shortcuts. I’d rather keep my hands on the keyboard than move back and forth to the mouse. Not that I won’t use the mouse, but only when I have to. One frequent (and annoying) task that I haven’t been able to find a keyboard shortcut for is opening the Change Connection window.

UserFunction

Recently I’ve been working on configuring my SSMS (Management Studio). I’ve used Aaron Bertrand’s (b/t) query window color format and modified my new query template. So while I was at it, I finally decided that since I couldn’t find a short cut to open the Change Connection window, I’d go ahead and create one.

How you may ask?

Well it’s pretty simple. First go to Tools->Customize and hit the Keyboard button.

UserFunction2

Next perform the following steps:

  1. Select the right command to set the shortcut on.
    1. Type Query. in Show commands containing to just display the query commands.
    2. Select Query.ChangeConnection
  2. Change the Use new shortcut in to SQL Query Editor
  3. Click on Press shortcut keys: and hit the key combination you want to use. I’m using CTRL-F8 since it’s free.
    You can see the existing shortcut just below in Shortcut currently used by: if there is one.
  4. Hit the Assign button.
  5. Hit the Ok button (Unless you want to assign more shortcuts. If you do, go ahead, I’ll wait.)

 

UserFunction4

And the shortcut is now not only assigned but shows up in the menus as a reminder

UserFunction5

5 thoughts on “Adding a new keyboard shortcut in SSMS.

  1. mtormos says:

    Nice. That’s very handy. Appreciate the info.

  2. […] SQL SERVER – Identifying Blocking Chain Using SQL Scripts But I Don’t Have a Test Server… Adding a new keyboard shortcut in SSMS. SQL Server Quickie #26 – the Transaction Isolation Level Repeatable Read SQL SERVER – Creating […]

  3. […] time to set things up. Aaron Bertrand’s (b/t) color scheme, change the New Query template and map a keyboard shortcut to change connection. And of course open up my common windows (Object Explorer, Template Explorer, Solution Explorer, […]

  4. […] Map the “Change Connection” option to Ctrl-F8 I frequently re-use the same query window, so I change connections a lot. It goes a lot faster since I mapped it to a shortcut. […]

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

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 1,682 other followers

Follow me on Twitter

ToadWorld Pro of the Month November 2013
%d bloggers like this: