1 /* Copyright 2017 REPLACE_WITH_YOUR_NAME
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 // Each layer gets a name for readability, which is then used in the keymap matrix below.
19 // The underscores don't mean anything - you can have a layer called STUFF or any other name.
20 // Layer names don't all need to be of the same length, obviously, and you can also skip them
21 // entirely and just use numbers.
27 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
28 [_NUMLOCK] = KEYMAP( /* Base */
29 KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,\
30 KC_P7, KC_P8, KC_P9, KC_PPLS, \
31 KC_P4, KC_P5, KC_P6, KC_PEQL, \
32 KC_P1, KC_P2, KC_P3, KC_COMM, \
33 KC_LALT, KC_P0, KC_PDOT, KC_PENT \
35 [_NAV] = KEYMAP( /* Base */
36 _______, _______, _______, _______,\
37 KC_HOME, KC_UP, KC_PGUP, _______, \
38 KC_LEFT, XXXXXXX, KC_RIGHT, _______, \
39 KC_END, KC_DOWN, KC_PGDN, _______, \
40 _______, KC_INS, KC_DEL, _______ \
42 [_ALT] = KEYMAP( /* Base */
43 _______, KC_MUTE, KC_VOLD, KC_VOLU,\
44 _______, _______, _______, _______, \
45 _______, _______, _______, _______, \
46 _______, _______, _______, _______, \
47 _______, _______, _______, _______ \
49 [_ADJUST] = KEYMAP( /* Base */
50 _______, KC_A, _______, RESET,\
51 _______, _______, _______, _______, \
52 _______, _______, _______, _______, \
53 _______, _______, _______, _______, \
54 _______, _______, _______, _______ \
58 void numlock_led_on(void) {
62 void numlock_led_off(void) {
66 static bool numlock_down = false;
68 bool process_record_user(uint16_t keycode, keyrecord_t *record) {
71 if (record->event.pressed) {
73 if (IS_LAYER_ON(_ALT)) {
77 if(!IS_LAYER_ON(_ADJUST)) {
78 if (!IS_LAYER_ON(_NAV)){
93 if (record->event.pressed) {
100 if(IS_LAYER_ON(_ADJUST)) {
106 // Allow normal processing of ALT?
113 void matrix_init_user(void) {
114 // set Numlock LED to output and low
120 void matrix_scan_user(void) {
125 void led_set_user(uint8_t usb_led) {