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

Added Keyboard shortcuts (clear/set read status) #7302

Merged
merged 2 commits into from
Jan 7, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 @@ -13,6 +13,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve

- We added the extension support and the external application support (For Texshow, Texmaker and LyX) to the flatpak [#7248](https://github.com/JabRef/jabref/pull/7248)
- We added some symbols and keybindings to the context menu in the entry editor. [#7268](https://github.com/JabRef/jabref/pull/7268)
- We added keybindings for setting and clearing the read status. [#7264](https://github.com/JabRef/jabref/issues/7264)

### Changed

Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/jabref/gui/actions/StandardActions.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ public enum StandardActions implements Action {
PRINTED(Localization.lang("Printed"), IconTheme.JabRefIcons.PRINTED),
TOGGLE_PRINTED(Localization.lang("Toggle print status"), IconTheme.JabRefIcons.PRINTED),
READ_STATUS(Localization.lang("Read status"), IconTheme.JabRefIcons.READ_STATUS),
CLEAR_READ_STATUS(Localization.lang("Clear read status")),
READ(Localization.lang("Set read status to read"), IconTheme.JabRefIcons.READ_STATUS_READ),
SKIMMED(Localization.lang("Set read status to skimmed"), IconTheme.JabRefIcons.READ_STATUS_SKIMMED),
CLEAR_READ_STATUS(Localization.lang("Clear read status"), KeyBinding.CLEAR_READ_STATUS),
READ(Localization.lang("Set read status to read"), IconTheme.JabRefIcons.READ_STATUS_READ, KeyBinding.READ),
SKIMMED(Localization.lang("Set read status to skimmed"), IconTheme.JabRefIcons.READ_STATUS_SKIMMED, KeyBinding.SKIMMED),
RELEVANCE(Localization.lang("Relevance"), IconTheme.JabRefIcons.RELEVANCE),
RELEVANT(Localization.lang("Toggle relevance"), IconTheme.JabRefIcons.RELEVANCE),
NEW_LIBRARY(Localization.lang("New library"), IconTheme.JabRefIcons.NEW),
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/org/jabref/gui/keyboard/KeyBinding.java
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,10 @@ public enum KeyBinding {
UNDO("Undo", Localization.lang("Undo"), "ctrl+Z", KeyBindingCategory.EDIT),
WEB_SEARCH("Web search", Localization.lang("Web search"), "alt+4", KeyBindingCategory.SEARCH),
WRITE_XMP("Write XMP", Localization.lang("Write XMP"), "F6", KeyBindingCategory.TOOLS),
CLEAR_SEARCH("Clear search", Localization.lang("Clear search"), "ESCAPE", KeyBindingCategory.SEARCH);
CLEAR_SEARCH("Clear search", Localization.lang("Clear search"), "ESCAPE", KeyBindingCategory.SEARCH),
CLEAR_READ_STATUS("Clear read status", Localization.lang("Clear read status"), "alt+C", KeyBindingCategory.EDIT),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure whether this is a good default.

Typically, in an application, there are shortcut keys for menu entries. They are typically used by Alt and then the letter. This is the same pattern than you propose. See also https://www.howtogeek.com/366147/how-to-make-windows-10-underline-and-highlight-menu-shortcut-keys/.

See for instance Excel:

grafik

We are trying to bring them back into JabRef.

Could you please think of other shortcuts? Maybe Ctrl+Alt+X?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay, how about:

  • clear: ctrl+alt+x
  • read: ctrl+alt+r
  • skimmed: ctrl+alt+d (ctrl+alt+s is "Save all")

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would also be fine to have no default values.

READ("Set read status to read", Localization.lang("Set read status to read"), "alt+R", KeyBindingCategory.EDIT),
SKIMMED("Set read status to skimmed", Localization.lang("Set read status to skimmed"), "alt+S", KeyBindingCategory.EDIT);

private final String constant;
private final String localization;
Expand Down