Skip to content

Fix duplicate control key on Windows#113

Merged
DaRealTurtyWurty merged 2 commits intoRailroad-Team:devfrom
Exanc:fix/keybinding-sanitation
Dec 20, 2025
Merged

Fix duplicate control key on Windows#113
DaRealTurtyWurty merged 2 commits intoRailroad-Team:devfrom
Exanc:fix/keybinding-sanitation

Conversation

@Exanc
Copy link
Contributor

@Exanc Exanc commented Dec 5, 2025

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.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

@Railroad-Team Railroad-Team deleted a comment from Copilot AI Dec 19, 2025
Copy link
Contributor Author

@Exanc Exanc left a comment

Choose a reason for hiding this comment

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

Fixed the localization of the meta key.

@DaRealTurtyWurty DaRealTurtyWurty merged commit 2327993 into Railroad-Team:dev Dec 20, 2025
1 check passed
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants