mirror of
https://github.com/firewalkwithm3/qmk_firmware.git
synced 2024-11-22 19:40:29 +08:00
Encoder map: NUM_DIRECTIONS (#21066)
This commit is contained in:
parent
f98f8eedf0
commit
8c9f54d70b
|
@ -50,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
#if defined(ENCODER_MAP_ENABLE)
|
#if defined(ENCODER_MAP_ENABLE)
|
||||||
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
|
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
|
||||||
[0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
|
[0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
|
||||||
[1] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }
|
[1] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }
|
||||||
};
|
};
|
||||||
|
|
|
@ -40,7 +40,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
#if defined(ENCODER_MAP_ENABLE)
|
#if defined(ENCODER_MAP_ENABLE)
|
||||||
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
|
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
|
||||||
[0] = { ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
|
[0] = { ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
|
||||||
[1] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI), ENCODER_CCW_CW(RGB_SAD, RGB_SAI) },
|
[1] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI), ENCODER_CCW_CW(RGB_SAD, RGB_SAI) },
|
||||||
[2] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI), ENCODER_CCW_CW(RGB_SPD, RGB_SPI) },
|
[2] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI), ENCODER_CCW_CW(RGB_SPD, RGB_SPI) },
|
||||||
|
|
|
@ -14,6 +14,7 @@ You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "encoder.h"
|
||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
@ -48,7 +49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef ENCODER_MAP_ENABLE
|
#ifdef ENCODER_MAP_ENABLE
|
||||||
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
|
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
|
||||||
[0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
|
[0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
|
||||||
[1] = { ENCODER_CCW_CW(RGB_RMOD, RGB_MOD) },
|
[1] = { ENCODER_CCW_CW(RGB_RMOD, RGB_MOD) },
|
||||||
[2] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI) },
|
[2] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI) },
|
||||||
|
|
Loading…
Reference in a new issue