forked from mirrors/qmk_firmware
[Keymap] user dvorak_42_key ergodox_ez and crkbd keymaps (#19154)
Co-authored-by: Drashna Jaelre <drashna@live.com> Co-authored-by: Ryan <fauxpark@gmail.com> Co-authored-by: luc wastiaux <luc.wastiaux@airpost.net> Co-authored-by: Luc W <lucw@airpost.net>
This commit is contained in:
parent
96ba554ca8
commit
bf2ed0174b
9 changed files with 854 additions and 508 deletions
44
keyboards/crkbd/rev1/keymaps/dvorak_42_key/config.h
Normal file
44
keyboards/crkbd/rev1/keymaps/dvorak_42_key/config.h
Normal file
|
@ -0,0 +1,44 @@
|
|||
// Copyright 2022 LucW (@luc-languagetools)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
/* Select hand configuration */
|
||||
|
||||
// #define MASTER_LEFT
|
||||
#define MASTER_RIGHT
|
||||
// #define EE_HANDS
|
||||
|
||||
//#define TAPPING_FORCE_HOLD
|
||||
//#define TAPPING_TERM 100
|
||||
|
||||
// #define DOUBLE_TAP_SHIFT_TURNS_ON_CAPS_WORD
|
||||
#define BOTH_SHIFTS_TURNS_ON_CAPS_WORD
|
||||
|
||||
// MOUSE SETTINGS
|
||||
// ==============
|
||||
|
||||
#define MOUSEKEY_TIME_TO_MAX 200
|
||||
|
||||
#define RGBLIGHT_LAYERS
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#define RGBLIGHT_LIMIT_VAL 90
|
||||
// #define RGBLIGHT_LIMIT_VAL 0
|
||||
#define RGBLIGHT_HUE_STEP 10
|
||||
#define RGBLIGHT_SAT_STEP 17
|
||||
#define RGBLIGHT_VAL_STEP 17
|
||||
#endif
|
||||
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
// #define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
|
||||
// #define RGB_MATRIX_KEYPRESSES // reacts to keypresses
|
||||
// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
|
||||
// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
|
||||
// #define ENABLE_RGB_MATRIX_SPLASH
|
||||
//#define ENABLE_RGB_MATRIX_SOLID_SPLASH
|
||||
#endif
|
||||
|
||||
#define OLED_FONT_H "keyboards/crkbd/lib/glcdfont.c"
|
289
keyboards/crkbd/rev1/keymaps/dvorak_42_key/keymap.c
Normal file
289
keyboards/crkbd/rev1/keymaps/dvorak_42_key/keymap.c
Normal file
|
@ -0,0 +1,289 @@
|
|||
// Copyright 2022 LucW (@luc-languagetools)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
#include <stdio.h>
|
||||
#include "dvorak_42_key.h"
|
||||
|
||||
// to build: qmk compile -kb crkbd/rev1 -km dvorak_42_key
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[BASE] = LAYOUT_split_3x6_3(
|
||||
//,-----------------------------------------------------. ,-----------------------------------------------------.
|
||||
OSL(VSCODE), KC_QUOTE, KC_COMMA, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_TAB,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
OSL(SHELL_NAV), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, TD(TD_DEL_WORD_DEL),
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
OSM(MOD_LSFT),KC_SEMICOLON, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, OSM(MOD_LSFT),
|
||||
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
|
||||
MO(BROWSER_CONTROL), MO(COMBINED),MO(KEYNAV), KC_ENTER, KC_SPACE, OSL(SHORTCUTS)
|
||||
//`--------------------------' `--------------------------'
|
||||
|
||||
),
|
||||
|
||||
[KEYNAV] = LAYOUT_split_3x6_3(
|
||||
//,-----------------------------------------------------. ,-----------------------------------------------------.
|
||||
KC_ESC, RCTL(KC_ENTER), RCTL(KC_K), RCTL(KC_Z), RCTL(KC_S), RCTL(KC_N), KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_DELETE,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
KC_TRNS, MO(KEYSEL), KC_TRNS, RSFT(KC_TAB), KC_TAB, RCTL(KC_F), LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT), KC_BSPC,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
KC_TRNS, RCTL(KC_P), RCTL(KC_O), RCTL(KC_A), RCTL(KC_B), NP_DUPE_LINE, KC_TRNS, RCTL(KC_C), RCTL(KC_X), RCTL(KC_V), KC_PGDN, RCTL(KC_DELETE),
|
||||
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
//`--------------------------' `--------------------------'
|
||||
),
|
||||
|
||||
|
||||
[KEYSEL] = LAYOUT_split_3x6_3(
|
||||
//,-----------------------------------------------------. ,-----------------------------------------------------.
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RSFT(KC_HOME), RSFT(KC_UP), RSFT(KC_END), RSFT(KC_PGUP), KC_TRNS,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RSFT(RCTL(KC_LEFT)), RSFT(KC_LEFT), RSFT(KC_DOWN), RSFT(KC_RIGHT), RSFT(RCTL(KC_RIGHT)), KC_TRNS,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RCTL(KC_C), RCTL(KC_X), RCTL(KC_V), RSFT(KC_PGDN), KC_TRNS,
|
||||
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
//`--------------------------' `--------------------------'
|
||||
),
|
||||
|
||||
|
||||
[SHELL_NAV] = LAYOUT_split_3x6_3(
|
||||
//,-----------------------------------------------------. ,-----------------------------------------------------.
|
||||
TO(BASE),SHELL_GIT_DIFF, SHELL_PGREP, SHELL_PLESS, SHELL_LESS, KC_TRNS, RCTL(KC_D), KC_HOME, KC_UP, KC_END, RCTL(KC_L), RCTL(KC_X),
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
OSL(SHELL_SCREEN),SHELL_GIT_STATUS,SHELL_CDPRE,SHELL_LSLTR,SHELL_LS, SHELL_LSLA, LALT(KC_B), KC_LEFT, KC_DOWN, KC_RIGHT, LALT(KC_F), RCTL(KC_W),
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
KC_TRNS,SHELL_SCREEN_LIST, SHELL_SCREENRD, SHELL_SCREEN_NEW, SHELL_TAILF, KC_TRNS, RCTL(KC_U), LALT(KC_DOT), RCTL(KC_R), KC_BTN2, RCTL(KC_K), RCTL(KC_C),
|
||||
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, LCTL(LSFT(KC_V)), KC_TRNS, KC_TRNS
|
||||
//`--------------------------' `--------------------------'
|
||||
),
|
||||
|
||||
[SHELL_SCREEN] = LAYOUT_split_3x6_3(
|
||||
//,-----------------------------------------------------. ,-----------------------------------------------------.
|
||||
TO(BASE),KC_TRNS, SCREEN_READREG_3, SCREEN_READREG_2, SCREEN_READREG_1,KC_TRNS, KC_TRNS, SCREEN_7, SCREEN_8, SCREEN_9, SCREEN_RENAME, KC_TRNS,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
TO(BASE),KC_TRNS,SCREEN_PASTEREG_3,SCREEN_PASTEREG_2,SCREEN_PASTEREG_1,SCREEN_DETACH, SCREEN_TAB_LEFT, SCREEN_4, SCREEN_5, SCREEN_6, SCREEN_TAB_RIGHT, SCREEN_COPY_MODE,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, SCREEN_1, SCREEN_2, SCREEN_3, SCREEN_NUMBER, SCREEN_PASTE,
|
||||
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, SCREEN_KILL, SCREEN_NEW_TAB, SCREEN_0
|
||||
//`--------------------------' `--------------------------'
|
||||
),
|
||||
|
||||
[VSCODE] = LAYOUT_split_3x6_3(
|
||||
//,-----------------------------------------------------. ,-----------------------------------------------------.
|
||||
TO(BASE), KC_TRNS, VS_FIND_FILES, VS_CMT_BLOCK, VS_CMT_LINE, VS_BM_LISTALL, VS_COPYLINEDOWN, VS_REFERENCES, VS_DEFINITION, VS_IMPLEMENTATION, VS_LINE, VS_BRACKET,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
KC_TRNS, KC_TRNS, VS_TOGGLE_TERMINAL, VS_FOCUS_TERMINAL, VS_FOCUS_EDITOR, VS_BM_LIST, VS_CLOSETAB, VS_TABLEFT, VS_TABRIGHT, VS_SYMBOLEDITOR, VS_FILE, VS_BACK,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, VS_BM_CLEARALL, VS_JUMPY, VS_BM_PREV, VS_BM_NEXT, VS_GROUP_1, VS_GROUP_2, VS_BM_TOGGLE,
|
||||
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
|
||||
KC_TRNS, VS_DEL_LEFT, VS_DEL_RIGHT, VS_DEL_LINE, VS_JUMPY, VS_COMMANDS
|
||||
//`--------------------------' `--------------------------'
|
||||
),
|
||||
|
||||
[COMBINED] = LAYOUT_split_3x6_3(
|
||||
//,-----------------------------------------------------. ,-----------------------------------------------------.
|
||||
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_PLUS, KC_7, KC_8, KC_9, KC_ASTR, KC_PIPE,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
KC_GRAVE, KC_LPRN, KC_RPRN, KC_LBRC, KC_RBRC, KC_UNDS, KC_MINUS, KC_4, KC_5, KC_6, KC_SLSH, KC_BSLS,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
KC_CIRC, KC_COLN, KC_DQUO, KC_LCBR, KC_RCBR, KC_AMPR, KC_EQUAL, KC_1, KC_2, KC_3, KC_QUES, KC_DOT,
|
||||
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0
|
||||
//`--------------------------' `--------------------------'
|
||||
),
|
||||
|
||||
// chrome OS keyboard shortcuts: https://support.google.com/chromebook/answer/183101?hl=en
|
||||
// search key == windows key
|
||||
[BROWSER_CONTROL] = LAYOUT_split_3x6_3(
|
||||
//,-----------------------------------------------------. ,-----------------------------------------------------.
|
||||
KC_TRNS, KC_TRNS, KC_BTN3, KC_MS_U, KC_BTN1, KC_BTN2, KC_UP, KC_PGUP, KC_PGDN, KC_MS_WH_UP, KC_TRNS, KC_TRNS,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
CO_WS_LEFT, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_DOWN, RCTL(KC_PGUP), RCTL(KC_PGDN), KC_MS_WH_DOWN, LALT(KC_LEFT), CO_WS_RIGHT,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
KC_TRNS, RCTL(LSFT(KC_TAB)), RCTL(KC_TAB), WINDOWS10_WORKSPACE_LEFT, WINDOWS10_WORKSPACE_RIGHT, WINDOWS10_TASK_VIEW, KC_TRNS, RCTL(KC_1), RCTL(KC_9), LCTL(KC_L), KC_F5, KC_TRNS,
|
||||
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, RCTL(KC_W), RCTL(KC_T), KC_TRNS
|
||||
//`--------------------------' `--------------------------'
|
||||
),
|
||||
|
||||
|
||||
[SHORTCUTS] = LAYOUT_split_3x6_3(
|
||||
//,-----------------------------------------------------. ,-----------------------------------------------------.
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, MEH(KC_F1), MEH(KC_F2), MEH(KC_F3), MEH(KC_F4), MEH(KC_F5), MEH(KC_F6),
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, MEH(KC_F7), MEH(KC_F8), MEH(KC_F9), MEH(KC_F10), MEH(KC_F11), MEH(KC_F12),
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
KC_TRNS, OSM(MOD_LSFT), OSM(MOD_LGUI), OSM(MOD_LALT), OSM(MOD_LCTL), KC_TRNS, MEH(KC_F13), MEH(KC_F14), MEH(KC_F15), MEH(KC_F16), MEH(KC_F17), MEH(KC_F18),
|
||||
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TO(SHORTCUTS), TO(BASE)
|
||||
//`--------------------------' `--------------------------'
|
||||
),
|
||||
|
||||
/*
|
||||
// empty layer
|
||||
[15] = LAYOUT_split_3x6_3(
|
||||
//,-----------------------------------------------------. ,-----------------------------------------------------.
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
//`--------------------------' `--------------------------'
|
||||
),
|
||||
*/
|
||||
|
||||
|
||||
};
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
||||
if (!is_keyboard_master()) {
|
||||
return OLED_ROTATION_180; // flips the display 180 degrees if offhand
|
||||
}
|
||||
// return rotation;
|
||||
return OLED_ROTATION_180;
|
||||
}
|
||||
|
||||
|
||||
#define DISPLAY_LAYER_NAME(LAYER_NAME, LAYER_STRING) \
|
||||
if(get_highest_layer(layer_state) == LAYER_NAME) { \
|
||||
oled_write_ln_P(PSTR(LAYER_STRING), false); \
|
||||
return;\
|
||||
}\
|
||||
|
||||
|
||||
void oled_render_layer_state(void) {
|
||||
// if caps word is enabled, show
|
||||
if(is_caps_word_on()) {
|
||||
oled_write_ln_P(PSTR("CAPS WORD"), false);
|
||||
return;
|
||||
}
|
||||
DISPLAY_LAYER_NAME(SHORTCUTS, "SHORTCUTS");
|
||||
DISPLAY_LAYER_NAME(VSCODE, "VSCODE");
|
||||
DISPLAY_LAYER_NAME(COMBINED, "SYMBOLS");
|
||||
DISPLAY_LAYER_NAME(BROWSER_CONTROL, "BROWSER");
|
||||
DISPLAY_LAYER_NAME(SHELL_SCREEN, "SHELL SCREEN");
|
||||
DISPLAY_LAYER_NAME(SHELL_NAV, "SHELL NAV");
|
||||
DISPLAY_LAYER_NAME(KEYSEL, "KEYSEL");
|
||||
DISPLAY_LAYER_NAME(KEYNAV, "KEYNAV");
|
||||
DISPLAY_LAYER_NAME(BASE, "BASE");
|
||||
|
||||
}
|
||||
|
||||
const rgblight_segment_t PROGMEM rgb_layer_off[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{0, 0, 0}
|
||||
);
|
||||
|
||||
const rgblight_segment_t PROGMEM rgb_layer_blue[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{0, RGBLED_NUM, HSV_BLUE}
|
||||
);
|
||||
|
||||
const rgblight_segment_t PROGMEM rgb_layer_purple[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{0, RGBLED_NUM, HSV_PURPLE}
|
||||
);
|
||||
|
||||
const rgblight_segment_t PROGMEM rgb_layer_red[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{0, RGBLED_NUM, HSV_RED}
|
||||
);
|
||||
|
||||
const rgblight_segment_t PROGMEM rgb_layer_orange[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{0, RGBLED_NUM, HSV_ORANGE}
|
||||
);
|
||||
|
||||
const rgblight_segment_t PROGMEM rgb_layer_yellow[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{0, RGBLED_NUM, HSV_YELLOW}
|
||||
);
|
||||
|
||||
const rgblight_segment_t PROGMEM rgb_layer_green[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{0, RGBLED_NUM, HSV_GREEN}
|
||||
);
|
||||
|
||||
const rgblight_segment_t PROGMEM rgb_layer_pink[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{0, RGBLED_NUM, HSV_PINK}
|
||||
);
|
||||
|
||||
|
||||
// Now define the array of layers. Later layers take precedence
|
||||
const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(
|
||||
rgb_layer_off,
|
||||
rgb_layer_blue,
|
||||
rgb_layer_purple,
|
||||
rgb_layer_red,
|
||||
rgb_layer_orange,
|
||||
rgb_layer_yellow,
|
||||
rgb_layer_green,
|
||||
rgb_layer_pink
|
||||
);
|
||||
|
||||
void keyboard_post_init_user(void) {
|
||||
// Enable the LED layers
|
||||
rgblight_layers = my_rgb_layers;
|
||||
}
|
||||
|
||||
layer_state_t default_layer_state_set_user(layer_state_t state) {
|
||||
rgblight_set_layer_state(0, layer_state_cmp(state, BASE));
|
||||
return state;
|
||||
}
|
||||
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
|
||||
|
||||
rgblight_set_layer_state(1, layer_state_cmp(state, KEYNAV));
|
||||
rgblight_set_layer_state(2, layer_state_cmp(state, KEYSEL));
|
||||
|
||||
|
||||
rgblight_set_layer_state(3, layer_state_cmp(state, SHELL_NAV));
|
||||
rgblight_set_layer_state(4, layer_state_cmp(state, SHELL_SCREEN));
|
||||
|
||||
rgblight_set_layer_state(5, layer_state_cmp(state, SHORTCUTS));
|
||||
|
||||
rgblight_set_layer_state(6, layer_state_cmp(state, VSCODE));
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
void caps_word_set_user(bool active) {
|
||||
// will enable/disable rgb layer 7 based on whether caps word is active
|
||||
rgblight_set_layer_state(7, active);
|
||||
}
|
||||
|
||||
void render_bootmagic_status(bool status) {
|
||||
/* Show Ctrl-Gui Swap options */
|
||||
static const char PROGMEM logo[][2][3] = {
|
||||
{{0x97, 0x98, 0}, {0xb7, 0xb8, 0}},
|
||||
{{0x95, 0x96, 0}, {0xb5, 0xb6, 0}},
|
||||
};
|
||||
if (status) {
|
||||
oled_write_ln_P(logo[0][0], false);
|
||||
oled_write_ln_P(logo[0][1], false);
|
||||
} else {
|
||||
oled_write_ln_P(logo[1][0], false);
|
||||
oled_write_ln_P(logo[1][1], false);
|
||||
}
|
||||
}
|
||||
|
||||
void oled_render_logo(void) {
|
||||
static const char PROGMEM crkbd_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};
|
||||
oled_write_P(crkbd_logo, false);
|
||||
}
|
||||
|
||||
bool oled_task_user(void) {
|
||||
if (is_keyboard_master( )) {
|
||||
oled_render_layer_state();
|
||||
} else {
|
||||
oled_render_logo();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif // OLED_ENABLE
|
9
keyboards/crkbd/rev1/keymaps/dvorak_42_key/rules.mk
Normal file
9
keyboards/crkbd/rev1/keymaps/dvorak_42_key/rules.mk
Normal file
|
@ -0,0 +1,9 @@
|
|||
# Copyright 2022 LucW (@luc-languagetools)
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
|
||||
# RGB_MATRIX_ENABLE = no
|
||||
OLED_ENABLE = yes
|
||||
OLED_DRIVER = SSD1306
|
||||
LTO_ENABLE = yes
|
|
@ -1,7 +1,11 @@
|
|||
// Copyright 2022 LucW (@luc-languagetools)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
#include "version.h"
|
||||
#include "dvorak_42_key.h"
|
||||
|
||||
|
||||
// to build this keymap
|
||||
|
@ -21,209 +25,23 @@
|
|||
// remove these after getting a new keyboard
|
||||
// #define DEBOUNCE 50
|
||||
|
||||
enum custom_keycodes {
|
||||
PLACEHOLDER = SAFE_RANGE, // can always be here
|
||||
EPRM,
|
||||
VRSN,
|
||||
RGB_SLD,
|
||||
// shell nav macros
|
||||
SHELL_LS,
|
||||
SHELL_LSLTR,
|
||||
SHELL_LSLA,
|
||||
SHELL_CDPRE,
|
||||
SHELL_LESS,
|
||||
SHELL_PLESS,
|
||||
SHELL_PGREP,
|
||||
SHELL_TAILF,
|
||||
|
||||
SHELL_PWD,
|
||||
SHELL_H3,
|
||||
SHELL_AMMCOLO,
|
||||
SHELL_SCREENRD,
|
||||
SHELL_SCREEN_NEW,
|
||||
SHELL_SCREEN_LIST,
|
||||
SHELL_MKE,
|
||||
SHELL_HTCSTATUS,
|
||||
SHELL_HTCBOUNCE,
|
||||
SHELL_DUMPTLOG,
|
||||
|
||||
SHELL_EXPAND_OE_LOGPATTERN,
|
||||
SHELL_EXPAND_OE_TRANPATTERN,
|
||||
|
||||
SCREEN_TAB_LEFT,
|
||||
SCREEN_TAB_RIGHT,
|
||||
|
||||
SCREEN_NEW_TAB,
|
||||
SCREEN_DETACH,
|
||||
SCREEN_RENAME,
|
||||
SCREEN_NUMBER,
|
||||
|
||||
SCREEN_0,
|
||||
SCREEN_1,
|
||||
SCREEN_2,
|
||||
SCREEN_3,
|
||||
SCREEN_4,
|
||||
SCREEN_5,
|
||||
SCREEN_6,
|
||||
SCREEN_7,
|
||||
SCREEN_8,
|
||||
SCREEN_9,
|
||||
|
||||
SCREEN_COPY_MODE,
|
||||
SCREEN_PASTE,
|
||||
|
||||
SCREEN_UP_JUMP,
|
||||
SCREEN_DOWN_JUMP,
|
||||
|
||||
SCREEN_READREG_1,
|
||||
SCREEN_READREG_2,
|
||||
SCREEN_READREG_3,
|
||||
SCREEN_PASTEREG_1,
|
||||
SCREEN_PASTEREG_2,
|
||||
SCREEN_PASTEREG_3,
|
||||
|
||||
// Windows 10 macros,
|
||||
WINDOWS10_WORKSPACE_LEFT,
|
||||
WINDOWS10_WORKSPACE_RIGHT,
|
||||
WINDOWS10_TASK_VIEW
|
||||
};
|
||||
|
||||
|
||||
#define BASE 0 // base dvorak layer
|
||||
#define KEYNAV 1 // arrow navigation (right hand)
|
||||
#define KEYSEL 2 // arrow navigation + shift (allow text selection)
|
||||
#define SHELL_NAV 3 // bash shortcuts
|
||||
#define SHELL_SCREEN 4 // linux screen shortcuts
|
||||
#define SCREEN_NAV 5 // navigate between linux screen tabs
|
||||
#define BROWSER_CONTROL 6 // control browser and mouse
|
||||
#define COMBINED 7 // combined numbers and symbols layer
|
||||
#define ANDROID_STUDIO 8 // android studio specific layer
|
||||
#define VSCODE 9 // visual studio code specific layer
|
||||
#define VSCODE_NAV 10 // visual studio code, navigation within IDE
|
||||
|
||||
|
||||
|
||||
// Android Studio shortcuts
|
||||
#define AS_TABLEFT LALT(KC_LEFT)
|
||||
#define AS_TABRIGHT LALT(KC_RIGHT)
|
||||
#define AS_SYMBOL LCTL(LALT(KC_N))
|
||||
#define AS_CLASS LCTL(KC_N)
|
||||
#define AS_FINDUSAGE LALT(KC_F7)
|
||||
#define AS_BACK LCTL(LALT(KC_LEFT))
|
||||
#define AS_BRACKET LCTL(LSFT(KC_M))
|
||||
#define AS_GO_DECLARATION LCTL(KC_B)
|
||||
#define AS_GO_IMPLEMENTATION LCTL(LALT(KC_B))
|
||||
#define AS_CLOSETAB LCTL(KC_F4)
|
||||
#define AS_CLOSETOOLWINDOW LCTL(LSFT(KC_F4))
|
||||
#define AS_COPYLINEDOWN LCTL(KC_D)
|
||||
#define AS_DEL_LINE LCTL(KC_Y)
|
||||
#define AS_LINE LCTL(KC_G)
|
||||
#define AS_CMT_BLOCK LCTL(LSFT(KC_SLSH))
|
||||
#define AS_CMT_LINE LCTL(KC_SLSH)
|
||||
#define AS_BM_PREV LALT(KC_P)
|
||||
#define AS_BM_NEXT LALT(KC_N)
|
||||
#define AS_BM_TOGGLE KC_F11
|
||||
#define AS_BM_LIST LSFT(KC_F11)
|
||||
|
||||
// visual studio code shortcuts
|
||||
#define VS_FILE LCTL(KC_P)
|
||||
#define VS_OPEN_FILE LCTL(KC_O)
|
||||
#define VS_LINE LCTL(KC_G)
|
||||
#define VS_SYMBOLEDITOR LCTL(LSFT(KC_O))
|
||||
#define VS_DEFINITION MEH(KC_F5)
|
||||
#define VS_IMPLEMENTATION MEH(KC_F6)
|
||||
#define VS_REFERENCES MEH(KC_F7)
|
||||
#define VS_BACK LALT(KC_LEFT)
|
||||
#define VS_BRACKET LCTL(LSFT(KC_BSLS))
|
||||
#define VS_TABLEFT MEH(KC_F1)
|
||||
#define VS_TABRIGHT MEH(KC_F2)
|
||||
#define VS_CLOSETAB MEH(KC_F3)
|
||||
#define VS_CLOSEPANEL LCTL(LSFT(KC_W))
|
||||
#define VS_GROUP_1 LCTL(KC_1)
|
||||
#define VS_GROUP_2 LCTL(KC_2)
|
||||
#define VS_TERMINAL LCTL(KC_GRAVE)
|
||||
#define VS_BUILD LCTL(LSFT(KC_B))
|
||||
#define VS_COMMANDS MEH(KC_F4)
|
||||
#define VS_CMT_BLOCK LSFT(LALT(KC_A))
|
||||
#define VS_CMT_LINE MEH(KC_F18)
|
||||
#define VS_DEL_LINE LCTL(LSFT(KC_K))
|
||||
#define VS_COPYLINEDOWN LSFT(LALT(KC_DOWN))
|
||||
// visual studio bookmark commands
|
||||
#define VS_BM_LIST LCTL(LALT(KC_L))
|
||||
#define VS_BM_LISTALL LCTL(LALT(KC_A))
|
||||
#define VS_BM_PREV LCTL(LALT(KC_P))
|
||||
#define VS_BM_NEXT LCTL(LALT(KC_N))
|
||||
#define VS_BM_TOGGLE LCTL(LALT(KC_K))
|
||||
#define VS_BM_CLEARALL LCTL(LALT(KC_C))
|
||||
// visual studio code navigation shortcuts
|
||||
#define VS_FOCUS_EDITOR MEH(KC_F8)
|
||||
#define VS_FOCUS_TERMINAL MEH(KC_F9)
|
||||
#define VS_TOGGLE_TERMINAL MEH(KC_F10)
|
||||
#define VS_CLEAR_TERMINAL MEH(KC_F11)
|
||||
#define VS_TERMINAL_PREV MEH(KC_F12)
|
||||
#define VS_TERMINAL_NEXT MEH(KC_F13)
|
||||
#define VS_TERMINAL_NEW MEH(KC_F14)
|
||||
#define VS_TERMINAL_DETACH MEH(KC_F15)
|
||||
#define VS_TERMINAL_RENAME MEH(KC_F16)
|
||||
#define VS_JUMPY MEH(KC_F17)
|
||||
#define VS_FIND MEH(KC_F19)
|
||||
|
||||
|
||||
#define MACRO_SCREEN_NUM(MACRO_NAME,NUM) \
|
||||
case MACRO_NAME:\
|
||||
if (record->event.pressed) {\
|
||||
return MACRO( D(LCTL), T(A), U(LCTL), T(NUM), END);\
|
||||
}\
|
||||
break;\
|
||||
|
||||
#define MACRO_SCREEN_REG(MACRO_NAME,NUM) \
|
||||
case MACRO_NAME:\
|
||||
if (record->event.pressed) {\
|
||||
return MACRO( D(LCTL), T(A), U(LCTL), D(LSFT), T(SCOLON), U(LSFT),\
|
||||
T(R),\
|
||||
T(E),\
|
||||
T(A),\
|
||||
T(D),\
|
||||
T(R),\
|
||||
T(E),\
|
||||
T(G),\
|
||||
T(SPC),\
|
||||
T(NUM),\
|
||||
T(ENTER),\
|
||||
END);\
|
||||
}\
|
||||
break;\
|
||||
|
||||
#define MACRO_SCREEN_PASTE(MACRO_NAME,NUM)\
|
||||
case MACRO_NAME:\
|
||||
if (record->event.pressed) {\
|
||||
return MACRO( D(LCTL), T(A), U(LCTL), D(LSFT), T(SCOLON), U(LSFT),\
|
||||
T(P),\
|
||||
T(A),\
|
||||
T(S),\
|
||||
T(T),\
|
||||
T(E),\
|
||||
T(SPC),\
|
||||
T(NUM),\
|
||||
T(ENTER),\
|
||||
END);\
|
||||
}\
|
||||
break;\
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[BASE] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
|
||||
OSL(SCREEN_NAV), KC_QUOTE, KC_COMMA, KC_DOT, KC_P, KC_Y, MO(VSCODE_NAV),
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
OSL(VSCODE), KC_QUOTE, KC_COMMA, KC_DOT, KC_P, KC_Y, KC_TRNS,
|
||||
OSL(SHELL_NAV), KC_A, KC_O, KC_E, KC_U, KC_I,
|
||||
OSL(SHELL_SCREEN), KC_SCLN, KC_Q, KC_J, KC_K, KC_X, MO(VSCODE),
|
||||
MEH(KC_0), OSM(MOD_LSFT), OSM(MOD_LCTL), MO(KEYSEL), MO(BROWSER_CONTROL),
|
||||
|
||||
// left thumb cluster
|
||||
WINDOWS10_WORKSPACE_LEFT, WINDOWS10_WORKSPACE_RIGHT,
|
||||
WINDOWS10_TASK_VIEW,
|
||||
MO(COMBINED),MO(KEYNAV), OSM(MOD_LALT),
|
||||
KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,
|
||||
MO(COMBINED),MO(KEYNAV), KC_TRNS,
|
||||
|
||||
// right hand
|
||||
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, MEH(KC_7),
|
||||
|
@ -233,17 +51,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
KC_BSPC, RCTL(KC_BSPC), KC_CAPS, OSM(MOD_LSFT),MEH(KC_9),
|
||||
|
||||
// right thumb cluster
|
||||
MEH(KC_3), MEH(KC_4), MEH(KC_5), MEH(KC_6),KC_ENTER,KC_SPACE
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_ENTER, KC_SPACE
|
||||
|
||||
),
|
||||
|
||||
[KEYNAV] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,KC_ESC, KC_TRNS, RCTL(KC_Z), RCTL(KC_S), KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,KC_LSFT, KC_TRNS, RSFT(KC_TAB), KC_TAB, KC_TRNS,
|
||||
KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_ESC, RCTL(KC_ENTER), RCTL(KC_K), RCTL(KC_Z), RCTL(KC_S), RCTL(KC_N), KC_TRNS,
|
||||
KC_TRNS, MO(KEYSEL), KC_TRNS, RSFT(KC_TAB), KC_TAB, RCTL(KC_F),
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, NP_DUPE_LINE, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
// left thumb cluster
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
|
||||
|
@ -256,16 +76,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
KC_BSPC, RCTL(KC_BSPC), KC_DELETE, LCTL(KC_DELETE), MEH(KC_K),
|
||||
|
||||
// right thumb cluster
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
|
||||
// key selection layer
|
||||
[KEYSEL] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,MEH(KC_G), MEH(KC_H),MEH(KC_I), MEH(KC_J), MEH(KC_K), KC_TRNS,
|
||||
KC_TRNS,MEH(KC_L), MEH(KC_M),MEH(KC_N), MEH(KC_O), MEH(KC_P),
|
||||
KC_TRNS,MEH(KC_Q), MEH(KC_R),MEH(KC_S), MEH(KC_T), MEH(KC_U), KC_TRNS,
|
||||
KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
// bottom row
|
||||
QK_BOOT,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
// thumb cluster
|
||||
|
@ -273,12 +95,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
// right hand
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MEH(KC_Q),
|
||||
RSFT(KC_PGUP), KC_TRNS, RSFT(KC_HOME), RSFT(KC_UP), RSFT(KC_END), RSFT(KC_PGUP), MEH(KC_R),
|
||||
RSFT(RCTL(KC_LEFT)), RSFT(KC_LEFT), RSFT(KC_DOWN), RSFT(KC_RIGHT), RSFT(RCTL(KC_RIGHT)), MEH(KC_S),
|
||||
RSFT(KC_PGDN), KC_TRNS, RCTL(KC_C), RCTL(KC_X), RCTL(KC_V), RSFT(KC_PGDN), MEH(KC_T),
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, RSFT(KC_HOME), RSFT(KC_UP), RSFT(KC_END), RSFT(KC_PGUP), KC_TRNS,
|
||||
RSFT(RCTL(KC_LEFT)), RSFT(KC_LEFT), RSFT(KC_DOWN), RSFT(KC_RIGHT), RSFT(RCTL(KC_RIGHT)), KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, RCTL(KC_C), RCTL(KC_X), RCTL(KC_V), RSFT(KC_PGDN), KC_TRNS,
|
||||
// bottom row
|
||||
KC_BSPC, RCTL(KC_BSPC), KC_DELETE, LCTL(KC_DELETE), MEH(KC_U),
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
// thumb cluster
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
|
@ -288,10 +110,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
// shell navigation layer
|
||||
[SHELL_NAV] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,KC_TRNS, SHELL_PGREP, SHELL_PLESS, SHELL_LESS, SHELL_HTCBOUNCE, SHELL_H3,
|
||||
KC_TRNS,SHELL_MKE, SHELL_CDPRE, SHELL_LSLTR, SHELL_LS, SHELL_LSLA,
|
||||
KC_TRNS,SHELL_SCREEN_LIST, SHELL_SCREENRD, SHELL_SCREEN_NEW, SHELL_TAILF, SHELL_HTCSTATUS, SHELL_AMMCOLO,
|
||||
KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,SHELL_GIT_DIFF, SHELL_PGREP, SHELL_PLESS, SHELL_LESS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,SHELL_GIT_STATUS, SHELL_CDPRE, SHELL_LSLTR, SHELL_LS, SHELL_LSLA,
|
||||
KC_TRNS,SHELL_SCREEN_LIST, SHELL_SCREENRD, SHELL_SCREEN_NEW, SHELL_TAILF, KC_TRNS, KC_TRNS,
|
||||
// bottom row
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
// thumb cluster
|
||||
|
@ -299,12 +121,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
// right hand
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, SHELL_EXPAND_OE_TRANPATTERN,
|
||||
RCTL(KC_L), RCTL(KC_W), KC_HOME, KC_UP, KC_END, KC_TRNS, SHELL_EXPAND_OE_LOGPATTERN,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, RCTL(KC_D), KC_HOME, KC_UP, KC_END, RCTL(KC_L), RCTL(KC_X),
|
||||
LALT(KC_B), KC_LEFT, KC_DOWN, KC_RIGHT, LALT(KC_F), RCTL(KC_W),
|
||||
RCTL(KC_C), RCTL(KC_U), LALT(KC_DOT), RCTL(KC_R), KC_BTN2, RCTL(KC_K), SHELL_DUMPTLOG,
|
||||
// bottom row (match functionality of base layer)
|
||||
KC_BSPC, RCTL(KC_W), KC_DELETE, LALT(KC_D), RCTL(KC_U),
|
||||
KC_TRNS, RCTL(KC_U), LALT(KC_DOT), RCTL(KC_R), KC_BTN2, RCTL(KC_K), RCTL(KC_C),
|
||||
// bottom row
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
// thumb cluster
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
|
@ -315,10 +137,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
// linux screen layer
|
||||
[SHELL_SCREEN] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,KC_TRNS, SCREEN_READREG_3, SCREEN_READREG_2, SCREEN_READREG_1, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,KC_TRNS, SCREEN_PASTEREG_3, SCREEN_PASTEREG_2, SCREEN_PASTEREG_1, SCREEN_DETACH,
|
||||
KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
// bottom row
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
// thumb cluster
|
||||
|
@ -327,45 +149,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
// right hand
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, SCREEN_NEW_TAB, SCREEN_7, SCREEN_8, SCREEN_9, SCREEN_RENAME, KC_TRNS,
|
||||
SCREEN_TAB_LEFT, SCREEN_4, SCREEN_5, SCREEN_6, SCREEN_TAB_RIGHT, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, SCREEN_1, SCREEN_2, SCREEN_3, SCREEN_NUMBER, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, SCREEN_7, SCREEN_8, SCREEN_9, SCREEN_RENAME, KC_TRNS,
|
||||
SCREEN_TAB_LEFT, SCREEN_4, SCREEN_5, SCREEN_6, SCREEN_TAB_RIGHT, SCREEN_COPY_MODE,
|
||||
KC_TRNS, KC_TRNS, SCREEN_1, SCREEN_2, SCREEN_3, SCREEN_NUMBER, SCREEN_PASTE,
|
||||
// bottom row
|
||||
SCREEN_0, KC_TRNS, KC_TRNS, KC_TRNS, SCREEN_DETACH,
|
||||
SCREEN_0, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
// thumb cluster
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
KC_TRNS, SCREEN_KILL, SCREEN_NEW_TAB
|
||||
),
|
||||
|
||||
// navigation within screen (for copy/paste)
|
||||
[SCREEN_NAV] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
// left hand
|
||||
KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,KC_TRNS, SCREEN_READREG_3, SCREEN_READREG_2, SCREEN_READREG_1, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,KC_TRNS, SCREEN_PASTEREG_3, SCREEN_PASTEREG_2, SCREEN_PASTEREG_1, KC_TRNS,
|
||||
KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
// bottom row
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
// thumb cluster
|
||||
KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
// right hand
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_0, KC_UP, KC_DLR, SCREEN_UP_JUMP, KC_TRNS,
|
||||
KC_B, KC_LEFT, KC_DOWN, KC_RIGHT, KC_W, SCREEN_COPY_MODE,
|
||||
KC_TRNS, KC_TRNS, S(KC_W), S(KC_Y), SCREEN_PASTE, SCREEN_DOWN_JUMP, MEH(KC_V),
|
||||
// bottom row (match functionality of base layer)
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
// thumb cluster
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
|
||||
|
||||
// android studio shortcuts
|
||||
[ANDROID_STUDIO] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
|
@ -395,54 +189,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
// vscode shortcuts shortcuts
|
||||
[VSCODE] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
// bottom row
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, VS_CMT_BLOCK, VS_CMT_LINE, VS_BM_LISTALL, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, VS_TOGGLE_TERMINAL, VS_FOCUS_TERMINAL, VS_FOCUS_EDITOR, VS_BM_LIST,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, VS_BM_CLEARALL, KC_TRNS,
|
||||
// bottom row
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
// thumb cluster
|
||||
KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
// right hand
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
VS_CMT_LINE, VS_COPYLINEDOWN, VS_REFERENCES, VS_DEFINITION, VS_IMPLEMENTATION, VS_LINE, VS_BRACKET,
|
||||
KC_TRNS, VS_COPYLINEDOWN, VS_REFERENCES, VS_DEFINITION, VS_IMPLEMENTATION, VS_LINE, VS_BRACKET,
|
||||
VS_CLOSETAB, VS_TABLEFT, VS_TABRIGHT, VS_SYMBOLEDITOR, VS_FILE, VS_BACK,
|
||||
VS_CMT_BLOCK, VS_FIND, VS_BM_PREV, VS_BM_NEXT, VS_GROUP_1, VS_GROUP_2, VS_BM_TOGGLE,
|
||||
KC_TRNS, VS_JUMPY, VS_BM_PREV, VS_BM_NEXT, VS_GROUP_1, VS_GROUP_2, VS_BM_TOGGLE,
|
||||
// bottom row
|
||||
VS_COMMANDS, VS_BM_LIST, VS_BM_LISTALL, VS_CLOSEPANEL, VS_BM_CLEARALL,
|
||||
VS_COMMANDS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
// thumb cluster
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, VS_DEL_LINE, KC_TRNS
|
||||
),
|
||||
|
||||
// vscode navigation shortcuts
|
||||
[VSCODE_NAV] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
// bottom row
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
// thumb cluster
|
||||
KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
// right hand
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
VS_TOGGLE_TERMINAL, VS_FOCUS_TERMINAL, VS_FOCUS_EDITOR, VS_JUMPY, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, VS_CLEAR_TERMINAL, VS_TERMINAL_PREV, VS_TERMINAL_NEXT, VS_TERMINAL_NEW, VS_TERMINAL_DETACH, VS_TERMINAL_RENAME,
|
||||
// bottom row
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
// thumb cluster
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
|
||||
[COMBINED] = LAYOUT_ergodox(
|
||||
|
||||
|
@ -452,17 +221,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
KC_TRNS,KC_LPRN, KC_RPRN, KC_LBRC, KC_RBRC, KC_UNDS,
|
||||
KC_TRNS,KC_COLN, KC_DQUO, KC_LCBR, KC_RCBR, KC_AMPR, KC_TRNS,
|
||||
// bottom row
|
||||
KC_TRNS,KC_TRNS, KC_TILD, KC_GRAVE, KC_CIRC,
|
||||
KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
// thumb cluster
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
|
||||
// right hand
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MEH(KC_L),
|
||||
KC_TRNS, KC_PLUS, KC_7, KC_8, KC_9, KC_ASTR, MEH(KC_M),
|
||||
KC_MINS, KC_4, KC_5, KC_6, KC_SLSH, MEH(KC_N),
|
||||
KC_TRNS, KC_EQUAL, KC_1, KC_2, KC_3, KC_QUES, MEH(KC_O),
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_PLUS, KC_7, KC_8, KC_9, KC_ASTR, KC_PIPE,
|
||||
KC_MINS, KC_4, KC_5, KC_6, KC_SLSH, KC_BSLS,
|
||||
KC_TRNS, KC_EQUAL, KC_1, KC_2, KC_3, KC_QUES, KC_DOT,
|
||||
// bottom row
|
||||
KC_0, KC_DOT, KC_PIPE, KC_BSLS, MEH(KC_P),
|
||||
KC_0, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
// thumb cluster
|
||||
KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,
|
||||
|
@ -474,7 +243,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_BTN3, KC_MS_U, KC_BTN1, KC_BTN2, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, WINDOWS10_WORKSPACE_LEFT, WINDOWS10_WORKSPACE_RIGHT, WINDOWS10_TASK_VIEW, KC_TRNS,
|
||||
// bottom row
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
|
||||
|
@ -494,224 +263,38 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
),
|
||||
|
||||
|
||||
// shortcuts to be intercepted by autohotkey
|
||||
[SHORTCUTS] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_TRNS,
|
||||
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
|
||||
KC_TRNS, OSM(MOD_LSFT), OSM(MOD_LGUI), OSM(MOD_LALT), OSM(MOD_LCTL), KC_TRNS, KC_TRNS,
|
||||
// bottom row
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
// thumb cluster
|
||||
KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS,DF(BASE),KC_TRNS,
|
||||
// right hand
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, QK_BOOT,
|
||||
KC_TRNS, MEH(KC_I), MEH(KC_J), MEH(KC_K), MEH(KC_L), MEH(KC_M), MEH(KC_N),
|
||||
MEH(KC_O), MEH(KC_P), MEH(KC_Q), MEH(KC_R), MEH(KC_S), MEH(KC_T),
|
||||
KC_TRNS, MEH(KC_U), MEH(KC_V), MEH(KC_W), MEH(KC_X), MEH(KC_Y), MEH(KC_Z),
|
||||
// bottom row
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
// thumb cluster
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
// dynamically generate these.
|
||||
case EPRM:
|
||||
if (record->event.pressed) {
|
||||
eeconfig_init();
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case VRSN:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case RGB_SLD:
|
||||
if (record->event.pressed) {
|
||||
// rgblight_mode(1);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
|
||||
// shell macros
|
||||
if(record->event.pressed) {
|
||||
switch (keycode) {
|
||||
case SHELL_LS:
|
||||
SEND_STRING("ls\n");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_LSLTR:
|
||||
SEND_STRING("ls -ltr\n");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_LSLA:
|
||||
SEND_STRING("ls -la\n");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_CDPRE:
|
||||
SEND_STRING("cd ..\n");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_LESS:
|
||||
SEND_STRING("less ");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_PLESS:
|
||||
SEND_STRING(" | less");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_PGREP:
|
||||
SEND_STRING(" | grep ");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_TAILF:
|
||||
SEND_STRING("tail -f ");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_PWD:
|
||||
SEND_STRING("echo `pwd`/");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_H3:
|
||||
SEND_STRING("h3\n");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_AMMCOLO:
|
||||
SEND_STRING("ammcolo\n");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_SCREENRD:
|
||||
SEND_STRING("screen -r -d ");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_SCREEN_NEW:
|
||||
SEND_STRING("screen -S ");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_SCREEN_LIST:
|
||||
SEND_STRING("screen -list\n");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_MKE:
|
||||
SEND_STRING("mki -j8\n");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_HTCSTATUS:
|
||||
SEND_STRING("htcStatus -j ");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_HTCBOUNCE:
|
||||
SEND_STRING("htcBounce -j ");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_EXPAND_OE_LOGPATTERN:
|
||||
SEND_STRING(SS_TAP(X_LEFT)"*CQW_HKEX"SS_TAP(X_END)"*.log"SS_LCTL("x")SS_LSFT("8"));
|
||||
break;
|
||||
case SHELL_EXPAND_OE_TRANPATTERN:
|
||||
SEND_STRING(SS_TAP(X_LEFT)"*CQW_HKEX"SS_TAP(X_END)"*.tran"SS_LCTL("x")SS_LSFT("8"));
|
||||
break;
|
||||
case SHELL_DUMPTLOG:
|
||||
SEND_STRING(" | dumptlog - ");
|
||||
return true;
|
||||
break;
|
||||
case WINDOWS10_WORKSPACE_LEFT:
|
||||
SEND_STRING(SS_LGUI(SS_LCTL(SS_TAP(X_LEFT))));
|
||||
return true;
|
||||
break;
|
||||
case WINDOWS10_WORKSPACE_RIGHT:
|
||||
SEND_STRING(SS_LGUI(SS_LCTL(SS_TAP(X_RIGHT))));
|
||||
break;
|
||||
case WINDOWS10_TASK_VIEW:
|
||||
SEND_STRING(SS_LGUI(SS_TAP(X_TAB)));
|
||||
break;
|
||||
// linux screen shortcuts
|
||||
case SCREEN_TAB_LEFT:
|
||||
SEND_STRING(SS_LCTL("a") "p");
|
||||
break;
|
||||
case SCREEN_TAB_RIGHT:
|
||||
SEND_STRING(SS_LCTL("a") "n");
|
||||
break;
|
||||
case SCREEN_NEW_TAB:
|
||||
SEND_STRING(SS_LCTL("a") "c");
|
||||
break;
|
||||
case SCREEN_DETACH:
|
||||
SEND_STRING(SS_LCTL("a") "d");
|
||||
break;
|
||||
case SCREEN_RENAME:
|
||||
SEND_STRING(SS_LCTL("a") SS_LSFT("a"));
|
||||
break;
|
||||
case SCREEN_NUMBER:
|
||||
SEND_STRING(SS_LCTL("a") ":number ");
|
||||
break;
|
||||
case SCREEN_0:
|
||||
SEND_STRING(SS_LCTL("a") "0");
|
||||
break;
|
||||
case SCREEN_1:
|
||||
SEND_STRING(SS_LCTL("a") "1");
|
||||
break;
|
||||
case SCREEN_2:
|
||||
SEND_STRING(SS_LCTL("a") "2");
|
||||
break;
|
||||
case SCREEN_3:
|
||||
SEND_STRING(SS_LCTL("a") "3");
|
||||
break;
|
||||
case SCREEN_4:
|
||||
SEND_STRING(SS_LCTL("a") "4");
|
||||
break;
|
||||
case SCREEN_5:
|
||||
SEND_STRING(SS_LCTL("a") "5");
|
||||
break;
|
||||
case SCREEN_6:
|
||||
SEND_STRING(SS_LCTL("a") "6");
|
||||
break;
|
||||
case SCREEN_7:
|
||||
SEND_STRING(SS_LCTL("a") "7");
|
||||
break;
|
||||
case SCREEN_8:
|
||||
SEND_STRING(SS_LCTL("a") "8");
|
||||
break;
|
||||
case SCREEN_9:
|
||||
SEND_STRING(SS_LCTL("a") "9");
|
||||
break;
|
||||
case SCREEN_COPY_MODE:
|
||||
SEND_STRING(SS_LCTL("a") "[");
|
||||
break;
|
||||
case SCREEN_PASTE:
|
||||
SEND_STRING(SS_LCTL("a") "]");
|
||||
break;
|
||||
|
||||
case SCREEN_UP_JUMP:
|
||||
tap_code(KC_5);
|
||||
tap_code(KC_UP);
|
||||
break;
|
||||
case SCREEN_DOWN_JUMP:
|
||||
tap_code(KC_5);
|
||||
tap_code(KC_DOWN);
|
||||
break;
|
||||
|
||||
case SCREEN_READREG_1:
|
||||
tap_code16(C(KC_A));
|
||||
tap_code16(S(KC_SEMICOLON));
|
||||
SEND_STRING("readreg 1\n");
|
||||
break;
|
||||
case SCREEN_READREG_2:
|
||||
tap_code16(C(KC_A));
|
||||
tap_code16(S(KC_SEMICOLON));
|
||||
SEND_STRING("readreg 2\n");
|
||||
break;
|
||||
case SCREEN_READREG_3:
|
||||
tap_code16(C(KC_A));
|
||||
tap_code16(S(KC_SEMICOLON));
|
||||
SEND_STRING("readreg 3\n");
|
||||
break;
|
||||
|
||||
case SCREEN_PASTEREG_1:
|
||||
tap_code16(C(KC_A));
|
||||
tap_code16(S(KC_SEMICOLON));
|
||||
SEND_STRING("paste 1\n");
|
||||
break;
|
||||
case SCREEN_PASTEREG_2:
|
||||
tap_code16(C(KC_A));
|
||||
tap_code16(S(KC_SEMICOLON));
|
||||
SEND_STRING("paste 2\n");
|
||||
break;
|
||||
case SCREEN_PASTEREG_3:
|
||||
tap_code16(C(KC_A));
|
||||
tap_code16(S(KC_SEMICOLON));
|
||||
SEND_STRING("paste 3\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
||||
|
@ -721,11 +304,12 @@ void led_set_user(uint8_t usb_led) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
uint8_t layer = get_highest_layer(layer_state);
|
||||
|
||||
ergodox_board_led_off();
|
||||
ergodox_right_led_1_off();
|
||||
ergodox_right_led_2_off();
|
||||
ergodox_right_led_3_off();
|
||||
switch (layer) {
|
||||
|
@ -736,7 +320,6 @@ void matrix_scan_user(void) {
|
|||
case SHELL_SCREEN:
|
||||
case KEYNAV:
|
||||
case KEYSEL:
|
||||
case SCREEN_NAV:
|
||||
case VSCODE:
|
||||
ergodox_right_led_3_on();
|
||||
break;
|
||||
|
@ -744,6 +327,11 @@ void matrix_scan_user(void) {
|
|||
ergodox_right_led_2_on();
|
||||
ergodox_right_led_3_on();
|
||||
break;
|
||||
case SHORTCUTS:
|
||||
ergodox_right_led_1_on();
|
||||
ergodox_right_led_2_on();
|
||||
ergodox_right_led_3_on();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
8
users/dvorak_42_key/config.h
Normal file
8
users/dvorak_42_key/config.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
// Copyright 2022 LucW (@luc-languagetools)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#define DOUBLE_TAP_SHIFT_TURNS_ON_CAPS_WORD
|
||||
#undef TAPPING_TERM
|
||||
#define TAPPING_TERM 175
|
205
users/dvorak_42_key/dvorak_42_key.c
Normal file
205
users/dvorak_42_key/dvorak_42_key.c
Normal file
|
@ -0,0 +1,205 @@
|
|||
// Copyright 2022 LucW (@luc-languagetools)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "dvorak_42_key.h"
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
// tap dance processing
|
||||
qk_tap_dance_action_t *action;
|
||||
switch (keycode) {
|
||||
case TD(TD_DEL_WORD_DEL): // list all tap dance keycodes with tap-hold configurations
|
||||
action = &tap_dance_actions[TD_INDEX(keycode)];
|
||||
if (!record->event.pressed && action->state.count && !action->state.finished) {
|
||||
tap_dance_tap_hold_t *tap_hold = (tap_dance_tap_hold_t *)action->user_data;
|
||||
tap_code16(tap_hold->tap);
|
||||
}
|
||||
}
|
||||
|
||||
// shell macros
|
||||
if(record->event.pressed) {
|
||||
switch (keycode) {
|
||||
case SHELL_LS:
|
||||
SEND_STRING("ls\n");
|
||||
break;
|
||||
case SHELL_LSLTR:
|
||||
SEND_STRING("ls -ltr\n");
|
||||
break;
|
||||
case SHELL_LSLA:
|
||||
SEND_STRING("ls -la\n");
|
||||
break;
|
||||
case SHELL_CDPRE:
|
||||
SEND_STRING("cd ..\n");
|
||||
break;
|
||||
case SHELL_LESS:
|
||||
SEND_STRING("less ");
|
||||
break;
|
||||
case SHELL_PLESS:
|
||||
SEND_STRING(" | less");
|
||||
break;
|
||||
case SHELL_PGREP:
|
||||
SEND_STRING(" | grep ");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_TAILF:
|
||||
SEND_STRING("tail -f ");
|
||||
break;
|
||||
case SHELL_SCREENRD:
|
||||
SEND_STRING("screen -r -d ");
|
||||
break;
|
||||
case SHELL_SCREEN_NEW:
|
||||
SEND_STRING("screen -S ");
|
||||
break;
|
||||
case SHELL_SCREEN_LIST:
|
||||
SEND_STRING("screen -list\n");
|
||||
break;
|
||||
|
||||
case SHELL_GIT_DIFF:
|
||||
SEND_STRING("git diff\n");
|
||||
break;
|
||||
|
||||
case SHELL_GIT_STATUS:
|
||||
SEND_STRING("git status\n");
|
||||
break;
|
||||
|
||||
case WINDOWS10_WORKSPACE_LEFT:
|
||||
tap_code16(C(G(KC_LEFT)));
|
||||
break;
|
||||
case WINDOWS10_WORKSPACE_RIGHT:
|
||||
tap_code16(C(G(KC_RIGHT)));
|
||||
break;
|
||||
case WINDOWS10_TASK_VIEW:
|
||||
tap_code16(G(KC_TAB));
|
||||
break;
|
||||
// linux screen shortcuts
|
||||
case SCREEN_TAB_LEFT:
|
||||
SEND_STRING(SS_LCTL("a") "p");
|
||||
break;
|
||||
case SCREEN_TAB_RIGHT:
|
||||
SEND_STRING(SS_LCTL("a") "n");
|
||||
break;
|
||||
case SCREEN_NEW_TAB:
|
||||
SEND_STRING(SS_LCTL("a") "c");
|
||||
break;
|
||||
case SCREEN_DETACH:
|
||||
SEND_STRING(SS_LCTL("a") "d");
|
||||
break;
|
||||
case SCREEN_RENAME:
|
||||
SEND_STRING(SS_LCTL("a") "A");
|
||||
break;
|
||||
case SCREEN_NUMBER:
|
||||
SEND_STRING(SS_LCTL("a") ":number ");
|
||||
break;
|
||||
case SCREEN_0:
|
||||
SEND_STRING(SS_LCTL("a") "0");
|
||||
break;
|
||||
case SCREEN_1:
|
||||
SEND_STRING(SS_LCTL("a") "1");
|
||||
break;
|
||||
case SCREEN_2:
|
||||
SEND_STRING(SS_LCTL("a") "2");
|
||||
break;
|
||||
case SCREEN_3:
|
||||
SEND_STRING(SS_LCTL("a") "3");
|
||||
break;
|
||||
case SCREEN_4:
|
||||
SEND_STRING(SS_LCTL("a") "4");
|
||||
break;
|
||||
case SCREEN_5:
|
||||
SEND_STRING(SS_LCTL("a") "5");
|
||||
break;
|
||||
case SCREEN_6:
|
||||
SEND_STRING(SS_LCTL("a") "6");
|
||||
break;
|
||||
case SCREEN_7:
|
||||
SEND_STRING(SS_LCTL("a") "7");
|
||||
break;
|
||||
case SCREEN_8:
|
||||
SEND_STRING(SS_LCTL("a") "8");
|
||||
break;
|
||||
case SCREEN_9:
|
||||
SEND_STRING(SS_LCTL("a") "9");
|
||||
break;
|
||||
case SCREEN_COPY_MODE:
|
||||
SEND_STRING(SS_LCTL("a") "[");
|
||||
break;
|
||||
case SCREEN_PASTE:
|
||||
SEND_STRING(SS_LCTL("a") "]");
|
||||
break;
|
||||
case SCREEN_KILL:
|
||||
SEND_STRING(SS_LCTL("a") "ky");
|
||||
break;
|
||||
case SCREEN_READREG_1:
|
||||
SEND_STRING(SS_LCTL("a") ":readreg 1\n");
|
||||
break;
|
||||
case SCREEN_READREG_2:
|
||||
SEND_STRING(SS_LCTL("a") ":readreg 2\n");
|
||||
break;
|
||||
case SCREEN_READREG_3:
|
||||
SEND_STRING(SS_LCTL("a") ":readreg 3\n");
|
||||
break;
|
||||
|
||||
case SCREEN_PASTEREG_1:
|
||||
SEND_STRING(SS_LCTL("a") ":paste 1\n");
|
||||
break;
|
||||
case SCREEN_PASTEREG_2:
|
||||
SEND_STRING(SS_LCTL("a") ":paste 2\n");
|
||||
break;
|
||||
case SCREEN_PASTEREG_3:
|
||||
SEND_STRING(SS_LCTL("a") ":paste 3\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool caps_word_press_user(uint16_t keycode) {
|
||||
switch (keycode) {
|
||||
// Keycodes that continue Caps Word, with shift applied.
|
||||
case KC_A ... KC_Z:
|
||||
add_weak_mods(MOD_BIT(KC_LSFT)); // Apply shift to next key.
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false; // Deactivate Caps Word.
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void tap_dance_tap_hold_finished(qk_tap_dance_state_t *state, void *user_data) {
|
||||
tap_dance_tap_hold_t *tap_hold = (tap_dance_tap_hold_t *)user_data;
|
||||
|
||||
if (state->pressed) {
|
||||
if (state->count == 1
|
||||
#ifndef PERMISSIVE_HOLD
|
||||
&& !state->interrupted
|
||||
#endif
|
||||
) {
|
||||
register_code16(tap_hold->hold);
|
||||
tap_hold->held = tap_hold->hold;
|
||||
} else {
|
||||
register_code16(tap_hold->tap);
|
||||
tap_hold->held = tap_hold->tap;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void tap_dance_tap_hold_reset(qk_tap_dance_state_t *state, void *user_data) {
|
||||
tap_dance_tap_hold_t *tap_hold = (tap_dance_tap_hold_t *)user_data;
|
||||
|
||||
if (tap_hold->held) {
|
||||
unregister_code16(tap_hold->held);
|
||||
tap_hold->held = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Tap Dance definitions
|
||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
// Tap once for Escape, twice for Caps Lock
|
||||
// [TD_BSPC_CTL_BSPC] = ACTION_TAP_DANCE_DOUBLE(KC_BSPC, RCTL(KC_BSPC)),
|
||||
// [TD_BSPC_CTL_BSPC_IOS] = ACTION_TAP_DANCE_DOUBLE(KC_BSPC, LALT(KC_BSPC)),
|
||||
[TD_DEL_WORD_DEL] = ACTION_TAP_DANCE_TAP_HOLD(RCTL(KC_BSPC), KC_BSPC),
|
||||
[TD_DEL_WORD_DEL_IOS] = ACTION_TAP_DANCE_TAP_HOLD(LALT(KC_BSPC), KC_BSPC)
|
||||
};
|
161
users/dvorak_42_key/dvorak_42_key.h
Normal file
161
users/dvorak_42_key/dvorak_42_key.h
Normal file
|
@ -0,0 +1,161 @@
|
|||
// Copyright 2022 LucW (@luc-languagetools)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
// LAYERS
|
||||
// ======
|
||||
|
||||
enum layer_names {
|
||||
BASE, // base dvorak layer
|
||||
KEYNAV, // arrow navigation (right hand)
|
||||
KEYSEL, // arrow navigation + shift (allow text selection)
|
||||
SHELL_NAV, // bash shortcuts
|
||||
SHELL_SCREEN, // linux screen shortcuts
|
||||
BROWSER_CONTROL, // control browser and mouse
|
||||
COMBINED, // combined numbers and symbols layer
|
||||
ANDROID_STUDIO, // android studio specific layer
|
||||
VSCODE, // visual studio code specific layer
|
||||
SHORTCUTS, // shortcuts to be intercepted by autohotkey
|
||||
};
|
||||
|
||||
enum custom_keycodes {
|
||||
PLACEHOLDER = SAFE_RANGE, // can always be here
|
||||
|
||||
// shell nav macros
|
||||
SHELL_LS,
|
||||
SHELL_LSLTR,
|
||||
SHELL_LSLA,
|
||||
SHELL_CDPRE,
|
||||
SHELL_LESS,
|
||||
SHELL_PLESS,
|
||||
SHELL_PGREP,
|
||||
SHELL_TAILF,
|
||||
|
||||
SHELL_SCREENRD,
|
||||
SHELL_SCREEN_NEW,
|
||||
SHELL_SCREEN_LIST,
|
||||
|
||||
SHELL_GIT_DIFF,
|
||||
SHELL_GIT_STATUS,
|
||||
|
||||
// linux screen macros
|
||||
SCREEN_TAB_LEFT,
|
||||
SCREEN_TAB_RIGHT,
|
||||
|
||||
SCREEN_NEW_TAB,
|
||||
SCREEN_DETACH,
|
||||
SCREEN_RENAME,
|
||||
SCREEN_NUMBER,
|
||||
SCREEN_KILL,
|
||||
|
||||
SCREEN_0,
|
||||
SCREEN_1,
|
||||
SCREEN_2,
|
||||
SCREEN_3,
|
||||
SCREEN_4,
|
||||
SCREEN_5,
|
||||
SCREEN_6,
|
||||
SCREEN_7,
|
||||
SCREEN_8,
|
||||
SCREEN_9,
|
||||
|
||||
SCREEN_COPY_MODE,
|
||||
SCREEN_PASTE,
|
||||
|
||||
SCREEN_READREG_1,
|
||||
SCREEN_READREG_2,
|
||||
SCREEN_READREG_3,
|
||||
SCREEN_PASTEREG_1,
|
||||
SCREEN_PASTEREG_2,
|
||||
SCREEN_PASTEREG_3,
|
||||
|
||||
// Windows 10 macros
|
||||
WINDOWS10_WORKSPACE_LEFT,
|
||||
WINDOWS10_WORKSPACE_RIGHT,
|
||||
WINDOWS10_TASK_VIEW,
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Notepad++ shortcuts
|
||||
// ===================
|
||||
#define NP_DUPE_LINE LCTL(KC_D)
|
||||
|
||||
// ChromeOS shortcuts
|
||||
// ==================
|
||||
#define CO_WS_LEFT RGUI(KC_LBRC)
|
||||
#define CO_WS_RIGHT RGUI(KC_RBRC)
|
||||
|
||||
|
||||
// Android Studio shortcuts
|
||||
#define AS_TABLEFT LALT(KC_LEFT)
|
||||
#define AS_TABRIGHT LALT(KC_RIGHT)
|
||||
#define AS_SYMBOL LCTL(LALT(KC_N))
|
||||
#define AS_CLASS LCTL(KC_N)
|
||||
#define AS_FINDUSAGE LALT(KC_F7)
|
||||
#define AS_BACK LCTL(LALT(KC_LEFT))
|
||||
#define AS_BRACKET LCTL(LSFT(KC_M))
|
||||
#define AS_GO_DECLARATION LCTL(KC_B)
|
||||
#define AS_GO_IMPLEMENTATION LCTL(LALT(KC_B))
|
||||
#define AS_CLOSETAB LCTL(KC_F4)
|
||||
#define AS_CLOSETOOLWINDOW LCTL(LSFT(KC_F4))
|
||||
#define AS_COPYLINEDOWN LCTL(KC_D)
|
||||
#define AS_DEL_LINE LCTL(KC_Y)
|
||||
#define AS_LINE LCTL(KC_G)
|
||||
#define AS_CMT_BLOCK LCTL(LSFT(KC_SLSH))
|
||||
#define AS_CMT_LINE LCTL(KC_SLSH)
|
||||
#define AS_BM_PREV LALT(KC_P)
|
||||
#define AS_BM_NEXT LALT(KC_N)
|
||||
#define AS_BM_TOGGLE KC_F11
|
||||
#define AS_BM_LIST LSFT(KC_F11)
|
||||
|
||||
// visual studio code shortcuts
|
||||
// ============================
|
||||
|
||||
#include "vscode_macros.h"
|
||||
|
||||
// unused vscode shortcuts
|
||||
// #define VS_BM_LIST LCTL(LALT(KC_L))
|
||||
// #define VS_BM_LISTALL LCTL(LALT(KC_A))
|
||||
// #define VS_BM_CLEARALL LCTL(LALT(KC_C))
|
||||
|
||||
// #define VS_TERMINAL_PREV MEH(KC_F12)
|
||||
// #define VS_TERMINAL_NEXT MEH(KC_F13)
|
||||
// #define VS_TERMINAL_NEW MEH(KC_F14)
|
||||
// #define VS_TERMINAL_DETACH MEH(KC_F15)
|
||||
// #define VS_TERMINAL_RENAME MEH(KC_F16)
|
||||
// #define VS_JUMPY MEH(KC_F17)
|
||||
// #define VS_FIND MEH(KC_F19)
|
||||
// #define VS_CLOSEPANEL LCTL(LSFT(KC_W))
|
||||
// #define VS_BUILD LCTL(LSFT(KC_B))
|
||||
// #define VS_OPEN_FILE MEH(KC_F2)
|
||||
// #define VS_TERMINAL MEH(KC_F15)
|
||||
|
||||
|
||||
|
||||
|
||||
// tap-dance configuration
|
||||
// =======================
|
||||
|
||||
enum {
|
||||
// TD_BSPC_CTL_BSPC,
|
||||
// TD_BSPC_CTL_BSPC_IOS,
|
||||
TD_DEL_WORD_DEL,
|
||||
TD_DEL_WORD_DEL_IOS
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
uint16_t tap;
|
||||
uint16_t hold;
|
||||
uint16_t held;
|
||||
} tap_dance_tap_hold_t;
|
||||
|
||||
#define ACTION_TAP_DANCE_TAP_HOLD(tap, hold) \
|
||||
{ .fn = {NULL, tap_dance_tap_hold_finished, tap_dance_tap_hold_reset}, .user_data = (void *)&((tap_dance_tap_hold_t){tap, hold, 0}), }
|
7
users/dvorak_42_key/rules.mk
Normal file
7
users/dvorak_42_key/rules.mk
Normal file
|
@ -0,0 +1,7 @@
|
|||
# Copyright 2022 LucW (@luc-languagetools)
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
CAPS_WORD_ENABLE = yes
|
||||
TAP_DANCE_ENABLE = yes
|
||||
|
||||
SRC += dvorak_42_key.c
|
35
users/dvorak_42_key/vscode_macros.h
Normal file
35
users/dvorak_42_key/vscode_macros.h
Normal file
|
@ -0,0 +1,35 @@
|
|||
// Copyright 2022 LucW (@luc-languagetools)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
#define VS_COMMANDS MEH(KC_B) // workbench.action.showCommands
|
||||
#define VS_LINE MEH(KC_C) // workbench.action.gotoLine
|
||||
#define VS_DEFINITION MEH(KC_E) // editor.action.revealDefinition
|
||||
#define VS_IMPLEMENTATION MEH(KC_F) // editor.action.goToImplementation
|
||||
#define VS_REFERENCES MEH(KC_G) // editor.action.goToReferences
|
||||
#define VS_BACK MEH(KC_H) // workbench.action.navigateBack
|
||||
#define VS_BRACKET MEH(KC_I) // editor.action.jumpToBracket
|
||||
#define VS_TABLEFT MEH(KC_J) // workbench.action.previousEditor
|
||||
#define VS_TABRIGHT MEH(KC_K) // workbench.action.nextEditor
|
||||
#define VS_CLOSETAB MEH(KC_L) // workbench.action.closeActiveEditor
|
||||
#define VS_GROUP_1 MEH(KC_M) // workbench.action.focusFirstEditorGroup
|
||||
#define VS_GROUP_2 MEH(KC_N) // workbench.action.focusSecondEditorGroup
|
||||
#define VS_CMT_BLOCK MEH(KC_O) // editor.action.blockComment
|
||||
#define VS_CMT_LINE MEH(KC_P) // editor.action.commentLine
|
||||
#define VS_DEL_LINE MEH(KC_Q) // editor.action.deleteLines
|
||||
#define VS_COPYLINEDOWN MEH(KC_R) // editor.action.copyLinesDownAction
|
||||
#define VS_BM_PREV MEH(KC_S) // bookmarks.jumpToPrevious
|
||||
#define VS_BM_NEXT MEH(KC_T) // bookmarks.jumpToNext
|
||||
#define VS_BM_TOGGLE MEH(KC_U) // bookmarks.toggle
|
||||
#define VS_BM_CLEARALL MEH(KC_V) // bookmarks.clearFromAllFiles
|
||||
#define VS_BM_LIST MEH(KC_W) // bookmarks.list
|
||||
#define VS_BM_LISTALL MEH(KC_X) // bookmarks.listFromAllFiles
|
||||
#define VS_JUMPY MEH(KC_Y) // extension.jumpy-word
|
||||
#define VS_FOCUS_EDITOR MEH(KC_Z) // workbench.action.focusActiveEditorGroup
|
||||
#define VS_FOCUS_TERMINAL MEH(KC_0) // workbench.action.terminal.focus
|
||||
#define VS_TOGGLE_TERMINAL MEH(KC_1) // workbench.action.terminal.toggleTerminal
|
||||
#define VS_DEL_LEFT MEH(KC_2) // deleteAllLeft
|
||||
#define VS_DEL_RIGHT MEH(KC_3) // deleteAllRight
|
||||
#define VS_FIND_FILES MEH(KC_4) // workbench.action.findInFiles
|
||||
#define VS_FILE MEH(KC_5) // workbench.action.quickOpen
|
||||
#define VS_SYMBOLEDITOR MEH(KC_6) // workbench.action.gotoSymbol
|
Loading…
Reference in a new issue