From ebe351a6905d5031d5383b4ad7fe551e0e844d52 Mon Sep 17 00:00:00 2001 From: lucwastiaux Date: Thu, 15 Dec 2016 07:22:31 +0800 Subject: [PATCH 1/6] enable brackets using the - key on the right, and cleanups --- .../ergodox/keymaps/dvorak_programmer/keymap.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c index f3d02f688d..3d7e1893c9 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c +++ b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c @@ -58,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = KEYMAP( // layer 0 : default // left hand KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, - LT(MOUSE,KC_TAB), KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, MO(KEY_SEL), + LT(MOUSE,KC_TAB), KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, MO(KEY_SEL), MO(SHELL_NAV), KC_A, KC_O, KC_E, KC_U, KC_I, KC_FN3, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, MO(KEY_NAV), OSL(SHORTCUTS),KC_FN4, KC_FN5,OSL(SYMBOL),MO(NUMBER), @@ -69,7 +69,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // right hand KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSLS, KC_PGUP, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, - KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, + KC_D, KC_H, KC_T, KC_N, KC_S, LT(BRACKETS,KC_MINS), KC_PGDN, KC_B, KC_M, KC_W, KC_V, KC_Z, TD(TD_SHIFT_CAPSLOCK), // lower keys - browser tab control RSFT(RCTL(KC_TAB)), RCTL(KC_TAB), RCTL(KC_T), LALT(KC_LEFT), RCTL(KC_W), @@ -209,12 +209,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BRACKETS] = KEYMAP( // left 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, - 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,M(OPEN_CLOSE_CURLY), M(OPEN_CLOSE_PAREN),M(OPEN_CLOSE_BRACKET), KC_TRNS,KC_TRNS, + KC_TRNS,KC_LPRN, KC_RPRN, KC_LBRC, KC_RBRC, KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, KC_LCBR, KC_RCBR, 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, // right hand From 1ac15e6b3a6c43669d5b107e4ca550d2aa7c284c Mon Sep 17 00:00:00 2001 From: lucwastiaux Date: Tue, 17 Jan 2017 20:34:05 +0800 Subject: [PATCH 2/6] put shell nav under tab, introduce an OSL for the brackets layer --- keyboards/ergodox/keymaps/dvorak_programmer/keymap.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c index 3d7e1893c9..2a64331dbb 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c +++ b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c @@ -58,18 +58,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = KEYMAP( // layer 0 : default // left hand KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, - LT(MOUSE,KC_TAB), KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, MO(KEY_SEL), - MO(SHELL_NAV), KC_A, KC_O, KC_E, KC_U, KC_I, + LT(SHELL_NAV,KC_TAB), KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, MO(KEY_SEL), + OSL(BRACKETS), KC_A, KC_O, KC_E, KC_U, KC_I, KC_FN3, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, MO(KEY_NAV), OSL(SHORTCUTS),KC_FN4, KC_FN5,OSL(SYMBOL),MO(NUMBER), // thumb cluster - MO(BRACKETS), RCTL(KC_S), + MO(MOUSE), RCTL(KC_S), RCTL(KC_DEL), KC_BSPC,RCTL(KC_BSPC),KC_DEL, // right hand KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSLS, KC_PGUP, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, - KC_D, KC_H, KC_T, KC_N, KC_S, LT(BRACKETS,KC_MINS), + KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_PGDN, KC_B, KC_M, KC_W, KC_V, KC_Z, TD(TD_SHIFT_CAPSLOCK), // lower keys - browser tab control RSFT(RCTL(KC_TAB)), RCTL(KC_TAB), RCTL(KC_T), LALT(KC_LEFT), RCTL(KC_W), @@ -406,6 +406,7 @@ void matrix_scan_user(void) { switch (layer) { case NUMBER: case SYMBOL: + case BRACKETS: ergodox_right_led_2_on(); break; case KEY_NAV: From 072237bce814fd49765be7f5a6fcb57821c1e31d Mon Sep 17 00:00:00 2001 From: lucwastiaux Date: Thu, 19 Jan 2017 22:45:30 +0800 Subject: [PATCH 3/6] introduce shell_layer --- .../keymaps/dvorak_programmer/keymap.c | 34 +++++++++++++++++-- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c index 2a64331dbb..c4b99d55a0 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c +++ b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c @@ -6,7 +6,8 @@ #include "action_code.h" #define BASE 0 // default layer -#define SHELL_NAV 1 +#define SHELL_LAYER 1 +#define SHELL_NAV 2 #define KEY_NAV 3 // key navigation layer #define KEY_SEL 4 // key selection layer #define NUMBER 5 // number layer @@ -58,7 +59,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = KEYMAP( // layer 0 : default // left hand KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, - LT(SHELL_NAV,KC_TAB), KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, MO(KEY_SEL), + LT(SHELL_NAV,KC_TAB), KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, MO(KEY_SEL), OSL(BRACKETS), KC_A, KC_O, KC_E, KC_U, KC_I, KC_FN3, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, MO(KEY_NAV), OSL(SHORTCUTS),KC_FN4, KC_FN5,OSL(SYMBOL),MO(NUMBER), @@ -80,6 +81,32 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), +// permanent shell layer - meant to be used while in a terminal +[SHELL_LAYER] = KEYMAP( + // left hand + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,M(SCREEN_COPY_MODE), M(SCREEN_PASTE),M(SHELL_RECALL_LAST_ARG_REMOVE_FIRST_COMMAND), + KC_TAB, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,RCTL(KC_R), + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,LALT(KC_DOT), + // bottom row + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + // thumb cluster + LALT(KC_B),LALT(KC_F), + LALT(KC_D), + KC_TRNS,RCTL(KC_W),KC_TRNS, + // right hand + RCTL(KC_C), KC_LEFT, KC_RIGHT, RCTL(KC_U), RCTL(KC_K), KC_TRNS, KC_TRNS, + KC_UP, 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_DOWN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + // bottom row + M(SCREEN_TAB_LEFT), M(SCREEN_TAB_RIGHT), M(SCREEN_NEW_TAB), KC_TRNS, KC_TRNS, + // thumb cluster + KC_TRNS, KC_TRNS, + KC_TRNS, + MEH(KC_V), KC_TRNS, KC_TRNS +), + // shell navigation layer [SHELL_NAV] = KEYMAP( // left hand @@ -246,7 +273,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { MEH(KC_S), MEH(KC_T), MEH(KC_U), MEH(KC_V), MEH(KC_X), MEH(KC_6), MEH(KC_7), MEH(KC_8), - MEH(KC_9), MEH(KC_Y), MEH(KC_Z) + MEH(KC_9), TO(BASE), TO(SHELL_LAYER) ), @@ -407,6 +434,7 @@ void matrix_scan_user(void) { case NUMBER: case SYMBOL: case BRACKETS: + //case SHELL_LAYER: ergodox_right_led_2_on(); break; case KEY_NAV: From 01e750a37230fd7df9ef57a9d1564bde4bee6da6 Mon Sep 17 00:00:00 2001 From: lucwastiaux Date: Sat, 21 Jan 2017 23:15:37 +0800 Subject: [PATCH 4/6] couple of changes to the shell layer --- keyboards/ergodox/keymaps/dvorak_programmer/keymap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c index c4b99d55a0..2bb5bcd12b 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c +++ b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c @@ -100,11 +100,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DOWN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, // bottom row - M(SCREEN_TAB_LEFT), M(SCREEN_TAB_RIGHT), M(SCREEN_NEW_TAB), KC_TRNS, KC_TRNS, + M(SCREEN_TAB_LEFT), M(SCREEN_TAB_RIGHT), M(SCREEN_NEW_TAB), KC_TRNS, MEH(KC_V), // thumb cluster - KC_TRNS, KC_TRNS, - KC_TRNS, - MEH(KC_V), KC_TRNS, KC_TRNS + KC_LEFT, KC_RIGHT, + KC_HOME, + KC_END, KC_TRNS, KC_TRNS ), // shell navigation layer From 4cf0f7dd16d60aef363e91977597334017e60924 Mon Sep 17 00:00:00 2001 From: lucwastiaux Date: Sat, 21 Jan 2017 23:42:23 +0800 Subject: [PATCH 5/6] make shell layer more compatible with default layer --- .../keymaps/dvorak_programmer/keymap.c | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c index 2bb5bcd12b..7ed0c7f125 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c +++ b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c @@ -61,7 +61,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, LT(SHELL_NAV,KC_TAB), KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, MO(KEY_SEL), OSL(BRACKETS), KC_A, KC_O, KC_E, KC_U, KC_I, - KC_FN3, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, MO(KEY_NAV), + OSM(MOD_LSFT), KC_SCLN, KC_Q, KC_J, KC_K, KC_X, MO(KEY_NAV), OSL(SHORTCUTS),KC_FN4, KC_FN5,OSL(SYMBOL),MO(NUMBER), // thumb cluster MO(MOUSE), RCTL(KC_S), @@ -81,30 +81,31 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), -// permanent shell layer - meant to be used while in a terminal + +// permanent shell layer - meant to be used while in a terminal. only the top keys are overriden [SHELL_LAYER] = KEYMAP( // left hand - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,M(SCREEN_COPY_MODE), M(SCREEN_PASTE),M(SHELL_RECALL_LAST_ARG_REMOVE_FIRST_COMMAND), - KC_TAB, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,RCTL(KC_R), + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,LALT(KC_DOT),RCTL(KC_R),RCTL(KC_C), + 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,LALT(KC_DOT), + 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 - LALT(KC_B),LALT(KC_F), - LALT(KC_D), - KC_TRNS,RCTL(KC_W),KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, // right hand - RCTL(KC_C), KC_LEFT, KC_RIGHT, RCTL(KC_U), RCTL(KC_K), KC_TRNS, KC_TRNS, - KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + RCTL(KC_W), LALT(KC_B),LALT(KC_F), KC_LEFT, KC_RIGHT, LALT(KC_D), 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_DOWN, 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 - M(SCREEN_TAB_LEFT), M(SCREEN_TAB_RIGHT), M(SCREEN_NEW_TAB), KC_TRNS, MEH(KC_V), + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, // thumb cluster - KC_LEFT, KC_RIGHT, - KC_HOME, - KC_END, KC_TRNS, KC_TRNS + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS ), // shell navigation layer From 803a861b4e5cce8da2f1260273ee5d918b0f58a7 Mon Sep 17 00:00:00 2001 From: lucwastiaux Date: Sun, 22 Jan 2017 10:32:17 +0800 Subject: [PATCH 6/6] document BRACKETS and SHELL_LAYER --- keyboards/ergodox/keymaps/dvorak_programmer/README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/README.md b/keyboards/ergodox/keymaps/dvorak_programmer/README.md index 3e4a2545b8..54da74f7f2 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/README.md +++ b/keyboards/ergodox/keymaps/dvorak_programmer/README.md @@ -7,18 +7,23 @@ Layers ------ * BASE: this is where you type. +* SHELL_LAYER: this is a permanent layer which I use when I don't need the F keys and gives me bash shortcuts on the top row. * SHELL_NAV: hold down the Tab key to access shell/terminal navigation shorcuts such as forward/backward word, history, Ctrl+C, screen tab movement. * KEY_NAV: arrow key movement with backward/forward word support, and copy/paste. * KEY_SEL: same as above, but every movement shift-selects. * NUMBER: keypad layer. * SYMBOL: all the symbols. -* BRACKET: special brackets-only layer for programming +* BRACKET: special brackets-only layer for programming. Activated by pressing left capslock (OSL) * SHORTCUTS: sends Hyper keys for Autohotkey to interpret. I use this to switch between specific apps. * MOUSE: use mouse keys Updates ------- +2017/01/22: +* Made brackets toggle an OSL on the left capslock +* Added SHELL_LAYER + 2016/12/10: * toggle for brackets layer is now on left thumb cluster.