aboutsummaryrefslogtreecommitdiff
path: root/keyboards/lizard_trick/tenkey_plusplus/keymaps/default
diff options
context:
space:
mode:
authorJonathon Carstens <jon.carstens@gmail.com>2020-12-25 06:42:11 -0800
committerGitHub <noreply@github.com>2020-12-26 01:42:11 +1100
commitb7f640ca764b25e09bd0e60841bfd492bede036f (patch)
tree3eabdac78570d1ae5b3614aeea7e1f9b4bcdc18b /keyboards/lizard_trick/tenkey_plusplus/keymaps/default
parent436b5394bb370ca2415b5c4cc10b92b7665e4e78 (diff)
downloadqmk_firmware-b7f640ca764b25e09bd0e60841bfd492bede036f.tar.gz
qmk_firmware-b7f640ca764b25e09bd0e60841bfd492bede036f.zip
Adding new keyboard: Tenkey++ (tenkey_plusplus) (#11197)
Co-authored-by: Ryan <fauxpark@gmail.com>
Diffstat (limited to 'keyboards/lizard_trick/tenkey_plusplus/keymaps/default')
-rw-r--r--keyboards/lizard_trick/tenkey_plusplus/keymaps/default/keymap.c78
1 files changed, 78 insertions, 0 deletions
diff --git a/keyboards/lizard_trick/tenkey_plusplus/keymaps/default/keymap.c b/keyboards/lizard_trick/tenkey_plusplus/keymaps/default/keymap.c
new file mode 100644
index 000000000..f785ed97f
--- /dev/null
+++ b/keyboards/lizard_trick/tenkey_plusplus/keymaps/default/keymap.c
@@ -0,0 +1,78 @@
1/*
2Copyright 2020 Jonathon Carstens jonathon@lizardtrick.com
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#include QMK_KEYBOARD_H
19
20// Defines names for use in layer keycodes and the keymap
21enum layer_names {
22 _BASE,
23};
24
25const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
26 /*
27 *
28 * Left Middle Right
29 * VolDn PgDn Alt+Tab (Rotary Counterclockwise)
30 * VolUp PgUp Tab (Rotary Clockwise)
31 * Mute Play Next (Rotary Click)
32 *
33 *
34 *
35 * ┌───┬───┬───┬───┐
36 * │TG1│ / │ * │ - │
37 * ├───┼───┼───┼───┤
38 * │ 7 │ 8 │ 9 │   │
39 * ├───┼───┼───┤ + │
40 * │ 4 │ 5 │ 6 │   │
41 * ├───┼───┼───┼───┤
42 * │ 1 │ 2 │ 3 │   │
43 * ├───┴───┼───┤Ent│
44 * │   0   │ . │   │
45 * └───────┴───┴───┘
46 */
47
48 [_BASE] = LAYOUT(
49 KC_MUTE, KC_MPLY, KC_MNXT,
50 KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
51 KC_P7, KC_P8, KC_P9, KC_PPLS,
52 KC_P4, KC_P5, KC_P6,
53 KC_P1, KC_P2, KC_P3, KC_PENT,
54 KC_P0, KC_PDOT
55 )
56};
57
58void encoder_update_user(uint8_t index, bool clockwise) {
59 if (index == 0) { /* Left Encoder */
60 if (clockwise) {
61 tap_code16(KC_VOLU);
62 } else {
63 tap_code16(KC_VOLD);
64 }
65 } else if (index == 1) { /* Middle Encoder */
66 if (clockwise) {
67 tap_code16(KC_PGDN);
68 } else {
69 tap_code16(KC_PGUP);
70 }
71 } else if (index == 2) { /* Right Encoder */
72 if (clockwise) {
73 tap_code16(KC_TAB);
74 } else {
75 tap_code16(S(KC_TAB));
76 }
77 }
78}