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.
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.
Next perform the following steps:
- Select the right command to set the shortcut on.
- Type Query. in Show commands containing to just display the query commands.
- Select Query.ChangeConnection
- Change the Use new shortcut in to SQL Query Editor
- 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.
- Hit the Assign button.
- Hit the Ok button (Unless you want to assign more shortcuts. If you do, go ahead, I’ll wait.)
And the shortcut is now not only assigned but shows up in the menus as a reminder