From: Tomas Wenström Date: Sun, 23 Apr 2017 13:55:01 +0000 (+0200) Subject: Added another key to exit the GUI - 'q' X-Git-Url: http://git.dolda2000.com/gitweb/?a=commitdiff_plain;h=f722ee0d05ade1f90b7bc5e51d68b3aed4d65652;p=kaka%2Fcakelight.git Added another key to exit the GUI - 'q' --- diff --git a/src/kaka/cakelight/GuiTest.java b/src/kaka/cakelight/GuiTest.java index a8da351..5aaba2f 100644 --- a/src/kaka/cakelight/GuiTest.java +++ b/src/kaka/cakelight/GuiTest.java @@ -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(); }