diff options
Diffstat (limited to 'keyboards/keebio/kbo5000/keymaps/iso/keymap.c')
| -rw-r--r-- | keyboards/keebio/kbo5000/keymaps/iso/keymap.c | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/keyboards/keebio/kbo5000/keymaps/iso/keymap.c b/keyboards/keebio/kbo5000/keymaps/iso/keymap.c new file mode 100644 index 000000000..e2c334672 --- /dev/null +++ b/keyboards/keebio/kbo5000/keymaps/iso/keymap.c | |||
| @@ -0,0 +1,58 @@ | |||
| 1 | #include QMK_KEYBOARD_H | ||
| 2 | |||
| 3 | enum encoder_names { | ||
| 4 | LEFT_HALF_ENC = 0, | ||
| 5 | RIGHT_HALF_ENC1 = 2, | ||
| 6 | RIGHT_HALF_ENC2, | ||
| 7 | }; | ||
| 8 | |||
| 9 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 10 | [0] = LAYOUT_iso( | ||
| 11 | KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, | ||
| 12 | KC_F13, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_DEL, KC_BSPC, KC_INS, KC_PGUP, | ||
| 13 | KC_F14, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, KC_PGDN, | ||
| 14 | KC_F15, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_HOME, KC_END, | ||
| 15 | KC_F16, KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, | ||
| 16 | KC_F17, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT | ||
| 17 | ), | ||
| 18 | |||
| 19 | [1] = LAYOUT_iso( | ||
| 20 | BL_STEP, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 21 | RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 22 | RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 23 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 24 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 25 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 26 | ), | ||
| 27 | |||
| 28 | [2] = LAYOUT_iso( | ||
| 29 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 30 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 31 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 32 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 33 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 34 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 35 | ) | ||
| 36 | }; | ||
| 37 | |||
| 38 | void encoder_update_user(uint8_t index, bool clockwise) { | ||
| 39 | if (index == LEFT_HALF_ENC) { | ||
| 40 | if (clockwise) { | ||
| 41 | tap_code(KC_PGDN); | ||
| 42 | } else { | ||
| 43 | tap_code(KC_PGUP); | ||
| 44 | } | ||
| 45 | } else if (index == RIGHT_HALF_ENC1) { | ||
| 46 | if (clockwise) { | ||
| 47 | tap_code(KC_VOLU); | ||
| 48 | } else { | ||
| 49 | tap_code(KC_VOLD); | ||
| 50 | } | ||
| 51 | } else if (index == RIGHT_HALF_ENC2) { | ||
| 52 | if (clockwise) { | ||
| 53 | tap_code(KC_DOWN); | ||
| 54 | } else { | ||
| 55 | tap_code(KC_UP); | ||
| 56 | } | ||
| 57 | } | ||
| 58 | } | ||
