From d99dca4a45616a6ae34830a8c4299eee8dafc23d Mon Sep 17 00:00:00 2001 From: MURAOKA Taro Date: Sat, 23 Mar 2024 12:30:26 +0900 Subject: [PATCH] define constants always remove some `ifdef` switches. --- qmk_firmware/keyboards/keyball/lib/keyball/keyball.c | 3 +-- qmk_firmware/keyboards/keyball/lib/keyball/keyball.h | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/qmk_firmware/keyboards/keyball/lib/keyball/keyball.c b/qmk_firmware/keyboards/keyball/lib/keyball/keyball.c index 312056c51..fabf62ea2 100644 --- a/qmk_firmware/keyboards/keyball/lib/keyball/keyball.c +++ b/qmk_firmware/keyboards/keyball/lib/keyball/keyball.c @@ -28,10 +28,9 @@ along with this program. If not, see . const uint8_t CPI_DEFAULT = KEYBALL_CPI_DEFAULT / 100; const uint8_t CPI_MAX = pmw3360_MAXCPI + 1; const uint8_t SCROLL_DIV_MAX = 7; -#ifdef POINTING_DEVICE_AUTO_MOUSE_ENABLE + const uint16_t AML_TIMEOUT_DEFAULT = 9; const uint16_t AML_TIMEOUT_MAX = 15; -#endif keyball_t keyball = { .this_have_ball = false, diff --git a/qmk_firmware/keyboards/keyball/lib/keyball/keyball.h b/qmk_firmware/keyboards/keyball/lib/keyball/keyball.h index 20ef4dcda..a5f484d9f 100644 --- a/qmk_firmware/keyboards/keyball/lib/keyball/keyball.h +++ b/qmk_firmware/keyboards/keyball/lib/keyball/keyball.h @@ -95,11 +95,11 @@ enum keyball_keycodes { SCRL_DVI = QK_KB_8, // Increment scroll divider SCRL_DVD = QK_KB_9, // Decrement scroll divider -#ifdef POINTING_DEVICE_AUTO_MOUSE_ENABLE + // Auto mouse layer control keycodes. + // Only works when POINTING_DEVICE_AUTO_MOUSE_ENABLE is defined. AML_TO = QK_KB_10, // Toggle automatic mouse layer AML_I50 = QK_KB_11, // Increment automatic mouse layer timeout AML_D50 = QK_KB_12, // Decrement automatic mouse layer timeout -#endif // User customizable 32 keycodes. KEYBALL_SAFE_RANGE = QK_USER_0,