Move KC_MISSION_CONTROL/KC_LAUNCHPAD keycodes to core (#19884)

This commit is contained in:
Joel Challis 2023-02-19 07:59:50 +00:00 committed by GitHub
parent e837a32b2b
commit 0152dd811d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
23 changed files with 76 additions and 317 deletions

View File

@ -0,0 +1,20 @@
{
"keycodes": {
"0x00C1": {
"group": "media",
"key": "KC_MISSION_CONTROL",
"label": "Open Mission Control",
"aliases": [
"KC_MCTL"
]
},
"0x00C2": {
"group": "media",
"key": "KC_LAUNCHPAD",
"label": "Open Launchpad",
"aliases": [
"KC_LPAD"
]
}
}
}

View File

@ -209,6 +209,8 @@ See also: [Basic Keycodes](keycodes_basic.md)
|`KC_BRIGHTNESS_DOWN` |`KC_BRID` |Brightness Down |✔ |✔ |✔ | |`KC_BRIGHTNESS_DOWN` |`KC_BRID` |Brightness Down |✔ |✔ |✔ |
|`KC_CONTROL_PANEL` |`KC_CPNL` |Open Control Panel |✔ | | | |`KC_CONTROL_PANEL` |`KC_CPNL` |Open Control Panel |✔ | | |
|`KC_ASSISTANT` |`KC_ASST` |Launch Context-Aware Assistant |✔ | | | |`KC_ASSISTANT` |`KC_ASST` |Launch Context-Aware Assistant |✔ | | |
|`KC_MISSION_CONTROL` |`KC_MCTL` |Open Mission Control | |✔ | |
|`KC_LAUNCHPAD` |`KC_LPAD` |Open Launchpad | |✔ | |
<sup>1. The Linux kernel HID driver recognizes [nearly all keycodes](https://github.com/torvalds/linux/blob/master/drivers/hid/hid-input.c), but the default bindings depend on the DE/WM.</sup><br/> <sup>1. The Linux kernel HID driver recognizes [nearly all keycodes](https://github.com/torvalds/linux/blob/master/drivers/hid/hid-input.c), but the default bindings depend on the DE/WM.</sup><br/>
<sup>2. Treated as F13-F15.</sup><br/> <sup>2. Treated as F13-F15.</sup><br/>

View File

@ -194,7 +194,7 @@ These keycodes are not part of the Keyboard/Keypad usage page. The `SYSTEM_` key
?> Some of these keycodes may behave differently depending on the OS. For example, on macOS, the keycodes `KC_MEDIA_FAST_FORWARD`, `KC_MEDIA_REWIND`, `KC_MEDIA_NEXT_TRACK` and `KC_MEDIA_PREV_TRACK` skip within the current track when held, but skip the entire track when tapped. ?> Some of these keycodes may behave differently depending on the OS. For example, on macOS, the keycodes `KC_MEDIA_FAST_FORWARD`, `KC_MEDIA_REWIND`, `KC_MEDIA_NEXT_TRACK` and `KC_MEDIA_PREV_TRACK` skip within the current track when held, but skip the entire track when tapped.
|Key |Aliases |Description | |Key |Aliases |Description |
|-----------------------|---------|-------------------| |-----------------------|---------|--------------------|
|`KC_SYSTEM_POWER` |`KC_PWR` |System Power Down | |`KC_SYSTEM_POWER` |`KC_PWR` |System Power Down |
|`KC_SYSTEM_SLEEP` |`KC_SLEP`|System Sleep | |`KC_SYSTEM_SLEEP` |`KC_SLEP`|System Sleep |
|`KC_SYSTEM_WAKE` |`KC_WAKE`|System Wake | |`KC_SYSTEM_WAKE` |`KC_WAKE`|System Wake |
@ -223,6 +223,8 @@ These keycodes are not part of the Keyboard/Keypad usage page. The `SYSTEM_` key
|`KC_BRIGHTNESS_DOWN` |`KC_BRID`|Brightness Down | |`KC_BRIGHTNESS_DOWN` |`KC_BRID`|Brightness Down |
|`KC_CONTROL_PANEL` |`KC_CPNL`|Open Control Panel | |`KC_CONTROL_PANEL` |`KC_CPNL`|Open Control Panel |
|`KC_ASSISTANT` |`KC_ASST`|Launch Assistant | |`KC_ASSISTANT` |`KC_ASST`|Launch Assistant |
|`KC_MISSION_CONTROL` |`KC_MCTL`|Open Mission Control|
|`KC_LAUNCHPAD` |`KC_LPAD`|Open Launchpad |
## Number Pad ## Number Pad

View File

@ -24,15 +24,8 @@ enum layers {
MAC_FN MAC_FN
}; };
enum custom_keycodes {
KC_MISSION_CONTROL = SAFE_RANGE,
KC_LAUNCHPAD
};
#define KC_TASK LGUI(KC_TAB) #define KC_TASK LGUI(KC_TAB)
#define KC_FLXP LGUI(KC_E) #define KC_FLXP LGUI(KC_E)
#define KC_MCTL KC_MISSION_CONTROL
#define KC_LPAD KC_LAUNCHPAD
#define TO_WINB TO(WIN_BASE) #define TO_WINB TO(WIN_BASE)
#define TO_MACB TO(MAC_BASE) #define TO_MACB TO(MAC_BASE)
#define MO_WINF MO(WIN_FN) #define MO_WINF MO(WIN_FN)
@ -174,20 +167,6 @@ bool led_update_user(led_t led_state) {
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
case KC_MISSION_CONTROL:
if (record->event.pressed) {
host_consumer_send(0x29F);
} else {
host_consumer_send(0);
}
return false; // Skip all further processing of this key
case KC_LAUNCHPAD:
if (record->event.pressed) {
host_consumer_send(0x2A0);
} else {
host_consumer_send(0);
}
return false; // Skip all further processing of this key
#ifdef RGB_MATRIX_ENABLE #ifdef RGB_MATRIX_ENABLE
#ifdef NKRO_ENABLE #ifdef NKRO_ENABLE
case NK_TOGG: case NK_TOGG:

View File

@ -23,9 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
enum my_keycodes { enum my_keycodes {
KC_MSCTRL = SAFE_RANGE, LED_TLDE = SAFE_RANGE,
KC_LNPD,
LED_TLDE,
LED_1, LED_1,
LED_2, LED_2,
LED_3, LED_3,
@ -209,23 +207,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
// https://github.com/qmk/qmk_firmware/issues/10111
case KC_MSCTRL:
if (record->event.pressed) {
host_consumer_send(0x29F);
} else {
host_consumer_send(0);
}
return false; /* Skip all further processing of this key */
case KC_LNPD:
if (record->event.pressed) {
host_consumer_send(0x2A0);
} else {
host_consumer_send(0);
}
return false; /* Skip all further processing of this key */
#ifdef NKRO_ENABLE #ifdef NKRO_ENABLE
#if RGB_CONFIRMATION_BLINKING_TIME > 0 #if RGB_CONFIRMATION_BLINKING_TIME > 0
case NK_TOGG: case NK_TOGG:

View File

@ -16,18 +16,6 @@
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
enum custom_keycodes {
#ifdef VIA_ENABLE
KC_MISSION_CONTROL = USER00,
#else
KC_MISSION_CONTROL = SAFE_RANGE,
#endif
KC_LAUNCHPAD
};
#define KC_MCTL KC_MISSION_CONTROL
#define KC_LPAD KC_LAUNCHPAD
// clang-format off // clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
@ -75,24 +63,3 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
[3] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, [3] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) },
}; };
#endif #endif
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case KC_MISSION_CONTROL:
if (record->event.pressed) {
host_consumer_send(0x29F);
} else {
host_consumer_send(0);
}
return false;
case KC_LAUNCHPAD:
if (record->event.pressed) {
host_consumer_send(0x2A0);
} else {
host_consumer_send(0);
}
return false;
default:
return true;
}
}

View File

@ -41,20 +41,6 @@ void housekeeping_task_keychron(void) {
bool process_record_keychron(uint16_t keycode, keyrecord_t *record) { bool process_record_keychron(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
case KC_MISSION_CONTROL:
if (record->event.pressed) {
host_consumer_send(0x29F);
} else {
host_consumer_send(0);
}
return false; // Skip all further processing of this key
case KC_LAUNCHPAD:
if (record->event.pressed) {
host_consumer_send(0x2A0);
} else {
host_consumer_send(0);
}
return false; // Skip all further processing of this key
case KC_LOPTN: case KC_LOPTN:
case KC_ROPTN: case KC_ROPTN:
case KC_LCMMD: case KC_LCMMD:

View File

@ -22,12 +22,10 @@
enum custom_keycodes { enum custom_keycodes {
#ifdef VIA_ENABLE #ifdef VIA_ENABLE
KC_MISSION_CONTROL = USER00, KC_LOPTN = USER00,
#else #else
KC_MISSION_CONTROL = SAFE_RANGE, KC_LOPTN = SAFE_RANGE,
#endif #endif
KC_LAUNCHPAD,
KC_LOPTN,
KC_ROPTN, KC_ROPTN,
KC_LCMMD, KC_LCMMD,
KC_RCMMD, KC_RCMMD,
@ -38,8 +36,6 @@ enum custom_keycodes {
KC_CORTANA KC_CORTANA
}; };
#define KC_MCTL KC_MISSION_CONTROL
#define KC_LPAD KC_LAUNCHPAD
#define KC_TASK KC_TASK_VIEW #define KC_TASK KC_TASK_VIEW
#define KC_FLXP KC_FILE_EXPLORER #define KC_FLXP KC_FILE_EXPLORER
#define KC_SNAP KC_SCREEN_SHOT #define KC_SNAP KC_SCREEN_SHOT

View File

@ -22,17 +22,6 @@
// clang-format off // clang-format off
enum custom_keycodes {
#ifdef VIA_ENABLE
KC_MISSION_CONTROL = USER00,
#else
KC_MISSION_CONTROL = SAFE_RANGE,
#endif
KC_LAUNCHPAD
};
#define KC_MCTL KC_MISSION_CONTROL
#define KC_LPAD KC_LAUNCHPAD
#define KC_TASK LGUI(KC_TAB) #define KC_TASK LGUI(KC_TAB)
#define KC_FLXP LGUI(KC_E) #define KC_FLXP LGUI(KC_E)
@ -79,24 +68,3 @@ void matrix_init_user(void) {
rgb_matrix_init_user(); rgb_matrix_init_user();
#endif #endif
} }
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case KC_MISSION_CONTROL:
if (record->event.pressed) {
host_consumer_send(0x29F);
} else {
host_consumer_send(0);
}
return false; // Skip all further processing of this key
case KC_LAUNCHPAD:
if (record->event.pressed) {
host_consumer_send(0x2A0);
} else {
host_consumer_send(0);
}
return false; // Skip all further processing of this key
default:
return true; // Process all other keycodes normally
}
}

View File

@ -36,19 +36,15 @@ user_config_t user_config;
enum custom_keycodes { enum custom_keycodes {
#ifdef VIA_ENABLE #ifdef VIA_ENABLE
KC_MISSION_CONTROL = USER00, KC_LIGHT_TAB_TOGGLE = USER00,
#else #else
KC_MISSION_CONTROL = SAFE_RANGE, KC_LIGHT_TAB_TOGGLE = SAFE_RANGE,
#endif #endif
KC_LAUNCHPAD,
KC_LIGHT_TAB_TOGGLE,
KC_LIGHT_ALPHAS_TOGGLE, KC_LIGHT_ALPHAS_TOGGLE,
KC_FN_LAYER_TRANSPARENT_KEYS_TOGGLE, KC_FN_LAYER_TRANSPARENT_KEYS_TOGGLE,
KC_FN_LAYER_COLOR_TOGGLE KC_FN_LAYER_COLOR_TOGGLE
}; };
#define KC_MCTL KC_MISSION_CONTROL
#define KC_LPAD KC_LAUNCHPAD
#define KC_LTTOG KC_LIGHT_TAB_TOGGLE #define KC_LTTOG KC_LIGHT_TAB_TOGGLE
#define KC_LATOG KC_LIGHT_ALPHAS_TOGGLE #define KC_LATOG KC_LIGHT_ALPHAS_TOGGLE
#define KC_TKTOG KC_FN_LAYER_TRANSPARENT_KEYS_TOGGLE #define KC_TKTOG KC_FN_LAYER_TRANSPARENT_KEYS_TOGGLE
@ -115,20 +111,6 @@ void eeconfig_init_user(void) {
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
case KC_MISSION_CONTROL:
if (record->event.pressed) {
host_consumer_send(0x29F);
} else {
host_consumer_send(0);
}
return false; // Skip all further processing of this key
case KC_LAUNCHPAD:
if (record->event.pressed) {
host_consumer_send(0x2A0);
} else {
host_consumer_send(0);
}
return false; // Skip all further processing of this key
case KC_LIGHT_TAB_TOGGLE: case KC_LIGHT_TAB_TOGGLE:
if (record->event.pressed) { if (record->event.pressed) {
user_config.caps_lock_light_tab ^= 1; // bitwise xor to toggle status bit user_config.caps_lock_light_tab ^= 1; // bitwise xor to toggle status bit

View File

@ -22,13 +22,6 @@
// clang-format off // clang-format off
enum custom_keycodes {
KC_MISSION_CONTROL = USER00,
KC_LAUNCHPAD,
};
#define KC_MCTL KC_MISSION_CONTROL
#define KC_LPAD KC_LAUNCHPAD
#define TG_NKRO MAGIC_TOGGLE_NKRO #define TG_NKRO MAGIC_TOGGLE_NKRO
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
@ -72,24 +65,3 @@ void matrix_init_user(void) {
rgb_matrix_init_user(); rgb_matrix_init_user();
#endif #endif
} }
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case KC_MISSION_CONTROL:
if (record->event.pressed) {
host_consumer_send(0x29F);
} else {
host_consumer_send(0);
}
return false; // Skip all further processing of this key
case KC_LAUNCHPAD:
if (record->event.pressed) {
host_consumer_send(0x2A0);
} else {
host_consumer_send(0);
}
return false; // Skip all further processing of this key
default:
return true; // Process all other keycodes normally
}
}

View File

@ -36,19 +36,15 @@ user_config_t user_config;
enum custom_keycodes { enum custom_keycodes {
#ifdef VIA_ENABLE #ifdef VIA_ENABLE
KC_MISSION_CONTROL = USER00, KC_LIGHT_TAB_TOGGLE = USER00,
#else #else
KC_MISSION_CONTROL = SAFE_RANGE, KC_LIGHT_TAB_TOGGLE = SAFE_RANGE,
#endif #endif
KC_LAUNCHPAD,
KC_LIGHT_TAB_TOGGLE,
KC_LIGHT_ALPHAS_TOGGLE, KC_LIGHT_ALPHAS_TOGGLE,
KC_FN_LAYER_TRANSPARENT_KEYS_TOGGLE, KC_FN_LAYER_TRANSPARENT_KEYS_TOGGLE,
KC_FN_LAYER_COLOR_TOGGLE KC_FN_LAYER_COLOR_TOGGLE
}; };
#define KC_MCTL KC_MISSION_CONTROL
#define KC_LPAD KC_LAUNCHPAD
#define KC_LTTOG KC_LIGHT_TAB_TOGGLE #define KC_LTTOG KC_LIGHT_TAB_TOGGLE
#define KC_LATOG KC_LIGHT_ALPHAS_TOGGLE #define KC_LATOG KC_LIGHT_ALPHAS_TOGGLE
#define KC_TKTOG KC_FN_LAYER_TRANSPARENT_KEYS_TOGGLE #define KC_TKTOG KC_FN_LAYER_TRANSPARENT_KEYS_TOGGLE
@ -115,20 +111,6 @@ void eeconfig_init_user(void) {
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
case KC_MISSION_CONTROL:
if (record->event.pressed) {
host_consumer_send(0x29F);
} else {
host_consumer_send(0);
}
return false; // Skip all further processing of this key
case KC_LAUNCHPAD:
if (record->event.pressed) {
host_consumer_send(0x2A0);
} else {
host_consumer_send(0);
}
return false; // Skip all further processing of this key
case KC_LIGHT_TAB_TOGGLE: case KC_LIGHT_TAB_TOGGLE:
if (record->event.pressed) { if (record->event.pressed) {
user_config.caps_lock_light_tab ^= 1; // bitwise xor to toggle status bit user_config.caps_lock_light_tab ^= 1; // bitwise xor to toggle status bit

View File

@ -20,16 +20,9 @@
# include "rgb_matrix_user.h" # include "rgb_matrix_user.h"
#endif #endif
enum custom_keycodes {
KC_MISSION_CONTROL = SAFE_RANGE,
KC_LAUNCHPAD
};
#define KC_WAVE S(KC_GRV) #define KC_WAVE S(KC_GRV)
#define KC_TASK LGUI(KC_TAB) #define KC_TASK LGUI(KC_TAB)
#define KC_FLXP LGUI(KC_E) #define KC_FLXP LGUI(KC_E)
#define KC_MCTL KC_MISSION_CONTROL
#define KC_LPAD KC_LAUNCHPAD
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[MAC_BASE] = LAYOUT_ansi_67( [MAC_BASE] = LAYOUT_ansi_67(
@ -73,24 +66,3 @@ void matrix_init_user(void) {
rgb_matrix_init_user(); rgb_matrix_init_user();
#endif #endif
} }
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case KC_MISSION_CONTROL:
if (record->event.pressed) {
host_consumer_send(0x29F);
} else {
host_consumer_send(0);
}
return false; // Skip all further processing of this key
case KC_LAUNCHPAD:
if (record->event.pressed) {
host_consumer_send(0x2A0);
} else {
host_consumer_send(0);
}
return false; // Skip all further processing of this key
default:
return true; // Process all other keycodes normally
}
}

View File

@ -25,9 +25,7 @@ enum layers{
}; };
enum custom_keycodes { enum custom_keycodes {
KC_MISSION_CONTROL = USER00, KC_TASK = USER00,
KC_LAUNCHPAD,
KC_TASK,
KC_FLXP KC_FLXP
}; };

View File

@ -28,20 +28,6 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
process_magic(CG_TOGG, record); process_magic(CG_TOGG, record);
} }
return false; return false;
case KC_MCTL:
if (record->event.pressed) {
host_consumer_send(0x29F);
} else {
host_consumer_send(0);
}
return false;
case KC_LPAD:
if (record->event.pressed) {
host_consumer_send(0x2A0);
} else {
host_consumer_send(0);
}
return false;
default: default:
return true; return true;
} }

View File

@ -37,19 +37,13 @@ enum keyboard_keycodes {
#ifdef VIA_ENABLE #ifdef VIA_ENABLE
LOCK_GUI = USER00, LOCK_GUI = USER00,
TOG_MACOS_KEYMAP, TOG_MACOS_KEYMAP,
KC_MISSION_CONTROL,
KC_LAUNCHPAD,
NEW_SAFE_RANGE = SAFE_RANGE // Important! NEW_SAFE_RANGE = SAFE_RANGE // Important!
#else #else
LOCK_GUI = SAFE_RANGE, LOCK_GUI = SAFE_RANGE,
TOG_MACOS_KEYMAP, TOG_MACOS_KEYMAP,
KC_MISSION_CONTROL,
KC_LAUNCHPAD,
NEW_SAFE_RANGE // Important! NEW_SAFE_RANGE // Important!
#endif #endif
}; };
#define KC_LG LOCK_GUI #define KC_LG LOCK_GUI
#define KC_MACOS TOG_MACOS_KEYMAP #define KC_MACOS TOG_MACOS_KEYMAP
#define KC_MCTL KC_MISSION_CONTROL
#define KC_LPAD KC_LAUNCHPAD

View File

@ -57,20 +57,6 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
process_magic(CG_TOGG, record); process_magic(CG_TOGG, record);
} }
return false; return false;
case KC_MCTL:
if (record->event.pressed) {
host_consumer_send(0x29F);
} else {
host_consumer_send(0);
}
return false;
case KC_LPAD:
if (record->event.pressed) {
host_consumer_send(0x2A0);
} else {
host_consumer_send(0);
}
return false;
default: default:
return true; return true;
} }

View File

@ -62,19 +62,13 @@ enum keyboard_keycodes {
#ifdef VIA_ENABLE #ifdef VIA_ENABLE
LOCK_GUI = USER00, LOCK_GUI = USER00,
TOG_MACOS_KEYMAP, TOG_MACOS_KEYMAP,
KC_MISSION_CONTROL,
KC_LAUNCHPAD,
NEW_SAFE_RANGE = SAFE_RANGE // Important! NEW_SAFE_RANGE = SAFE_RANGE // Important!
#else #else
LOCK_GUI = SAFE_RANGE, LOCK_GUI = SAFE_RANGE,
TOG_MACOS_KEYMAP, TOG_MACOS_KEYMAP,
KC_MISSION_CONTROL,
KC_LAUNCHPAD,
NEW_SAFE_RANGE // Important! NEW_SAFE_RANGE // Important!
#endif #endif
}; };
#define KC_LG LOCK_GUI #define KC_LG LOCK_GUI
#define KC_MACOS TOG_MACOS_KEYMAP #define KC_MACOS TOG_MACOS_KEYMAP
#define KC_MCTL KC_MISSION_CONTROL
#define KC_LPAD KC_LAUNCHPAD

View File

@ -52,20 +52,6 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
process_magic(CG_TOGG, record); process_magic(CG_TOGG, record);
} }
return false; return false;
case KC_MCTL:
if (record->event.pressed) {
host_consumer_send(0x29F);
} else {
host_consumer_send(0);
}
return false;
case KC_LPAD:
if (record->event.pressed) {
host_consumer_send(0x2A0);
} else {
host_consumer_send(0);
}
return false;
default: default:
return true; return true;
} }

View File

@ -38,19 +38,13 @@ enum keyboard_keycodes {
#ifdef VIA_ENABLE #ifdef VIA_ENABLE
LOCK_GUI = USER00, LOCK_GUI = USER00,
TOG_MACOS_KEYMAP, TOG_MACOS_KEYMAP,
KC_MISSION_CONTROL,
KC_LAUNCHPAD,
NEW_SAFE_RANGE = SAFE_RANGE // Important! NEW_SAFE_RANGE = SAFE_RANGE // Important!
#else #else
LOCK_GUI = SAFE_RANGE, LOCK_GUI = SAFE_RANGE,
TOG_MACOS_KEYMAP, TOG_MACOS_KEYMAP,
KC_MISSION_CONTROL,
KC_LAUNCHPAD,
NEW_SAFE_RANGE // Important! NEW_SAFE_RANGE // Important!
#endif #endif
}; };
#define KC_LG LOCK_GUI #define KC_LG LOCK_GUI
#define KC_MACOS TOG_MACOS_KEYMAP #define KC_MACOS TOG_MACOS_KEYMAP
#define KC_MCTL KC_MISSION_CONTROL
#define KC_LPAD KC_LAUNCHPAD

View File

@ -281,6 +281,8 @@ enum qk_keycode_defines {
KC_BRIGHTNESS_DOWN = 0x00BE, KC_BRIGHTNESS_DOWN = 0x00BE,
KC_CONTROL_PANEL = 0x00BF, KC_CONTROL_PANEL = 0x00BF,
KC_ASSISTANT = 0x00C0, KC_ASSISTANT = 0x00C0,
KC_MISSION_CONTROL = 0x00C1,
KC_LAUNCHPAD = 0x00C2,
KC_MS_UP = 0x00CD, KC_MS_UP = 0x00CD,
KC_MS_DOWN = 0x00CE, KC_MS_DOWN = 0x00CE,
KC_MS_LEFT = 0x00CF, KC_MS_LEFT = 0x00CF,
@ -835,6 +837,8 @@ enum qk_keycode_defines {
KC_BRID = KC_BRIGHTNESS_DOWN, KC_BRID = KC_BRIGHTNESS_DOWN,
KC_CPNL = KC_CONTROL_PANEL, KC_CPNL = KC_CONTROL_PANEL,
KC_ASST = KC_ASSISTANT, KC_ASST = KC_ASSISTANT,
KC_MCTL = KC_MISSION_CONTROL,
KC_LPAD = KC_LAUNCHPAD,
KC_MS_U = KC_MS_UP, KC_MS_U = KC_MS_UP,
KC_MS_D = KC_MS_DOWN, KC_MS_D = KC_MS_DOWN,
KC_MS_L = KC_MS_LEFT, KC_MS_L = KC_MS_LEFT,
@ -1332,7 +1336,7 @@ enum qk_keycode_defines {
#define IS_INTERNAL_KEYCODE(code) ((code) >= KC_NO && (code) <= KC_TRANSPARENT) #define IS_INTERNAL_KEYCODE(code) ((code) >= KC_NO && (code) <= KC_TRANSPARENT)
#define IS_BASIC_KEYCODE(code) ((code) >= KC_A && (code) <= KC_EXSEL) #define IS_BASIC_KEYCODE(code) ((code) >= KC_A && (code) <= KC_EXSEL)
#define IS_SYSTEM_KEYCODE(code) ((code) >= KC_SYSTEM_POWER && (code) <= KC_SYSTEM_WAKE) #define IS_SYSTEM_KEYCODE(code) ((code) >= KC_SYSTEM_POWER && (code) <= KC_SYSTEM_WAKE)
#define IS_CONSUMER_KEYCODE(code) ((code) >= KC_AUDIO_MUTE && (code) <= KC_ASSISTANT) #define IS_CONSUMER_KEYCODE(code) ((code) >= KC_AUDIO_MUTE && (code) <= KC_LAUNCHPAD)
#define IS_MOUSE_KEYCODE(code) ((code) >= KC_MS_UP && (code) <= KC_MS_ACCEL2) #define IS_MOUSE_KEYCODE(code) ((code) >= KC_MS_UP && (code) <= KC_MS_ACCEL2)
#define IS_MODIFIER_KEYCODE(code) ((code) >= KC_LEFT_CTRL && (code) <= KC_RIGHT_GUI) #define IS_MODIFIER_KEYCODE(code) ((code) >= KC_LEFT_CTRL && (code) <= KC_RIGHT_GUI)
#define IS_SWAP_HANDS_KEYCODE(code) ((code) >= QK_SWAP_HANDS_TOGGLE && (code) <= QK_SWAP_HANDS_ONE_SHOT) #define IS_SWAP_HANDS_KEYCODE(code) ((code) >= QK_SWAP_HANDS_TOGGLE && (code) <= QK_SWAP_HANDS_ONE_SHOT)

View File

@ -223,6 +223,8 @@ std::map<uint16_t, std::string> KEYCODE_ID_TABLE = {
{KC_BRIGHTNESS_DOWN, "KC_BRIGHTNESS_DOWN"}, {KC_BRIGHTNESS_DOWN, "KC_BRIGHTNESS_DOWN"},
{KC_CONTROL_PANEL, "KC_CONTROL_PANEL"}, {KC_CONTROL_PANEL, "KC_CONTROL_PANEL"},
{KC_ASSISTANT, "KC_ASSISTANT"}, {KC_ASSISTANT, "KC_ASSISTANT"},
{KC_MISSION_CONTROL, "KC_MISSION_CONTROL"},
{KC_LAUNCHPAD, "KC_LAUNCHPAD"},
{KC_MS_UP, "KC_MS_UP"}, {KC_MS_UP, "KC_MS_UP"},
{KC_MS_DOWN, "KC_MS_DOWN"}, {KC_MS_DOWN, "KC_MS_DOWN"},
{KC_MS_LEFT, "KC_MS_LEFT"}, {KC_MS_LEFT, "KC_MS_LEFT"},

View File

@ -103,7 +103,9 @@ enum consumer_usages {
AC_FORWARD = 0x225, AC_FORWARD = 0x225,
AC_STOP = 0x226, AC_STOP = 0x226,
AC_REFRESH = 0x227, AC_REFRESH = 0x227,
AC_BOOKMARKS = 0x22A AC_BOOKMARKS = 0x22A,
AC_MISSION_CONTROL = 0x29F,
AC_LAUNCHPAD = 0x2A0
}; };
/* Generic Desktop Page (0x01) /* Generic Desktop Page (0x01)
@ -318,6 +320,10 @@ static inline uint16_t KEYCODE2CONSUMER(uint8_t key) {
return BRIGHTNESS_DOWN; return BRIGHTNESS_DOWN;
case KC_WWW_FAVORITES: case KC_WWW_FAVORITES:
return AC_BOOKMARKS; return AC_BOOKMARKS;
case KC_MISSION_CONTROL:
return AC_MISSION_CONTROL;
case KC_LAUNCHPAD:
return AC_LAUNCHPAD;
default: default:
return 0; return 0;
} }