From baa99f9ff14201b720c54fc8cb9f403c7509298c Mon Sep 17 00:00:00 2001 From: takashicompany Date: Tue, 19 Nov 2024 09:53:20 +0900 Subject: [PATCH] add stick key --- keyboards/takashicompany/left_slinger/left_slinger.c | 11 +++++++++++ keyboards/takashicompany/left_slinger/rules.mk | 4 +++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/keyboards/takashicompany/left_slinger/left_slinger.c b/keyboards/takashicompany/left_slinger/left_slinger.c index c13a9efbd52..9d37f1670e9 100644 --- a/keyboards/takashicompany/left_slinger/left_slinger.c +++ b/keyboards/takashicompany/left_slinger/left_slinger.c @@ -3,6 +3,10 @@ #include "left_slinger.h" #include "custom_joystick.h" +#if CONSOLE_ENABLE +#include +#endif + ///////////////////////////// /// miniZoneの実装 ここから /// //////////////////////////// @@ -151,6 +155,10 @@ bool is_clickable_mode(void) { bool process_record_kb(uint16_t keycode, keyrecord_t *record) { +#ifdef CONSOLE_ENABLE + uprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); +#endif + if (record->event.key.row == 0 && record->event.key.col == 0) { setting_flags[0] = record->event.pressed; @@ -326,6 +334,9 @@ report_mouse_t pointing_device_task_kb(report_mouse_t mouse_report) { int8_t current_h = 0; int8_t current_v = 0; +#ifdef CONSOLE_ENABLE + uprintf("pointing x: %d y:%d \n", current_x, current_y); +#endif if (current_x != 0 || current_y != 0) { switch (state) { diff --git a/keyboards/takashicompany/left_slinger/rules.mk b/keyboards/takashicompany/left_slinger/rules.mk index ea3cc965c5d..e1158d19669 100644 --- a/keyboards/takashicompany/left_slinger/rules.mk +++ b/keyboards/takashicompany/left_slinger/rules.mk @@ -1,4 +1,6 @@ POINTING_DEVICE_ENABLE = yes POINTING_DEVICE_DRIVER = custom ANALOG_DRIVER_REQUIRED = yes -SRC += custom_joystick.c \ No newline at end of file +SRC += custom_joystick.c + +CONSOLE_ENABLE = yes \ No newline at end of file