switch to new encoder logic
This commit is contained in:
parent
adf4ea45bc
commit
15a1df6734
5 changed files with 14 additions and 17 deletions
|
|
@ -10,3 +10,5 @@
|
|||
// RGB configuration
|
||||
#define RGBLIGHT_LED_COUNT 23
|
||||
|
||||
#define ENCODER_MAP_KEY_DELAY 10
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,8 @@
|
|||
"mousekey": true,
|
||||
"nkro": true,
|
||||
"rgb_matrix": true,
|
||||
"rgblight": false
|
||||
"rgblight": false,
|
||||
"encoder": true
|
||||
},
|
||||
"dynamic_keymap": { "layer_count": 4 },
|
||||
"bootmagic": {
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@
|
|||
{ k30, k31, k32, k33, k34, k35 } \
|
||||
}
|
||||
|
||||
|
||||
#ifndef MAGIC_ENABLE
|
||||
uint16_t keycode_config(uint16_t keycode) {
|
||||
return keycode;
|
||||
|
|
@ -29,6 +28,15 @@ uint8_t mod_config(uint8_t mod) {
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(ENCODER_MAP_ENABLE)
|
||||
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
|
||||
[0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
|
||||
[1] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
|
||||
[2] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
|
||||
[3] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
|
||||
};
|
||||
#endif
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/*
|
||||
* ╔═══╤═══╤═══╤═══╤═══╤═══╤═══╗
|
||||
|
|
@ -67,3 +75,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
_______, _______, RGB_RMOD, RGB_MOD, _______, _______
|
||||
)
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -15,17 +15,3 @@ led_config_t g_led_config = {
|
|||
}
|
||||
};
|
||||
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
//if (!encoder_update_user(index, clockwise)) {
|
||||
// return false; /* Don't process further events if user function exists and returns false */
|
||||
//}
|
||||
if (index == 0) { /* First encoder */
|
||||
if (clockwise) {
|
||||
tap_code_delay(KC_VOLU, 10);
|
||||
} else {
|
||||
tap_code_delay(KC_VOLD, 10);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,4 +23,3 @@ MUSIC_ENABLE = no
|
|||
SPACE_CADET_ENABLE = no
|
||||
GRAVE_ESC_ENABLE = no
|
||||
AVR_USE_MINIMAL_PRINTF = yes
|
||||
ENCODER_ENABLE = yes
|
||||
|
|
|
|||
Loading…
Reference in a new issue