1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#pragma once #include <QtCore/qnamespace.h> #include <QtCore> struct KeyChord { Qt::KeyboardModifiers mod; Qt::Key key; }; bool operator==(const KeyChord a, const KeyChord b); class KeySeqParser { public: KeySeqParser(); QList<KeyChord> parse(QString keySequence); private: Qt::Key parseKey(QString keyName); };