mirror of
https://github.com/firewalkwithm3/qmk_firmware.git
synced 2024-11-22 11:30:30 +08:00
[Keymap] cwebster2 Keymap and userspace updates (#14258)
This commit is contained in:
parent
fac5ec4656
commit
c5ec423438
|
@ -44,7 +44,7 @@
|
|||
#endif
|
||||
|
||||
#ifdef COMBO_ENABLE
|
||||
#define COMBO_COUNT 2
|
||||
#define COMBO_COUNT 5
|
||||
#endif
|
||||
|
||||
#define QMK_KEYS_PER_SCAN 4
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "raw_hid.h"
|
||||
//#include "raw_hid.h"
|
||||
#define RAW_EPSIZE 8
|
||||
#include <stdio.h>
|
||||
|
||||
|
@ -28,15 +28,24 @@ uint16_t wpm_graph_timer = 0;
|
|||
#ifdef COMBO_ENABLE
|
||||
enum combos {
|
||||
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 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] = {
|
||||
[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
|
||||
|
||||
|
@ -64,7 +73,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
_______QWERTY_L1______, _______QWERTY_R1______,
|
||||
_______QWERTY_L2______, _______QWERTY_R2______,
|
||||
_______QWERTY_L3______, _______QWERTY_R3______,
|
||||
_______THUMBS_L_______, _______THUMBS_R_______
|
||||
_______NAKED_L___T____, _______THUMBS_R_______
|
||||
/* `---------------------' `---------------------' */
|
||||
),
|
||||
[_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_kyria_wrapper(
|
||||
/* ,-------------------------------------------. ,-------------------------------------------. */
|
||||
KC_GRV, _______QWERTY_L1______, _______QWERTY_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_LSFT, _______QWERTY_L3______, KC_LCCL, KC_LALT, KC_ALTCL, KC_LSFT, _______QWERTY_R3______, KC_MINS,
|
||||
KC_EQL, KC_0, _______NAKED_L___T____, _______THUMBS_R_______, TO(_COLEMAK), KC_F12
|
||||
KC_GRV, _______COLEMAK_L1_____, _______COLEMAK_R1_____, KC_BSLS,
|
||||
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, _______COLEMAK_L3_____, KC_LCCL, KC_LALT, KC_ALTCL, KC_LSFT, _______COLEMAK_R3_____, KC_MINS,
|
||||
KC_EQL, MO(_NUM), _______NAKED_L___T____, _______THUMBS_R_______, TO(_COLEMAK), KC_F12
|
||||
/* `----------------------------------' `----------------------------------' */
|
||||
),
|
||||
[_FN] = LAYOUT_kyria_base_wrapper(
|
||||
|
@ -146,7 +155,7 @@ static void send_layer_via_hid(int layer) {
|
|||
|
||||
|
||||
#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_game_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_RED} );
|
||||
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 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,
|
||||
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};
|
||||
/*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,*/
|
||||
/* 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};*/
|
||||
|
||||
static const char PROGMEM logo[] = {
|
||||
// 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_write_P(qmk_logo, false);
|
||||
// oled_write_P(qmk_logo, false);
|
||||
|
||||
#ifdef COMBO_ENABLE
|
||||
oled_write_P(PSTR("Combos enabled: "), false);
|
||||
|
@ -325,7 +334,7 @@ static void render_status(void) {
|
|||
// Host Keyboard Layer Status
|
||||
switch (get_highest_layer(layer_state)) {
|
||||
case _QWERTY:
|
||||
oled_write_P(PSTR("Default\n"), false);
|
||||
oled_write_P(PSTR("Game\n"), false);
|
||||
isColemak = false;
|
||||
break;
|
||||
case _SYMBOLS:
|
||||
|
@ -342,10 +351,10 @@ static void render_status(void) {
|
|||
break;
|
||||
case _GAME:
|
||||
oled_write_P(PSTR("Game\n"), false);
|
||||
isColemak = false;
|
||||
isColemak = true;
|
||||
break;
|
||||
case _COLEMAK:
|
||||
oled_write_P(PSTR("Colemak-DHm\n"), false);
|
||||
oled_write_P(PSTR("Default\n"), false);
|
||||
isColemak = true;
|
||||
break;
|
||||
case _MEDIA:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
OLED_ENABLE = yes
|
||||
OLED_DRIVER = SSD1306 # Enables the use of OLED displays
|
||||
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
||||
RAW_ENABLE = yes
|
||||
WPM_ENABLE = yes
|
||||
RAW_ENABLE = no
|
||||
WPM_ENABLE = no
|
||||
COMBO_ENABLE = no
|
||||
|
|
|
@ -27,7 +27,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
register_code(KC_LCTL);
|
||||
} else {
|
||||
unregister_code(KC_LCTL);
|
||||
if (timer_elapsed(my_colon_timer) < TAPPING_TERM) {
|
||||
if (timer_elapsed(my_colon_timer) < TAPPING_TERM - 50) {
|
||||
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) {
|
||||
switch (keycode) {
|
||||
case LSFT_T(KC_T):
|
||||
case LSFT_T(KC_N):
|
||||
return TAPPING_TERM - 50;
|
||||
case LGUI_T(KC_A):
|
||||
case LALT_T(KC_S):
|
||||
case LCTL_T(KC_D):
|
||||
case LSFT_T(KC_F):
|
||||
case RSFT_T(KC_J):
|
||||
case RCTL_T(KC_K):
|
||||
case RALT_T(KC_L):
|
||||
case RGUI_T(KC_SCLN):
|
||||
case LALT_T(KC_R):
|
||||
case LCTL_T(KC_S):
|
||||
case LCTL_T(KC_E):
|
||||
case LALT_T(KC_I):
|
||||
case LGUI_T(KC_O):
|
||||
return TAPPING_TERM + 150;
|
||||
default:
|
||||
return TAPPING_TERM;
|
||||
|
|
|
@ -15,18 +15,18 @@
|
|||
*/
|
||||
#pragma once
|
||||
|
||||
#define _______QWERTY_L1______ KC_Q, KC_W, KC_E, KC_R, KC_T
|
||||
#define _______QWERTY_L2______ LGUI_T(KC_A), LALT_T(KC_S), LCTL_T(KC_D), LSFT_T(KC_F), KC_G
|
||||
#define _______QWERTY_L3______ KC_Z, KC_X, KC_C, KC_V, KC_B
|
||||
#define _______QWERTY_L1______ KC_T, KC_Q, KC_W, KC_E, KC_R
|
||||
#define _______QWERTY_L2______ KC_G, KC_A, KC_S, KC_D, KC_F
|
||||
#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_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 _______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_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_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 _______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______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 _______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_______L3____ KC_F10, KC_F1, KC_F2, KC_F3, KC_BSLS
|
||||
#define _______FN________T____ KC_MENU, KC_SLSH, KC_TRNS
|
||||
#define _______FN_______L3____ KC_F10, KC_F1, KC_F2, KC_F3, KC_PAUSE
|
||||
#define _______FN________T____ KC_MENU, KC_SPC, KC_TAB
|
||||
|
||||
#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
|
||||
|
|
Loading…
Reference in a new issue