From f3030c6523f60c4e470f31dcb4d2d7e7c8518b76 Mon Sep 17 00:00:00 2001 From: Krisjanis Rijnieks Date: Wed, 10 Jan 2018 18:52:52 +0100 Subject: [PATCH] Make use of ofxPiMapper::toggleShift in example_pocketvj --- example_pocketvj/src/ofApp.cpp | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/example_pocketvj/src/ofApp.cpp b/example_pocketvj/src/ofApp.cpp index d623a1e..d9644c8 100644 --- a/example_pocketvj/src/ofApp.cpp +++ b/example_pocketvj/src/ofApp.cpp @@ -90,16 +90,21 @@ void ofApp::keyPressed(int key){ mapper.moveSelection(ofx::piMapper::Vec3(-1.0f, 0.0f, 0.0f)); }else if(key == '0'){ mapper.moveSelection(ofx::piMapper::Vec3(1.0f, 0.0f, 0.0f)); + }else if(key == '/'){ + bool shiftIsDown = mapper.toggleShift(); + if(shiftIsDown){ + ofLogNotice("ofApp") << "Shift key is down"; + }else{ + ofLogNotice("ofApp") << "Shift key is up"; + } } - // Make / toggle between shif/unshift (how to capture that with EGL window?) - - /* - rbt Reboot (Raspberry Pi only) - sdn Shutdown (Raspberry Pi only) - new Clear composition (remove all surfaces) - ext Exit application and return to command line - */ + /* For these one has to figure out her own ways. + * rbt Reboot (Raspberry Pi only) + * sdn Shutdown (Raspberry Pi only) + * new Clear composition (remove all surfaces) + * ext Exit application and return to command line + */ } void ofApp::keyReleased(int key){