diff --git a/keyboards/keychron/common/factory_test.c b/keyboards/keychron/common/factory_test.c
index 80f43a1619..b19b468ab6 100644
--- a/keyboards/keychron/common/factory_test.c
+++ b/keyboards/keychron/common/factory_test.c
@@ -296,14 +296,6 @@ bool factory_test_task(void) {
return true;
}
-#ifdef KEYCHRON_CALLBACK_ENABLE
-void factory_test_init(void) {
- register_keychron_task(factory_test_task, false);
- register_record_process(process_record_factory_test, false);
- register_led_indicator_task(factory_test_indicator, false);
-}
-#endif
-
void factory_test_send(uint8_t *payload, uint8_t length) {
#ifdef RAW_ENABLE
uint16_t checksum = 0;
diff --git a/keyboards/keychron/common/keychron_task.c b/keyboards/keychron/common/keychron_task.c
index 803f41b564..e8407bf1fe 100644
--- a/keyboards/keychron/common/keychron_task.c
+++ b/keyboards/keychron/common/keychron_task.c
@@ -22,139 +22,18 @@
# include "factory_test.h"
#endif
-#ifdef KEYCHRON_CALLBACK_ENABLE
-
-typedef struct lk_node {
- keychron_cb lk_cb;
- struct lk_node *next;
-} lk_Node;
-
-typedef struct lk_process_node {
- keychron_record_process_cb process_cb;
- struct lk_process_node *next;
-} lk_process_Node;
-
-lk_Node *p;
-lk_Node *lk_task_list = NULL;
-lk_process_Node *p_process;
-lk_process_Node *lk_record_process_list = NULL;
-
-# if defined(LED_MATRIX_ENABLE) || defined(RGB_MATRIX_ENABLE)
-lk_Node *led_indicator_task_list = NULL;
-# endif
-
-void register_keychron_cb(lk_Node **head, keychron_cb cb, bool priority) {
- /* Create task node */
- lk_Node *task = (lk_Node *)malloc(sizeof(lk_Node));
- task->lk_cb = cb;
- task->next = NULL;
-
- /* Add to the list*/
- if (*head) {
- if (priority) {
- task->next = *head;
- *head = task;
- } else {
- p = *head;
- while (p->next)
- p = p->next;
- p->next = task;
- }
- } else {
- *head = task;
- }
-}
-
-void deregister_keychron_cb(lk_Node **head, keychron_cb cb) {
- p = *head;
- while (p) {
- if (p->lk_cb == cb) {
- // lk_Node* temp = p;
- // if
- }
- }
-}
-
-void register_keychron_task(keychron_cb cb, bool priority) {
- register_keychron_cb(&lk_task_list, cb, priority);
-}
-
-void register_led_indicator_task(keychron_cb cb, bool priority) {
- register_keychron_cb(&led_indicator_task_list, cb, priority);
-}
-
-void register_record_process(keychron_record_process_cb cb, bool priority) {
- lk_process_Node *process = (lk_process_Node *)malloc(sizeof(lk_process_Node));
- process->process_cb = cb;
- process->next = NULL;
-
- /* Add to the list*/
- if (lk_record_process_list) {
- if (priority) {
- process->next = lk_record_process_list;
- lk_record_process_list = process;
- } else {
- p_process = lk_record_process_list;
- while (p_process->next)
- p_process = p_process->next;
- p_process->next = process;
- }
- } else {
- lk_record_process_list = process;
- }
-}
-
-inline void keychron_task(void) {
- p = lk_task_list;
- while (p) {
- p->lk_cb();
- p = p->next;
- }
-}
-
-inline bool process_record_keychron(uint16_t keycode, keyrecord_t *record) {
- p_process = lk_record_process_list;
- while (p_process) {
- if (!p_process->process_cb(keycode, record)) {
- return false;
- }
- p_process = p_process->next;
- }
-
- return true;
-}
-
-# if defined(LED_MATRIX_ENABLE) || defined(RGB_MATRIX_ENABLE)
-# if defined(LED_MATRIX_ENABLE)
-inline bool led_matrix_indicators_keychron(void) {
-# else
-inline bool rgb_matrix_indicators_keychron(void) {
-# endif
-
- p = led_indicator_task_list;
- while (p) {
- p->lk_cb();
- p = p->next;
- }
-
- return true;
-}
-# endif
-
-#else
-
__attribute__((weak)) bool process_record_keychron_kb(uint16_t keycode, keyrecord_t *record) {
return true;
}
bool process_record_keychron(uint16_t keycode, keyrecord_t *record) {
-# ifdef LK_WIRELESS_ENABLE
+#ifdef LK_WIRELESS_ENABLE
extern bool process_record_wireless(uint16_t keycode, keyrecord_t * record);
if (!process_record_wireless(keycode, record)) return false;
-# endif
-# ifdef FACTORY_TEST_ENABLE
+#endif
+#ifdef FACTORY_TEST_ENABLE
if (!process_record_factory_test(keycode, record)) return false;
-# endif
+#endif
// extern bool process_record_keychron_kb(uint16_t keycode, keyrecord_t *record);
if (!process_record_keychron_kb(keycode, record)) return false;
@@ -162,49 +41,48 @@ bool process_record_keychron(uint16_t keycode, keyrecord_t *record) {
return true;
}
-# if defined(LED_MATRIX_ENABLE)
+#if defined(LED_MATRIX_ENABLE)
bool led_matrix_indicators_keychron(void) {
-# ifdef LK_WIRELESS_ENABLE
+# ifdef LK_WIRELESS_ENABLE
extern bool led_matrix_indicators_bt(void);
led_matrix_indicators_bt();
-# endif
-# ifdef FACTORY_TEST_ENABLE
+# endif
+# ifdef FACTORY_TEST_ENABLE
factory_test_indicator();
-# endif
+# endif
return true;
}
-# endif
+#endif
-# if defined(RGB_MATRIX_ENABLE)
+#if defined(RGB_MATRIX_ENABLE)
bool rgb_matrix_indicators_keychron(void) {
-# ifdef LK_WIRELESS_ENABLE
+# ifdef LK_WIRELESS_ENABLE
extern bool rgb_matrix_indicators_bt(void);
rgb_matrix_indicators_bt();
-# endif
-# ifdef FACTORY_TEST_ENABLE
+# endif
+# ifdef FACTORY_TEST_ENABLE
factory_test_indicator();
-# endif
+# endif
return true;
}
-# endif
+#endif
__attribute__((weak)) bool keychron_task_kb(void) {
return true;
}
void keychron_task(void) {
-# ifdef LK_WIRELESS_ENABLE
+#ifdef LK_WIRELESS_ENABLE
extern void wireless_tasks(void);
wireless_tasks();
-# endif
-# ifdef FACTORY_TEST_ENABLE
+#endif
+#ifdef FACTORY_TEST_ENABLE
factory_test_task();
-# endif
+#endif
keychron_common_task();
keychron_task_kb();
}
-#endif // #ifdef KEYCHRON_CALLBACK_ENABLE
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
if (!process_record_user(keycode, record)) return false;
diff --git a/keyboards/keychron/common/keychron_task.h b/keyboards/keychron/common/keychron_task.h
index 80940330e2..c96141a32a 100644
--- a/keyboards/keychron/common/keychron_task.h
+++ b/keyboards/keychron/common/keychron_task.h
@@ -13,29 +13,13 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-
+
#pragma once
#include "stdint.h"
#include "action.h"
-#ifdef KEYCHRON_CALLBACK_ENABLE
-typedef bool (*keychron_cb)(void);
-typedef bool (*keychron_record_process_cb)(uint16_t keycode, keyrecord_t *record);
-
-
-bool process_record_keychron(uint16_t keycode, keyrecord_t *record);
-
-void register_keychron_task(keychron_cb cb, bool priority);
-void register_record_process(keychron_record_process_cb cb, bool priority);
-#if defined(LED_MATRIX_ENABLE) || defined(RGB_MATRIX_ENABLE)
-void register_led_indicator_task(keychron_cb cb, bool priority);
-#endif
-
-#else
bool keychron_task_kb(void);
bool process_record_keychron_kb(uint16_t keycode, keyrecord_t *record);
-#endif
void keychron_task(void);
-
diff --git a/keyboards/keychron/common/wireless/indicator.c b/keyboards/keychron/common/wireless/indicator.c
index ab8fee7e80..e085d50e8d 100644
--- a/keyboards/keychron/common/wireless/indicator.c
+++ b/keyboards/keychron/common/wireless/indicator.c
@@ -180,9 +180,6 @@ void indicator_init(void) {
setPinOutput(BAT_LOW_LED_PIN);
writePin(BAT_LOW_LED_PIN, !BAT_LOW_LED_PIN_ON_STATE);
#endif
-#ifdef KEYCHRON_CALLBACK_ENABLE
- register_led_indicator_task(LED_INDICATORS_KB, false);
-#endif
}
#if defined(LED_MATRIX_ENABLE) || defined(RGB_MATRIX_ENABLE)
diff --git a/keyboards/keychron/common/wireless/report_buffer.c b/keyboards/keychron/common/wireless/report_buffer.c
index 2b76546722..317ba8ce1d 100644
--- a/keyboards/keychron/common/wireless/report_buffer.c
+++ b/keyboards/keychron/common/wireless/report_buffer.c
@@ -59,10 +59,6 @@ void report_buffer_init(void) {
report_buffer_queue_tail = 0;
retry = 0;
report_timer_buffer = timer_read32();
-
-#ifdef KEYCHRON_CALLBACK_ENABLE
- register_keychron_task(report_buffer_task, true);
-#endif
}
bool report_buffer_enqueue(report_buffer_t *report) {
diff --git a/keyboards/keychron/common/wireless/wireless.c b/keyboards/keychron/common/wireless/wireless.c
index a6923ab59e..aa9d7a2d1a 100644
--- a/keyboards/keychron/common/wireless/wireless.c
+++ b/keyboards/keychron/common/wireless/wireless.c
@@ -113,10 +113,6 @@ void wireless_init(void) {
nkro.bluetooth = keymap_config.nkro;
# endif
#endif
-#ifdef KEYCHRON_CALLBACK_ENABLE
- register_wt_tasks();
- register_record_process(process_record_wireless, false);
-#endif
}
/*
diff --git a/keyboards/keychron/common/wireless/wireless_main.c b/keyboards/keychron/common/wireless/wireless_main.c
index 98e7b74f17..e37a218a35 100644
--- a/keyboards/keychron/common/wireless/wireless_main.c
+++ b/keyboards/keychron/common/wireless/wireless_main.c
@@ -34,9 +34,3 @@ bool wireless_tasks(void) {
if (get_transport() == TRANSPORT_USB) usb_remote_wakeup();
return true;
}
-
-#ifdef KEYCHRON_CALLBACK_ENABLE
-void register_wt_tasks(void) {
- register_keychron_task(wireless_tasks, true);
-}
-#endif
diff --git a/keyboards/keychron/q1_max/q1_max.c b/keyboards/keychron/q1_max/q1_max.c
index 4427aaa1a3..bf1c53e15a 100644
--- a/keyboards/keychron/q1_max/q1_max.c
+++ b/keyboards/keychron/q1_max/q1_max.c
@@ -27,10 +27,6 @@
# include "battery.h"
#endif
-#ifdef KEYCHRON_CALLBACK_ENABLE
-bool keychron_task_kb(void);
-#endif
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
if (index == 0) {
@@ -55,11 +51,6 @@ void keyboard_post_init_kb(void) {
encoder_cb_init();
#endif
-#ifdef KEYCHRON_CALLBACK_ENABLE
- factory_test_init();
- register_record_process(process_record_keychron_kb, false);
- register_keychron_task(keychron_task_kb, false);
-#endif
keyboard_post_init_user();
}
diff --git a/keyboards/keychron/q60_max/q60_max.c b/keyboards/keychron/q60_max/q60_max.c
index 1001243b93..c19133b683 100644
--- a/keyboards/keychron/q60_max/q60_max.c
+++ b/keyboards/keychron/q60_max/q60_max.c
@@ -27,10 +27,6 @@
# include "battery.h"
#endif
-#ifdef KEYCHRON_CALLBACK_ENABLE
-bool keychron_task_kb(void);
-#endif
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
if (index == 0) {
@@ -55,11 +51,6 @@ void keyboard_post_init_kb(void) {
encoder_cb_init();
#endif
-#ifdef KEYCHRON_CALLBACK_ENABLE
- factory_test_init();
- register_record_process(process_record_keychron_kb, false);
- register_keychron_task(keychron_task_kb, false);
-#endif
keyboard_post_init_user();
}
diff --git a/keyboards/keychron/q65_max/q65_max.c b/keyboards/keychron/q65_max/q65_max.c
index 1001243b93..c19133b683 100644
--- a/keyboards/keychron/q65_max/q65_max.c
+++ b/keyboards/keychron/q65_max/q65_max.c
@@ -27,10 +27,6 @@
# include "battery.h"
#endif
-#ifdef KEYCHRON_CALLBACK_ENABLE
-bool keychron_task_kb(void);
-#endif
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
if (index == 0) {
@@ -55,11 +51,6 @@ void keyboard_post_init_kb(void) {
encoder_cb_init();
#endif
-#ifdef KEYCHRON_CALLBACK_ENABLE
- factory_test_init();
- register_record_process(process_record_keychron_kb, false);
- register_keychron_task(keychron_task_kb, false);
-#endif
keyboard_post_init_user();
}
diff --git a/keyboards/keychron/v2_max/info.json b/keyboards/keychron/v2_max/info.json
index 467fa6cebf..140bd83415 100644
--- a/keyboards/keychron/v2_max/info.json
+++ b/keyboards/keychron/v2_max/info.json
@@ -1,5 +1,5 @@
{
- "keyboard_name": "Keychron Q2 Max",
+ "keyboard_name": "Keychron V2 Max",
"manufacturer": "Keychron",
"url": "https://github.com/Keychron",
"maintainer": "lokher",
diff --git a/keyboards/keychron/v2_max/v2_max.c b/keyboards/keychron/v2_max/v2_max.c
index e619a50def..0f03394494 100644
--- a/keyboards/keychron/v2_max/v2_max.c
+++ b/keyboards/keychron/v2_max/v2_max.c
@@ -68,7 +68,6 @@ bool keychron_task_kb(void) {
#ifdef LK_WIRELESS_ENABLE
writePin(BAT_LOW_LED_PIN, !BAT_LOW_LED_PIN_ON_STATE);
#endif
-
} else {
#ifdef LK_WIRELESS_ENABLE
writePin(BAT_LOW_LED_PIN, BAT_LOW_LED_PIN_ON_STATE);
diff --git a/keyboards/lemokey/common/factory_test.c b/keyboards/lemokey/common/factory_test.c
index e8450777d6..b376165e1c 100644
--- a/keyboards/lemokey/common/factory_test.c
+++ b/keyboards/lemokey/common/factory_test.c
@@ -296,14 +296,6 @@ bool factory_test_task(void) {
return true;
}
-#ifdef LEMOKEY_CALLBACK_ENABLE
-void factory_test_init(void) {
- register_lemokey_task(factory_test_task, false);
- register_record_process(process_record_factory_test, false);
- register_led_indicator_task(factory_test_indicator, false);
-}
-#endif
-
void factory_test_send(uint8_t *payload, uint8_t length) {
#ifdef RAW_ENABLE
uint16_t checksum = 0;
diff --git a/keyboards/lemokey/common/lemokey_task.c b/keyboards/lemokey/common/lemokey_task.c
index e6bad06784..53146b1827 100644
--- a/keyboards/lemokey/common/lemokey_task.c
+++ b/keyboards/lemokey/common/lemokey_task.c
@@ -19,182 +19,57 @@
#include "quantum.h"
#include "lemokey_common.h"
#ifdef FACTORY_TEST_ENABLE
-#include "factory_test.h"
+# include "factory_test.h"
#endif
-#ifdef LEMOKEY_CALLBACK_ENABLE
-
-typedef struct lk_node {
- lemokey_cb lk_cb;
- struct lk_node* next;
-}lk_Node;
-
-typedef struct lk_process_node {
- lemokey_record_process_cb process_cb;
- struct lk_process_node* next;
-}lk_process_Node;
-
-
-lk_Node *p;
-lk_Node *lk_task_list = NULL;
-lk_process_Node *p_process;
-lk_process_Node *lk_record_process_list = NULL;
-
-#if defined(LED_MATRIX_ENABLE) || defined(RGB_MATRIX_ENABLE)
-lk_Node *led_indicator_task_list = NULL;
-#endif
-
-void register_lemokey_cb(lk_Node **head, lemokey_cb cb, bool priority) {
- /* Create task node */
- lk_Node* task = (lk_Node*)malloc(sizeof(lk_Node));
- task->lk_cb = cb;
- task->next = NULL;
-
- /* Add to the list*/
- if (*head) {
- if (priority) {
- task->next = *head;
- *head = task;
- }
- else {
- p = *head;
- while (p->next) p = p->next;
- p->next = task;
- }
- }
- else {
- *head = task;
- }
-}
-
-void deregister_lemokey_cb(lk_Node **head, lemokey_cb cb) {
-
- p = *head;
- while (p) {
- if (p->lk_cb == cb) {
- // lk_Node* temp = p;
- //if
- }
- }
-}
-
-void register_lemokey_task(lemokey_cb cb, bool priority) {
- register_lemokey_cb(&lk_task_list, cb, priority);
-}
-
-void register_led_indicator_task(lemokey_cb cb, bool priority) {
- register_lemokey_cb(&led_indicator_task_list, cb, priority);
-}
-
-void register_record_process(lemokey_record_process_cb cb, bool priority) {
- lk_process_Node* process = (lk_process_Node*)malloc(sizeof(lk_process_Node));
- process->process_cb = cb;
- process->next = NULL;
-
- /* Add to the list*/
- if (lk_record_process_list) {
- if (priority) {
- process->next = lk_record_process_list;
- lk_record_process_list = process;
- }
- else {
- p_process = lk_record_process_list;
- while (p_process->next) p_process = p_process->next;
- p_process->next = process;
- }
- }
- else {
- lk_record_process_list = process;
- }
-}
-
-inline void lemokey_task(void) {
- p = lk_task_list;
- while (p) {
- p->lk_cb();
- p = p->next;
- }
-}
-
-inline bool process_record_lemokey(uint16_t keycode, keyrecord_t *record) {
-
- p_process = lk_record_process_list;
- while (p_process) {
- if (!p_process->process_cb(keycode, record)) {
- return false;
- }
- p_process = p_process->next;
- }
-
+__attribute__((weak)) bool process_record_lemokey_kb(uint16_t keycode, keyrecord_t *record) {
return true;
}
-#if defined(LED_MATRIX_ENABLE) || defined(RGB_MATRIX_ENABLE)
-#if defined(LED_MATRIX_ENABLE)
-inline bool led_matrix_indicators_lemokey(void) {
-#else
-inline bool rgb_matrix_indicators_lemokey(void) {
-#endif
-
- p = led_indicator_task_list;
- while (p) {
- p->lk_cb();
- p = p->next;
- }
-
- return true;
-}
-#endif
-
-#else
-
-__attribute__((weak)) bool process_record_lemokey_kb(uint16_t keycode, keyrecord_t *record) { return true; }
-
bool process_record_lemokey(uint16_t keycode, keyrecord_t *record) {
#ifdef LK_WIRELESS_ENABLE
- extern bool process_record_wireless(uint16_t keycode, keyrecord_t *record);
- if (!process_record_wireless(keycode, record))
- return false;
+ extern bool process_record_wireless(uint16_t keycode, keyrecord_t * record);
+ if (!process_record_wireless(keycode, record)) return false;
#endif
#ifdef FACTORY_TEST_ENABLE
- if (!process_record_factory_test(keycode, record))
- return false;
+ if (!process_record_factory_test(keycode, record)) return false;
#endif
- //extern bool process_record_lemokey_kb(uint16_t keycode, keyrecord_t *record);
+ // extern bool process_record_lemokey_kb(uint16_t keycode, keyrecord_t *record);
- if (!process_record_lemokey_kb(keycode, record))
- return false;
+ if (!process_record_lemokey_kb(keycode, record)) return false;
return true;
}
-#if defined(LED_MATRIX_ENABLE)
+#if defined(LED_MATRIX_ENABLE)
bool led_matrix_indicators_lemokey(void) {
-#ifdef LK_WIRELESS_ENABLE
+# ifdef LK_WIRELESS_ENABLE
extern bool led_matrix_indicators_bt(void);
led_matrix_indicators_bt();
-#endif
-#ifdef FACTORY_TEST_ENABLE
+# endif
+# ifdef FACTORY_TEST_ENABLE
factory_test_indicator();
-#endif
+# endif
return true;
}
#endif
-#if defined(RGB_MATRIX_ENABLE)
+#if defined(RGB_MATRIX_ENABLE)
bool rgb_matrix_indicators_lemokey(void) {
-#ifdef LK_WIRELESS_ENABLE
+# ifdef LK_WIRELESS_ENABLE
extern bool rgb_matrix_indicators_bt(void);
rgb_matrix_indicators_bt();
-#endif
-#ifdef FACTORY_TEST_ENABLE
+# endif
+# ifdef FACTORY_TEST_ENABLE
factory_test_indicator();
-#endif
+# endif
return true;
}
#endif
-__attribute__((weak)) bool lemokey_task_kb(void){ return true; }
+__attribute__((weak)) bool lemokey_task_kb(void) {
+ return true;
+}
void lemokey_task(void) {
#ifdef LK_WIRELESS_ENABLE
@@ -208,22 +83,18 @@ void lemokey_task(void) {
lemokey_task_kb();
}
-#endif // #ifdef LEMOKEY_CALLBACK_ENABLE
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
- if (!process_record_user(keycode, record))
- return false;
-
- if (!process_record_lemokey(keycode, record))
- return false;
+ if (!process_record_user(keycode, record)) return false;
+
+ if (!process_record_lemokey(keycode, record)) return false;
return true;
}
#ifdef RGB_MATRIX_ENABLE
bool rgb_matrix_indicators_kb(void) {
- if (!rgb_matrix_indicators_user())
- return false;
+ if (!rgb_matrix_indicators_user()) return false;
rgb_matrix_indicators_lemokey();
@@ -233,8 +104,7 @@ bool rgb_matrix_indicators_kb(void) {
#ifdef LED_MATRIX_ENABLE
bool led_matrix_indicators_kb(void) {
- if (!led_matrix_indicators_user())
- return false;
+ if (!led_matrix_indicators_user()) return false;
led_matrix_indicators_lemokey();
@@ -245,4 +115,3 @@ bool led_matrix_indicators_kb(void) {
void housekeeping_task_kb(void) {
lemokey_task();
}
-
diff --git a/keyboards/lemokey/common/lemokey_task.h b/keyboards/lemokey/common/lemokey_task.h
index d66bde8caa..9230c5592c 100644
--- a/keyboards/lemokey/common/lemokey_task.h
+++ b/keyboards/lemokey/common/lemokey_task.h
@@ -13,29 +13,12 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-
+
#pragma once
#include "stdint.h"
#include "action.h"
-#ifdef LEMOKEY_CALLBACK_ENABLE
-typedef bool (*lemokey_cb)(void);
-typedef bool (*lemokey_record_process_cb)(uint16_t keycode, keyrecord_t *record);
-
-
-bool process_record_lemokey(uint16_t keycode, keyrecord_t *record);
-
-void register_lemokey_task(lemokey_cb cb, bool priority);
-void register_record_process(lemokey_record_process_cb cb, bool priority);
-#if defined(LED_MATRIX_ENABLE) || defined(RGB_MATRIX_ENABLE)
-void register_led_indicator_task(lemokey_cb cb, bool priority);
-#endif
-
-#else
bool lemokey_task_kb(void);
bool process_record_lemokey_kb(uint16_t keycode, keyrecord_t *record);
-
-#endif
void lemokey_task(void);
-
diff --git a/keyboards/lemokey/common/wireless/indicator.c b/keyboards/lemokey/common/wireless/indicator.c
index 1e3b3f9d4a..b969f80179 100644
--- a/keyboards/lemokey/common/wireless/indicator.c
+++ b/keyboards/lemokey/common/wireless/indicator.c
@@ -180,9 +180,6 @@ void indicator_init(void) {
setPinOutput(BAT_LOW_LED_PIN);
writePin(BAT_LOW_LED_PIN, !BAT_LOW_LED_PIN_ON_STATE);
#endif
-#ifdef LEMOKEY_CALLBACK_ENABLE
- register_led_indicator_task(LED_INDICATORS_KB, false);
-#endif
}
#if defined(LED_MATRIX_ENABLE) || defined(RGB_MATRIX_ENABLE)
diff --git a/keyboards/lemokey/common/wireless/report_buffer.c b/keyboards/lemokey/common/wireless/report_buffer.c
index d8d9417982..317ba8ce1d 100644
--- a/keyboards/lemokey/common/wireless/report_buffer.c
+++ b/keyboards/lemokey/common/wireless/report_buffer.c
@@ -59,10 +59,6 @@ void report_buffer_init(void) {
report_buffer_queue_tail = 0;
retry = 0;
report_timer_buffer = timer_read32();
-
-#ifdef LEMOKEY_CALLBACK_ENABLE
- register_lemokey_task(report_buffer_task, true);
-#endif
}
bool report_buffer_enqueue(report_buffer_t *report) {
diff --git a/keyboards/lemokey/common/wireless/wireless.c b/keyboards/lemokey/common/wireless/wireless.c
index b1fa67ad12..1625e24ede 100644
--- a/keyboards/lemokey/common/wireless/wireless.c
+++ b/keyboards/lemokey/common/wireless/wireless.c
@@ -113,10 +113,6 @@ void wireless_init(void) {
nkro.bluetooth = keymap_config.nkro;
# endif
#endif
-#ifdef LEMOKEY_CALLBACK_ENABLE
- register_wt_tasks();
- register_record_process(process_record_wireless, false);
-#endif
}
/*
diff --git a/keyboards/lemokey/common/wireless/wireless_main.c b/keyboards/lemokey/common/wireless/wireless_main.c
index ece18de901..62cc1e5756 100644
--- a/keyboards/lemokey/common/wireless/wireless_main.c
+++ b/keyboards/lemokey/common/wireless/wireless_main.c
@@ -34,9 +34,3 @@ bool wireless_tasks(void) {
if (get_transport() == TRANSPORT_USB) usb_remote_wakeup();
return true;
}
-
-#ifdef LEMOKEY_CALLBACK_ENABLE
-void register_wt_tasks(void) {
- register_lemokey_task(wireless_tasks, true);
-}
-#endif
diff --git a/keyboards/lemokey/l3/iso/keymaps/default/keymap.c b/keyboards/lemokey/l3/iso/keymaps/default/keymap.c
index 746655e870..55b09836ad 100644
--- a/keyboards/lemokey/l3/iso/keymaps/default/keymap.c
+++ b/keyboards/lemokey/l3/iso/keymaps/default/keymap.c
@@ -1,37 +1,41 @@
/* Copyright 2023 @ Lemokey (https://www.lemokey.com)
*
- * This program is free software : you can redistribute it and /or modify
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program.If not, see < http://www.gnu.org/licenses/>.
+ * along with this program. If not, see .
*/
#include QMK_KEYBOARD_H
-#include "l3.h"
-#include "rgb.h"
+#include "lemokey_common.h"
+
+enum layer_names {
+ BASE = 0,
+ FN,
+};
// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [BASE] = LAYOUT_iso_92(
- KC_MUTE, KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SCRL, KC_PAUS,
+ [BASE] = LAYOUT_iso_tkl(
+ KC_MUTE, KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_LOCK, RGB_MOD,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP,
- MC_0, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_ENT, KC_DEL, KC_END, KC_PGDN,
- MC_1, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS,
+ MC_0, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, KC_END, KC_PGDN,
+ MC_1, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT,
MC_2, KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
- MC_3, KC_LCTL, KC_LWIN, KC_LALT, KC_SPC, KC_RALT, MO(FN), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
- [FN] = LAYOUT_iso_92(
- RGB_TOG, _______, KC_BRID, KC_BRIU, KC_TASK, KC_FLXP, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______,
+ MC_3, KC_LCTL, KC_LWIN, KC_LALT, KC_SPC, KC_RALT, KC_RWIN, MO(FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
+ [FN] = LAYOUT_iso_tkl(
+ _______, _______, KC_BRID, KC_BRIU, KC_TASK, KC_FILE, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, RGB_TOG,
_______, BT_HST1, BT_HST2, BT_HST3, P2P4G, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, RGB_RMOD, RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______,
+ _______, RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, RGB_RMOD, RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, BAT_LVL, NK_TOGG, _______, _______, _______, _______, _______, _______,
_______, _______, GUI_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______),
};
diff --git a/keyboards/lemokey/l3/l3.c b/keyboards/lemokey/l3/l3.c
index 9656ad7f6c..5cb7f95fed 100644
--- a/keyboards/lemokey/l3/l3.c
+++ b/keyboards/lemokey/l3/l3.c
@@ -36,10 +36,6 @@ pin_t bt_led_pins[] = BT_HOST_LED_PIN_LIST;
pin_t p24g_led_pins[] = P24G_HOST_LED_PIN_LIST;
#endif
-#ifdef LEMOKEY_CALLBACK_ENABLE
-bool lemokey_task_kb(void);
-#endif
-
bool process_record_lemokey_kb(uint16_t keycode, keyrecord_t *record) {
return true;
}
@@ -60,11 +56,7 @@ void keyboard_post_init_kb(void) {
#ifdef ENCODER_ENABLE
encoder_cb_init();
#endif
-#ifdef LEMOKEY_CALLBACK_ENABLE
- factory_test_init();
- register_record_process(process_record_lemokey_kb, false);
- register_lemokey_task(lemokey_task_kb, false);
-#endif
+
keyboard_post_init_user();
}