Sunday, August 16, 2015

SSMS Ctrl+F1 and Ctrl+R keyboard shortcuts do not work



Had that issue with SQL Server Management Studio several times and now I hit it with SQL server 2016.

Wanted to make a post because I've found an active bug report "SSMS Ctrl+F1 keyboard shortcut doesn't work in 2014"

It seems to me Microsoft does not want to put a lot of effort in SSMS improvements.
There is a long list of problems associated with it and MS put them at lowest priorities.
Here is a short list I've personally had to deal with:
- Inability to Export/Import user defined query shortcuts;
- Ctrl+R button stopped working after applying Service pack and this bug goes with all newer versions and some SSMS updates;
- Use of deprecated functionality;
Etc.

Now I want to cover "Ctrl+F" problem.
1. Problem description:
- In SSMS go to "Tools" -> "Options" -> "Environment" -> "Keyboard" -> "Query Shortcuts".
There you can develop and store your own 32K long script and run it by pressing of combination of "Ctrl+Number" buttons.



2. After you set your shortcuts press "OK" and open new query tab. Your queries supposed to work except "Ctrl+F1". That is a reserved key for Help Viewer.

3. To fix it simply go this way: "Tools" -> "Options" -> "Environment" -> "Keyboard" -> "Keyboard"

4. Within "Press Shortcut keys:" box press "Ctrl+F1" and you'll get the default assigned item for that combination: "Help.ViewHelp (Ctrl+F1 (Global))".


5. Press "Assign" button. Then current assignment will disappear.



6. Then Press "Remove" button. That will remove assignment for "Ctrl+F1".

7. Then choose "Global" in "Use new shortcut in:" drop down box, within "Press Shortcut keys:" box press "Ctrl+F1", in "Show commands containing" put "Query.CustomSP1" and press "Assign" button.



8. After that press "OK" button and you should open new query tab to try your "Ctrl+F1" query to work.

9. The similar solution I've used for "Ctrl+R".
You have to find "Window.ShowResultsPane" option and assign it like this:






No comments:

Post a Comment