Add delete key listener to stop recording
This commit is contained in:
parent
ee89727412
commit
e6c38081d9
|
@ -39,6 +39,8 @@ import javafx.scene.control.cell.PropertyValueFactory;
|
|||
import javafx.scene.input.Clipboard;
|
||||
import javafx.scene.input.ClipboardContent;
|
||||
import javafx.scene.input.ContextMenuEvent;
|
||||
import javafx.scene.input.KeyCode;
|
||||
import javafx.scene.input.KeyEvent;
|
||||
import javafx.scene.input.MouseEvent;
|
||||
import javafx.scene.layout.BorderPane;
|
||||
import javafx.scene.layout.FlowPane;
|
||||
|
@ -103,6 +105,11 @@ public class RecordedModelsTab extends Tab implements TabSelectionListener {
|
|||
popup.hide();
|
||||
}
|
||||
});
|
||||
table.addEventFilter(KeyEvent.KEY_PRESSED, event -> {
|
||||
if(event.getCode() == KeyCode.DELETE) {
|
||||
stopAction();
|
||||
}
|
||||
});
|
||||
scrollPane.setContent(table);
|
||||
|
||||
HBox addModelBox = new HBox(5);
|
||||
|
|
Loading…
Reference in New Issue