Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Exit FX Stage or Scene by Pressing Esc Key
primaryStage.addEventHandler(KeyEvent.KEY_PRESSED, new EventHandler<KeyEvent>(){
public void handle(KeyEvent event) {
if(event.getCode() == KeyCode.ESCAPE){
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment