Skip to content

Comments

feat: Add dynamic keycode for primary modifier key#9571

Open
gonfunko wants to merge 3 commits intomainfrom
modifier-keys
Open

feat: Add dynamic keycode for primary modifier key#9571
gonfunko wants to merge 3 commits intomainfrom
modifier-keys

Conversation

@gonfunko
Copy link
Contributor

The basics

The details

Resolves

Fixes #8836

Proposed Changes

This PR adds KeyCodes.CTRL_CMD, which dynamically resolves to either Control or Command depending on the current platform. This allows keyboard shortcuts to be registered with the expected modifier key on all platforms, and without also being registered for other platforms' modifier key.

@gonfunko gonfunko requested a review from a team as a code owner January 14, 2026 22:17
@gonfunko gonfunko requested a review from BenHenning January 14, 2026 22:17
@github-actions github-actions bot added the PR: feature Adds a feature label Jan 14, 2026
Copy link
Collaborator

@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

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

Thanks @gonfunko! It's a nice simplification. I have a couple of suggestions, PTAL.

@BenHenning BenHenning assigned gonfunko and unassigned BenHenning Jan 16, 2026
Copy link
Collaborator

@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

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

Sorry, this dropped off my radar.

Thanks @gonfunko. LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: feature Adds a feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a custom key code that means "control on windows and command on mac"

2 participants