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 NPK TT(_NUMPAD)
29 //#define SPEC_S LM(_NUMROW, (KC_LSFT))
30 //#define SPEC_L3 LM(_NUMROW, (DE_ALGR))
32 enum custom_keycodes {
37 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
40 * ,-----------------------------------------------------------------------------------.
41 * | Esc | Q | W | E | R | T | Z | U | I | O | P | Bksp |
42 * |------+------+------+------+------+-------------+------+------+------+------+------|
43 * | Tab | A | S | D | F | G | H | J | K | L | +* ~ | Enter|
44 * |------+------+------+------+------+------|------+------+------+------+------+------|
45 * | Shift| Y | X | C | V | B | N | M | , | . | Up | Shift|
46 * |------+------+------+------+------+------+------+------+------+------+------+------|
47 * | Ctrl | Sup | Alt | NumP | Spec | Space | Sp_A | Fun | Left | Down | Right|
48 * `-----------------------------------------------------------------------------------'
51 {KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
52 {KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, DE_PLUS, KC_ENT },
53 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_RSFT},
54 {KC_LCTL, KC_LGUI, KC_LALT, NPK, SPEC_S, KC_SPC, KC_SPC, SPEC_L3, FUN, KC_LEFT, KC_DOWN, KC_RGHT}
58 * ,-----------------------------------------------------------------------------------.
59 * | | | | | | | | Ü | | Ö | | Del |
60 * |------+------+------+------+------+-------------+------+------+------+------+------|
61 * | Lock | Ä | | | | | | RGBS | RGBB | RGBS | | |
62 * |------+------+------+------+------+------|------+------+------+------+------+------|
63 * | | | | | | | | RGBH-| RGBT | RGBH+| PgUp | |
64 * |------+------+------+------+------+------+------+------+------+------+------+------|
65 * | | | | ---- | ---- | | | ---- | ---- | Home | PgDn | End |
66 * `-----------------------------------------------------------------------------------'
69 {_______, _______, _______, _______, _______, _______, _______, DE_UE, _______, DE_OE, _______, KC_DEL },
70 {KC_LOCK, DE_AE, _______, _______, _______, _______, _______, RGB_M_P, RGB_M_B, RGB_M_SW,_______, _______},
71 {_______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_TOG, RGB_HUI, KC_PGUP, _______},
72 {_______, _______, _______, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_END }
75 /* Numrow layer (special characters with Shift and ISO_L3_Shift)
76 * ,-----------------------------------------------------------------------------------.
77 * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ß |
78 * |------+------+------+------+------+-------------+------+------+------+------+------|
79 * | | | | | | | | | | | | |
80 * |------+------+------+------+------+------|------+------+------+------+------+------|
81 * | | ><| | | | | | | | | | _ - | |
82 * |------+------+------+------+------+------+------+------+------+------+------+------|
83 * | | | | ---- | ---- | | | ---- | ---- | | | |
84 * `-----------------------------------------------------------------------------------'
87 {_______, DE_1, DE_2, DE_3, DE_4, DE_5, DE_6, DE_7, DE_8, DE_9, DE_0, DE_SS },
88 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
89 {_______, DE_LESS, _______, _______, _______, _______, _______, _______, _______, _______, DE_MINS, _______},
90 {_______, _______, _______, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, _______, _______, _______}
94 * ,-----------------------------------------------------------------------------------.
95 * | | + | 7 | 8 | 9 | | | | | | | |
96 * |------+------+------+------+------+-------------+------+------+------+------+------|
97 * | | - | 4 | 5 | 6 | | | | | | | |
98 * |------+------+------+------+------+------|------+------+------+------+------+------|
99 * | | * | 1 | 2 | 3 | | | | | | | |
100 * |------+------+------+------+------+------+------+------+------+------+------+------|
101 * | | / | 0 | ---- | ---- | | | ---- | ---- | | | |
102 * `-----------------------------------------------------------------------------------'
105 {DEBUG, KC_PPLS, KC_P7, KC_P8, KC_P9, _______, _______, _______, _______, _______, _______, _______},
106 {_______, KC_PMNS, KC_P4, KC_P5, KC_P6, _______, _______, _______, _______, _______, _______, _______},
107 {_______, KC_PAST, KC_P1, KC_P2, KC_P3, _______, _______, _______, _______, _______, _______, _______},
108 {_______, KC_PSLS, KC_P0, _______, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, _______, _______, _______}
112 bool process_record_user(uint16_t keycode, keyrecord_t *record) {
115 if (record->event.pressed) {
116 register_code(KC_LSFT);
120 unregister_code(KC_LSFT);
124 if (record->event.pressed) {
125 register_code(DE_ALGR);
129 unregister_code(DE_ALGR);
137 void led_set_user(uint8_t usb_led) {
138 // Force-enable Numlock
139 if (!(usb_led & (1<<USB_LED_NUM_LOCK))) {
140 register_code(KC_NUMLOCK);
141 unregister_code(KC_NUMLOCK);