From 9c91257b2e5d64a2d1eaf12dc69c14a96fc7402b Mon Sep 17 00:00:00 2001 From: Adam Abrams Date: Fri, 12 Feb 2021 09:17:36 -0600 Subject: [PATCH 01/32] create keymap --- keyboards/planck/keymaps/adamtabrams/config.h | 34 ++++ keyboards/planck/keymaps/adamtabrams/keymap.c | 165 ++++++++++++++++++ .../planck/keymaps/adamtabrams/readme.md | 2 + keyboards/planck/keymaps/adamtabrams/rules.mk | 7 + 4 files changed, 208 insertions(+) create mode 100644 keyboards/planck/keymaps/adamtabrams/config.h create mode 100644 keyboards/planck/keymaps/adamtabrams/keymap.c create mode 100644 keyboards/planck/keymaps/adamtabrams/readme.md create mode 100644 keyboards/planck/keymaps/adamtabrams/rules.mk diff --git a/keyboards/planck/keymaps/adamtabrams/config.h b/keyboards/planck/keymaps/adamtabrams/config.h new file mode 100644 index 000000000000..6e3b7abd58fc --- /dev/null +++ b/keyboards/planck/keymaps/adamtabrams/config.h @@ -0,0 +1,34 @@ +#pragma once + + +// General Configs + +#define NO_ACTION_ONESHOT +#define FORCE_NKRO +#define TAPPING_TOGGLE 2 + + +// Mouse Configs + +#define MK_COMBINED + + +// Tap-Hold Configs + +#define TAPPING_TERM 200 +#define PERMISSIVE_HOLD +#define TAPPING_FORCE_HOLD + +#define TAPPING_FORCE_HOLD_PER_KEY +bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case CTL_T(KC_TAB): + return true; + case GUI_T(KC_GESC): + return true; + case SFT_T(KC_MINS): + return true; + default: + return false; + } +} diff --git a/keyboards/planck/keymaps/adamtabrams/keymap.c b/keyboards/planck/keymaps/adamtabrams/keymap.c new file mode 100644 index 000000000000..04c5dca9a78b --- /dev/null +++ b/keyboards/planck/keymaps/adamtabrams/keymap.c @@ -0,0 +1,165 @@ +/* Copyright 2015-2017 Jack Humbert + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H +#include "muse.h" + +enum planck_layers { + _NORMAL, + _NUMBER, + _ARROWS, + _CURSOR, + _SYSTEM, + _KBOARD, + _FMWare +}; + +#define NUMBER TT(_NUMBER) +#define ARROWS TT(_ARROWS) +#define CURSOR TT(_CURSOR) +#define SYSTEM TT(_SYSTEM) +#define KBOARD MO(_KBOARD) +#define FMWARE MO(_FMWARE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Normal + * ,-----------------------------------------------------------------------------------. + * |C(Tab)| Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |G(E/~)| A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | S(-) | Z | X | C | V | B | N | M | , | . | / |SFTENT| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | CTRL | GUI | ALT |System|Number| CTRL |Space |Arrows|Cursor| ALT | GUI | CTRL | + * `-----------------------------------------------------------------------------------' + */ +[_NORMAL] = LAYOUT_planck_grid( + CTL_T(KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + GUI_T(KC_GESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + SFT_T(KC_MINS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_SFTENT, + KC_LCTRL, KC_LGUI, KC_LALT, SYSTEM, NUMBER, KC_RCTL, KC_SPC, ARROWS, CURSOR, KC_RALT, KC_RGUI, KC_RCTRL +), + +/* Number + * ,-----------------------------------------------------------------------------------. + * | CTRL | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | GESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ` | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| _ | - | + | = | | | [ | ] | { | } | \ |SFTENT| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | \/ | CTRL |Space | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_NUMBER] = LAYOUT_planck_grid( + KC_LCTL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, + KC_LSFT, KC_UNDS, KC_MINS, KC_PLUS, KC_EQL, KC_PIPE, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_SLSH, KC_SFTENT, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, -------, KC_RCTL, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +), + +/* Arrows + * ,-----------------------------------------------------------------------------------. + * | Tab | |A(->) |A(->) | | | | P_Up | | | | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ESC | | |P_Down| | | Left | Down | Up |Right | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| | | | |A(<-) | | | | | | ENT | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | CTRL |Space | \/ | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ARROWS] = LAYOUT_planck_grid( + KC_TAB, XXXXXXX, A(KC_RGHT), A(KC_RGHT), XXXXXXX, XXXXXXX, XXXXXXX, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC, + KC_ESC, XXXXXXX, XXXXXXX, KC_PGDN, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX, + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, A(KC_LEFT), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_ENT, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RCTL, KC_SPC, -------, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +), + +/* Cursor + * ,-----------------------------------------------------------------------------------. + * | CTRL | | |Wh_Up |M_Btn2| | |Wh_Up | | | | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | GUI |M_Acc2|M_Acc0|Wh_Dn |M_Btn1| | M_L |M_Down| M_Up | M_R | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| | | |M_Btn3| | | | | | | ENT | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | |M_Acc1|Space | | \/ | | | | + * `-----------------------------------------------------------------------------------' + */ +[_CURSOR] = LAYOUT_planck_grid( + KC_LCTL, XXXXXXX, XXXXXXX, KC_WH_U, KC_BTN2, XXXXXXX, XXXXXXX, KC_WH_U, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC, + KC_LGUI, KC_ACL2, KC_ACL0, KC_WH_D, KC_BTN1, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, XXXXXXX, + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN3, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_ENT, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_ACL1, KC_SPC, XXXXXXX, -------, XXXXXXX, XXXXXXX, XXXXXXX +), + +/* System + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Caps | |Pr_Scn| | Fwd | |Brght-| Vol- | Vol+ |Brght+| | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | Rwd | | Mute |P_Trac|N_Trac| | Play | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | \/ | | | | |KBoard| | | | + * `-----------------------------------------------------------------------------------' + */ +[_SYSTEM] = LAYOUT_planck_grid( + 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_CAPS, XXXXXXX, KC_PSCR, XXXXXXX, KC_MFFD, XXXXXXX, KC_BRID, KC_VOLD, KC_VOLU, KC_BRIU, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MRWD, XXXXXXX, KC_MUTE, KC_MPRV, KC_MNXT, XXXXXXX, KC_MPLY, + XXXXXXX, XXXXXXX, XXXXXXX, -------, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KBOARD, XXXXXXX, XXXXXXX, XXXXXXX +), + +/* KBoard + * ,-----------------------------------------------------------------------------------. + * | | | | | |RGB_Tg| |Brght+| | |Mode- | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | |Brght-| | | Hue- | Sat- | Sat+ | Hue+ | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | |Mode+ | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | \/ | | | | | \/ | | |Flash | + * `-----------------------------------------------------------------------------------' + */ +[_KBOARD] = LAYOUT_planck_grid( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, XXXXXXX, RGB_VAI, XXXXXXX, XXXXXXX, RGB_RMOD, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAD, XXXXXXX, XXXXXXX, RGB_HUD, RGB_SAD, RGB_SAI, RGB_HUI, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, -------, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, -------, XXXXXXX, XXXXXXX, FMWare +), + +/* FMWare + * ,-----------------------------------------------------------------------------------. + * | | | |EEPROM|Reset | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | |Debug | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | \/ | | | | | \/ | | | \/ | + * `-----------------------------------------------------------------------------------' + */ +[_FMWARE] = LAYOUT_planck_grid( + XXXXXXX, XXXXXXX, XXXXXXX, EEP_RST, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, DEBUG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, -------, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, -------, XXXXXXX, XXXXXXX, _______ +) + +}; diff --git a/keyboards/planck/keymaps/adamtabrams/readme.md b/keyboards/planck/keymaps/adamtabrams/readme.md new file mode 100644 index 000000000000..de9680b49851 --- /dev/null +++ b/keyboards/planck/keymaps/adamtabrams/readme.md @@ -0,0 +1,2 @@ +# The Default Planck Layout + diff --git a/keyboards/planck/keymaps/adamtabrams/rules.mk b/keyboards/planck/keymaps/adamtabrams/rules.mk new file mode 100644 index 000000000000..39a2a03c69e2 --- /dev/null +++ b/keyboards/planck/keymaps/adamtabrams/rules.mk @@ -0,0 +1,7 @@ +SRC += muse.c +LTO_ENABLE = yes +MOUSEKEY_ENABLE = yes +EXTRAKEY_ENABLE = yes +NKRO_ENABLE = yes +AUDIO_ENABLE= no +RGBLIGHT_ENABLE = yes From 3a2ab0d6c877e176c77b4f1ab6b4c987465350fd Mon Sep 17 00:00:00 2001 From: Adam Abrams Date: Sun, 14 Feb 2021 14:52:18 -0600 Subject: [PATCH 02/32] small style updates --- keyboards/planck/keymaps/adamtabrams/config.h | 1 - keyboards/planck/keymaps/adamtabrams/rules.mk | 8 +++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/keyboards/planck/keymaps/adamtabrams/config.h b/keyboards/planck/keymaps/adamtabrams/config.h index 6e3b7abd58fc..48fb6c59a2ae 100644 --- a/keyboards/planck/keymaps/adamtabrams/config.h +++ b/keyboards/planck/keymaps/adamtabrams/config.h @@ -1,6 +1,5 @@ #pragma once - // General Configs #define NO_ACTION_ONESHOT diff --git a/keyboards/planck/keymaps/adamtabrams/rules.mk b/keyboards/planck/keymaps/adamtabrams/rules.mk index 39a2a03c69e2..31da4ef08598 100644 --- a/keyboards/planck/keymaps/adamtabrams/rules.mk +++ b/keyboards/planck/keymaps/adamtabrams/rules.mk @@ -1,7 +1,13 @@ SRC += muse.c LTO_ENABLE = yes + MOUSEKEY_ENABLE = yes EXTRAKEY_ENABLE = yes NKRO_ENABLE = yes -AUDIO_ENABLE= no RGBLIGHT_ENABLE = yes + +BOOTMAGIC_ENABLE = no +COMMAND_ENABLE = no +AUDIO_ENABLE = no +ENCODER_ENABLE = no +DIP_SWITCH_ENABLE = no From 0d3cbc364c248d2dfb576f7c75e91b53cb22c5db Mon Sep 17 00:00:00 2001 From: Adam Abrams Date: Fri, 19 Feb 2021 20:56:40 -0600 Subject: [PATCH 03/32] fix name of constant --- keyboards/planck/keymaps/adamtabrams/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/planck/keymaps/adamtabrams/keymap.c b/keyboards/planck/keymaps/adamtabrams/keymap.c index 04c5dca9a78b..5a6763c17cd1 100644 --- a/keyboards/planck/keymaps/adamtabrams/keymap.c +++ b/keyboards/planck/keymaps/adamtabrams/keymap.c @@ -24,7 +24,7 @@ enum planck_layers { _CURSOR, _SYSTEM, _KBOARD, - _FMWare + _FMWARE }; #define NUMBER TT(_NUMBER) @@ -141,7 +141,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, XXXXXXX, RGB_VAI, XXXXXXX, XXXXXXX, RGB_RMOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAD, XXXXXXX, XXXXXXX, RGB_HUD, RGB_SAD, RGB_SAI, RGB_HUI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, -------, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, -------, XXXXXXX, XXXXXXX, FMWare + XXXXXXX, XXXXXXX, XXXXXXX, -------, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, -------, XXXXXXX, XXXXXXX, FMWARE ), /* FMWare From 3b132411bf984fddf8dbd22cc51bb6364f34d9bf Mon Sep 17 00:00:00 2001 From: Adam Abrams Date: Fri, 19 Feb 2021 21:10:46 -0600 Subject: [PATCH 04/32] move tapping force function to keymap file --- keyboards/planck/keymaps/adamtabrams/config.h | 18 ------------------ keyboards/planck/keymaps/adamtabrams/keymap.c | 13 +++++++++++++ 2 files changed, 13 insertions(+), 18 deletions(-) diff --git a/keyboards/planck/keymaps/adamtabrams/config.h b/keyboards/planck/keymaps/adamtabrams/config.h index 48fb6c59a2ae..1b40251cfca9 100644 --- a/keyboards/planck/keymaps/adamtabrams/config.h +++ b/keyboards/planck/keymaps/adamtabrams/config.h @@ -1,33 +1,15 @@ #pragma once // General Configs - #define NO_ACTION_ONESHOT #define FORCE_NKRO #define TAPPING_TOGGLE 2 - // Mouse Configs - #define MK_COMBINED - // Tap-Hold Configs - #define TAPPING_TERM 200 #define PERMISSIVE_HOLD #define TAPPING_FORCE_HOLD - #define TAPPING_FORCE_HOLD_PER_KEY -bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case CTL_T(KC_TAB): - return true; - case GUI_T(KC_GESC): - return true; - case SFT_T(KC_MINS): - return true; - default: - return false; - } -} diff --git a/keyboards/planck/keymaps/adamtabrams/keymap.c b/keyboards/planck/keymaps/adamtabrams/keymap.c index 5a6763c17cd1..128eb8020023 100644 --- a/keyboards/planck/keymaps/adamtabrams/keymap.c +++ b/keyboards/planck/keymaps/adamtabrams/keymap.c @@ -163,3 +163,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; + +bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case CTL_T(KC_TAB): + return true; + case GUI_T(KC_GESC): + return true; + case SFT_T(KC_MINS): + return true; + default: + return false; + } +} From d06c4a63046a44731e1440c9c8a219c0ad5c3b98 Mon Sep 17 00:00:00 2001 From: Adam Abrams Date: Fri, 19 Feb 2021 22:07:38 -0600 Subject: [PATCH 05/32] fix transparent keycode --- keyboards/planck/keymaps/adamtabrams/keymap.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/keyboards/planck/keymaps/adamtabrams/keymap.c b/keyboards/planck/keymaps/adamtabrams/keymap.c index 128eb8020023..8040fcfd84f4 100644 --- a/keyboards/planck/keymaps/adamtabrams/keymap.c +++ b/keyboards/planck/keymaps/adamtabrams/keymap.c @@ -69,7 +69,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, KC_LSFT, KC_UNDS, KC_MINS, KC_PLUS, KC_EQL, KC_PIPE, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_SLSH, KC_SFTENT, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, -------, KC_RCTL, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_RCTL, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ), /* Arrows @@ -87,7 +87,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, XXXXXXX, A(KC_RGHT), A(KC_RGHT), XXXXXXX, XXXXXXX, XXXXXXX, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC, KC_ESC, XXXXXXX, XXXXXXX, KC_PGDN, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX, KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, A(KC_LEFT), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_ENT, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RCTL, KC_SPC, -------, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RCTL, KC_SPC, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ), /* Cursor @@ -105,7 +105,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, XXXXXXX, XXXXXXX, KC_WH_U, KC_BTN2, XXXXXXX, XXXXXXX, KC_WH_U, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC, KC_LGUI, KC_ACL2, KC_ACL0, KC_WH_D, KC_BTN1, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, XXXXXXX, KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN3, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_ENT, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_ACL1, KC_SPC, XXXXXXX, -------, XXXXXXX, XXXXXXX, XXXXXXX + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_ACL1, KC_SPC, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX ), /* System @@ -123,7 +123,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_CAPS, XXXXXXX, KC_PSCR, XXXXXXX, KC_MFFD, XXXXXXX, KC_BRID, KC_VOLD, KC_VOLU, KC_BRIU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MRWD, XXXXXXX, KC_MUTE, KC_MPRV, KC_MNXT, XXXXXXX, KC_MPLY, - XXXXXXX, XXXXXXX, XXXXXXX, -------, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KBOARD, XXXXXXX, XXXXXXX, XXXXXXX + XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KBOARD, XXXXXXX, XXXXXXX, XXXXXXX ), /* KBoard @@ -141,7 +141,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, XXXXXXX, RGB_VAI, XXXXXXX, XXXXXXX, RGB_RMOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAD, XXXXXXX, XXXXXXX, RGB_HUD, RGB_SAD, RGB_SAI, RGB_HUI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, -------, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, -------, XXXXXXX, XXXXXXX, FMWARE + XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, FMWARE ), /* FMWare @@ -159,7 +159,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { XXXXXXX, XXXXXXX, XXXXXXX, EEP_RST, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DEBUG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, -------, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, -------, XXXXXXX, XXXXXXX, _______ + XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, _______ ) }; From be111f76d50ec6040a5e8ad59f840ea26247c0d0 Mon Sep 17 00:00:00 2001 From: Adam Abrams Date: Sat, 20 Feb 2021 00:08:17 -0600 Subject: [PATCH 06/32] optimize keymap --- keyboards/planck/keymaps/adamtabrams/config.h | 3 +- keyboards/planck/keymaps/adamtabrams/keymap.c | 46 +++++++++++++++---- 2 files changed, 39 insertions(+), 10 deletions(-) diff --git a/keyboards/planck/keymaps/adamtabrams/config.h b/keyboards/planck/keymaps/adamtabrams/config.h index 1b40251cfca9..bdead8b33a85 100644 --- a/keyboards/planck/keymaps/adamtabrams/config.h +++ b/keyboards/planck/keymaps/adamtabrams/config.h @@ -6,7 +6,8 @@ #define TAPPING_TOGGLE 2 // Mouse Configs -#define MK_COMBINED +#define MK_3_SPEED +#define MK_MOMENTARY_ACCEL // Tap-Hold Configs #define TAPPING_TERM 200 diff --git a/keyboards/planck/keymaps/adamtabrams/keymap.c b/keyboards/planck/keymaps/adamtabrams/keymap.c index 8040fcfd84f4..48873249edd1 100644 --- a/keyboards/planck/keymaps/adamtabrams/keymap.c +++ b/keyboards/planck/keymaps/adamtabrams/keymap.c @@ -17,6 +17,7 @@ #include QMK_KEYBOARD_H #include "muse.h" + enum planck_layers { _NORMAL, _NUMBER, @@ -27,6 +28,10 @@ enum planck_layers { _FMWARE }; +enum planck_keycodes { + GUIGESC = SAFE_RANGE +}; + #define NUMBER TT(_NUMBER) #define ARROWS TT(_ARROWS) #define CURSOR TT(_CURSOR) @@ -49,7 +54,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_NORMAL] = LAYOUT_planck_grid( CTL_T(KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, - GUI_T(KC_GESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + GUIGESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, SFT_T(KC_MINS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_SFTENT, KC_LCTRL, KC_LGUI, KC_LALT, SYSTEM, NUMBER, KC_RCTL, KC_SPC, ARROWS, CURSOR, KC_RALT, KC_RGUI, KC_RCTRL ), @@ -78,7 +83,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+------+------+------+------+------| * | ESC | | |P_Down| | | Left | Down | Up |Right | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Shift| | | | |A(<-) | | | | | | ENT | + * | Shift| | | | |A(<-) | | | | | |SFTENT| * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | CTRL |Space | \/ | | | | | * `-----------------------------------------------------------------------------------' @@ -86,26 +91,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_ARROWS] = LAYOUT_planck_grid( KC_TAB, XXXXXXX, A(KC_RGHT), A(KC_RGHT), XXXXXXX, XXXXXXX, XXXXXXX, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC, KC_ESC, XXXXXXX, XXXXXXX, KC_PGDN, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX, - KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, A(KC_LEFT), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_ENT, + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, A(KC_LEFT), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SFTENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RCTL, KC_SPC, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ), /* Cursor * ,-----------------------------------------------------------------------------------. - * | CTRL | | |Wh_Up |M_Btn2| | |Wh_Up | | | | Bksp | + * | CTRL | | |Wh_Dn |M_Btn2| | |Wh_Dn | | | | Bksp | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | GUI |M_Acc2|M_Acc0|Wh_Dn |M_Btn1| | M_L |M_Down| M_Up | M_R | | | + * | GUI |M_Acc2|M_Acc1|Wh_Up |M_Btn1| | M_L |M_Down| M_Up | M_R | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | Shift| | | |M_Btn3| | | | | | | ENT | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | |M_Acc1|Space | | \/ | | | | + * | | | | | | CTRL |Space | | \/ | | | | * `-----------------------------------------------------------------------------------' */ [_CURSOR] = LAYOUT_planck_grid( - KC_LCTL, XXXXXXX, XXXXXXX, KC_WH_U, KC_BTN2, XXXXXXX, XXXXXXX, KC_WH_U, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC, - KC_LGUI, KC_ACL2, KC_ACL0, KC_WH_D, KC_BTN1, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, XXXXXXX, + KC_LCTL, XXXXXXX, XXXXXXX, KC_WH_D, KC_BTN2, XXXXXXX, XXXXXXX, KC_WH_D, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC, + KC_LGUI, KC_ACL2, KC_ACL1, KC_WH_U, KC_BTN1, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, XXXXXXX, KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN3, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_ENT, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_ACL1, KC_SPC, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RCTL, KC_SPC, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX ), /* System @@ -164,6 +169,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + static uint16_t use_gui_timer; + + switch (keycode) { + case GUIGESC: + if(record->event.pressed){ + use_gui_timer = timer_read(); + register_code(KC_LGUI); + } else { + unregister_code(KC_LGUI); + if (timer_elapsed(use_gui_timer) < TAPPING_TERM) { + keyrecord_t temp = *record; + temp.event.pressed = true; + process_grave_esc(KC_GESC, &temp); + process_grave_esc(KC_GESC, record); + } + } + return false; + break; + } + return true; +} + bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case CTL_T(KC_TAB): From 40d84c97051b37a1ee85e3d8b9b3c49776f7a955 Mon Sep 17 00:00:00 2001 From: Adam Abrams Date: Sat, 20 Feb 2021 12:50:04 -0600 Subject: [PATCH 07/32] improve docs --- keyboards/planck/keymaps/adamtabrams/keymap.c | 66 +++++++------------ .../planck/keymaps/adamtabrams/readme.md | 62 ++++++++++++++++- 2 files changed, 84 insertions(+), 44 deletions(-) diff --git a/keyboards/planck/keymaps/adamtabrams/keymap.c b/keyboards/planck/keymaps/adamtabrams/keymap.c index 48873249edd1..dfa1e017237d 100644 --- a/keyboards/planck/keymaps/adamtabrams/keymap.c +++ b/keyboards/planck/keymaps/adamtabrams/keymap.c @@ -41,17 +41,14 @@ enum planck_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Normal - * ,-----------------------------------------------------------------------------------. +/* ## Normal + * * |C(Tab)| Q | W | E | R | T | Y | U | I | O | P | Bksp | - * |------+------+------+------+------+------+------+------+------+------+------+------| * |G(E/~)| A | S | D | F | G | H | J | K | L | ; | " | - * |------+------+------+------+------+------+------+------+------+------+------+------| * | S(-) | Z | X | C | V | B | N | M | , | . | / |SFTENT| - * |------+------+------+------+------+------+------+------+------+------+------+------| * | CTRL | GUI | ALT |System|Number| CTRL |Space |Arrows|Cursor| ALT | GUI | CTRL | - * `-----------------------------------------------------------------------------------' */ + [_NORMAL] = LAYOUT_planck_grid( CTL_T(KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, GUIGESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, @@ -59,35 +56,30 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTRL, KC_LGUI, KC_LALT, SYSTEM, NUMBER, KC_RCTL, KC_SPC, ARROWS, CURSOR, KC_RALT, KC_RGUI, KC_RCTRL ), -/* Number - * ,-----------------------------------------------------------------------------------. +/* ## Number + * * | CTRL | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | - * |------+------+------+------+------+------+------+------+------+------+------+------| * | GESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ` | - * |------+------+------+------+------+------+------+------+------+------+------+------| * | Shift| _ | - | + | = | | | [ | ] | { | } | \ |SFTENT| - * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | \/ | CTRL |Space | | | | | | - * `-----------------------------------------------------------------------------------' */ + [_NUMBER] = LAYOUT_planck_grid( KC_LCTL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, - KC_LSFT, KC_UNDS, KC_MINS, KC_PLUS, KC_EQL, KC_PIPE, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_SLSH, KC_SFTENT, + KC_LSFT, KC_UNDS, KC_MINS, KC_PLUS, KC_EQL, KC_PIPE, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_BSLS, KC_SFTENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_RCTL, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ), -/* Arrows - * ,-----------------------------------------------------------------------------------. + +/* ## Arrows + * * | Tab | |A(->) |A(->) | | | | P_Up | | | | Bksp | - * |------+------+------+------+------+------+------+------+------+------+------+------| * | ESC | | |P_Down| | | Left | Down | Up |Right | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| * | Shift| | | | |A(<-) | | | | | |SFTENT| - * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | CTRL |Space | \/ | | | | | - * `-----------------------------------------------------------------------------------' */ + [_ARROWS] = LAYOUT_planck_grid( KC_TAB, XXXXXXX, A(KC_RGHT), A(KC_RGHT), XXXXXXX, XXXXXXX, XXXXXXX, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC, KC_ESC, XXXXXXX, XXXXXXX, KC_PGDN, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX, @@ -95,17 +87,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RCTL, KC_SPC, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ), -/* Cursor - * ,-----------------------------------------------------------------------------------. +/* ## Cursor + * * | CTRL | | |Wh_Dn |M_Btn2| | |Wh_Dn | | | | Bksp | - * |------+------+------+------+------+------+------+------+------+------+------+------| * | GUI |M_Acc2|M_Acc1|Wh_Up |M_Btn1| | M_L |M_Down| M_Up | M_R | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| * | Shift| | | |M_Btn3| | | | | | | ENT | - * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | CTRL |Space | | \/ | | | | - * `-----------------------------------------------------------------------------------' */ + [_CURSOR] = LAYOUT_planck_grid( KC_LCTL, XXXXXXX, XXXXXXX, KC_WH_D, KC_BTN2, XXXXXXX, XXXXXXX, KC_WH_D, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC, KC_LGUI, KC_ACL2, KC_ACL1, KC_WH_U, KC_BTN1, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, XXXXXXX, @@ -113,17 +102,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RCTL, KC_SPC, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX ), -/* System - * ,-----------------------------------------------------------------------------------. +/* ## System + * * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | - * |------+------+------+------+------+------+------+------+------+------+------+------| * | Caps | |Pr_Scn| | Fwd | |Brght-| Vol- | Vol+ |Brght+| | | - * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | Rwd | | Mute |P_Trac|N_Trac| | Play | - * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | \/ | | | | |KBoard| | | | - * `-----------------------------------------------------------------------------------' */ + [_SYSTEM] = LAYOUT_planck_grid( 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_CAPS, XXXXXXX, KC_PSCR, XXXXXXX, KC_MFFD, XXXXXXX, KC_BRID, KC_VOLD, KC_VOLU, KC_BRIU, XXXXXXX, XXXXXXX, @@ -131,17 +117,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KBOARD, XXXXXXX, XXXXXXX, XXXXXXX ), -/* KBoard - * ,-----------------------------------------------------------------------------------. +/* ## KBoard + * * | | | | | |RGB_Tg| |Brght+| | |Mode- | | - * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | |Brght-| | | Hue- | Sat- | Sat+ | Hue+ | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | |Mode+ | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | \/ | | | | | \/ | | |Flash | - * `-----------------------------------------------------------------------------------' */ + [_KBOARD] = LAYOUT_planck_grid( XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, XXXXXXX, RGB_VAI, XXXXXXX, XXXXXXX, RGB_RMOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAD, XXXXXXX, XXXXXXX, RGB_HUD, RGB_SAD, RGB_SAI, RGB_HUI, XXXXXXX, XXXXXXX, @@ -149,17 +132,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, FMWARE ), -/* FMWare - * ,-----------------------------------------------------------------------------------. +/* ## FMWare + * * | | | |EEPROM|Reset | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | |Debug | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | \/ | | | | | \/ | | | \/ | - * `-----------------------------------------------------------------------------------' */ + [_FMWARE] = LAYOUT_planck_grid( XXXXXXX, XXXXXXX, XXXXXXX, EEP_RST, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DEBUG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, diff --git a/keyboards/planck/keymaps/adamtabrams/readme.md b/keyboards/planck/keymaps/adamtabrams/readme.md index de9680b49851..0e26f1084b96 100644 --- a/keyboards/planck/keymaps/adamtabrams/readme.md +++ b/keyboards/planck/keymaps/adamtabrams/readme.md @@ -1,2 +1,62 @@ -# The Default Planck Layout +## Normal +|------|------|------|------|------|------|------|------|------|------|------|------| +|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +|C(Tab)| Q | W | E | R | T | Y | U | I | O | P | Bksp | +|G(E/~)| A | S | D | F | G | H | J | K | L | ; | " | +| S(-) | Z | X | C | V | B | N | M | , | . | / |SFTENT| +| CTRL | GUI | ALT |System|Number| CTRL |Space |Arrows|Cursor| ALT | GUI | CTRL | + +## Number + +|------|------|------|------|------|------|------|------|------|------|------|------| +|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| CTRL | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | +| GESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \` | +| Shift| _ | - | + | = | | | [ | ] | { | } | \ |SFTENT| +| | | | | \/ | CTRL |Space | | | | | | + +## Arrows + +|------|------|------|------|------|------|------|------|------|------|------|------| +|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| Tab | |A(->) |A(->) | | | | P_Up | | | | Bksp | +| ESC | | |P_Down| | | Left | Down | Up |Right | | | +| Shift| | | | |A(<-) | | | | | |SFTENT| +| | | | | | CTRL |Space | \/ | | | | | + +## Cursor + +|------|------|------|------|------|------|------|------|------|------|------|------| +|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| CTRL | | |Wh_Dn |M_Btn2| | |Wh_Dn | | | | Bksp | +| GUI |M_Acc2|M_Acc1|Wh_Up |M_Btn1| | M_L |M_Down| M_Up | M_R | | | +| Shift| | | |M_Btn3| | | | | | | ENT | +| | | | | | CTRL |Space | | \/ | | | | + +## System + +|------|------|------|------|------|------|------|------|------|------|------|------| +|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | +| Caps | |Pr_Scn| | Fwd | |Brght-| Vol- | Vol+ |Brght+| | | +| | | | | | Rwd | | Mute |P_Trac|N_Trac| | Play | +| | | | \/ | | | | |KBoard| | | | + +## KBoard + +|------|------|------|------|------|------|------|------|------|------|------|------| +|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| | | | | |RGB_Tg| |Brght+| | |Mode- | | +| | | |Brght-| | | Hue- | Sat- | Sat+ | Hue+ | | | +| | | | | | |Mode+ | | | | | | +| | | | \/ | | | | | \/ | | |Flash | + +## FMWare + +|------|------|------|------|------|------|------|------|------|------|------|------| +|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| | | |EEPROM|Reset | | | | | | | | +| | | |Debug | | | | | | | | | +|------| | | | | | | | | | | | +| | | | \/ | | | | | \/ | | | \/ | From 62f060edb70865e072a2bce119f8e17206009cfe Mon Sep 17 00:00:00 2001 From: Adam Abrams Date: Sat, 20 Feb 2021 13:59:27 -0600 Subject: [PATCH 08/32] escape backslashes in readme --- keyboards/planck/keymaps/adamtabrams/readme.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/keyboards/planck/keymaps/adamtabrams/readme.md b/keyboards/planck/keymaps/adamtabrams/readme.md index 0e26f1084b96..97b39401993d 100644 --- a/keyboards/planck/keymaps/adamtabrams/readme.md +++ b/keyboards/planck/keymaps/adamtabrams/readme.md @@ -14,7 +14,7 @@ | CTRL | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | | GESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \` | | Shift| _ | - | + | = | | | [ | ] | { | } | \ |SFTENT| -| | | | | \/ | CTRL |Space | | | | | | +| | | | | \\/ | CTRL |Space | | | | | | ## Arrows @@ -23,7 +23,7 @@ | Tab | |A(->) |A(->) | | | | P_Up | | | | Bksp | | ESC | | |P_Down| | | Left | Down | Up |Right | | | | Shift| | | | |A(<-) | | | | | |SFTENT| -| | | | | | CTRL |Space | \/ | | | | | +| | | | | | CTRL |Space | \\/ | | | | | ## Cursor @@ -32,7 +32,7 @@ | CTRL | | |Wh_Dn |M_Btn2| | |Wh_Dn | | | | Bksp | | GUI |M_Acc2|M_Acc1|Wh_Up |M_Btn1| | M_L |M_Down| M_Up | M_R | | | | Shift| | | |M_Btn3| | | | | | | ENT | -| | | | | | CTRL |Space | | \/ | | | | +| | | | | | CTRL |Space | | \\/ | | | | ## System @@ -41,7 +41,7 @@ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | Caps | |Pr_Scn| | Fwd | |Brght-| Vol- | Vol+ |Brght+| | | | | | | | | Rwd | | Mute |P_Trac|N_Trac| | Play | -| | | | \/ | | | | |KBoard| | | | +| | | | \\/ | | | | |KBoard| | | | ## KBoard @@ -50,7 +50,7 @@ | | | | | |RGB_Tg| |Brght+| | |Mode- | | | | | |Brght-| | | Hue- | Sat- | Sat+ | Hue+ | | | | | | | | | |Mode+ | | | | | | -| | | | \/ | | | | | \/ | | |Flash | +| | | | \\/ | | | | | \\/ | | |Flash | ## FMWare @@ -59,4 +59,4 @@ | | | |EEPROM|Reset | | | | | | | | | | | |Debug | | | | | | | | | |------| | | | | | | | | | | | -| | | | \/ | | | | | \/ | | | \/ | +| | | | \\/ | | | | | \\/ | | | \\/ | From 4fb08c7826f8592b129ad4f13b9cbb6dd221d86c Mon Sep 17 00:00:00 2001 From: Adam Abrams Date: Sat, 20 Feb 2021 17:04:02 -0600 Subject: [PATCH 09/32] improve mouse and tap-hold configs --- keyboards/planck/keymaps/adamtabrams/config.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/keyboards/planck/keymaps/adamtabrams/config.h b/keyboards/planck/keymaps/adamtabrams/config.h index bdead8b33a85..d623cfabb676 100644 --- a/keyboards/planck/keymaps/adamtabrams/config.h +++ b/keyboards/planck/keymaps/adamtabrams/config.h @@ -8,9 +8,13 @@ // Mouse Configs #define MK_3_SPEED #define MK_MOMENTARY_ACCEL +#define MK_C_OFFSET_1 8 +#define MK_C_OFFSET_UNMOD 14 +#define MK_C_OFFSET_2 24 +#define MK_W_INTERVAL_UNMOD 100 // Tap-Hold Configs -#define TAPPING_TERM 200 +#define TAPPING_TERM 170 #define PERMISSIVE_HOLD #define TAPPING_FORCE_HOLD #define TAPPING_FORCE_HOLD_PER_KEY From b3b7533aa4c4815b4e6d8d109d8ffe2d98f720cd Mon Sep 17 00:00:00 2001 From: Adam Abrams Date: Sun, 21 Feb 2021 22:12:11 -0600 Subject: [PATCH 10/32] add key for restoring normal layer --- keyboards/planck/keymaps/adamtabrams/keymap.c | 29 ++++++++++--------- .../planck/keymaps/adamtabrams/readme.md | 14 ++++----- 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/keyboards/planck/keymaps/adamtabrams/keymap.c b/keyboards/planck/keymaps/adamtabrams/keymap.c index dfa1e017237d..6b764caa04c9 100644 --- a/keyboards/planck/keymaps/adamtabrams/keymap.c +++ b/keyboards/planck/keymaps/adamtabrams/keymap.c @@ -32,6 +32,7 @@ enum planck_keycodes { GUIGESC = SAFE_RANGE }; +#define NORMAL TO(_NORMAL) #define NUMBER TT(_NUMBER) #define ARROWS TT(_ARROWS) #define CURSOR TT(_CURSOR) @@ -46,14 +47,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |C(Tab)| Q | W | E | R | T | Y | U | I | O | P | Bksp | * |G(E/~)| A | S | D | F | G | H | J | K | L | ; | " | * | S(-) | Z | X | C | V | B | N | M | , | . | / |SFTENT| - * | CTRL | GUI | ALT |System|Number| CTRL |Space |Arrows|Cursor| ALT | GUI | CTRL | + * | CTRL | GUI | ALT |System|Number| CTRL |Space |Arrows|Cursor| GUI | | | */ [_NORMAL] = LAYOUT_planck_grid( CTL_T(KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, GUIGESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, SFT_T(KC_MINS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_SFTENT, - KC_LCTRL, KC_LGUI, KC_LALT, SYSTEM, NUMBER, KC_RCTL, KC_SPC, ARROWS, CURSOR, KC_RALT, KC_RGUI, KC_RCTRL + KC_LCTRL, KC_LGUI, KC_LALT, SYSTEM, NUMBER, KC_RCTL, KC_SPC, ARROWS, CURSOR, KC_RGUI, XXXXXXX, XXXXXXX ), /* ## Number @@ -61,14 +62,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | CTRL | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | * | GESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ` | * | Shift| _ | - | + | = | | | [ | ] | { | } | \ |SFTENT| - * | | | | | \/ | CTRL |Space | | | | | | + * | | | | | \/ | CTRL |Space | | | | |Normal| */ [_NUMBER] = LAYOUT_planck_grid( KC_LCTL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, KC_LSFT, KC_UNDS, KC_MINS, KC_PLUS, KC_EQL, KC_PIPE, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_BSLS, KC_SFTENT, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_RCTL, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_RCTL, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, NORMAL ), @@ -77,14 +78,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Tab | |A(->) |A(->) | | | | P_Up | | | | Bksp | * | ESC | | |P_Down| | | Left | Down | Up |Right | | | * | Shift| | | | |A(<-) | | | | | |SFTENT| - * | | | | | | CTRL |Space | \/ | | | | | + * | | | | | | CTRL |Space | \/ | | | |Normal| */ [_ARROWS] = LAYOUT_planck_grid( KC_TAB, XXXXXXX, A(KC_RGHT), A(KC_RGHT), XXXXXXX, XXXXXXX, XXXXXXX, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC, KC_ESC, XXXXXXX, XXXXXXX, KC_PGDN, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX, KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, A(KC_LEFT), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SFTENT, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RCTL, KC_SPC, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RCTL, KC_SPC, _______, XXXXXXX, XXXXXXX, XXXXXXX, NORMAL ), /* ## Cursor @@ -92,14 +93,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | CTRL | | |Wh_Dn |M_Btn2| | |Wh_Dn | | | | Bksp | * | GUI |M_Acc2|M_Acc1|Wh_Up |M_Btn1| | M_L |M_Down| M_Up | M_R | | | * | Shift| | | |M_Btn3| | | | | | | ENT | - * | | | | | | CTRL |Space | | \/ | | | | + * | | | | | | CTRL |Space | | \/ | | |Normal| */ [_CURSOR] = LAYOUT_planck_grid( KC_LCTL, XXXXXXX, XXXXXXX, KC_WH_D, KC_BTN2, XXXXXXX, XXXXXXX, KC_WH_D, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC, KC_LGUI, KC_ACL2, KC_ACL1, KC_WH_U, KC_BTN1, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, XXXXXXX, KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN3, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_ENT, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RCTL, KC_SPC, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RCTL, KC_SPC, XXXXXXX, _______, XXXXXXX, XXXXXXX, NORMAL ), /* ## System @@ -107,14 +108,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | * | Caps | |Pr_Scn| | Fwd | |Brght-| Vol- | Vol+ |Brght+| | | * | | | | | | Rwd | | Mute |P_Trac|N_Trac| | Play | - * | | | | \/ | | | | |KBoard| | | | + * | | | | \/ | | | | |KBoard| | |Normal| */ [_SYSTEM] = LAYOUT_planck_grid( 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_CAPS, XXXXXXX, KC_PSCR, XXXXXXX, KC_MFFD, XXXXXXX, KC_BRID, KC_VOLD, KC_VOLU, KC_BRIU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MRWD, XXXXXXX, KC_MUTE, KC_MPRV, KC_MNXT, XXXXXXX, KC_MPLY, - XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KBOARD, XXXXXXX, XXXXXXX, XXXXXXX + XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KBOARD, XXXXXXX, XXXXXXX, NORMAL ), /* ## KBoard @@ -122,14 +123,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | |RGB_Tg| |Brght+| | |Mode- | | * | | | |Brght-| | | Hue- | Sat- | Sat+ | Hue+ | | | * | | | | | | |Mode+ | | | | | | - * | | | | \/ | | | | | \/ | | |Flash | + * | | | | \/ | | | | | \/ | |FMWare|Normal| */ [_KBOARD] = LAYOUT_planck_grid( XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, XXXXXXX, RGB_VAI, XXXXXXX, XXXXXXX, RGB_RMOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAD, XXXXXXX, XXXXXXX, RGB_HUD, RGB_SAD, RGB_SAI, RGB_HUI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, FMWARE + XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, FMWARE, NORMAL ), /* ## FMWare @@ -137,14 +138,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | |EEPROM|Reset | | | | | | | | * | | | |Debug | | | | | | | | | * | | | | | | | | | | | | | - * | | | | \/ | | | | | \/ | | | \/ | + * | | | | \/ | | | | | \/ | | \/ |Normal| */ [_FMWARE] = LAYOUT_planck_grid( XXXXXXX, XXXXXXX, XXXXXXX, EEP_RST, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DEBUG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, _______ + XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, _______, NORMAL ) }; diff --git a/keyboards/planck/keymaps/adamtabrams/readme.md b/keyboards/planck/keymaps/adamtabrams/readme.md index 97b39401993d..95b8b122b62b 100644 --- a/keyboards/planck/keymaps/adamtabrams/readme.md +++ b/keyboards/planck/keymaps/adamtabrams/readme.md @@ -5,7 +5,7 @@ |C(Tab)| Q | W | E | R | T | Y | U | I | O | P | Bksp | |G(E/~)| A | S | D | F | G | H | J | K | L | ; | " | | S(-) | Z | X | C | V | B | N | M | , | . | / |SFTENT| -| CTRL | GUI | ALT |System|Number| CTRL |Space |Arrows|Cursor| ALT | GUI | CTRL | +| CTRL | GUI | ALT |System|Number| CTRL |Space |Arrows|Cursor| GUI | | | ## Number @@ -14,7 +14,7 @@ | CTRL | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | | GESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \` | | Shift| _ | - | + | = | | | [ | ] | { | } | \ |SFTENT| -| | | | | \\/ | CTRL |Space | | | | | | +| | | | | \\/ | CTRL |Space | | | | |Normal| ## Arrows @@ -23,7 +23,7 @@ | Tab | |A(->) |A(->) | | | | P_Up | | | | Bksp | | ESC | | |P_Down| | | Left | Down | Up |Right | | | | Shift| | | | |A(<-) | | | | | |SFTENT| -| | | | | | CTRL |Space | \\/ | | | | | +| | | | | | CTRL |Space | \\/ | | | |Normal| ## Cursor @@ -32,7 +32,7 @@ | CTRL | | |Wh_Dn |M_Btn2| | |Wh_Dn | | | | Bksp | | GUI |M_Acc2|M_Acc1|Wh_Up |M_Btn1| | M_L |M_Down| M_Up | M_R | | | | Shift| | | |M_Btn3| | | | | | | ENT | -| | | | | | CTRL |Space | | \\/ | | | | +| | | | | | CTRL |Space | | \\/ | | |Normal| ## System @@ -41,7 +41,7 @@ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | Caps | |Pr_Scn| | Fwd | |Brght-| Vol- | Vol+ |Brght+| | | | | | | | | Rwd | | Mute |P_Trac|N_Trac| | Play | -| | | | \\/ | | | | |KBoard| | | | +| | | | \\/ | | | | |KBoard| | |Normal| ## KBoard @@ -50,7 +50,7 @@ | | | | | |RGB_Tg| |Brght+| | |Mode- | | | | | |Brght-| | | Hue- | Sat- | Sat+ | Hue+ | | | | | | | | | |Mode+ | | | | | | -| | | | \\/ | | | | | \\/ | | |Flash | +| | | | \\/ | | | | | \\/ | |FMWare|Normal| ## FMWare @@ -59,4 +59,4 @@ | | | |EEPROM|Reset | | | | | | | | | | | |Debug | | | | | | | | | |------| | | | | | | | | | | | -| | | | \\/ | | | | | \\/ | | | \\/ | +| | | | \\/ | | | | | \\/ | | \\/ |Normal| From 5ee05ac2ceb4389a6668e14ca747388f42bbacd7 Mon Sep 17 00:00:00 2001 From: Adam Abrams Date: Mon, 22 Feb 2021 15:52:46 -0600 Subject: [PATCH 11/32] optimize hold-tap, scroll speed, and layer toggle --- keyboards/planck/keymaps/adamtabrams/config.h | 5 +- keyboards/planck/keymaps/adamtabrams/keymap.c | 60 +++++++++++-------- .../planck/keymaps/adamtabrams/readme.md | 12 ++-- 3 files changed, 44 insertions(+), 33 deletions(-) diff --git a/keyboards/planck/keymaps/adamtabrams/config.h b/keyboards/planck/keymaps/adamtabrams/config.h index d623cfabb676..d798a77c8ed3 100644 --- a/keyboards/planck/keymaps/adamtabrams/config.h +++ b/keyboards/planck/keymaps/adamtabrams/config.h @@ -3,7 +3,7 @@ // General Configs #define NO_ACTION_ONESHOT #define FORCE_NKRO -#define TAPPING_TOGGLE 2 +#define TAPPING_TOGGLE 3 // Mouse Configs #define MK_3_SPEED @@ -11,7 +11,8 @@ #define MK_C_OFFSET_1 8 #define MK_C_OFFSET_UNMOD 14 #define MK_C_OFFSET_2 24 -#define MK_W_INTERVAL_UNMOD 100 +// for MK_W lower is faster +#define MK_W_INTERVAL_UNMOD 80 // Tap-Hold Configs #define TAPPING_TERM 170 diff --git a/keyboards/planck/keymaps/adamtabrams/keymap.c b/keyboards/planck/keymaps/adamtabrams/keymap.c index 6b764caa04c9..cfa593b4c7a6 100644 --- a/keyboards/planck/keymaps/adamtabrams/keymap.c +++ b/keyboards/planck/keymaps/adamtabrams/keymap.c @@ -46,46 +46,46 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * * |C(Tab)| Q | W | E | R | T | Y | U | I | O | P | Bksp | * |G(E/~)| A | S | D | F | G | H | J | K | L | ; | " | - * | S(-) | Z | X | C | V | B | N | M | , | . | / |SFTENT| + * | S(-) | Z | X | C | V | B | N | M | , | . | / |S(ENT)| * | CTRL | GUI | ALT |System|Number| CTRL |Space |Arrows|Cursor| GUI | | | */ [_NORMAL] = LAYOUT_planck_grid( CTL_T(KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, GUIGESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - SFT_T(KC_MINS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_SFTENT, + SFT_T(KC_MINS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT), KC_LCTRL, KC_LGUI, KC_LALT, SYSTEM, NUMBER, KC_RCTL, KC_SPC, ARROWS, CURSOR, KC_RGUI, XXXXXXX, XXXXXXX ), /* ## Number * - * | CTRL | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |C(TAB)| ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | * | GESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ` | - * | Shift| _ | - | + | = | | | [ | ] | { | } | \ |SFTENT| + * | Shift| _ | - | + | = | | | [ | ] | { | } | \ |S(ENT)| * | | | | | \/ | CTRL |Space | | | | |Normal| */ [_NUMBER] = LAYOUT_planck_grid( - KC_LCTL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, - KC_LSFT, KC_UNDS, KC_MINS, KC_PLUS, KC_EQL, KC_PIPE, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_BSLS, KC_SFTENT, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_RCTL, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, NORMAL + CTL_T(KC_TAB), KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, + KC_LSFT, KC_UNDS, KC_MINS, KC_PLUS, KC_EQL, KC_PIPE, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_BSLS, SFT_T(KC_ENT), + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_RCTL, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, NORMAL ), /* ## Arrows * - * | Tab | |A(->) |A(->) | | | | P_Up | | | | Bksp | - * | ESC | | |P_Down| | | Left | Down | Up |Right | | | - * | Shift| | | | |A(<-) | | | | | |SFTENT| - * | | | | | | CTRL |Space | \/ | | | |Normal| + * |C(Tab)| |A(->) |A(->) | | | | P_Up | | | | Bksp | + * |G(ESC)| | |P_Down| | | Left | Down | Up |Right | | | + * | Shift| | | | |A(<-) | | | | | |S(ENT)| + * | | | | | | ALT |Space | \/ | | | |Normal| */ [_ARROWS] = LAYOUT_planck_grid( - KC_TAB, XXXXXXX, A(KC_RGHT), A(KC_RGHT), XXXXXXX, XXXXXXX, XXXXXXX, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC, - KC_ESC, XXXXXXX, XXXXXXX, KC_PGDN, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX, - KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, A(KC_LEFT), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SFTENT, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RCTL, KC_SPC, _______, XXXXXXX, XXXXXXX, XXXXXXX, NORMAL + CTL_T(KC_TAB), XXXXXXX, A(KC_RGHT), A(KC_RGHT), XXXXXXX, XXXXXXX, XXXXXXX, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC, + GUI_T(KC_ESC), XXXXXXX, XXXXXXX, KC_PGDN, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX, + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, A(KC_LEFT), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, SFT_T(KC_ENT), + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RALT, KC_SPC, _______, XXXXXXX, XXXXXXX, XXXXXXX, NORMAL ), /* ## Cursor @@ -151,24 +151,32 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { + static bool r_shift_is_pressed = false; static uint16_t use_gui_timer; switch (keycode) { + case SFT_T(KC_ENT): + if(record->event.pressed){ + r_shift_is_pressed = true; + } else { + r_shift_is_pressed = false; + } + return true; case GUIGESC: if(record->event.pressed){ - use_gui_timer = timer_read(); - register_code(KC_LGUI); + if(r_shift_is_pressed){ + tap_code(KC_GRV); + } else { + use_gui_timer = timer_read(); + register_code(KC_LGUI); + } } else { unregister_code(KC_LGUI); if (timer_elapsed(use_gui_timer) < TAPPING_TERM) { - keyrecord_t temp = *record; - temp.event.pressed = true; - process_grave_esc(KC_GESC, &temp); - process_grave_esc(KC_GESC, record); + tap_code(KC_ESC); } } return false; - break; } return true; } @@ -177,10 +185,12 @@ bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case CTL_T(KC_TAB): return true; - case GUI_T(KC_GESC): - return true; case SFT_T(KC_MINS): return true; + case GUI_T(KC_ESC): + return true; + case SFT_T(KC_ENT): + return true; default: return false; } diff --git a/keyboards/planck/keymaps/adamtabrams/readme.md b/keyboards/planck/keymaps/adamtabrams/readme.md index 95b8b122b62b..8877eb2953b8 100644 --- a/keyboards/planck/keymaps/adamtabrams/readme.md +++ b/keyboards/planck/keymaps/adamtabrams/readme.md @@ -4,7 +4,7 @@ |:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| |C(Tab)| Q | W | E | R | T | Y | U | I | O | P | Bksp | |G(E/~)| A | S | D | F | G | H | J | K | L | ; | " | -| S(-) | Z | X | C | V | B | N | M | , | . | / |SFTENT| +| S(-) | Z | X | C | V | B | N | M | , | . | / |S(ENT)| | CTRL | GUI | ALT |System|Number| CTRL |Space |Arrows|Cursor| GUI | | | ## Number @@ -13,17 +13,17 @@ |:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| | CTRL | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | | GESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \` | -| Shift| _ | - | + | = | | | [ | ] | { | } | \ |SFTENT| +| Shift| _ | - | + | = | | | [ | ] | { | } | \ |S(ENT)| | | | | | \\/ | CTRL |Space | | | | |Normal| ## Arrows |------|------|------|------|------|------|------|------|------|------|------|------| |:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| -| Tab | |A(->) |A(->) | | | | P_Up | | | | Bksp | -| ESC | | |P_Down| | | Left | Down | Up |Right | | | -| Shift| | | | |A(<-) | | | | | |SFTENT| -| | | | | | CTRL |Space | \\/ | | | |Normal| +|C(Tab)| |A(->) |A(->) | | | | P_Up | | | | Bksp | +|G(ESC)| | |P_Down| | | Left | Down | Up |Right | | | +| Shift| | | | |A(<-) | | | | | |S(ENT)| +| | | | | | ALT |Space | \\/ | | | |Normal| ## Cursor From 740760779196f4eeb40ceb505c41c789d12b7d61 Mon Sep 17 00:00:00 2001 From: Adam Abrams Date: Mon, 22 Feb 2021 21:48:36 -0600 Subject: [PATCH 12/32] prevent escape when command and space are pressed --- keyboards/planck/keymaps/adamtabrams/config.h | 8 ++++---- keyboards/planck/keymaps/adamtabrams/keymap.c | 10 +++++++++- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/keyboards/planck/keymaps/adamtabrams/config.h b/keyboards/planck/keymaps/adamtabrams/config.h index d798a77c8ed3..51422802f597 100644 --- a/keyboards/planck/keymaps/adamtabrams/config.h +++ b/keyboards/planck/keymaps/adamtabrams/config.h @@ -3,14 +3,14 @@ // General Configs #define NO_ACTION_ONESHOT #define FORCE_NKRO -#define TAPPING_TOGGLE 3 +#define TAPPING_TOGGLE 2 // Mouse Configs #define MK_3_SPEED #define MK_MOMENTARY_ACCEL -#define MK_C_OFFSET_1 8 -#define MK_C_OFFSET_UNMOD 14 -#define MK_C_OFFSET_2 24 +#define MK_C_OFFSET_1 6 +#define MK_C_OFFSET_UNMOD 16 +#define MK_C_OFFSET_2 26 // for MK_W lower is faster #define MK_W_INTERVAL_UNMOD 80 diff --git a/keyboards/planck/keymaps/adamtabrams/keymap.c b/keyboards/planck/keymaps/adamtabrams/keymap.c index cfa593b4c7a6..52b7b673b087 100644 --- a/keyboards/planck/keymaps/adamtabrams/keymap.c +++ b/keyboards/planck/keymaps/adamtabrams/keymap.c @@ -152,6 +152,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { bool process_record_user(uint16_t keycode, keyrecord_t *record) { static bool r_shift_is_pressed = false; + static bool space_is_pressed = false; static uint16_t use_gui_timer; switch (keycode) { @@ -162,6 +163,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { r_shift_is_pressed = false; } return true; + case KC_SPC: + if(record->event.pressed){ + space_is_pressed = true; + } else { + space_is_pressed = false; + } + return true; case GUIGESC: if(record->event.pressed){ if(r_shift_is_pressed){ @@ -172,7 +180,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } } else { unregister_code(KC_LGUI); - if (timer_elapsed(use_gui_timer) < TAPPING_TERM) { + if (timer_elapsed(use_gui_timer) < TAPPING_TERM && !space_is_pressed) { tap_code(KC_ESC); } } From e3db07c18137db40afb3814385f34a9cd2266972 Mon Sep 17 00:00:00 2001 From: Adam Abrams Date: Tue, 23 Feb 2021 08:46:44 -0600 Subject: [PATCH 13/32] improve custom GUIGESC keycode --- keyboards/planck/keymaps/adamtabrams/keymap.c | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/keyboards/planck/keymaps/adamtabrams/keymap.c b/keyboards/planck/keymaps/adamtabrams/keymap.c index 52b7b673b087..c962dc5e4854 100644 --- a/keyboards/planck/keymaps/adamtabrams/keymap.c +++ b/keyboards/planck/keymaps/adamtabrams/keymap.c @@ -152,8 +152,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { bool process_record_user(uint16_t keycode, keyrecord_t *record) { static bool r_shift_is_pressed = false; - static bool space_is_pressed = false; - static uint16_t use_gui_timer; + static bool gg_is_pressed = false; + static bool gg_was_used = false; + static uint16_t gg_timer; + + if(keycode != GUIGESC && record->event.pressed && gg_is_pressed) { + gg_was_used = true; + register_code(KC_LGUI); + } switch (keycode) { case SFT_T(KC_ENT): @@ -163,24 +169,20 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { r_shift_is_pressed = false; } return true; - case KC_SPC: - if(record->event.pressed){ - space_is_pressed = true; - } else { - space_is_pressed = false; - } - return true; case GUIGESC: if(record->event.pressed){ if(r_shift_is_pressed){ tap_code(KC_GRV); } else { - use_gui_timer = timer_read(); - register_code(KC_LGUI); + gg_is_pressed = true; + gg_timer = timer_read(); } } else { - unregister_code(KC_LGUI); - if (timer_elapsed(use_gui_timer) < TAPPING_TERM && !space_is_pressed) { + gg_is_pressed = false; + if(gg_was_used) { + gg_was_used = false; + unregister_code(KC_LGUI); + } else if (timer_elapsed(gg_timer) < TAPPING_TERM) { tap_code(KC_ESC); } } From 2996499bee9ff86db10145ae1bae4d1d14f84008 Mon Sep 17 00:00:00 2001 From: Adam Abrams Date: Wed, 24 Feb 2021 13:23:33 -0600 Subject: [PATCH 14/32] change modifier layout --- keyboards/planck/keymaps/adamtabrams/keymap.c | 180 ++++++++++-------- .../planck/keymaps/adamtabrams/readme.md | 38 ++-- 2 files changed, 118 insertions(+), 100 deletions(-) diff --git a/keyboards/planck/keymaps/adamtabrams/keymap.c b/keyboards/planck/keymaps/adamtabrams/keymap.c index c962dc5e4854..d7a5f70a5112 100644 --- a/keyboards/planck/keymaps/adamtabrams/keymap.c +++ b/keyboards/planck/keymaps/adamtabrams/keymap.c @@ -29,7 +29,8 @@ enum planck_layers { }; enum planck_keycodes { - GUIGESC = SAFE_RANGE + BACKESC = SAFE_RANGE, + GUIEQTI }; #define NORMAL TO(_NORMAL) @@ -43,148 +44,167 @@ enum planck_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* ## Normal - * - * |C(Tab)| Q | W | E | R | T | Y | U | I | O | P | Bksp | - * |G(E/~)| A | S | D | F | G | H | J | K | L | ; | " | - * | S(-) | Z | X | C | V | B | N | M | , | . | / |S(ENT)| - * | CTRL | GUI | ALT |System|Number| CTRL |Space |Arrows|Cursor| GUI | | | + +|C(Tab)| Q | W | E | R | T | Y | U | I | O | P |C(-_) | +|Bsp/Es| A | S | D | F | G | H | J | K | L | ;: |A('") | +|G(=/~)| Z | X | C | V | B | N | M | , | . | /? |Enter | +| CTRL | GUI | ALT |System|Number| SHFT |Space |Arrows|Cursor| GUI | |Normal| */ [_NORMAL] = LAYOUT_planck_grid( - CTL_T(KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, - GUIGESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - SFT_T(KC_MINS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT), - KC_LCTRL, KC_LGUI, KC_LALT, SYSTEM, NUMBER, KC_RCTL, KC_SPC, ARROWS, CURSOR, KC_RGUI, XXXXXXX, XXXXXXX + CTL_T(KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, CTL_T(KC_MINS), + BACKESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, ALT_T(KC_QUOT), + GUIEQTI, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + KC_LCTRL, KC_LGUI, KC_LALT, SYSTEM, NUMBER, KC_LSFT, KC_SPC, ARROWS, CURSOR, KC_RGUI, XXXXXXX, NORMAL ), /* ## Number - * - * |C(TAB)| ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | - * | GESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ` | - * | Shift| _ | - | + | = | | | [ | ] | { | } | \ |S(ENT)| - * | | | | | \/ | CTRL |Space | | | | |Normal| + +| | ! | @ | # | $ | % | ^ | & | * | ( | ) | | +| | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \` | +| | _ | - | + | = | | | [ | ] | { | } | \ | | +| | | | | \\/ | | | | | | | | */ [_NUMBER] = LAYOUT_planck_grid( - CTL_T(KC_TAB), KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, - KC_LSFT, KC_UNDS, KC_MINS, KC_PLUS, KC_EQL, KC_PIPE, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_BSLS, SFT_T(KC_ENT), - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_RCTL, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, NORMAL + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, + _______, KC_UNDS, KC_MINS, KC_PLUS, KC_EQL, KC_PIPE, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_BSLS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), /* ## Arrows - * - * |C(Tab)| |A(->) |A(->) | | | | P_Up | | | | Bksp | - * |G(ESC)| | |P_Down| | | Left | Down | Up |Right | | | - * | Shift| | | | |A(<-) | | | | | |S(ENT)| - * | | | | | | ALT |Space | \/ | | | |Normal| + +| | |A(->) |A(->) | | | | P_Up | | | | | +| | | |P_Down| | | Left | Down | Up |Right | | | +| | | | | |A(<-) | | | | | | | +| | | | | | | | \\/ | | | | | */ [_ARROWS] = LAYOUT_planck_grid( - CTL_T(KC_TAB), XXXXXXX, A(KC_RGHT), A(KC_RGHT), XXXXXXX, XXXXXXX, XXXXXXX, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC, - GUI_T(KC_ESC), XXXXXXX, XXXXXXX, KC_PGDN, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX, - KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, A(KC_LEFT), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, SFT_T(KC_ENT), - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RALT, KC_SPC, _______, XXXXXXX, XXXXXXX, XXXXXXX, NORMAL + _______, XXXXXXX, A(KC_RGHT), A(KC_RGHT), XXXXXXX, XXXXXXX, XXXXXXX, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, _______, + _______, XXXXXXX, XXXXXXX, KC_PGDN, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, _______, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, A(KC_LEFT), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), /* ## Cursor - * - * | CTRL | | |Wh_Dn |M_Btn2| | |Wh_Dn | | | | Bksp | - * | GUI |M_Acc2|M_Acc1|Wh_Up |M_Btn1| | M_L |M_Down| M_Up | M_R | | | - * | Shift| | | |M_Btn3| | | | | | | ENT | - * | | | | | | CTRL |Space | | \/ | | |Normal| + +| | | |Wh_Dn |M_Btn2| | |Wh_Dn | | | | | +| |M_Acc2|M_Acc1|Wh_Up |M_Btn1| | M_L |M_Down| M_Up | M_R | | | +| | | | |M_Btn3| | | | | | | | +| | | | | | | | | \\/ | | | | */ [_CURSOR] = LAYOUT_planck_grid( - KC_LCTL, XXXXXXX, XXXXXXX, KC_WH_D, KC_BTN2, XXXXXXX, XXXXXXX, KC_WH_D, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC, - KC_LGUI, KC_ACL2, KC_ACL1, KC_WH_U, KC_BTN1, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, XXXXXXX, - KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN3, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_ENT, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RCTL, KC_SPC, XXXXXXX, _______, XXXXXXX, XXXXXXX, NORMAL + _______, XXXXXXX, XXXXXXX, KC_WH_D, KC_BTN2, XXXXXXX, XXXXXXX, KC_WH_D, XXXXXXX, XXXXXXX, XXXXXXX, _______, + _______, KC_ACL2, KC_ACL1, KC_WH_U, KC_BTN1, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, _______, + _______, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN3, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), /* ## System - * - * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | - * | Caps | |Pr_Scn| | Fwd | |Brght-| Vol- | Vol+ |Brght+| | | - * | | | | | | Rwd | | Mute |P_Trac|N_Trac| | Play | - * | | | | \/ | | | | |KBoard| | |Normal| + +| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | +| Caps | |Pr_Scn| | Fwd | |Brght-| Vol- | Vol+ |Brght+| | | +| | | | | | Rwd | | Mute |P_Trac|N_Trac| | Play | +| | | | \\/ | | | | |KBoard| | | | */ [_SYSTEM] = LAYOUT_planck_grid( 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_CAPS, XXXXXXX, KC_PSCR, XXXXXXX, KC_MFFD, XXXXXXX, KC_BRID, KC_VOLD, KC_VOLU, KC_BRIU, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MRWD, XXXXXXX, KC_MUTE, KC_MPRV, KC_MNXT, XXXXXXX, KC_MPLY, - XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KBOARD, XXXXXXX, XXXXXXX, NORMAL + KC_CAPS, XXXXXXX, KC_PSCR, XXXXXXX, KC_MFFD, XXXXXXX, KC_BRID, KC_VOLD, KC_VOLU, KC_BRIU, XXXXXXX, _______, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MRWD, XXXXXXX, KC_MUTE, KC_MPRV, KC_MNXT, XXXXXXX, KC_MPLY, + _______, _______, _______, _______, _______, _______, _______, _______, KBOARD, _______, _______, _______ ), /* ## KBoard - * - * | | | | | |RGB_Tg| |Brght+| | |Mode- | | - * | | | |Brght-| | | Hue- | Sat- | Sat+ | Hue+ | | | - * | | | | | | |Mode+ | | | | | | - * | | | | \/ | | | | | \/ | |FMWare|Normal| + +| | | | | |RGB_Tg| |Brght+| | |Mode- | | +| | | |Brght-| | | Hue- | Sat- | Sat+ | Hue+ | | | +| | | | | | |Mode+ | | | | | | +| | | | \\/ | | | | | \\/ | |FMWare| | */ [_KBOARD] = LAYOUT_planck_grid( XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, XXXXXXX, RGB_VAI, XXXXXXX, XXXXXXX, RGB_RMOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAD, XXXXXXX, XXXXXXX, RGB_HUD, RGB_SAD, RGB_SAI, RGB_HUI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, FMWARE, NORMAL + XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, FMWARE, _______ ), /* ## FMWare - * - * | | | |EEPROM|Reset | | | | | | | | - * | | | |Debug | | | | | | | | | - * | | | | | | | | | | | | | - * | | | | \/ | | | | | \/ | | \/ |Normal| + +| | | |EEPROM|Reset | | | | | | | | +| | | |Debug | | | | | | | | | +|------| | | | | | | | | | | | +| | | | \\/ | | | | | \\/ | | \\/ | | */ [_FMWARE] = LAYOUT_planck_grid( XXXXXXX, XXXXXXX, XXXXXXX, EEP_RST, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DEBUG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, _______, NORMAL + XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, _______, _______ ) }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { - static bool r_shift_is_pressed = false; - static bool gg_is_pressed = false; - static bool gg_was_used = false; - static uint16_t gg_timer; - - if(keycode != GUIGESC && record->event.pressed && gg_is_pressed) { - gg_was_used = true; + static bool shift_is_pressed = false; + static bool shift_was_pressed = false; + static bool gui_is_pressed = false; + static bool gui_was_used = false; + static uint16_t gui_timer; + + if(keycode != GUIEQTI && record->event.pressed && gui_is_pressed) { + gui_was_used = true; register_code(KC_LGUI); } switch (keycode) { - case SFT_T(KC_ENT): + case KC_LSFT: if(record->event.pressed){ - r_shift_is_pressed = true; + shift_is_pressed = true; } else { - r_shift_is_pressed = false; + shift_is_pressed = false; } return true; - case GUIGESC: + case BACKESC: if(record->event.pressed){ - if(r_shift_is_pressed){ - tap_code(KC_GRV); + if(shift_is_pressed) { + register_code(KC_ESC); } else { - gg_is_pressed = true; - gg_timer = timer_read(); + register_code(KC_BSPC); + } + } else { + unregister_code(KC_ESC); + unregister_code(KC_BSPC); + } + return false; + case GUIEQTI: + if(record->event.pressed){ + gui_is_pressed = true; + gui_timer = timer_read(); + if(shift_is_pressed) { + shift_was_pressed = true; } } else { - gg_is_pressed = false; - if(gg_was_used) { - gg_was_used = false; + gui_is_pressed = false; + if(gui_was_used) { + gui_was_used = false; unregister_code(KC_LGUI); - } else if (timer_elapsed(gg_timer) < TAPPING_TERM) { - tap_code(KC_ESC); + } else if (timer_elapsed(gui_timer) < TAPPING_TERM) { + if(shift_was_pressed){ + register_code(KC_RSFT); + tap_code(KC_GRV); + unregister_code(KC_RSFT); + } else { + tap_code(KC_EQL); + } } + shift_was_pressed = false; } return false; } @@ -195,11 +215,9 @@ bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case CTL_T(KC_TAB): return true; - case SFT_T(KC_MINS): - return true; - case GUI_T(KC_ESC): + case CTL_T(KC_MINS): return true; - case SFT_T(KC_ENT): + case ALT_T(KC_QUOT): return true; default: return false; diff --git a/keyboards/planck/keymaps/adamtabrams/readme.md b/keyboards/planck/keymaps/adamtabrams/readme.md index 8877eb2953b8..3ac7d26608e9 100644 --- a/keyboards/planck/keymaps/adamtabrams/readme.md +++ b/keyboards/planck/keymaps/adamtabrams/readme.md @@ -2,37 +2,37 @@ |------|------|------|------|------|------|------|------|------|------|------|------| |:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| -|C(Tab)| Q | W | E | R | T | Y | U | I | O | P | Bksp | -|G(E/~)| A | S | D | F | G | H | J | K | L | ; | " | -| S(-) | Z | X | C | V | B | N | M | , | . | / |S(ENT)| -| CTRL | GUI | ALT |System|Number| CTRL |Space |Arrows|Cursor| GUI | | | +|C(Tab)| Q | W | E | R | T | Y | U | I | O | P |C(-_) | +|Bsp/Es| A | S | D | F | G | H | J | K | L | ;: |A('") | +|G(=/~)| Z | X | C | V | B | N | M | , | . | /? |Enter | +| CTRL | GUI | ALT |System|Number| SHFT |Space |Arrows|Cursor| GUI | |Normal| ## Number |------|------|------|------|------|------|------|------|------|------|------|------| |:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| -| CTRL | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | -| GESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \` | -| Shift| _ | - | + | = | | | [ | ] | { | } | \ |S(ENT)| -| | | | | \\/ | CTRL |Space | | | | |Normal| +| | ! | @ | # | $ | % | ^ | & | * | ( | ) | | +| | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \` | +| | _ | - | + | = | | | [ | ] | { | } | \ | | +| | | | | \\/ | | | | | | | | ## Arrows |------|------|------|------|------|------|------|------|------|------|------|------| |:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| -|C(Tab)| |A(->) |A(->) | | | | P_Up | | | | Bksp | -|G(ESC)| | |P_Down| | | Left | Down | Up |Right | | | -| Shift| | | | |A(<-) | | | | | |S(ENT)| -| | | | | | ALT |Space | \\/ | | | |Normal| +| | |A(->) |A(->) | | | | P_Up | | | | | +| | | |P_Down| | | Left | Down | Up |Right | | | +| | | | | |A(<-) | | | | | | | +| | | | | | | | \\/ | | | | | ## Cursor |------|------|------|------|------|------|------|------|------|------|------|------| |:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| -| CTRL | | |Wh_Dn |M_Btn2| | |Wh_Dn | | | | Bksp | -| GUI |M_Acc2|M_Acc1|Wh_Up |M_Btn1| | M_L |M_Down| M_Up | M_R | | | -| Shift| | | |M_Btn3| | | | | | | ENT | -| | | | | | CTRL |Space | | \\/ | | |Normal| +| | | |Wh_Dn |M_Btn2| | |Wh_Dn | | | | | +| |M_Acc2|M_Acc1|Wh_Up |M_Btn1| | M_L |M_Down| M_Up | M_R | | | +| | | | |M_Btn3| | | | | | | | +| | | | | | | | | \\/ | | | | ## System @@ -41,7 +41,7 @@ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | Caps | |Pr_Scn| | Fwd | |Brght-| Vol- | Vol+ |Brght+| | | | | | | | | Rwd | | Mute |P_Trac|N_Trac| | Play | -| | | | \\/ | | | | |KBoard| | |Normal| +| | | | \\/ | | | | |KBoard| | | | ## KBoard @@ -50,7 +50,7 @@ | | | | | |RGB_Tg| |Brght+| | |Mode- | | | | | |Brght-| | | Hue- | Sat- | Sat+ | Hue+ | | | | | | | | | |Mode+ | | | | | | -| | | | \\/ | | | | | \\/ | |FMWare|Normal| +| | | | \\/ | | | | | \\/ | |FMWare| | ## FMWare @@ -59,4 +59,4 @@ | | | |EEPROM|Reset | | | | | | | | | | | |Debug | | | | | | | | | |------| | | | | | | | | | | | -| | | | \\/ | | | | | \\/ | | \\/ |Normal| +| | | | \\/ | | | | | \\/ | | \\/ | | From 436052e3d0f6200214bae5c6f9132180b5df30de Mon Sep 17 00:00:00 2001 From: Adam Abrams Date: Wed, 24 Feb 2021 16:22:04 -0600 Subject: [PATCH 15/32] add right gui and fix escape --- keyboards/planck/keymaps/adamtabrams/keymap.c | 12 ++++++++---- keyboards/planck/keymaps/adamtabrams/readme.md | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/keyboards/planck/keymaps/adamtabrams/keymap.c b/keyboards/planck/keymaps/adamtabrams/keymap.c index d7a5f70a5112..0549f23bf58e 100644 --- a/keyboards/planck/keymaps/adamtabrams/keymap.c +++ b/keyboards/planck/keymaps/adamtabrams/keymap.c @@ -47,14 +47,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |C(Tab)| Q | W | E | R | T | Y | U | I | O | P |C(-_) | |Bsp/Es| A | S | D | F | G | H | J | K | L | ;: |A('") | -|G(=/~)| Z | X | C | V | B | N | M | , | . | /? |Enter | +|G(=/~)| Z | X | C | V | B | N | M | , | . | /? |G(Ent)| | CTRL | GUI | ALT |System|Number| SHFT |Space |Arrows|Cursor| GUI | |Normal| */ [_NORMAL] = LAYOUT_planck_grid( CTL_T(KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, CTL_T(KC_MINS), BACKESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, ALT_T(KC_QUOT), - GUIEQTI, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + GUIEQTI, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, GUI_T(KC_ENT), KC_LCTRL, KC_LGUI, KC_LALT, SYSTEM, NUMBER, KC_LSFT, KC_SPC, ARROWS, CURSOR, KC_RGUI, XXXXXXX, NORMAL ), @@ -174,7 +174,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case BACKESC: if(record->event.pressed){ if(shift_is_pressed) { + unregister_code(KC_LSFT); register_code(KC_ESC); + register_code(KC_LSFT); } else { register_code(KC_BSPC); } @@ -197,9 +199,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { unregister_code(KC_LGUI); } else if (timer_elapsed(gui_timer) < TAPPING_TERM) { if(shift_was_pressed){ - register_code(KC_RSFT); + register_code(KC_LSFT); tap_code(KC_GRV); - unregister_code(KC_RSFT); + unregister_code(KC_LSFT); } else { tap_code(KC_EQL); } @@ -219,6 +221,8 @@ bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) { return true; case ALT_T(KC_QUOT): return true; + case GUI_T(KC_ENT): + return true; default: return false; } diff --git a/keyboards/planck/keymaps/adamtabrams/readme.md b/keyboards/planck/keymaps/adamtabrams/readme.md index 3ac7d26608e9..3bd0daad72e7 100644 --- a/keyboards/planck/keymaps/adamtabrams/readme.md +++ b/keyboards/planck/keymaps/adamtabrams/readme.md @@ -4,7 +4,7 @@ |:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| |C(Tab)| Q | W | E | R | T | Y | U | I | O | P |C(-_) | |Bsp/Es| A | S | D | F | G | H | J | K | L | ;: |A('") | -|G(=/~)| Z | X | C | V | B | N | M | , | . | /? |Enter | +|G(=/~)| Z | X | C | V | B | N | M | , | . | /? |G(Ent)| | CTRL | GUI | ALT |System|Number| SHFT |Space |Arrows|Cursor| GUI | |Normal| ## Number From fcfd3601310aa1a95b998956e51427760be913a2 Mon Sep 17 00:00:00 2001 From: Adam Abrams Date: Wed, 24 Feb 2021 20:40:34 -0600 Subject: [PATCH 16/32] move escape to left thumb --- keyboards/planck/keymaps/adamtabrams/keymap.c | 68 +++++-------------- .../planck/keymaps/adamtabrams/readme.md | 14 ++-- 2 files changed, 25 insertions(+), 57 deletions(-) diff --git a/keyboards/planck/keymaps/adamtabrams/keymap.c b/keyboards/planck/keymaps/adamtabrams/keymap.c index 0549f23bf58e..c9f9749cc3c5 100644 --- a/keyboards/planck/keymaps/adamtabrams/keymap.c +++ b/keyboards/planck/keymaps/adamtabrams/keymap.c @@ -29,8 +29,7 @@ enum planck_layers { }; enum planck_keycodes { - BACKESC = SAFE_RANGE, - GUIEQTI + BACKTLD = SAFE_RANGE }; #define NORMAL TO(_NORMAL) @@ -45,17 +44,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* ## Normal -|C(Tab)| Q | W | E | R | T | Y | U | I | O | P |C(-_) | -|Bsp/Es| A | S | D | F | G | H | J | K | L | ;: |A('") | -|G(=/~)| Z | X | C | V | B | N | M | , | . | /? |G(Ent)| -| CTRL | GUI | ALT |System|Number| SHFT |Space |Arrows|Cursor| GUI | |Normal| +| C(Tab) | Q | W | E | R | T | Y | U | I | O | P |C(=+) | +|Backsp/~| A | S | D | F | G | H | J | K | L | ;: |A('") | +| G(-_) | Z | X | C | V | B | N | M | , | . | /? |G(Ent)| +| CTRL | GUI | ALT |System|Number|S(Esc)|Space |Arrows|Cursor| GUI | |Normal| */ [_NORMAL] = LAYOUT_planck_grid( - CTL_T(KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, CTL_T(KC_MINS), - BACKESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, ALT_T(KC_QUOT), - GUIEQTI, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, GUI_T(KC_ENT), - KC_LCTRL, KC_LGUI, KC_LALT, SYSTEM, NUMBER, KC_LSFT, KC_SPC, ARROWS, CURSOR, KC_RGUI, XXXXXXX, NORMAL + CTL_T(KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, CTL_T(KC_EQL), + BACKTLD, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, ALT_T(KC_QUOT), + GUI_T(KC_MINS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, GUI_T(KC_ENT), + KC_LCTRL, KC_LGUI, KC_LALT, SYSTEM, NUMBER, SFT_T(KC_ESC), KC_SPC, ARROWS, CURSOR, KC_RGUI, XXXXXXX, NORMAL ), /* ## Number @@ -153,62 +152,27 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { bool process_record_user(uint16_t keycode, keyrecord_t *record) { static bool shift_is_pressed = false; - static bool shift_was_pressed = false; - static bool gui_is_pressed = false; - static bool gui_was_used = false; - static uint16_t gui_timer; - - if(keycode != GUIEQTI && record->event.pressed && gui_is_pressed) { - gui_was_used = true; - register_code(KC_LGUI); - } switch (keycode) { - case KC_LSFT: + case SFT_T(KC_ESC): if(record->event.pressed){ shift_is_pressed = true; } else { shift_is_pressed = false; } return true; - case BACKESC: + case BACKTLD: if(record->event.pressed){ if(shift_is_pressed) { - unregister_code(KC_LSFT); - register_code(KC_ESC); - register_code(KC_LSFT); + register_code(KC_GRV); } else { register_code(KC_BSPC); } } else { - unregister_code(KC_ESC); + unregister_code(KC_GRV); unregister_code(KC_BSPC); } return false; - case GUIEQTI: - if(record->event.pressed){ - gui_is_pressed = true; - gui_timer = timer_read(); - if(shift_is_pressed) { - shift_was_pressed = true; - } - } else { - gui_is_pressed = false; - if(gui_was_used) { - gui_was_used = false; - unregister_code(KC_LGUI); - } else if (timer_elapsed(gui_timer) < TAPPING_TERM) { - if(shift_was_pressed){ - register_code(KC_LSFT); - tap_code(KC_GRV); - unregister_code(KC_LSFT); - } else { - tap_code(KC_EQL); - } - } - shift_was_pressed = false; - } - return false; } return true; } @@ -217,12 +181,16 @@ bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case CTL_T(KC_TAB): return true; - case CTL_T(KC_MINS): + case CTL_T(KC_EQL): return true; case ALT_T(KC_QUOT): return true; + case GUI_T(KC_MINS): + return true; case GUI_T(KC_ENT): return true; + case SFT_T(KC_ESC): + return true; default: return false; } diff --git a/keyboards/planck/keymaps/adamtabrams/readme.md b/keyboards/planck/keymaps/adamtabrams/readme.md index 3bd0daad72e7..d2e9431567a5 100644 --- a/keyboards/planck/keymaps/adamtabrams/readme.md +++ b/keyboards/planck/keymaps/adamtabrams/readme.md @@ -1,11 +1,11 @@ ## Normal -|------|------|------|------|------|------|------|------|------|------|------|------| -|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| -|C(Tab)| Q | W | E | R | T | Y | U | I | O | P |C(-_) | -|Bsp/Es| A | S | D | F | G | H | J | K | L | ;: |A('") | -|G(=/~)| Z | X | C | V | B | N | M | , | . | /? |G(Ent)| -| CTRL | GUI | ALT |System|Number| SHFT |Space |Arrows|Cursor| GUI | |Normal| +|--------|------|------|------|------|------|------|------|------|------|------|------| +|:------:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| C(Tab) | Q | W | E | R | T | Y | U | I | O | P |C(=+) | +|Backsp/~| A | S | D | F | G | H | J | K | L | ;: |A('") | +| G(-_) | Z | X | C | V | B | N | M | , | . | /? |G(Ent)| +| CTRL | GUI | ALT |System|Number|S(Esc)|Space |Arrows|Cursor| GUI | |Normal| ## Number @@ -13,7 +13,7 @@ |:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| | | ! | @ | # | $ | % | ^ | & | * | ( | ) | | | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \` | -| | _ | - | + | = | | | [ | ] | { | } | \ | | +| | ~ | [ | ] | = | + | - | | | { | } | \ | | | | | | | \\/ | | | | | | | | ## Arrows From 60e3e6b76298f8c2d9ec431a8aadf9e6a510bbed Mon Sep 17 00:00:00 2001 From: Adam Abrams Date: Wed, 24 Feb 2021 22:13:36 -0600 Subject: [PATCH 17/32] swap equal and hyphen for normal layer --- keyboards/planck/keymaps/adamtabrams/keymap.c | 16 ++++++++-------- keyboards/planck/keymaps/adamtabrams/readme.md | 12 ++++++------ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/keyboards/planck/keymaps/adamtabrams/keymap.c b/keyboards/planck/keymaps/adamtabrams/keymap.c index c9f9749cc3c5..6d77631b431c 100644 --- a/keyboards/planck/keymaps/adamtabrams/keymap.c +++ b/keyboards/planck/keymaps/adamtabrams/keymap.c @@ -44,17 +44,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* ## Normal -| C(Tab) | Q | W | E | R | T | Y | U | I | O | P |C(=+) | +| C(Tab) | Q | W | E | R | T | Y | U | I | O | P |C(-_) | |Backsp/~| A | S | D | F | G | H | J | K | L | ;: |A('") | -| G(-_) | Z | X | C | V | B | N | M | , | . | /? |G(Ent)| +| G(=+) | Z | X | C | V | B | N | M | , | . | /? |G(Ent)| | CTRL | GUI | ALT |System|Number|S(Esc)|Space |Arrows|Cursor| GUI | |Normal| */ [_NORMAL] = LAYOUT_planck_grid( - CTL_T(KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, CTL_T(KC_EQL), - BACKTLD, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, ALT_T(KC_QUOT), - GUI_T(KC_MINS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, GUI_T(KC_ENT), - KC_LCTRL, KC_LGUI, KC_LALT, SYSTEM, NUMBER, SFT_T(KC_ESC), KC_SPC, ARROWS, CURSOR, KC_RGUI, XXXXXXX, NORMAL + CTL_T(KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, CTL_T(KC_MINS), + BACKTLD, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, ALT_T(KC_QUOT), + GUI_T(KC_EQL), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, GUI_T(KC_ENT), + KC_LCTRL, KC_LGUI, KC_LALT, SYSTEM, NUMBER, SFT_T(KC_ESC), KC_SPC, ARROWS, CURSOR, KC_RGUI, XXXXXXX, NORMAL ), /* ## Number @@ -181,11 +181,11 @@ bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case CTL_T(KC_TAB): return true; - case CTL_T(KC_EQL): + case CTL_T(KC_MINS): return true; case ALT_T(KC_QUOT): return true; - case GUI_T(KC_MINS): + case GUI_T(KC_EQL): return true; case GUI_T(KC_ENT): return true; diff --git a/keyboards/planck/keymaps/adamtabrams/readme.md b/keyboards/planck/keymaps/adamtabrams/readme.md index d2e9431567a5..cefc6590eb68 100644 --- a/keyboards/planck/keymaps/adamtabrams/readme.md +++ b/keyboards/planck/keymaps/adamtabrams/readme.md @@ -1,11 +1,11 @@ ## Normal -|--------|------|------|------|------|------|------|------|------|------|------|------| -|:------:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| -| C(Tab) | Q | W | E | R | T | Y | U | I | O | P |C(=+) | -|Backsp/~| A | S | D | F | G | H | J | K | L | ;: |A('") | -| G(-_) | Z | X | C | V | B | N | M | , | . | /? |G(Ent)| -| CTRL | GUI | ALT |System|Number|S(Esc)|Space |Arrows|Cursor| GUI | |Normal| +|------|------|------|------|------|------|------|------|------|------|------|------| +|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +|C(Tab)| Q | W | E | R | T | Y | U | I | O | P |C(-_) | +|Bsp/~ | A | S | D | F | G | H | J | K | L | ;: |A('") | +|G(=+) | Z | X | C | V | B | N | M | , | . | /? |G(Ent)| +| CTRL | GUI | ALT |System|Number|S(Esc)|Space |Arrows|Cursor| GUI | |Normal| ## Number From 4297ef362e325618976d3fddc4bffaa5a2ef622c Mon Sep 17 00:00:00 2001 From: Adam Abrams Date: Thu, 25 Feb 2021 09:04:22 -0600 Subject: [PATCH 18/32] rearrange lower row symbols --- keyboards/planck/keymaps/adamtabrams/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/planck/keymaps/adamtabrams/keymap.c b/keyboards/planck/keymaps/adamtabrams/keymap.c index 6d77631b431c..943b249fa594 100644 --- a/keyboards/planck/keymaps/adamtabrams/keymap.c +++ b/keyboards/planck/keymaps/adamtabrams/keymap.c @@ -61,14 +61,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | | ! | @ | # | $ | % | ^ | & | * | ( | ) | | | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \` | -| | _ | - | + | = | | | [ | ] | { | } | \ | | +| | ~ | [ | ] | = | + | - | | | { | } | \ | | | | | | | \\/ | | | | | | | | */ [_NUMBER] = LAYOUT_planck_grid( _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, - _______, KC_UNDS, KC_MINS, KC_PLUS, KC_EQL, KC_PIPE, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_BSLS, _______, + _______, KC_TILD, KC_LBRC, KC_RBRC, KC_EQL, KC_PLUS, KC_MINS, KC_PIPE, KC_LCBR, KC_RCBR, KC_BSLS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), From f135dd594b29f4ee551cfff01f0155a96e6f867c Mon Sep 17 00:00:00 2001 From: Adam Abrams Date: Fri, 26 Feb 2021 10:51:20 -0600 Subject: [PATCH 19/32] change placement of symbols --- keyboards/planck/keymaps/adamtabrams/keymap.c | 99 ++++++++++++++----- .../planck/keymaps/adamtabrams/readme.md | 10 +- 2 files changed, 80 insertions(+), 29 deletions(-) diff --git a/keyboards/planck/keymaps/adamtabrams/keymap.c b/keyboards/planck/keymaps/adamtabrams/keymap.c index 943b249fa594..64d7824486d9 100644 --- a/keyboards/planck/keymaps/adamtabrams/keymap.c +++ b/keyboards/planck/keymaps/adamtabrams/keymap.c @@ -44,48 +44,48 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* ## Normal -| C(Tab) | Q | W | E | R | T | Y | U | I | O | P |C(-_) | -|Backsp/~| A | S | D | F | G | H | J | K | L | ;: |A('") | -| G(=+) | Z | X | C | V | B | N | M | , | . | /? |G(Ent)| -| CTRL | GUI | ALT |System|Number|S(Esc)|Space |Arrows|Cursor| GUI | |Normal| +|C(Tab)| Q | W | E | R | T | Y | U | I | O | P |C(-_) | +|Bsp/~ | A | S | D | F | G | H | J | K | L | ;: |A('") | +| G(!) | Z | X | C | V | B | N | M | , | . | /? |G(Ent)| +| CTRL | GUI | ALT |System|Number|S(Esc)|Space |Arrows|Cursor| GUI | |Normal| */ [_NORMAL] = LAYOUT_planck_grid( - CTL_T(KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, CTL_T(KC_MINS), - BACKTLD, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, ALT_T(KC_QUOT), - GUI_T(KC_EQL), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, GUI_T(KC_ENT), - KC_LCTRL, KC_LGUI, KC_LALT, SYSTEM, NUMBER, SFT_T(KC_ESC), KC_SPC, ARROWS, CURSOR, KC_RGUI, XXXXXXX, NORMAL + CTL_T(KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, CTL_T(KC_MINS), + BACKTLD, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, ALT_T(KC_QUOT), + GUI_T(KC_NO), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, GUI_T(KC_ENT), + KC_LCTRL, KC_LGUI, KC_LALT, SYSTEM, NUMBER, SFT_T(KC_ESC), KC_SPC, ARROWS, CURSOR, KC_RGUI, XXXXXXX, NORMAL ), /* ## Number -| | ! | @ | # | $ | % | ^ | & | * | ( | ) | | +| | @ | + | = | & | | | # | * | ^ | $ | % | | | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \` | -| | ~ | [ | ] | = | + | - | | | { | } | \ | | +| | ~ | [ | { | ( | | | ) | } | ] | \ | | | | | | | \\/ | | | | | | | | */ [_NUMBER] = LAYOUT_planck_grid( - _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, KC_AT, KC_PLUS, KC_EQL, KC_AMPR, KC_PIPE, KC_HASH, KC_ASTR, KC_CIRC, KC_DLR, KC_PERC, _______, _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, - _______, KC_TILD, KC_LBRC, KC_RBRC, KC_EQL, KC_PLUS, KC_MINS, KC_PIPE, KC_LCBR, KC_RCBR, KC_BSLS, _______, + _______, KC_TILD, KC_LBRC, KC_LCBR, KC_LPRN, XXXXXXX, XXXXXXX, KC_RPRN, KC_RCBR, KC_RBRC, KC_BSLS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), /* ## Arrows -| | |A(->) |A(->) | | | | P_Up | | | | | -| | | |P_Down| | | Left | Down | Up |Right | | | +| | |A(->) |A(->) | | | | P_Up |C(<-) |C(->) | | | +| |C(->) | |P_Down| | | Left | Down | Up |Right |C(<-) | | | | | | | |A(<-) | | | | | | | | | | | | | | | \\/ | | | | | */ [_ARROWS] = LAYOUT_planck_grid( - _______, XXXXXXX, A(KC_RGHT), A(KC_RGHT), XXXXXXX, XXXXXXX, XXXXXXX, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, _______, - _______, XXXXXXX, XXXXXXX, KC_PGDN, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, _______, - _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, A(KC_LEFT), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, XXXXXXX, A(KC_RGHT), A(KC_RGHT), XXXXXXX, XXXXXXX, XXXXXXX, KC_PGUP, C(KC_LEFT), C(KC_RGHT), XXXXXXX, _______, + _______, C(KC_RGHT), XXXXXXX, KC_PGDN, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, C(KC_LEFT), _______, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, A(KC_LEFT), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), /* ## Cursor @@ -152,18 +152,44 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { bool process_record_user(uint16_t keycode, keyrecord_t *record) { static bool shift_is_pressed = false; + static bool number_is_active = false; + static bool number_was_used = false; + static bool lgui_is_pressed = false; + static bool lgui_was_used = false; + + if (number_is_active && record->event.pressed) { + number_was_used = true; + } + if (lgui_is_pressed && record->event.pressed) { + lgui_was_used = true; + } switch (keycode) { + case GUI_T(KC_NO): + if (record->event.pressed) { + lgui_is_pressed = true; + } else { + if (!lgui_was_used) { + register_code(KC_LSFT); + tap_code(KC_1); + unregister_code(KC_LSFT); + } + lgui_is_pressed = false; + lgui_was_used = false; + } + return true; + case SFT_T(KC_ESC): - if(record->event.pressed){ + if (record->event.pressed) { shift_is_pressed = true; } else { shift_is_pressed = false; } return true; + case BACKTLD: - if(record->event.pressed){ - if(shift_is_pressed) { + if (record->event.pressed) { + if (shift_is_pressed && !number_is_active) { register_code(KC_GRV); } else { register_code(KC_BSPC); @@ -173,6 +199,31 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { unregister_code(KC_BSPC); } return false; + + case KC_SPC: + if (record->event.pressed) { + if (shift_is_pressed && !number_is_active) { + unregister_code(KC_LSFT); + layer_on(_NUMBER); + number_is_active = true; + } else { + register_code(KC_SPC); + } + } else { + if (number_is_active) { + layer_off(_NUMBER); + if (shift_is_pressed) { + register_code(KC_LSFT); + } + if (!number_was_used) { + register_code(KC_SPC); + } + number_is_active = false; + number_was_used = false; + } + unregister_code(KC_SPC); + } + return false; } return true; } @@ -183,9 +234,9 @@ bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) { return true; case CTL_T(KC_MINS): return true; - case ALT_T(KC_QUOT): - return true; - case GUI_T(KC_EQL): + /* case ALT_T(KC_QUOT): */ + /* return true; */ + case GUI_T(KC_NO): return true; case GUI_T(KC_ENT): return true; diff --git a/keyboards/planck/keymaps/adamtabrams/readme.md b/keyboards/planck/keymaps/adamtabrams/readme.md index cefc6590eb68..2021c528d380 100644 --- a/keyboards/planck/keymaps/adamtabrams/readme.md +++ b/keyboards/planck/keymaps/adamtabrams/readme.md @@ -4,24 +4,24 @@ |:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| |C(Tab)| Q | W | E | R | T | Y | U | I | O | P |C(-_) | |Bsp/~ | A | S | D | F | G | H | J | K | L | ;: |A('") | -|G(=+) | Z | X | C | V | B | N | M | , | . | /? |G(Ent)| +| G(!) | Z | X | C | V | B | N | M | , | . | /? |G(Ent)| | CTRL | GUI | ALT |System|Number|S(Esc)|Space |Arrows|Cursor| GUI | |Normal| ## Number |------|------|------|------|------|------|------|------|------|------|------|------| |:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| -| | ! | @ | # | $ | % | ^ | & | * | ( | ) | | +| | @ | + | = | & | | | # | * | ^ | $ | % | | | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \` | -| | ~ | [ | ] | = | + | - | | | { | } | \ | | +| | ~ | [ | { | ( | | | ) | } | ] | \ | | | | | | | \\/ | | | | | | | | ## Arrows |------|------|------|------|------|------|------|------|------|------|------|------| |:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| -| | |A(->) |A(->) | | | | P_Up | | | | | -| | | |P_Down| | | Left | Down | Up |Right | | | +| | |A(->) |A(->) | | | | P_Up |C(<-) |C(->) | | | +| |C(->) | |P_Down| | | Left | Down | Up |Right |C(<-) | | | | | | | |A(<-) | | | | | | | | | | | | | | | \\/ | | | | | From fba9296e429a3092b847e51b5b07efc97a5ec0a0 Mon Sep 17 00:00:00 2001 From: Adam Abrams Date: Fri, 26 Feb 2021 15:48:41 -0600 Subject: [PATCH 20/32] move CURSOR to left and add arrows keys to right --- keyboards/planck/keymaps/adamtabrams/keymap.c | 37 ++++++++++--------- .../planck/keymaps/adamtabrams/readme.md | 19 ++++++---- 2 files changed, 31 insertions(+), 25 deletions(-) diff --git a/keyboards/planck/keymaps/adamtabrams/keymap.c b/keyboards/planck/keymaps/adamtabrams/keymap.c index 64d7824486d9..ecda3df0d4c9 100644 --- a/keyboards/planck/keymaps/adamtabrams/keymap.c +++ b/keyboards/planck/keymaps/adamtabrams/keymap.c @@ -48,13 +48,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |Bsp/~ | A | S | D | F | G | H | J | K | L | ;: |A('") | | G(!) | Z | X | C | V | B | N | M | , | . | /? |G(Ent)| | CTRL | GUI | ALT |System|Number|S(Esc)|Space |Arrows|Cursor| GUI | |Normal| + +|C(Tab)| Q | W | E | R | T | Y | U | I | O | P |C(-_) | +|Bsp/~ | A | S | D | F | G | H | J | K | L | ;: |A('") | +| G(!) | Z | X | C | V | B | N | M | , | . | /? |G(Ent)| +| CTRL | GUI | ALT |System|Cursor|S(Esc)|Space |Arrows| Left | Down | Up |Right | */ [_NORMAL] = LAYOUT_planck_grid( CTL_T(KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, CTL_T(KC_MINS), BACKTLD, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, ALT_T(KC_QUOT), GUI_T(KC_NO), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, GUI_T(KC_ENT), - KC_LCTRL, KC_LGUI, KC_LALT, SYSTEM, NUMBER, SFT_T(KC_ESC), KC_SPC, ARROWS, CURSOR, KC_RGUI, XXXXXXX, NORMAL + KC_LCTRL, KC_LGUI, KC_LALT, SYSTEM, CURSOR, SFT_T(KC_ESC), KC_SPC, ARROWS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), /* ## Number @@ -62,14 +67,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | | @ | + | = | & | | | # | * | ^ | $ | % | | | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \` | | | ~ | [ | { | ( | | | ) | } | ] | \ | | -| | | | | \\/ | | | | | | | | +| | | | | \\/ | | | | | | |NORMAL| */ [_NUMBER] = LAYOUT_planck_grid( _______, KC_AT, KC_PLUS, KC_EQL, KC_AMPR, KC_PIPE, KC_HASH, KC_ASTR, KC_CIRC, KC_DLR, KC_PERC, _______, _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, _______, KC_TILD, KC_LBRC, KC_LCBR, KC_LPRN, XXXXXXX, XXXXXXX, KC_RPRN, KC_RCBR, KC_RBRC, KC_BSLS, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, NORMAL ), @@ -78,29 +83,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | | |A(->) |A(->) | | | | P_Up |C(<-) |C(->) | | | | |C(->) | |P_Down| | | Left | Down | Up |Right |C(<-) | | | | | | | |A(<-) | | | | | | | -| | | | | | | | \\/ | | | | | +| | | | | | | | \\/ | | | |NORMAL| */ [_ARROWS] = LAYOUT_planck_grid( _______, XXXXXXX, A(KC_RGHT), A(KC_RGHT), XXXXXXX, XXXXXXX, XXXXXXX, KC_PGUP, C(KC_LEFT), C(KC_RGHT), XXXXXXX, _______, _______, C(KC_RGHT), XXXXXXX, KC_PGDN, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, C(KC_LEFT), _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, A(KC_LEFT), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, NORMAL ), /* ## Cursor | | | |Wh_Dn |M_Btn2| | |Wh_Dn | | | | | -| |M_Acc2|M_Acc1|Wh_Up |M_Btn1| | M_L |M_Down| M_Up | M_R | | | +| |M_Acc2|M_Acc1|Wh_Up |M_Btn1| | M_L |M_Down| M_Up | M_R | |SHIFT | | | | | |M_Btn3| | | | | | | | -| | | | | | | | | \\/ | | | | +| | | | | | | | | \\/ | | |NORMAL| */ [_CURSOR] = LAYOUT_planck_grid( _______, XXXXXXX, XXXXXXX, KC_WH_D, KC_BTN2, XXXXXXX, XXXXXXX, KC_WH_D, XXXXXXX, XXXXXXX, XXXXXXX, _______, - _______, KC_ACL2, KC_ACL1, KC_WH_U, KC_BTN1, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, _______, + _______, KC_ACL2, KC_ACL1, KC_WH_U, KC_BTN1, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, KC_LSFT, _______, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN3, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, NORMAL ), /* ## System @@ -108,14 +113,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | Caps | |Pr_Scn| | Fwd | |Brght-| Vol- | Vol+ |Brght+| | | | | | | | | Rwd | | Mute |P_Trac|N_Trac| | Play | -| | | | \\/ | | | | |KBoard| | | | +| | | | \\/ | | | | |KBoard| | |NORMAL| */ [_SYSTEM] = LAYOUT_planck_grid( 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_CAPS, XXXXXXX, KC_PSCR, XXXXXXX, KC_MFFD, XXXXXXX, KC_BRID, KC_VOLD, KC_VOLU, KC_BRIU, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MRWD, XXXXXXX, KC_MUTE, KC_MPRV, KC_MNXT, XXXXXXX, KC_MPLY, - _______, _______, _______, _______, _______, _______, _______, _______, KBOARD, _______, _______, _______ + _______, _______, _______, _______, _______, _______, _______, _______, KBOARD, _______, _______, NORMAL ), /* ## KBoard @@ -123,14 +128,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | | | | | |RGB_Tg| |Brght+| | |Mode- | | | | | |Brght-| | | Hue- | Sat- | Sat+ | Hue+ | | | | | | | | | |Mode+ | | | | | | -| | | | \\/ | | | | | \\/ | |FMWare| | +| | | | \\/ | | | | | \\/ | |FMWare|NORMAL| */ [_KBOARD] = LAYOUT_planck_grid( XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, XXXXXXX, RGB_VAI, XXXXXXX, XXXXXXX, RGB_RMOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAD, XXXXXXX, XXXXXXX, RGB_HUD, RGB_SAD, RGB_SAI, RGB_HUI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, FMWARE, _______ + XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, FMWARE, NORMAL ), /* ## FMWare @@ -138,14 +143,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | | | |EEPROM|Reset | | | | | | | | | | | |Debug | | | | | | | | | |------| | | | | | | | | | | | -| | | | \\/ | | | | | \\/ | | \\/ | | +| | | | \\/ | | | | | \\/ | | \\/ |NORMAL| */ [_FMWARE] = LAYOUT_planck_grid( XXXXXXX, XXXXXXX, XXXXXXX, EEP_RST, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DEBUG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, _______, _______ + XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, _______, NORMAL ) }; @@ -234,8 +239,6 @@ bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) { return true; case CTL_T(KC_MINS): return true; - /* case ALT_T(KC_QUOT): */ - /* return true; */ case GUI_T(KC_NO): return true; case GUI_T(KC_ENT): diff --git a/keyboards/planck/keymaps/adamtabrams/readme.md b/keyboards/planck/keymaps/adamtabrams/readme.md index 2021c528d380..bcdd0e25923b 100644 --- a/keyboards/planck/keymaps/adamtabrams/readme.md +++ b/keyboards/planck/keymaps/adamtabrams/readme.md @@ -5,7 +5,10 @@ |C(Tab)| Q | W | E | R | T | Y | U | I | O | P |C(-_) | |Bsp/~ | A | S | D | F | G | H | J | K | L | ;: |A('") | | G(!) | Z | X | C | V | B | N | M | , | . | /? |G(Ent)| -| CTRL | GUI | ALT |System|Number|S(Esc)|Space |Arrows|Cursor| GUI | |Normal| +| CTRL | GUI | ALT |System|Cursor|S(Esc)|Space |Arrows| Left | Down | Up |Right | + +- Hold `Shift` + `Space` to activate the Number layer +- Hold down a layer key to temporarily activate or tap twice to toggle on or off ## Number @@ -14,7 +17,7 @@ | | @ | + | = | & | | | # | * | ^ | $ | % | | | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \` | | | ~ | [ | { | ( | | | ) | } | ] | \ | | -| | | | | \\/ | | | | | | | | +| | | | | \\/ | | | | | | |Normal| ## Arrows @@ -23,16 +26,16 @@ | | |A(->) |A(->) | | | | P_Up |C(<-) |C(->) | | | | |C(->) | |P_Down| | | Left | Down | Up |Right |C(<-) | | | | | | | |A(<-) | | | | | | | -| | | | | | | | \\/ | | | | | +| | | | | | | | \\/ | | | |Normal| ## Cursor |------|------|------|------|------|------|------|------|------|------|------|------| |:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| | | | |Wh_Dn |M_Btn2| | |Wh_Dn | | | | | -| |M_Acc2|M_Acc1|Wh_Up |M_Btn1| | M_L |M_Down| M_Up | M_R | | | +| |M_Acc2|M_Acc1|Wh_Up |M_Btn1| | M_L |M_Down| M_Up | M_R | |SHIFT | | | | | |M_Btn3| | | | | | | | -| | | | | | | | | \\/ | | | | +| | | | | | | | | \\/ | | |Normal| ## System @@ -41,7 +44,7 @@ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | Caps | |Pr_Scn| | Fwd | |Brght-| Vol- | Vol+ |Brght+| | | | | | | | | Rwd | | Mute |P_Trac|N_Trac| | Play | -| | | | \\/ | | | | |KBoard| | | | +| | | | \\/ | | | | |KBoard| | |Normal| ## KBoard @@ -50,7 +53,7 @@ | | | | | |RGB_Tg| |Brght+| | |Mode- | | | | | |Brght-| | | Hue- | Sat- | Sat+ | Hue+ | | | | | | | | | |Mode+ | | | | | | -| | | | \\/ | | | | | \\/ | |FMWare| | +| | | | \\/ | | | | | \\/ | |FMWare|Normal| ## FMWare @@ -59,4 +62,4 @@ | | | |EEPROM|Reset | | | | | | | | | | | |Debug | | | | | | | | | |------| | | | | | | | | | | | -| | | | \\/ | | | | | \\/ | | \\/ | | +| | | | \\/ | | | | | \\/ | | \\/ |Normal| From 6fc235f762ff24136a254b825cef03053c34df2e Mon Sep 17 00:00:00 2001 From: Adam Abrams Date: Fri, 26 Feb 2021 16:24:29 -0600 Subject: [PATCH 21/32] fix readme --- keyboards/planck/keymaps/adamtabrams/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/planck/keymaps/adamtabrams/readme.md b/keyboards/planck/keymaps/adamtabrams/readme.md index bcdd0e25923b..fffe92c20dd1 100644 --- a/keyboards/planck/keymaps/adamtabrams/readme.md +++ b/keyboards/planck/keymaps/adamtabrams/readme.md @@ -14,7 +14,7 @@ |------|------|------|------|------|------|------|------|------|------|------|------| |:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| -| | @ | + | = | & | | | # | * | ^ | $ | % | | +| | @ | + | = | & | \| | # | * | ^ | $ | % | | | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \` | | | ~ | [ | { | ( | | | ) | } | ] | \ | | | | | | | \\/ | | | | | | |Normal| From dab643fe02318f48e407a7455b00d14675055c41 Mon Sep 17 00:00:00 2001 From: Adam Abrams Date: Fri, 5 Mar 2021 13:23:02 -0600 Subject: [PATCH 22/32] fix accidental alt --- keyboards/planck/keymaps/adamtabrams/config.h | 2 ++ keyboards/planck/keymaps/adamtabrams/keymap.c | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/keyboards/planck/keymaps/adamtabrams/config.h b/keyboards/planck/keymaps/adamtabrams/config.h index 51422802f597..31b6e27541fa 100644 --- a/keyboards/planck/keymaps/adamtabrams/config.h +++ b/keyboards/planck/keymaps/adamtabrams/config.h @@ -17,5 +17,7 @@ // Tap-Hold Configs #define TAPPING_TERM 170 #define PERMISSIVE_HOLD +#define IGNORE_MOD_TAP_INTERRUPT +#define IGNORE_MOD_TAP_INTERRUPT_PER_KEY #define TAPPING_FORCE_HOLD #define TAPPING_FORCE_HOLD_PER_KEY diff --git a/keyboards/planck/keymaps/adamtabrams/keymap.c b/keyboards/planck/keymaps/adamtabrams/keymap.c index ecda3df0d4c9..2af5f67f4afd 100644 --- a/keyboards/planck/keymaps/adamtabrams/keymap.c +++ b/keyboards/planck/keymaps/adamtabrams/keymap.c @@ -249,3 +249,12 @@ bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) { return false; } } + +bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case ALT_T(KC_QUOT): + return true; + default: + return false; + } +} From 68230d3d6e3d8de23ba8e4514fab3e6e537486ff Mon Sep 17 00:00:00 2001 From: Adam Abrams Date: Fri, 5 Mar 2021 16:20:33 -0600 Subject: [PATCH 23/32] add timer to number layer --- keyboards/planck/keymaps/adamtabrams/keymap.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/keyboards/planck/keymaps/adamtabrams/keymap.c b/keyboards/planck/keymaps/adamtabrams/keymap.c index 2af5f67f4afd..bc96c776c2f2 100644 --- a/keyboards/planck/keymaps/adamtabrams/keymap.c +++ b/keyboards/planck/keymaps/adamtabrams/keymap.c @@ -161,6 +161,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { static bool number_was_used = false; static bool lgui_is_pressed = false; static bool lgui_was_used = false; + static uint16_t number_timer; if (number_is_active && record->event.pressed) { number_was_used = true; @@ -210,6 +211,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (shift_is_pressed && !number_is_active) { unregister_code(KC_LSFT); layer_on(_NUMBER); + number_timer = timer_read(); number_is_active = true; } else { register_code(KC_SPC); @@ -220,7 +222,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (shift_is_pressed) { register_code(KC_LSFT); } - if (!number_was_used) { + if (!number_was_used && timer_elapsed(number_timer) < TAPPING_TERM ) { register_code(KC_SPC); } number_is_active = false; From 8789466061b503f0b885ae0c464ffa031e820960 Mon Sep 17 00:00:00 2001 From: Adam Abrams Date: Tue, 9 Mar 2021 09:13:30 -0600 Subject: [PATCH 24/32] add colemak layer --- keyboards/planck/keymaps/adamtabrams/keymap.c | 26 ++++++++++++++----- .../planck/keymaps/adamtabrams/readme.md | 16 ++++++++++-- 2 files changed, 33 insertions(+), 9 deletions(-) diff --git a/keyboards/planck/keymaps/adamtabrams/keymap.c b/keyboards/planck/keymaps/adamtabrams/keymap.c index bc96c776c2f2..44569e55454a 100644 --- a/keyboards/planck/keymaps/adamtabrams/keymap.c +++ b/keyboards/planck/keymaps/adamtabrams/keymap.c @@ -20,6 +20,7 @@ enum planck_layers { _NORMAL, + _COLEMAK, _NUMBER, _ARROWS, _CURSOR, @@ -33,6 +34,7 @@ enum planck_keycodes { }; #define NORMAL TO(_NORMAL) +#define COLEMAK TO(_COLEMAK) #define NUMBER TT(_NUMBER) #define ARROWS TT(_ARROWS) #define CURSOR TT(_CURSOR) @@ -47,19 +49,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |C(Tab)| Q | W | E | R | T | Y | U | I | O | P |C(-_) | |Bsp/~ | A | S | D | F | G | H | J | K | L | ;: |A('") | | G(!) | Z | X | C | V | B | N | M | , | . | /? |G(Ent)| -| CTRL | GUI | ALT |System|Number|S(Esc)|Space |Arrows|Cursor| GUI | |Normal| - -|C(Tab)| Q | W | E | R | T | Y | U | I | O | P |C(-_) | -|Bsp/~ | A | S | D | F | G | H | J | K | L | ;: |A('") | -| G(!) | Z | X | C | V | B | N | M | , | . | /? |G(Ent)| -| CTRL | GUI | ALT |System|Cursor|S(Esc)|Space |Arrows| Left | Down | Up |Right | +|COLMAK| GUI | ALT |System|Cursor|S(Esc)|Space |Arrows| Left | Down | Up |Right | */ [_NORMAL] = LAYOUT_planck_grid( CTL_T(KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, CTL_T(KC_MINS), BACKTLD, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, ALT_T(KC_QUOT), GUI_T(KC_NO), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, GUI_T(KC_ENT), - KC_LCTRL, KC_LGUI, KC_LALT, SYSTEM, CURSOR, SFT_T(KC_ESC), KC_SPC, ARROWS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + COLEMAK, KC_LGUI, KC_LALT, SYSTEM, CURSOR, SFT_T(KC_ESC), KC_SPC, ARROWS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* ## Colemak + +|C(Tab)| Q | W | F | P | B | J | L | U | Y | ;: |C(-_) | +|Bsp/~ | A | R | S | T | G | M | N | E | I | O |A('") | +| G(!) | Z | X | C | D | V | K | H | , | . | /? |G(Ent)| +|NORMAL| GUI | ALT |System|Cursor|S(Esc)|Space |Arrows| Left | Down | Up |Right | + */ + +[_COLEMAK] = LAYOUT_planck_grid( + CTL_T(KC_TAB), KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, CTL_T(KC_MINS), + BACKTLD, KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, ALT_T(KC_QUOT), + GUI_T(KC_NO), KC_Z, KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, GUI_T(KC_ENT), + NORMAL, KC_LGUI, KC_LALT, SYSTEM, CURSOR, SFT_T(KC_ESC), KC_SPC, ARROWS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), /* ## Number diff --git a/keyboards/planck/keymaps/adamtabrams/readme.md b/keyboards/planck/keymaps/adamtabrams/readme.md index fffe92c20dd1..16ef68adf4a8 100644 --- a/keyboards/planck/keymaps/adamtabrams/readme.md +++ b/keyboards/planck/keymaps/adamtabrams/readme.md @@ -1,11 +1,23 @@ -## Normal +## Normal - QWERTY |------|------|------|------|------|------|------|------|------|------|------|------| |:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| |C(Tab)| Q | W | E | R | T | Y | U | I | O | P |C(-_) | |Bsp/~ | A | S | D | F | G | H | J | K | L | ;: |A('") | | G(!) | Z | X | C | V | B | N | M | , | . | /? |G(Ent)| -| CTRL | GUI | ALT |System|Cursor|S(Esc)|Space |Arrows| Left | Down | Up |Right | +|COLMAK| GUI | ALT |System|Cursor|S(Esc)|Space |Arrows| Left | Down | Up |Right | + +- Hold `Shift` + `Space` to activate the Number layer +- Hold down a layer key to temporarily activate or tap twice to toggle on or off + +## Normal - COLEMAK + +|------|------|------|------|------|------|------|------|------|------|------|------| +|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +|C(Tab)| Q | W | F | P | B | J | L | U | Y | ;: |C(-_) | +|Bsp/~ | A | R | S | T | G | M | N | E | I | O |A('") | +| G(!) | Z | X | C | D | V | K | H | , | . | /? |G(Ent)| +|QWERTY| GUI | ALT |System|Cursor|S(Esc)|Space |Arrows| Left | Down | Up |Right | - Hold `Shift` + `Space` to activate the Number layer - Hold down a layer key to temporarily activate or tap twice to toggle on or off From 654b8a58a31fca92cd7ca5592dc297e0f3dc546e Mon Sep 17 00:00:00 2001 From: Adam Abrams Date: Sat, 13 Mar 2021 13:37:52 -0600 Subject: [PATCH 25/32] add macros, improve custom keys, and hold space for number layer --- keyboards/planck/keymaps/adamtabrams/keymap.c | 126 +++++++----------- .../planck/keymaps/adamtabrams/readme.md | 8 +- 2 files changed, 53 insertions(+), 81 deletions(-) diff --git a/keyboards/planck/keymaps/adamtabrams/keymap.c b/keyboards/planck/keymaps/adamtabrams/keymap.c index 44569e55454a..dc5290bd862c 100644 --- a/keyboards/planck/keymaps/adamtabrams/keymap.c +++ b/keyboards/planck/keymaps/adamtabrams/keymap.c @@ -20,7 +20,7 @@ enum planck_layers { _NORMAL, - _COLEMAK, + _COLEMK, _NUMBER, _ARROWS, _CURSOR, @@ -34,14 +34,27 @@ enum planck_keycodes { }; #define NORMAL TO(_NORMAL) -#define COLEMAK TO(_COLEMAK) -#define NUMBER TT(_NUMBER) +#define COLEMK TO(_COLEMK) #define ARROWS TT(_ARROWS) #define CURSOR TT(_CURSOR) #define SYSTEM TT(_SYSTEM) #define KBOARD MO(_KBOARD) #define FMWARE MO(_FMWARE) +#define NUMSPAC LT(_NUMBER, KC_SPC) +#define SHFTESC LSFT_T(KC_ESC) + +#define GUIEXLM GUI_T(KC_EXLM) +#define CTRLTAB CTL_T(KC_TAB) +#define CTRLMIN CTL_T(KC_MINS) +#define ALTQUOT ALT_T(KC_QUOT) +#define GUIENTR GUI_T(KC_ENT) + +#define ALTRGHT A(KC_RGHT) +#define ALTLEFT A(KC_LEFT) +#define CTLRGHT C(KC_RGHT) +#define CTLLEFT C(KC_LEFT) + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* ## Normal @@ -49,14 +62,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |C(Tab)| Q | W | E | R | T | Y | U | I | O | P |C(-_) | |Bsp/~ | A | S | D | F | G | H | J | K | L | ;: |A('") | | G(!) | Z | X | C | V | B | N | M | , | . | /? |G(Ent)| -|COLMAK| GUI | ALT |System|Cursor|S(Esc)|Space |Arrows| Left | Down | Up |Right | +|COLMAK| | |System|Cursor|S(Esc)|N(Spc)|Arrows| | | | | */ [_NORMAL] = LAYOUT_planck_grid( - CTL_T(KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, CTL_T(KC_MINS), - BACKTLD, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, ALT_T(KC_QUOT), - GUI_T(KC_NO), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, GUI_T(KC_ENT), - COLEMAK, KC_LGUI, KC_LALT, SYSTEM, CURSOR, SFT_T(KC_ESC), KC_SPC, ARROWS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + CTRLTAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, CTRLMIN, + BACKTLD, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, ALTQUOT, + GUIEXLM, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, GUIENTR, + COLEMK, _______, _______, SYSTEM, CURSOR, SHFTESC, NUMSPAC, ARROWS, _______, _______, _______, _______ ), /* ## Colemak @@ -64,14 +77,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |C(Tab)| Q | W | F | P | B | J | L | U | Y | ;: |C(-_) | |Bsp/~ | A | R | S | T | G | M | N | E | I | O |A('") | | G(!) | Z | X | C | D | V | K | H | , | . | /? |G(Ent)| -|NORMAL| GUI | ALT |System|Cursor|S(Esc)|Space |Arrows| Left | Down | Up |Right | +|QWERTY| | |System|Cursor|S(Esc)|N(Spc)|Arrows| | | | | */ -[_COLEMAK] = LAYOUT_planck_grid( - CTL_T(KC_TAB), KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, CTL_T(KC_MINS), - BACKTLD, KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, ALT_T(KC_QUOT), - GUI_T(KC_NO), KC_Z, KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, GUI_T(KC_ENT), - NORMAL, KC_LGUI, KC_LALT, SYSTEM, CURSOR, SFT_T(KC_ESC), KC_SPC, ARROWS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +[_COLEMK] = LAYOUT_planck_grid( + CTRLTAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, CTRLMIN, + BACKTLD, KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, ALTQUOT, + GUIEXLM, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, GUIENTR, + NORMAL, _______, _______, SYSTEM, CURSOR, SHFTESC, NUMSPAC, ARROWS, _______, _______, _______, _______ ), /* ## Number @@ -99,10 +112,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_ARROWS] = LAYOUT_planck_grid( - _______, XXXXXXX, A(KC_RGHT), A(KC_RGHT), XXXXXXX, XXXXXXX, XXXXXXX, KC_PGUP, C(KC_LEFT), C(KC_RGHT), XXXXXXX, _______, - _______, C(KC_RGHT), XXXXXXX, KC_PGDN, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, C(KC_LEFT), _______, - _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, A(KC_LEFT), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, NORMAL + _______, XXXXXXX, ALTRGHT, ALTRGHT, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGUP, CTLLEFT, CTLRGHT, XXXXXXX, _______, + _______, CTLRGHT, XXXXXXX, KC_PGDN, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, CTLLEFT, _______, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, ALTLEFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, NORMAL ), /* ## Cursor @@ -169,45 +182,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { bool process_record_user(uint16_t keycode, keyrecord_t *record) { static bool shift_is_pressed = false; - static bool number_is_active = false; - static bool number_was_used = false; - static bool lgui_is_pressed = false; - static bool lgui_was_used = false; - static uint16_t number_timer; - - if (number_is_active && record->event.pressed) { - number_was_used = true; - } - if (lgui_is_pressed && record->event.pressed) { - lgui_was_used = true; - } switch (keycode) { - case GUI_T(KC_NO): + case SHFTESC: if (record->event.pressed) { - lgui_is_pressed = true; + shift_is_pressed = true; } else { - if (!lgui_was_used) { - register_code(KC_LSFT); - tap_code(KC_1); - unregister_code(KC_LSFT); - } - lgui_is_pressed = false; - lgui_was_used = false; + shift_is_pressed = false; } return true; - case SFT_T(KC_ESC): - if (record->event.pressed) { - shift_is_pressed = true; - } else { - shift_is_pressed = false; + case GUIEXLM: + if (record->tap.count > 0) { + if (record->event.pressed) { + tap_code16(KC_EXLM); + } + return false; } return true; case BACKTLD: if (record->event.pressed) { - if (shift_is_pressed && !number_is_active) { + if (shift_is_pressed) { register_code(KC_GRV); } else { register_code(KC_BSPC); @@ -217,47 +213,23 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { unregister_code(KC_BSPC); } return false; - - case KC_SPC: - if (record->event.pressed) { - if (shift_is_pressed && !number_is_active) { - unregister_code(KC_LSFT); - layer_on(_NUMBER); - number_timer = timer_read(); - number_is_active = true; - } else { - register_code(KC_SPC); - } - } else { - if (number_is_active) { - layer_off(_NUMBER); - if (shift_is_pressed) { - register_code(KC_LSFT); - } - if (!number_was_used && timer_elapsed(number_timer) < TAPPING_TERM ) { - register_code(KC_SPC); - } - number_is_active = false; - number_was_used = false; - } - unregister_code(KC_SPC); - } - return false; } return true; } bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case CTL_T(KC_TAB): + case CTRLTAB: + return true; + case CTRLMIN: return true; - case CTL_T(KC_MINS): + case GUIENTR: return true; - case GUI_T(KC_NO): + case GUIEXLM: return true; - case GUI_T(KC_ENT): + case SHFTESC: return true; - case SFT_T(KC_ESC): + case NUMSPAC: return true; default: return false; @@ -266,7 +238,7 @@ bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) { bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case ALT_T(KC_QUOT): + case ALTQUOT: return true; default: return false; diff --git a/keyboards/planck/keymaps/adamtabrams/readme.md b/keyboards/planck/keymaps/adamtabrams/readme.md index 16ef68adf4a8..5db3699ddff4 100644 --- a/keyboards/planck/keymaps/adamtabrams/readme.md +++ b/keyboards/planck/keymaps/adamtabrams/readme.md @@ -5,9 +5,9 @@ |C(Tab)| Q | W | E | R | T | Y | U | I | O | P |C(-_) | |Bsp/~ | A | S | D | F | G | H | J | K | L | ;: |A('") | | G(!) | Z | X | C | V | B | N | M | , | . | /? |G(Ent)| -|COLMAK| GUI | ALT |System|Cursor|S(Esc)|Space |Arrows| Left | Down | Up |Right | +|COLMAK| | |System|Cursor|S(Esc)|N(Spc)|Arrows| | | | | -- Hold `Shift` + `Space` to activate the Number layer +- The `N` in `N(Spc)` stands for Number layer - Hold down a layer key to temporarily activate or tap twice to toggle on or off ## Normal - COLEMAK @@ -17,9 +17,9 @@ |C(Tab)| Q | W | F | P | B | J | L | U | Y | ;: |C(-_) | |Bsp/~ | A | R | S | T | G | M | N | E | I | O |A('") | | G(!) | Z | X | C | D | V | K | H | , | . | /? |G(Ent)| -|QWERTY| GUI | ALT |System|Cursor|S(Esc)|Space |Arrows| Left | Down | Up |Right | +|QWERTY| | |System|Cursor|S(Esc)|N(Spc)|Arrows| | | | | -- Hold `Shift` + `Space` to activate the Number layer +- The `N` in `N(Spc)` stands for Number layer - Hold down a layer key to temporarily activate or tap twice to toggle on or off ## Number From f8b3747ade382a6ba31d2763d3b9aae5af5cd7ec Mon Sep 17 00:00:00 2001 From: Adam Abrams Date: Sat, 13 Mar 2021 23:36:38 -0600 Subject: [PATCH 26/32] add homerow mods --- keyboards/planck/keymaps/adamtabrams/keymap.c | 111 +++++++++++++++--- .../planck/keymaps/adamtabrams/readme.md | 14 +-- 2 files changed, 99 insertions(+), 26 deletions(-) diff --git a/keyboards/planck/keymaps/adamtabrams/keymap.c b/keyboards/planck/keymaps/adamtabrams/keymap.c index dc5290bd862c..8f2c29f8116a 100644 --- a/keyboards/planck/keymaps/adamtabrams/keymap.c +++ b/keyboards/planck/keymaps/adamtabrams/keymap.c @@ -44,46 +44,61 @@ enum planck_keycodes { #define NUMSPAC LT(_NUMBER, KC_SPC) #define SHFTESC LSFT_T(KC_ESC) -#define GUIEXLM GUI_T(KC_EXLM) #define CTRLTAB CTL_T(KC_TAB) #define CTRLMIN CTL_T(KC_MINS) -#define ALTQUOT ALT_T(KC_QUOT) -#define GUIENTR GUI_T(KC_ENT) +#define SFTEXLM SFT_T(KC_EXLM) +#define SFTENTR SFT_T(KC_ENT) #define ALTRGHT A(KC_RGHT) #define ALTLEFT A(KC_LEFT) #define CTLRGHT C(KC_RGHT) #define CTLLEFT C(KC_LEFT) +#define ALT__A ALT_T(KC_A) +#define ALTSCLN ALT_T(KC_SCLN) +#define ALT__O ALT_T(KC_O) +#define GUI__S GUI_T(KC_S) +#define GUI__L GUI_T(KC_L) +#define GUI__R GUI_T(KC_R) +#define GUI__I GUI_T(KC_I) +#define SFT__D SFT_T(KC_D) +#define SFT__K SFT_T(KC_K) +#define SFT__S SFT_T(KC_S) +#define SFT__E SFT_T(KC_E) +#define CTL__F CTL_T(KC_F) +#define CTL__J CTL_T(KC_J) +#define CTL__T CTL_T(KC_T) +#define CTL__N CTL_T(KC_N) + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* ## Normal -|C(Tab)| Q | W | E | R | T | Y | U | I | O | P |C(-_) | -|Bsp/~ | A | S | D | F | G | H | J | K | L | ;: |A('") | -| G(!) | Z | X | C | V | B | N | M | , | . | /? |G(Ent)| +|C(Tab)| Q | W | E | R | T | Y | U | I | O | P | C(-) | +| Bsp/~| A(A) | G(S) | S(D) | C(F) | G | H | C(J) | S(K) | G(L) | A(;) | '" | +| S(!) | Z | X | C | V | B | N | M | , | . | / |S(Ent)| |COLMAK| | |System|Cursor|S(Esc)|N(Spc)|Arrows| | | | | */ [_NORMAL] = LAYOUT_planck_grid( CTRLTAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, CTRLMIN, - BACKTLD, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, ALTQUOT, - GUIEXLM, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, GUIENTR, + BACKTLD, ALT__A, GUI__S, SFT__D, CTL__F, KC_G, KC_H, CTL__J, SFT__K, GUI__L, ALTSCLN, KC_QUOT, + SFTEXLM, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFTENTR, COLEMK, _______, _______, SYSTEM, CURSOR, SHFTESC, NUMSPAC, ARROWS, _______, _______, _______, _______ ), /* ## Colemak -|C(Tab)| Q | W | F | P | B | J | L | U | Y | ;: |C(-_) | -|Bsp/~ | A | R | S | T | G | M | N | E | I | O |A('") | -| G(!) | Z | X | C | D | V | K | H | , | . | /? |G(Ent)| +|C(Tab)| Q | W | F | P | B | J | L | U | Y | ; | C(-) | +| Bsp/~| A(A) | G(R) | S(S) | C(T) | G | M | C(N) | S(E) | G(I) | A(O) | '" | +| S(!) | Z | X | C | D | V | K | H | , | . | / |S(Ent)| |QWERTY| | |System|Cursor|S(Esc)|N(Spc)|Arrows| | | | | */ [_COLEMK] = LAYOUT_planck_grid( CTRLTAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, CTRLMIN, - BACKTLD, KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, ALTQUOT, - GUIEXLM, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, GUIENTR, + BACKTLD, ALT__A, GUI__R, SFT__S, CTL__T, KC_G, KC_M, CTL__N, SFT__E, GUI__I, ALT__O, KC_QUOT, + SFTEXLM, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, SFTENTR, NORMAL, _______, _______, SYSTEM, CURSOR, SHFTESC, NUMSPAC, ARROWS, _______, _______, _______, _______ ), @@ -91,14 +106,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | | @ | + | = | & | | | # | * | ^ | $ | % | | | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \` | -| | ~ | [ | { | ( | | | ) | } | ] | \ | | +| | ~ | [ | { | ( | ! | = | ) | } | ] | \ | | | | | | | \\/ | | | | | | |NORMAL| */ [_NUMBER] = LAYOUT_planck_grid( _______, KC_AT, KC_PLUS, KC_EQL, KC_AMPR, KC_PIPE, KC_HASH, KC_ASTR, KC_CIRC, KC_DLR, KC_PERC, _______, _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, - _______, KC_TILD, KC_LBRC, KC_LCBR, KC_LPRN, XXXXXXX, XXXXXXX, KC_RPRN, KC_RCBR, KC_RBRC, KC_BSLS, _______, + _______, KC_TILD, KC_LBRC, KC_LCBR, KC_LPRN, KC_EXLM, KC_EQL, KC_RPRN, KC_RCBR, KC_RBRC, KC_BSLS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, NORMAL ), @@ -192,7 +207,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; - case GUIEXLM: + case SFTEXLM: if (record->tap.count > 0) { if (record->event.pressed) { tap_code16(KC_EXLM); @@ -223,14 +238,44 @@ bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) { return true; case CTRLMIN: return true; - case GUIENTR: + case SFTENTR: return true; - case GUIEXLM: + case SFTEXLM: return true; case SHFTESC: return true; case NUMSPAC: return true; + case ALT__A: + return true; + case ALTSCLN: + return true; + case ALT__O: + return true; + case GUI__S: + return true; + case GUI__L: + return true; + case GUI__R: + return true; + case GUI__I: + return true; + case SFT__D: + return true; + case SFT__K: + return true; + case SFT__S: + return true; + case SFT__E: + return true; + case CTL__F: + return true; + case CTL__J: + return true; + case CTL__T: + return true; + case CTL__N: + return true; default: return false; } @@ -238,7 +283,35 @@ bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) { bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case ALTQUOT: + case ALT__A: + return true; + case ALTSCLN: + return true; + case ALT__O: + return true; + case GUI__S: + return true; + case GUI__L: + return true; + case GUI__R: + return true; + case GUI__I: + return true; + case SFT__D: + return true; + case SFT__K: + return true; + case SFT__S: + return true; + case SFT__E: + return true; + case CTL__F: + return true; + case CTL__J: + return true; + case CTL__T: + return true; + case CTL__N: return true; default: return false; diff --git a/keyboards/planck/keymaps/adamtabrams/readme.md b/keyboards/planck/keymaps/adamtabrams/readme.md index 5db3699ddff4..2f1a4ab96418 100644 --- a/keyboards/planck/keymaps/adamtabrams/readme.md +++ b/keyboards/planck/keymaps/adamtabrams/readme.md @@ -2,9 +2,9 @@ |------|------|------|------|------|------|------|------|------|------|------|------| |:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| -|C(Tab)| Q | W | E | R | T | Y | U | I | O | P |C(-_) | -|Bsp/~ | A | S | D | F | G | H | J | K | L | ;: |A('") | -| G(!) | Z | X | C | V | B | N | M | , | . | /? |G(Ent)| +|C(Tab)| Q | W | E | R | T | Y | U | I | O | P | C(-) | +| Bsp/~| A(A) | G(S) | S(D) | C(F) | G | H | C(J) | S(K) | G(L) | A(;) | '" | +| S(!) | Z | X | C | V | B | N | M | , | . | / |S(Ent)| |COLMAK| | |System|Cursor|S(Esc)|N(Spc)|Arrows| | | | | - The `N` in `N(Spc)` stands for Number layer @@ -14,9 +14,9 @@ |------|------|------|------|------|------|------|------|------|------|------|------| |:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| -|C(Tab)| Q | W | F | P | B | J | L | U | Y | ;: |C(-_) | -|Bsp/~ | A | R | S | T | G | M | N | E | I | O |A('") | -| G(!) | Z | X | C | D | V | K | H | , | . | /? |G(Ent)| +|C(Tab)| Q | W | F | P | B | J | L | U | Y | ; | C(-) | +| Bsp/~| A(A) | G(R) | S(S) | C(T) | G | M | C(N) | S(E) | G(I) | A(O) | '" | +| S(!) | Z | X | C | D | V | K | H | , | . | / |S(Ent)| |QWERTY| | |System|Cursor|S(Esc)|N(Spc)|Arrows| | | | | - The `N` in `N(Spc)` stands for Number layer @@ -28,7 +28,7 @@ |:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| | | @ | + | = | & | \| | # | * | ^ | $ | % | | | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \` | -| | ~ | [ | { | ( | | | ) | } | ] | \ | | +| | ~ | [ | { | ( | ! | = | ) | } | ] | \ | | | | | | | \\/ | | | | | | |Normal| ## Arrows From fdd8eeef79a400da296649a79d77be5606cb4f95 Mon Sep 17 00:00:00 2001 From: Adam Abrams Date: Mon, 15 Mar 2021 11:44:44 -0500 Subject: [PATCH 27/32] improve layout for each layer --- keyboards/planck/keymaps/adamtabrams/keymap.c | 149 ++++++++++-------- .../planck/keymaps/adamtabrams/readme.md | 44 +++--- 2 files changed, 102 insertions(+), 91 deletions(-) diff --git a/keyboards/planck/keymaps/adamtabrams/keymap.c b/keyboards/planck/keymaps/adamtabrams/keymap.c index 8f2c29f8116a..849dff323928 100644 --- a/keyboards/planck/keymaps/adamtabrams/keymap.c +++ b/keyboards/planck/keymaps/adamtabrams/keymap.c @@ -19,8 +19,8 @@ enum planck_layers { - _NORMAL, - _COLEMK, + _QWERTY, + _COLEMAK, _NUMBER, _ARROWS, _CURSOR, @@ -30,11 +30,13 @@ enum planck_layers { }; enum planck_keycodes { - BACKTLD = SAFE_RANGE + BACKTLD = SAFE_RANGE, + EXCLAIM, + QWERTY, + COLEMAK, + NORMAL }; -#define NORMAL TO(_NORMAL) -#define COLEMK TO(_COLEMK) #define ARROWS TT(_ARROWS) #define CURSOR TT(_CURSOR) #define SYSTEM TT(_SYSTEM) @@ -44,16 +46,9 @@ enum planck_keycodes { #define NUMSPAC LT(_NUMBER, KC_SPC) #define SHFTESC LSFT_T(KC_ESC) -#define CTRLTAB CTL_T(KC_TAB) -#define CTRLMIN CTL_T(KC_MINS) -#define SFTEXLM SFT_T(KC_EXLM) +#define SFTEXLM SFT_T(EXCLAIM) #define SFTENTR SFT_T(KC_ENT) -#define ALTRGHT A(KC_RGHT) -#define ALTLEFT A(KC_LEFT) -#define CTLRGHT C(KC_RGHT) -#define CTLLEFT C(KC_LEFT) - #define ALT__A ALT_T(KC_A) #define ALTSCLN ALT_T(KC_SCLN) #define ALT__O ALT_T(KC_O) @@ -70,44 +65,49 @@ enum planck_keycodes { #define CTL__T CTL_T(KC_T) #define CTL__N CTL_T(KC_N) +#define ALTRGHT A(KC_RGHT) +#define ALTLEFT A(KC_LEFT) +#define CTLRGHT C(KC_RGHT) +#define CTLLEFT C(KC_LEFT) + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* ## Normal +/* ## Qwerty -|C(Tab)| Q | W | E | R | T | Y | U | I | O | P | C(-) | +| Tab | Q | W | E | R | T | Y | U | I | O | P | -_ | | Bsp/~| A(A) | G(S) | S(D) | C(F) | G | H | C(J) | S(K) | G(L) | A(;) | '" | | S(!) | Z | X | C | V | B | N | M | , | . | / |S(Ent)| -|COLMAK| | |System|Cursor|S(Esc)|N(Spc)|Arrows| | | | | +| CTRL | GUI | ALT |System|Cursor|S(Esc)|N(Spc)|Arrows| Left | Down | Up | Right| */ -[_NORMAL] = LAYOUT_planck_grid( - CTRLTAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, CTRLMIN, +[_QWERTY] = LAYOUT_planck_grid( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, BACKTLD, ALT__A, GUI__S, SFT__D, CTL__F, KC_G, KC_H, CTL__J, SFT__K, GUI__L, ALTSCLN, KC_QUOT, SFTEXLM, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFTENTR, - COLEMK, _______, _______, SYSTEM, CURSOR, SHFTESC, NUMSPAC, ARROWS, _______, _______, _______, _______ + KC_LCTL, KC_LGUI, KC_LALT, SYSTEM, CURSOR, SHFTESC, NUMSPAC, ARROWS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), /* ## Colemak -|C(Tab)| Q | W | F | P | B | J | L | U | Y | ; | C(-) | +| Tab | Q | W | F | P | B | J | L | U | Y | ; | -_ | | Bsp/~| A(A) | G(R) | S(S) | C(T) | G | M | C(N) | S(E) | G(I) | A(O) | '" | | S(!) | Z | X | C | D | V | K | H | , | . | / |S(Ent)| -|QWERTY| | |System|Cursor|S(Esc)|N(Spc)|Arrows| | | | | +| CTRL | GUI | ALT |System|Cursor|S(Esc)|N(Spc)|Arrows| Left | Down | Up | Right| */ -[_COLEMK] = LAYOUT_planck_grid( - CTRLTAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, CTRLMIN, +[_COLEMAK] = LAYOUT_planck_grid( + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_MINS, BACKTLD, ALT__A, GUI__R, SFT__S, CTL__T, KC_G, KC_M, CTL__N, SFT__E, GUI__I, ALT__O, KC_QUOT, SFTEXLM, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, SFTENTR, - NORMAL, _______, _______, SYSTEM, CURSOR, SHFTESC, NUMSPAC, ARROWS, _______, _______, _______, _______ + KC_LCTL, KC_LGUI, KC_LALT, SYSTEM, CURSOR, SHFTESC, NUMSPAC, ARROWS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), /* ## Number -| | @ | + | = | & | | | # | * | ^ | $ | % | | +| | @ | + | = | & | \| | # | * | ^ | $ | % | | | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \` | | | ~ | [ | { | ( | ! | = | ) | } | ] | \ | | -| | | | | \\/ | | | | | | |NORMAL| +| | | | | | | \\/ | | | | |Normal| */ [_NUMBER] = LAYOUT_planck_grid( @@ -120,77 +120,77 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* ## Arrows -| | |A(->) |A(->) | | | | P_Up |C(<-) |C(->) | | | +| | |A(->) | | |A(<-) | | P_Up | P_Up |C(->) | | | | |C(->) | |P_Down| | | Left | Down | Up |Right |C(<-) | | -| | | | | |A(<-) | | | | | | | -| | | | | | | | \\/ | | | |NORMAL| +| | | | |P_Down|A(<-) | | | | | | | +| | | | | | | | \\/ | | | |Normal| */ [_ARROWS] = LAYOUT_planck_grid( - _______, XXXXXXX, ALTRGHT, ALTRGHT, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGUP, CTLLEFT, CTLRGHT, XXXXXXX, _______, + _______, XXXXXXX, ALTRGHT, XXXXXXX, XXXXXXX, ALTLEFT, XXXXXXX, KC_PGUP, KC_PGUP, CTLRGHT, XXXXXXX, _______, _______, CTLRGHT, XXXXXXX, KC_PGDN, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, CTLLEFT, _______, - _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, ALTLEFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + _______, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, ALTLEFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, NORMAL ), /* ## Cursor -| | | |Wh_Dn |M_Btn2| | |Wh_Dn | | | | | -| |M_Acc2|M_Acc1|Wh_Up |M_Btn1| | M_L |M_Down| M_Up | M_R | |SHIFT | -| | | | |M_Btn3| | | | | | | | -| | | | | | | | | \\/ | | |NORMAL| +| | | |Wh_Dn |M_Btn2| | |Wh_Dn |Wh_Dn | | | | +| |M_Acc2|M_Acc1|Wh_Up |M_Btn1| | M_L |M_Down| M_Up | M_R | | | +| | | | |Wh_Up | | | | | | | | +| | | | | \\/ | | | | | | |Normal| */ [_CURSOR] = LAYOUT_planck_grid( - _______, XXXXXXX, XXXXXXX, KC_WH_D, KC_BTN2, XXXXXXX, XXXXXXX, KC_WH_D, XXXXXXX, XXXXXXX, XXXXXXX, _______, - _______, KC_ACL2, KC_ACL1, KC_WH_U, KC_BTN1, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, KC_LSFT, - _______, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN3, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + _______, XXXXXXX, XXXXXXX, KC_WH_D, KC_BTN2, XXXXXXX, XXXXXXX, KC_WH_D, KC_WH_D, XXXXXXX, XXXXXXX, _______, + _______, KC_ACL2, KC_ACL1, KC_WH_U, KC_BTN1, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, _______, + _______, XXXXXXX, XXXXXXX, XXXXXXX, KC_WH_U, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, NORMAL ), /* ## System | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | -| Caps | |Pr_Scn| | Fwd | |Brght-| Vol- | Vol+ |Brght+| | | -| | | | | | Rwd | | Mute |P_Trac|N_Trac| | Play | -| | | | \\/ | | | | |KBoard| | |NORMAL| +| | |Pr_Scn|Pr_Scn| | |Brght-| Vol- | Vol+ |Brght+| Mute | | +| | | | | | | | Mute |P_Trac|N_Trac| | Play | +|KBoard| | | \\/ | | | | | |Colemk|Qwerty|Normal| */ [_SYSTEM] = LAYOUT_planck_grid( 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_CAPS, XXXXXXX, KC_PSCR, XXXXXXX, KC_MFFD, XXXXXXX, KC_BRID, KC_VOLD, KC_VOLU, KC_BRIU, XXXXXXX, _______, - _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MRWD, XXXXXXX, KC_MUTE, KC_MPRV, KC_MNXT, XXXXXXX, KC_MPLY, - _______, _______, _______, _______, _______, _______, _______, _______, KBOARD, _______, _______, NORMAL + _______, XXXXXXX, KC_PSCR, KC_PSCR, XXXXXXX, XXXXXXX, KC_BRID, KC_VOLD, KC_VOLU, KC_BRIU, KC_MUTE, _______, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MUTE, KC_MPRV, KC_MNXT, XXXXXXX, KC_MPLY, + KBOARD, _______, _______, _______, _______, _______, _______, _______, _______, COLEMAK, QWERTY, NORMAL ), /* ## KBoard -| | | | | |RGB_Tg| |Brght+| | |Mode- | | -| | | |Brght-| | | Hue- | Sat- | Sat+ | Hue+ | | | -| | | | | | |Mode+ | | | | | | -| | | | \\/ | | | | | \\/ | |FMWare|NORMAL| +|------| | | | | | | | | | | | +| | | | | | | Hue- | Sat- | Sat+ | Hue+ |Mode+ | | +| | | | | | | |Mode- |Brght-|Brght+| |RGB_Tg| +| \\/ | | | \\/ | | | | | | | |FMWare| */ [_KBOARD] = LAYOUT_planck_grid( - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, XXXXXXX, RGB_VAI, XXXXXXX, XXXXXXX, RGB_RMOD, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAD, XXXXXXX, XXXXXXX, RGB_HUD, RGB_SAD, RGB_SAI, RGB_HUI, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, FMWARE, NORMAL + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_HUD, RGB_SAD, RGB_SAI, RGB_HUI, RGB_MOD, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_RMOD, RGB_VAD, RGB_VAI, XXXXXXX, RGB_TOG, + _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, FMWARE ), /* ## FMWare | | | |EEPROM|Reset | | | | | | | | -| | | |Debug | | | | | | | | | +| | |Reset |Debug | | | | | | | | | |------| | | | | | | | | | | | -| | | | \\/ | | | | | \\/ | | \\/ |NORMAL| +| \\/ | | | \\/ | | | | | | | | \\/ | */ [_FMWARE] = LAYOUT_planck_grid( - XXXXXXX, XXXXXXX, XXXXXXX, EEP_RST, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, DEBUG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, EEP_RST, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, RESET, DEBUG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, _______, NORMAL + _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______ ) }; @@ -199,14 +199,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { static bool shift_is_pressed = false; switch (keycode) { - case SHFTESC: - if (record->event.pressed) { - shift_is_pressed = true; - } else { - shift_is_pressed = false; - } - return true; - case SFTEXLM: if (record->tap.count > 0) { if (record->event.pressed) { @@ -216,6 +208,14 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; + case SHFTESC: + if (record->event.pressed) { + shift_is_pressed = true; + } else { + shift_is_pressed = false; + } + return true; + case BACKTLD: if (record->event.pressed) { if (shift_is_pressed) { @@ -227,6 +227,21 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { unregister_code(KC_GRV); unregister_code(KC_BSPC); } + return true; + + case QWERTY: + set_single_persistent_default_layer(_QWERTY); + return true; + + case COLEMAK: + set_single_persistent_default_layer(_COLEMAK); + return true; + + case NORMAL: + layer_off(_NUMBER); + layer_off(_ARROWS); + layer_off(_CURSOR); + layer_off(_SYSTEM); return false; } return true; @@ -234,10 +249,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case CTRLTAB: - return true; - case CTRLMIN: - return true; case SFTENTR: return true; case SFTEXLM: diff --git a/keyboards/planck/keymaps/adamtabrams/readme.md b/keyboards/planck/keymaps/adamtabrams/readme.md index 2f1a4ab96418..f4d760b25b1f 100644 --- a/keyboards/planck/keymaps/adamtabrams/readme.md +++ b/keyboards/planck/keymaps/adamtabrams/readme.md @@ -1,23 +1,23 @@ -## Normal - QWERTY +## Normal - Qwerty |------|------|------|------|------|------|------|------|------|------|------|------| |:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| -|C(Tab)| Q | W | E | R | T | Y | U | I | O | P | C(-) | +| Tab | Q | W | E | R | T | Y | U | I | O | P | -_ | | Bsp/~| A(A) | G(S) | S(D) | C(F) | G | H | C(J) | S(K) | G(L) | A(;) | '" | | S(!) | Z | X | C | V | B | N | M | , | . | / |S(Ent)| -|COLMAK| | |System|Cursor|S(Esc)|N(Spc)|Arrows| | | | | +| CTRL | GUI | ALT |System|Cursor|S(Esc)|N(Spc)|Arrows| Left | Down | Up | Right| - The `N` in `N(Spc)` stands for Number layer - Hold down a layer key to temporarily activate or tap twice to toggle on or off -## Normal - COLEMAK +## Normal - Colemak |------|------|------|------|------|------|------|------|------|------|------|------| |:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| -|C(Tab)| Q | W | F | P | B | J | L | U | Y | ; | C(-) | +| Tab | Q | W | F | P | B | J | L | U | Y | ; | -_ | | Bsp/~| A(A) | G(R) | S(S) | C(T) | G | M | C(N) | S(E) | G(I) | A(O) | '" | | S(!) | Z | X | C | D | V | K | H | , | . | / |S(Ent)| -|QWERTY| | |System|Cursor|S(Esc)|N(Spc)|Arrows| | | | | +| CTRL | GUI | ALT |System|Cursor|S(Esc)|N(Spc)|Arrows| Left | Down | Up | Right| - The `N` in `N(Spc)` stands for Number layer - Hold down a layer key to temporarily activate or tap twice to toggle on or off @@ -29,49 +29,49 @@ | | @ | + | = | & | \| | # | * | ^ | $ | % | | | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \` | | | ~ | [ | { | ( | ! | = | ) | } | ] | \ | | -| | | | | \\/ | | | | | | |Normal| +| | | | | | | \\/ | | | | |Normal| ## Arrows |------|------|------|------|------|------|------|------|------|------|------|------| |:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| -| | |A(->) |A(->) | | | | P_Up |C(<-) |C(->) | | | +| | |A(->) | | |A(<-) | | P_Up | P_Up |C(->) | | | | |C(->) | |P_Down| | | Left | Down | Up |Right |C(<-) | | -| | | | | |A(<-) | | | | | | | +| | | | |P_Down|A(<-) | | | | | | | | | | | | | | | \\/ | | | |Normal| ## Cursor |------|------|------|------|------|------|------|------|------|------|------|------| |:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| -| | | |Wh_Dn |M_Btn2| | |Wh_Dn | | | | | -| |M_Acc2|M_Acc1|Wh_Up |M_Btn1| | M_L |M_Down| M_Up | M_R | |SHIFT | -| | | | |M_Btn3| | | | | | | | -| | | | | | | | | \\/ | | |Normal| +| | | |Wh_Dn |M_Btn2| | |Wh_Dn |Wh_Dn | | | | +| |M_Acc2|M_Acc1|Wh_Up |M_Btn1| | M_L |M_Down| M_Up | M_R | | | +| | | | |Wh_Up | | | | | | | | +| | | | | \\/ | | | | | | |Normal| ## System |------|------|------|------|------|------|------|------|------|------|------|------| |:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | -| Caps | |Pr_Scn| | Fwd | |Brght-| Vol- | Vol+ |Brght+| | | -| | | | | | Rwd | | Mute |P_Trac|N_Trac| | Play | -| | | | \\/ | | | | |KBoard| | |Normal| +| | |Pr_Scn|Pr_Scn| | |Brght-| Vol- | Vol+ |Brght+| Mute | | +| | | | | | | | Mute |P_Trac|N_Trac| | Play | +|KBoard| | | \\/ | | | | | |Colemk|Qwerty|Normal| ## KBoard |------|------|------|------|------|------|------|------|------|------|------|------| |:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| -| | | | | |RGB_Tg| |Brght+| | |Mode- | | -| | | |Brght-| | | Hue- | Sat- | Sat+ | Hue+ | | | -| | | | | | |Mode+ | | | | | | -| | | | \\/ | | | | | \\/ | |FMWare|Normal| +|------| | | | | | | | | | | | +| | | | | | | Hue- | Sat- | Sat+ | Hue+ |Mode+ | | +| | | | | | | |Mode- |Brght-|Brght+| |RGB_Tg| +| \\/ | | | \\/ | | | | | | | |FMWare| ## FMWare |------|------|------|------|------|------|------|------|------|------|------|------| |:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| | | | |EEPROM|Reset | | | | | | | | -| | | |Debug | | | | | | | | | +| | |Reset |Debug | | | | | | | | | |------| | | | | | | | | | | | -| | | | \\/ | | | | | \\/ | | \\/ |Normal| +| \\/ | | | \\/ | | | | | | | | \\/ | From 05808de8fb5b8d1538b3c15c73b029bcc6609934 Mon Sep 17 00:00:00 2001 From: Adam Abrams Date: Thu, 25 Mar 2021 14:10:05 -0500 Subject: [PATCH 28/32] add simple layer and improve symbol layout --- keyboards/planck/keymaps/adamtabrams/keymap.c | 93 ++++++++----------- .../planck/keymaps/adamtabrams/readme.md | 26 ++++-- 2 files changed, 57 insertions(+), 62 deletions(-) diff --git a/keyboards/planck/keymaps/adamtabrams/keymap.c b/keyboards/planck/keymaps/adamtabrams/keymap.c index 849dff323928..e6dd2c48ef35 100644 --- a/keyboards/planck/keymaps/adamtabrams/keymap.c +++ b/keyboards/planck/keymaps/adamtabrams/keymap.c @@ -21,6 +21,7 @@ enum planck_layers { _QWERTY, _COLEMAK, + _SIMPLE, _NUMBER, _ARROWS, _CURSOR, @@ -30,10 +31,9 @@ enum planck_layers { }; enum planck_keycodes { - BACKTLD = SAFE_RANGE, - EXCLAIM, - QWERTY, + QWERTY = SAFE_RANGE, COLEMAK, + SIMPLE, NORMAL }; @@ -45,8 +45,6 @@ enum planck_keycodes { #define NUMSPAC LT(_NUMBER, KC_SPC) #define SHFTESC LSFT_T(KC_ESC) - -#define SFTEXLM SFT_T(EXCLAIM) #define SFTENTR SFT_T(KC_ENT) #define ALT__A ALT_T(KC_A) @@ -75,45 +73,60 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* ## Qwerty | Tab | Q | W | E | R | T | Y | U | I | O | P | -_ | -| Bsp/~| A(A) | G(S) | S(D) | C(F) | G | H | C(J) | S(K) | G(L) | A(;) | '" | -| S(!) | Z | X | C | V | B | N | M | , | . | / |S(Ent)| +| Bsp | A(A) | G(S) | S(D) | C(F) | G | H | C(J) | S(K) | G(L) | A(;) | '" | +| ! | Z | X | C | V | B | N | M | , | . | / | Enter| | CTRL | GUI | ALT |System|Cursor|S(Esc)|N(Spc)|Arrows| Left | Down | Up | Right| */ [_QWERTY] = LAYOUT_planck_grid( KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, - BACKTLD, ALT__A, GUI__S, SFT__D, CTL__F, KC_G, KC_H, CTL__J, SFT__K, GUI__L, ALTSCLN, KC_QUOT, - SFTEXLM, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFTENTR, + KC_BSPC, ALT__A, GUI__S, SFT__D, CTL__F, KC_G, KC_H, CTL__J, SFT__K, GUI__L, ALTSCLN, KC_QUOT, + KC_EXLM, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, KC_LCTL, KC_LGUI, KC_LALT, SYSTEM, CURSOR, SHFTESC, NUMSPAC, ARROWS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), /* ## Colemak | Tab | Q | W | F | P | B | J | L | U | Y | ; | -_ | -| Bsp/~| A(A) | G(R) | S(S) | C(T) | G | M | C(N) | S(E) | G(I) | A(O) | '" | -| S(!) | Z | X | C | D | V | K | H | , | . | / |S(Ent)| +| Bsp | A(A) | G(R) | S(S) | C(T) | G | M | C(N) | S(E) | G(I) | A(O) | '" | +| ! | Z | X | C | D | V | K | H | , | . | / | Enter| | CTRL | GUI | ALT |System|Cursor|S(Esc)|N(Spc)|Arrows| Left | Down | Up | Right| */ [_COLEMAK] = LAYOUT_planck_grid( KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_MINS, - BACKTLD, ALT__A, GUI__R, SFT__S, CTL__T, KC_G, KC_M, CTL__N, SFT__E, GUI__I, ALT__O, KC_QUOT, - SFTEXLM, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, SFTENTR, + KC_BSPC, ALT__A, GUI__R, SFT__S, CTL__T, KC_G, KC_M, CTL__N, SFT__E, GUI__I, ALT__O, KC_QUOT, + KC_EXLM, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, KC_LCTL, KC_LGUI, KC_LALT, SYSTEM, CURSOR, SHFTESC, NUMSPAC, ARROWS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), +/* ## Simple + +| Tab | Q | W | E | R | T | Y | U | I | O | P | Bsp | +| Esc | A | S | D | F | G | H | J | K | L | ; | '" | +| SHFT | Z | X | C | V | B | N | M | , | . | / |S(Ent)| +| CTRL | GUI | ALT |System|Cursor|N(Spc)|N(Spc)|Arrows| Left | Down | Up | Right| + */ + +[_SIMPLE] = LAYOUT_planck_grid( + 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_ESC, 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, SFTENTR, + KC_LCTL, KC_LGUI, KC_LALT, SYSTEM, CURSOR, NUMSPAC, NUMSPAC, ARROWS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + /* ## Number -| | @ | + | = | & | \| | # | * | ^ | $ | % | | +| | \| | & | = | + | @ | % | # | * | $ | ^ | | | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \` | -| | ~ | [ | { | ( | ! | = | ) | } | ] | \ | | +| | | [ | { | ( | ~ | ! | ) | } | ] | \ | | | | | | | | | \\/ | | | | |Normal| */ [_NUMBER] = LAYOUT_planck_grid( - _______, KC_AT, KC_PLUS, KC_EQL, KC_AMPR, KC_PIPE, KC_HASH, KC_ASTR, KC_CIRC, KC_DLR, KC_PERC, _______, + _______, KC_PIPE, KC_AMPR, KC_EQL, KC_PLUS, KC_AT, KC_PERC, KC_HASH, KC_ASTR, KC_DLR, KC_CIRC, _______, _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, - _______, KC_TILD, KC_LBRC, KC_LCBR, KC_LPRN, KC_EXLM, KC_EQL, KC_RPRN, KC_RCBR, KC_RBRC, KC_BSLS, _______, + _______, XXXXXXX, KC_LBRC, KC_LCBR, KC_LPRN, KC_TILD, KC_EXLM, KC_RPRN, KC_RCBR, KC_RBRC, KC_BSLS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, NORMAL ), @@ -153,14 +166,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | | |Pr_Scn|Pr_Scn| | |Brght-| Vol- | Vol+ |Brght+| Mute | | | | | | | | | | Mute |P_Trac|N_Trac| | Play | -|KBoard| | | \\/ | | | | | |Colemk|Qwerty|Normal| +|KBoard| | | \\/ | | | | |Simple|Qwerty|Colemk|Normal| */ [_SYSTEM] = LAYOUT_planck_grid( KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, XXXXXXX, KC_PSCR, KC_PSCR, XXXXXXX, XXXXXXX, KC_BRID, KC_VOLD, KC_VOLU, KC_BRIU, KC_MUTE, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MUTE, KC_MPRV, KC_MNXT, XXXXXXX, KC_MPLY, - KBOARD, _______, _______, _______, _______, _______, _______, _______, _______, COLEMAK, QWERTY, NORMAL + KBOARD, _______, _______, _______, _______, _______, _______, _______, SIMPLE, QWERTY, COLEMAK, NORMAL ), /* ## KBoard @@ -196,39 +209,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { - static bool shift_is_pressed = false; - switch (keycode) { - case SFTEXLM: - if (record->tap.count > 0) { - if (record->event.pressed) { - tap_code16(KC_EXLM); - } - return false; - } - return true; - - case SHFTESC: - if (record->event.pressed) { - shift_is_pressed = true; - } else { - shift_is_pressed = false; - } - return true; - - case BACKTLD: - if (record->event.pressed) { - if (shift_is_pressed) { - register_code(KC_GRV); - } else { - register_code(KC_BSPC); - } - } else { - unregister_code(KC_GRV); - unregister_code(KC_BSPC); - } - return true; - case QWERTY: set_single_persistent_default_layer(_QWERTY); return true; @@ -237,6 +218,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { set_single_persistent_default_layer(_COLEMAK); return true; + case SIMPLE: + set_single_persistent_default_layer(_SIMPLE); + return true; + case NORMAL: layer_off(_NUMBER); layer_off(_ARROWS); @@ -249,14 +234,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case SFTENTR: - return true; - case SFTEXLM: - return true; case SHFTESC: return true; case NUMSPAC: return true; + case SFTENTR: + return true; case ALT__A: return true; case ALTSCLN: diff --git a/keyboards/planck/keymaps/adamtabrams/readme.md b/keyboards/planck/keymaps/adamtabrams/readme.md index f4d760b25b1f..9f2c621baf22 100644 --- a/keyboards/planck/keymaps/adamtabrams/readme.md +++ b/keyboards/planck/keymaps/adamtabrams/readme.md @@ -3,8 +3,8 @@ |------|------|------|------|------|------|------|------|------|------|------|------| |:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| | Tab | Q | W | E | R | T | Y | U | I | O | P | -_ | -| Bsp/~| A(A) | G(S) | S(D) | C(F) | G | H | C(J) | S(K) | G(L) | A(;) | '" | -| S(!) | Z | X | C | V | B | N | M | , | . | / |S(Ent)| +| Bsp | A(A) | G(S) | S(D) | C(F) | G | H | C(J) | S(K) | G(L) | A(;) | '" | +| ! | Z | X | C | V | B | N | M | , | . | / | Enter| | CTRL | GUI | ALT |System|Cursor|S(Esc)|N(Spc)|Arrows| Left | Down | Up | Right| - The `N` in `N(Spc)` stands for Number layer @@ -15,20 +15,32 @@ |------|------|------|------|------|------|------|------|------|------|------|------| |:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| | Tab | Q | W | F | P | B | J | L | U | Y | ; | -_ | -| Bsp/~| A(A) | G(R) | S(S) | C(T) | G | M | C(N) | S(E) | G(I) | A(O) | '" | -| S(!) | Z | X | C | D | V | K | H | , | . | / |S(Ent)| +| Bsp | A(A) | G(R) | S(S) | C(T) | G | M | C(N) | S(E) | G(I) | A(O) | '" | +| ! | Z | X | C | D | V | K | H | , | . | / | Enter| | CTRL | GUI | ALT |System|Cursor|S(Esc)|N(Spc)|Arrows| Left | Down | Up | Right| - The `N` in `N(Spc)` stands for Number layer - Hold down a layer key to temporarily activate or tap twice to toggle on or off +## Normal - Simple + +|------|------|------|------|------|------|------|------|------|------|------|------| +|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| Tab | Q | W | E | R | T | Y | U | I | O | P | Bsp | +| Esc | A | S | D | F | G | H | J | K | L | ; | '" | +| SHFT | Z | X | C | V | B | N | M | , | . | / |S(Ent)| +| CTRL | GUI | ALT |System|Cursor|N(Spc)|N(Spc)|Arrows| Left | Down | Up | Right| + +- The `N` in `N(Spc)` stands for Number layer +- Hold down a layer key to temporarily activate or tap twice to toggle on or off + ## Number |------|------|------|------|------|------|------|------|------|------|------|------| |:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| -| | @ | + | = | & | \| | # | * | ^ | $ | % | | +| | \| | & | = | + | @ | % | # | * | $ | ^ | | | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \` | -| | ~ | [ | { | ( | ! | = | ) | } | ] | \ | | +| | | [ | { | ( | ~ | ! | ) | } | ] | \ | | | | | | | | | \\/ | | | | |Normal| ## Arrows @@ -56,7 +68,7 @@ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | | |Pr_Scn|Pr_Scn| | |Brght-| Vol- | Vol+ |Brght+| Mute | | | | | | | | | | Mute |P_Trac|N_Trac| | Play | -|KBoard| | | \\/ | | | | | |Colemk|Qwerty|Normal| +|KBoard| | | \\/ | | | | |Simple|Qwerty|Colemk|Normal| ## KBoard From 12df1875778952726a85acb2b9df3763221776d5 Mon Sep 17 00:00:00 2001 From: Adam Abrams Date: Thu, 29 Apr 2021 17:12:15 -0500 Subject: [PATCH 29/32] increase tapping term and improve simple layout --- keyboards/planck/keymaps/adamtabrams/config.h | 2 +- keyboards/planck/keymaps/adamtabrams/keymap.c | 4 ++-- keyboards/planck/keymaps/adamtabrams/readme.md | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/planck/keymaps/adamtabrams/config.h b/keyboards/planck/keymaps/adamtabrams/config.h index 31b6e27541fa..663e245f7cf5 100644 --- a/keyboards/planck/keymaps/adamtabrams/config.h +++ b/keyboards/planck/keymaps/adamtabrams/config.h @@ -15,7 +15,7 @@ #define MK_W_INTERVAL_UNMOD 80 // Tap-Hold Configs -#define TAPPING_TERM 170 +#define TAPPING_TERM 250 #define PERMISSIVE_HOLD #define IGNORE_MOD_TAP_INTERRUPT #define IGNORE_MOD_TAP_INTERRUPT_PER_KEY diff --git a/keyboards/planck/keymaps/adamtabrams/keymap.c b/keyboards/planck/keymaps/adamtabrams/keymap.c index e6dd2c48ef35..ab310611cb06 100644 --- a/keyboards/planck/keymaps/adamtabrams/keymap.c +++ b/keyboards/planck/keymaps/adamtabrams/keymap.c @@ -105,14 +105,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | Tab | Q | W | E | R | T | Y | U | I | O | P | Bsp | | Esc | A | S | D | F | G | H | J | K | L | ; | '" | | SHFT | Z | X | C | V | B | N | M | , | . | / |S(Ent)| -| CTRL | GUI | ALT |System|Cursor|N(Spc)|N(Spc)|Arrows| Left | Down | Up | Right| +| CTRL | GUI | ALT |System|Cursor| Spc |N(Spc)|Arrows| Left | Down | Up | Right| */ [_SIMPLE] = LAYOUT_planck_grid( 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_ESC, 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, SFTENTR, - KC_LCTL, KC_LGUI, KC_LALT, SYSTEM, CURSOR, NUMSPAC, NUMSPAC, ARROWS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + KC_LCTL, KC_LGUI, KC_LALT, SYSTEM, CURSOR, KC_SPC, NUMSPAC, ARROWS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), /* ## Number diff --git a/keyboards/planck/keymaps/adamtabrams/readme.md b/keyboards/planck/keymaps/adamtabrams/readme.md index 9f2c621baf22..86068f404641 100644 --- a/keyboards/planck/keymaps/adamtabrams/readme.md +++ b/keyboards/planck/keymaps/adamtabrams/readme.md @@ -29,7 +29,7 @@ | Tab | Q | W | E | R | T | Y | U | I | O | P | Bsp | | Esc | A | S | D | F | G | H | J | K | L | ; | '" | | SHFT | Z | X | C | V | B | N | M | , | . | / |S(Ent)| -| CTRL | GUI | ALT |System|Cursor|N(Spc)|N(Spc)|Arrows| Left | Down | Up | Right| +| CTRL | GUI | ALT |System|Cursor| Spc |N(Spc)|Arrows| Left | Down | Up | Right| - The `N` in `N(Spc)` stands for Number layer - Hold down a layer key to temporarily activate or tap twice to toggle on or off From bddb20b3ec0ac06ddf378288bd75956941aa18bd Mon Sep 17 00:00:00 2001 From: Adam Abrams Date: Wed, 21 Jul 2021 14:29:32 -0500 Subject: [PATCH 30/32] increase layer toggle, decrease tapping term, and add transparency --- keyboards/planck/keymaps/adamtabrams/config.h | 4 ++-- keyboards/planck/keymaps/adamtabrams/keymap.c | 14 +++++++------- keyboards/planck/keymaps/adamtabrams/readme.md | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/keyboards/planck/keymaps/adamtabrams/config.h b/keyboards/planck/keymaps/adamtabrams/config.h index 663e245f7cf5..5b0dfb1d281f 100644 --- a/keyboards/planck/keymaps/adamtabrams/config.h +++ b/keyboards/planck/keymaps/adamtabrams/config.h @@ -3,7 +3,7 @@ // General Configs #define NO_ACTION_ONESHOT #define FORCE_NKRO -#define TAPPING_TOGGLE 2 +#define TAPPING_TOGGLE 3 // Mouse Configs #define MK_3_SPEED @@ -15,7 +15,7 @@ #define MK_W_INTERVAL_UNMOD 80 // Tap-Hold Configs -#define TAPPING_TERM 250 +#define TAPPING_TERM 180 #define PERMISSIVE_HOLD #define IGNORE_MOD_TAP_INTERRUPT #define IGNORE_MOD_TAP_INTERRUPT_PER_KEY diff --git a/keyboards/planck/keymaps/adamtabrams/keymap.c b/keyboards/planck/keymaps/adamtabrams/keymap.c index ab310611cb06..a6db91d9fe43 100644 --- a/keyboards/planck/keymaps/adamtabrams/keymap.c +++ b/keyboards/planck/keymaps/adamtabrams/keymap.c @@ -134,15 +134,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* ## Arrows | | |A(->) | | |A(<-) | | P_Up | P_Up |C(->) | | | -| |C(->) | |P_Down| | | Left | Down | Up |Right |C(<-) | | +| | | |P_Down| | | Left | Down | Up |Right |C(<-) | | | | | | |P_Down|A(<-) | | | | | | | | | | | | | | | \\/ | | | |Normal| */ [_ARROWS] = LAYOUT_planck_grid( - _______, XXXXXXX, ALTRGHT, XXXXXXX, XXXXXXX, ALTLEFT, XXXXXXX, KC_PGUP, KC_PGUP, CTLRGHT, XXXXXXX, _______, - _______, CTLRGHT, XXXXXXX, KC_PGDN, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, CTLLEFT, _______, - _______, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, ALTLEFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + _______, _______, ALTRGHT, _______, _______, ALTLEFT, _______, KC_PGUP, KC_PGUP, CTLRGHT, _______, _______, + _______, _______, _______, KC_PGDN, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, CTLLEFT, _______, + _______, _______, _______, _______, KC_PGDN, ALTLEFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, NORMAL ), @@ -155,9 +155,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_CURSOR] = LAYOUT_planck_grid( - _______, XXXXXXX, XXXXXXX, KC_WH_D, KC_BTN2, XXXXXXX, XXXXXXX, KC_WH_D, KC_WH_D, XXXXXXX, XXXXXXX, _______, - _______, KC_ACL2, KC_ACL1, KC_WH_U, KC_BTN1, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, _______, - _______, XXXXXXX, XXXXXXX, XXXXXXX, KC_WH_U, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + _______, _______, _______, KC_WH_D, KC_BTN2, _______, _______, KC_WH_D, KC_WH_D, _______, _______, _______, + _______, KC_ACL2, KC_ACL1, KC_WH_U, KC_BTN1, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, _______, _______, + _______, _______, _______, _______, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, NORMAL ), diff --git a/keyboards/planck/keymaps/adamtabrams/readme.md b/keyboards/planck/keymaps/adamtabrams/readme.md index 86068f404641..6512cb7d7ab2 100644 --- a/keyboards/planck/keymaps/adamtabrams/readme.md +++ b/keyboards/planck/keymaps/adamtabrams/readme.md @@ -48,7 +48,7 @@ |------|------|------|------|------|------|------|------|------|------|------|------| |:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| | | |A(->) | | |A(<-) | | P_Up | P_Up |C(->) | | | -| |C(->) | |P_Down| | | Left | Down | Up |Right |C(<-) | | +| | | |P_Down| | | Left | Down | Up |Right |C(<-) | | | | | | |P_Down|A(<-) | | | | | | | | | | | | | | | \\/ | | | |Normal| From c9f23980d864e80bcdb4d189d4b5ecd8138fc76f Mon Sep 17 00:00:00 2001 From: Adam Abrams Date: Wed, 21 Jul 2021 16:24:55 -0500 Subject: [PATCH 31/32] add gpl license header --- keyboards/planck/keymaps/adamtabrams/config.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/keyboards/planck/keymaps/adamtabrams/config.h b/keyboards/planck/keymaps/adamtabrams/config.h index 5b0dfb1d281f..0c275f20c51b 100644 --- a/keyboards/planck/keymaps/adamtabrams/config.h +++ b/keyboards/planck/keymaps/adamtabrams/config.h @@ -1,3 +1,19 @@ +/* Copyright (C) 2021 Adam Abrams + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #pragma once // General Configs From cae826b2aef34f980a9063e06aaffc2a879fb81b Mon Sep 17 00:00:00 2001 From: Adam Abrams Date: Wed, 21 Jul 2021 16:25:16 -0500 Subject: [PATCH 32/32] simplify keymap --- keyboards/planck/keymaps/adamtabrams/keymap.c | 36 +------------------ 1 file changed, 1 insertion(+), 35 deletions(-) diff --git a/keyboards/planck/keymaps/adamtabrams/keymap.c b/keyboards/planck/keymaps/adamtabrams/keymap.c index a6db91d9fe43..4b041aa2af2f 100644 --- a/keyboards/planck/keymaps/adamtabrams/keymap.c +++ b/keyboards/planck/keymaps/adamtabrams/keymap.c @@ -223,10 +223,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; case NORMAL: - layer_off(_NUMBER); - layer_off(_ARROWS); - layer_off(_CURSOR); - layer_off(_SYSTEM); + layer_clear(); return false; } return true; @@ -235,39 +232,22 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case SHFTESC: - return true; case NUMSPAC: - return true; case SFTENTR: - return true; case ALT__A: - return true; case ALTSCLN: - return true; case ALT__O: - return true; case GUI__S: - return true; case GUI__L: - return true; case GUI__R: - return true; case GUI__I: - return true; case SFT__D: - return true; case SFT__K: - return true; case SFT__S: - return true; case SFT__E: - return true; case CTL__F: - return true; case CTL__J: - return true; case CTL__T: - return true; case CTL__N: return true; default: @@ -278,33 +258,19 @@ bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) { bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case ALT__A: - return true; case ALTSCLN: - return true; case ALT__O: - return true; case GUI__S: - return true; case GUI__L: - return true; case GUI__R: - return true; case GUI__I: - return true; case SFT__D: - return true; case SFT__K: - return true; case SFT__S: - return true; case SFT__E: - return true; case CTL__F: - return true; case CTL__J: - return true; case CTL__T: - return true; case CTL__N: return true; default: