diff options
author | William Chang <william@factual.com> | 2019-05-09 21:16:15 -0700 |
---|---|---|
committer | William Chang <william@factual.com> | 2019-05-09 21:16:15 -0700 |
commit | 9ce186860e78d5afe350636cb7445e18c2577f33 (patch) | |
tree | b7f5dded777a950e63c4dd967260744336bfaa6b /keyboards/sol/keymaps/kageurufu/keymap.c | |
parent | 57a6ea11df685d84a1ea07953e88f224ce2b24f7 (diff) | |
parent | 4b2d3288d013b1a71ea25402224c4a8225a099e9 (diff) | |
download | firmware-9ce186860e78d5afe350636cb7445e18c2577f33.tar.gz firmware-9ce186860e78d5afe350636cb7445e18c2577f33.tar.bz2 firmware-9ce186860e78d5afe350636cb7445e18c2577f33.zip |
Merge branch 'qmk-master'
Diffstat (limited to 'keyboards/sol/keymaps/kageurufu/keymap.c')
-rw-r--r-- | keyboards/sol/keymaps/kageurufu/keymap.c | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/keyboards/sol/keymaps/kageurufu/keymap.c b/keyboards/sol/keymaps/kageurufu/keymap.c index 9ea89db05..b587ef2b3 100644 --- a/keyboards/sol/keymaps/kageurufu/keymap.c +++ b/keyboards/sol/keymaps/kageurufu/keymap.c @@ -35,7 +35,7 @@ EXPAND_LAYOUT( \ FN_ESC, _10, _11, _12, _13, _14, RGB_SAI, RGB_VAI, _15, _16, _17, _18, _19, KC_QUOT, \ KC_LSPO, _20, _21, _22, _23, _24, RGB_SAD, RGB_VAD, _25, _26, _27, _28, _29, KC_RSPC, \ KC_LCTL, KC_LGUI, KC_LGUI, KC_LALT, FN, KC_SPC, FN, FN, KC_SPC, KC_MINS, KC_EQL, KC_DOWN, KC_PGUP, KC_PGDN, \ - KC_VOLD, KC_VOLU, KC_SPC, KC_BSPC, KC_ENT, KC_SPC, KC_VOLD, KC_VOLU \ + KC_SPC, KC_BSPC, KC_ENT, KC_SPC \ ) #define BASE_LAYOUT(...) _BASE_LAYOUT(__VA_ARGS__) @@ -65,15 +65,33 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ________________FUNCTION_L3________________, _______, _______, ________________FUNCTION_R3________________, \ ________________FUNCTION_L4________________, _______, _______, ________________FUNCTION_R4________________, \ ________________FUNCTION_L5________________, ADJ, ADJ, ________________FUNCTION_R5________________, \ - KC_VOLD, KC_VOLU, _______, KC_DEL, _______, _______, KC_VOLD, KC_VOLU \ + _______, KC_DEL, _______, _______ \ ), - [_ADJ] = EXPAND_LAYOUT( \ + [_ADJ] = EXPAND_LAYOUT( \ _________________ADJUST_L1_________________, _______, _______, _________________ADJUST_R1_________________, \ _________________ADJUST_L2_________________, _______, _______, _________________ADJUST_R2_________________, \ _________________ADJUST_L3_________________, _______, _______, _________________ADJUST_R3_________________, \ _________________ADJUST_L4_________________, _______, _______, _________________ADJUST_R4_________________, \ _________________ADJUST_L5_________________, _______, _______, _________________ADJUST_R5_________________, \ - KC_VOLD, KC_VOLU, _______, _______, _______, _______, KC_VOLD, KC_VOLU \ + _______, _______, _______, _______ \ ) }; + +#ifdef ENCODER_ENABLE +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } else if (index == 1) { /* Second encoder*/ + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } +} +#endif |