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>
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.
std::string toString() const
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
ManagedKeyboardShortcut()
The default constructor creates an invalid shortcut.
SoKeyboardEvent::Key getKey() const
Target mlrange_cast(Source arg)
Generic version of checked ML casts.