diff options
Diffstat (limited to 'keyboards/latinpadble/keymaps/via/keymap.c')
-rw-r--r-- | keyboards/latinpadble/keymaps/via/keymap.c | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/keyboards/latinpadble/keymaps/via/keymap.c b/keyboards/latinpadble/keymaps/via/keymap.c index 45ebdb493..0a29b04ab 100644 --- a/keyboards/latinpadble/keymaps/via/keymap.c +++ b/keyboards/latinpadble/keymaps/via/keymap.c | |||
@@ -1,22 +1,22 @@ | |||
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 | /* Keymap _0: (Base Layer) Default Layer | 16 | /* Keymap _0: (Base Layer) Default Layer |
17 | 17 | ||
18 | * .----. | 18 | * .----. |
19 | * |PGUP| | 19 | * |PGUP| |
20 | * |-----------------------. | 20 | * |-----------------------. |
21 | * | 7 | 8 | 9 | MO1 | | 21 | * | 7 | 8 | 9 | MO1 | |
22 | * |-----|-----|-----|-----| | 22 | * |-----|-----|-----|-----| |
@@ -44,13 +44,13 @@ | |||
44 | 44 | ||
45 | #include QMK_KEYBOARD_H | 45 | #include QMK_KEYBOARD_H |
46 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 46 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
47 | [0] = LAYOUT_pad( | 47 | [0] = LAYOUT_pad( |
48 | KC_PGUP, | 48 | KC_PGUP, |
49 | KC_KP_7, KC_KP_8, KC_KP_9, MO(1), | 49 | KC_KP_7, KC_KP_8, KC_KP_9, MO(1), |
50 | KC_P4, KC_P5, KC_P6, KC_KP_PLUS, | 50 | KC_P4, KC_P5, KC_P6, KC_KP_PLUS, |
51 | KC_P1, KC_P2, KC_P3, KC_KP_MINUS, | 51 | KC_P1, KC_P2, KC_P3, KC_KP_MINUS, |
52 | KC_P0, KC_PDOT,KC_DELETE, KC_KP_ENTER), | 52 | KC_P0, KC_PDOT,KC_DELETE, KC_KP_ENTER), |
53 | [1] = LAYOUT_pad( | 53 | [1] = LAYOUT_pad( |
54 | KC_NUMLOCK, | 54 | KC_NUMLOCK, |
55 | RGB_TOG, RGB_MOD, RGB_M_K, RGB_M_X, | 55 | RGB_TOG, RGB_MOD, RGB_M_K, RGB_M_X, |
56 | RGB_SAI, RGB_SAD, RGB_HUI, RGB_HUD, | 56 | RGB_SAI, RGB_SAD, RGB_HUI, RGB_HUD, |
@@ -67,14 +67,15 @@ static void render_logo(void) { | |||
67 | void oled_task_user(void) { render_logo(); } | 67 | void oled_task_user(void) { render_logo(); } |
68 | #endif | 68 | #endif |
69 | 69 | ||
70 | void encoder_update_user(uint8_t index, bool clockwise) { | 70 | bool encoder_update_user(uint8_t index, bool clockwise) { |
71 | if (index == 0) { /* First encoder */ | 71 | if (index == 0) { /* First encoder */ |
72 | if (clockwise) { | 72 | if (clockwise) { |
73 | tap_code(KC_PGDN); | 73 | tap_code(KC_PGDN); |
74 | } else { | 74 | } else { |
75 | tap_code(KC_PGUP); | 75 | tap_code(KC_PGUP); |
76 | } | 76 | } |
77 | } | 77 | } |
78 | return true; | ||
78 | } | 79 | } |
79 | 80 | ||
80 | 81 | ||