aboutsummaryrefslogtreecommitdiff
path: root/keyboards/pabile/p18/keymaps/default/keymap.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/pabile/p18/keymaps/default/keymap.c')
-rw-r--r--keyboards/pabile/p18/keymaps/default/keymap.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/keyboards/pabile/p18/keymaps/default/keymap.c b/keyboards/pabile/p18/keymaps/default/keymap.c
index d47982e56..0223a450c 100644
--- a/keyboards/pabile/p18/keymaps/default/keymap.c
+++ b/keyboards/pabile/p18/keymaps/default/keymap.c
@@ -2,26 +2,27 @@
2 2
3const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 3const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
4 [0] = LAYOUT( 4 [0] = LAYOUT(
5 KC_P7, KC_P8, KC_P9, KC_PMNS, 5 KC_P7, KC_P8, KC_P9, KC_PMNS,
6 KC_P4, KC_P5, KC_P6, KC_PPLS, 6 KC_P4, KC_P5, KC_P6, KC_PPLS,
7 KC_MUTE, KC_P1, KC_P2, KC_P3, KC_TAB, 7 KC_MUTE, KC_P1, KC_P2, KC_P3, KC_TAB,
8 KC_ESC, KC_DEL, KC_P0, KC_PDOT, KC_PENT 8 KC_ESC, KC_DEL, KC_P0, KC_PDOT, KC_PENT
9 ) 9 )
10 10
11}; 11};
12 12
13void encoder_update_user(uint8_t index, bool clockwise) { 13bool encoder_update_user(uint8_t index, bool clockwise) {
14 if (index == 0) { /* First encoder below the controller */ 14 if (index == 0) { /* First encoder below the controller */
15 if (clockwise) { 15 if (clockwise) {
16 tap_code(KC_VOLD); /*volume down*/ 16 tap_code(KC_VOLD); /*volume down*/
17 } else { 17 } else {
18 tap_code(KC_VOLU); /*volume up*/ 18 tap_code(KC_VOLU); /*volume up*/
19 } 19 }
20 } else if (index == 1) { /* Second encoder */ 20 } else if (index == 1) { /* Second encoder */
21 if (clockwise) { 21 if (clockwise) {
22 tap_code(KC_WH_U); /*mouse wheel up*/ 22 tap_code(KC_WH_U); /*mouse wheel up*/
23 } else { 23 } else {
24 tap_code(KC_WH_D); /*mouse wheel down*/ 24 tap_code(KC_WH_D); /*mouse wheel down*/
25 } 25 }
26 } 26 }
27 return true;
27} 28}