diff options
Diffstat (limited to 'users/xulkal/custom_encoder.c')
-rw-r--r-- | users/xulkal/custom_encoder.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/users/xulkal/custom_encoder.c b/users/xulkal/custom_encoder.c new file mode 100644 index 000000000..09f1cda0d --- /dev/null +++ b/users/xulkal/custom_encoder.c | |||
@@ -0,0 +1,13 @@ | |||
1 | #include "custom_encoder.h" | ||
2 | |||
3 | #ifdef ENCODER_ENABLE | ||
4 | const uint16_t PROGMEM encoders[][2] = { | ||
5 | { KC_PGUP, KC_PGDN }, | ||
6 | { KC_DOWN, KC_UP } | ||
7 | } | ||
8 | |||
9 | void encoder_update_user(uint8_t index, bool clockwise) | ||
10 | { | ||
11 | tap_code16(pgm_read_word(&encoders[index][clockwise])); | ||
12 | } | ||
13 | #endif | ||