aboutsummaryrefslogtreecommitdiff
path: root/keyboards/40percentclub
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/40percentclub')
-rw-r--r--keyboards/40percentclub/nano/keymaps/drashna/keymap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/keyboards/40percentclub/nano/keymaps/drashna/keymap.c b/keyboards/40percentclub/nano/keymaps/drashna/keymap.c
index b8947cce7..13f89dd53 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) {
85 85
86int8_t axisToMouseComponent(uint8_t pin, int16_t origin, uint8_t maxSpeed, int8_t polarity) { 86int8_t axisToMouseComponent(uint8_t pin, int16_t origin, uint8_t maxSpeed, int8_t polarity) {
87 int coordinate = axisCoordinate(pin, origin); 87 int coordinate = axisCoordinate(pin, origin);
88 if (coordinate == 0) { 88 if (coordinate != 0) {
89 return 0;
90 } else {
91 float percent = (float)coordinate / 100; 89 float percent = (float)coordinate / 100;
92 if (keyboard_report->mods & MOD_BIT(KC_LSFT)) { 90 if (get_mods() & MOD_BIT(KC_LSFT)) {
93 return percent * precisionSpeed * polarity * (abs(coordinate) / speedRegulator); 91 return percent * precisionSpeed * polarity * (abs(coordinate) / speedRegulator);
94 } else { 92 } else {
95 return percent * maxCursorSpeed * polarity * (abs(coordinate) / speedRegulator); 93 return percent * maxCursorSpeed * polarity * (abs(coordinate) / speedRegulator);
96 } 94 }
95 } else {
96 return 0;
97 } 97 }
98} 98}
99 99