From e94d8e461ba4c8fc2957753e055b687b79db0a43 Mon Sep 17 00:00:00 2001 From: lalalademaxiya1 <2831039915@qq.com> Date: Wed, 8 Mar 2023 10:06:05 +0800 Subject: [PATCH 1/5] Update keychron_common.c --- keyboards/keychron/common/keychron_common.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/keyboards/keychron/common/keychron_common.c b/keyboards/keychron/common/keychron_common.c index a04f3b7264f9..99fa80c6c7bc 100644 --- a/keyboards/keychron/common/keychron_common.c +++ b/keyboards/keychron/common/keychron_common.c @@ -41,6 +41,20 @@ void housekeeping_task_keychron(void) { bool process_record_keychron(uint16_t keycode, keyrecord_t *record) { switch (keycode) { + case QK_KB_0: + if (record->event.pressed) { + register_code(KC_MISSION_CONTROL); + } else { + unregister_code(KC_MISSION_CONTROL); + } + return false; // Skip all further processing of this key + case QK_KB_1: + if (record->event.pressed) { + register_code(KC_LAUNCHPAD); + } else { + unregister_code(KC_LAUNCHPAD); + } + return false; // Skip all further processing of this key case KC_LOPTN: case KC_ROPTN: case KC_LCMMD: From ec43998d3f9f5e8bf5c36e4518f98cef52da5bbc Mon Sep 17 00:00:00 2001 From: lalalademaxiya1 <2831039915@qq.com> Date: Wed, 8 Mar 2023 10:46:09 +0800 Subject: [PATCH 2/5] Update keychron_common.c --- keyboards/keychron/common/keychron_common.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/keyboards/keychron/common/keychron_common.c b/keyboards/keychron/common/keychron_common.c index 99fa80c6c7bc..5aae62e3ef51 100644 --- a/keyboards/keychron/common/keychron_common.c +++ b/keyboards/keychron/common/keychron_common.c @@ -43,18 +43,18 @@ bool process_record_keychron(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case QK_KB_0: if (record->event.pressed) { - register_code(KC_MISSION_CONTROL); + host_consumer_send(AC_MISSION_CONTROL); } else { - unregister_code(KC_MISSION_CONTROL); + host_consumer_send(0x0); } - return false; // Skip all further processing of this key + return false; // Skip all further processing of this key case QK_KB_1: if (record->event.pressed) { - register_code(KC_LAUNCHPAD); + host_consumer_send(AC_LAUNCHPAD); } else { - unregister_code(KC_LAUNCHPAD); + host_consumer_send(0x0); } - return false; // Skip all further processing of this key + return false; // Skip all further processing of this key case KC_LOPTN: case KC_ROPTN: case KC_LCMMD: From 8aec3b3439553c9307ac232dc12a3ba39581c7a3 Mon Sep 17 00:00:00 2001 From: lalalademaxiya1 <2831039915@qq.com> Date: Wed, 8 Mar 2023 10:49:54 +0800 Subject: [PATCH 3/5] Update keychron_common.c --- keyboards/keychron/common/keychron_common.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/keyboards/keychron/common/keychron_common.c b/keyboards/keychron/common/keychron_common.c index 5aae62e3ef51..2ffbc4203836 100644 --- a/keyboards/keychron/common/keychron_common.c +++ b/keyboards/keychron/common/keychron_common.c @@ -42,6 +42,7 @@ void housekeeping_task_keychron(void) { bool process_record_keychron(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case QK_KB_0: + case KC_MCTL: if (record->event.pressed) { host_consumer_send(AC_MISSION_CONTROL); } else { @@ -49,6 +50,7 @@ bool process_record_keychron(uint16_t keycode, keyrecord_t *record) { } return false; // Skip all further processing of this key case QK_KB_1: + case KC_LPAD: if (record->event.pressed) { host_consumer_send(AC_LAUNCHPAD); } else { From f457a8c244c8e20e05deb7cd35e0418e1f485970 Mon Sep 17 00:00:00 2001 From: lalalademaxiya1 <2831039915@qq.com> Date: Wed, 8 Mar 2023 14:18:54 +0800 Subject: [PATCH 4/5] Update keychron_common.c --- keyboards/keychron/common/keychron_common.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/keyboards/keychron/common/keychron_common.c b/keyboards/keychron/common/keychron_common.c index 2ffbc4203836..ed27952b668a 100644 --- a/keyboards/keychron/common/keychron_common.c +++ b/keyboards/keychron/common/keychron_common.c @@ -42,19 +42,17 @@ void housekeeping_task_keychron(void) { bool process_record_keychron(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case QK_KB_0: - case KC_MCTL: if (record->event.pressed) { - host_consumer_send(AC_MISSION_CONTROL); + register_code(KC_MISSION_CONTROL); } else { - host_consumer_send(0x0); + unregister_code(KC_MISSION_CONTROL); } return false; // Skip all further processing of this key case QK_KB_1: - case KC_LPAD: if (record->event.pressed) { - host_consumer_send(AC_LAUNCHPAD); + register_code(KC_LAUNCHPAD); } else { - host_consumer_send(0x0); + register_code(KC_LAUNCHPAD); } return false; // Skip all further processing of this key case KC_LOPTN: From 27fcbbbdc90c2720d6199ed9e12b3b161e346b63 Mon Sep 17 00:00:00 2001 From: lalalademaxiya1 <2831039915@qq.com> Date: Wed, 8 Mar 2023 14:29:49 +0800 Subject: [PATCH 5/5] Update keychron_common.c --- keyboards/keychron/common/keychron_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/keychron/common/keychron_common.c b/keyboards/keychron/common/keychron_common.c index ed27952b668a..a6250966f336 100644 --- a/keyboards/keychron/common/keychron_common.c +++ b/keyboards/keychron/common/keychron_common.c @@ -52,7 +52,7 @@ bool process_record_keychron(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { register_code(KC_LAUNCHPAD); } else { - register_code(KC_LAUNCHPAD); + unregister_code(KC_LAUNCHPAD); } return false; // Skip all further processing of this key case KC_LOPTN: