From 87967c8a660961b24c0f4dd7ba5fefd2e5b1ab90 Mon Sep 17 00:00:00 2001 From: richonguzman Date: Tue, 29 Oct 2024 12:45:34 -0300 Subject: [PATCH] trackball center = button --- src/boards_pinout.h | 1 + src/keyboard_utils.cpp | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/boards_pinout.h b/src/boards_pinout.h index 374c282..0daaa4f 100644 --- a/src/boards_pinout.h +++ b/src/boards_pinout.h @@ -158,6 +158,7 @@ #define RADIO_DIO1_PIN 45 #define RADIO_BUSY_PIN 13 #define TrackBallCenter 0 + #define BUTTON_PIN TrackBallCenter #define TrackBallUp 3 // G S1 #define TrackBallDown 15 // G S3 #define TrackBallLeft 1 // G S4 diff --git a/src/keyboard_utils.cpp b/src/keyboard_utils.cpp index 3088e74..a251bef 100644 --- a/src/keyboard_utils.cpp +++ b/src/keyboard_utils.cpp @@ -725,9 +725,7 @@ namespace KEYBOARD_Utils { int ballLeft = digitalRead(TrackBallLeft); int ballRight = digitalRead(TrackBallRight); - if (!digitalRead(TrackBallCenter)) { - processPressedKey(13); - } else if (ballUp != mouseUpState && ballDown == mouseDownState && ballLeft == mouseLeftState && ballRight == mouseRightState) { + if (ballUp != mouseUpState && ballDown == mouseDownState && ballLeft == mouseLeftState && ballRight == mouseRightState) { if (millis() - lastDebounceTime > debounceInterval) { lastDebounceTime = millis(); mouseUpState = ballUp;