13#ifndef MANAGED_KEYBOARD_SHORTCUT_H 
   14#define MANAGED_KEYBOARD_SHORTCUT_H 
   18#include <ThirdPartyWarningsDisable.h> 
   19#include <Inventor/events/SoKeyboardEvent.h> 
   22#include <ThirdPartyWarningsRestore.h> 
   36  bool matches(
int modifiers, SoKeyboardEvent::Key key) 
const;
 
   45  SoKeyboardEvent::Key 
getKey()
 const { 
return _key; }
 
   61  SoKeyboardEvent::Key _key;
 
   63  static void _populateKeyMap();
 
   64  static void _setKeyMapEntry(
const char* cname, SoKeyboardEvent::Key key);
 
   66  static std::map<std::string, SoKeyboardEvent::Key> _keyCodeMap;
 
   67  static std::map<SoKeyboardEvent::Key, std::string> _keyNameMap;
 
   70  static SoKeyboardEvent::Key _getKeyCodeForName (
const std::string& keyName);
 
   72  static std::string _getKeyNameForCode (SoKeyboardEvent::Key keyCode);
 
   77  static bool decodeKeyString (
const std::string& keyCombo, 
int& modifiers, SoKeyboardEvent::Key& nKey);
 
 
@ ANY
Special constant for any key.
 
#define SOMANAGEDINTERACTION_API
File to resolve system dependencies in View2D library.
 
ManagedActionTrigger is a base class for all triggers of managed interactions.
 
Class ManagedKeyboardShortcut encapsulates the combination of modifier keys and another key that acti...
 
static ManagedKeyboardShortcut fromString(const std::string &s)
Creates a shortcut from a string.
 
int getModifiers() const
Returns the required key modifiers.
 
std::string toString() const
Returns a string representation of this shortcut (see fromString()).
 
ManagedKeyboardShortcut(int modifiers, SoKeyboardEvent::Key key)
Creates shortcut with given key and key modifiers; see SoInteraction for possible key modifiers.
 
bool matches(int modifiers, SoKeyboardEvent::Key key) const
Returns whether the shortcut matches the given modifiers and key; see SoInteraction for possible modi...
 
ManagedKeyboardShortcut()
The default constructor creates an invalid shortcut.
 
SoKeyboardEvent::Key getKey() const
Returns the required key.
 
bool isValid() const
Returns whether the shortcut is valid.