diff options
author | 3araht <69518343+3araht@users.noreply.github.com> | 2022-09-30 15:13:21 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-30 07:13:21 +0100 |
commit | 10005e9f39409986493dc3865cc64734c9db786e (patch) | |
tree | 9fa090a172175f3647d33417a01a8e4548dc9a19 /keyboards/chromatonemini/keymaps/via | |
parent | e1e86cb1fb97afe3c2d8331dde4e0f1d61d67e37 (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')
-rw-r--r-- | keyboards/chromatonemini/keymaps/via/config.h | 4 | ||||
-rw-r--r-- | keyboards/chromatonemini/keymaps/via/keymap.c | 17 | ||||
-rw-r--r-- | keyboards/chromatonemini/keymaps/via/rules.mk | 2 |
3 files changed, 15 insertions, 8 deletions
diff --git a/keyboards/chromatonemini/keymaps/via/config.h b/keyboards/chromatonemini/keymaps/via/config.h deleted file mode 100644 index b5ee0ac04b..0000000000 --- a/keyboards/chromatonemini/keymaps/via/config.h +++ /dev/null @@ -1,4 +0,0 @@ -#pragma once - -// How many layers to use with VIA / Remap. -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 // default:4 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 diff --git a/keyboards/chromatonemini/keymaps/via/rules.mk b/keyboards/chromatonemini/keymaps/via/rules.mk index 3de88c90c8..b4d2b42885 100644 --- a/keyboards/chromatonemini/keymaps/via/rules.mk +++ b/keyboards/chromatonemini/keymaps/via/rules.mk @@ -1,3 +1,5 @@ RGB_MATRIX_ENABLE = yes # Use RGB matrix (Don't enable this when RGBLIGHT_ENABLE is used.) RGB_MATRIX_CUSTOM_KB = yes # VIA_ENABLE = yes + +ENCODER_MAP_ENABLE = yes # replacing ENCODERS_CW_KEY method to this on 2022/08/31. |