Skip to content

Commit

Permalink
Reduce dependence on bottom row
Browse files Browse the repository at this point in the history
Reduce dependence on bottom row keys in preparation for using an Iris.

 - Replace grave with esc on base layers
 - Add grave back with nav/coding layers
 - Remove cursor keys from base layers
 - Replace right-shift with nav layer TT
 - Make L thumb enter "alt" when held
 - Use semicolon for fn layer-tap
  • Loading branch information
p00ya committed Oct 6, 2022
1 parent 85420e7 commit bc22767
Showing 1 changed file with 44 additions and 27 deletions.
71 changes: 44 additions & 27 deletions keyboards/ergodox_ez/keymaps/p00ya_dvorak/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#define L_FN 7

// Dvorak-remapped keycodes for some punctuation.
#define KD_SCLN KC_Z
#define KD_LBRC KC_MINS
#define KD_RBRC KC_EQL
#define KD_LCBR KC_UNDS
Expand All @@ -24,6 +25,21 @@
#define KD_LABK LSFT(KC_W)
#define KD_RABK LSFT(KC_E)

// Layer-tap for QWERTY Z / fn.
#define LT_QFN LT(L_FN, KC_Z)

// Layer-tap for Dvorak semicolon / fn.
#define LT_DFN LT(L_FN, KC_SCLN)

// Layer-tap for space / coding layer (OS Dvorak remapping).
#define LT_DVC LT(L_DVC, KC_SPC)

// Layer-tap for space / coding layer (in-keyboard Dvorak remapping).
#define LT_COD LT(L_COD, KC_SPC)

// Mod-tap for Enter / alt.
#define MT_ENT MT(MOD_LALT, KC_ENT)

// defined in bootmagic.c.
extern keymap_config_t keymap_config;

Expand All @@ -43,28 +59,29 @@ enum {
// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// Base layer should mostly act like a 60% US (QWERTY) layout, with some of
// the right pinky keys missing, and caps-lock remapped as ctrl.
// the right pinky keys missing, caps-lock remapped as ctrl, and grave
// replaced with esc.
[0] = LAYOUT_ergodox_pretty(
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, MO(L_NUM), TT(L_NUM), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, _______, _______, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_CAPS, TT(L_NAV), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
MO(L_FN),KC_ESC, KC_1NXT, KC_LALT, KC_LCMD, KC_RCMD, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT,
KC_LSFT, LT_QFN, KC_X, KC_C, KC_V, KC_B, KC_1NXT, TT(L_NUM), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, TT(L_NAV),
_______, _______, _______, _______, KC_LCMD, KC_RCMD, KC_RALT, _______, _______, _______,
_______, KC_PSCR, KC_HOME, KC_END,
KC_PGUP, KC_INS,
LT(L_DVC,KC_SPC), KC_ENT, KC_PGDN, KC_DEL, KC_ENT, KC_SPC
LT_DVC, MT_ENT, KC_PGDN, KC_DEL, _______, KC_SPC
),
// Dvorak base layer (with caps-lock as control), for when OS remapping isn't
// available.
[L_DVO] = LAYOUT_ergodox_pretty(
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
_______, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, MO(L_NUM), TT(L_NUM), KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH,
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
_______, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, _______, _______, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH,
KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS,
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_CAPS, TT(L_NAV), KC_B, KC_M, KC_W, KC_V, KC_Z, _______,
MO(L_FN),KC_ESC, KC_1NXT, KC_LALT, KC_LCMD, KC_RCMD, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT,
KC_LSFT, LT_DFN, KC_Q, KC_J, KC_K, KC_X, KC_1NXT, TT(L_NUM), KC_B, KC_M, KC_W, KC_V, KC_Z, TT(L_NAV),
_______, _______, _______, KC_LALT, KC_LCMD, KC_RCMD, KC_RALT, _______, _______, _______,
_______, KC_PSCR, KC_HOME, KC_END,
KC_PGUP, KC_INS,
LT(L_COD,KC_SPC), KC_ENT, KC_PGDN, KC_DEL, KC_ENT, KC_SPC
LT_COD, MT_ENT, KC_PGDN, KC_DEL, _______, KC_SPC
),
// Simulates a numpad with the 5-key aligned with QWERTY's J-key.
// Num-zero and enter keys are duplicated to the thumb clusters.
Expand All @@ -73,46 +90,46 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______, _______, _______, _______, _______, _______, KC_KP_7, KC_KP_8, KC_KP_9, KC_PPLS, XXXXXXX, _______,
_______, _______, _______, _______, _______, _______, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, XXXXXXX, _______,
_______, _______, _______, _______, _______, _______, _______, _______, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, XXXXXXX, _______,
_______, _______, _______, _______, _______, KC_KP_0, KC_PDOT, KC_PENT, XXXXXXX, KC_NO,
_______, _______, _______, _______, _______, KC_KP_0, KC_PDOT, KC_PENT, XXXXXXX, XXXXXXX,
_______, _______, _______, _______,
_______, _______,
_______, KC_PENT, _______, _______, KC_PENT, KC_KP_0
),
// Dirpad / navigation pad on the right hand with a standard US layout.
[L_NAV] = LAYOUT_ergodox_pretty(
_______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_LBRC, KC_RBRC, _______,
_______, KC_Q, KC_W, KC_E, KC_R, KC_T, XXXXXXX, _______, KC_INS, KC_HOME, KC_PGUP, _______, _______, _______,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_DEL, KC_END, KC_PGDN, _______, _______, _______,
_______, KC_Z, KC_X, KC_C, KC_V, KC_B, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, _______,
KC_LCTL, _______, XXXXXXX, _______, KC_LALT, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_LBRC, KC_RBRC, _______,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, XXXXXXX, _______, KC_INS, KC_HOME, KC_PGUP, XXXXXXX, XXXXXXX, _______,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_DEL, KC_END, KC_PGDN, KC_UP, XXXXXXX, _______,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, XXXXXXX, _______, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, _______,
KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, KC_LALT, KC_RALT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
KC_F9, KC_F10, _______, _______,
KC_WH_U, _______,
KC_SPC, _______, KC_WH_D, _______, KC_RCMD, KC_TRNS
KC_SPC, _______, KC_WH_D, _______, KC_RCMD, _______
),
// Coding layer, for use when there is *no* OS remapping.
// Moves various brackets and symbols to the right hand, particularly
// optimizing for C-like programming languages.
[L_COD] = LAYOUT_ergodox_pretty(
_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LBRC, KC_RBRC, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_0, KC_LCBR, KC_RCBR, XXXXXXX, KC_BSLS,
KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LBRC, KC_RBRC, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_GRV, KC_LCBR, KC_RCBR, XXXXXXX, KC_BSLS,
_______, KC_LSFT, KC_LCTL, KC_LALT, KC_LCMD, _______, _______, KC_LPRN, KC_RPRN, KC_EQL, KC_ENT, _______,
_______, _______, _______, _______, _______, _______, _______, _______, KC_LABK, KC_EXLM, KC_DQUO, KC_COLN, KC_RABK, KC_PLUS,
_______, KC_SCLN, _______, _______, _______, _______, _______, _______, KC_LABK, KC_EXLM, KC_DQUO, KC_COLN, KC_RABK, KC_PLUS,
_______, _______, _______, _______, _______, KC_UNDS, _______, _______, _______, _______,
_______, _______, _______, _______,
_______, _______,
_______, _______, _______, _______, _______, KC_TRNS
_______, _______, _______, _______, _______, _______
),
// Additional overlay for use with L_COD when an OS (software) QWERTY to
// Dvorak mapping is in use.
[L_DVC] = LAYOUT_ergodox_pretty(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KD_LBRC, KD_RBRC, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KD_LCBR, KD_RCBR, XXXXXXX, KC_BSLS,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KD_LCBR, KD_RCBR, XXXXXXX, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, KD_EQL, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, KD_LABK, _______, KD_DQUO, KD_COLN, KD_RABK, KD_PLUS,
_______, KD_SCLN, _______, _______, _______, _______, _______, _______, KD_LABK, _______, KD_DQUO, KD_COLN, KD_RABK, KD_PLUS,
_______, _______, _______, _______, _______, KD_UNDS, _______, _______, _______, _______,
_______, _______, _______, _______,
_______, _______,
_______, _______, _______, _______, _______, KC_TRNS
_______, _______, _______, _______, _______, _______
),
// Function layer. This makes MO(L_FN) feel like the "fn" modifier key on a
// Mac, enabling a function key row, some media keys, and some Apple-like
Expand All @@ -122,10 +139,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, KC_BRMD, KC_BRMU, XXXXXXX, XXXXXXX, XXXXXXX, DF(0), KC_MPLY, KC_MPRV, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX,
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DF(1), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
_______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END,
_______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
MAGIC_TOGGLE_NKRO, WEBUSB_PAIR, _______, _______,
_______, _______,
_______, KC_PENT, _______, _______, _______, KC_TRNS
_______, KC_PENT, _______, _______, _______, _______
)
};
// clang-format on
Expand Down

0 comments on commit bc22767

Please sign in to comment.