From 593cbd8caa17326d2f11a5321aed6cf523e8593d Mon Sep 17 00:00:00 2001 From: hippietrail Date: Thu, 31 Oct 2024 17:25:42 +0700 Subject: [PATCH] attempt at implementing #7129 --- .../main/java/docking/widgets/filechooser/DirectoryList.java | 5 +++++ .../java/docking/widgets/filechooser/GhidraFileChooser.java | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Ghidra/Framework/Docking/src/main/java/docking/widgets/filechooser/DirectoryList.java b/Ghidra/Framework/Docking/src/main/java/docking/widgets/filechooser/DirectoryList.java index 614b249ccd7..16455c470d5 100644 --- a/Ghidra/Framework/Docking/src/main/java/docking/widgets/filechooser/DirectoryList.java +++ b/Ghidra/Framework/Docking/src/main/java/docking/widgets/filechooser/DirectoryList.java @@ -133,6 +133,11 @@ public void keyReleased(KeyEvent e) { if (e.getKeyCode() == KeyEvent.VK_ENTER) { e.consume(); handleEnterKey(); + } else if (e.getKeyCode() == KeyEvent.VK_UP) { + if (e.getModifiersEx() == KeyEvent.META_DOWN_MASK) { + e.consume(); + chooser.goUpOneDirectoryLevel(); + } } } }); diff --git a/Ghidra/Framework/Docking/src/main/java/docking/widgets/filechooser/GhidraFileChooser.java b/Ghidra/Framework/Docking/src/main/java/docking/widgets/filechooser/GhidraFileChooser.java index 01727533c23..c499099a4ba 100644 --- a/Ghidra/Framework/Docking/src/main/java/docking/widgets/filechooser/GhidraFileChooser.java +++ b/Ghidra/Framework/Docking/src/main/java/docking/widgets/filechooser/GhidraFileChooser.java @@ -1304,7 +1304,7 @@ private boolean isUserEditing() { return false; } - private void goUpOneDirectoryLevel() { + public void goUpOneDirectoryLevel() { cancelEdits(); if (currentDirectory() == null) {