diff --git a/CHANGELOG.md b/CHANGELOG.md index 11aa3680d04..e972adb0c36 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve - We added the possibility to automatically fetch entries when an ISBN is pasted on the main table. [#9864](https://github.com/JabRef/jabref/issues/9864) - We added the option to disable the automatic linking of files in the entry editor [#5105](https://github.com/JabRef/jabref/issues/5105) - We added the link icon for ISBNs in linked identifiers column. [#9819](https://github.com/JabRef/jabref/issues/9819) +- We added key binding to focus on groups alt + s [#9863](https://github.com/JabRef/jabref/issues/9863) - We added the option to unprotect a text selection, which strips all pairs of curly braces away. [#9950](https://github.com/JabRef/jabref/issues/9950) - We added drag and drop events for field 'Groups' in entry editor panel. [#569](https://github.com/koppor/jabref/issues/569) - We added support for parsing MathML in the Medline importer. [#4273](https://github.com/JabRef/jabref/issues/4273) diff --git a/src/main/java/org/jabref/gui/JabRefFrame.java b/src/main/java/org/jabref/gui/JabRefFrame.java index 95e60916d73..0b1d1065aa0 100644 --- a/src/main/java/org/jabref/gui/JabRefFrame.java +++ b/src/main/java/org/jabref/gui/JabRefFrame.java @@ -318,6 +318,10 @@ private void initKeyBindings() { getCurrentLibraryTab().getMainTable().requestFocus(); event.consume(); break; + case FOCUS_GROUP_LIST: + sidePane.getSidePaneComponent(SidePaneType.GROUPS).requestFocus(); + event.consume(); + break; case NEXT_LIBRARY: tabbedPane.getSelectionModel().selectNext(); event.consume(); diff --git a/src/main/java/org/jabref/gui/groups/GroupTreeView.java b/src/main/java/org/jabref/gui/groups/GroupTreeView.java index 99a251dc91a..04d9b8b09dd 100644 --- a/src/main/java/org/jabref/gui/groups/GroupTreeView.java +++ b/src/main/java/org/jabref/gui/groups/GroupTreeView.java @@ -613,4 +613,11 @@ public void execute() { } } } + + /** + * Focus on GroupTree + */ + public void requestFocusGroupTree() { + groupTree.requestFocus(); + } } diff --git a/src/main/java/org/jabref/gui/keyboard/KeyBinding.java b/src/main/java/org/jabref/gui/keyboard/KeyBinding.java index d8edbcc75a3..5706d55cc7b 100644 --- a/src/main/java/org/jabref/gui/keyboard/KeyBinding.java +++ b/src/main/java/org/jabref/gui/keyboard/KeyBinding.java @@ -56,6 +56,7 @@ public enum KeyBinding { FILE_LIST_EDITOR_MOVE_ENTRY_UP("File list editor, move entry up", Localization.lang("File list editor, move entry up"), "ctrl+UP", KeyBindingCategory.VIEW), FIND_UNLINKED_FILES("Search for unlinked local files", Localization.lang("Search for unlinked local files"), "shift+F7", KeyBindingCategory.QUALITY), FOCUS_ENTRY_TABLE("Focus entry table", Localization.lang("Focus entry table"), "alt+1", KeyBindingCategory.VIEW), + FOCUS_GROUP_LIST("Focus group list", Localization.lang("Focus group list"), "alt+s", KeyBindingCategory.VIEW), HELP("Help", Localization.lang("Help"), "F1", KeyBindingCategory.FILE), IMPORT_INTO_CURRENT_DATABASE("Import into current library", Localization.lang("Import into current library"), "ctrl+I", KeyBindingCategory.FILE), IMPORT_INTO_NEW_DATABASE("Import into new library", Localization.lang("Import into new library"), "ctrl+alt+I", KeyBindingCategory.FILE), @@ -83,7 +84,6 @@ public enum KeyBinding { OPEN_URL_OR_DOI("Open URL or DOI", Localization.lang("Open URL or DOI"), "F3", KeyBindingCategory.TOOLS), PASTE("Paste", Localization.lang("Paste"), "ctrl+V", KeyBindingCategory.EDIT), PULL_CHANGES_FROM_SHARED_DATABASE("Pull changes from shared database", Localization.lang("Pull changes from shared database"), "ctrl+shift+R", KeyBindingCategory.FILE), - PREAMBLE_EDITOR_STORE_CHANGES("Preamble editor, store changes", Localization.lang("Preamble editor, store changes"), "alt+S", KeyBindingCategory.FILE), PREVIOUS_PREVIEW_LAYOUT("Previous preview layout", Localization.lang("Previous preview layout"), "shift+F9", KeyBindingCategory.VIEW), PREVIOUS_LIBRARY("Previous library", Localization.lang("Previous library"), "ctrl+PAGE_UP", KeyBindingCategory.VIEW), PUSH_TO_APPLICATION("Push to application", Localization.lang("Push to application"), "ctrl+L", KeyBindingCategory.TOOLS), diff --git a/src/main/java/org/jabref/gui/sidepane/SidePane.java b/src/main/java/org/jabref/gui/sidepane/SidePane.java index 6e9476abcb7..7edd177786e 100644 --- a/src/main/java/org/jabref/gui/sidepane/SidePane.java +++ b/src/main/java/org/jabref/gui/sidepane/SidePane.java @@ -57,4 +57,8 @@ public BooleanBinding paneVisibleBinding(SidePaneType pane) { public SimpleCommand getToggleCommandFor(SidePaneType sidePane) { return new TogglePaneAction(stateManager, sidePane, preferencesService.getSidePanePreferences()); } + + public SidePaneComponent getSidePaneComponent(SidePaneType type) { + return viewModel.getSidePaneComponent(type); + } } diff --git a/src/main/java/org/jabref/gui/sidepane/SidePaneComponent.java b/src/main/java/org/jabref/gui/sidepane/SidePaneComponent.java index 104a3c42518..8abb96582dc 100644 --- a/src/main/java/org/jabref/gui/sidepane/SidePaneComponent.java +++ b/src/main/java/org/jabref/gui/sidepane/SidePaneComponent.java @@ -10,6 +10,7 @@ import javafx.scene.layout.VBox; import org.jabref.gui.actions.SimpleCommand; +import org.jabref.gui.groups.GroupTreeView; import org.jabref.gui.icon.IconTheme; import org.jabref.logic.l10n.Localization; @@ -71,4 +72,13 @@ private Node createHeaderView() { protected void addExtraButtonToHeader(Button button, int position) { this.buttonContainer.getChildren().add(position, button); } + + public void requestFocus() { + for (Node child : getChildren()) { + if (child instanceof GroupTreeView groupTreeView) { + groupTreeView.requestFocusGroupTree(); + break; + } + } + } } diff --git a/src/main/resources/l10n/JabRef_en.properties b/src/main/resources/l10n/JabRef_en.properties index 48a528bfbd9..1e8c1e0924d 100644 --- a/src/main/resources/l10n/JabRef_en.properties +++ b/src/main/resources/l10n/JabRef_en.properties @@ -1376,6 +1376,7 @@ Entry\ editor,\ previous\ panel\ 2=Entry editor, previous panel 2 File\ list\ editor,\ move\ entry\ down=File list editor, move entry down File\ list\ editor,\ move\ entry\ up=File list editor, move entry up Focus\ entry\ table=Focus entry table +Focus\ group\ list=Focus group list Import\ into\ current\ library=Import into current library Import\ into\ new\ library=Import into new library New\ article=New article @@ -1386,7 +1387,6 @@ New\ mastersthesis=New mastersthesis New\ phdthesis=New phdthesis New\ proceedings=New proceedings New\ unpublished=New unpublished -Preamble\ editor,\ store\ changes=Preamble editor, store changes Push\ to\ application=Push to application Refresh\ OpenOffice/LibreOffice=Refresh OpenOffice/LibreOffice Resolve\ duplicate\ citation\ keys=Resolve duplicate citation keys