aboutsummaryrefslogtreecommitdiff
path: root/users
diff options
context:
space:
mode:
authorCasey Webster <casey.webster@gmail.com>2020-10-18 15:55:38 -0500
committerGitHub <noreply@github.com>2020-10-18 13:55:38 -0700
commit8bb2eeaabb6d79e774c6aae6c651857ce2e380dc (patch)
tree2bed24bc62765fa3aceb3bd771d12ac65652da10 /users
parentc492dd791243b98a119fbf29c9b041d14238b102 (diff)
downloadqmk_firmware-8bb2eeaabb6d79e774c6aae6c651857ce2e380dc.tar.gz
qmk_firmware-8bb2eeaabb6d79e774c6aae6c651857ce2e380dc.zip
[Keymap] add cwebster2 userspace and keymaps (#10541)
* Adding my keymap * Add a starter keymap for kyria * Updated keymap * Add auto shift, tapping modifications and gravatar oled bitmap * Add flashing helper scripts * Updates to my keymap * Enable raw hid and rgblight sleep * Cleanup * Updated keymap and board features * Remove some RGB modes for space * Start working on a miryoku-like keymap. This adds homerow mods to my keymap on the base layer and adds a game layer that doesnt have them * more work on keymaps * Fine tuning home row mods * update keymap * Keymap update * add split transport * keymap * cherry pick from develop * merge develop * fix * keymap iterations * Refactoring * continued refactoring * messing with rgb * update layer coloring * continued refactoring * more features * modifier color * Move stuff to userspace * Moving stuff out to userspace * refactoring into userspace * More refactoring * Fixing some errors in the keymap and changing the oled output * Sync zen1 keymap to my userspace config * Update copyright notices and revert transport.c to master * Swap tab and esc * Remove a file accidentally created * Use LTO_ENABLE to turn on Link_Time_Optimization * Drop modtap thumbs on game layout * Update game keymap * More iteration on the game keymap * Add oled indications of kitty and i3 mod * Promote colemak to default * Update tapping term for modtap keys * Add per key tapping term * Use left modifiers on right side
Diffstat (limited to 'users')
-rw-r--r--users/cwebster2/config.h57
-rw-r--r--users/cwebster2/cwebster2.c65
-rw-r--r--users/cwebster2/cwebster2.h51
-rw-r--r--users/cwebster2/keycodes.c53
-rw-r--r--users/cwebster2/keycodes.h27
-rw-r--r--users/cwebster2/my_miryoku.h77
-rw-r--r--users/cwebster2/rules.mk13
7 files changed, 343 insertions, 0 deletions
diff --git a/users/cwebster2/config.h b/users/cwebster2/config.h
new file mode 100644
index 000000000..78733687c
--- /dev/null
+++ b/users/cwebster2/config.h
@@ -0,0 +1,57 @@
1/* Copyright 2020 Casey Webster <casey@e1337.dev>
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#pragma once
17
18#define TAPPING_TOGGLE 1
19#define TAPPING_TERM 200
20#define TAPPING_TERM_PER_KEY
21//#define TAPPING_FORCE_HOLD
22#undef PERMISSIVE_HOLD
23#define IGNORE_MOD_TAP_INTERRUPT
24#define NO_ACTION_ONESHOT
25
26#ifdef AUTO_SHIFT_ENABLE
27 #define AUTO_SHIFT_TIMEOUT 200
28 #define NO_AUTO_SHIFT_SPECIAL
29 #define NO_AUTO_SHIFT_ALPHA
30#endif
31
32#undef MOUSEKEY_DELAY
33#define MOUSEKEY_DELAY 0
34#undef MOUSEKEY_INTERVAL
35#define MOUSEKEY_INTERVAL 16
36#undef MOUSEKEY_WHEEL_DELAY
37#define MOUSEKEY_WHEEL_DELAY 0
38#undef MOUSEKEY_MAX_SPEED
39#define MOUSEKEY_MAX_SPEED 6
40#undef MOUSEKEY_TIME_TO_MAX
41#define MOUSEKEY_TIME_TO_MAX 64
42
43#ifdef LOCKING_SUPPORT_ENABLE
44# undef LOCKING_SUPPORT_ENABLE
45#endif
46#ifdef LOCKING_RESYNC_ENABLE
47# undef LOCKING_RESYNC_ENABLE
48#endif
49
50#define NO_ACTION_MACRO
51#define NO_ACTION_FUNCTION
52#ifndef NO_DEBUG
53 #define NO_DEBUG
54#endif // !NO_DEBUG
55#if !defined(NO_PRINT) && !defined(CONSOLE_ENABLE)
56 #define NO_PRINT
57#endif // !NO_PRINT
diff --git a/users/cwebster2/cwebster2.c b/users/cwebster2/cwebster2.c
new file mode 100644
index 000000000..cfebc12c6
--- /dev/null
+++ b/users/cwebster2/cwebster2.c
@@ -0,0 +1,65 @@
1/* Copyright 2020 Casey Webster <casey@e1337.dev>
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 "cwebster2.h"
17
18userspace_config_t userspace_config;
19
20__attribute__((weak)) void matrix_scan_keymap(void) {}
21
22void matrix_scan_user(void) {
23 static bool has_ran_yet;
24 if (!has_ran_yet) {
25 has_ran_yet = true;
26 startup_user();
27 }
28
29 matrix_scan_keymap();
30}
31
32void keyboard_post_init_rgb(void) {
33#if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_STARTUP_ANIMATION)
34 /*if (userspace_config.rgb_layer_change) { rgblight_enable_noeeprom(); }*/
35 /*if (rgblight_config.enable) {*/
36 /*layer_state_set_user(layer_state);*/
37 /*uint16_t old_hue = rgblight_config.hue;*/
38 uint16_t old_hue = 170;
39 rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
40 for (uint16_t i = 255; i > 0; i--) {
41 rgblight_sethsv_noeeprom( ( i + old_hue) % 255, 255, 255);
42 matrix_scan();
43 wait_ms(10);
44 }
45 /*}*/
46#endif
47 /*layer_state_set_user(layer_state);*/
48}
49
50__attribute__((weak)) void eeconfig_init_keymap(void) {}
51
52void eeconfig_init_user(void) {
53 userspace_config.raw = 0;
54 userspace_config.rgb_layer_change = true;
55 eeconfig_update_user(userspace_config.raw);
56 eeconfig_init_keymap();
57 keyboard_init();
58}
59
60bool hasAllBitsInMask(uint8_t value, uint8_t mask) {
61 value &= 0xF;
62 mask &= 0xF;
63
64 return (value & mask) == mask;
65}
diff --git a/users/cwebster2/cwebster2.h b/users/cwebster2/cwebster2.h
new file mode 100644
index 000000000..3d315d674
--- /dev/null
+++ b/users/cwebster2/cwebster2.h
@@ -0,0 +1,51 @@
1/* Copyright 2020 Casey Webster <casey@e1337.dev>
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#pragma once
17
18#include "my_miryoku.h"
19#include "keycodes.h"
20#include "eeprom.h"
21
22#define LAYOUT_kyria_wrapper(...) LAYOUT(__VA_ARGS__)
23#define LAYOUT_zen_wrapper(...) LAYOUT(__VA_ARGS__)
24
25enum userspace_layers {
26 _COLEMAK = 0,
27 _QWERTY,
28 _GAME,
29 _FN,
30 _SYMBOLS,
31 _NUM,
32 _NAV,
33 _MOUSE,
34 _MEDIA,
35 __LAST
36};
37
38void keyboard_post_init_rgb(void);
39void matrix_scan_keymap(void);
40void eeconfig_init_keymap(void);
41bool hasAllBitsInMask(uint8_t value, uint8_t mask);
42
43
44typedef union {
45 uint32_t raw;
46 struct {
47 bool rgb_layer_change :1;
48 };
49} userspace_config_t;
50
51extern userspace_config_t userspace_config;
diff --git a/users/cwebster2/keycodes.c b/users/cwebster2/keycodes.c
new file mode 100644
index 000000000..39b4341bd
--- /dev/null
+++ b/users/cwebster2/keycodes.c
@@ -0,0 +1,53 @@
1/* Copyright 2020 Casey Webster <casey@e1337.dev>
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 "keycodes.h"
17
18__attribute__((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; }
19
20bool process_record_user(uint16_t keycode, keyrecord_t *record) {
21 static uint16_t my_colon_timer;
22
23 switch (keycode) {
24 case KC_LCCL:
25 if (record->event.pressed) {
26 my_colon_timer = timer_read();
27 register_code(KC_LCTL);
28 } else {
29 unregister_code(KC_LCTL);
30 if (timer_elapsed(my_colon_timer) < TAPPING_TERM) {
31 SEND_STRING(":");
32 }
33 }
34 return false;
35 }
36 return process_record_keymap(keycode, record);
37}
38
39uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) {
40 switch (keycode) {
41 case LGUI_T(KC_A):
42 case LALT_T(KC_S):
43 case LCTL_T(KC_D):
44 case LSFT_T(KC_F):
45 case RSFT_T(KC_J):
46 case RCTL_T(KC_K):
47 case RALT_T(KC_L):
48 case RGUI_T(KC_SCLN):
49 return TAPPING_TERM + 150;
50 default:
51 return TAPPING_TERM;
52 }
53}
diff --git a/users/cwebster2/keycodes.h b/users/cwebster2/keycodes.h
new file mode 100644
index 000000000..b6363d646
--- /dev/null
+++ b/users/cwebster2/keycodes.h
@@ -0,0 +1,27 @@
1/* Copyright 2020 Casey Webster <casey@e1337.dev>
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#pragma once
17
18#include QMK_KEYBOARD_H
19
20enum userspace_custom_keycodes {
21 KC_LCCL = SAFE_RANGE,
22 NEW_SAFE_RANGE
23};
24
25#define KC_CTLBS CTL_T(KC_BSPC)
26#define KC_ALTCL LALT_T(KC_CAPS)
27#define KC_LOCK LGUI(LCTL(KC_L))
diff --git a/users/cwebster2/my_miryoku.h b/users/cwebster2/my_miryoku.h
new file mode 100644
index 000000000..943855ad4
--- /dev/null
+++ b/users/cwebster2/my_miryoku.h
@@ -0,0 +1,77 @@
1/* Copyright 2020 Casey Webster <casey@e1337.dev>
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#pragma once
17
18#define _______QWERTY_L1______ KC_Q, KC_W, KC_E, KC_R, KC_T
19#define _______QWERTY_L2______ LGUI_T(KC_A), LALT_T(KC_S), LCTL_T(KC_D), LSFT_T(KC_F), KC_G
20#define _______QWERTY_L3______ KC_Z, KC_X, KC_C, KC_V, KC_B
21#define _______QWERTY_R1______ KC_Y, KC_U, KC_I, KC_O, KC_P
22#define _______QWERTY_R2______ KC_H, RSFT_T(KC_J), RCTL_T(KC_K), RALT_T(KC_L), RGUI_T(KC_SCLN)
23#define _______QWERTY_R3______ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH
24
25#define _______COLEMAK_L1_____ KC_Q, KC_W, KC_F, KC_P, KC_B
26#define _______COLEMAK_L2_____ LGUI_T(KC_A), LALT_T(KC_R), LCTL_T(KC_S), LSFT_T(KC_T), KC_G
27#define _______COLEMAK_L3_____ KC_Z, KC_X, KC_C, KC_D, KC_V
28#define _______COLEMAK_R1_____ KC_J, KC_L, KC_U, KC_Y, KC_QUOT
29#define _______COLEMAK_R2_____ KC_M, RSFT_T(KC_N), RCTL_T(KC_E), RALT_T(KC_I), RGUI_T(KC_O)
30#define _______COLEMAK_R3_____ KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH
31
32#define _______THUMBS_L_______ LT(_MOUSE,KC_ESC), LT(_NAV,KC_SPC), LT(_MEDIA, KC_TAB)
33#define _______THUMBS_R_______ LT(_FN, KC_ENT), LT(_NUM,KC_BSPC), LT(_SYMBOLS,KC_DEL)
34
35#define _______NAKED_R___T____ KC_ENT, KC_BSPC, KC_DEL
36#define _______NAKED_L___T____ KC_ESC, KC_SPC, KC_TAB
37
38#define _______INACTIVE_R1____ KC_LOCK, KC_TRNS, KC_TRNS, KC_TRNS, RESET
39#define _______INACTIVE_R2____ KC_TRNS, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI
40#define _______INACTIVE_R3____ KC_TRNS, KC_TRNS, KC_TRNS, KC_RALT, KC_TRNS
41
42#define _______INACTIVE_L1____ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LOCK
43#define _______INACTIVE_L2____ KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, KC_TRNS
44#define _______INACTIVE_L3____ KC_TRNS, KC_RALT, KC_LEFT, KC_RGHT, KC_TRNS
45
46#define _______INACTIVE__T____ KC_TRNS, KC_TRNS, KC_TRNS
47
48
49#define _______SYM______L1____ KC_RCBR, KC_AMPR, KC_ASTR, KC_LPRN, KC_LCBR
50#define _______SYM______L2____ KC_COLN, KC_DLR, KC_PERC, KC_CIRC, KC_PLUS
51#define _______SYM______L3____ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_PIPE
52#define _______SYM_______T____ KC_LPRN, KC_RPRN, KC_UNDS
53
54#define _______NUM______L1____ KC_RBRC, KC_7, KC_8, KC_9, KC_LBRC
55#define _______NUM______L2____ KC_SCLN, KC_4, KC_5, KC_6, KC_EQL
56#define _______NUM______L3____ KC_GRV, KC_1, KC_2, KC_3, KC_SLSH
57#define _______NUM_______T____ KC_DOT, KC_0, KC_MINS
58
59#define _______FN_______L1____ KC_F12, KC_F7, KC_F8, KC_F9, KC_SYSREQ
60#define _______FN_______L2____ KC_F11, KC_F4, KC_F5, KC_F6, KC_TRNS
61#define _______FN_______L3____ KC_F10, KC_F1, KC_F2, KC_F3, KC_BSLS
62#define _______FN________T____ KC_MENU, KC_SLSH, KC_TRNS
63
64#define _______NAV______R1____ KC_UNDO, KC_CUT, KC_COPY, KC_PSTE, KC_AGIN
65#define _______NAV______R2____ KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_CAPS
66#define _______NAV______R3____ KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_INS
67#define _______NAV_______T____ KC_ENT, KC_BSPC, KC_DEL
68
69#define _______MEDIA____R1____ RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI
70#define _______MEDIA____R2____ KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT, KC_TRNS
71#define _______MEDIA____R3____ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
72#define _______MEDIA_____T____ KC_MSTP, KC_MPLY, KC_MUTE
73
74#define _______MOUSE____R1____ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
75#define _______MOUSE____R2____ KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_TRNS
76#define _______MOUSE____R3____ KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, KC_TRNS
77#define _______MOUSE_____T____ KC_BTN1, KC_BTN3, KC_BTN2
diff --git a/users/cwebster2/rules.mk b/users/cwebster2/rules.mk
new file mode 100644
index 000000000..f39d4ebc9
--- /dev/null
+++ b/users/cwebster2/rules.mk
@@ -0,0 +1,13 @@
1AUTO_SHIFT_ENABLE = no # Enable autoshift
2MOUSEKEY_ENABLE = yes
3EXTRAKEY_ENABLE = yes
4CONSOLE_ENABLE = no
5BOOTMAGIC_ENABLE = no
6GRAVE_ESC_ENABLE = no
7CONSOLE_ENABLE = no
8SPACE_CADET_ENABLE = no
9GRAVE_ESC_ENABLE = no
10LTO_ENABLE = yes
11
12SRC += cwebster2.c
13SRC += keycodes.c