2017-09-16 02:00:26 +00:00
|
|
|
#include QMK_KEYBOARD_H
|
|
|
|
#include "debug.h"
|
|
|
|
#include "action_layer.h"
|
|
|
|
#include "version.h"
|
|
|
|
|
|
|
|
|
|
|
|
// to build this keymap
|
2017-10-14 21:32:19 +00:00
|
|
|
// make ergodox_ez:dvorak_42_key:teensy
|
2018-03-16 20:21:00 +00:00
|
|
|
// flashing from rpi:
|
|
|
|
// sudo teensy_loader_cli -v -w .build/ergodox_ez_dvorak_42_key.hex --mcu atmega32u4
|
2017-09-16 02:00:26 +00:00
|
|
|
|
2018-02-23 18:16:40 +00:00
|
|
|
// keeping fork up to date:
|
|
|
|
// https://help.github.com/articles/configuring-a-remote-for-a-fork/
|
|
|
|
// https://help.github.com/articles/syncing-a-fork/
|
|
|
|
// pushing dev branch
|
|
|
|
// git push origin dev:dev
|
|
|
|
|
2017-09-16 02:00:26 +00:00
|
|
|
enum custom_keycodes {
|
|
|
|
PLACEHOLDER = SAFE_RANGE, // can always be here
|
|
|
|
EPRM,
|
|
|
|
VRSN,
|
|
|
|
RGB_SLD,
|
2017-11-06 17:07:21 +00:00
|
|
|
// shell nav macros
|
|
|
|
SHELL_LS,
|
|
|
|
SHELL_LSLTR,
|
2018-06-13 04:55:08 +00:00
|
|
|
SHELL_LSLA,
|
2017-11-06 17:07:21 +00:00
|
|
|
SHELL_CDPRE,
|
|
|
|
SHELL_LESS,
|
|
|
|
SHELL_PLESS,
|
|
|
|
SHELL_PGREP,
|
2018-06-13 04:55:08 +00:00
|
|
|
SHELL_TAILF,
|
|
|
|
|
2017-11-06 17:07:21 +00:00
|
|
|
SHELL_PWD,
|
|
|
|
SHELL_H3,
|
|
|
|
SHELL_AMMCOLO,
|
|
|
|
SHELL_SCREENRD,
|
|
|
|
SHELL_SCREEN_NEW,
|
|
|
|
SHELL_SCREEN_LIST,
|
|
|
|
SHELL_MKE,
|
2017-11-13 23:50:39 +00:00
|
|
|
SHELL_HTCSTATUS,
|
2018-07-26 21:21:55 +00:00
|
|
|
SHELL_HTCBOUNCE,
|
|
|
|
SHELL_DUMPTLOG,
|
2018-06-13 04:55:08 +00:00
|
|
|
|
2018-07-26 21:21:55 +00:00
|
|
|
SHELL_EXPAND_OE_LOGPATTERN,
|
|
|
|
SHELL_EXPAND_OE_TRANPATTERN,
|
|
|
|
|
2018-02-23 18:16:40 +00:00
|
|
|
// Cloud9 macros
|
|
|
|
CLOUD9_TAB_LEFT,
|
|
|
|
CLOUD9_TAB_RIGHT,
|
|
|
|
CLOUD9_TAB_CLOSE,
|
|
|
|
CLOUD9_GOTO_SYMBOL,
|
|
|
|
CLOUD9_GOTO_LINE,
|
|
|
|
CLOUD9_NAVIGATE,
|
2018-06-13 04:55:08 +00:00
|
|
|
|
2017-09-16 02:00:26 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2017-11-06 17:07:21 +00:00
|
|
|
#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
|
2018-07-26 21:21:55 +00:00
|
|
|
#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
|
2018-02-23 18:16:40 +00:00
|
|
|
|
2017-09-16 02:00:26 +00:00
|
|
|
|
|
|
|
// macros
|
|
|
|
#define SCREEN_TAB_LEFT 4
|
|
|
|
#define SCREEN_TAB_RIGHT 5
|
|
|
|
#define SCREEN_NEW_TAB 6
|
|
|
|
#define SCREEN_COPY_MODE 8
|
|
|
|
#define SCREEN_PASTE 9
|
2017-11-06 17:07:21 +00:00
|
|
|
#define SCREEN_RENAME 10
|
|
|
|
#define SCREEN_NUMBER 11
|
|
|
|
#define SCREEN_0 12
|
|
|
|
#define SCREEN_1 13
|
|
|
|
#define SCREEN_2 14
|
|
|
|
#define SCREEN_3 15
|
|
|
|
#define SCREEN_4 16
|
|
|
|
#define SCREEN_5 17
|
|
|
|
#define SCREEN_6 18
|
|
|
|
#define SCREEN_7 19
|
|
|
|
#define SCREEN_8 20
|
|
|
|
#define SCREEN_9 21
|
|
|
|
#define SCREEN_DETACH 22
|
2018-02-23 18:16:40 +00:00
|
|
|
#define SCREEN_UP_JUMP 23
|
|
|
|
#define SCREEN_DOWN_JUMP 24
|
|
|
|
#define SCREEN_READREG_1 25
|
|
|
|
#define SCREEN_READREG_2 26
|
|
|
|
#define SCREEN_READREG_3 27
|
|
|
|
#define SCREEN_PASTEREG_1 28
|
|
|
|
#define SCREEN_PASTEREG_2 29
|
|
|
|
#define SCREEN_PASTEREG_3 30
|
2018-07-26 21:21:55 +00:00
|
|
|
#define DEL_TO_HOME 36
|
|
|
|
|
2018-02-23 18:16:40 +00:00
|
|
|
|
2017-09-16 02:00:26 +00:00
|
|
|
|
|
|
|
|
2017-11-06 17:07:21 +00:00
|
|
|
#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;\
|
2018-06-13 04:55:08 +00:00
|
|
|
|
2018-02-23 18:16:40 +00:00
|
|
|
#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;\
|
2017-11-06 17:07:21 +00:00
|
|
|
|
2017-09-16 02:00:26 +00:00
|
|
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|
|
|
|
2018-06-13 04:55:08 +00:00
|
|
|
[BASE] = LAYOUT_ergodox(
|
2017-11-13 23:50:39 +00:00
|
|
|
// left hand
|
|
|
|
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
|
2018-02-23 18:16:40 +00:00
|
|
|
OSL(SCREEN_NAV), KC_QUOTE, KC_COMMA, KC_DOT, KC_P, KC_Y, MEH(KC_2),
|
2017-11-13 23:50:39 +00:00
|
|
|
OSL(SHELL_NAV), KC_A, KC_O, KC_E, KC_U, KC_I,
|
|
|
|
OSL(SHELL_SCREEN), KC_SCOLON, KC_Q, KC_J, KC_K, KC_X, MEH(KC_3),
|
2018-02-23 18:16:40 +00:00
|
|
|
MEH(KC_1), OSM(MOD_LSFT), OSM(MOD_LCTL), MO(KEYSEL), MO(BROWSER_CONTROL),
|
2018-06-13 04:55:08 +00:00
|
|
|
|
2017-11-13 23:50:39 +00:00
|
|
|
// left thumb cluster
|
|
|
|
MEH(KC_4), MEH(KC_5),
|
|
|
|
MEH(KC_6),
|
|
|
|
MO(COMBINED),MO(KEYNAV), OSM(MOD_LALT),
|
2018-06-13 04:55:08 +00:00
|
|
|
|
2017-11-13 23:50:39 +00:00
|
|
|
// right hand
|
|
|
|
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, MEH(KC_9),
|
2018-02-23 18:16:40 +00:00
|
|
|
MEH(KC_7), KC_F, KC_G, KC_C, KC_R, KC_L, KC_TAB,
|
|
|
|
KC_D, KC_H, KC_T, KC_N, KC_S, RCTL(KC_BSPC),
|
2017-11-13 23:50:39 +00:00
|
|
|
MEH(KC_8), KC_B, KC_M, KC_W, KC_V, KC_Z, MEH(KC_F3),
|
|
|
|
KC_BSPC, RCTL(KC_BSPC), KC_CAPSLOCK, OSM(MOD_LSFT),MEH(KC_F4),
|
2018-06-13 04:55:08 +00:00
|
|
|
|
2017-11-13 23:50:39 +00:00
|
|
|
// right thumb cluster
|
|
|
|
MEH(KC_F5),MEH(KC_F6),MEH(KC_F7),MEH(KC_F8),KC_ENTER,KC_SPACE
|
2018-06-13 04:55:08 +00:00
|
|
|
|
2017-09-16 02:00:26 +00:00
|
|
|
),
|
2018-06-13 04:55:08 +00:00
|
|
|
|
|
|
|
[KEYNAV] = LAYOUT_ergodox(
|
2017-11-13 23:50:39 +00:00
|
|
|
// left hand
|
2018-02-23 18:16:40 +00:00
|
|
|
KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
|
|
KC_TRNS,KC_ESC, CLOUD9_GOTO_LINE, RCTL(KC_Z), RCTL(KC_S), MEH(KC_F10), KC_TRNS,
|
|
|
|
KC_TRNS,KC_LSFT, CLOUD9_GOTO_SYMBOL, RSFT(KC_TAB), KC_TAB, MEH(KC_A),
|
|
|
|
KC_TRNS,MEH(KC_B), CLOUD9_NAVIGATE, CLOUD9_TAB_LEFT, CLOUD9_TAB_RIGHT, CLOUD9_TAB_CLOSE, KC_TRNS,
|
|
|
|
KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
2017-11-13 23:50:39 +00:00
|
|
|
// left thumb cluster
|
2018-07-26 21:21:55 +00:00
|
|
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
|
|
|
|
2018-06-13 04:55:08 +00:00
|
|
|
|
2017-11-13 23:50:39 +00:00
|
|
|
// right hand
|
|
|
|
KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MEH(KC_G),
|
|
|
|
KC_TRNS,KC_NO, KC_HOME, KC_UP, KC_END, KC_PGUP, MEH(KC_H),
|
|
|
|
LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT), MEH(KC_I),
|
2018-07-26 21:21:55 +00:00
|
|
|
KC_TRNS,M(DEL_TO_HOME),RCTL(KC_C), RCTL(KC_X), RCTL(KC_V), KC_PGDOWN, MEH(KC_J),
|
2017-11-13 23:50:39 +00:00
|
|
|
KC_BSPC, RCTL(KC_BSPC), KC_DELETE, LCTL(KC_DELETE), MEH(KC_K),
|
2018-06-13 04:55:08 +00:00
|
|
|
|
2017-11-13 23:50:39 +00:00
|
|
|
// right thumb cluster
|
|
|
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS
|
2018-06-13 04:55:08 +00:00
|
|
|
),
|
|
|
|
|
2017-11-13 23:50:39 +00:00
|
|
|
// key selection layer
|
2018-06-13 04:55:08 +00:00
|
|
|
[KEYSEL] = LAYOUT_ergodox(
|
2017-11-13 23:50:39 +00:00
|
|
|
// 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,
|
|
|
|
// bottom row
|
2018-02-23 18:16:40 +00:00
|
|
|
RESET,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
2017-11-13 23:50:39 +00:00
|
|
|
// 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_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),
|
|
|
|
// bottom row
|
|
|
|
KC_BSPC, RCTL(KC_BSPC), KC_DELETE, LCTL(KC_DELETE), MEH(KC_U),
|
|
|
|
// thumb cluster
|
|
|
|
KC_TRNS, KC_TRNS,
|
|
|
|
KC_TRNS,
|
|
|
|
KC_TRNS, KC_TRNS, KC_TRNS
|
2018-06-13 04:55:08 +00:00
|
|
|
),
|
|
|
|
|
2017-09-16 02:00:26 +00:00
|
|
|
// shell navigation layer
|
2018-06-13 04:55:08 +00:00
|
|
|
[SHELL_NAV] = LAYOUT_ergodox(
|
2017-09-16 02:00:26 +00:00
|
|
|
// left hand
|
2018-02-23 18:16:40 +00:00
|
|
|
KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
2018-07-26 21:21:55 +00:00
|
|
|
KC_TRNS,KC_TRNS, SHELL_PGREP, SHELL_PLESS, SHELL_LESS, SHELL_HTCBOUNCE, SHELL_H3,
|
2018-02-23 18:16:40 +00:00
|
|
|
KC_TRNS,SHELL_MKE, SHELL_CDPRE, SHELL_LSLTR, SHELL_LS, SHELL_LSLA,
|
2017-11-13 23:50:39 +00:00
|
|
|
KC_TRNS,SHELL_SCREEN_LIST, SHELL_SCREENRD, SHELL_SCREEN_NEW, SHELL_TAILF, SHELL_HTCSTATUS, SHELL_AMMCOLO,
|
2017-09-16 02:00:26 +00:00
|
|
|
// bottom row
|
|
|
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
|
|
|
// thumb cluster
|
|
|
|
KC_TRNS,KC_TRNS,
|
2017-11-06 17:07:21 +00:00
|
|
|
KC_TRNS,
|
|
|
|
KC_TRNS,KC_TRNS,KC_TRNS,
|
2017-09-16 02:00:26 +00:00
|
|
|
// right hand
|
2018-07-26 21:21:55 +00:00
|
|
|
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,
|
2018-02-23 18:16:40 +00:00
|
|
|
LALT(KC_B), KC_LEFT, KC_DOWN, KC_RIGHT, LALT(KC_F), RCTL(KC_W),
|
2018-09-13 16:12:03 +00:00
|
|
|
RCTL(KC_C), RCTL(KC_U), LALT(KC_DOT), RCTL(KC_R), KC_BTN2, RCTL(KC_K), SHELL_DUMPTLOG,
|
2017-11-06 17:07:21 +00:00
|
|
|
// bottom row (match functionality of base layer)
|
2017-11-13 23:50:39 +00:00
|
|
|
KC_BSPC, RCTL(KC_W), KC_DELETE, LALT(KC_D), RCTL(KC_U),
|
2017-09-16 02:00:26 +00:00
|
|
|
// thumb cluster
|
|
|
|
KC_TRNS, KC_TRNS,
|
|
|
|
KC_TRNS,
|
|
|
|
KC_TRNS, KC_TRNS, KC_TRNS
|
|
|
|
),
|
2018-06-13 04:55:08 +00:00
|
|
|
|
2017-09-16 02:00:26 +00:00
|
|
|
|
2017-11-06 17:07:21 +00:00
|
|
|
// linux screen layer
|
2018-06-13 04:55:08 +00:00
|
|
|
[SHELL_SCREEN] = LAYOUT_ergodox(
|
2017-11-06 17:07:21 +00:00
|
|
|
// left hand
|
2018-02-23 18:16:40 +00:00
|
|
|
KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
2017-11-06 17:07:21 +00:00
|
|
|
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, M(SCREEN_NEW_TAB), M(SCREEN_7), M(SCREEN_8), M(SCREEN_9), M(SCREEN_RENAME), KC_TRNS,
|
|
|
|
M(SCREEN_TAB_LEFT), M(SCREEN_4), M(SCREEN_5), M(SCREEN_6), M(SCREEN_TAB_RIGHT), KC_TRNS,
|
|
|
|
KC_TRNS, KC_TRNS, M(SCREEN_1), M(SCREEN_2), M(SCREEN_3), M(SCREEN_NUMBER), KC_TRNS,
|
|
|
|
// bottom row
|
|
|
|
M(SCREEN_0), KC_TRNS, KC_TRNS, KC_TRNS, M(SCREEN_DETACH),
|
|
|
|
// thumb cluster
|
|
|
|
KC_TRNS, KC_TRNS,
|
|
|
|
KC_TRNS,
|
|
|
|
KC_TRNS, KC_TRNS, KC_TRNS
|
|
|
|
),
|
|
|
|
|
2018-02-23 18:16:40 +00:00
|
|
|
// navigation within screen (for copy/paste)
|
2018-06-13 04:55:08 +00:00
|
|
|
[SCREEN_NAV] = LAYOUT_ergodox(
|
2018-02-23 18:16:40 +00:00
|
|
|
// left hand
|
|
|
|
// left hand
|
|
|
|
KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
|
|
KC_TRNS,KC_TRNS, M(SCREEN_READREG_3), M(SCREEN_READREG_2), M(SCREEN_READREG_1), KC_TRNS, KC_TRNS,
|
|
|
|
KC_TRNS,KC_TRNS, M(SCREEN_PASTEREG_3), M(SCREEN_PASTEREG_2), M(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, M(SCREEN_UP_JUMP), KC_TRNS,
|
|
|
|
KC_B, KC_LEFT, KC_DOWN, KC_RIGHT, KC_W, M(SCREEN_COPY_MODE),
|
|
|
|
KC_TRNS, KC_TRNS, S(KC_W), S(KC_Y), M(SCREEN_PASTE), M(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
|
|
|
|
),
|
|
|
|
|
|
|
|
|
2018-06-13 04:55:08 +00:00
|
|
|
|
|
|
|
|
|
|
|
[COMBINED] = LAYOUT_ergodox(
|
|
|
|
|
2017-11-13 23:50:39 +00:00
|
|
|
// left hand
|
|
|
|
KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
|
|
KC_TRNS,KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_TRNS,
|
|
|
|
KC_TRNS,KC_LPRN, KC_RPRN, KC_LBRACKET, KC_RBRACKET, 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,
|
|
|
|
// thumb cluster
|
|
|
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
2018-06-13 04:55:08 +00:00
|
|
|
|
2017-11-13 23:50:39 +00:00
|
|
|
// 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),
|
2018-06-13 04:55:08 +00:00
|
|
|
// bottom row
|
2017-11-13 23:50:39 +00:00
|
|
|
KC_0, KC_DOT, KC_PIPE, KC_BSLS, MEH(KC_P),
|
|
|
|
// thumb cluster
|
2018-02-23 18:16:40 +00:00
|
|
|
KC_TRNS,KC_TRNS,
|
|
|
|
KC_TRNS,
|
2018-03-16 20:21:00 +00:00
|
|
|
KC_TRNS,KC_TRNS,KC_TRNS),
|
2018-07-26 21:21:55 +00:00
|
|
|
|
|
|
|
|
2018-06-13 04:55:08 +00:00
|
|
|
[BROWSER_CONTROL] = LAYOUT_ergodox(
|
2018-02-23 18:16:40 +00:00
|
|
|
// left hand
|
|
|
|
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,
|
|
|
|
// bottom row
|
|
|
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
2018-06-13 04:55:08 +00:00
|
|
|
|
2018-02-23 18:16:40 +00:00
|
|
|
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_UP, KC_PGUP, KC_PGDN, KC_MS_WH_UP, KC_TRNS, KC_TRNS,
|
|
|
|
KC_DOWN, RSFT(RCTL(KC_TAB)), RCTL(KC_TAB), KC_MS_WH_DOWN, LALT(KC_LEFT), KC_TRNS,
|
|
|
|
KC_TRNS, KC_TRNS, RCTL(KC_1), RCTL(KC_9), KC_F6, KC_F5, KC_TRNS,
|
|
|
|
// bottom row
|
|
|
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
|
|
KC_TRNS, KC_TRNS,
|
|
|
|
KC_TRNS,
|
|
|
|
KC_TRNS, RCTL(KC_W), RCTL(KC_T)
|
2018-06-13 04:55:08 +00:00
|
|
|
),
|
|
|
|
|
2017-09-16 02:00:26 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
const uint16_t PROGMEM fn_actions[] = {
|
|
|
|
[1] = ACTION_LAYER_TAP_TOGGLE(1)
|
|
|
|
};
|
|
|
|
|
|
|
|
// leaving this in place for compatibilty with old keymaps cloned and re-compiled.
|
|
|
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
|
|
|
{
|
|
|
|
switch(id) {
|
|
|
|
case SCREEN_TAB_LEFT:
|
|
|
|
if (record->event.pressed) {
|
|
|
|
return MACRO( D(LCTL), T(A), U(LCTL), T(P), END);
|
2018-06-13 04:55:08 +00:00
|
|
|
}
|
2017-09-16 02:00:26 +00:00
|
|
|
break;
|
|
|
|
case SCREEN_TAB_RIGHT:
|
|
|
|
if (record->event.pressed) {
|
|
|
|
return MACRO( D(LCTL), T(A), U(LCTL), T(N), END);
|
2018-06-13 04:55:08 +00:00
|
|
|
}
|
2017-09-16 02:00:26 +00:00
|
|
|
break;
|
|
|
|
case SCREEN_NEW_TAB:
|
|
|
|
if (record->event.pressed) {
|
|
|
|
return MACRO( D(LCTL), T(A), U(LCTL), T(C), END);
|
2018-06-13 04:55:08 +00:00
|
|
|
}
|
2017-09-16 02:00:26 +00:00
|
|
|
break;
|
2017-11-06 17:07:21 +00:00
|
|
|
case SCREEN_DETACH:
|
|
|
|
if (record->event.pressed) {
|
|
|
|
return MACRO( D(LCTL), T(A), U(LCTL), T(D), END);
|
2017-11-13 23:50:39 +00:00
|
|
|
}
|
2018-06-13 04:55:08 +00:00
|
|
|
break;
|
2017-11-06 17:07:21 +00:00
|
|
|
case SCREEN_RENAME:
|
|
|
|
if (record->event.pressed) {
|
|
|
|
return MACRO( D(LCTL), T(A), U(LCTL), D(LSFT), T(A), U(LSFT), END);
|
2018-06-13 04:55:08 +00:00
|
|
|
}
|
|
|
|
break;
|
2017-11-06 17:07:21 +00:00
|
|
|
case SCREEN_NUMBER:
|
|
|
|
if (record->event.pressed) {
|
|
|
|
return MACRO( D(LCTL), T(A), U(LCTL), D(LSFT), T(SCOLON), U(LSFT),
|
2017-11-13 23:50:39 +00:00
|
|
|
T(N),
|
|
|
|
T(U),
|
|
|
|
T(M),
|
|
|
|
T(B),
|
|
|
|
T(E),
|
|
|
|
T(R),
|
|
|
|
T(SPC),
|
|
|
|
END);
|
2018-06-13 04:55:08 +00:00
|
|
|
}
|
|
|
|
break;
|
2017-11-06 17:07:21 +00:00
|
|
|
|
2018-02-23 18:16:40 +00:00
|
|
|
MACRO_SCREEN_REG(SCREEN_READREG_1,1);
|
|
|
|
MACRO_SCREEN_REG(SCREEN_READREG_2,2);
|
|
|
|
MACRO_SCREEN_REG(SCREEN_READREG_3,3);
|
2018-06-13 04:55:08 +00:00
|
|
|
|
2018-02-23 18:16:40 +00:00
|
|
|
MACRO_SCREEN_PASTE(SCREEN_PASTEREG_1,1);
|
|
|
|
MACRO_SCREEN_PASTE(SCREEN_PASTEREG_2,2);
|
|
|
|
MACRO_SCREEN_PASTE(SCREEN_PASTEREG_3,3);
|
|
|
|
|
2017-11-13 23:50:39 +00:00
|
|
|
MACRO_SCREEN_NUM(SCREEN_0,0);
|
|
|
|
MACRO_SCREEN_NUM(SCREEN_1,1);
|
|
|
|
MACRO_SCREEN_NUM(SCREEN_2,2);
|
|
|
|
MACRO_SCREEN_NUM(SCREEN_3,3);
|
|
|
|
MACRO_SCREEN_NUM(SCREEN_4,4);
|
|
|
|
MACRO_SCREEN_NUM(SCREEN_5,5);
|
|
|
|
MACRO_SCREEN_NUM(SCREEN_6,6);
|
|
|
|
MACRO_SCREEN_NUM(SCREEN_7,7);
|
|
|
|
MACRO_SCREEN_NUM(SCREEN_8,8);
|
|
|
|
MACRO_SCREEN_NUM(SCREEN_9,9);
|
2018-06-13 04:55:08 +00:00
|
|
|
|
2018-02-23 18:16:40 +00:00
|
|
|
case SCREEN_UP_JUMP:
|
|
|
|
if (record->event.pressed) {
|
|
|
|
return MACRO( T(5), T(UP), END);
|
2018-06-13 04:55:08 +00:00
|
|
|
}
|
2018-02-23 18:16:40 +00:00
|
|
|
break;
|
2018-06-13 04:55:08 +00:00
|
|
|
|
2018-02-23 18:16:40 +00:00
|
|
|
case SCREEN_DOWN_JUMP:
|
|
|
|
if (record->event.pressed) {
|
|
|
|
return MACRO( T(5), T(DOWN), END);
|
2018-06-13 04:55:08 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2017-09-16 02:00:26 +00:00
|
|
|
case SCREEN_COPY_MODE:
|
|
|
|
if (record->event.pressed) {
|
|
|
|
return MACRO( D(LCTL), T(A), U(LCTL), T(ESC), END);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case SCREEN_PASTE:
|
|
|
|
if (record->event.pressed) {
|
2018-06-13 04:55:08 +00:00
|
|
|
return MACRO( D(LCTL), T(A), U(LCTL), T(RBRC), END);
|
2017-09-16 02:00:26 +00:00
|
|
|
}
|
2018-07-26 21:21:55 +00:00
|
|
|
break;
|
2018-06-13 04:55:08 +00:00
|
|
|
|
2018-07-26 21:21:55 +00:00
|
|
|
case DEL_TO_HOME:
|
2017-09-16 02:00:26 +00:00
|
|
|
if (record->event.pressed) {
|
2018-07-26 21:21:55 +00:00
|
|
|
return MACRO(
|
|
|
|
// delete to the beginning of the line
|
|
|
|
D(LSFT), T(HOME), U(LSFT),
|
|
|
|
T(DELETE),
|
|
|
|
END);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
2017-09-16 02:00:26 +00:00
|
|
|
}
|
|
|
|
return MACRO_NONE;
|
|
|
|
};
|
|
|
|
|
|
|
|
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;
|
|
|
|
}
|
2018-06-13 04:55:08 +00:00
|
|
|
|
2017-11-06 17:07:21 +00:00
|
|
|
// shell macros
|
|
|
|
if(record->event.pressed) {
|
2017-11-13 23:50:39 +00:00
|
|
|
switch (keycode) {
|
|
|
|
case SHELL_LS:
|
|
|
|
SEND_STRING("ls\n");
|
|
|
|
return true;
|
|
|
|
break;
|
|
|
|
case SHELL_LSLTR:
|
|
|
|
SEND_STRING("ls -ltr\n");
|
|
|
|
return true;
|
|
|
|
break;
|
2018-02-23 18:16:40 +00:00
|
|
|
case SHELL_LSLA:
|
|
|
|
SEND_STRING("ls -la\n");
|
|
|
|
return true;
|
|
|
|
break;
|
2017-11-13 23:50:39 +00:00
|
|
|
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;
|
2018-06-13 04:55:08 +00:00
|
|
|
break;
|
2017-11-13 23:50:39 +00:00
|
|
|
case SHELL_TAILF:
|
|
|
|
SEND_STRING("tail -f ");
|
|
|
|
return true;
|
|
|
|
break;
|
|
|
|
case SHELL_PWD:
|
|
|
|
SEND_STRING("echo `pwd`/");
|
|
|
|
return true;
|
2018-06-13 04:55:08 +00:00
|
|
|
break;
|
2017-11-13 23:50:39 +00:00
|
|
|
case SHELL_H3:
|
|
|
|
SEND_STRING("h3\n");
|
|
|
|
return true;
|
2018-06-13 04:55:08 +00:00
|
|
|
break;
|
2017-11-13 23:50:39 +00:00
|
|
|
case SHELL_AMMCOLO:
|
|
|
|
SEND_STRING("ammcolo\n");
|
|
|
|
return true;
|
2018-06-13 04:55:08 +00:00
|
|
|
break;
|
2017-11-13 23:50:39 +00:00
|
|
|
case SHELL_SCREENRD:
|
|
|
|
SEND_STRING("screen -r -d ");
|
|
|
|
return true;
|
2018-06-13 04:55:08 +00:00
|
|
|
break;
|
2017-11-13 23:50:39 +00:00
|
|
|
case SHELL_SCREEN_NEW:
|
|
|
|
SEND_STRING("screen -S ");
|
|
|
|
return true;
|
|
|
|
break;
|
|
|
|
case SHELL_SCREEN_LIST:
|
|
|
|
SEND_STRING("screen -list\n");
|
|
|
|
return true;
|
2018-06-13 04:55:08 +00:00
|
|
|
break;
|
2017-11-13 23:50:39 +00:00
|
|
|
case SHELL_MKE:
|
2018-07-26 21:21:55 +00:00
|
|
|
SEND_STRING("mki -j8\n");
|
2017-11-13 23:50:39 +00:00
|
|
|
return true;
|
2018-06-13 04:55:08 +00:00
|
|
|
break;
|
2017-11-13 23:50:39 +00:00
|
|
|
case SHELL_HTCSTATUS:
|
|
|
|
SEND_STRING("htcStatus -j ");
|
|
|
|
return true;
|
2018-07-26 21:21:55 +00:00
|
|
|
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_LCTRL("x")SS_LSFT("8"));
|
|
|
|
break;
|
|
|
|
case SHELL_EXPAND_OE_TRANPATTERN:
|
|
|
|
SEND_STRING(SS_TAP(X_LEFT)"*CQW_HKEX"SS_TAP(X_END)"*.tran"SS_LCTRL("x")SS_LSFT("8"));
|
|
|
|
break;
|
|
|
|
case SHELL_DUMPTLOG:
|
|
|
|
SEND_STRING(" | dumptlog - ");
|
|
|
|
return true;
|
|
|
|
break;
|
|
|
|
// Cloud9 macros
|
|
|
|
case CLOUD9_TAB_LEFT:
|
2018-02-23 18:16:40 +00:00
|
|
|
SEND_STRING(SS_LCTRL("["));
|
2018-06-13 04:55:08 +00:00
|
|
|
return true;
|
2018-02-23 18:16:40 +00:00
|
|
|
break;
|
|
|
|
case CLOUD9_TAB_RIGHT:
|
|
|
|
SEND_STRING(SS_LCTRL("]"));
|
2018-06-13 04:55:08 +00:00
|
|
|
return true;
|
2018-02-23 18:16:40 +00:00
|
|
|
break;
|
|
|
|
case CLOUD9_TAB_CLOSE:
|
|
|
|
SEND_STRING(SS_LALT("w"));
|
2018-06-13 04:55:08 +00:00
|
|
|
return true;
|
2018-02-23 18:16:40 +00:00
|
|
|
break;
|
|
|
|
case CLOUD9_GOTO_SYMBOL:
|
|
|
|
SEND_STRING(SS_LSFT(SS_LCTRL("e")));
|
2018-06-13 04:55:08 +00:00
|
|
|
return true;
|
2018-02-23 18:16:40 +00:00
|
|
|
break;
|
|
|
|
case CLOUD9_GOTO_LINE:
|
|
|
|
SEND_STRING(SS_LCTRL("g"));
|
2018-06-13 04:55:08 +00:00
|
|
|
return true;
|
2018-02-23 18:16:40 +00:00
|
|
|
break;
|
|
|
|
case CLOUD9_NAVIGATE:
|
|
|
|
SEND_STRING(SS_LCTRL("e"));
|
|
|
|
return true;
|
|
|
|
break;
|
2018-06-13 04:55:08 +00:00
|
|
|
|
2017-11-13 23:50:39 +00:00
|
|
|
}
|
2017-11-06 17:07:21 +00:00
|
|
|
}
|
2018-06-13 04:55:08 +00:00
|
|
|
|
2017-09-16 02:00:26 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
void led_set_user(uint8_t usb_led) {
|
|
|
|
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
|
|
|
ergodox_right_led_1_on();
|
|
|
|
} else {
|
|
|
|
ergodox_right_led_1_off();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void matrix_scan_user(void) {
|
|
|
|
|
|
|
|
uint8_t layer = biton32(layer_state);
|
|
|
|
|
|
|
|
ergodox_board_led_off();
|
|
|
|
ergodox_right_led_2_off();
|
|
|
|
ergodox_right_led_3_off();
|
|
|
|
switch (layer) {
|
2017-11-13 23:50:39 +00:00
|
|
|
case COMBINED:
|
2018-06-13 04:55:08 +00:00
|
|
|
ergodox_right_led_2_on();
|
2017-11-13 23:50:39 +00:00
|
|
|
break;
|
2018-06-13 04:55:08 +00:00
|
|
|
case SHELL_NAV:
|
2017-11-13 23:50:39 +00:00
|
|
|
case SHELL_SCREEN:
|
|
|
|
case KEYNAV:
|
|
|
|
case KEYSEL:
|
2018-02-23 18:16:40 +00:00
|
|
|
case SCREEN_NAV:
|
2017-11-13 23:50:39 +00:00
|
|
|
ergodox_right_led_3_on();
|
|
|
|
break;
|
2018-07-26 21:21:55 +00:00
|
|
|
case BROWSER_CONTROL:
|
2017-09-16 02:00:26 +00:00
|
|
|
ergodox_right_led_2_on();
|
|
|
|
ergodox_right_led_3_on();
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|