From 93c1bfa646bd4d53c065df1a1a7e457d49df7e31 Mon Sep 17 00:00:00 2001 From: lucwastiaux Date: Fri, 27 Jan 2017 23:55:33 +0800 Subject: dual capslock functionality, activating shell nav or brackets --- .../ergodox/keymaps/dvorak_programmer/keymap.c | 23 +++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c index 7ed0c7f125..6757355c8c 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c +++ b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c @@ -35,7 +35,9 @@ #define SHELL_RECALL_LAST_ARG_REMOVE_FIRST_COMMAND 15 #define SEMICOLON_NEWLINE 16 #define END_NEWLINE 17 +#define DUAL_CAPSLOCK 18 +static uint16_t capslock_timer; const uint16_t PROGMEM fn_actions[] = { [1] = ACTION_LAYER_TAP_TOGGLE(KEY_NAV), // FN1 - keynav layer @@ -59,8 +61,8 @@ 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), - OSL(BRACKETS), KC_A, KC_O, KC_E, KC_U, KC_I, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, MO(KEY_SEL), + M(DUAL_CAPSLOCK), KC_A, KC_O, KC_E, KC_U, KC_I, 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 @@ -395,7 +397,22 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) if (record->event.pressed) { return MACRO( T(END), T(ENTER), END); } - break; + break; + case DUAL_CAPSLOCK: + if (record->event.pressed) { + if(timer_elapsed(capslock_timer) < 100) { + // activate SHELL_NAV + layer_on(SHELL_NAV); + } else { + layer_on(BRACKETS); + } + } else { + layer_off(SHELL_NAV); + layer_off(BRACKETS); + capslock_timer = timer_read(); + } + break; + } return MACRO_NONE; -- cgit v1.2.3 From a1c53d0f9356fa711ed0ffaaf61b564c8521a761 Mon Sep 17 00:00:00 2001 From: lucwastiaux Date: Sat, 28 Jan 2017 09:42:55 +0800 Subject: documented dual mode capslock --- .../ergodox/keymaps/dvorak_programmer/README.md | 4 +++- .../ergodox/keymaps/dvorak_programmer/keymap.c | 26 ---------------------- 2 files changed, 3 insertions(+), 27 deletions(-) diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/README.md b/keyboards/ergodox/keymaps/dvorak_programmer/README.md index 54da74f7f2..09f30c04fc 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/README.md +++ b/keyboards/ergodox/keymaps/dvorak_programmer/README.md @@ -7,7 +7,6 @@ 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. @@ -20,6 +19,9 @@ Layers Updates ------- +2017/01/28: +* Made the capslock key a dual momentary layer activation for BRACKETS and SHELL_NAV. One keypress held down for BRACKETS, one keypress, released and then held down for SHELL_NAV + 2017/01/22: * Made brackets toggle an OSL on the left capslock * Added SHELL_LAYER diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c index 6757355c8c..dd87bcb2c9 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c +++ b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c @@ -6,7 +6,6 @@ #include "action_code.h" #define BASE 0 // default layer -#define SHELL_LAYER 1 #define SHELL_NAV 2 #define KEY_NAV 3 // key navigation layer #define KEY_SEL 4 // key selection layer @@ -84,31 +83,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -// 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,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,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 - 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_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 -), // shell navigation layer [SHELL_NAV] = KEYMAP( -- cgit v1.2.3 From f6feee8167bcffdeed7e816effd1c095b056965e Mon Sep 17 00:00:00 2001 From: lucwastiaux Date: Sat, 28 Jan 2017 09:45:13 +0800 Subject: eliminate references to shell_layer --- keyboards/ergodox/keymaps/dvorak_programmer/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c index dd87bcb2c9..4a2ffcce44 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c +++ b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c @@ -250,7 +250,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), TO(BASE), TO(SHELL_LAYER) + MEH(KC_9), MEH(KC_Y), MEH(KC_Z) ), -- cgit v1.2.3 From 467e2841784b31d9d7b010a6c2c357e43dd4d47d Mon Sep 17 00:00:00 2001 From: lucwastiaux Date: Wed, 1 Feb 2017 13:46:00 +0800 Subject: increase timeout for dual mode caps key --- keyboards/ergodox/keymaps/dvorak_programmer/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c index 4a2ffcce44..4594a7698e 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c +++ b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c @@ -374,7 +374,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) break; case DUAL_CAPSLOCK: if (record->event.pressed) { - if(timer_elapsed(capslock_timer) < 100) { + if(timer_elapsed(capslock_timer) < 300) { // activate SHELL_NAV layer_on(SHELL_NAV); } else { -- cgit v1.2.3 From 420a032e8d0a7e0391b1899dcc2c7bd8f6c4ac45 Mon Sep 17 00:00:00 2001 From: luc wastiaux Date: Fri, 10 Feb 2017 21:44:27 +0800 Subject: made left shift an MO for SHELL_NAV --- .../ergodox/keymaps/dvorak_programmer/Makefile | 2 +- .../ergodox/keymaps/dvorak_programmer/README.md | 3 ++ .../ergodox/keymaps/dvorak_programmer/keymap.c | 49 +++------------------- 3 files changed, 9 insertions(+), 45 deletions(-) diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/Makefile b/keyboards/ergodox/keymaps/dvorak_programmer/Makefile index 3c65e25e19..91b1ae597e 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/Makefile +++ b/keyboards/ergodox/keymaps/dvorak_programmer/Makefile @@ -4,5 +4,5 @@ SLEEP_LED_ENABLE=no FORCE_NKRO ?= yes DEBUG_ENABLE = no CONSOLE_ENABLE = no -TAP_DANCE_ENABLE = yes +TAP_DANCE_ENABLE = no MOUSEKEY_ENABLE = yes diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/README.md b/keyboards/ergodox/keymaps/dvorak_programmer/README.md index 09f30c04fc..42723ea170 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/README.md +++ b/keyboards/ergodox/keymaps/dvorak_programmer/README.md @@ -19,6 +19,9 @@ Layers Updates ------- +2017/02/10: +* Made left shift an MO for SHELL_NAV, and symbol+right shift CAPSLOCK + 2017/01/28: * Made the capslock key a dual momentary layer activation for BRACKETS and SHELL_NAV. One keypress held down for BRACKETS, one keypress, released and then held down for SHELL_NAV diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c index 4594a7698e..2fef048b5e 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c +++ b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c @@ -34,24 +34,6 @@ #define SHELL_RECALL_LAST_ARG_REMOVE_FIRST_COMMAND 15 #define SEMICOLON_NEWLINE 16 #define END_NEWLINE 17 -#define DUAL_CAPSLOCK 18 - -static uint16_t capslock_timer; - -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(KEY_NAV), // FN1 - keynav layer - [2] = ACTION_LAYER_TAP_TOGGLE(NUMBER), // FN2 - number layer - [3] = ACTION_MODS_ONESHOT(MOD_LSFT), // FN3 - shift modifier / oneshot - [4] = ACTION_MODS_ONESHOT(MOD_LCTL), // FN4 - ctrl modifier / oneshot - [5] = ACTION_MODS_ONESHOT(MOD_LALT), // FN5 - alt modifier / oneshot -}; - -//Tap Dance Declarations -enum { - TD_SHIFT_CAPSLOCK = 0, - TD_BRK_LEFT = 1, - TD_BRK_RIGHT = 2 -}; @@ -61,9 +43,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // left hand KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, MO(KEY_SEL), - M(DUAL_CAPSLOCK), KC_A, KC_O, KC_E, KC_U, KC_I, - 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), + MO(BRACKETS), KC_A, KC_O, KC_E, KC_U, KC_I, + MO(SHELL_NAV), KC_SCLN, KC_Q, KC_J, KC_K, KC_X, MO(KEY_NAV), + OSL(SHORTCUTS),OSM(MOD_LCTL), OSM(MOD_LALT),OSL(SYMBOL),MO(NUMBER), // thumb cluster MO(MOUSE), RCTL(KC_S), RCTL(KC_DEL), @@ -72,7 +54,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_PGDN, KC_B, KC_M, KC_W, KC_V, KC_Z, TD(TD_SHIFT_CAPSLOCK), + KC_PGDN, KC_B, KC_M, KC_W, KC_V, KC_Z, OSM(MOD_LSFT), // lower keys - browser tab control RSFT(RCTL(KC_TAB)), RCTL(KC_TAB), RCTL(KC_T), LALT(KC_LEFT), RCTL(KC_W), // thumb cluster @@ -246,7 +228,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { MEH(KC_F7), MEH(KC_F8), MEH(KC_F9), MEH(KC_F10), MEH(KC_F11), MEH(KC_F12), M(SWITCH_NDS), KC_TRNS, MEH(KC_A), MEH(KC_B), MEH(KC_C), MEH(KC_D), MEH(KC_E), MEH(KC_F), MEH(KC_G), MEH(KC_H), MEH(KC_I), MEH(KC_J), MEH(KC_K), MEH(KC_L), - KC_TRNS, MEH(KC_M), MEH(KC_N), MEH(KC_O), MEH(KC_P), MEH(KC_Q), MEH(KC_R), + KC_TRNS, MEH(KC_M), MEH(KC_N), MEH(KC_O), MEH(KC_P), MEH(KC_Q), KC_CAPSLOCK, MEH(KC_S), MEH(KC_T), MEH(KC_U), MEH(KC_V), MEH(KC_X), MEH(KC_6), MEH(KC_7), MEH(KC_8), @@ -372,20 +354,6 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) return MACRO( T(END), T(ENTER), END); } break; - case DUAL_CAPSLOCK: - if (record->event.pressed) { - if(timer_elapsed(capslock_timer) < 300) { - // activate SHELL_NAV - layer_on(SHELL_NAV); - } else { - layer_on(BRACKETS); - } - } else { - layer_off(SHELL_NAV); - layer_off(BRACKETS); - capslock_timer = timer_read(); - } - break; } @@ -406,13 +374,6 @@ void led_set_user(uint8_t usb_led) { } } -qk_tap_dance_action_t tap_dance_actions[] = { - [TD_SHIFT_CAPSLOCK] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPSLOCK), - [TD_BRK_LEFT] = ACTION_TAP_DANCE_DOUBLE (KC_LPRN, KC_LCBR), - [TD_BRK_RIGHT] = ACTION_TAP_DANCE_DOUBLE (KC_RPRN, KC_RCBR) - -}; - // Runs constantly in the background, in a loop. void matrix_scan_user(void) { -- cgit v1.2.3 From 5f8535b356e66975e20f1a573ab104db75f8b33c Mon Sep 17 00:00:00 2001 From: luc wastiaux Date: Mon, 13 Feb 2017 07:16:01 +0800 Subject: change thumb cluster key to be shift --- keyboards/ergodox/keymaps/dvorak_programmer/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c index 2fef048b5e..ae4fd444d1 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c +++ b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c @@ -47,8 +47,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { MO(SHELL_NAV), KC_SCLN, KC_Q, KC_J, KC_K, KC_X, MO(KEY_NAV), OSL(SHORTCUTS),OSM(MOD_LCTL), OSM(MOD_LALT),OSL(SYMBOL),MO(NUMBER), // thumb cluster - MO(MOUSE), RCTL(KC_S), - RCTL(KC_DEL), + OSM(MOD_LSFT), 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, -- cgit v1.2.3 From 3bf6c43de779e0790b85eef4a78c9ecc17cd06dc Mon Sep 17 00:00:00 2001 From: luc wastiaux Date: Mon, 13 Feb 2017 07:46:07 +0800 Subject: updated readme --- keyboards/ergodox/keymaps/dvorak_programmer/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/README.md b/keyboards/ergodox/keymaps/dvorak_programmer/README.md index 42723ea170..36722469fe 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/README.md +++ b/keyboards/ergodox/keymaps/dvorak_programmer/README.md @@ -20,7 +20,7 @@ Updates ------- 2017/02/10: -* Made left shift an MO for SHELL_NAV, and symbol+right shift CAPSLOCK +* Made left shift an MO for SHELL_NAV, and symbol+right shift CAPSLOCK. Made all modifiers OSM. 2017/01/28: * Made the capslock key a dual momentary layer activation for BRACKETS and SHELL_NAV. One keypress held down for BRACKETS, one keypress, released and then held down for SHELL_NAV -- cgit v1.2.3