Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new keyboard "Left Slinger" #24618

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add stick key
  • Loading branch information
takashicompany committed Nov 19, 2024
commit baa99f9ff14201b720c54fc8cb9f403c7509298c
11 changes: 11 additions & 0 deletions keyboards/takashicompany/left_slinger/left_slinger.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
#include "left_slinger.h"
#include "custom_joystick.h"

#if CONSOLE_ENABLE
#include <print.h>
#endif

/////////////////////////////
/// miniZoneの実装 ここから ///
////////////////////////////
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down
4 changes: 3 additions & 1 deletion keyboards/takashicompany/left_slinger/rules.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
POINTING_DEVICE_ENABLE = yes
POINTING_DEVICE_DRIVER = custom
ANALOG_DRIVER_REQUIRED = yes
SRC += custom_joystick.c
SRC += custom_joystick.c

CONSOLE_ENABLE = yes