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>
72 SoKeyboardEvent::Key _key;
74 static void _populateKeyMap();
75 static void _setKeyMapEntry(
const char*
cname, SoKeyboardEvent::Key
key);
77 static std::map<std::string, SoKeyboardEvent::Key> _keyCodeMap;
78 static std::map<SoKeyboardEvent::Key, std::string> _keyNameMap;
81 static SoKeyboardEvent::Key _getKeyCodeForName(
const std::string&
keyName);
83 static std::string _getKeyNameForCode(SoKeyboardEvent::Key keyCode);
@ 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.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.