[Keymap] cwebster2 Keymap and userspace updates (#14258)

master
Casey Webster 2021-08-31 19:50:42 -05:00 committed by GitHub
parent fac5ec4656
commit c5ec423438
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 51 additions and 41 deletions

View File

@ -44,7 +44,7 @@
#endif #endif
#ifdef COMBO_ENABLE #ifdef COMBO_ENABLE
#define COMBO_COUNT 2 #define COMBO_COUNT 5
#endif #endif
#define QMK_KEYS_PER_SCAN 4 #define QMK_KEYS_PER_SCAN 4

View File

@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
#include "raw_hid.h" //#include "raw_hid.h"
#define RAW_EPSIZE 8 #define RAW_EPSIZE 8
#include <stdio.h> #include <stdio.h>
@ -28,15 +28,24 @@ uint16_t wpm_graph_timer = 0;
#ifdef COMBO_ENABLE #ifdef COMBO_ENABLE
enum combos { enum combos {
ZX_COPY, ZX_COPY,
CV_PASTE CV_PASTE,
PB_PARENS,
FP_CURLY,
DV_SQUARE
}; };
const uint16_t PROGMEM copy_combo[] = { KC_Z, KC_X, COMBO_END }; const uint16_t PROGMEM copy_combo[] = { KC_Z, KC_X, COMBO_END };
const uint16_t PROGMEM paste_combo[] = { KC_C, KC_V, COMBO_END }; const uint16_t PROGMEM paste_combo[] = { KC_C, KC_D, COMBO_END };
const uint16_t PROGMEM curly_combo[] = { KC_F, KC_P, COMBO_END };
const uint16_t PROGMEM parens_combo[] = { KC_P, KC_B, COMBO_END };
const uint16_t PROGMEM square_combo[] = { KC_D, KC_V, COMBO_END };
combo_t key_combos[COMBO_COUNT] = { combo_t key_combos[COMBO_COUNT] = {
[ZX_COPY] = COMBO(copy_combo, LCTL_T(KC_C)), [ZX_COPY] = COMBO(copy_combo, LCTL_T(KC_C)),
[CV_PASTE] = COMBO(paste_combo, LCTL_T(KC_V)) [CV_PASTE] = COMBO(paste_combo, LCTL_T(KC_V)),
[PB_PARENS] = COMBO(parens_combo, KC_LPRN),
[FP_CURLY] = COMBO(curly_combo, KC_LCBR),
[DV_SQUARE] = COMBO(square_combo, KC_LBRC)
}; };
#endif #endif
@ -64,7 +73,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______QWERTY_L1______, _______QWERTY_R1______, _______QWERTY_L1______, _______QWERTY_R1______,
_______QWERTY_L2______, _______QWERTY_R2______, _______QWERTY_L2______, _______QWERTY_R2______,
_______QWERTY_L3______, _______QWERTY_R3______, _______QWERTY_L3______, _______QWERTY_R3______,
_______THUMBS_L_______, _______THUMBS_R_______ _______NAKED_L___T____, _______THUMBS_R_______
/* `---------------------' `---------------------' */ /* `---------------------' `---------------------' */
), ),
[_COLEMAK] = LAYOUT_kyria_wrapper( [_COLEMAK] = LAYOUT_kyria_wrapper(
@ -78,10 +87,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// GAME layout -- qwerty without homerow mods // GAME layout -- qwerty without homerow mods
[_GAME] = LAYOUT_kyria_wrapper( [_GAME] = LAYOUT_kyria_wrapper(
/* ,-------------------------------------------. ,-------------------------------------------. */ /* ,-------------------------------------------. ,-------------------------------------------. */
KC_GRV, _______QWERTY_L1______, _______QWERTY_R1______, KC_BSLS, KC_GRV, _______COLEMAK_L1_____, _______COLEMAK_R1_____, KC_BSLS,
KC_CTLBS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_CTLBS, KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, KC_SCLN,
KC_LSFT, _______QWERTY_L3______, KC_LCCL, KC_LALT, KC_ALTCL, KC_LSFT, _______QWERTY_R3______, KC_MINS, KC_LSFT, _______COLEMAK_L3_____, KC_LCCL, KC_LALT, KC_ALTCL, KC_LSFT, _______COLEMAK_R3_____, KC_MINS,
KC_EQL, KC_0, _______NAKED_L___T____, _______THUMBS_R_______, TO(_COLEMAK), KC_F12 KC_EQL, MO(_NUM), _______NAKED_L___T____, _______THUMBS_R_______, TO(_COLEMAK), KC_F12
/* `----------------------------------' `----------------------------------' */ /* `----------------------------------' `----------------------------------' */
), ),
[_FN] = LAYOUT_kyria_base_wrapper( [_FN] = LAYOUT_kyria_base_wrapper(
@ -146,7 +155,7 @@ static void send_layer_via_hid(int layer) {
#ifdef RGBLIGHT_LAYERS #ifdef RGBLIGHT_LAYERS
const rgblight_segment_t PROGMEM my_qwerty_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_AZURE} ); const rgblight_segment_t PROGMEM my_qwerty_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_RED} );
const rgblight_segment_t PROGMEM my_colemak_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_BLUE} ); const rgblight_segment_t PROGMEM my_colemak_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_BLUE} );
const rgblight_segment_t PROGMEM my_game_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_RED} ); const rgblight_segment_t PROGMEM my_game_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_RED} );
const rgblight_segment_t PROGMEM my_fn_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_PINK} ); const rgblight_segment_t PROGMEM my_fn_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_PINK} );
@ -253,10 +262,10 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
} }
static void render_logo(void) { static void render_logo(void) {
static const char PROGMEM qmk_logo[] = { /*static const char PROGMEM qmk_logo[] = {*/
0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, /* 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,*/
0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, /* 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,*/
0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; /* 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0};*/
static const char PROGMEM logo[] = { static const char PROGMEM logo[] = {
// canvas is 128x64. need 16 padding // canvas is 128x64. need 16 padding
@ -280,7 +289,7 @@ static void render_logo(void) {
oled_advance_page(false); oled_advance_page(false);
oled_advance_page(false); oled_advance_page(false);
oled_advance_page(false); oled_advance_page(false);
oled_write_P(qmk_logo, false); // oled_write_P(qmk_logo, false);
#ifdef COMBO_ENABLE #ifdef COMBO_ENABLE
oled_write_P(PSTR("Combos enabled: "), false); oled_write_P(PSTR("Combos enabled: "), false);
@ -325,7 +334,7 @@ static void render_status(void) {
// Host Keyboard Layer Status // Host Keyboard Layer Status
switch (get_highest_layer(layer_state)) { switch (get_highest_layer(layer_state)) {
case _QWERTY: case _QWERTY:
oled_write_P(PSTR("Default\n"), false); oled_write_P(PSTR("Game\n"), false);
isColemak = false; isColemak = false;
break; break;
case _SYMBOLS: case _SYMBOLS:
@ -342,10 +351,10 @@ static void render_status(void) {
break; break;
case _GAME: case _GAME:
oled_write_P(PSTR("Game\n"), false); oled_write_P(PSTR("Game\n"), false);
isColemak = false; isColemak = true;
break; break;
case _COLEMAK: case _COLEMAK:
oled_write_P(PSTR("Colemak-DHm\n"), false); oled_write_P(PSTR("Default\n"), false);
isColemak = true; isColemak = true;
break; break;
case _MEDIA: case _MEDIA:

View File

@ -1,6 +1,6 @@
OLED_ENABLE = yes OLED_ENABLE = yes
OLED_DRIVER = SSD1306 # Enables the use of OLED displays OLED_DRIVER = SSD1306 # Enables the use of OLED displays
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
RAW_ENABLE = yes RAW_ENABLE = no
WPM_ENABLE = yes WPM_ENABLE = no
COMBO_ENABLE = no COMBO_ENABLE = no

View File

@ -27,7 +27,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
register_code(KC_LCTL); register_code(KC_LCTL);
} else { } else {
unregister_code(KC_LCTL); unregister_code(KC_LCTL);
if (timer_elapsed(my_colon_timer) < TAPPING_TERM) { if (timer_elapsed(my_colon_timer) < TAPPING_TERM - 50) {
SEND_STRING(":"); SEND_STRING(":");
} }
} }
@ -38,14 +38,15 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
case LSFT_T(KC_T):
case LSFT_T(KC_N):
return TAPPING_TERM - 50;
case LGUI_T(KC_A): case LGUI_T(KC_A):
case LALT_T(KC_S): case LALT_T(KC_R):
case LCTL_T(KC_D): case LCTL_T(KC_S):
case LSFT_T(KC_F): case LCTL_T(KC_E):
case RSFT_T(KC_J): case LALT_T(KC_I):
case RCTL_T(KC_K): case LGUI_T(KC_O):
case RALT_T(KC_L):
case RGUI_T(KC_SCLN):
return TAPPING_TERM + 150; return TAPPING_TERM + 150;
default: default:
return TAPPING_TERM; return TAPPING_TERM;

View File

@ -15,18 +15,18 @@
*/ */
#pragma once #pragma once
#define _______QWERTY_L1______ KC_Q, KC_W, KC_E, KC_R, KC_T #define _______QWERTY_L1______ KC_T, KC_Q, KC_W, KC_E, KC_R
#define _______QWERTY_L2______ LGUI_T(KC_A), LALT_T(KC_S), LCTL_T(KC_D), LSFT_T(KC_F), KC_G #define _______QWERTY_L2______ KC_G, KC_A, KC_S, KC_D, KC_F
#define _______QWERTY_L3______ KC_Z, KC_X, KC_C, KC_V, KC_B #define _______QWERTY_L3______ KC_B, KC_Z, KC_X, KC_C, KC_V
#define _______QWERTY_R1______ KC_Y, KC_U, KC_I, KC_O, KC_P #define _______QWERTY_R1______ KC_Y, KC_U, KC_I, KC_O, KC_P
#define _______QWERTY_R2______ KC_H, RSFT_T(KC_J), RCTL_T(KC_K), RALT_T(KC_L), RGUI_T(KC_SCLN) #define _______QWERTY_R2______ KC_H, KC_J, KC_K, KC_L, KC_SCLN
#define _______QWERTY_R3______ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH #define _______QWERTY_R3______ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH
#define _______COLEMAK_L1_____ KC_Q, KC_W, KC_F, KC_P, KC_B #define _______COLEMAK_L1_____ KC_Q, KC_W, KC_F, KC_P, KC_B
#define _______COLEMAK_L2_____ LGUI_T(KC_A), LALT_T(KC_R), LCTL_T(KC_S), LSFT_T(KC_T), KC_G #define _______COLEMAK_L2_____ LGUI_T(KC_A), LALT_T(KC_R), LCTL_T(KC_S), LSFT_T(KC_T), KC_G
#define _______COLEMAK_L3_____ KC_Z, KC_X, KC_C, KC_D, KC_V #define _______COLEMAK_L3_____ KC_Z, KC_X, KC_C, KC_D, KC_V
#define _______COLEMAK_R1_____ KC_J, KC_L, KC_U, KC_Y, KC_QUOT #define _______COLEMAK_R1_____ KC_J, KC_L, KC_U, KC_Y, KC_QUOT
#define _______COLEMAK_R2_____ KC_M, RSFT_T(KC_N), RCTL_T(KC_E), RALT_T(KC_I), RGUI_T(KC_O) #define _______COLEMAK_R2_____ KC_M, LSFT_T(KC_N), LCTL_T(KC_E), LALT_T(KC_I), LGUI_T(KC_O)
#define _______COLEMAK_R3_____ KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH #define _______COLEMAK_R3_____ KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH
#define _______THUMBS_L_______ LT(_MOUSE,KC_ESC), LT(_NAV,KC_SPC), LT(_MEDIA, KC_TAB) #define _______THUMBS_L_______ LT(_MOUSE,KC_ESC), LT(_NAV,KC_SPC), LT(_MEDIA, KC_TAB)
@ -53,13 +53,13 @@
#define _______NUM______L1____ KC_RBRC, KC_7, KC_8, KC_9, KC_LBRC #define _______NUM______L1____ KC_RBRC, KC_7, KC_8, KC_9, KC_LBRC
#define _______NUM______L2____ KC_SCLN, KC_4, KC_5, KC_6, KC_EQL #define _______NUM______L2____ KC_SCLN, KC_4, KC_5, KC_6, KC_EQL
#define _______NUM______L3____ KC_GRV, KC_1, KC_2, KC_3, KC_SLSH #define _______NUM______L3____ KC_GRV, KC_1, KC_2, KC_3, KC_BSLS
#define _______NUM_______T____ KC_DOT, KC_0, KC_MINS #define _______NUM_______T____ KC_DOT, KC_0, KC_MINS
#define _______FN_______L1____ KC_F12, KC_F7, KC_F8, KC_F9, KC_SYSREQ #define _______FN_______L1____ KC_F12, KC_F7, KC_F8, KC_F9, KC_SYSREQ
#define _______FN_______L2____ KC_F11, KC_F4, KC_F5, KC_F6, KC_TRNS #define _______FN_______L2____ KC_F11, KC_F4, KC_F5, KC_F6, KC_TRNS
#define _______FN_______L3____ KC_F10, KC_F1, KC_F2, KC_F3, KC_BSLS #define _______FN_______L3____ KC_F10, KC_F1, KC_F2, KC_F3, KC_PAUSE
#define _______FN________T____ KC_MENU, KC_SLSH, KC_TRNS #define _______FN________T____ KC_MENU, KC_SPC, KC_TAB
#define _______NAV______R1____ KC_UNDO, KC_CUT, KC_COPY, KC_PSTE, KC_AGIN #define _______NAV______R1____ KC_UNDO, KC_CUT, KC_COPY, KC_PSTE, KC_AGIN
#define _______NAV______R2____ KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_CAPS #define _______NAV______R2____ KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_CAPS