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

Public Types | |
| enum | { kDefaultIID = IID_ISHORTCUTCONTEXT } |
Public Member Functions | |
| virtual PMString | GetShortcutContextString () const =0 |
| virtual PMString | GetNextContextString (const VirtualKey &key, int16 currentModifiers) const =0 |
| virtual VirtualKey | RemapShortcutKey (const VirtualKey &key, int16 *pModifiers) const =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 is part of our support for 'shortcut contexts' whereby the same key combo can do different things in different contexts. For example, the arrow keys move around the text when in text context, but nudge the selected item around on the page when in default context. Typically, 3rd parties would not need to use/implement this interface, unless they're adding a new shorcut context, in which case they'll have to create a new implementation of this interface, and put it on a boss supporting kShortcutContextService
| pure virtual |
returns the string for the context to try if no shortcut was found in this context. Most common is "" to stop looking, or kDefaultContext to look at the shortcuts in the default context
| key | The virtual key we're checking shortcuts for |
| currentModifiers | The modifiers we're checking shortcuts for. |
| pure virtual |
returns the string for this context. If empty, context will be ignored.
| pure virtual |
Gives the shortcut context an opportunity to modify the key and modifiers before they're used to look up the associated action. This is used by the text context to treat the arrow keys differently in horizontal vs. vertical text.
| key | The virtual key we're checking shortcuts for |
| pModifiers | The modifiers we're checking shortcuts for. |