Fix some key not working when renaming files

This commit is contained in:
crschnick 2024-06-29 10:04:30 +00:00
parent da6caf0c78
commit fd848e26c1

View file

@ -549,14 +549,14 @@ public final class BrowserFileListComp extends SimpleComp {
graphic.setAlignment(Pos.CENTER_LEFT); graphic.setAlignment(Pos.CENTER_LEFT);
setGraphic(graphic); setGraphic(graphic);
InputHelper.onExactKeyCode(tableView, KeyCode.RIGHT, true, event -> { InputHelper.onExactKeyCode(tableView, KeyCode.RIGHT, false, event -> {
var selected = fileList.getSelection(); var selected = fileList.getSelection();
if (selected.size() == 1 && selected.getFirst() == getTableRow().getItem()) { if (selected.size() == 1 && selected.getFirst() == getTableRow().getItem()) {
((ButtonBase) quickAccess).fire(); ((ButtonBase) quickAccess).fire();
event.consume(); event.consume();
} }
}); });
InputHelper.onExactKeyCode(tableView, KeyCode.SPACE, true, event -> { InputHelper.onExactKeyCode(tableView, KeyCode.SPACE, false, event -> {
var selected = fileList.getSelection(); var selected = fileList.getSelection();
// Only show one menu across all selected entries // Only show one menu across all selected entries
if (selected.size() > 0 && selected.getLast() == getTableRow().getItem()) { if (selected.size() > 0 && selected.getLast() == getTableRow().getItem()) {