diff options
-rw-r--r-- | keyboards/planck/keymaps/default/config.h | 6 | ||||
-rw-r--r-- | keyboards/planck/keymaps/default/keymap.c | 21 |
2 files changed, 16 insertions, 11 deletions
diff --git a/keyboards/planck/keymaps/default/config.h b/keyboards/planck/keymaps/default/config.h index fbd2fdb27..6fa31cc8a 100644 --- a/keyboards/planck/keymaps/default/config.h +++ b/keyboards/planck/keymaps/default/config.h | |||
@@ -1,7 +1,4 @@ | |||
1 | #ifndef CONFIG_USER_H | 1 | #pragma once |
2 | #define CONFIG_USER_H | ||
3 | |||
4 | #include "config_common.h" | ||
5 | 2 | ||
6 | #ifdef AUDIO_ENABLE | 3 | #ifdef AUDIO_ENABLE |
7 | #define STARTUP_SONG SONG(PLANCK_SOUND) | 4 | #define STARTUP_SONG SONG(PLANCK_SOUND) |
@@ -40,4 +37,3 @@ | |||
40 | // Most tactile encoders have detents every 4 stages | 37 | // Most tactile encoders have detents every 4 stages |
41 | #define ENCODER_RESOLUTION 4 | 38 | #define ENCODER_RESOLUTION 4 |
42 | 39 | ||
43 | #endif | ||
diff --git a/keyboards/planck/keymaps/default/keymap.c b/keyboards/planck/keymaps/default/keymap.c index cffa5a5df..0b787cd12 100644 --- a/keyboards/planck/keymaps/default/keymap.c +++ b/keyboards/planck/keymaps/default/keymap.c | |||
@@ -14,8 +14,7 @@ | |||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include "planck.h" | 17 | #include QMK_KEYBOARD_H |
18 | #include "action_layer.h" | ||
19 | #include "muse.h" | 18 | #include "muse.h" |
20 | 19 | ||
21 | extern keymap_config_t keymap_config; | 20 | extern keymap_config_t keymap_config; |
@@ -276,11 +275,21 @@ void encoder_update(bool clockwise) { | |||
276 | } | 275 | } |
277 | } else { | 276 | } else { |
278 | if (clockwise) { | 277 | if (clockwise) { |
279 | register_code(KC_PGDN); | 278 | #ifdef MOUSEKEY_ENABLE |
280 | unregister_code(KC_PGDN); | 279 | register_code(KC_MS_WH_DOWN); |
280 | unregister_code(KC_MS_WH_DOWN); | ||
281 | #else | ||
282 | register_code(KC_PGDN); | ||
283 | unregister_code(KC_PGDN); | ||
284 | #endif | ||
281 | } else { | 285 | } else { |
282 | register_code(KC_PGUP); | 286 | #ifdef MOUSEKEY_ENABLE |
283 | unregister_code(KC_PGUP); | 287 | register_code(KC_MS_WH_UP); |
288 | unregister_code(KC_MS_WH_UP); | ||
289 | #else | ||
290 | register_code(KC_PGUP); | ||
291 | unregister_code(KC_PGUP); | ||
292 | #endif | ||
284 | } | 293 | } |
285 | } | 294 | } |
286 | } | 295 | } |