summaryrefslogtreecommitdiff
path: root/keyboards/40percentclub/nano/keymaps/drashna
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2021-07-26 17:59:49 -0700
committerGitHub <noreply@github.com>2021-07-26 17:59:49 -0700
commiteb46c954dcf99d842967cc6095827316ffddd291 (patch)
tree69f0a5ade629b63731c246888c0e067312e0970f /keyboards/40percentclub/nano/keymaps/drashna
parent368efb5d2b834d995ba24cd23349327bab02918b (diff)
downloadqmk_firmware-eb46c954dcf99d842967cc6095827316ffddd291.tar.gz
qmk_firmware-eb46c954dcf99d842967cc6095827316ffddd291.zip
[Keymap] Drashna's Defaults cleanup (#13722)
Diffstat (limited to 'keyboards/40percentclub/nano/keymaps/drashna')
-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 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;
}
}