filterTextField.setOnKeyReleased(event -> { if (event.getCode() == KeyCode.ENTER){ // do what is to do } });