From ce5b6957d180c3706cacceb280f4de00f8634beb Mon Sep 17 00:00:00 2001 From: Krisjanis Rijnieks Date: Fri, 26 May 2017 17:22:06 +0200 Subject: [PATCH] Add "sdn" and "rbt" as key sequences for shutdown and reboot on pi --- src/Application/Application.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/Application/Application.cpp b/src/Application/Application.cpp index c40a088..9a2d780 100644 --- a/src/Application/Application.cpp +++ b/src/Application/Application.cpp @@ -82,6 +82,12 @@ void Application::onKeyPressed(ofKeyEventArgs & args){ _cmdManager.exec(new ClearSurfacesCmd(getSurfaceManager())); } return; + }else if(_keySequence == "rbt"){ + reboot(); + return; + }else if(_keySequence == "sdn"){ + shutdown(); + return; } } @@ -128,14 +134,6 @@ void Application::onKeyPressed(ofKeyEventArgs & args){ case 'n': setNextPreset(); break; - - case 'x': - reboot(); - break; - - case 'c': - shutdown(); - break; default: // All the other keypresses are handled by the application state onKeyPressed