Skip to content

Make Keybaord Shortcuts OS independent for ctrl#14684

Merged
koppor merged 5 commits into
mainfrom
keyboardShortcuts
Dec 22, 2025
Merged

Make Keybaord Shortcuts OS independent for ctrl#14684
koppor merged 5 commits into
mainfrom
keyboardShortcuts

Conversation

@Siedlerchr

@Siedlerchr Siedlerchr commented Dec 21, 2025

Copy link
Copy Markdown
Member

Fixes #14237

grafik

Steps to test

  1. Open prefs -> Keyboard shortcut
  2. Clear existing shortcut for an entry
  3. Press cmd + some key and notice that the value is now correctly set, works and is displayed as cmd

Mandatory checks

  • I own the copyright of the code submitted and I license it under the MIT license
  • I manually tested my changes in running JabRef (always required)
  • [/] I added JUnit tests for changes (if applicable)
  • I added screenshots in the PR description (if change is visible to the user)
  • I described the change in CHANGELOG.md in a way that is understandable for the average user (if change is visible to the user)
  • [/] I checked the user documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request updating file(s) in https://github.com/JabRef/user-documentation/tree/main/en.

@koppor koppor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I did not find any hint on shortcut. For me, this is the combination of all keys, because it is a "Abkürzung". I would have expected "mod1" or something.

Seems to be somthing JavaFX specific?

Can we create keyboard-shortcuts.md in https://github.com/JabRef/jabref/tree/main/docs/code-howtos shortly linking implemetnation details?

Alternatively, the JavaDoc at jabgui/src/main/java/org/jabref/gui/keyboard/KeyBinding.java is a good place to write down this.

@github-actions github-actions Bot added status: changes-required Pull requests that are not yet complete and removed status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers labels Dec 22, 2025
@Siedlerchr

Siedlerchr commented Dec 22, 2025

Copy link
Copy Markdown
Member Author

https://openjfx.io/javadoc/24/javafx.graphics/javafx/scene/input/KeyCombination.html

The shortcut modifier is used to represent the modifier key which is used commonly in keyboard shortcuts on the host platform. This is for example control on Windows and meta (command key) on Mac. By using shortcut key modifier developers can create platform independent shortcuts. So the "Shortcut+C" key combination is handled internally as "Ctrl+C" on Windows and "Meta+C" on Mac.

@Siedlerchr

Siedlerchr commented Dec 22, 2025

Copy link
Copy Markdown
Member Author

I will add some documentation. Added to javadoc

…rdShortcuts

* upstream/keyboardShortcuts:
  Fix keyboard shortcut rendering in CHANGELOG.md
@Siedlerchr Siedlerchr added status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers and removed status: changes-required Pull requests that are not yet complete labels Dec 22, 2025
@Siedlerchr Siedlerchr requested a review from koppor December 22, 2025 10:55
@koppor koppor enabled auto-merge December 22, 2025 11:48
@koppor koppor added this pull request to the merge queue Dec 22, 2025
Merged via the queue into main with commit 17763f2 Dec 22, 2025
53 checks passed
@koppor koppor deleted the keyboardShortcuts branch December 22, 2025 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: keybinding platform: macos status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to change any keyboard shortcut

2 participants