diff --git a/AerofoilSDL/GpDisplayDriver_SDL_GL2.cpp b/AerofoilSDL/GpDisplayDriver_SDL_GL2.cpp index f323d86..01da78b 100644 --- a/AerofoilSDL/GpDisplayDriver_SDL_GL2.cpp +++ b/AerofoilSDL/GpDisplayDriver_SDL_GL2.cpp @@ -1637,11 +1637,19 @@ static bool IdentifyVKey(const SDL_KeyboardEvent *keyEvt, GpKeyIDSubset_t &outSu return false; } break; +#ifdef __MACOS__ + case SDLK_LGUI: +#else case SDLK_LCTRL: +#endif outSubset = GpKeyIDSubsets::kSpecial; outKey.m_specialKey = GpKeySpecials::kLeftCtrl; break; +#ifdef __MACOS__ + case SDLK_RGUI: +#else case SDLK_RCTRL: +#endif outSubset = GpKeyIDSubsets::kSpecial; outKey.m_specialKey = GpKeySpecials::kRightCtrl; break; diff --git a/GpCommon/GpVOSEvent.h b/GpCommon/GpVOSEvent.h index 4389d32..08c8305 100644 --- a/GpCommon/GpVOSEvent.h +++ b/GpCommon/GpVOSEvent.h @@ -97,8 +97,8 @@ namespace GpKeySpecials kEnter, kLeftShift, kRightShift, - kLeftCtrl, - kRightCtrl, + kLeftCtrl, // Maps to Command modifier on macOS. + kRightCtrl, // kLeftAlt, kRightAlt, kNumLock, diff --git a/PortabilityLayer/MenuManager.cpp b/PortabilityLayer/MenuManager.cpp index e55e6f7..f73b8ff 100644 --- a/PortabilityLayer/MenuManager.cpp +++ b/PortabilityLayer/MenuManager.cpp @@ -1405,14 +1405,22 @@ namespace PortabilityLayer size_t MenuManagerImpl::FormatHintText(uint8_t *buffer, uint8_t key) { +#ifdef __MACOS__ + buffer[0] = 'C'; + buffer[1] = 'm'; + buffer[2] = 'd'; + buffer[3] = '+'; + buffer[4] = key; + return 5; +#else buffer[0] = 'C'; buffer[1] = 't'; buffer[2] = 'r'; buffer[3] = 'l'; buffer[4] = '+'; buffer[5] = key; - return 6; +#endif } MenuManagerImpl *MenuManagerImpl::GetInstance()