History

scripting additions

ZappoMan committed 12 years ago

Commit 866b3db1 parent baa17622 files · +8 −0Browse files

Showing the changes to libraries/script-engine/src/EventTypes.cpp (1 of 2 files). Show all

Unified · Split

libraries/script-engine/src/EventTypes.cpp+4−0
@@ -102,6 +102,8 @@ KeyEvent::KeyEvent(const QKeyEvent& event) { · 101 unmodified lines
102102 text = "END";
103103 } else if (key == Qt::Key_Help) {
104104 text = "HELP";
105+ } else if (key == Qt::Key_CapsLock) {
106+ text = "CAPS LOCK";
105107 }
106108 }
107109
@@ -208,6 +210,8 @@ void keyEventFromScriptValue(const QScriptValue& object, KeyEvent& event) { · 100 unmodified lines
208210 event.key = Qt::Key_End;
209211 } else if (event.text.toUpper() == "HELP") {
210212 event.key = Qt::Key_Help;
213+ } else if (event.text.toUpper() == "CAPS LOCK") {
214+ event.key = Qt::Key_CapsLock;
211215 } else {
212216 event.key = event.text.at(0).unicode();
213217 }