summaryrefslogtreecommitdiff
path: root/keyboards/keycapsss/plaid_pad/keymaps/default/keymap.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/keycapsss/plaid_pad/keymaps/default/keymap.c')
-rw-r--r--keyboards/keycapsss/plaid_pad/keymaps/default/keymap.c42
1 files changed, 8 insertions, 34 deletions
diff --git a/keyboards/keycapsss/plaid_pad/keymaps/default/keymap.c b/keyboards/keycapsss/plaid_pad/keymaps/default/keymap.c
index 2382185362..789bb7af02 100644
--- a/keyboards/keycapsss/plaid_pad/keymaps/default/keymap.c
+++ b/keyboards/keycapsss/plaid_pad/keymaps/default/keymap.c
@@ -42,9 +42,8 @@ bool oled_task_user(void) {
42#endif 42#endif
43 43
44 44
45#ifdef ENCODER_ENABLE 45#ifdef ENCODER_MAP_ENABLE
46 46
47bool encoder_update_user(uint8_t index, bool clockwise) {
48/* 47/*
49Rev1.1 Rev1 48Rev1.1 Rev1
50,-----------------------, ,-----------------------, 49,-----------------------, ,-----------------------,
@@ -57,37 +56,12 @@ Rev1.1 Rev1
57| | | | E1 | | | | | | 56| | | | E1 | | | | | |
58`-----------------------' `-----------------------' 57`-----------------------' `-----------------------'
59 */ 58 */
60 59const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
61 // First encoder (E1) 60#ifdef KEYBOARD_keycapsss_plaid_pad_rev1
62 if (index == 0) { 61 { ENCODER_CCW_CW(KC_F18, KC_F17), ENCODER_CCW_CW(KC_F20, KC_F19) }
63 if (clockwise) { 62#else
64 tap_code(KC_F17); 63 { ENCODER_CCW_CW(KC_F18, KC_F17), ENCODER_CCW_CW(KC_F20, KC_F19), ENCODER_CCW_CW(KC_F22, KC_F21), ENCODER_CCW_CW(KC_F24, KC_F23) }
65 } else { 64#endif
66 tap_code(KC_F18); 65};
67 }
68 // Second encoder (E2)
69 } else if (index == 1) {
70 if (clockwise) {
71 tap_code(KC_F19);
72 } else {
73 tap_code(KC_F20);
74 }
75 // Third encoder (E3)
76 } else if (index == 2) {
77 if (clockwise) {
78 tap_code(KC_F21);
79 } else {
80 tap_code(KC_F22);
81 }
82 // Forth encoder (E4)
83 } else if (index == 3) {
84 if (clockwise) {
85 tap_code(KC_F23);
86 } else {
87 tap_code(KC_F24);
88 }
89 }
90 return true;
91}
92 66
93#endif 67#endif