SSMS 2016 and Keyboard Shortcuts

mhickinmhickin Posts: 2
edited August 5, 2016 9:30AM in SQL Prompt
Hi,

I'm running SSMS 2016 and the latest versions of SQL Prompt, and I seem to have lost the ability to use keyboard shortcuts for things like refreshing suggestions and reformatting code. (the shortcuts are no longer visible in the menus)
I have to keep going back to my mouse like some sort of animal!
Is this something I can somehow get back, or is this a breaking change in SSMS 2016?


Thanks,
mark

Comments

  • Aaron LAaron L Posts: 596 New member
    Hi Mark,

    The SQL Prompt keyboard shortcuts should all still be working in SSMS2016. If you navigate to Tools->Options->Keyboard and then select SQLPrompt.RefreshSuggestions (filtering by "RefreshSuggestions" is probably the easiest way to get to it) do you have any keyboard shortcuts listed?
    bAFamZg.png

    Thanks,
    Aaron.
  • Nick ONick O Posts: 19 Bronze 3
    Hi Aaron, I'm also using SSMS 2016 and SQL Prompt 7.2.3.283 and it seems none of my redgate shortcuts work. I've checked my settings and they are all set correctly, but none of the SQL Prompt shortcuts seem to be working. If I reset all my settings in SSMS 2016 it will work for a short period of time, but then stop working again. I'm not sure what is causing this, but it would be nice to have the shortcuts working again. I tend to use the F2, F12, and Ctrl+K+Y shortcuts a lot. Please let me know if there is anything I can do to help solve what is causing this.
  • Aaron LAaron L Posts: 596 New member
    Hi Nick,

    We're looking into this now but we're unable reproduce or find a reason why the keyboard shortcuts would stop working (in SSMS2016 the command system changed and the keyboard shortcuts are set on install rather than startup, which makes it even more confusing that they are stopping after a short while for you)

    If you use a command through the SQL Prompt menus are the shortcuts still listed next to the command names? Also, have you got any other extensions installed into SSMS 2016?

    Finally, could you turn on verbose logging (under SQL Prompt->Help->Enable Verbose Logging) and next time you notice you the shortcuts not working could you check if any warnings/errors are listed in the log.

    Thanks!
    Aaron.
  • Nick ONick O Posts: 19 Bronze 3
    Hi Aaron,

    Didn't notice this before, but all the Shortcuts are gone from the menus. If I use the command from the menus they all still work. I checked the shortcut settings within SSMS2016 and they are set. For instance the "RedGate.SQLPrompt.SSMSUI.Connect2011.RenameScriptedObject" is set to F2.

    I did turn on verbose logging, but I'm not seeing any errors in the log.
  • Nick ONick O Posts: 19 Bronze 3
    Hi Aaron,

    I compared to one of my colleagues and I seem to have a full list of keyboard shortcuts that start with 'RedGate.SQLPrompt.SSMSUI.Connect2011.', but he does not. All of my shortcuts were set to these instead of the the SQLPrompt ones. I've switched my shortcuts and now they are working, but is there a way to fully get rid of these shortcuts that start with 'RedGate.SQLPrompt.SSMSUI.Connect2011.' so it doesn't happen again?
  • Aaron LAaron L Posts: 596 New member
    Hi Nick,

    We've created a new private build for you that should remove these commands on startup which you can download here. Once that's installed you can also reset all the keyboard shortcuts to default through Tools->Import and Export Settings->Reset all settings (you'll be given the chance to make a backup of your current settings)

    The commands prefixed with "RedGate.SQLPrompt.SSMSUI.Connect2011." are used in SSMS2012/2014 as well as earlier previews of SSMS2016. To help us track down the cause of this, could I check if you previously had any SSMS2016 preview versions installed?

    Thanks,
    Aaron.
  • Nick ONick O Posts: 19 Bronze 3
    Hi Aaron,

    The update worked. Thank you. It removed those keyboard shortcuts.

    Also yes, I did have an earlier version of SSMS 2016, I had installed the CTP1 or 2 and upgraded from there. I can't remember which, but I did have one of the preview versions installed before the RC versions. None of my colleagues did though, they only installed the first released version of SSMS2016.
  • Hello Aaron,
    I'm experiencing the same issue as Nick O. I have tried the build you provided in your last posting in this thread but it didn't work for me. The commands prefixed with "RedGate.SQLPrompt.SSMSUI.Connect2011." are gone, but some shortcuts still doesn't work.
    I had several CTPs and RCs installed too. Additionally I have SQL Server 2014 Management Studio installed in parallel.
    Enabling verbose logging didn't yield any warnings or errors.
    If I reset all settings as suggested the wizard (using SQL Server 2008 R2 Compatible Settings (Default)) displays the following warnings/errors after finishing:
    "Warning 1: Keyboard: The command 'Debug.ParallelTasks' does not exist. The keyboard shortcut for this command cannot be unbound and has been ignored.
    Error 1: An error occurred while importing settings for 'External Tools List' [code 5616]."
    If I use Visual Studio 2010 Compatible Settings only the Warning is displayed.
    But it doesn't help either.

    In my case some shortcuts work, e.g. Ctrl+K, Ctrl+Y for formatting the script, and others don't work, e.g. Ctrl+Shift+D for refreshing suggestions.
    After resetting all settings the shortcut isn't displayed in the SQL Prompt menu next to the command anymore but it had been displayed before resetting (but the shortcut didn't work either).
    When trying to edit the keyboard shortcuts via Tools > Options > Keyboard no shortcut is displayed for SQLPrompt.Refreshusggestions and it is not possible to set it to Ctrl+Shift+D. Nothing happens if my cursor is in the "Press shortcut keys" textbox and I press Ctrl+Shift+D, but setting it to another shortcut, e.g. Ctrl+Shift+B is possible. And this shortcut works afterwards. But I would prefer to use the default Ctrl+Shift+D.
    Edit: After restarting SSMS the custom shortcut is lost and the assigned shortcut is Ctrl+Shift+D again, but doesn't work.

    Any idea?

    Thanks and BR
  • Aaron LAaron L Posts: 596 New member
    Hi flhsdlds,

    I haven't heard of SSMS doing nothing when trying to assign a keyboard shortcut before (even if it's taken by something else, it should still appear). Since this is in the SSMS settings dialog I'm not sure if the bug is with SQL Prompt or with SSMS itself.

    Could you check if you can bind anything else to Ctrl+Shift+D (eg File.SaveAll)?

    Is there a chance you've got another program or addin running that could be affecting your keypresses such as AutoHotkey?

    Thanks,
    Aaron.
Sign In or Register to comment.