Fix browser keys not being captured

This commit is contained in:
crschnick 2024-07-19 17:16:29 +00:00
parent 74d1e5fb7e
commit 4d7fcbbef0

View file

@ -195,7 +195,7 @@ public final class BrowserFileListComp extends SimpleComp {
}
private void prepareTableShortcuts(TableView<BrowserEntry> table) {
table.setOnKeyPressed(event -> {
table.addEventFilter(KeyEvent.KEY_PRESSED, event -> {
var selected = fileList.getSelection();
var action = BrowserAction.getFlattened(fileList.getFileSystemModel(), selected).stream()
.filter(browserAction -> browserAction.isApplicable(fileList.getFileSystemModel(), selected)