Skip to content

Commit

Permalink
add encodermap
Browse files Browse the repository at this point in the history
  • Loading branch information
Xelus22 committed Dec 14, 2024
1 parent beab686 commit 6a2187d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
5 changes: 3 additions & 2 deletions keyboards/swagkeys/integral/keyboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
"bootloader": "stm32duino",
"diode_direction": "COL2ROW",
"encoder": {
"pin_a": "B8",
"pin_b": "B9"
"rotary": [
{"pin_a": "B8", "pin_b": "B9"}
]
},
"features": {
"bootmagic": true,
Expand Down
7 changes: 7 additions & 0 deletions keyboards/swagkeys/integral/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)

};

#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_PGDN, KC_PGUP) }
};
#endif
1 change: 1 addition & 0 deletions keyboards/swagkeys/integral/keymaps/default/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ENCODER_MAP_ENABLE = yes

0 comments on commit 6a2187d

Please sign in to comment.