esc is back
This commit is contained in:
parent
b4226db038
commit
8ac12e30a8
@ -554,6 +554,18 @@ public class MainWindow extends JFrame {
|
||||
}, KeyStroke.getKeyStroke(KeyEvent.VK_TAB, InputEvent.CTRL_DOWN_MASK),
|
||||
JComponent.WHEN_IN_FOCUSED_WINDOW);
|
||||
|
||||
// ESC - global escape to return focus to panels
|
||||
rootPane.registerKeyboardAction(e -> {
|
||||
if (activePanel != null) {
|
||||
// If it's the command line, clear it too (though it has its own listener)
|
||||
if (commandLine.hasFocus()) {
|
||||
commandLine.setText("");
|
||||
}
|
||||
activePanel.getFileTable().requestFocusInWindow();
|
||||
}
|
||||
}, KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0),
|
||||
JComponent.WHEN_IN_FOCUSED_WINDOW);
|
||||
|
||||
// Delete key - global delete binding (also added per-table)
|
||||
rootPane.registerKeyboardAction(e -> deleteFiles(),
|
||||
KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user