Page 1 of 1

How to bind keyboard shortcut to ribbon command ?

Posted: Wed Apr 25, 2018 8:45 am
by toddsou
Hi-

While editing an Order, I'd like to be able to hit something like CTRL+L and launch a custom shell package window.

I searched the forums and SDK for both "shortcut" and "mneumonic" and found a few reference items, but I'm not sure how to use them to achieve what I'm after.

Thoughts/guidance appreciated.

Regards,
Todd

Re: How to bind keyboard shortcut to ribbon command ?

Posted: Wed Apr 25, 2018 11:06 am
by BobRichards
In the ctd file where you define your ribbon buttons, add the shortcut attribute to bind the button handler to a key. The list of valid key shortcut IDs is in one of the files installed when the SDK was installed:
(typically: C:\Program Files (x86)\Microsoft Visual Studio 14.0\xml\Schemas\CommandTable.xsd).

Code: Select all

<!-- Button 1 -->
<Button id="Button1" priority="100" text="Fee Details"
    ...
    shortcut="AltUpArrow" />
Be aware that once the RegisterHandler runs for this button, it may be available globally. In your handler, you need to verify that your handler should execute or exit quietly. (i.e. If your handler does something to an order but the active document is not an order - exit quietly.) Don't implement actions that might confuse the user.

Re: How to bind keyboard shortcut to ribbon command ?

Posted: Wed May 25, 2022 2:43 pm
by toddsou
Hi,
I'm looking to define a new shortcut....and avoid collisions with other existing shortcuts.

Is there a way to query or examine all known shortcuts within a given instance of the Select client ?

Regards,
Todd

Re: How to bind keyboard shortcut to ribbon command ?

Posted: Wed May 25, 2022 3:38 pm
by BobRichards
I don't know if you can query all the shortcut keys. However one way to tell if your assignment is a duplicate is to install your shell package then start Select with logging.
Select.exe /log
Then exam the log file (Select.log) at "%localappdata%/SoftPro/Select/4.3". There you will see all duplicate key bindings.

Re: How to bind keyboard shortcut to ribbon command ?

Posted: Wed Jun 01, 2022 9:43 am
by toddsou
Can my ribbon add shortcut keys to native SPS features via its .ctd file ?

E.g., can I bind a keyboard shortcut to launch the Checklist Tasks screen ? or perhaps a shortcut to launch the Attachments window?

....or, even better, is there an existing config/.ctd file that I can edit to add this behavior ?