diff --git a/src/lib/platform/OSXMediaKeySimulator.m b/src/lib/platform/OSXMediaKeySimulator.m index b7d243f6..646807e3 100644 --- a/src/lib/platform/OSXMediaKeySimulator.m +++ b/src/lib/platform/OSXMediaKeySimulator.m @@ -19,15 +19,17 @@ int convertKeyIDToNXKeyType(KeyID id) { // hidsystem/ev_keymap.h - // NX_KEYTYPE_SOUND_UP 0 - // NX_KEYTYPE_SOUND_DOWN 1 - // NX_KEYTYPE_MUTE 7 - // NX_KEYTYPE_EJECT 14 - // NX_KEYTYPE_PLAY 16 - // NX_KEYTYPE_NEXT 17 - // NX_KEYTYPE_PREVIOUS 18 - // NX_KEYTYPE_FAST 19 - // NX_KEYTYPE_REWIND 20 + // NX_KEYTYPE_SOUND_UP 0 + // NX_KEYTYPE_SOUND_DOWN 1 + // NX_KEYTYPE_BRIGHTNESS_UP 2 + // NX_KEYTYPE_BRIGHTNESS_DOWN 3 + // NX_KEYTYPE_MUTE 7 + // NX_KEYTYPE_EJECT 14 + // NX_KEYTYPE_PLAY 16 + // NX_KEYTYPE_NEXT 17 + // NX_KEYTYPE_PREVIOUS 18 + // NX_KEYTYPE_FAST 19 + // NX_KEYTYPE_REWIND 20 int type = -1; switch (id) { @@ -37,6 +39,12 @@ int convertKeyIDToNXKeyType(KeyID id) case kKeyAudioDown: type = 1; break; + case kKeyBrightnessUp: + type = 2; + break; + case kKeyBrightnessDown: + type = 3; + break; case kKeyAudioMute: type = 7; break; diff --git a/src/lib/synergy/KeyState.cpp b/src/lib/synergy/KeyState.cpp index 6d4a4436..a1ab6b7a 100644 --- a/src/lib/synergy/KeyState.cpp +++ b/src/lib/synergy/KeyState.cpp @@ -573,10 +573,12 @@ KeyState::fakeKeyDown(KeyID id, KeyModifierMask mask, KeyButton serverID) if (keyItem == NULL) { // a media key won't be mapped on mac, so we need to fake it in a // special way - if (id == kKeyAudioDown || id == kKeyAudioUp || id == kKeyAudioMute || + if (id == kKeyAudioDown || id == kKeyAudioUp || + id == kKeyAudioMute || id == kKeyAudioPlay || id == kKeyAudioPrev || id == kKeyAudioNext || - id == kKeyAudioPlay) { - LOG((CLOG_DEBUG "emulating media key")); + id == kKeyBrightnessDown || id == kKeyBrightnessUp + ) { + LOG((CLOG_DEBUG1 "emulating media key")); fakeMediaKey(id); }