forked from qmk/qmk_firmware
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add encoder map to BDN9 VIA keymap (qmk#18388)
- Loading branch information
Showing
2 changed files
with
19 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,45 @@ | ||
#include QMK_KEYBOARD_H | ||
|
||
enum encoder_names { | ||
_LEFT, | ||
_RIGHT, | ||
_MIDDLE, | ||
}; | ||
|
||
enum layer_names { | ||
_ZERO, | ||
_ONE, | ||
_TWO, | ||
_THREE | ||
_MAIN, | ||
_FN1, | ||
_FN2, | ||
_FN3 | ||
}; | ||
|
||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
|
||
[_ZERO] = LAYOUT( | ||
[_MAIN] = LAYOUT( | ||
KC_MPLY, KC_HOME, KC_MUTE, | ||
MO(1), KC_UP, RGB_MOD, | ||
KC_LEFT, KC_DOWN, KC_RGHT | ||
), | ||
|
||
[_ONE] = LAYOUT( | ||
QK_BOOT, BL_STEP, KC_STOP, | ||
[_FN1] = LAYOUT( | ||
QK_BOOT, BL_STEP, KC_STOP, | ||
_______, KC_HOME, RGB_MOD, | ||
KC_MPRV, KC_END , KC_MNXT | ||
), | ||
|
||
[_TWO] = LAYOUT( | ||
[_FN2] = LAYOUT( | ||
_______, _______, _______, | ||
_______, _______, _______, | ||
_______, _______, _______ | ||
), | ||
|
||
[_THREE] = LAYOUT( | ||
[_FN3] = LAYOUT( | ||
_______, _______, _______, | ||
_______, _______, _______, | ||
_______, _______, _______ | ||
) | ||
|
||
}; | ||
|
||
#ifdef ENCODER_MAP_ENABLE | ||
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { | ||
[_MAIN] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_UP, KC_DOWN), ENCODER_CCW_CW(KC_PGUP, KC_PGDN) }, | ||
[_FN1] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI), ENCODER_CCW_CW(RGB_SAD, RGB_SAI), ENCODER_CCW_CW(RGB_VAD, RGB_VAI) }, | ||
[_FN2] = { ENCODER_CCW_CW(RGB_RMOD, RGB_MOD), ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, | ||
[_FN3] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, | ||
}; | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ LTO_ENABLE = yes | |
MOUSEKEY_ENABLE = yes | ||
CONSOLE_ENABLE = yes | ||
COMMAND_ENABLE = no | ||
ENCODER_MAP_ENABLE = yes |