aboutsummaryrefslogtreecommitdiff
path: root/keyboards/crkbd/keymaps/mcrown/mcrown.h
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/crkbd/keymaps/mcrown/mcrown.h')
-rw-r--r--keyboards/crkbd/keymaps/mcrown/mcrown.h109
1 files changed, 109 insertions, 0 deletions
diff --git a/keyboards/crkbd/keymaps/mcrown/mcrown.h b/keyboards/crkbd/keymaps/mcrown/mcrown.h
new file mode 100644
index 000000000..c3ed36eec
--- /dev/null
+++ b/keyboards/crkbd/keymaps/mcrown/mcrown.h
@@ -0,0 +1,109 @@
1/** @file mcrown.h
2 * @brief mcrown header thant incluedes key layout and some definintions.
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 *
17 * @author Mario Corona ([email protected]) 2021
18 *
19 */
20
21#pragma once
22
23#include QMK_KEYBOARD_H
24#include "oled.h"
25
26#define KC_XXXXX KC_NO
27#define KC_LOWER LOWER
28#define KC_RAISE RAISE
29#define KC_CTLTB CTL_T(KC_TAB)
30#define KC_GUIEI GUI_T(KC_LANG2)
31#define KC_ALTKN ALT_T(KC_LANG1)
32
33#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__)
34
35/* For values greater than 0x200, substract that value and add 0x20 so the characters can be mapped */
36#define RM_LSFT(kc) ((uint8_t)(0x20)+(kc-0x200))
37
38/* ######################################################################### LAYOUT BLOCKS ##################################################### */
39/* -----------------------------------------BUTTON1---BUTTON2- BUTTON3------- */
40#define _____________MOD_LEFT_____________ KC_GUIEI, KC_LOWER, KC_SPC
41#define _____________MOD_RIGHT____________ KC_ENT, KC_RAISE, KC_ALTKN
42
43
44/* ------------------------------------------------------------COL1------COL2-----COL3-----COL4-----COL5-----COL6--------- */
45#define _____________________RAISE_L1_______________________ KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC
46#define _____________________RAISE_L2_______________________ KC_LSFT, KC_MPLY, KC_VOLU, KC_MNXT, XXXXXXX, XXXXXXX
47#define _____________________RAISE_L3_______________________ KC_CTLTB, KC_CALC, KC_VOLD, KC_MPRV, KC_BRIU, KC_BRID
48
49#define _____________________RAISE_R1_______________________ KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL
50#define _____________________RAISE_R2_______________________ KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_PIPE, KC_GRV
51#define _____________________RAISE_R3_______________________ KC_UNDS, KC_PLUS, KC_LBRC, KC_RBRC, KC_BSLS, KC_TILD
52
53/* ------------------------------------------------------------COL1------COL2-----COL3-----COL4-----COL5-----COL6--------- */
54#define _____________________QWERTY_L1______________________ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T
55#define _____________________QWERTY_L2______________________ KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G
56#define _____________________QWERTY_L3______________________ KC_CTLTB, KC_Z, KC_X, KC_C, KC_V, KC_B
57
58#define _____________________QWERTY_R1______________________ KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC
59#define _____________________QWERTY_R2______________________ KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT
60#define _____________________QWERTY_R3______________________ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT
61
62/* ------------------------------------------------------------COL1------COL2-----COL3-----COL4-----COL5-----COL6--------- */
63#define _____________________LOWER_L1_______________________ KC_CAPS, KC_1, KC_2, KC_3, KC_4, KC_5
64#define _____________________LOWER_L2_______________________ KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGUP, KC_PGDN
65#define _____________________LOWER_L3_______________________ KC_CTLTB, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5
66
67#define _____________________LOWER_R1_______________________ KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC
68#define _____________________LOWER_R2_______________________ KC_LEFT, KC_UP, KC_DOWN, KC_RIGHT, KC_HOME, KC_END
69#define _____________________LOWER_R3_______________________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11
70
71/* ------------------------------------------------------------COL1------COL2-----COL3-----COL4-----COL5-----COL6--------- */
72#define _____________________ADJUST_L1______________________ XXXXXXX, EEP_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
73#if defined(RGB_MATRIX_ENABLE) || defined(RGBLIGHT_ENABLE)
74 #define _____________________ADJUST_L2______________________ XXXXXXX, XXXXXXX, RGB_SPI, RGB_SAI, RGB_HUI, RGB_VAI
75 #define _____________________ADJUST_L3______________________ XXXXXXX, XXXXXXX, RGB_SPD, RGB_SAD, RGB_HUD, RGB_VAD
76#else/* ---------------------------------------------------------------|---------|--------|--------|--------|------------- */
77 #define _____________________ADJUST_L2______________________ M_VRSN, M_MALL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
78 #define _____________________ADJUST_L3______________________ M_FLSH, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
79#endif/* --------------------------------------------------------------|---------|--------|--------|--------|------------- */
80#if defined(RGB_MATRIX_ENABLE) || defined(RGBLIGHT_ENABLE)
81 #define _____________________ADJUST_R1______________________ RGB_TOG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
82 #define _____________________ADJUST_R3______________________ RGB_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
83#else/* ---------------------------------------------------------------|---------|--------|--------|--------|------------- */
84 #define _____________________ADJUST_R1______________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
85 #define _____________________ADJUST_R3______________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
86#endif/* --------------------------------------------------------------|---------|--------|--------|--------|------------- */
87#define _____________________ADJUST_R2______________________ RGB_RMOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
88
89/* Each layer gets a name for readability */
90typedef enum custom_layers {
91 _QWERTY,
92 _DVORAK,
93 _COLEMAK,
94 _LOWER,
95 _RAISE,
96 _ADJUST,
97 _NUMPAD,
98 _MAX_LAYERS
99}CUSTOM_LAYERS_T;
100
101/* To be used to identify the current working layer */
102typedef enum custom_keycodes{
103 QWERTY = SAFE_RANGE,
104 LOWER,
105 RAISE,
106 ADJUST,
107 BACKLIT,
108 RGBRST
109}CUSTOM_KEYCODES_T;