Skip to content

Commit

Permalink
'#1268: Make CTRL+B (show Bookmark Manager dialog) global.
Browse files Browse the repository at this point in the history
  • Loading branch information
wladimirleite committed Sep 12, 2023
1 parent 64e72d4 commit f653c56
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
11 changes: 9 additions & 2 deletions iped-app/src/main/java/iped/app/ui/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -779,8 +779,8 @@ private void setupItemTable(HitsTable itemTable) {
}

/**
* Setup application global keyboard shortcuts. TODO update existing keyboard
* shortcut handling code to use this.
* Setup application global keyboard shortcuts. TODO: Check if other existing
* keyboard shortcuts may be handled globally.
*/
private void setupKeyboardShortcuts() {
KeyboardFocusManager kfm = KeyboardFocusManager.getCurrentKeyboardFocusManager();
Expand All @@ -802,6 +802,13 @@ public boolean dispatchKeyEvent(KeyEvent e) {
// avoid being used as different shortcut (e.g. bookmark key)
return true;
}
if (e.getKeyCode() == KeyEvent.VK_B) {
if (e.getID() == KeyEvent.KEY_RELEASED) {
// Shortcut to BookmarkManager Window
BookmarksManager.setVisible();
}
return true;
}
}
return false;
}
Expand Down
4 changes: 0 additions & 4 deletions iped-app/src/main/java/iped/app/ui/ResultTableListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,6 @@ public void keyPressed(KeyEvent evt) {
// Shortcut to Deep-Selection Remove (Item plus sub-items)
recursiveItemSelection(false);
evt.consume();
} else if (evt.getKeyCode() == KeyEvent.VK_B && ((evt.getModifiersEx() & KeyEvent.CTRL_DOWN_MASK) != 0)) {
// Shortcut to BookmarkManager Window
BookmarksManager.setVisible();
evt.consume();
} else
BookmarksManager.get().keyPressed(evt);

Expand Down

0 comments on commit f653c56

Please sign in to comment.