Skip to content

Commit

Permalink
[Keyboard] add encoder support to PlaidPad default mappings (qmk#9396)
Browse files Browse the repository at this point in the history
* Add flipped and discrete encoder support default mappings

* Fixed typo in readme

* Removed flipped layout, fix config.h encoder pin mapping, update readme

Co-authored-by: matt <[email protected]>
  • Loading branch information
2 people authored and nicocesar committed Aug 12, 2020
1 parent 5cdb7b2 commit 8e7bb04
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
6 changes: 4 additions & 2 deletions keyboards/keycapsss/plaid_pad/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@
#define MATRIX_COL_PINS { B0, D7, D6, D5 }
#define UNUSED_PINS { B3, B4, B5, D4}

#define ENCODERS_PAD_A { D0, B1 }
#define ENCODERS_PAD_B { D1, B2 }
#define ENCODERS_PAD_A { D1, B2 }
#define ENCODERS_PAD_B { D0, B1 }


#define ENCODER_RESOLUTION 4

/* COL2ROW, ROW2COL*/
Expand Down
4 changes: 2 additions & 2 deletions keyboards/keycapsss/plaid_pad/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ void keyboard_post_init_user(void) {
void encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { // First encoder - top left
if (clockwise) {
tap_code(KC_UP);
tap_code(KC_RIGHT);
} else {
tap_code(KC_DOWN);
tap_code(KC_LEFT);
}
} else if (index == 1) { // Second encoder - top right
if (clockwise) {
Expand Down
8 changes: 5 additions & 3 deletions keyboards/keycapsss/plaid_pad/keymaps/default/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@

# Default Plaid-Pad Layout

This is the default layout that comes flashed on every Plaid-Pad.
This is the default layout for the plaid pad.
The upper left (7) and right (/) switch, can be replaced by a rotary encoder.
They do "Up Arrow" (KC_UP) and "Down Arrow" (KC_DOWN).
Encoder with build-in switch are supported.
Encoders with built-in switch are supported and map to the original keys (7) and (/).

The upper left encoder performs a tap on "Right Arrow" (KC_RIGHT) and "Left Arrow" (KC_LEFT) when rotated clockwise and counter-clockwise in the respective direction for each step of the encoder.

The upper right encoder performs a tap on "Up Arrow" (KC_UP) and "Down Arrow" (KC_DOWN) when rotated clockwise and counter-clockwise in the respective direction for each step of the encoder.

0 comments on commit 8e7bb04

Please sign in to comment.