Refactor more KC_MISSION_CONTROL/KC_LAUNCHPAD usages (#19891)
This commit is contained in:
@@ -24,10 +24,8 @@ typedef union {
|
||||
#endif // RGB_MATRIX_ENABLE
|
||||
|
||||
enum {
|
||||
KC_MCON = USER00, // macOS Open Mission Control
|
||||
KC_LPAD, // macOS Open Launchpad
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
RGB_TPK, // Toggle Per-Key
|
||||
RGB_TPK = USER00, // Toggle Per-Key
|
||||
#ifndef ID67_DISABLE_UNDERGLOW
|
||||
RGB_TUG, // Toggle Underglow
|
||||
#endif // ID67_DISABLE_UNDERGLOW
|
||||
@@ -44,11 +42,6 @@ enum {
|
||||
#endif // ID67_DISABLE_UNDERGLOW
|
||||
#endif // RGB_MATRIX_ENABLE
|
||||
|
||||
enum macos_consumer_usages {
|
||||
_AC_SHOW_ALL_WINDOWS = 0x29F, // mapped to KC_MCON
|
||||
_AC_SHOW_ALL_APPS = 0x2A0 // mapped to KC_LPAD
|
||||
};
|
||||
|
||||
/* Special Keys */
|
||||
#define SK_LT1C LT(1, KC_CAPS) // Layer Tap 1, i.e., Tap = Caps Lock, Hold = Layer 1
|
||||
#define SK_LT2A LT(2, KC_APP) // Layer Tap 2, i.e., Tap = Menu, Hold = Layer 2
|
||||
@@ -319,23 +312,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
}
|
||||
return false;
|
||||
|
||||
// @see: https://github.com/qmk/qmk_firmware/issues/10111#issuecomment-752300353
|
||||
case KC_MCON:
|
||||
if (record->event.pressed) {
|
||||
host_consumer_send(_AC_SHOW_ALL_WINDOWS);
|
||||
} else {
|
||||
host_consumer_send(0);
|
||||
}
|
||||
return false;
|
||||
|
||||
case KC_LPAD:
|
||||
if (record->event.pressed) {
|
||||
host_consumer_send(_AC_SHOW_ALL_APPS);
|
||||
} else {
|
||||
host_consumer_send(0);
|
||||
}
|
||||
return false;
|
||||
|
||||
default:
|
||||
return true; /* Process all other keycodes normally */
|
||||
}
|
||||
|
@@ -16,16 +16,9 @@ enum {
|
||||
};
|
||||
|
||||
enum {
|
||||
KC_MCON = USER00,
|
||||
KC_LPAD,
|
||||
KB_VRSN = SAFE_RANGE
|
||||
};
|
||||
|
||||
enum macos_consumer_usages {
|
||||
_AC_SHOW_ALL_WINDOWS = 0x29F, // mapped to KC_MCON
|
||||
_AC_SHOW_ALL_APPS = 0x2A0 // mapped to KC_LPAD
|
||||
};
|
||||
|
||||
#define LT1_C_L LT(_FN1, KC_CAPS)
|
||||
|
||||
#ifndef MIN
|
||||
@@ -273,23 +266,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
}
|
||||
return false;
|
||||
|
||||
// @see: https://github.com/qmk/qmk_firmware/issues/10111#issuecomment-752300353
|
||||
case KC_MCON:
|
||||
if (record->event.pressed) {
|
||||
host_consumer_send(_AC_SHOW_ALL_WINDOWS);
|
||||
} else {
|
||||
host_consumer_send(0);
|
||||
}
|
||||
return false;
|
||||
|
||||
case KC_LPAD:
|
||||
if (record->event.pressed) {
|
||||
host_consumer_send(_AC_SHOW_ALL_APPS);
|
||||
} else {
|
||||
host_consumer_send(0);
|
||||
}
|
||||
return false;
|
||||
|
||||
default:
|
||||
return true; /* Process all other keycodes normally */
|
||||
}
|
||||
|
Reference in New Issue
Block a user