Fix duplicate control key on Windows#113
Merged
DaRealTurtyWurty merged 2 commits intoRailroad-Team:devfrom Dec 20, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug where the Control key was appearing twice in keybindings on Windows because the platform-dependent "Shortcut" key (which maps to Control on Windows and Meta/Command on Mac) was being added alongside the explicit Control key. The fix explicitly adds the META_DOWN modifier and then removes SHORTCUT_DOWN based on the platform to avoid duplication.
Key changes:
- Adds META_DOWN modifier when Meta key is pressed
- Implements platform-specific logic to remove SHORTCUT_DOWN duplication (removes it when Meta is pressed on Mac, or Control is pressed on other platforms)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/main/java/dev/railroadide/railroad/settings/keybinds/KeyComboNode.java
Show resolved
Hide resolved
Exanc
commented
Dec 19, 2025
Contributor
Author
Exanc
left a comment
There was a problem hiding this comment.
Fixed the localization of the meta key.
DaRealTurtyWurty
approved these changes
Dec 20, 2025
DaRealTurtyWurty
pushed a commit
that referenced
this pull request
Jan 16, 2026
* Fix duplicate control key on Windows * Fix localization --------- Co-authored-by: Exanc <12597611-Exanc@users.noreply.gitlab.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #103
The control key was appearing twice because the "Shortcut" key is also the control key on Windows.
The "Shortcut" key is platform dependent. Looking at JavaFX source code we can see that it is "Meta" on Mac PCs and "Control" otherwise.
Fix this issue for all platforms.