-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Added ability to override shortcut definitions for OSX (remove preprocessor defines) #51280
Added ability to override shortcut definitions for OSX (remove preprocessor defines) #51280
Conversation
21770cb
to
0dbef6d
Compare
0dbef6d
to
cb93ef8
Compare
@akien-mga Ok, I changed it. I think it is right but it will need testing on macOS of course. |
cb93ef8
to
2daddee
Compare
So, to me changes look sane and clear, but I wouldn't dare to approve this without testing it on a Mac first, which I unfortunately cannot do 🙃 Having to supply shortcut names to the overrides may be a bit excessive but we can always address this in a separate PR without breaking anything. |
Ok, my previous implementation was actually wrong and would not work properly, lol. I think I was rushing my thinking a bit. I have tested the new version on Windows, by adding a shortcut override with "Windows" as the feature. This worked correctly:
The shortcut was correctly listed as @pycbouh Additionally with this, the shortcut name is no longer repeated. It should now also be much easier to parse the codebase with a Python file (or similar), looking for |
2daddee
to
d66a8e0
Compare
6c7d358
to
25e9d78
Compare
Ok, I think it is in a mergeable state now. I have not tested on macos, but really it should not matter, it all works on the Feature system now. So doing either of the following should not matter: // macos
ED_SHORTCUT_OVERRIDE("editor/fullscreen_mode", "macos", KEY_MASK_CTRL | KEY_KP_1);
// windows
ED_SHORTCUT_OVERRIDE("editor/fullscreen_mode", "windows", KEY_MASK_CTRL | KEY_KP_1); Tested on windows and it works fine. If you are on Linux you can pull this PR and add an |
25e9d78
to
6b65092
Compare
Thanks! |
May help with godotengine/godot-docs#3333 cc @pycbouh
No more
OSX_ENABLED
preprocessor define checks when defining default editor shortcuts. Just add a call toED_SHORTCUT_OVERRIDE
with the corresponding feature you want the override to be for (e.g. "macOS"), and the new event.