aboutsummaryrefslogtreecommitdiff
path: root/keyboards/crkbd/keymaps/davidrambo/keymap.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/crkbd/keymaps/davidrambo/keymap.c')
-rw-r--r--keyboards/crkbd/keymaps/davidrambo/keymap.c126
1 files changed, 126 insertions, 0 deletions
diff --git a/keyboards/crkbd/keymaps/davidrambo/keymap.c b/keyboards/crkbd/keymaps/davidrambo/keymap.c
new file mode 100644
index 000000000..6e9779522
--- /dev/null
+++ b/keyboards/crkbd/keymaps/davidrambo/keymap.c
@@ -0,0 +1,126 @@
1/* Copyright 2021 David Rambo
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
17#include QMK_KEYBOARD_H
18
19//extern uint8_t is_master;
20
21
22enum custom_layers {
23 _COLEMAK,
24 _SYMBOL,
25 _NAVIGATION,
26 _FKEYS,
27};
28
29//keycode shorthands
30#define SYM MO(1)
31#define NAV LT(2, KC_ESC)
32#define FKEY MO(3)
33
34//aliases for clarity in layering
35#define SftEnt SFT_T(KC_ENT) // Shift when held, Enter when tapped
36#define BSCTL LCTL_T(KC_BSPC) // Ctrl when held, Backspace when tapped
37#define CTAB LCTL(KC_TAB)
38#define ATAB LALT(KC_TAB)
39
40//aliases for Navigation layer
41#define CBSPC LCTL(KC_BSPC) // delete whole word
42#define C_CL LCTL(KC_LEFT) // move cursor one word back
43#define C_CR LCTL(KC_RGHT) // move cursor one word forward
44
45//internet browser tab shortcuts and window swapping
46#define CTLPGDN LCTL(KC_PGDN)
47#define CTLPGUP LCTL(KC_PGUP)
48
49#define G_GRV LGUI(KC_GRV)
50#define SftEnt SFT_T(KC_ENT)
51
52enum custom_keycodes {
53 PLACEHOLDER = SAFE_RANGE,
54 SET_RGB,
55};
56
57const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
58 [_COLEMAK] = LAYOUT(
59 //,-----------------------------------------------------. ,-----------------------------------------------------.
60 KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC,
61 //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
62 NAV , KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O , KC_QUOT,
63 //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
64 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SftEnt,
65 //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
66 KC_LALT, KC_LGUI, BSCTL, KC_SPC, SYM , FKEY
67 //`--------------------------' `--------------------------'
68
69 ),
70
71 [_SYMBOL] = LAYOUT(
72 //,-----------------------------------------------------. ,-----------------------------------------------------.
73 KC_LBRC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_RBRC,
74 //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
75 KC_BSLS, KC_EXLM, KC_AT , KC_HASH, KC_DLR , KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_EQL ,
76 //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
77 _______, KC_HOME, KC_END, _______, _______, _______, KC_GRV, KC_MINS, KC_PGUP, _______, _______, _______,
78 //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
79 _______, _______, _______, _______, _______, KC_PGDN
80 //`--------------------------' `--------------------------'
81 ),
82
83 [_NAVIGATION] = LAYOUT(
84 //,-----------------------------------------------------. ,-----------------------------------------------------.
85 _______, _______, _______, _______, _______, _______, CTAB , C_CL , KC_UP, C_CR , KC_DEL, _______,
86 //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
87 _______, _______, _______, _______, _______, _______, CTLPGUP, KC_LEFT , KC_DOWN, KC_RGHT, CTLPGDN, _______,
88 //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
89 RESET, _______, _______, _______, _______, _______, ATAB , CBSPC , KC_HOME, KC_END, G_GRV , _______,
90 //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
91 _______, _______, _______, _______, _______, KC_RALT
92 //`--------------------------' `--------------------------'
93 ),
94
95 [_FKEYS] = LAYOUT(
96 //,-----------------------------------------------------. ,-----------------------------------------------------.
97 KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
98 //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
99 _______, RGB_SAI, RGB_HUI, RGB_VAI, RGB_TOG, SET_RGB, _______, _______, _______, _______, _______, _______,
100 //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
101 _______, RGB_MOD, RGB_M_P, KC_VOLD, KC_VOLU, KC_MPLY, _______, _______, _______, _______, _______, _______,
102 //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
103 _______, _______, _______, _______, _______, _______
104 //`--------------------------' `--------------------------'
105 )
106};
107
108void keyboard_post_init_user(void) {
109// rgb_matrix_sethsv(191, 43, 81);
110 rgblight_mode_noeeprom(RGB_MATRIX_TYPING_HEATMAP);
111};
112
113bool process_record_user(uint16_t keycode, keyrecord_t *record) {
114
115 switch (keycode) {
116
117 case SET_RGB:
118 if (record->event.pressed) {
119 rgb_matrix_sethsv_noeeprom(18, 86, 95);
120 }
121 return false;
122 break;
123
124 }
125 return true;
126}