mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-09-18 21:31:12 +00:00
Input order fixes [release]
This commit is contained in:
parent
3357c73aea
commit
f580f39e86
|
@ -135,7 +135,7 @@ public final class BrowserFileListComp extends SimpleComp {
|
||||||
|
|
||||||
private void prepareTypedSelectionModel(TableView<BrowserEntry> table) {
|
private void prepareTypedSelectionModel(TableView<BrowserEntry> table) {
|
||||||
AtomicReference<Instant> lastFail = new AtomicReference<>();
|
AtomicReference<Instant> lastFail = new AtomicReference<>();
|
||||||
table.addEventHandler(KeyEvent.KEY_TYPED, event -> {
|
table.addEventHandler(KeyEvent.KEY_PRESSED, event -> {
|
||||||
updateTypedSelection(table, lastFail, event, false);
|
updateTypedSelection(table, lastFail, event, false);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -158,7 +158,7 @@ public final class BrowserFileListComp extends SimpleComp {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateTypedSelection(TableView<BrowserEntry> table, AtomicReference<Instant> lastType, KeyEvent event, boolean recursive) {
|
private void updateTypedSelection(TableView<BrowserEntry> table, AtomicReference<Instant> lastType, KeyEvent event, boolean recursive) {
|
||||||
var typed = event.getCharacter();
|
var typed = event.getText();
|
||||||
if (typed.isEmpty()) {
|
if (typed.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -193,7 +193,7 @@ public class BrowserSessionTabsComp extends SimpleComp {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
tabs.addEventFilter(KeyEvent.KEY_PRESSED, keyEvent -> {
|
tabs.addEventHandler(KeyEvent.KEY_PRESSED, keyEvent -> {
|
||||||
var current = tabs.getSelectionModel().getSelectedItem();
|
var current = tabs.getSelectionModel().getSelectedItem();
|
||||||
if (current == null) {
|
if (current == null) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -273,7 +273,7 @@ public class AppMainWindow {
|
||||||
contentR.prefHeightProperty().bind(stage.getScene().heightProperty());
|
contentR.prefHeightProperty().bind(stage.getScene().heightProperty());
|
||||||
|
|
||||||
if (OsType.getLocal().equals(OsType.LINUX) || OsType.getLocal().equals(OsType.MACOS)) {
|
if (OsType.getLocal().equals(OsType.LINUX) || OsType.getLocal().equals(OsType.MACOS)) {
|
||||||
stage.getScene().addEventFilter(KeyEvent.KEY_PRESSED, event -> {
|
stage.getScene().addEventHandler(KeyEvent.KEY_PRESSED, event -> {
|
||||||
if (new KeyCodeCombination(KeyCode.W, KeyCombination.SHORTCUT_DOWN).match(event)) {
|
if (new KeyCodeCombination(KeyCode.W, KeyCombination.SHORTCUT_DOWN).match(event)) {
|
||||||
AppPrefs.get().closeBehaviour().getValue().run();
|
AppPrefs.get().closeBehaviour().getValue().run();
|
||||||
event.consume();
|
event.consume();
|
||||||
|
|
|
@ -144,7 +144,7 @@ public class AppWindowHelper {
|
||||||
event.consume();
|
event.consume();
|
||||||
});
|
});
|
||||||
AppWindowBounds.fixInvalidStagePosition(s);
|
AppWindowBounds.fixInvalidStagePosition(s);
|
||||||
a.getDialogPane().getScene().addEventFilter(KeyEvent.KEY_PRESSED, event -> {
|
a.getDialogPane().getScene().addEventHandler(KeyEvent.KEY_PRESSED, event -> {
|
||||||
if (new KeyCodeCombination(KeyCode.W, KeyCombination.SHORTCUT_DOWN).match(event)) {
|
if (new KeyCodeCombination(KeyCode.W, KeyCombination.SHORTCUT_DOWN).match(event)) {
|
||||||
s.close();
|
s.close();
|
||||||
event.consume();
|
event.consume();
|
||||||
|
@ -262,7 +262,7 @@ public class AppWindowHelper {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
scene.addEventFilter(KeyEvent.KEY_PRESSED, event -> {
|
scene.addEventHandler(KeyEvent.KEY_PRESSED, event -> {
|
||||||
if (new KeyCodeCombination(KeyCode.W, KeyCombination.SHORTCUT_DOWN).match(event)) {
|
if (new KeyCodeCombination(KeyCode.W, KeyCombination.SHORTCUT_DOWN).match(event)) {
|
||||||
stage.close();
|
stage.close();
|
||||||
event.consume();
|
event.consume();
|
||||||
|
|
Loading…
Reference in a new issue