Added preset for new entry keybindings and reintroduced defaults#7705
Conversation
| NEW_PHDTHESIS("New phdthesis", Localization.lang("New phdthesis"), "", KeyBindingCategory.BIBTEX), | ||
| NEW_PROCEEDINGS("New proceedings", Localization.lang("New proceedings"), "", KeyBindingCategory.BIBTEX), | ||
| NEW_UNPUBLISHED("New unpublished", Localization.lang("New unpublished"), "", KeyBindingCategory.BIBTEX), | ||
| NEW_INBOOK("New inbook", Localization.lang("New inbook"), "Ctrl+shift+I", KeyBindingCategory.BIBTEX), |
There was a problem hiding this comment.
I think ctrl needs to be lowercase5, otherwise the Mac replacement with option might not work
There was a problem hiding this comment.
I have no idea, I just did it like the other keybindings... Could you test this please? Maybe this is an issue with other keys.
There was a problem hiding this comment.
I test it now, works fine. ctrl is mapped to cmd
|
Opening editor works on mac with cmd + e now, but closing not |
tobiasdiez
left a comment
There was a problem hiding this comment.
Some smaller comments, otherwise LGTM
| NEW_PHDTHESIS("New phdthesis", Localization.lang("New phdthesis"), "", KeyBindingCategory.BIBTEX), | ||
| NEW_PROCEEDINGS("New proceedings", Localization.lang("New proceedings"), "", KeyBindingCategory.BIBTEX), | ||
| NEW_UNPUBLISHED("New unpublished", Localization.lang("New unpublished"), "", KeyBindingCategory.BIBTEX), | ||
| NEW_INBOOK("New inbook", Localization.lang("New inbook"), "ctrl+shift+I", KeyBindingCategory.BIBTEX), |
There was a problem hiding this comment.
Are these defaults really necessary? They were removed in a recent PR on purpose (because they are not often used). Users can still set keybindings themselves, right?
There was a problem hiding this comment.
Carl and me discussed this in length yesterday, too.
I like convention over configuration. If I start a tool, I want to have it behaving "well". It should require configuration only for certain special cases.
In the concrete case, the key bindings are NOT used for some other cases (except the pull from shared database). Thus, I have a strong vote to add the non-conflicting key bindings back as default.
The other option is that I write a lengthy manual on key bindings and explain each (power) user why they have to configure key bindings. - IMHO JabRef should not require much documentation. Only for the hard cases.
See also #7439 and #7346. Thus, there are multiple users used to the key bindings.
There was a problem hiding this comment.
There are too many entry types, especially if you use biblatex, to have keybindings for all types. Thus you need to make a cutoff somewhere, and in my opinion it should be sufficient to have bindings for the 5 most commonly used types. This would also be consistent with the "new entry" dialog where the following types are treated specially:
There was a problem hiding this comment.
The "most commonly used types" are for me the ones where keybindings existed for more than a decade. IMHO there is no need to remove functionality in this case.
There was a problem hiding this comment.
From this perspective, we shouldn't have changed the new entry dialog as well...
|
|
||
| @Override | ||
| public String getName() { | ||
| return "New Entries"; |
There was a problem hiding this comment.
I find "new entries" a bit confusing, maybe something longer that better explains the purpose? Should be localized as well.
There was a problem hiding this comment.
Please make a suggestion. We did not come up with something better yet.
There was a problem hiding this comment.
Something like "Bindings for creating all entry types"?
There was a problem hiding this comment.
A long text would just repeat information the user already has and would be imho extremely annoying.
There was a problem hiding this comment.
Yeah, I couldn't find a nice formulation that doesn't include "Bindings". But with "New entries" or "New entry types" it's really not clear what this is doing.
| KEY_BINDINGS.put(KeyBinding.COPY_PREVIEW, ""); | ||
|
|
||
| // Add new entry presets | ||
| KEY_BINDINGS.put(KeyBinding.NEW_ARTICLE, "Ctrl+shift+A"); |
There was a problem hiding this comment.
to be consistent with the other keybindings, please lowercase the Ctrl
|
Seem like someone was too fast with merging unit tests , I think Tobi fixed them a few minutes ago |
Merged |
Siedlerchr
left a comment
There was a problem hiding this comment.
form my point of view lgtm.
Maybe reword New entries simply to New Entry by type"?
|
Before merging we should get to a conclusion about which shortcuts to keep. |
|
Also i don't really understand why on macos we need two different shortcuts, one for opening the entry editor and one for closing it. This needs to be fixed. |
Should be lowercase jabref/src/main/java/org/jabref/gui/keyboard/KeyBindingRepository.java Lines 127 to 129 in bb011c9 Regarding the ctrl + E (which maps to cmd + e on mac) I think I found the issue and I remember it's a bug in javafx. Edit// Yep: https://bugs.openjdk.java.net/browse/JDK-8205915 |
* upstream/main: (71 commits) [Bot] Update CSL styles (#7735) Fix for issue 6966: open all files of multiple entries (#7709) Add simple unit tests (#7696) Add simple unit tests (#7543) Update check-outdated-dependencies.yml Added preset for new entry keybindings and reintroduced defaults (#7705) Select the entry which has smaller dictonary order when merge (#7708) Update CHANGELOG.md fix: make more fields, fomatters, ids and languages sorted by alphabetical order (#7717) Bump libreoffice from 7.1.2 to 7.1.3 (#7721) Bump unoloader from 7.1.2 to 7.1.3 (#7724) Bump org.beryx.jlink from 2.23.7 to 2.23.8 (#7723) Bump org.openjfx.javafxplugin from 0.0.9 to 0.0.10 (#7725) fix: make fields sorted by lexicographical order (#7711) Fix tests Refactoring existing unit tests (#7687) Refactoring and addition of unit tests (#7581) Refactor simple Unit Tests (#7571) Add simple unit tests (#7544) add and extend unit tests (#7685) ...




Added preset for new entry keybindings on public demand.
Fixes #7346
Fixes #7439
CHANGELOG.mddescribed in a way that is understandable for the average user (if applicable)