diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c65dbf6624..e9c1bb9123c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv ### Fixed +- We fixed an issue where the F3 shortcut key did not work without opening the right-click context menu. [#12417](https://github.com/JabRef/jabref/pull/12417) - We fixed an issue where a bib file with UFF-8 charset was wrongly loaded with a different charset [forum#5369](https://discourse.jabref.org/t/jabref-5-15-opens-bib-files-with-shift-jis-encoding-instead-of-utf-8/5369/) - We fixed an issue where new entries were inserted in the middle of the table instead of at the end. [#12371](https://github.com/JabRef/jabref/pull/12371) - We fixed an issue where removing the sort from the table did not restore the original order. [#12371](https://github.com/JabRef/jabref/pull/12371) diff --git a/src/main/java/org/jabref/gui/maintable/MainTable.java b/src/main/java/org/jabref/gui/maintable/MainTable.java index c24019ea46b..d86de6e6793 100644 --- a/src/main/java/org/jabref/gui/maintable/MainTable.java +++ b/src/main/java/org/jabref/gui/maintable/MainTable.java @@ -71,6 +71,8 @@ public class MainTable extends TableView { private final LibraryTab libraryTab; private final StateManager stateManager; private final BibDatabaseContext database; + private final GuiPreferences preferences; + private final DialogService dialogService; private final MainTableDataModel model; private final CustomLocalDragboard localDragboard; private final TaskExecutor taskExecutor; @@ -100,6 +102,8 @@ public MainTable(MainTableDataModel model, this.libraryTab = libraryTab; this.stateManager = stateManager; this.database = Objects.requireNonNull(database); + this.preferences = preferences; + this.dialogService = dialogService; this.model = model; this.taskExecutor = taskExecutor; this.undoManager = libraryTab.getUndoManager(); @@ -323,6 +327,7 @@ private void setupKeyBindings(KeyBindingRepository keyBindings) { EditAction copyAction = new EditAction(StandardActions.COPY, () -> libraryTab, stateManager, undoManager); EditAction cutAction = new EditAction(StandardActions.CUT, () -> libraryTab, stateManager, undoManager); EditAction deleteAction = new EditAction(StandardActions.DELETE_ENTRY, () -> libraryTab, stateManager, undoManager); + OpenUrlAction openUrlAction = new OpenUrlAction(dialogService, stateManager, preferences); this.addEventFilter(KeyEvent.KEY_PRESSED, event -> { if (event.getCode() == KeyCode.ENTER) { @@ -368,6 +373,10 @@ private void setupKeyBindings(KeyBindingRepository keyBindings) { scrollToPreviousMatchCategory(); event.consume(); break; + case OPEN_URL_OR_DOI: + openUrlAction.execute(); + event.consume(); + break; default: // Pass other keys to parent }