Add distinct macOS Command and platform Shortcut keys - #4129
#4129Open
ifromstone wants to merge 3 commits into
FlaxEngine:masterFlaxEngine/FlaxEngine:masterfrom
ifromstone:dev/MacOSCommandKeyHandlingifromstone/FlaxEngine:dev/MacOSCommandKeyHandlingCopy head branch name to clipboard
Open
Add distinct macOS Command and platform Shortcut keys#4129ifromstone wants to merge 3 commits intoFlaxEngine:masterFlaxEngine/FlaxEngine:masterfrom ifromstone:dev/MacOSCommandKeyHandlingifromstone/FlaxEngine:dev/MacOSCommandKeyHandlingCopy head branch name to clipboard
ifromstone wants to merge 3 commits into
FlaxEngine:masterFlaxEngine/FlaxEngine:masterfrom
ifromstone:dev/MacOSCommandKeyHandlingifromstone/FlaxEngine:dev/MacOSCommandKeyHandlingCopy head branch name to clipboard
Conversation
Introduce KeyboardKeys.Command as the physical macOS Command key and KeyboardKeys.Shortcut as the platform-default shortcut modifier. Editor default shortcuts now use Shortcut so they map to Command on macOS and Control elsewhere, while physical Control remains distinct.
Track non-modifier keys pressed while Command is held on macOS and release them when Command is released.
ifromstone
marked this pull request as draft
June 1, 2026 21:52
ifromstone
marked this pull request as ready for review
June 3, 2026 17:25
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.
Summary
This change adds proper macOS Command key support while preserving Control as a distinct physical key. It introduces a logical
KeyboardKeys.Shortcutmodifier, which resolves to Command on macOS and Control on other platforms, and updates editor default shortcuts to use that logical modifier.Motivation
Previously, macOS Command was treated like Control in several places. That made common editor shortcuts such as Command+C/Command+V unreliable and also made it impossible to distinguish physical Control from Command. On macOS, these keys have different meanings: Command is the primary application shortcut modifier, while Control remains a separate modifier used by text editing and other workflows.
What Changed
KeyboardKeys.Commandfor the physical Apple Command key.KeyboardKeys.Shortcutfor platform-default application shortcuts.Shortcutcentrally in input queries:Shortcut -> CommandShortcut -> ControlShortcut-based shortcuts.Shortcutrather than a physical Command/Control binding.Notes
This does not migrate existing user settings. Existing customized bindings remain as-is, while reset/default settings use
Shortcut.Physical
Controlstill means Control on macOS. A user can explicitly bind Control+C/Control+V (for example), and those bindings will not be treated as Command+C/Command+V.