Exception in thread “JavaFX Application Thread” java.lang.IllegalArgumentException: argument type mismatch

Your handler method is linked to the onKeyReleased handler for the GridPane:

<GridPane fx:id="grid" ... onKeyReleased="#handleButtonAction" ... >

Since onKeyReleased expects an EventHandler<KeyEvent>, your method (which you very confusingly named handleButtonAction) parameter type should be KeyEvent, not ActionEvent:

@FXML
private void handleButtonAction(KeyEvent event) {
    // ...
}