diff --git a/keyboards/yushakobo/helix_type_r/config.h b/keyboards/yushakobo/helix_type_r/config.h index ef74db6466b..1498bffc2ae 100644 --- a/keyboards/yushakobo/helix_type_r/config.h +++ b/keyboards/yushakobo/helix_type_r/config.h @@ -49,6 +49,12 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW +/* Split hand configration */ +#define SPLIT_HAND_MATRIX_GRID D7,B2 + +/* Dip switch on matrix grid */ +#define DIP_SWITCH_MATRIX_GRID { {0,6}, {1,6}, {5,6}, {6,6} } + /* * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. */ diff --git a/keyboards/yushakobo/helix_type_r/keymaps/default/keymap.c b/keyboards/yushakobo/helix_type_r/keymaps/default/keymap.c index 4ba8c7cd142..c00d5e488db 100644 --- a/keyboards/yushakobo/helix_type_r/keymaps/default/keymap.c +++ b/keyboards/yushakobo/helix_type_r/keymaps/default/keymap.c @@ -141,6 +141,30 @@ void encoder_update_user(uint8_t index, bool clockwise) { } } +void dip_switch_update_user(uint8_t index, bool active) { + switch (index) { + case 0: + if(active) { // Left no.1 + ; + } else { } + break; + case 1: + if(active) { // Left no.2 + ; + } else { } + break; + case 2: + if(active) { // Right no.2 + ; + } else { } + break; + case 3: + if (active) { // Right no.1 + ; + } else { } + break; + } +} layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); diff --git a/keyboards/yushakobo/helix_type_r/keymaps/default4/keymap.c b/keyboards/yushakobo/helix_type_r/keymaps/default4/keymap.c index 4bc69f9beda..d49c8f42b6a 100644 --- a/keyboards/yushakobo/helix_type_r/keymaps/default4/keymap.c +++ b/keyboards/yushakobo/helix_type_r/keymaps/default4/keymap.c @@ -131,6 +131,30 @@ void encoder_update_user(uint8_t index, bool clockwise) { } } +void dip_switch_update_user(uint8_t index, bool active) { + switch (index) { + case 0: + if(active) { // Left no.1 + ; + } else { } + break; + case 1: + if(active) { // Left no.2 + ; + } else { } + break; + case 2: + if(active) { // Right no.2 + ; + } else { } + break; + case 3: + if (active) { // Right no.1 + ; + } else { } + break; + } +} layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); diff --git a/keyboards/yushakobo/helix_type_r/rules.mk b/keyboards/yushakobo/helix_type_r/rules.mk index b71130f5b8c..c19de2ad082 100644 --- a/keyboards/yushakobo/helix_type_r/rules.mk +++ b/keyboards/yushakobo/helix_type_r/rules.mk @@ -35,4 +35,5 @@ SPLIT_KEYBOARD = yes #RGB_MATRIX_ENABLE = WS2812 OLED_DRIVER_ENABLE = yes ENCODER_ENABLE = yes +DIP_SWITCH_ENABLE = yes LINK_TIME_OPTIMIZATION_ENABLE = yes