diff options
Diffstat (limited to 'keyboards/keebio/iris')
-rw-r--r-- | keyboards/keebio/iris/keymaps/default/keymap.c | 2 | ||||
-rw-r--r-- | keyboards/keebio/iris/keymaps/via/keymap.c | 18 | ||||
-rw-r--r-- | keyboards/keebio/iris/rev3/rev3.c | 18 | ||||
-rw-r--r-- | keyboards/keebio/iris/rev4/rev4.c | 18 | ||||
-rw-r--r-- | keyboards/keebio/iris/rev5/rev5.c | 18 | ||||
-rw-r--r-- | keyboards/keebio/iris/rev6/config.h | 8 | ||||
-rw-r--r-- | keyboards/keebio/iris/rev6/rev6.c | 18 |
7 files changed, 77 insertions, 23 deletions
diff --git a/keyboards/keebio/iris/keymaps/default/keymap.c b/keyboards/keebio/iris/keymaps/default/keymap.c index e3cd53269..169e5b50c 100644 --- a/keyboards/keebio/iris/keymaps/default/keymap.c +++ b/keyboards/keebio/iris/keymaps/default/keymap.c | |||
@@ -127,5 +127,5 @@ bool encoder_update_user(uint8_t index, bool clockwise) { | |||
127 | tap_code(KC_PGUP); | 127 | tap_code(KC_PGUP); |
128 | } | 128 | } |
129 | } | 129 | } |
130 | return true; | 130 | return false; |
131 | } | 131 | } |
diff --git a/keyboards/keebio/iris/keymaps/via/keymap.c b/keyboards/keebio/iris/keymaps/via/keymap.c index f6183f1f7..0a71bad92 100644 --- a/keyboards/keebio/iris/keymaps/via/keymap.c +++ b/keyboards/keebio/iris/keymaps/via/keymap.c | |||
@@ -65,21 +65,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
65 | // └────────┴────────┴────────┘ └────────┴────────┴────────┘ | 65 | // └────────┴────────┴────────┘ └────────┴────────┴────────┘ |
66 | ) | 66 | ) |
67 | }; | 67 | }; |
68 | |||
69 | bool encoder_update_user(uint8_t index, bool clockwise) { | ||
70 | if (index == 0) { | ||
71 | if (clockwise) { | ||
72 | tap_code(KC_VOLU); | ||
73 | } else { | ||
74 | tap_code(KC_VOLD); | ||
75 | } | ||
76 | } | ||
77 | else if (index == 1) { | ||
78 | if (clockwise) { | ||
79 | tap_code(KC_PGDN); | ||
80 | } else { | ||
81 | tap_code(KC_PGUP); | ||
82 | } | ||
83 | } | ||
84 | return true; | ||
85 | } | ||
diff --git a/keyboards/keebio/iris/rev3/rev3.c b/keyboards/keebio/iris/rev3/rev3.c index b97b097b7..e874b9bea 100644 --- a/keyboards/keebio/iris/rev3/rev3.c +++ b/keyboards/keebio/iris/rev3/rev3.c | |||
@@ -35,3 +35,21 @@ void eeconfig_init_kb(void) { | |||
35 | eeconfig_update_kb(0); | 35 | eeconfig_update_kb(0); |
36 | eeconfig_init_user(); | 36 | eeconfig_init_user(); |
37 | } | 37 | } |
38 | |||
39 | bool encoder_update_kb(uint8_t index, bool clockwise) { | ||
40 | if (!encoder_update_user(index, clockwise)) { return false; } | ||
41 | if (index == 0) { | ||
42 | if (clockwise) { | ||
43 | tap_code(KC_VOLU); | ||
44 | } else { | ||
45 | tap_code(KC_VOLD); | ||
46 | } | ||
47 | } else if (index == 1) { | ||
48 | if (clockwise) { | ||
49 | tap_code(KC_PGDN); | ||
50 | } else { | ||
51 | tap_code(KC_PGUP); | ||
52 | } | ||
53 | } | ||
54 | return false; | ||
55 | } | ||
diff --git a/keyboards/keebio/iris/rev4/rev4.c b/keyboards/keebio/iris/rev4/rev4.c index de2ba26db..36ef461cd 100644 --- a/keyboards/keebio/iris/rev4/rev4.c +++ b/keyboards/keebio/iris/rev4/rev4.c | |||
@@ -16,3 +16,21 @@ void eeconfig_init_kb(void) { | |||
16 | eeconfig_update_kb(0); | 16 | eeconfig_update_kb(0); |
17 | eeconfig_init_user(); | 17 | eeconfig_init_user(); |
18 | } | 18 | } |
19 | |||
20 | bool encoder_update_kb(uint8_t index, bool clockwise) { | ||
21 | if (!encoder_update_user(index, clockwise)) { return false; } | ||
22 | if (index == 0) { | ||
23 | if (clockwise) { | ||
24 | tap_code(KC_VOLU); | ||
25 | } else { | ||
26 | tap_code(KC_VOLD); | ||
27 | } | ||
28 | } else if (index == 1) { | ||
29 | if (clockwise) { | ||
30 | tap_code(KC_PGDN); | ||
31 | } else { | ||
32 | tap_code(KC_PGUP); | ||
33 | } | ||
34 | } | ||
35 | return false; | ||
36 | } | ||
diff --git a/keyboards/keebio/iris/rev5/rev5.c b/keyboards/keebio/iris/rev5/rev5.c index a4191719c..2a89c6923 100644 --- a/keyboards/keebio/iris/rev5/rev5.c +++ b/keyboards/keebio/iris/rev5/rev5.c | |||
@@ -12,3 +12,21 @@ You should have received a copy of the GNU General Public License | |||
12 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 12 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
13 | */ | 13 | */ |
14 | #include "rev5.h" | 14 | #include "rev5.h" |
15 | |||
16 | bool encoder_update_kb(uint8_t index, bool clockwise) { | ||
17 | if (!encoder_update_user(index, clockwise)) { return false; } | ||
18 | if (index == 0) { | ||
19 | if (clockwise) { | ||
20 | tap_code(KC_VOLU); | ||
21 | } else { | ||
22 | tap_code(KC_VOLD); | ||
23 | } | ||
24 | } else if (index == 1) { | ||
25 | if (clockwise) { | ||
26 | tap_code(KC_PGDN); | ||
27 | } else { | ||
28 | tap_code(KC_PGUP); | ||
29 | } | ||
30 | } | ||
31 | return false; | ||
32 | } | ||
diff --git a/keyboards/keebio/iris/rev6/config.h b/keyboards/keebio/iris/rev6/config.h index 386416f11..e26dc5fa5 100644 --- a/keyboards/keebio/iris/rev6/config.h +++ b/keyboards/keebio/iris/rev6/config.h | |||
@@ -36,10 +36,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
36 | #define MATRIX_COL_PINS_RIGHT { D4, D6, D7, C7, F1, F4 } | 36 | #define MATRIX_COL_PINS_RIGHT { D4, D6, D7, C7, F1, F4 } |
37 | #define SPLIT_HAND_PIN D5 | 37 | #define SPLIT_HAND_PIN D5 |
38 | 38 | ||
39 | #define ENCODERS_PAD_A { B2 } | 39 | #define ENCODERS_PAD_A { B3 } |
40 | #define ENCODERS_PAD_B { B3 } | 40 | #define ENCODERS_PAD_B { B2 } |
41 | #define ENCODERS_PAD_A_RIGHT { B2 } | 41 | #define ENCODERS_PAD_A_RIGHT { B3 } |
42 | #define ENCODERS_PAD_B_RIGHT { B3 } | 42 | #define ENCODERS_PAD_B_RIGHT { B2 } |
43 | 43 | ||
44 | /* COL2ROW or ROW2COL */ | 44 | /* COL2ROW or ROW2COL */ |
45 | #define DIODE_DIRECTION COL2ROW | 45 | #define DIODE_DIRECTION COL2ROW |
diff --git a/keyboards/keebio/iris/rev6/rev6.c b/keyboards/keebio/iris/rev6/rev6.c index ff9f9d25a..152df0b2f 100644 --- a/keyboards/keebio/iris/rev6/rev6.c +++ b/keyboards/keebio/iris/rev6/rev6.c | |||
@@ -63,3 +63,21 @@ led_config_t g_led_config = { { | |||
63 | 63 | ||
64 | } }; | 64 | } }; |
65 | #endif | 65 | #endif |
66 | |||
67 | bool encoder_update_kb(uint8_t index, bool clockwise) { | ||
68 | if (!encoder_update_user(index, clockwise)) { return false; } | ||
69 | if (index == 0) { | ||
70 | if (clockwise) { | ||
71 | tap_code(KC_VOLU); | ||
72 | } else { | ||
73 | tap_code(KC_VOLD); | ||
74 | } | ||
75 | } else if (index == 1) { | ||
76 | if (clockwise) { | ||
77 | tap_code(KC_PGDN); | ||
78 | } else { | ||
79 | tap_code(KC_PGUP); | ||
80 | } | ||
81 | } | ||
82 | return false; | ||
83 | } | ||