diff options
| author | Drashna Jaelre <drashna@live.com> | 2021-07-26 17:59:49 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-26 17:59:49 -0700 |
| commit | eb46c954dcf99d842967cc6095827316ffddd291 (patch) | |
| tree | 69f0a5ade629b63731c246888c0e067312e0970f /keyboards/40percentclub | |
| parent | 368efb5d2b834d995ba24cd23349327bab02918b (diff) | |
| download | qmk_firmware-eb46c954dcf99d842967cc6095827316ffddd291.tar.gz qmk_firmware-eb46c954dcf99d842967cc6095827316ffddd291.zip | |
[Keymap] Drashna's Defaults cleanup (#13722)
Diffstat (limited to 'keyboards/40percentclub')
| -rw-r--r-- | keyboards/40percentclub/nano/keymaps/drashna/keymap.c | 8 |
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 | ||
| 86 | int8_t axisToMouseComponent(uint8_t pin, int16_t origin, uint8_t maxSpeed, int8_t polarity) { | 86 | int8_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 | ||
