Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the F3 shortcut key #12417

Merged
merged 4 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 does not work without opening the right-click context menu. [#12417](https://github.com/JabRef/jabref/pull/12417)
priyanshu16095 marked this conversation as resolved.
Show resolved Hide resolved
- 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;
Siedlerchr marked this conversation as resolved.
Show resolved Hide resolved
default:
// Pass other keys to parent
}
Expand Down
Loading