From 0d80c7bd598c1296d31554fe8c82843415696a18 Mon Sep 17 00:00:00 2001 From: Max Rumpf Date: Tue, 28 Jan 2020 18:08:39 +0100 Subject: [Keyboard] Fix Pulse4k info.json LAYOUT name (#7965) * Fix Pulse4k info.json LAYOUT name * Add missing functions to fix configurator Add empty encoder functions to the keyboard code, as the configurator doesn't see the keymap defined functions at first. To be able to override these functions, they are marked as 'weak'. * Rework encoder functions another time Default implementation is now provided as part of the keyboard, but they can still be overriden within the keymap (template is commented out by default) --- keyboards/maxr1998/pulse4k/pulse4k.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'keyboards/maxr1998/pulse4k/pulse4k.c') diff --git a/keyboards/maxr1998/pulse4k/pulse4k.c b/keyboards/maxr1998/pulse4k/pulse4k.c index ee3d41ccd..2ec9dca73 100644 --- a/keyboards/maxr1998/pulse4k/pulse4k.c +++ b/keyboards/maxr1998/pulse4k/pulse4k.c @@ -59,3 +59,19 @@ void encoder_update_kb(uint8_t index, bool clockwise) { } else encoder_two_update(clockwise); } } + +__attribute__((weak)) void encoder_one_update(bool clockwise) { + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } +} + +__attribute__((weak)) void encoder_two_update(bool clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } +} -- cgit v1.2.3