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
commit 0152dd811d
Failed to generate hash of commit
23 changed files with 76 additions and 317 deletions

View file

@ -41,20 +41,6 @@ void housekeeping_task_keychron(void) {
bool process_record_keychron(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
case KC_LOPTN:
case KC_ROPTN:
case KC_LCMMD:

View file

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

View file

@ -22,17 +22,6 @@
// 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_FLXP LGUI(KC_E)
@ -79,24 +68,3 @@ void matrix_init_user(void) {
rgb_matrix_init_user();
#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 {
#ifdef VIA_ENABLE
KC_MISSION_CONTROL = USER00,
KC_LIGHT_TAB_TOGGLE = USER00,
#else
KC_MISSION_CONTROL = SAFE_RANGE,
KC_LIGHT_TAB_TOGGLE = SAFE_RANGE,
#endif
KC_LAUNCHPAD,
KC_LIGHT_TAB_TOGGLE,
KC_LIGHT_ALPHAS_TOGGLE,
KC_FN_LAYER_TRANSPARENT_KEYS_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_LATOG KC_LIGHT_ALPHAS_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) {
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:
if (record->event.pressed) {
user_config.caps_lock_light_tab ^= 1; // bitwise xor to toggle status bit

View file

@ -22,13 +22,6 @@
// 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
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
@ -72,24 +65,3 @@ void matrix_init_user(void) {
rgb_matrix_init_user();
#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 {
#ifdef VIA_ENABLE
KC_MISSION_CONTROL = USER00,
KC_LIGHT_TAB_TOGGLE = USER00,
#else
KC_MISSION_CONTROL = SAFE_RANGE,
KC_LIGHT_TAB_TOGGLE = SAFE_RANGE,
#endif
KC_LAUNCHPAD,
KC_LIGHT_TAB_TOGGLE,
KC_LIGHT_ALPHAS_TOGGLE,
KC_FN_LAYER_TRANSPARENT_KEYS_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_LATOG KC_LIGHT_ALPHAS_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) {
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:
if (record->event.pressed) {
user_config.caps_lock_light_tab ^= 1; // bitwise xor to toggle status bit

View file

@ -20,16 +20,9 @@
# include "rgb_matrix_user.h"
#endif
enum custom_keycodes {
KC_MISSION_CONTROL = SAFE_RANGE,
KC_LAUNCHPAD
};
#define KC_WAVE S(KC_GRV)
#define KC_TASK LGUI(KC_TAB)
#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] = {
[MAC_BASE] = LAYOUT_ansi_67(
@ -73,24 +66,3 @@ void matrix_init_user(void) {
rgb_matrix_init_user();
#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 {
KC_MISSION_CONTROL = USER00,
KC_LAUNCHPAD,
KC_TASK,
KC_TASK = USER00,
KC_FLXP
};