1 /* Copyright 2015-2017 Jack Humbert
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.
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.
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/>.
18 #include "keymap_german.h"
29 #define KC_I3 LM(_NR, MOD_LALT)
30 #define KC_NR SAFE_RANGE
31 #define KC_N3 (SAFE_RANGE + 1)
33 #define G_1 TO(_GAMING)
34 #define G_0 TG(_GAMING)
36 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
39 * ,-----------------------------------------------------------------------------------.
40 * | Esc | Q | W | E | R | T | Z | U | I | O | P | Bksp |
41 * |------+------+------+------+------+-------------+------+------+------+------+------|
42 * | Tab | A | S | D | F | G | H | J | K | L | +* ~ | Enter|
43 * |------+------+------+------+------+------|------+------+------+------+------+------|
44 * | Shift| Y | X | C | V | B | N | M | , | . | Up | Shift|
45 * |------+------+------+------+------+------+------+------+------+------+------+------|
46 * | Ctrl | Sup | Alt | i3 | NumR | Space | Spec | Fun | Left | Down | Right|
47 * `-----------------------------------------------------------------------------------'
50 {KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
51 {KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, DE_PLUS, KC_ENT },
52 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_RSFT},
53 {KC_LCTL, KC_LGUI, KC_LALT, KC_I3, KC_NR, KC_SPC, KC_SPC, KC_N3, KC_FN, KC_LEFT, KC_DOWN, KC_RGHT}
57 * ,-----------------------------------------------------------------------------------.
58 * | | | | | | | | Ü | | Ö | | Del |
59 * |------+------+------+------+------+-------------+------+------+------+------+------|
60 * | Lock | Ä | ß | | | GAME | | RGBS | RGBB | RGBS | | |
61 * |------+------+------+------+------+------|------+------+------+------+------+------|
62 * | | | | | | | | RGBH-| RGBT | RGBH+| PgUp | |
63 * |------+------+------+------+------+------+------+------+------+------+------+------|
64 * | | | | ---- | ---- | | ---- | ---- | Home | PgDn | End |
65 * `-----------------------------------------------------------------------------------'
68 {_______, _______, _______, _______, _______, _______, _______, DE_UE, _______, DE_OE, _______, KC_DEL },
69 {KC_LOCK, DE_AE, DE_SS, _______, _______, G_1, _______, RGB_M_P, RGB_M_B, RGB_M_SW,_______, _______},
70 {_______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_TOG, RGB_HUI, KC_PGUP, _______},
71 {_______, _______, _______, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_END }
74 /* Numrow layer (special characters with Shift and ISO_L3_Shift)
75 * ,-----------------------------------------------------------------------------------.
76 * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \ |
77 * |------+------+------+------+------+-------------+------+------+------+------+------|
78 * | | | | | | | | | | | #' | |
79 * |------+------+------+------+------+------|------+------+------+------+------+------|
80 * | | <> | | | | | | | | | | -_ | |
81 * |------+------+------+------+------+------+------+------+------+------+------+------|
82 * | | | | ---- | ---- | | ---- | ---- | | | |
83 * `-----------------------------------------------------------------------------------'
86 {_______, DE_1, DE_2, DE_3, DE_4, DE_5, DE_6, DE_7, DE_8, DE_9, DE_0, _______},
87 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, DE_HASH, _______},
88 {_______, DE_LESS, _______, _______, _______, _______, _______, _______, _______, _______, DE_MINS, _______},
89 {_______, _______, _______, XXXXXXX, _______, _______, _______, _______, XXXXXXX, _______, _______, _______}
92 {_______, DE_1, DE_2, DE_3, DE_4, DE_5, DE_6, DE_7, DE_8, DE_9, DE_0, DE_SS },
93 {_______, DE_Q, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
94 {_______, DE_LESS, _______, _______, _______, _______, _______, _______, _______, _______, DE_MINS, _______},
95 {_______, _______, _______, XXXXXXX, _______, _______, _______, _______, XXXXXXX, _______, _______, _______}
99 * ,-----------------------------------------------------------------------------------.
100 * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
101 * |------+------+------+------+------+-------------+------+------+------+------+------|
102 * | | | | | | | | | | | | |
103 * |------+------+------+------+------+------|------+------+------+------+------+------|
104 * | | | | | | | | | | | | |
105 * |------+------+------+------+------+------+------+------+------+------+------+------|
106 * | | | | | | | | | | | |
107 * `-----------------------------------------------------------------------------------'
110 {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 },
111 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
112 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
113 {_______, _______, _______, XXXXXXX, _______, _______, _______, _______, XXXXXXX, _______, _______, _______}
117 * ,-----------------------------------------------------------------------------------.
118 * | | | | | | | | | | | | |
119 * |------+------+------+------+------+-------------+------+------+------+------+------|
120 * | | | | | | | | | | | | |
121 * |------+------+------+------+------+------|------+------+------+------+------+------|
122 * | | | | | | | | | | | | |
123 * |------+------+------+------+------+------+------+------+------+------+------+------|
124 * | Space| | | | | | | Leave| | | |
125 * `-----------------------------------------------------------------------------------'
128 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
129 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
130 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
131 {KC_SPC, XXXXXXX, _______, _______, _______, KC_LCTL, KC_LCTL, _______, G_0, _______, _______, _______}
135 void update_tri_layer_user(void);
137 bool process_record_user(uint16_t keycode, keyrecord_t *record) {
140 if (record->event.pressed) {
141 if (get_mods() & (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT))) {
142 register_code(DE_SS);
146 unregister_code(DE_SS);
150 if (record->event.pressed) {
155 update_tri_layer_user();
158 if (record->event.pressed) {
163 update_tri_layer_user();
170 void update_tri_layer_user(void) {
171 update_tri_layer(_NR, _NR_L3, _FX);
172 if (layer_state_is(_NR_L3) && !layer_state_is(_FX)) {
173 register_code(KC_ALGR);
175 unregister_code(KC_ALGR);
179 void led_set_user(uint8_t usb_led) {
180 // Force-enable Numlock
181 if (!(usb_led & (1<<USB_LED_NUM_LOCK))) {
182 register_code(KC_NUMLOCK);
183 unregister_code(KC_NUMLOCK);