diff --git a/src/Application/Application.cpp b/src/Application/Application.cpp index 9b4df56..89bd67b 100644 --- a/src/Application/Application.cpp +++ b/src/Application/Application.cpp @@ -102,7 +102,7 @@ void Application::onKeyPressed(ofKeyEventArgs & args){ break; case '/': - _shiftKeyDown = !_shiftKeyDown; + toggleShift(); break; case '1': @@ -231,6 +231,11 @@ bool Application::isShiftKeyDown(){ return _shiftKeyDown; } +bool Application::toggleShift(){ + _shiftKeyDown = !_shiftKeyDown; + return _shiftKeyDown; +} + void Application::setPreset(unsigned int i){ _cmdManager.exec(new SetPresetCmd(this, i)); } diff --git a/src/Application/Application.h b/src/Application/Application.h index d1b00c5..0546e4e 100644 --- a/src/Application/Application.h +++ b/src/Application/Application.h @@ -96,6 +96,7 @@ class Application { bool loadXmlSettings(std::string fileName); bool isShiftKeyDown(); + bool toggleShift(); SurfaceManager * getSurfaceManager(){ return &_surfaceManager; } CmdManager * getCmdManager(){ return &_cmdManager; } diff --git a/src/ofxPiMapper.cpp b/src/ofxPiMapper.cpp index fcd0e46..84a2987 100644 --- a/src/ofxPiMapper.cpp +++ b/src/ofxPiMapper.cpp @@ -234,6 +234,10 @@ void ofxPiMapper::deselect(){ _application.deselect(); } +bool ofxPiMapper::toggleShift(){ + return _application.toggleShift(); +} + void ofxPiMapper::setMode(ofx::piMapper::Mode m){ if(m == ofx::piMapper::PRESENTATION_MODE){ _application.setPresentationMode(); diff --git a/src/ofxPiMapper.h b/src/ofxPiMapper.h index 3af7708..74e4470 100644 --- a/src/ofxPiMapper.h +++ b/src/ofxPiMapper.h @@ -32,6 +32,7 @@ class ofxPiMapper { void toggleInfo(); void undo(); void deselect(); + bool toggleShift(); // Modes void setMode(ofx::piMapper::Mode m);