aboutsummaryrefslogtreecommitdiff
path: root/keyboards/kmac/keymaps/default/keymap.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/kmac/keymaps/default/keymap.c')
-rw-r--r--keyboards/kmac/keymaps/default/keymap.c126
1 files changed, 60 insertions, 66 deletions
diff --git a/keyboards/kmac/keymaps/default/keymap.c b/keyboards/kmac/keymaps/default/keymap.c
index 3444f3cd5..05ccd1bcb 100644
--- a/keyboards/kmac/keymaps/default/keymap.c
+++ b/keyboards/kmac/keymaps/default/keymap.c
@@ -1,4 +1,4 @@
1/* Copyright 2017 Mathias Andersson <wraul@dbox.se> 1/* Copyright 2017-2019 Mathias Andersson <wraul@dbox.se>
2 * 2 *
3 * This program is free software: you can redistribute it and/or modify 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 4 * it under the terms of the GNU General Public License as published by
@@ -15,79 +15,73 @@
15 */ 15 */
16#include QMK_KEYBOARD_H 16#include QMK_KEYBOARD_H
17 17
18// Each layer gets a name for readability, which is then used in the keymap matrix below. 18enum layer_names {
19// The underscores don't mean anything - you can have a layer called STUFF or any other name. 19 _QW,
20// Layer names don't all need to be of the same length, obviously, and you can also skip them 20 _FN,
21// entirely and just use numbers. 21};
22#define _BL 0 22
23#define _FL 1 23// Defines the keycodes used by our macros in process_record_user
24enum custom_keycodes {
25 MCR_01 = SAFE_RANGE,
26 MCR_02,
27 MCR_03,
28 MCR_04,
29 MCR_05,
30 MCR_06,
31 MCR_07,
32 MCR_08,
33 MCR_09,
34 MCR_10,
35 MCR_11,
36};
24 37
38// clang-format off
25const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 39const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
26 [_BL] = LAYOUT( 40 [_QW] = LAYOUT_tkl_ansi(
27 KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_BRK, 41 KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_BRK,
28 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, 42 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP,
29 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, 43 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN,
30 KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, 44 KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
31 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, 45 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
32 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), 46 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
33 [_FL] = LAYOUT( 47 [_FN] = LAYOUT_tkl_ansi(
34 BL_STEP, M(0), M(1), M(2), M(3), M(4), M(5), M(6), M(7), M(8), M(9), M(10), M(11), _______, _______, _______, 48 BL_STEP, MCR_01, MCR_02, MCR_03, MCR_03, MCR_04, MCR_05, MCR_06, MCR_07, MCR_08, MCR_09, MCR_10, MCR_11, _______, _______, _______,
35 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, 49 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
36 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, 50 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
37 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, 51 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
38 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, 52 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
39 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), 53 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
40}; 54};
55// clang-format on
41 56
42const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) 57bool process_record_user(uint16_t keycode, keyrecord_t *record) {
43{ 58 switch (keycode) {
44 // MACRODOWN only works in this function 59 case MCR_01:
45 switch (id) 60 if (record->event.pressed) {
46 { 61 SEND_STRING("The");
47 case 0: 62 }
48 if (record->event.pressed) 63 break;
49 { 64 case MCR_02:
50 SEND_STRING("The"); 65 if (record->event.pressed) {
51 return false; 66 SEND_STRING("Custom");
52 } 67 }
53 break; 68 break;
54 case 1: 69 case MCR_03:
55 if (record->event.pressed) 70 if (record->event.pressed) {
56 { 71 SEND_STRING("Keyboard");
57 SEND_STRING("Custom"); 72 }
58 return false; 73 break;
59 } 74 case MCR_04:
60 break; 75 if (record->event.pressed) {
61 case 2: 76 SEND_STRING(SS_LCTRL("c") SS_TAP(X_RIGHT) SS_LCTRL("v"));
62 if (record->event.pressed) 77 }
63 { 78 break;
64 SEND_STRING("Keyboard");
65 return false;
66 }
67 break;
68 case 3:
69 if (record->event.pressed)
70 {
71 return MACRO(D(LCTL), T(C), U(LCTL), T(RGHT), D(LCTL), T(V), U(LCTL), END);
72 }
73 break;
74 } 79 }
75 return MACRO_NONE; 80 return true;
76}; 81};
77 82
78void matrix_init_user(void) 83void matrix_init_user(void) {}
79{
80}
81
82void matrix_scan_user(void)
83{
84}
85 84
86bool process_record_user(uint16_t keycode, keyrecord_t *record) 85void matrix_scan_user(void) {}
87{
88 return true;
89}
90 86
91void led_set_user(uint8_t usb_led) 87void led_set_user(uint8_t usb_led) {}
92{
93}