diff options
Diffstat (limited to 'keyboards/latinpadble/keymaps/default/keymap.c')
-rw-r--r-- | keyboards/latinpadble/keymaps/default/keymap.c | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/keyboards/latinpadble/keymaps/default/keymap.c b/keyboards/latinpadble/keymaps/default/keymap.c index e20568540..7a6e0eda6 100644 --- a/keyboards/latinpadble/keymaps/default/keymap.c +++ b/keyboards/latinpadble/keymaps/default/keymap.c | |||
@@ -1,27 +1,27 @@ | |||
1 | /* Copyright 2021 haierwangwei2005 | 1 | /* Copyright 2021 haierwangwei2005 |
2 | * | 2 | * |
3 | * This program is free software: you can redistribute it and/or modify | 3 | * This program is free software: you can redistribute it and/or modify |
4 | * it under the terms of the GNU General Public License as published by | 4 | * it under the terms of the GNU General Public License as published by |
5 | * the Free Software Foundation, either version 2 of the License, or | 5 | * the Free Software Foundation, either version 2 of the License, or |
6 | * (at your option) any later version. | 6 | * (at your option) any later version. |
7 | * | 7 | * |
8 | * This program is distributed in the hope that it will be useful, | 8 | * This program is distributed in the hope that it will be useful, |
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
11 | * GNU General Public License for more details. | 11 | * GNU General Public License for more details. |
12 | * | 12 | * |
13 | * You should have received a copy of the GNU General Public License | 13 | * You should have received a copy of the GNU General Public License |
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | */ | 15 | */ |
16 | #include QMK_KEYBOARD_H | 16 | #include QMK_KEYBOARD_H |
17 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 17 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
18 | [0] = LAYOUT_pad( | 18 | [0] = LAYOUT_pad( |
19 | KC_PGUP, | 19 | KC_PGUP, |
20 | KC_KP_7, KC_KP_8, KC_KP_9, MO(1), | 20 | KC_KP_7, KC_KP_8, KC_KP_9, MO(1), |
21 | KC_P4, KC_P5, KC_P6, KC_KP_PLUS, | 21 | KC_P4, KC_P5, KC_P6, KC_KP_PLUS, |
22 | KC_P1, KC_P2, KC_P3, KC_KP_MINUS, | 22 | KC_P1, KC_P2, KC_P3, KC_KP_MINUS, |
23 | KC_P0, KC_PDOT,KC_DELETE, KC_KP_ENTER), | 23 | KC_P0, KC_PDOT,KC_DELETE, KC_KP_ENTER), |
24 | [1] = LAYOUT_pad( | 24 | [1] = LAYOUT_pad( |
25 | KC_NUMLOCK, | 25 | KC_NUMLOCK, |
26 | RGB_TOG, RGB_MOD, RGB_M_K, RGB_M_X, | 26 | RGB_TOG, RGB_MOD, RGB_M_K, RGB_M_X, |
27 | RGB_SAI, RGB_SAD, RGB_HUI, RGB_HUD, | 27 | RGB_SAI, RGB_SAD, RGB_HUI, RGB_HUD, |
@@ -38,14 +38,15 @@ static void render_logo(void) { | |||
38 | void oled_task_user(void) { render_logo(); } | 38 | void oled_task_user(void) { render_logo(); } |
39 | #endif | 39 | #endif |
40 | 40 | ||
41 | void encoder_update_user(uint8_t index, bool clockwise) { | 41 | bool encoder_update_user(uint8_t index, bool clockwise) { |
42 | if (index == 0) { /* First encoder */ | 42 | if (index == 0) { /* First encoder */ |
43 | if (clockwise) { | 43 | if (clockwise) { |
44 | tap_code(KC_PGDN); | 44 | tap_code(KC_PGDN); |
45 | } else { | 45 | } else { |
46 | tap_code(KC_PGUP); | 46 | tap_code(KC_PGUP); |
47 | } | 47 | } |
48 | } | 48 | } |
49 | return true; | ||
49 | } | 50 | } |
50 | 51 | ||
51 | 52 | ||