diff options
Diffstat (limited to 'data/templates/base/keymaps/default/keymap.c')
-rw-r--r-- | data/templates/base/keymaps/default/keymap.c | 48 |
1 files changed, 4 insertions, 44 deletions
diff --git a/data/templates/base/keymaps/default/keymap.c b/data/templates/base/keymaps/default/keymap.c index d8020ab3e..3fec3d512 100644 --- a/data/templates/base/keymaps/default/keymap.c +++ b/data/templates/base/keymaps/default/keymap.c | |||
@@ -1,18 +1,6 @@ | |||
1 | /* Copyright %YEAR% %YOUR_NAME% | 1 | // Copyright %(YEAR)s %(YOUR_NAME)s (@%(USER_NAME)s) |
2 | * | 2 | // SPDX-License-Identifier: GPL-2.0-or-later |
3 | * This program is free software: you can redistribute it and/or modify | 3 | |
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 | #include QMK_KEYBOARD_H | 4 | #include QMK_KEYBOARD_H |
17 | 5 | ||
18 | // Defines names for use in layer keycodes and the keymap | 6 | // Defines names for use in layer keycodes and the keymap |
@@ -21,12 +9,6 @@ enum layer_names { | |||
21 | _FN | 9 | _FN |
22 | }; | 10 | }; |
23 | 11 | ||
24 | // Defines the keycodes used by our macros in process_record_user | ||
25 | enum custom_keycodes { | ||
26 | QMKBEST = SAFE_RANGE, | ||
27 | QMKURL | ||
28 | }; | ||
29 | |||
30 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 12 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
31 | /* Base */ | 13 | /* Base */ |
32 | [_BASE] = LAYOUT( | 14 | [_BASE] = LAYOUT( |
@@ -34,29 +16,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
34 | KC_TAB, KC_SPC | 16 | KC_TAB, KC_SPC |
35 | ), | 17 | ), |
36 | [_FN] = LAYOUT( | 18 | [_FN] = LAYOUT( |
37 | QMKBEST, QMKURL, _______, | 19 | _______, _______, _______, |
38 | RESET, XXXXXXX | 20 | RESET, XXXXXXX |
39 | ) | 21 | ) |
40 | }; | 22 | }; |
41 | |||
42 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
43 | switch (keycode) { | ||
44 | case QMKBEST: | ||
45 | if (record->event.pressed) { | ||
46 | // when keycode QMKBEST is pressed | ||
47 | SEND_STRING("QMK is the best thing ever!"); | ||
48 | } else { | ||
49 | // when keycode QMKBEST is released | ||
50 | } | ||
51 | break; | ||
52 | case QMKURL: | ||
53 | if (record->event.pressed) { | ||
54 | // when keycode QMKURL is pressed | ||
55 | SEND_STRING("https://qmk.fm/\n"); | ||
56 | } else { | ||
57 | // when keycode QMKURL is released | ||
58 | } | ||
59 | break; | ||
60 | } | ||
61 | return true; | ||
62 | } | ||