summaryrefslogtreecommitdiff
path: root/keyboards/nyquist/keymaps/333fred
diff options
context:
space:
mode:
authorFred Silberberg <fred@silberberg.xyz>2017-11-06 09:09:01 -0800
committerJack Humbert <jack.humb@gmail.com>2017-11-06 12:09:01 -0500
commit89357b96d40f6f8189da09c3d15131e22991ed4c (patch)
treeb62722f0814bed5aee7cc11331ca1846453cb486 /keyboards/nyquist/keymaps/333fred
parent16843bc8c967e965a5361fe5f94abc9cd1ccc5a5 (diff)
333fred layout update (#1971)
* Set up tap dance for layers on the lower button. * Refactored code to share in the users directory between my two keyboard layouts. * Small keyboard layout change. * Updated documentation on oneshot usage in macros/tap dance.
Diffstat (limited to 'keyboards/nyquist/keymaps/333fred')
-rw-r--r--keyboards/nyquist/keymaps/333fred/README.md8
-rw-r--r--keyboards/nyquist/keymaps/333fred/keymap.c57
-rw-r--r--keyboards/nyquist/keymaps/333fred/rules.mk3
3 files changed, 36 insertions, 32 deletions
diff --git a/keyboards/nyquist/keymaps/333fred/README.md b/keyboards/nyquist/keymaps/333fred/README.md
index cc35aff197..aa783af07f 100644
--- a/keyboards/nyquist/keymaps/333fred/README.md
+++ b/keyboards/nyquist/keymaps/333fred/README.md
@@ -5,7 +5,7 @@ This nyquist layout is based on my Ergodox Infinity Layout, which is [here](../.
## Layers
### QWERTY
-The shift modifiers on this layer all use OSM to allow for quick single capitalization. Press and hold F to go to the VIM movement layer. Layer is also a one-shot layer toggle, and can be held down to type multiple characters on the Lower layer. Game is a regular toggle layer.
+The shift modifiers on this layer all use OSM to allow for quick single capitalization. LwrVIM acts a combo one-shot toggle and momentary layer toggle. Tap once to make the next key be sent on the Lower. Hold to move to the Lower layer until release. Tap and hold (so press, release, press and hold) to move to the VIM layer until release. Game is a regular toggle layer.
```
Qwerty
@@ -14,11 +14,11 @@ Qwerty
|------+------+------+------+------+------+------+------+------+------+------+------|
| Tab | Q | W | E | R | T | Y | U | I | O | P | \ |
|------+------+------+------+------+-------------+------+------+------+------+------|
-| Esc | A | S | D |LTVIMF| G | H | J | K | L | ; | " |
+| Esc | A | S | D | F | G | H | J | K | L | ; | " |
|------+------+------+------+------+------|------+------+------+------+------+------|
| Shift| Z | X | C | V | B | N | M | , | . |/ Ctrl| Shift|
|------+------+------+------+------+------+------+------+------+------+------+------|
-| Ctrl | Alt | F4 | GUI |Lower | Bksp | Spc | Ent | Lock | = | Game | Del |
+| Ctrl | Alt | F4 | GUI |LwrVIM| Bksp | Spc | Ent | Lock | = | RAlt | Del |
`-----------------------------------------------------------------------------------'
```
@@ -36,7 +36,7 @@ Lower
|------+------+------+------+------+------|------+------+------+------+------+------|
| APscr| % | ^ | [ | ] | ~ | 1 | 2 | 3 | \ | Vol- | Vol+ |
|------+------+------+------+------+------+------+------+------+------+------+------|
-| Pscr | | | | | | 0 | . | = | Prev | Next | Play |
+| Pscr | | | | | GAME | 0 | . | = | Prev | Next | Play |
`-----------------------------------------------------------------------------------'
```
diff --git a/keyboards/nyquist/keymaps/333fred/keymap.c b/keyboards/nyquist/keymaps/333fred/keymap.c
index dfbcd52856..ab47336a2d 100644
--- a/keyboards/nyquist/keymaps/333fred/keymap.c
+++ b/keyboards/nyquist/keymaps/333fred/keymap.c
@@ -1,20 +1,18 @@
#include "nyquist.h"
#include "action_layer.h"
+#include "action_util.h"
#include "eeconfig.h"
+#include "333fred.h"
extern keymap_config_t keymap_config;
-#define _QWERTY 0
-#define _LOWER 1
-#define _VIM 2
-#define _GAME 3
-
enum custom_macros {
DLEFT,
DRIGHT,
PSCREEN_APP
};
+// Tap dance for layer transitions
// Fillers to make layering more clear
#define _______ KC_TRNS
#define XXXXXXX KC_NO
@@ -27,22 +25,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Tab | Q | W | E | R | T | Y | U | I | O | P | \ |
* |------+------+------+------+------+-------------+------+------+------+------+------|
- * | Esc | A | S | D |LTVIMF| G | H | J | K | L | ; | " |
+ * | Esc | A | S | D | F | G | H | J | K | L | ; | " |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | N | M | , | . |/ Ctrl| Shift|
* |------+------+------+------+------+------+------+------+------+------+------+------|
- * | Ctrl | Alt | F4 | GUI |Lower | Bksp | Spc | Ent | Alt | + | Game | Del |
+ * | Ctrl | Alt | F4 | GUI |Lwr/VM| Bksp | Spc | Ent | Lock | = | Alt | Del |
* `-----------------------------------------------------------------------------------'
*/
-[_QWERTY] = KEYMAP( \
+[BASE] = KEYMAP( \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH, \
- KC_ESC, KC_A, KC_S, KC_D, LT(_VIM, KC_F), KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
+ KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
OSM(MOD_LSFT), LCTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RCTL_T(KC_SLSH), OSM(MOD_RSFT), \
- KC_LCTL, KC_LALT, KC_F4, KC_LGUI, OSL(_LOWER), KC_BSPC, KC_SPC, KC_ENT, KC_LOCK, KC_EQL, TG(_GAME), KC_DEL \
+ KC_LCTL, KC_LALT, KC_F4, KC_LGUI, TD(TD_SYM_VIM), KC_BSPC, KC_SPC, KC_ENT, KC_LOCK, KC_EQL, KC_RALT, KC_DEL \
),
-/* Lower
+/* Symbols
* ,-----------------------------------------------------------------------------------.
* | Caps | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 |
* |------+------+------+------+------+-------------+------+------+------+------+------|
@@ -52,36 +50,36 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | APscr| % | ^ | [ | ] | ~ | 1 | 2 | 3 | \ | Vol- | Vol+ |
* |------+------+------+------+------+------+------+------+------+------+------+------|
- * | Pscr | | | | | | 0 | . | = | Prev | Next | Play |
+ * | Pscr | | | | | GAME | 0 | . | = | Prev | Next | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_LOWER] = KEYMAP( \
- KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, \
- _______, KC_EXLM, KC_AT, KC_LPRN, KC_RPRN, KC_PIPE, KC_7, KC_8, KC_9, KC_ASTR, KC_RPRN, KC_F12, \
- _______, KC_HASH, KC_DLR, KC_LCBR, KC_RCBR, KC_GRV, KC_4, KC_5, KC_6, KC_PLUS, KC_RCBR, KC_PIPE, \
- M(PSCREEN_APP), KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_1, KC_2, KC_3, KC_BSLS, KC_VOLD, KC_VOLU, \
- KC_PSCR, _______, _______, _______, _______, _______, KC_0, KC_DOT, KC_EQL, KC_MPRV, KC_MNXT, KC_MPLY \
+[SYMB] = KEYMAP( \
+ KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, \
+ _______, KC_EXLM, KC_AT, KC_LPRN, KC_RPRN, KC_PIPE, KC_7, KC_8, KC_9, KC_ASTR, KC_RPRN, KC_F12, \
+ _______, KC_HASH, KC_DLR, KC_LCBR, KC_RCBR, KC_GRV, KC_4, KC_5, KC_6, KC_PLUS, KC_RCBR, KC_PIPE, \
+ M(PSCREEN_APP), KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_1, KC_2, KC_3, KC_BSLS, KC_VOLD, KC_VOLU, \
+ KC_PSCR, _______, _______, _______, _______, TG(GAME), KC_0, KC_DOT, KC_EQL, KC_MPRV, KC_MNXT, KC_MPLY \
),
/* Vim Movement (Hold down F)
* ,-----------------------------------------------------------------------------------.
* | | | | | | | | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
- * | | | | | | | | | | | | |
+ * | | | | LSHFT| | | | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
- * | | DLeft|DRight| LCTRL| | | Left | Down | Up | Right| | |
+ * | | DLeft|DRight| LCTRL| LGUI | | Left | Down | Up | Right| | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
- * | | | | | LShft| | | | | | | |
+ * | | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_VIM] = KEYMAP( \
+[VIM] = KEYMAP( \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, M(DLEFT), M(DRIGHT), KC_LCTL, KC_LGUI, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- _______, M(DLEFT), M(DRIGHT), KC_LCTL, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, \
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- _______, _______, _______, _______, KC_LSFT, _______, _______, _______, _______, _______, _______, _______ \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
),
/* Gaming mode (Raise)
@@ -98,12 +96,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Enter| | Lock | Bksp | Alt | Spc | Lower| Left | Up | Down | Right|QWERTY|
* `-----------------------------------------------------------------------------------'
*/
-[_GAME] = KEYMAP( \
+[GAME] = KEYMAP( \
KC_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
KC_LCTL, _______, _______, _______, KC_F, _______, _______, _______, _______, _______, _______, _______, \
KC_LSFT, KC_Z, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LGUI, \
- KC_ENT, _______, KC_LOCK, KC_BSPC, KC_LALT, KC_SPC, OSL(_LOWER), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, TO(_QWERTY) \
+ KC_ENT, _______, KC_LOCK, KC_BSPC, KC_LALT, KC_SPC, OSL(SYMB), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, TO(BASE) \
)
};
@@ -133,3 +131,8 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
}
return MACRO_NONE;
}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ tap_dance_process_record(keycode);
+ return true;
+}
diff --git a/keyboards/nyquist/keymaps/333fred/rules.mk b/keyboards/nyquist/keymaps/333fred/rules.mk
index f854432807..5a3543a6f6 100644
--- a/keyboards/nyquist/keymaps/333fred/rules.mk
+++ b/keyboards/nyquist/keymaps/333fred/rules.mk
@@ -1,6 +1,7 @@
KEY_LOCK_ENABLE = yes
NKRO_ENABLE = yes
-CONSOLE_ENABLE = yes
+CONSOLE_ENABLE = no
+TAP_DANCE_ENABLE = yes
ifndef QUANTUM_DIR
include ../../../../Makefile