aboutsummaryrefslogtreecommitdiff
path: root/keyboards/xenon/keymaps/default/keymap.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/xenon/keymaps/default/keymap.c')
-rw-r--r--keyboards/xenon/keymaps/default/keymap.c64
1 files changed, 64 insertions, 0 deletions
diff --git a/keyboards/xenon/keymaps/default/keymap.c b/keyboards/xenon/keymaps/default/keymap.c
new file mode 100644
index 000000000..97d101664
--- /dev/null
+++ b/keyboards/xenon/keymaps/default/keymap.c
@@ -0,0 +1,64 @@
1/* Copyright 2020 Kyrre Havik Eriksen
2 *
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.
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
17
18enum layers {
19 _QWERTY = 0,
20 _LOWER,
21 _RAISE,
22 _ADJUST
23};
24
25#define M_LWR MO(_LOWER)
26#define M_RSE MO(_RAISE)
27#define L(kc) (LSFT(kc))
28#define R(kc) (RALT(kc))
29
30const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
31 [_QWERTY] = LAYOUT(
32 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,
33 KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
34 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_ENT),
35 KC_MUTE, KC_RALT, KC_LALT, KC_LGUI, KC_SPC, KC_ENT, M_LWR, KC_BSPC, M_RSE, KC_MPLY,
36 KC_DEL , KC_PGDN, KC_PGUP, KC_ESC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
37 ),
38 [_LOWER] = LAYOUT(
39 KC_BSLS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
40 KC_TRNS, L(KC_1),L(KC_2), L(KC_3), L(KC_4),L(KC_5), L(KC_6), L(KC_7), L(KC_8), L(KC_9), L(KC_0), L(KC_MINS),
41 KC_TRNS, KC_GRV, KC_TRNS, L(KC_EQL),L(KC_RBRC),L(KC_BSLS), KC_BSLS, KC_RBRC, KC_EQL, KC_VOLD, KC_VOLU, KC_TRNS,
42 KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, KC_ENT, KC_SPC, KC_TRNS, KC_TRNS, KC_RALT,
43 KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, KC_ENT, KC_SPC, KC_TAB, KC_BSPC
44 ),
45 [_RAISE] = LAYOUT(
46 KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
47 KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
48 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_ENT),
49 KC_LGUI, KC_DEL, KC_ENT, KC_SPC, KC_ESC, KC_ENT, KC_SPC, KC_TAB, KC_BSPC, KC_RALT,
50 KC_DEL, KC_ENT, KC_SPC, KC_ESC, KC_ENT, KC_SPC, KC_TAB, KC_BSPC
51 )
52};
53
54bool process_record_user(uint16_t keycode, keyrecord_t *record) {
55 // If console is enabled, it will print the matrix position and status of each key pressed
56#ifdef CONSOLE_ENABLE
57 uprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed);
58#endif
59 return true;
60}
61
62layer_state_t layer_state_set_user(layer_state_t state) {
63 return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
64}