A macOS menu bar utility that remaps Left CMD to Left CTRL when Moonlight is the active (foreground) application.
This is useful for game streaming where you want macOS CMD shortcuts to map to Windows CTRL shortcuts (e.g., CMD+C becomes CTRL+C on the remote Windows machine).
- Remaps Left Command key to Left Control key
- Only active when Moonlight is the frontmost application
- Menu bar app with no Dock icon
- Toggle on/off from menu bar
- Launch at login support
- Visual status indicators
- macOS 14.0 (Sonoma) or later
- Moonlight game streaming client installed
- Accessibility permission
cd moonlight-remapper
chmod +x build-app.sh
./build-app.shThis creates MoonlightRemapper.app in the project directory.
- Move
MoonlightRemapper.appto/Applications - Open the app
- Grant Accessibility permission when prompted (System Settings > Privacy & Security > Accessibility)
- Enable remapping from the menu bar icon
- Click the keyboard icon in the menu bar
- Toggle "Enable Remapping" on
- Open Moonlight and start streaming
- Left CMD will now act as Left CTRL while Moonlight is the active window
keyboard.badge.ellipsis- Remapping disabledkeyboard- Remapping enabled, waiting for Moonlightkeyboard.fill- Actively remapping (Moonlight is frontmost)
The app uses:
CGEvent.tapCreateto intercept keyboard events at the system levelNSWorkspace.didActivateApplicationNotification+ polling to detect frontmost app changesflagsChangedevent type for modifier key detection- Conditional remapping based on app bundle identifier (
com.moonlight-stream.Moonlight)
MIT