From eb46c954dcf99d842967cc6095827316ffddd291 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 26 Jul 2021 17:59:49 -0700 Subject: [Keymap] Drashna's Defaults cleanup (#13722) --- keyboards/40percentclub/nano/keymaps/drashna/keymap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'keyboards/40percentclub') diff --git a/keyboards/40percentclub/nano/keymaps/drashna/keymap.c b/keyboards/40percentclub/nano/keymaps/drashna/keymap.c index b8947cce78..13f89dd53d 100644 --- a/keyboards/40percentclub/nano/keymaps/drashna/keymap.c +++ b/keyboards/40percentclub/nano/keymaps/drashna/keymap.c @@ -85,15 +85,15 @@ int16_t axisCoordinate(uint8_t pin, uint16_t origin) { int8_t axisToMouseComponent(uint8_t pin, int16_t origin, uint8_t maxSpeed, int8_t polarity) { int coordinate = axisCoordinate(pin, origin); - if (coordinate == 0) { - return 0; - } else { + if (coordinate != 0) { float percent = (float)coordinate / 100; - if (keyboard_report->mods & MOD_BIT(KC_LSFT)) { + if (get_mods() & MOD_BIT(KC_LSFT)) { return percent * precisionSpeed * polarity * (abs(coordinate) / speedRegulator); } else { return percent * maxCursorSpeed * polarity * (abs(coordinate) / speedRegulator); } + } else { + return 0; } } -- cgit v1.2.3