Tap for Tab, hold for Hyper

This commit is contained in:
JeeBak Kim 2016-08-07 11:05:10 -07:00
parent 68e287013b
commit 3d86e5b7a7
2 changed files with 32 additions and 27 deletions

View file

@ -61,6 +61,7 @@ enum macro_keycodes {
// Custom macros // Custom macros
#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl #define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl
#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift #define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift
#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper
// Requires KC_TRNS/_______ for the trigger key in the destination layer // Requires KC_TRNS/_______ for the trigger key in the destination layer
#define LT_TC LT(_TOUCHCURSOR, KC_SPC) // L-ayer T-ap T-ouch C-ursor #define LT_TC LT(_TOUCHCURSOR, KC_SPC) // L-ayer T-ap T-ouch C-ursor
#define LT_MC(kc) LT(_MOUSECURSOR, kc) // L-ayer T-ap M-ouse C-ursor #define LT_MC(kc) LT(_MOUSECURSOR, kc) // L-ayer T-ap M-ouse C-ursor
@ -84,7 +85,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty /* Qwerty
* ,-----------------------------------------------------------------------------------------. * ,-----------------------------------------------------------------------------------------.
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | * | Hyper/Tab| Q | W | E | R | T | Y | U | I | O | P | Bksp |
* |----------+------+------+------+------+-------------+------+------+------+------+--------| * |----------+------+------+------+------+-------------+------+------+------+------+--------|
* | Ctrl/Esc | A | S | MC/D | F | G | H | J | K | L | ; | " | * | Ctrl/Esc | A | S | MC/D | F | G | H | J | K | L | ; | " |
* |----------+------+------+------+------+------|------+------+------+------+------+--------| * |----------+------+------+------+------+------|------+------+------+------+------+--------|
@ -94,7 +95,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------------' * `-----------------------------------------------------------------------------------------'
*/ */
[_QWERTY] = { [_QWERTY] = {
{KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, {HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
{CTL_ESC, KC_A, KC_S, LT_MC(KC_D),KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, {CTL_ESC, KC_A, KC_S, LT_MC(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_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT}, {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT},
{KC_PSCR, KC_RGUI, KC_LALT, KC_LGUI, LOWER, LT_TC, LT_TC, RAISE, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} {KC_PSCR, KC_RGUI, KC_LALT, KC_LGUI, LOWER, LT_TC, LT_TC, RAISE, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
@ -102,7 +103,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Colemak /* Colemak
* ,-----------------------------------------------------------------------------------------. * ,-----------------------------------------------------------------------------------------.
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | * | Hyper/Tab| Q | W | F | P | G | J | L | U | Y | ; | Bksp |
* |----------+------+------+------+------+-------------+------+------+------+------+--------| * |----------+------+------+------+------+-------------+------+------+------+------+--------|
* | Ctrl/Esc | A | R | MC/S | T | D | H | N | E | I | O | " | * | Ctrl/Esc | A | R | MC/S | T | D | H | N | E | I | O | " |
* |----------+------+------+------+------+------|------+------+------+------+------+--------| * |----------+------+------+------+------+------|------+------+------+------+------+--------|
@ -112,7 +113,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------------' * `-----------------------------------------------------------------------------------------'
*/ */
[_COLEMAK] = { [_COLEMAK] = {
{KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, {HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC},
{CTL_ESC, KC_A, KC_R, LT_MC(KC_S),KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, {CTL_ESC, KC_A, KC_R, LT_MC(KC_S),KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT},
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT}, {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT},
{KC_PSCR, KC_RGUI, KC_LALT, KC_LGUI, LOWER, LT_TC, LT_TC, RAISE, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} {KC_PSCR, KC_RGUI, KC_LALT, KC_LGUI, LOWER, LT_TC, LT_TC, RAISE, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
@ -120,7 +121,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Dvorak /* Dvorak
* ,-----------------------------------------------------------------------------------------. * ,-----------------------------------------------------------------------------------------.
* | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | * | Hyper/Tab| " | , | . | P | Y | F | G | C | R | L | Bksp |
* |----------+------+------+------+------+-------------+------+------+------+------+--------| * |----------+------+------+------+------+-------------+------+------+------+------+--------|
* | Ctrl/Esc | A | O | MC/E | U | I | D | H | T | N | S | / | * | Ctrl/Esc | A | O | MC/E | U | I | D | H | T | N | S | / |
* |----------+------+------+------+------+------|------+------+------+------+------+--------| * |----------+------+------+------+------+------|------+------+------+------+------+--------|
@ -130,7 +131,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------------' * `-----------------------------------------------------------------------------------------'
*/ */
[_DVORAK] = { [_DVORAK] = {
{KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC}, {HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC},
{CTL_ESC, KC_A, KC_O, LT_MC(KC_E),KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH}, {CTL_ESC, KC_A, KC_O, LT_MC(KC_E),KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH},
{KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT}, {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT},
{KC_PSCR, KC_RGUI, KC_LALT, KC_LGUI, LOWER, LT_TC, LT_TC, RAISE, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} {KC_PSCR, KC_RGUI, KC_LALT, KC_LGUI, LOWER, LT_TC, LT_TC, RAISE, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}

View file

@ -16,32 +16,36 @@ I also decided to change all calls to `persistant_default_layer_set()` to
## Base Layers (Qwerty/Colemak/Dvorak) ## Base Layers (Qwerty/Colemak/Dvorak)
These base layers are mostly the same as the default mappings. The interesting These base layers are mostly the same as the default mappings. The interesting
changes are shown below. The `Ctrl/Esc`, mapped using `CTL_T(KC_ESC)` will emit changes are shown below.
an `Escape` when tapped, and act as a `Control` key when held. A `TODO` item is
to see if it can also act as a `CapsLock` when double-tapped. The right shift - The `Ctrl/Esc`, will emit an `Escape` when tapped, and act as a `Control` key when held.
key acts as `Enter` when tapped, and as a `Shift` key when held. The arrow - The `Sft/Ent` as `Enter` and `Shift`, and
keys, which have been moved to the - The `Hyper/Tab` as `Tab` and `Hyper`
A `TODO` item is to see if it can also act as a `CapsLock` when double-tapped.
The arrow keys, which have been moved to the
[TouchCursor](http://martin-stone.github.io/touchcursor/) layer, have been [TouchCursor](http://martin-stone.github.io/touchcursor/) layer, have been
replaced with the Media keys as shown. The `ML/A` key activates the Mouse layer replaced with the Media keys as shown. The `MC/kc` key activates the
when held, and emits an `A` when tapped. `MouseCursor` layer when held, and emits the corresponding `kc` for its layer,
when tapped.
``` ```
,-----------------------------------------------------------------------------------------. ,-----------------------------------------------------------------------------------------.
| | | | | | | | | | | | | | Hyper/Tab| | | | | | | | | | | |
|----------+------+------+------+------+-------------+------+------+------+------+--------| |----------+------+------+------+------+-------------+------+------+------+------+--------|
| Ctrl/Esc | ML/A | | | | | | | | | | | | Ctrl/Esc | | |MC/kc | | | | | | | | |
|----------+------+------+------+------+------|------+------+------+------+------+--------| |----------+------+------+------+------+------|------+------+------+------+------+--------|
| | | | | | | | | | | |Sft/Ent | | | | | | | | | | | | |Sft/Ent |
|----------+------+------+------+------+------+------+------+------+------+------+--------| |----------+------+------+------+------+------+------+------+------+------+------+--------|
| PrntScrn | RGUI | Alt | GUI |Lower | TC/Space |Raise | Next | Vol- | Vol+ | Play | | PrntScrn | RGUI | Alt | GUI |Lower | TC/Space |Raise | Next | Vol- | Vol+ | Play |
`-----------------------------------------------------------------------------------------' `-----------------------------------------------------------------------------------------'
``` ```
## Lower Layer (Symbols and Function Keys) ## Lower Layer (Symbols and Function Keys)
The symbols and functions keys are essentially the same as the default mapping. The symbols and functions keys are essentially the same as the default mapping.
The most notable changes are that the symbol keys from the `RAISE` layer have The most notable changes are that the symbol keys from the `RAISE` layer have
been moved here. The remaining Media keys replace those that are now on the been moved here. The remaining Media keys replace those that are now on the
base layers. The `BACKLIT` key has also been moved here. base layers. The `BACKLIT` key has also been moved here.
``` ```
,-----------------------------------------------------------------------------------. ,-----------------------------------------------------------------------------------.
| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
|------+------+------+------+------+-------------+------+------+------+------+------| |------+------+------+------+------+-------------+------+------+------+------+------|
@ -51,13 +55,13 @@ base layers. The `BACKLIT` key has also been moved here.
|------+------+------+------+------+------+------+------+------+------+------+------| |------+------+------+------+------+------+------+------+------+------+------+------|
|Brite | | | | | | | Prev | Stop | Slct | Mute | |Brite | | | | | | | Prev | Stop | Slct | Mute |
`-----------------------------------------------------------------------------------' `-----------------------------------------------------------------------------------'
``` ```
## Raise Layer (Numbers and Arithmetic Operators) ## Raise Layer (Numbers and Arithmetic Operators)
All of the numbers and arithmetic operators are available on this layer. Some All of the numbers and arithmetic operators are available on this layer. Some
keys are duplicated for the convenience of their positions. The `0` and `$` keys are duplicated for the convenience of their positions. The `0` and `$`
keys at the far left are for quick access to beginning and end of line in vim. keys at the far left are for quick access to beginning and end of line in vim.
``` ```
,-----------------------------------------------------------------------------------. ,-----------------------------------------------------------------------------------.
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|------+------+------+------+------+-------------+------+------+------+------+------| |------+------+------+------+------+-------------+------+------+------+------+------|
@ -67,8 +71,8 @@ keys at the far left are for quick access to beginning and end of line in vim.
|------+------+------+------+------+------+------+------+------+------+------+------| |------+------+------+------+------+------+------+------+------+------+------+------|
|Brite | | | | | | | Prev | Stop | Slct | Mute | |Brite | | | | | | | Prev | Stop | Slct | Mute |
`-----------------------------------------------------------------------------------' `-----------------------------------------------------------------------------------'
``` ```
## TouchCursor layer plus personal customizations ## TouchCursor layer plus personal customizations
[TouchCursor](http://martin-stone.github.io/touchcursor/) uses the `Space` key [TouchCursor](http://martin-stone.github.io/touchcursor/) uses the `Space` key
as the modifier, with the `IJKL` home row keys representing the inverted-T of as the modifier, with the `IJKL` home row keys representing the inverted-T of
@ -88,7 +92,7 @@ etc.) depending on which layout you've currently selected (`AG_NORM` or
use to switch between Virtual Desktops Left/Right. The `Tab_C`, `Tab_N` and use to switch between Virtual Desktops Left/Right. The `Tab_C`, `Tab_N` and
`Tab_R` are for "Close Tab," "New Tab" and "Reopen Closed Tab" for apps such as `Tab_R` are for "Close Tab," "New Tab" and "Reopen Closed Tab" for apps such as
Google Chrome. Google Chrome.
``` ```
,-----------------------------------------------------------------------------------. ,-----------------------------------------------------------------------------------.
|AltTab|CmdTab|CtlTab| GUI |Shift | ~ |Insert| Home | Up | End | Bksp | | |AltTab|CmdTab|CtlTab| GUI |Shift | ~ |Insert| Home | Up | End | Bksp | |
|------+------+------+------+------+-------------+------+------+------+------+------| |------+------+------+------+------+-------------+------+------+------+------+------|
@ -98,7 +102,7 @@ Google Chrome.
|------+------+------+------+------+------+------+------+------+------+------+------| |------+------+------+------+------+------+------+------+------+------+------+------|
| | | | | | | | | | | | | | | | | | | | | | | |
`-----------------------------------------------------------------------------------' `-----------------------------------------------------------------------------------'
``` ```
## Mouse Layer ## Mouse Layer
The Mouse layer, closely mimics the layout/behaviour of the TouchCursor layer. The Mouse layer, closely mimics the layout/behaviour of the TouchCursor layer.
@ -108,7 +112,7 @@ IMHO. The left and right click buttons are duplicated; on the right hand side,
for a quick click here and there, and again on the left hand side for when the for a quick click here and there, and again on the left hand side for when the
buttons need to be held for dragging things or highlighting text, thus allowing buttons need to be held for dragging things or highlighting text, thus allowing
the right hand to be free to use the up/down/left/right actions. the right hand to be free to use the up/down/left/right actions.
``` ```
,-----------------------------------------------------------------------------------. ,-----------------------------------------------------------------------------------.
| | |ACCL0 | | | | |WHL_L | Up |WHL_R | BTN2 | | | | |ACCL0 | | | | |WHL_L | Up |WHL_R | BTN2 | |
|------+------+------+------+------+-------------+------+------+------+------+------| |------+------+------+------+------+-------------+------+------+------+------+------|
@ -118,4 +122,4 @@ the right hand to be free to use the up/down/left/right actions.
|------+------+------+------+------+------+------+------+------+------+------+------| |------+------+------+------+------+------+------+------+------+------+------+------|
| | | | | | | | | | | | | | | | | | | | | | | |
`-----------------------------------------------------------------------------------' `-----------------------------------------------------------------------------------'
``` ```