~jojo/kyria-keymap

0930bf2af930a7fc7b8bb9048a8ee86731af5b0d — JoJo 2 months ago 7949e9f
jojo: On clicky, master right & fix encoder media keys w delays
2 files changed, 12 insertions(+), 6 deletions(-)

M config.h
M keymap.c
M config.h => config.h +4 -2
@@ 16,10 16,12 @@

#pragma once

#define MASTER_LEFT
// #define MASTER_RIGHT
//#define MASTER_LEFT
#define MASTER_RIGHT
// #define OLD_ONE false

#define MEDIA_KEY_DELAY 10

#define TAPPING_TERM 350

// The "EC11K Industrial Encoder" needs this to not skip actions.

M keymap.c => keymap.c +8 -4
@@ 49,7 49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
    [WORKGIRL] = LAYOUT(
      KC_TAB,   KC_Q,     KC_D,     KC_R,     KC_W,     KC_B,                                                KC_J,     KC_F,     KC_U,     KC_P,     KC_SCLN,  KC_MINS,
      KC_ESC,   KC_A,     KC_S,     KC_H,     KC_T,     KC_G,                                                KC_Y,     KC_N,     KC_E,     KC_O,     KC_I,     KC_QUOT,
      KC_SUP,   KC_Z,     KC_X,     KC_M,     KC_C,     KC_V,     _______,  TD(DLAYO),   KC_DEL,   KC_BSPC,  KC_K,     KC_L,     KC_COMM,  KC_DOT,   KC_SLSH,  KC_BSLS,
      KC_SUP,   KC_Z,     KC_X,     KC_M,     KC_C,     KC_V,     KC_CAPS,  TD(DLAYO),   KC_DEL,   KC_BSPC,  KC_K,     KC_L,     KC_COMM,  KC_DOT,   KC_SLSH,  KC_BSLS,
                                    KC_PSCR,  C(KC_LALT),KC_LALT, KC_LCTL,  KC_ENT,      KC_SPC,   KC_LSFT,  MO(SYMB), MO(FUNC), KC_MEDIA_PLAY_PAUSE
    ),
    [QWERTY] = LAYOUT(


@@ 86,7 86,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
// #else
//     bool side_clockwise = (index && OLD_ONE) ? !clockwise : clockwise;
// #endif
        FIXME
        !clockwise
#elif VER_BROWN
        FIXME
#elif VER_ROBIN


@@ 101,8 101,12 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
            if (side_clockwise) tap_code16(KC_MEDIA_NEXT_TRACK);
            else                tap_code16(KC_MEDIA_PREV_TRACK);
        } else if (IS_LAYER_ON(SYMB)) {
            if (side_clockwise) tap_code16(LGUI(KC_MEDIA_NEXT_TRACK));
            else                tap_code16(LGUI(KC_MEDIA_PREV_TRACK));
            register_code16(QK_LGUI);
            wait_ms(MEDIA_KEY_DELAY);
            if (side_clockwise) tap_code(KC_MEDIA_NEXT_TRACK);
            else                tap_code(KC_MEDIA_PREV_TRACK);
            wait_ms(MEDIA_KEY_DELAY);
            unregister_code16(QK_LGUI);
        } else {
            if (side_clockwise) tap_code(KC_BRIGHTNESS_UP);
            else                tap_code(KC_BRIGHTNESS_DOWN);