diff options
author | Danny <nooges@users.noreply.github.com> | 2022-08-11 17:04:00 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-11 14:04:00 -0700 |
commit | fab6c8a0284eb84de0ab5552c5d0fb412043dd45 (patch) | |
tree | c942312d212e79da34b1962fcb6c058977262271 /keyboards/keebio/iris/keymaps/via | |
parent | 55f5406ac76652286121d3c1fa398fa0defb8e0d (diff) |
[Keyboard] Add Iris Rev. 7 (#17967)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Diffstat (limited to 'keyboards/keebio/iris/keymaps/via')
-rw-r--r-- | keyboards/keebio/iris/keymaps/via/keymap.c | 30 | ||||
-rw-r--r-- | keyboards/keebio/iris/keymaps/via/rules.mk | 1 |
2 files changed, 24 insertions, 7 deletions
diff --git a/keyboards/keebio/iris/keymaps/via/keymap.c b/keyboards/keebio/iris/keymaps/via/keymap.c index 1305a3b909..c0916cc213 100644 --- a/keyboards/keebio/iris/keymaps/via/keymap.c +++ b/keyboards/keebio/iris/keymaps/via/keymap.c @@ -1,11 +1,11 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; - -#define _MAIN 0 -#define _FN1 1 -#define _FN2 2 -#define _FN3 3 +enum custom_layer { + _MAIN, + _FN1, + _FN2, + _FN3, +}; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -27,7 +27,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - QK_BOOT, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + QK_BOOT, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ KC_DEL, _______, KC_LEFT, KC_RGHT, KC_UP, KC_LBRC, KC_RBRC, KC_P4, KC_P5, KC_P6, KC_PLUS, KC_PIPE, //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ @@ -65,3 +65,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // └────────┴────────┴────────┘ └────────┴────────┴────────┘ ) }; + +#ifdef ENCODER_MAP_ENABLE +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { +# if defined(KEYBOARD_keebio_iris_rev7) + [_MAIN] = { ENCODER_CCW_CW(KC_VOLU, KC_VOLD), ENCODER_CCW_CW(KC_PGUP, KC_PGDN), ENCODER_CCW_CW(KC_VOLU, KC_VOLD), ENCODER_CCW_CW(KC_PGDN, KC_PGUP) }, + [_FN1] = { ENCODER_CCW_CW(KC_MNXT, KC_MPRV), ENCODER_CCW_CW(KC_HOME, KC_END), ENCODER_CCW_CW(KC_MNXT, KC_MPRV), ENCODER_CCW_CW(KC_HOME, KC_END) }, + [_FN2] = { ENCODER_CCW_CW(RGB_RMOD, RGB_MOD), ENCODER_CCW_CW(RGB_HUD, RGB_HUI), ENCODER_CCW_CW(RGB_SAD, RGB_SAI), ENCODER_CCW_CW(RGB_VAD, RGB_VAI) }, + [_FN3] = { ENCODER_CCW_CW(RGB_SPD, RGB_SPI), ENCODER_CCW_CW(KC_UP, KC_DOWN), ENCODER_CCW_CW(KC_LEFT, KC_RIGHT), ENCODER_CCW_CW(KC_UP, KC_DOWN) }, +# else + [_MAIN] = { ENCODER_CCW_CW(KC_PGUP, KC_PGDN), ENCODER_CCW_CW(KC_VOLU, KC_VOLD) }, + [_FN1] = { ENCODER_CCW_CW(KC_HOME, KC_END), ENCODER_CCW_CW(KC_MNXT, KC_MPRV) }, + [_FN2] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI), ENCODER_CCW_CW(RGB_SAD, RGB_SAI) }, + [_FN3] = { ENCODER_CCW_CW(RGB_SPD, RGB_SPI), ENCODER_CCW_CW(RGB_VAD, RGB_VAI) }, +# endif +}; +#endif diff --git a/keyboards/keebio/iris/keymaps/via/rules.mk b/keyboards/keebio/iris/keymaps/via/rules.mk index 36b7ba9cbc..1189f4ad19 100644 --- a/keyboards/keebio/iris/keymaps/via/rules.mk +++ b/keyboards/keebio/iris/keymaps/via/rules.mk @@ -1,2 +1,3 @@ VIA_ENABLE = yes LTO_ENABLE = yes +ENCODER_MAP_ENABLE = yes |