Skip to content

Commit

Permalink
Fix the F3 shortcut key (#12417)
Browse files Browse the repository at this point in the history
* Fix the F3 shortcut key

* Complete the CHANGELOG.md entry

* Update CHANGELOG.md

Co-authored-by: Subhramit Basu Bhowmick <[email protected]>

---------

Co-authored-by: Subhramit Basu Bhowmick <[email protected]>
  • Loading branch information
priyanshu16095 and subhramit authored Jan 27, 2025
1 parent 5fe136a commit b7db147
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
9 changes: 9 additions & 0 deletions src/main/java/org/jabref/gui/maintable/MainTable.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ public class MainTable extends TableView<BibEntryTableViewModel> {
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;
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit b7db147

Please sign in to comment.