Added another key to exit the GUI - 'q'
authorTomas Wenström <tomas.wenstrom@gmail.com>
Sun, 23 Apr 2017 13:55:01 +0000 (15:55 +0200)
committerTomas Wenström <tomas.wenstrom@gmail.com>
Sun, 23 Apr 2017 13:55:01 +0000 (15:55 +0200)
src/kaka/cakelight/GuiTest.java

index a8da351..5aaba2f 100644 (file)
@@ -37,7 +37,7 @@ public class GuiTest extends Application {
 
         Scene scene = new Scene(root);
         scene.setOnKeyPressed(keyEvent -> {
-            if (keyEvent.getCode() == KeyCode.ESCAPE) {
+            if (keyEvent.getCode() == KeyCode.ESCAPE || keyEvent.getCode() == KeyCode.Q) {
                 stage.close();
                 cakelight.cleanup();
             }