From ccd2e830f14ad0ee34313ef07d82e361f4da129f Mon Sep 17 00:00:00 2001 From: Mootez Date: Mon, 4 May 2020 01:04:46 +0100 Subject: [PATCH] Restore some missing keyboard shortcuts --- CHANGELOG.md | 2 +- src/main/java/org/jabref/gui/JabRefFrame.java | 24 +++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d39e2745597..5d7f4d83496 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -102,7 +102,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve - We fixed an issue where adding the addition of a new entry was not completely validated [#6370](https://github.com/JabRef/jabref/issues/6370) - We fixed an issue where the blue and red text colors in the Merge entries dialog were not quite visible [#6334](https://github.com/JabRef/jabref/issues/6334) - We fixed an issue where underscore character was removed from the file name in the Recent Libraries list in File menu [#6383](https://github.com/JabRef/jabref/issues/6383) - +- We fixed an issue where few keyboard shortcuts regarding new entries were missing [#6403](https://github.com/JabRef/jabref/issues/6403) ### Removed - Ampersands are no longer escaped by default in the `bib` file. If you want to keep the current behaviour, you can use the new "Escape Ampersands" formatter as a save action. [#5869](https://github.com/JabRef/jabref/issues/5869) diff --git a/src/main/java/org/jabref/gui/JabRefFrame.java b/src/main/java/org/jabref/gui/JabRefFrame.java index 234174006da..a4a05883da3 100644 --- a/src/main/java/org/jabref/gui/JabRefFrame.java +++ b/src/main/java/org/jabref/gui/JabRefFrame.java @@ -245,6 +245,30 @@ private void initKeyBindings() { case SEARCH: getGlobalSearchBar().focus(); break; + case NEW_ARTICLE: + new NewEntryAction(this, StandardEntryType.Article, dialogService, prefs, stateManager).execute(); + break; + case NEW_BOOK: + new NewEntryAction(this, StandardEntryType.Book, dialogService, prefs, stateManager).execute(); + break; + case NEW_INBOOK: + new NewEntryAction(this, StandardEntryType.InBook, dialogService, prefs, stateManager).execute(); + break; + case NEW_MASTERSTHESIS: + new NewEntryAction(this, StandardEntryType.MastersThesis, dialogService, prefs, stateManager).execute(); + break; + case NEW_PHDTHESIS: + new NewEntryAction(this, StandardEntryType.PhdThesis, dialogService, prefs, stateManager).execute(); + break; + case NEW_PROCEEDINGS: + new NewEntryAction(this, StandardEntryType.Proceedings, dialogService, prefs, stateManager).execute(); + break; + case NEW_TECHREPORT: + new NewEntryAction(this, StandardEntryType.TechReport, dialogService, prefs, stateManager).execute(); + break; + case NEW_UNPUBLISHED: + new NewEntryAction(this, StandardEntryType.Unpublished, dialogService, prefs, stateManager).execute(); + break; default: } }