aboutsummaryrefslogtreecommitdiff
path: root/keyboards/np12/keymaps/via/keymap.c
diff options
context:
space:
mode:
authornut1414 <nut.pannapat@gmail.com>2021-05-13 08:27:16 +0700
committerGitHub <noreply@github.com>2021-05-12 18:27:16 -0700
commit0bada398dfba61c93ee5dbec0aeb92b8af0f45a4 (patch)
treeb4eedf68f5ee95b8667f160801002b736ee390ac /keyboards/np12/keymaps/via/keymap.c
parentfc52b43592abd0f6b82e54474adb59adb893b858 (diff)
downloadqmk_firmware-0bada398dfba61c93ee5dbec0aeb92b8af0f45a4.tar.gz
qmk_firmware-0bada398dfba61c93ee5dbec0aeb92b8af0f45a4.zip
[Keyboard] Add np12 (#12703)
Co-authored-by: Ryan <fauxpark@gmail.com>
Diffstat (limited to 'keyboards/np12/keymaps/via/keymap.c')
-rw-r--r--keyboards/np12/keymaps/via/keymap.c60
1 files changed, 60 insertions, 0 deletions
diff --git a/keyboards/np12/keymaps/via/keymap.c b/keyboards/np12/keymaps/via/keymap.c
new file mode 100644
index 000000000..4a02b1d3a
--- /dev/null
+++ b/keyboards/np12/keymaps/via/keymap.c
@@ -0,0 +1,60 @@
1 /* Copyright 2021 nut1414
2 *
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
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
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/>.
15 */
16
17#include QMK_KEYBOARD_H
18
19const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
20
21
22 [0] = LAYOUT(
23 KC_MPLY,
24 KC_9, KC_6, KC_3, KC_PENT,
25 KC_8, KC_5, KC_2, KC_BSPC,
26 KC_7, KC_4, KC_1, KC_0),
27
28 [1] = LAYOUT(
29 KC_TRNS,
30 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
31 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
32 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
33
34 [2] = LAYOUT(
35 KC_TRNS,
36 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
37 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
38 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
39
40 [3] = LAYOUT(
41 KC_TRNS,
42 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
43 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
44 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
45
46
47
48};
49
50void encoder_update_user(uint8_t index, bool clockwise) {
51 if (index == 0) {
52 if (clockwise) {
53 tap_code(KC_AUDIO_VOL_UP);
54 } else {
55 tap_code(KC_AUDIO_VOL_DOWN);
56 }
57 }
58}
59
60