summaryrefslogtreecommitdiff
path: root/keyboards/planck/keymaps
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/planck/keymaps')
-rw-r--r--keyboards/planck/keymaps/ab/keyboard-layout.json32
-rw-r--r--keyboards/planck/keymaps/ab/keyboard-layout.pngbin26518 -> 27168 bytes
-rw-r--r--keyboards/planck/keymaps/ab/keymap.c10
-rw-r--r--keyboards/planck/keymaps/ab/readme.md2
-rw-r--r--keyboards/planck/keymaps/dshields/config.h20
-rw-r--r--keyboards/planck/keymaps/dshields/keymap.c55
6 files changed, 92 insertions, 27 deletions
diff --git a/keyboards/planck/keymaps/ab/keyboard-layout.json b/keyboards/planck/keymaps/ab/keyboard-layout.json
index 4e631a3487..29ca73fb6f 100644
--- a/keyboards/planck/keymaps/ab/keyboard-layout.json
+++ b/keyboards/planck/keymaps/ab/keyboard-layout.json
@@ -57,12 +57,12 @@
{
"f": 3
},
- "\n{\n\n\n\n\n\n\n\nH",
+ "\\\n\n\n\n\n\n\n\n\nH",
{
"c": "#c4bcbc",
"f": 3
},
- "\n}\n\n\n\n\n\n\n\nJ",
+ "|\n\n\n\n\n\n\n\n\nJ",
{
"c": "#cccccc",
"a": 7,
@@ -79,13 +79,13 @@
},
";\n\n:",
{
- "a": 7,
"f": 3
},
- "Enter"
+ "'\n\n\""
],
[
{
+ "a": 7,
"f": 3
},
"Shift",
@@ -104,6 +104,22 @@
{
"a": 4,
"fa": [
+ 2,
+ 2,
+ 0,
+ 2,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 2
+ ]
+ },
+ "\n[\n\n\n\n\n\n\n\nV",
+ "\n]\n\n\n\n\n\n\n\nB",
+ {
+ "fa": [
0,
2,
0,
@@ -116,10 +132,8 @@
2
]
},
- "\\\n[\n\n\n\n\n\n\n\nV",
- "|\n]\n\n\n\n\n\n\n\nB",
- "`\n'\n\n\n\n\n\n\n\nN",
- "~\n\"\n\n\n\n\n\n\n\nM",
+ "`\n{\n\n\n\n\n\n\n\nN",
+ "~\n}\n\n\n\n\n\n\n\nM",
{
"a": 6
},
@@ -129,7 +143,7 @@
{
"a": 7
},
- "Shift\n\n\n\nEnter"
+ "Shift ↵"
],
[
{
diff --git a/keyboards/planck/keymaps/ab/keyboard-layout.png b/keyboards/planck/keymaps/ab/keyboard-layout.png
index dcdbb726df..70e4c2bd47 100644
--- a/keyboards/planck/keymaps/ab/keyboard-layout.png
+++ b/keyboards/planck/keymaps/ab/keyboard-layout.png
Binary files differ
diff --git a/keyboards/planck/keymaps/ab/keymap.c b/keyboards/planck/keymaps/ab/keymap.c
index f3a9333e04..71512773b2 100644
--- a/keyboards/planck/keymaps/ab/keymap.c
+++ b/keyboards/planck/keymaps/ab/keymap.c
@@ -56,20 +56,20 @@ const uint16_t PROGMEM fn_actions[] = {
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},
- {KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT},
+ {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_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT},
{KC_LCTL, KC_ESC, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
},
[_LOWER] = { /* LOWER */
{KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LPRN, KC_RPRN, KC_LCBR, KC_RCBR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_QUOT, KC_DQT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
+ {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LPRN, KC_RPRN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
+ {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
{BL, ZM_NRM, ZM_IN, ZM_OUT, KC_TRNS, KC_PGDN, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
},
[_RAISE] = { /* RAISE */
{KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LCBR, KC_LCBR, KC_BSLS, KC_TRNS},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_PIPE, KC_GRV, KC_TILD, KC_LBRC, KC_LBRC, KC_TRNS, KC_TRNS},
+ {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_PIPE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
+ {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_GRV, KC_TILD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
{RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGUP, KC_TRNS, EM_UNDO, KC_VOLD, KC_VOLU, KC_MUTE}
},
[_CUSTOM] = { /* CUSTOM */
diff --git a/keyboards/planck/keymaps/ab/readme.md b/keyboards/planck/keymaps/ab/readme.md
index d6280f074d..94f930500e 100644
--- a/keyboards/planck/keymaps/ab/readme.md
+++ b/keyboards/planck/keymaps/ab/readme.md
@@ -4,7 +4,7 @@ A practical keymap that emulates standard QWERTY keyboard for Planck. Once you g
![Layout](keyboard-layout.png "Practical Keymap")
![Photo](keyboard-photo.jpg "Planck Keyboard")
-* Online keyboard layout editor: http://goo.gl/mlLAFZ
+* Online keyboard layout editor: http://www.keyboard-layout-editor.com/#/gists/bda299020baaafe6a2a4a82e615e3cfc
# Programming Instructions:
Enter into programming mode and run the following command.
diff --git a/keyboards/planck/keymaps/dshields/config.h b/keyboards/planck/keymaps/dshields/config.h
index 8fa078cd92..5f2810287b 100644
--- a/keyboards/planck/keymaps/dshields/config.h
+++ b/keyboards/planck/keymaps/dshields/config.h
@@ -16,17 +16,37 @@
#define MOUSEKEY_MAX_SPEED 7
#define MOUSEKEY_WHEEL_DELAY 0
+// dynamic macro keys
#define DM_PLAY DYN_MACRO_PLAY1
#define DM_STRT DYN_REC_START1
#define DM_STOP DYN_REC_STOP
+// one-shot layer keys
#define OSL_RSE OSL(RSE)
#define OSL_LWR OSL(LWR)
#define OSL_FUN OSL(FUN)
+// one-shot modifier keys
#define OSM_CTL OSM(MOD_LCTL)
#define OSM_ALT OSM(MOD_LALT)
#define OSM_SFT OSM(MOD_LSFT)
+// tap dance keys
+#define TD_SCLN TD(TDK_SCLN)
+#define TD_COMM TD(TDK_COMM)
+#define TD_DOT TD(TDK_DOT)
+#define TD_SLSH TD(TDK_SLSH)
+
+#define ACTION_TAP_DANCE_FN_KEYCODE(user_fn, kc) { \
+ .fn = { NULL, user_fn, NULL }, \
+ .user_data = (void *)&((qk_tap_dance_pair_t) { kc, 0 }) \
+}
+
+#define ACTION_TAP_DANCE_FN_KEYCODE2(user_fn, kc1, kc2) { \
+ .fn = { NULL, user_fn, NULL }, \
+ .user_data = (void *)&((qk_tap_dance_pair_t) { kc1, kc2 }) \
+}
+
+
#endif
diff --git a/keyboards/planck/keymaps/dshields/keymap.c b/keyboards/planck/keymaps/dshields/keymap.c
index ed7621c77b..09bdc3e407 100644
--- a/keyboards/planck/keymaps/dshields/keymap.c
+++ b/keyboards/planck/keymaps/dshields/keymap.c
@@ -8,7 +8,7 @@ extern keymap_config_t keymap_config;
enum planck_layers { DEF, LWR, RSE, FUN };
enum planck_keycodes { DYNAMIC_MACRO_RANGE = SAFE_RANGE };
-enum tap_dance_keys { TD_SCLN };
+enum tap_dance_keys { TDK_SCLN, TDK_COMM, TDK_DOT, TDK_SLSH };
#include "dynamic_macro.h"
@@ -26,8 +26,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[DEF] = {
{KC_Q, KC_W, KC_E, KC_R, KC_T, KC_ESC, KC_BSPC, KC_Y, KC_U, KC_I, KC_O, KC_P},
- {KC_A, KC_S, KC_D, KC_F, KC_G, KC_TAB, KC_ENT, KC_H, KC_J, KC_K, KC_L, TD(TD_SCLN)},
- {KC_Z, KC_X, KC_C, KC_V, KC_B, OSM_SFT, DM_PLAY, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH},
+ {KC_A, KC_S, KC_D, KC_F, KC_G, KC_TAB, KC_ENT, KC_H, KC_J, KC_K, KC_L, TD_SCLN},
+ {KC_Z, KC_X, KC_C, KC_V, KC_B, OSM_SFT, DM_PLAY, KC_N, KC_M, TD_COMM, TD_DOT, TD_SLSH},
{OSM_CTL, KC_LGUI, OSM_ALT, OSL_FUN, OSL_LWR, KC_SPC, KC_SPC, OSL_RSE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
},
/* Lower
@@ -42,10 +42,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
[LWR] = {
- {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN},
- {S(KC_GRV), _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, _______, S(KC_LBRC), S(KC_RBRC)},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, S(KC_QUOT), S(KC_BSLS)},
- {_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END}
+ {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN},
+ {KC_TILD, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, _______, KC_LCBR, KC_RCBR},
+ {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DQUO, KC_PIPE},
+ {_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END}
},
/* Raise
* ,-----------------------------------------------------------------------------------.
@@ -59,10 +59,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
[RSE] = {
- {KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0},
- {KC_GRV, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, _______, KC_LBRC, KC_RBRC},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_QUOT, KC_BSLS},
- {_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END}
+ {KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0},
+ {KC_GRV, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, _______, KC_LBRC, KC_RBRC},
+ {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_QUOT, KC_BSLS},
+ {_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END}
},
/* Function
* ,-----------------------------------------------------------------------------------.
@@ -84,8 +84,39 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
+void tap(uint16_t keycode) {
+ register_code16(keycode);
+ unregister_code16(keycode);
+};
+
+void tap_dance_triple(qk_tap_dance_state_t *state, void *user_data) {
+ qk_tap_dance_pair_t *pair = (qk_tap_dance_pair_t *)user_data;
+ uint16_t keycode = pair->kc1;
+
+ switch(state->count) {
+ case 2:
+ register_code(KC_LSFT);
+ tap(keycode);
+ unregister_code(KC_LSFT);
+ break;
+ case 3:
+ if (pair->kc2) {
+ keycode = pair->kc2;
+ }
+ tap(keycode);
+ tap(keycode);
+ break;
+ default:
+ tap(keycode);
+ break;
+ }
+}
+
qk_tap_dance_action_t tap_dance_actions[] = {
- [TD_SCLN] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, S(KC_SCLN)) // once for semi-colon, twice for colon
+ [TDK_SCLN] = ACTION_TAP_DANCE_FN_KEYCODE2(tap_dance_triple, KC_SCLN, KC_COLN),
+ [TDK_COMM] = ACTION_TAP_DANCE_FN_KEYCODE (tap_dance_triple, KC_COMM),
+ [TDK_DOT] = ACTION_TAP_DANCE_FN_KEYCODE (tap_dance_triple, KC_DOT),
+ [TDK_SLSH] = ACTION_TAP_DANCE_FN_KEYCODE (tap_dance_triple, KC_SLSH)
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {