Skip to content

Commit e374b74

Browse files
macOS (#87)
1 parent e7d2f4e commit e374b74

File tree

5 files changed

+23
-16
lines changed

5 files changed

+23
-16
lines changed

.github/workflows/build.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ jobs:
1515
- name: Windows
1616
os: windows-latest
1717

18-
# - name: macOS
19-
# os: macos-latest
18+
- name: macOS
19+
os: macos-latest
2020

2121
- name: Android32
2222
os: ubuntu-latest

mod.json

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
{
2-
"geode": "4.0.1",
2+
"geode": "4.2.0",
33
"gd": {
44
"win": "2.2074",
5-
"android": "2.2074"
5+
"android": "2.2074",
6+
"mac": "2.2074"
67
},
78
"version": "v1.10.1",
89
"id": "geode.custom-keybinds",
@@ -27,8 +28,6 @@
2728
"include/*.hpp"
2829
]
2930
},
30-
"dependencies": [],
31-
"incompatibilities": [],
3231
"settings": {
3332
"open-menu": {
3433
"type": "custom:open-menu"

src/EditorUI.cpp

+14-8
Original file line numberDiff line numberDiff line change
@@ -388,14 +388,17 @@ struct $modify(EditorUI) {
388388
"robtop.geometry-dash/undo",
389389
"Undo",
390390
"Undo Last Action",
391-
{ Keybind::create(KEY_Z, Modifier::PlatformControl) },
391+
{ Keybind::create(KEY_Z, Modifier::Control), GEODE_MACOS(Keybind::create(KEY_Z, Modifier::Command)) },
392392
Category::EDITOR_MODIFY, true
393393
});
394394
BindManager::get()->registerBindable({
395395
"robtop.geometry-dash/redo",
396396
"Redo",
397397
"Redo Last Action",
398-
{ Keybind::create(KEY_Z, Modifier::PlatformControl | Modifier::Shift) },
398+
{
399+
Keybind::create(KEY_Z, Modifier::Control | Modifier::Shift),
400+
GEODE_MACOS(Keybind::create(KEY_Z, Modifier::Command | Modifier::Shift))
401+
},
399402
Category::EDITOR_MODIFY, true
400403
});
401404
BindManager::get()->registerBindable({
@@ -409,21 +412,21 @@ struct $modify(EditorUI) {
409412
"robtop.geometry-dash/copy",
410413
"Copy",
411414
"Copy Selected Objects",
412-
{ Keybind::create(KEY_C, Modifier::PlatformControl) },
415+
{ Keybind::create(KEY_C, Modifier::Control), GEODE_MACOS(Keybind::create(KEY_C, Modifier::Command)) },
413416
Category::EDITOR_MODIFY, false
414417
});
415418
BindManager::get()->registerBindable({
416419
"robtop.geometry-dash/paste",
417420
"Paste",
418421
"Paste Selected Objects",
419-
{ Keybind::create(KEY_V, Modifier::PlatformControl) },
422+
{ Keybind::create(KEY_V, Modifier::Control), GEODE_MACOS(Keybind::create(KEY_V, Modifier::Command)) },
420423
Category::EDITOR_MODIFY, true
421424
});
422425
BindManager::get()->registerBindable({
423426
"robtop.geometry-dash/copy-paste",
424427
"Copy + Paste",
425428
"Duplicate Selected Objects",
426-
{ Keybind::create(KEY_D, Modifier::PlatformControl) },
429+
{ Keybind::create(KEY_D, Modifier::Control), GEODE_MACOS(Keybind::create(KEY_D, Modifier::Command)) },
427430
Category::EDITOR_MODIFY, true
428431
});
429432
BindManager::get()->registerBindable({
@@ -437,7 +440,7 @@ struct $modify(EditorUI) {
437440
"robtop.geometry-dash/toggle-transform",
438441
"Transform",
439442
"Toggle Transform Control",
440-
{ Keybind::create(KEY_T, Modifier::PlatformControl) },
443+
{ Keybind::create(KEY_T, Modifier::Control), GEODE_MACOS(Keybind::create(KEY_T, Modifier::Command)) },
441444
Category::EDITOR_UI, false
442445
});
443446
BindManager::get()->registerBindable({
@@ -472,7 +475,7 @@ struct $modify(EditorUI) {
472475
"robtop.geometry-dash/playback-music",
473476
"Playback Music",
474477
"Start / Stop Playing the Level's Music",
475-
{ Keybind::create(KEY_Enter, Modifier::PlatformControl) },
478+
{ Keybind::create(KEY_Enter, Modifier::Control), GEODE_MACOS(Keybind::create(KEY_Enter, Modifier::Command)) },
476479
Category::EDITOR_UI, false
477480
});
478481
BindManager::get()->registerBindable({
@@ -642,7 +645,10 @@ struct $modify(EditorUI) {
642645
"Save Editor Position " + x,
643646
"Save the current editor camera position in the slot " + x + ". "
644647
"You can reload this slot back with Load Editor Position " + x,
645-
{ Keybind::create(static_cast<enumKeyCodes>(KEY_Zero + i), Modifier::PlatformControl) },
648+
{
649+
Keybind::create(static_cast<enumKeyCodes>(KEY_Zero + i), Modifier::Control),
650+
GEODE_MACOS(Keybind::create(static_cast<enumKeyCodes>(KEY_Zero + i), Modifier::Command))
651+
},
646652
Category::EDITOR_UI, false
647653
});
648654
BindManager::get()->registerBindable({

src/UILayer.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ struct $modify(UILayer) {
399399
"robtop.geometry-dash/full-restart-level",
400400
"Full restart level",
401401
"Restarts the level from the beginning (needs Quick Keys enabled)",
402-
{ Keybind::create(KEY_R, Modifier::Control) },
402+
{ Keybind::create(KEY_R, Modifier::Control), GEODE_MACOS(Keybind::create(KEY_R, Modifier::Command)) },
403403
Category::PLAY, false
404404
});
405405
BindManager::get()->registerBindable({

src/macos.mm

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
#include <Geode/Loader.hpp>
22
#include <Geode/Utils.hpp>
33

4-
#if defined(GEODE_IS_MACOS)
4+
#ifdef GEODE_IS_MACOS
5+
#define CommentType CommentTypeDummy
56
#import <Cocoa/Cocoa.h>
67
#include <objc/runtime.h>
8+
#undef CommentType
79

810
using namespace geode::prelude;
911

0 commit comments

Comments
 (0)