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"
28 #define KC_I3 LM(_NUMROW, MOD_LALT)
29 #define KC_NR MO(_NUMROW)
30 #define NR_L3 SAFE_RANGE
32 #define G_1 TO(_GAMING)
33 #define G_0 TG(_GAMING)
35 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
38 * ,-----------------------------------------------------------------------------------.
39 * | Esc | Q | W | E | R | T | Z | U | I | O | P | Bksp |
40 * |------+------+------+------+------+-------------+------+------+------+------+------|
41 * | Tab | A | S | D | F | G | H | J | K | L | +* ~ | Enter|
42 * |------+------+------+------+------+------|------+------+------+------+------+------|
43 * | Shift| Y | X | C | V | B | N | M | , | . | Up | Shift|
44 * |------+------+------+------+------+------+------+------+------+------+------+------|
45 * | Ctrl | Sup | Alt | i3 | NumR | Space | Spec | Fun | Left | Down | Right|
46 * `-----------------------------------------------------------------------------------'
49 {KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
50 {KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, DE_PLUS, KC_ENT },
51 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_RSFT},
52 {KC_LCTL, KC_LGUI, KC_LALT, KC_I3, KC_NR, KC_SPC, KC_SPC, NR_L3, FUN, KC_LEFT, KC_DOWN, KC_RGHT}
56 * ,-----------------------------------------------------------------------------------.
57 * | | | | | | | | Ü | | Ö | | Del |
58 * |------+------+------+------+------+-------------+------+------+------+------+------|
59 * | Lock | Ä | ß | | | GAME | | RGBS | RGBB | RGBS | | |
60 * |------+------+------+------+------+------|------+------+------+------+------+------|
61 * | | | | | | | | RGBH-| RGBT | RGBH+| PgUp | |
62 * |------+------+------+------+------+------+------+------+------+------+------+------|
63 * | | | | ---- | ---- | | | ---- | ---- | Home | PgDn | End |
64 * `-----------------------------------------------------------------------------------'
67 {_______, _______, _______, _______, _______, _______, _______, DE_UE, _______, DE_OE, _______, KC_DEL },
68 {KC_LOCK, DE_AE, DE_SS, _______, _______, G_1, _______, RGB_M_P, RGB_M_B, RGB_M_SW,_______, _______},
69 {_______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_TOG, RGB_HUI, KC_PGUP, _______},
70 {_______, _______, _______, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_END }
73 /* Numrow layer (special characters with Shift and ISO_L3_Shift)
74 * ,-----------------------------------------------------------------------------------.
75 * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | |
76 * |------+------+------+------+------+-------------+------+------+------+------+------|
77 * | | | | | | | | | | | #' | |
78 * |------+------+------+------+------+------|------+------+------+------+------+------|
79 * | | <> | | | | | | | | | | -_ | |
80 * |------+------+------+------+------+------+------+------+------+------+------+------|
81 * | | | | ---- | ---- | | | ---- | ---- | | | |
82 * `-----------------------------------------------------------------------------------'
85 {_______, DE_1, DE_2, DE_3, DE_4, DE_5, DE_6, DE_7, DE_8, DE_9, DE_0, _______},
86 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, DE_HASH, _______},
87 {_______, DE_LESS, _______, _______, _______, _______, _______, _______, _______, _______, DE_MINS, _______},
88 {_______, _______, _______, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, _______, _______, _______}
91 {_______, DE_1, DE_2, DE_3, DE_4, DE_5, DE_6, DE_7, DE_8, DE_9, DE_0, _______},
92 {_______, DE_Q, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
93 {_______, DE_LESS, _______, _______, _______, _______, _______, _______, _______, _______, DE_MINS, _______},
94 {_______, _______, _______, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, _______, _______, _______}
98 * ,-----------------------------------------------------------------------------------.
99 * | | | | | | | | | | | | |
100 * |------+------+------+------+------+-------------+------+------+------+------+------|
101 * | | | | | | | | | | | | |
102 * |------+------+------+------+------+------|------+------+------+------+------+------|
103 * | | | | | | | | | | | | |
104 * |------+------+------+------+------+------+------+------+------+------+------+------|
105 * | Space| | | | | | | | Reset| | | |
106 * `-----------------------------------------------------------------------------------'
109 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
110 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
111 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
112 {KC_SPC, _______, _______, _______, _______, _______, _______, _______, G_0, _______, _______, _______}
116 bool process_record_user(uint16_t keycode, keyrecord_t *record) {
119 if (record->event.pressed) {
120 if (get_mods() & (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT))) {
121 register_code(DE_SS);
125 unregister_code(DE_SS);
129 if (record->event.pressed) {
130 register_code(KC_ALGR);
131 layer_on(_NUMROW_L3);
133 layer_off(_NUMROW_L3);
134 unregister_code(KC_ALGR);
142 void led_set_user(uint8_t usb_led) {
143 // Force-enable Numlock
144 if (!(usb_led & (1<<USB_LED_NUM_LOCK))) {
145 register_code(KC_NUMLOCK);
146 unregister_code(KC_NUMLOCK);