summaryrefslogtreecommitdiff
path: root/keyboards/chromatonemini/keymaps/via/keymap.c
diff options
context:
space:
mode:
author3araht <69518343+3araht@users.noreply.github.com>2022-09-30 15:13:21 +0900
committerGitHub <noreply@github.com>2022-09-30 07:13:21 +0100
commit10005e9f39409986493dc3865cc64734c9db786e (patch)
tree9fa090a172175f3647d33417a01a8e4548dc9a19 /keyboards/chromatonemini/keymaps/via/keymap.c
parente1e86cb1fb97afe3c2d8331dde4e0f1d61d67e37 (diff)
Rotary encoder setting is revised to solve a malfunction. (#18227)
* Rotary encoder setting is revised to solve a mulfunction. UNUSED_PINS deleted. * Encoder map applied. * ENCODER_MAP_ENABLE moved to keymap level. * Settings in rules.mk moved to info.json. * picture sent to imgur. config.h streamlined.
Diffstat (limited to 'keyboards/chromatonemini/keymaps/via/keymap.c')
-rw-r--r--keyboards/chromatonemini/keymaps/via/keymap.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/keyboards/chromatonemini/keymaps/via/keymap.c b/keyboards/chromatonemini/keymaps/via/keymap.c
index 08613515db..b4ea6e30fe 100644
--- a/keyboards/chromatonemini/keymaps/via/keymap.c
+++ b/keyboards/chromatonemini/keymaps/via/keymap.c
@@ -61,7 +61,7 @@ static bool is_trans_mode = false; // By default, shift mode is chosen.
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Base */
[_BASE] = LAYOUT(
- FN_MUTE, MI_SUS, KC_VOLD, KC_VOLU,
+ FN_MUTE, MI_SUS,
MI_BENDU,
SHIFT_L, SHIFT_R, MI_C_2, MI_D_2, MI_E_2, MI_Fs_2, MI_Ab_2, MI_Bb_2, MI_C_3, MI_D_3, MI_E_3, MI_Fs_3, MI_Ab_3, MI_Bb_3, MI_C_4, MI_D_4, MI_E_4, MI_Fs_4, MI_Ab_4, MI_Bb_4, MI_C_5,
MI_BENDD, MI_Db_2, MI_Eb_2, MI_F_2, MI_G_2, MI_A_2, MI_B_2, MI_Db_3, MI_Eb_3, MI_F_3, MI_G_3, MI_A_3, MI_B_3, MI_Db_4, MI_Eb_4, MI_F_4, MI_G_4, MI_A_4, MI_B_4
@@ -69,7 +69,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* TRANS This layer must locate 1 layer below _FN layer. */
[_TRANS] = LAYOUT(
- _______, _______, _______, _______,
+ _______, _______,
_______,
MI_TRNSD, MI_TRNSU, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
@@ -77,20 +77,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* RESERVE */
[_RESERVE] = LAYOUT(
- _______, _______, _______, _______,
+ _______, _______,
_______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
[_FN] = LAYOUT(
- _______, XXXXXXX, RGB_RMOD, RGB_MOD,
+ _______, XXXXXXX,
MI_VELU,
MI_OCTD, MI_OCTU, B_BASE, DF(_RESERVE), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, VERSION, XXXXXXX, XXXXXXX,
MI_VELD, TGLINTR, TGLTRNS, XXXXXXX, XXXXXXX, XXXXXXX, RGB_SAD, RGB_SAI, RGB_HUD, RGB_HUI, RGB_SPD, RGB_SPI, RGB_VAD, RGB_VAI, RGB_RMOD, RGB_MOD, EEP_RST, TGLINDI, RGB_TOG
)
};
+#if defined(ENCODER_MAP_ENABLE)
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
+ [_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
+ [_TRANS] = { ENCODER_CCW_CW(_______, _______) },
+ [_RESERVE] = { ENCODER_CCW_CW(_______, _______) },
+ [_FN] = { ENCODER_CCW_CW(RGB_RMOD, RGB_MOD) },
+};
+#endif
+
// commom codes called from eeconfig_init_user() and keyboard_post_init_user().
void my_init(void){
// Set octave to MI_OCT_1