MCPcopy Create free account
hub / github.com/danomatika/ofxLua / keyPressed

Method keyPressed

luaExample/src/ofApp.cpp:68–90  ·  view source on GitHub ↗

--------------------------------------------------------------

Source from the content-addressed store, hash-verified

66
67//--------------------------------------------------------------
68void ofApp::keyPressed(int key) {
69
70 switch(key) {
71
72 case 'r':
73 reloadScript();
74 break;
75
76 case OF_KEY_LEFT:
77 prevScript();
78 break;
79
80 case OF_KEY_RIGHT:
81 nextScript();
82 break;
83
84 case ' ':
85 lua.doString("print(\"this is a lua string saying you hit the space bar!\")");
86 break;
87 }
88
89 lua.scriptKeyPressed(key);
90}
91
92//--------------------------------------------------------------
93void ofApp::mouseMoved(int x, int y) {

Callers

nothing calls this directly

Calls 2

doStringMethod · 0.80
scriptKeyPressedMethod · 0.80

Tested by

no test coverage detected