-
-
Notifications
You must be signed in to change notification settings - Fork 21k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix key mapping changes when moving from macOS to other platform. #65241
Conversation
645b9c0
to
91d0694
Compare
Maybe @aaronfranke knows more cases where working on a Mac causes changes to project that differ from Windows and Linux? I support this. |
Why is Command spelled out, but Ctrl shortened? I think it should be "Cmd/Ctrl". Actually, I think it would be better to have names like this:
|
I guess shortened
That was the reason of the issue, Cmd is not Control. Right now, naming is:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did a quick test, I can confirm that this fixes the issue, the mappings saved to project.godot
are now consistent between Windows and macOS.
Removes separate `Command` key (use `Meta` instead). Adds an event flag to automatically remap `Command` <-> `Control` (cannot be set alongside `Control` or `Meta`).
91d0694
to
6f4d233
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. It's still somewhat complex but I don't think there's any non-complex solution here, and this one is much cleaner :)
Thanks! |
Command
key (useMeta
instead).store_command
property, adds an event property to automatically remapCommand
↔Control
(if setControl
orMeta
can't be set, and it is matched toControl
orMeta
depending on platform).Example:
Option+Command+Q
on macOS and toAlt+Ctrl+Q
on other platforms.Option+Command+A
on macOS and toAlt+Meta+A
on other platforms.Fixes #35355