![]() | InDesign SDK 20.5 |
#include <IShortcutUtils.h>

Public Types | |
| enum | { kDefaultIID = IID_ISHORTCUTUTILS } |
Public Member Functions | |
| virtual PMString | GetShortcutString (ActionID id, bool16 bAddContextStr=kFalse, const bool bGetOnlyOne=false)=0 |
| virtual PMString | GetShortcutString (const VirtualKey &key, int16 mods, const bool &shouldTranslate=true)=0 |
| virtual void | ParseShortcutString (const PMString &shortcutStr, VirtualKey *keyOut, int16 *modsOut, const bool &shouldTranslate=false)=0 |
| virtual UID | FindShortcutStyle (IWorkspace *ws, const VirtualKey &key, int16 mods, ClassID *whichStrand)=0 |
| virtual int16 | GetEventModifiersForKBSC (const IEvent *pEvent, VirtualKey &vkey)=0 |
| virtual IShortcutContext * | QueryCurrentContext ()=0 |
| virtual bool16 | IsEnabledShortcut (const IEvent *e)=0 |
| virtual bool16 | GetNumLockStatus () const =0 |
| virtual void | SetNumLockStatus (bool16 bStatus)=0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
This interface provides utility functions for working with shortcuts, and lives on the Utils boss. see Utils.h and use like so: Utils<IShortcutUtils>()->GetShortcutString( ... ) ;
| pure virtual |
Find the shortcut style.
| ws | the workspace. |
| key | the virtual key you want a shortcut style for. |
| mods | a set of modifier keys(from KBSCModifierDefs.h) |
| whichStrand | specified ID |
| pure virtual |
Returns approriate modifiers for using this event as a KBSC. It may change the VirtualKey passed in(for numpad keys on windows)
| pEvent | is the event you want the key & modifiers for |
| vkey | is the virtual key, which you pass in and may be changed by this function |
| pure virtual |
Get the status of the numlock key on the keyboard
| pure virtual |
Returns a string including all the shortcuts assigned to this ActionID.
| id | is the action you want the shortcuts for. |
| bAddContextStr | is a boolean indicating whether or not you want the string for the shortcut context in which this shortcut is valid appended to the string or not. |
| bGetOnlyOne | is a boolean indicating whether or not you want to get only one shortcut string. |
| pure virtual |
Returns a string describing the key & modifiers passed in.
| key | is the virtual key you want a shortcut description for. |
| mods | is a set of modifier keys(from KBSCModifierDefs.h) |
| shouldTranslate | controls whether the individual modifier strings are translated. |
| pure virtual |
Is this event(virtual key + mods) an enabled shortcut in the currently active shortcut context.
| e | is the event you want to know about |
| pure virtual |
Parse a shortcut string into key & modifiers
| shortcutStr | is shortcut string you want to parse |
| keyOut | is set to the key part of the shortcut from the string. |
| modsOut | is set to the modifiers from this shortcut string(defined in KBSCModifierDefs.h) |
| shouldTranslate | should be set true if you want the parser to traslate the individual components as it parses. Useful for reading untranslate strings from the XML keyboard shortcut file format. |
| pure virtual |
Returns the appropriate shortcut context for the current user state
| pure virtual |
Set the status of the numlock key on the keyboard. Client code should not call this.
| bStatus | is the new status. |