Adding a new keyboard shortcut in SSMS.
7July 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.
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
Nice. That’s very handy. Appreciate the info.
Your welcome. I find it rather handy myself.
[…] 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 […]
[…] 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, […]
[…] 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. […]
[…] Add keyboard shortcuts for common tasks […]
[…] Map the change connection option to a keyboard command. […]