summaryrefslogtreecommitdiffstats
path: root/keyboards/40percentclub/nano
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/40percentclub/nano')
-rw-r--r--keyboards/40percentclub/nano/keymaps/drashna/keymap.c8
-rw-r--r--keyboards/40percentclub/nano/rules.mk2
2 files changed, 5 insertions, 5 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;
}
}
diff --git a/keyboards/40percentclub/nano/rules.mk b/keyboards/40percentclub/nano/rules.mk
index e9658c4b55..105e977f97 100644
--- a/keyboards/40percentclub/nano/rules.mk
+++ b/keyboards/40percentclub/nano/rules.mk
@@ -15,7 +15,7 @@ BOOTLOADER = caterina
# change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically
#
-BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
+BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug