From 1a070d6f6f0fe20d2b8af93c48770a556ee2d468 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Mon, 7 Aug 2017 22:04:37 -0400 Subject: [PATCH 01/37] let planck keymaps use KEYMAP --- keyboards/planck/planck.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/keyboards/planck/planck.h b/keyboards/planck/planck.h index 8cfee5d1ccb..10f17b4a469 100644 --- a/keyboards/planck/planck.h +++ b/keyboards/planck/planck.h @@ -36,4 +36,6 @@ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \ } +#define KEYMAP PLANCK_GRID + #endif From 107d8031e5dc54d5fe0eb48c82a143a139896b56 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Mon, 7 Aug 2017 22:36:05 -0400 Subject: [PATCH 02/37] update priyadi's keymap config --- keyboards/handwired/promethium/config.h | 2 +- .../promethium/keymaps/priyadi/keymap.c | 28 +++++++++---------- keyboards/planck/keymaps/priyadi/config.h | 2 +- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/keyboards/handwired/promethium/config.h b/keyboards/handwired/promethium/config.h index efb9ebdd74f..ea5f2b76e8c 100644 --- a/keyboards/handwired/promethium/config.h +++ b/keyboards/handwired/promethium/config.h @@ -161,7 +161,7 @@ along with this program. If not, see . #define ___ KC_NO -#define KEYMAP( \ +#define KEYMAP_CUSTOM( \ k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \ k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 763fa5a27a8..e229b67e541 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -686,7 +686,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Alt | GUI | Punc | Num | Space | Fun |Greek | GUI |AltGr | Ctrl | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = KEYMAP( +[_QWERTY] = KEYMAP_CUSTOM( 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_QUOT, KC_ENT , KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, @@ -706,7 +706,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ #ifdef LAYOUT_DVORAK -[_DVORAK] = KEYMAP( +[_DVORAK] = KEYMAP_CUSTOM( _______, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, _______, _______, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, _______, _______, KC_SLSH, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, _______, @@ -728,7 +728,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ #ifdef LAYOUT_COLEMAK -[_COLEMAK] = KEYMAP( +[_COLEMAK] = KEYMAP_CUSTOM( _______, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, _______, _______, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, _______, _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, @@ -750,7 +750,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ #ifdef LAYOUT_NORMAN -[_NORMAN] = KEYMAP( +[_NORMAN] = KEYMAP_CUSTOM( _______, KC_Q, KC_W, KC_D, KC_F, KC_K, KC_J, KC_U, KC_R, KC_L, KC_QUOT, _______, _______, KC_A, KC_S, KC_E, KC_T, KC_G, KC_Y, KC_N, KC_I, KC_O, KC_H, _______, _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_P, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, @@ -772,7 +772,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ #ifdef LAYOUT_WORKMAN -[_WORKMAN] = KEYMAP( +[_WORKMAN] = KEYMAP_CUSTOM( _______, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_QUOT, _______, _______, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, _______, _______, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, _______, @@ -792,7 +792,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | : | | * `-----------------------------------------------------------------------------------' */ -[_PUNC] = KEYMAP( +[_PUNC] = KEYMAP_CUSTOM( KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, X(LTEQ), X(GTEQ), _______, KC_GRV, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, X(NOTEQ),KC_LPRN, KC_RPRN, KC_LABK, KC_RABK, _______, KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, X(PLMIN),KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, _______, @@ -811,7 +811,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | x | | | | | 0 | , | . | : | | * `-----------------------------------------------------------------------------------' */ -[_NUM] = KEYMAP( +[_NUM] = KEYMAP_CUSTOM( KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, S(KC_A), KC_1, KC_2, KC_3, S(KC_D), _______, KC_GRV, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, S(KC_B), KC_4, KC_5, KC_6, S(KC_E), _______, KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, S(KC_C), KC_7, KC_8, KC_9, S(KC_F), _______, @@ -830,7 +830,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_FUN] = KEYMAP( +[_FUN] = KEYMAP_CUSTOM( XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_INS, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, KC_DEL, KC_CAPS, KC_F5, KC_F6, KC_F7, KC_F8, KC_PSCR, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, KC_F9, KC_F10, KC_F11, KC_F12, KC_PAUS, XXXXXXX, XXXXXXX, KC_HOME, KC_END, XXXXXXX, _______, @@ -849,7 +849,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_GREEKU] = KEYMAP( +[_GREEKU] = KEYMAP_CUSTOM( _______, XXXXXXX, XXXXXXX,X(UEPSI), X(URHO), X(UTAU),X(UUPSI),X(UTHET),X(UIOTA),X(UOMIC), X(UPI), _______, _______,X(UALPH),X(USIGM),X(UDELT), X(UPHI),X(UGAMM), X(UETA), X(UXI),X(UKAPP),X(ULAMB), KC_QUOT, _______, _______,X(UZETA), X(UCHI), X(UPSI),X(UOMEG),X(UBETA), X(UNU), X(UMU), KC_COMM, KC_DOT, KC_SLSH, _______, @@ -868,7 +868,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_GREEKL] = KEYMAP( +[_GREEKL] = KEYMAP_CUSTOM( _______, XXXXXXX,X(FSIGM),X(LEPSI), X(LRHO), X(LTAU),X(LUPSI),X(LTHET),X(LIOTA),X(LOMIC), X(LPI), _______, _______,X(LALPH),X(LSIGM),X(LDELT), X(LPHI),X(LGAMM), X(LETA), X(LXI),X(LKAPP),X(LLAMB), KC_QUOT, _______, _______,X(LZETA), X(LCHI), X(LPSI),X(LOMEG),X(LBETA), X(LNU), X(LMU), KC_COMM, KC_DOT, KC_SLSH, _______, @@ -887,7 +887,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_EMPTY] = KEYMAP( +[_EMPTY] = KEYMAP_CUSTOM( 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, @@ -906,7 +906,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_EMOJI] = KEYMAP( +[_EMOJI] = KEYMAP_CUSTOM( X(HART2), X(CRY2),X(WEARY),X(EYERT),X(SMIRK), X(TJOY),X(RECYC),X(UNAMU),X(MUSIC),X(OKHND),X(PENSV), X(PHEW), X(THMUP), X(PRAY),X(SMILE),X(SMIL2),X(FLUSH), X(GRIN),X(HEART), X(BYE), X(KISS),X(CELEB), X(COOL),X(NOEVS), X(THMDN),X(SLEEP), X(CLAP), X(CRY), X(VIC),X(BHART), X(SUN),X(SMEYE), X(WINK), X(MOON),X(CONFU),X(NOEVH), @@ -925,7 +925,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_GUI] = KEYMAP( +[_GUI] = KEYMAP_CUSTOM( XXXXXXX, G(KC_1), G(KC_2), G(KC_3), G(KC_4), G(KC_5), G(KC_6), G(KC_7), G(KC_8), G(KC_9), G(KC_0), XXXXXXX, KC_ESC, XXXXXXX, S(KC_TAB),KC_ESC, KC_TAB, XXXXXXX, XXXXXXX, KC_WWWB, XXXXXXX, KC_WWWF, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, KC_SPC, KC_SPC, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, @@ -944,7 +944,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_SYS] = KEYMAP( +[_SYS] = KEYMAP_CUSTOM( DEBUG, QWERTY, WIN, XXXXXXX, RESET, XXXXXXX, XXXXXXX, OUT_USB, XXXXXXX, XXXXXXX, XXXXXXX, RGBDEMO, XXXXXXX, FC_TOG, XXXXXXX, DVORAK, XXXXXXX, GLOW, XXXXXXX, XXXXXXX, WORKMAN, LINUX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, COLEMAK, XXXXXXX, OUT_BT, NORMAN, OSX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, diff --git a/keyboards/planck/keymaps/priyadi/config.h b/keyboards/planck/keymaps/priyadi/config.h index adc1c69aa55..448ae3b908a 100644 --- a/keyboards/planck/keymaps/priyadi/config.h +++ b/keyboards/planck/keymaps/priyadi/config.h @@ -23,7 +23,7 @@ #define DOUBLESPACE_LAYER_ENABLE // #define TOLELOT_ENABLE -#define KEYMAP( \ +#define KEYMAP_CUSTOM( \ k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \ k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ From 1219da753bc5475f48b1cfe420bd916aa399fc60 Mon Sep 17 00:00:00 2001 From: Fredric Silberberg Date: Sat, 5 Aug 2017 00:58:10 -0700 Subject: [PATCH 03/37] Initial nyquist keymap --- keyboards/nyquist/keymaps/333fred/Makefile | 3 + keyboards/nyquist/keymaps/333fred/config.h | 34 ++++ keyboards/nyquist/keymaps/333fred/keymap.c | 218 +++++++++++++++++++++ 3 files changed, 255 insertions(+) create mode 100644 keyboards/nyquist/keymaps/333fred/Makefile create mode 100644 keyboards/nyquist/keymaps/333fred/config.h create mode 100644 keyboards/nyquist/keymaps/333fred/keymap.c diff --git a/keyboards/nyquist/keymaps/333fred/Makefile b/keyboards/nyquist/keymaps/333fred/Makefile new file mode 100644 index 00000000000..457a3d01d4a --- /dev/null +++ b/keyboards/nyquist/keymaps/333fred/Makefile @@ -0,0 +1,3 @@ +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/nyquist/keymaps/333fred/config.h b/keyboards/nyquist/keymaps/333fred/config.h new file mode 100644 index 00000000000..f2408c0e3e0 --- /dev/null +++ b/keyboards/nyquist/keymaps/333fred/config.h @@ -0,0 +1,34 @@ +/* +Copyright 2017 Danny Nguyen + +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 . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define _MASTER_RIGHT +// #define EE_HANDS + +#endif diff --git a/keyboards/nyquist/keymaps/333fred/keymap.c b/keyboards/nyquist/keymaps/333fred/keymap.c new file mode 100644 index 00000000000..74a12c54ada --- /dev/null +++ b/keyboards/nyquist/keymaps/333fred/keymap.c @@ -0,0 +1,218 @@ +#include "nyquist.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 0 +#define _COLEMAK 1 +#define _DVORAK 2 +#define _LOWER 3 +#define _RAISE 4 +#define _VIM 5 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, +}; + +enum custom_macros { + DLEFT, + DRIGHT, + PSCREEN_APP +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | \ | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D |LTVIMF| G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . |/ Ctrl| Shift| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower | Bksp | Ent | Spc | Raise| + | Up | Del | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = KEYMAP( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH, \ + KC_ESC, KC_A, KC_S, KC_D, LT(_VIM, KC_F), KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + OSM(MOD_LSFT), LCTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RCTL_T(KC_SLSH), OSM(MOD_RSFT), \ + ADJUST, KC_LCTL, KC_LGUI, KC_LALT, OSL(_LOWER), KC_BSPC, KC_ENT, KC_SPC, RAISE, KC_PLUS, KC_UP, KC_DEL \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | Caps | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | ! | @ | ( | ) | | | 7 | 8 | 9 | * | ) | F12 | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | # | $ | { | } | ` | 4 | 5 | 6 | + | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | APscr| % | ^ | [ | ] | ~ | 1 | 2 | 3 | \ | Vol- | Vol+ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Pscr | | | | | | 0 | . | = | Prev | Next | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = KEYMAP( \ + KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, \ + _______, KC_EXLM, KC_AT, KC_LPRN, KC_RPRN, KC_PIPE, KC_7, KC_8, KC_9, KC_ASTR, KC_RPRN, KC_F12, \ + _______, KC_HASH, KC_DLR, KC_LCBR, KC_RCBR, KC_GRV, KC_4, KC_5, KC_6, KC_PLUS, KC_RCBR, KC_PIPE, \ + M(PSCREEN_APP), KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_1, KC_2, KC_3, KC_BSLS, KC_VOLD, KC_VOLU, \ + KC_PSCR, _______, _______, _______, _______, _______, KC_0, KC_DOT, KC_EQL, KC_MPRV, KC_MNXT, KC_MPLY \ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ~ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | { | } | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = KEYMAP( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ + KC_DEL, KC_F1, KC_F2, KC_LCBR, KC_RBRC, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = KEYMAP( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | DLeft|DRight| LCTRL| | | Left | Down | Up | Right| | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | LShft| | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_VIM] = KEYMAP( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, M(DLEFT), M(DRIGHT), KC_LCTL, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, KC_LSFT, _______, _______, _______, _______, _______, _______, _______ \ +) + +}; + +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +#endif + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + #endif + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + switch(id) { + case DLEFT: + if (record->event.pressed) { // Windows move desktop left + return MACRO(D(LCTL), D(LGUI), T(LEFT), U(LGUI), U(LCTL), END); + } + break; + case DRIGHT: + if (record->event.pressed) { // Windows move desktop right + return MACRO(D(LCTL), D(LGUI), T(RIGHT), U(LGUI), U(LCTL), END); + } + break; + case PSCREEN_APP: + if (record->event.pressed) { + return MACRO(D(LALT), T(PSCR), U(LALT), END); + } + break; + } + return MACRO_NONE; +} From fb91d9008b051c4af5b8ff8952a02836061b8e60 Mon Sep 17 00:00:00 2001 From: Fredric Silberberg Date: Sat, 5 Aug 2017 14:54:16 -0700 Subject: [PATCH 04/37] Additional keymap updates. --- keyboards/nyquist/keymaps/333fred/config.h | 5 +++++ keyboards/nyquist/keymaps/333fred/keymap.c | 20 +++++++++----------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/keyboards/nyquist/keymaps/333fred/config.h b/keyboards/nyquist/keymaps/333fred/config.h index f2408c0e3e0..92096eba2ed 100644 --- a/keyboards/nyquist/keymaps/333fred/config.h +++ b/keyboards/nyquist/keymaps/333fred/config.h @@ -31,4 +31,9 @@ along with this program. If not, see . // #define _MASTER_RIGHT // #define EE_HANDS +#undef TAPPING_TERM +#define TAPPING_TERM 150 + +#define PERMISSIVE_HOLD + #endif diff --git a/keyboards/nyquist/keymaps/333fred/keymap.c b/keyboards/nyquist/keymaps/333fred/keymap.c index 74a12c54ada..afa8b75b652 100644 --- a/keyboards/nyquist/keymaps/333fred/keymap.c +++ b/keyboards/nyquist/keymaps/333fred/keymap.c @@ -9,11 +9,9 @@ extern keymap_config_t keymap_config; // Layer names don't all need to be of the same length, obviously, and you can also skip them // entirely and just use numbers. #define _QWERTY 0 -#define _COLEMAK 1 -#define _DVORAK 2 -#define _LOWER 3 -#define _RAISE 4 -#define _VIM 5 +#define _LOWER 1 +#define _RAISE 2 +#define _VIM 3 #define _ADJUST 16 enum custom_keycodes { @@ -45,15 +43,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| Z | X | C | V | B | N | M | , | . |/ Ctrl| Shift| * |------+------+------+------+------+------+------+------+------+------+------+------| - * |Adjust| Ctrl | Alt | GUI |Lower | Bksp | Ent | Spc | Raise| + | Up | Del | + * | Ctrl | Alt | F4 | GUI |Lower | Bksp | Spc | Ent | Raise| + | Up | Del | * `-----------------------------------------------------------------------------------' */ [_QWERTY] = KEYMAP( \ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH, \ - KC_ESC, KC_A, KC_S, KC_D, LT(_VIM, KC_F), KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ - OSM(MOD_LSFT), LCTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RCTL_T(KC_SLSH), OSM(MOD_RSFT), \ - ADJUST, KC_LCTL, KC_LGUI, KC_LALT, OSL(_LOWER), KC_BSPC, KC_ENT, KC_SPC, RAISE, KC_PLUS, KC_UP, KC_DEL \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH, \ + KC_ESC, KC_A, KC_S, KC_D, LT(_VIM, KC_F), KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + OSM(MOD_LSFT), LCTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RCTL_T(KC_SLSH), OSM(MOD_RSFT), \ + KC_LCTL, KC_LALT, KC_F4, KC_LGUI, OSL(_LOWER), KC_BSPC, KC_SPC, KC_ENT, RAISE, KC_PLUS, KC_UP, KC_DEL \ ), /* Lower From b66a9af3526d27764c85115dcc8375a031aa361f Mon Sep 17 00:00:00 2001 From: Fredric Silberberg Date: Sat, 5 Aug 2017 15:34:14 -0700 Subject: [PATCH 05/37] Finished initial Nyquist keymap. --- keyboards/nyquist/keymaps/333fred/keymap.c | 131 +++++---------------- 1 file changed, 27 insertions(+), 104 deletions(-) diff --git a/keyboards/nyquist/keymaps/333fred/keymap.c b/keyboards/nyquist/keymaps/333fred/keymap.c index afa8b75b652..d3a347803e2 100644 --- a/keyboards/nyquist/keymaps/333fred/keymap.c +++ b/keyboards/nyquist/keymaps/333fred/keymap.c @@ -10,16 +10,8 @@ extern keymap_config_t keymap_config; // entirely and just use numbers. #define _QWERTY 0 #define _LOWER 1 -#define _RAISE 2 -#define _VIM 3 -#define _ADJUST 16 - -enum custom_keycodes { - QWERTY = SAFE_RANGE, - LOWER, - RAISE, - ADJUST, -}; +#define _VIM 2 +#define _GAME 3 enum custom_macros { DLEFT, @@ -43,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| Z | X | C | V | B | N | M | , | . |/ Ctrl| Shift| * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | Alt | F4 | GUI |Lower | Bksp | Spc | Ent | Raise| + | Up | Del | + * | Ctrl | Alt | F4 | GUI |Lower | Bksp | Spc | Ent | Alt | + | Game | Del | * `-----------------------------------------------------------------------------------' */ [_QWERTY] = KEYMAP( \ @@ -51,7 +43,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH, \ KC_ESC, KC_A, KC_S, KC_D, LT(_VIM, KC_F), KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ OSM(MOD_LSFT), LCTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RCTL_T(KC_SLSH), OSM(MOD_RSFT), \ - KC_LCTL, KC_LALT, KC_F4, KC_LGUI, OSL(_LOWER), KC_BSPC, KC_SPC, KC_ENT, RAISE, KC_PLUS, KC_UP, KC_DEL \ + KC_LCTL, KC_LALT, KC_F4, KC_LGUI, OSL(_LOWER), KC_BSPC, KC_SPC, KC_ENT, KC_RALT, KC_PLUS, TG(_GAME), KC_DEL \ ), /* Lower @@ -75,49 +67,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_PSCR, _______, _______, _______, _______, _______, KC_0, KC_DOT, KC_EQL, KC_MPRV, KC_MNXT, KC_MPLY \ ), -/* Raise - * ,-----------------------------------------------------------------------------------. - * | ~ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F0 | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Del | F1 | F2 | { | } | F5 | F6 | - | = | [ | ] | \ | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------------------------------------------------' - */ -[_RAISE] = KEYMAP( \ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ - KC_DEL, KC_F1, KC_F2, KC_LCBR, KC_RBRC, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MPLY \ -), - -/* Adjust (Lower + Raise) - * ,-----------------------------------------------------------------------------------. - * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | Reset| | | | | | | | | | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ -[_ADJUST] = KEYMAP( \ - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ - _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ - _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ -), - -/* Adjust (Lower + Raise) +/* Vim Movement (Hold down F) * ,-----------------------------------------------------------------------------------. * | | | | | | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -136,64 +86,37 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, M(DLEFT), M(DRIGHT), KC_LCTL, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, KC_LSFT, _______, _______, _______, _______, _______, _______, _______ \ +), + +/* Gaming mode (Raise) + * All one-shot mods are disabled on this layer + * ,-----------------------------------------------------------------------------------. + * | ESC | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | CTRL | | | | F | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Enter| | | | Alt | Spc | Left | Up | Down | Right| | | + * `-----------------------------------------------------------------------------------' + */ +[_GAME] = KEYMAP( \ + KC_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_LCTL, _______, _______, _______, KC_F, _______, _______, _______, _______, _______, _______, _______, \ + KC_LSFT, KC_Z, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_ENT, _______, _______, _______, KC_LALT, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______ \ ) }; -#ifdef AUDIO_ENABLE -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -float tone_dvorak[][2] = SONG(DVORAK_SOUND); -float tone_colemak[][2] = SONG(COLEMAK_SOUND); -#endif - void persistent_default_layer_set(uint16_t default_layer) { eeconfig_update_default_layer(default_layer); default_layer_set(default_layer); } -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); - #endif - persistent_default_layer_set(1UL<<_QWERTY); - } - return false; - break; - case LOWER: - if (record->event.pressed) { - layer_on(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case ADJUST: - if (record->event.pressed) { - layer_on(_ADJUST); - } else { - layer_off(_ADJUST); - } - return false; - break; - } - return true; -} - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { switch(id) { case DLEFT: From 8cb413b6b708ecafbccf553876cac51d5f999588 Mon Sep 17 00:00:00 2001 From: Fredric Silberberg Date: Sat, 5 Aug 2017 15:40:19 -0700 Subject: [PATCH 06/37] Updated licensing --- keyboards/nyquist/keymaps/333fred/config.h | 25 ---------------------- keyboards/nyquist/keymaps/333fred/keymap.c | 4 ---- 2 files changed, 29 deletions(-) diff --git a/keyboards/nyquist/keymaps/333fred/config.h b/keyboards/nyquist/keymaps/333fred/config.h index 92096eba2ed..86fe5216542 100644 --- a/keyboards/nyquist/keymaps/333fred/config.h +++ b/keyboards/nyquist/keymaps/333fred/config.h @@ -1,35 +1,10 @@ -/* -Copyright 2017 Danny Nguyen - -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 . -*/ - #ifndef CONFIG_USER_H #define CONFIG_USER_H #include "../../config.h" -/* Use I2C or Serial, not both */ - #define USE_SERIAL -// #define USE_I2C - -/* Select hand configuration */ - #define MASTER_LEFT -// #define _MASTER_RIGHT -// #define EE_HANDS #undef TAPPING_TERM #define TAPPING_TERM 150 diff --git a/keyboards/nyquist/keymaps/333fred/keymap.c b/keyboards/nyquist/keymaps/333fred/keymap.c index d3a347803e2..a2bb74ca2d8 100644 --- a/keyboards/nyquist/keymaps/333fred/keymap.c +++ b/keyboards/nyquist/keymaps/333fred/keymap.c @@ -4,10 +4,6 @@ extern keymap_config_t keymap_config; -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. #define _QWERTY 0 #define _LOWER 1 #define _VIM 2 From 7a9fb7c96b876cf0d6c44c4649d3504572e56fa3 Mon Sep 17 00:00:00 2001 From: Fredric Silberberg Date: Sat, 5 Aug 2017 16:16:38 -0700 Subject: [PATCH 07/37] Added readme, fixed eql vs plus --- keyboards/nyquist/keymaps/333fred/README.md | 76 +++++++++++++++++++++ keyboards/nyquist/keymaps/333fred/keymap.c | 10 +-- 2 files changed, 81 insertions(+), 5 deletions(-) create mode 100644 keyboards/nyquist/keymaps/333fred/README.md diff --git a/keyboards/nyquist/keymaps/333fred/README.md b/keyboards/nyquist/keymaps/333fred/README.md new file mode 100644 index 00000000000..a25f9fcece7 --- /dev/null +++ b/keyboards/nyquist/keymaps/333fred/README.md @@ -0,0 +1,76 @@ +# 333fred's Nyquist Layout + +This nyquist layout is based on my Ergodox Infinity Layout, which is [here](../../../ergodox/keymaps/333fred/README.md). It doesn't have all of my VS extensions, as I have my nyquist at home, not at work. + +## Layers + +### QWERTY +The shift modifiers on this layer all use OSM to allow for quick single capitalization. Press and hold F to go to the VIM movement layer. Layer is also a one-shot layer toggle, and can be held down to type multiple characters on the Lower layer. Game is a regular toggle layer. + +``` +Qwerty +,-----------------------------------------------------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Tab | Q | W | E | R | T | Y | U | I | O | P | \ | +|------+------+------+------+------+-------------+------+------+------+------+------| +| Esc | A | S | D |LTVIMF| G | H | J | K | L | ; | " | +|------+------+------+------+------+------|------+------+------+------+------+------| +| Shift| Z | X | C | V | B | N | M | , | . |/ Ctrl| Shift| +|------+------+------+------+------+------+------+------+------+------+------+------| +| Ctrl | Alt | F4 | GUI |Lower | Bksp | Spc | Ent | Alt | = | Game | Del r +`-----------------------------------------------------------------------------------' +``` + +### Lower +My symbol and numpad layer. APscr is a macro that sends ALT+PRSC, to take a screenshot of the current application. + +``` +Lower +,-----------------------------------------------------------------------------------. +| Caps | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | +|------+------+------+------+------+-------------+------+------+------+------+------| +| | ! | @ | ( | ) | | | 7 | 8 | 9 | * | ) | F12 | +|------+------+------+------+------+-------------+------+------+------+------+------| +| | # | $ | { | } | ` | 4 | 5 | 6 | + | } | | | +|------+------+------+------+------+------|------+------+------+------+------+------| +| APscr| % | ^ | [ | ] | ~ | 1 | 2 | 3 | \ | Vol- | Vol+ | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Pscr | | | | | | 0 | . | = | Prev | Next | Play | +`-----------------------------------------------------------------------------------' +``` + +### VIM Movement +Pressing and holding F moves to this layer, which turns hjkl into vim movement keys. a and d are macros which send WIN+Left and WIN+Right, respectively. Shift and CTRL have been remapped for ease of selecting text. +``` +Vim Movement (Hold down F) +,-----------------------------------------------------------------------------------. +| | | | | | | | | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | DLeft|DRight| LCTRL| | | Left | Down | Up | Right| | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | LShft| | | | | | | | +`-----------------------------------------------------------------------------------' + ``` + +### Gaming +This layer is designed for playing games. All one-shot modification has been turned off, and the common game controls keys have been moved around for easier access. +``` +Gaming mode (Raise) +All one-shot mods are disabled on this layer +,-----------------------------------------------------------------------------------. +| ESC | | | | | | | | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| CTRL | | | | F | | | | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Shift| Z | | | | | | | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Enter| | | | Alt | Spc | Left | Up | Down | Right| | | +`-----------------------------------------------------------------------------------' +``` diff --git a/keyboards/nyquist/keymaps/333fred/keymap.c b/keyboards/nyquist/keymaps/333fred/keymap.c index a2bb74ca2d8..07434d93fa4 100644 --- a/keyboards/nyquist/keymaps/333fred/keymap.c +++ b/keyboards/nyquist/keymaps/333fred/keymap.c @@ -35,11 +35,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_QWERTY] = KEYMAP( \ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH, \ - KC_ESC, KC_A, KC_S, KC_D, LT(_VIM, KC_F), KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ - OSM(MOD_LSFT), LCTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RCTL_T(KC_SLSH), OSM(MOD_RSFT), \ - KC_LCTL, KC_LALT, KC_F4, KC_LGUI, OSL(_LOWER), KC_BSPC, KC_SPC, KC_ENT, KC_RALT, KC_PLUS, TG(_GAME), KC_DEL \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH, \ + KC_ESC, KC_A, KC_S, KC_D, LT(_VIM, KC_F), KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + OSM(MOD_LSFT), LCTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RCTL_T(KC_SLSH), OSM(MOD_RSFT), \ + KC_LCTL, KC_LALT, KC_F4, KC_LGUI, OSL(_LOWER), KC_BSPC, KC_SPC, KC_ENT, KC_RALT, KC_EQL, TG(_GAME), KC_DEL \ ), /* Lower From 8e1be7c792c4c9f65ba7e990f2a773a23b40d20c Mon Sep 17 00:00:00 2001 From: Fredric Silberberg Date: Sun, 6 Aug 2017 01:50:20 -0700 Subject: [PATCH 08/37] Initial implementation of the key_lock feature. --- common_features.mk | 7 +- keyboards/nyquist/keymaps/333fred/Makefile | 2 + keyboards/nyquist/keymaps/333fred/keymap.c | 2 +- quantum/process_keycode/process_key_lock.c | 120 +++++++++++++++++++++ quantum/process_keycode/process_key_lock.h | 24 +++++ quantum/quantum.c | 4 + quantum/quantum.h | 4 + quantum/quantum_keycodes.h | 4 + 8 files changed, 165 insertions(+), 2 deletions(-) create mode 100644 quantum/process_keycode/process_key_lock.c create mode 100644 quantum/process_keycode/process_key_lock.h diff --git a/common_features.mk b/common_features.mk index 0adf81afac4..f405d5c07b9 100644 --- a/common_features.mk +++ b/common_features.mk @@ -104,6 +104,11 @@ ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) SRC += $(QUANTUM_DIR)/process_keycode/process_tap_dance.c endif +ifeq ($(strip $(KEY_LOCK_ENABLE)), yes) + OPT_DEFS += -DKEY_LOCK_ENABLE + SRC += $(QUANTUM_DIR)/process_keycode/process_key_lock.c +endif + ifeq ($(strip $(PRINTING_ENABLE)), yes) OPT_DEFS += -DPRINTING_ENABLE SRC += $(QUANTUM_DIR)/process_keycode/process_printer.c @@ -156,4 +161,4 @@ QUANTUM_SRC:= \ ifndef CUSTOM_MATRIX QUANTUM_SRC += $(QUANTUM_DIR)/matrix.c -endif \ No newline at end of file +endif diff --git a/keyboards/nyquist/keymaps/333fred/Makefile b/keyboards/nyquist/keymaps/333fred/Makefile index 457a3d01d4a..471eac8b5e6 100644 --- a/keyboards/nyquist/keymaps/333fred/Makefile +++ b/keyboards/nyquist/keymaps/333fred/Makefile @@ -1,3 +1,5 @@ +KEY_LOCK_ENABLE = yes + ifndef QUANTUM_DIR include ../../../../Makefile endif diff --git a/keyboards/nyquist/keymaps/333fred/keymap.c b/keyboards/nyquist/keymaps/333fred/keymap.c index 07434d93fa4..20bf2988760 100644 --- a/keyboards/nyquist/keymaps/333fred/keymap.c +++ b/keyboards/nyquist/keymaps/333fred/keymap.c @@ -39,7 +39,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH, \ KC_ESC, KC_A, KC_S, KC_D, LT(_VIM, KC_F), KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ OSM(MOD_LSFT), LCTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RCTL_T(KC_SLSH), OSM(MOD_RSFT), \ - KC_LCTL, KC_LALT, KC_F4, KC_LGUI, OSL(_LOWER), KC_BSPC, KC_SPC, KC_ENT, KC_RALT, KC_EQL, TG(_GAME), KC_DEL \ + KC_LCTL, KC_LALT, KC_F4, KC_LGUI, OSL(_LOWER), KC_BSPC, KC_SPC, KC_ENT, KC_LOCK, KC_EQL, TG(_GAME), KC_DEL \ ), /* Lower diff --git a/quantum/process_keycode/process_key_lock.c b/quantum/process_keycode/process_key_lock.c new file mode 100644 index 00000000000..60b0fcd9b15 --- /dev/null +++ b/quantum/process_keycode/process_key_lock.c @@ -0,0 +1,120 @@ +/* Copyright 2017 Fredric Silberberg + * + * 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 "inttypes.h" +#include "stdint.h" +#include "process_key_lock.h" + +#define SHIFT(shift) (((uint64_t)1) << (shift)) +#define GET_KEY_ARRAY(code) (((code) < 0x40) ? key_state[0] : \ + ((code) < 0x80) ? key_state[1] : \ + ((code) < 0xC0) ? key_state[2] : key_state[3]) +#define GET_CODE_INDEX(code) (((code) < 0x40) ? (code) : \ + ((code) < 0x80) ? (code) - 0x40 : \ + ((code) < 0xC0) ? (code) - 0x80 : (code) - 0xC0) +#define KEY_STATE(code) (GET_KEY_ARRAY(code) & SHIFT(GET_CODE_INDEX(code))) == SHIFT(GET_CODE_INDEX(code)) +#define SET_KEY_ARRAY_STATE(code, val) do { \ + switch (code) { \ + case 0x00 ... 0x3F: \ + key_state[0] = (val); \ + break; \ + case 0x40 ... 0x7F: \ + key_state[1] = (val); \ + break; \ + case 0x80 ... 0xBF: \ + key_state[2] = (val); \ + break; \ + case 0xC0 ... 0xFF: \ + key_state[3] = (val); \ + break; \ + } \ +} while(0) +#define SET_KEY_STATE(code) SET_KEY_ARRAY_STATE(code, (GET_KEY_ARRAY(code) | SHIFT(GET_CODE_INDEX(code)))) +#define UNSET_KEY_STATE(code) SET_KEY_ARRAY_STATE(code, (GET_KEY_ARRAY(code)) & ~(SHIFT(GET_CODE_INDEX(code)))) +#define IS_STANDARD_KEYCODE(code) ((code) <= 0xFF) +#define print_hex64(num) do { print_hex32((num & 0xFFFFFFFF00000000) >> 32); print_hex32(num & 0x00000000FFFFFFFF); } while (0) + +// Locked key state. This is an array of 256 bits, one for each of the standard keys supported qmk. +uint64_t key_state[4] = { 0x0, 0x0, 0x0, 0x0 }; +bool watching = false; + +bool process_key_lock(uint16_t keycode, keyrecord_t *record) { + // We start by categorizing the keypress event. In the event of a down + // event, there are several possibilities: + // 1. The key is not being locked, and we are not watching for new keys. + // In this case, we bail immediately. This is the common case for down events. + // 2. The key was locked, and we need to unlock it. In this case, we will + // reset the state in our map and return false. When the user releases the + // key, the up event will no longer be masked and the OS will observe the + // released key. + // 3. KC_LOCK was just pressed. In this case, we set up the state machine + // to watch for the next key down event, and finish processing + // 4. The keycode is below 0xFF, and we are watching for new keys. In this case, + // we will send the key down event to the os, and set the key_state for that + // key to mask the up event. + // 5. The keycode is above 0xFF, and we're wathing for new keys. In this case, + // the user pressed a key that we cannot "lock", as it's a series of keys, + // or a macro invocation, or a layer transition, or a custom-defined key, or + // or some other arbitrary code. In this case, we bail immediately, reset + // our watch state, and return true. + // + // In the event of an up event, there are these possibilities: + // 1. The key is not being locked. In this case, we return true and bail + // immediately. This is the common case. + // 2. The key is being locked. In this case, we will mask the up event + // by returning false, so the OS never sees that the key was released + // until the user pressed the key again. + if (record->event.pressed) { + // Non-standard keycode, reset and return + if (!(IS_STANDARD_KEYCODE(keycode) || keycode == KC_LOCK)) { + watching = false; + return true; + } + + // If we're already watching, turn off the watch. + if (keycode == KC_LOCK) { + watching = !watching; + return false; + } + + if (IS_STANDARD_KEYCODE(keycode)) { + // We check watching first. This is so that in the following scenario, we continue to + // hold the key: KC_LOCK, KC_F, KC_LOCK, KC_F + // If we checked in reverse order, we'd end up holding the key pressed after the second + // KC_F press is registered, when the user likely meant to hold F + if (watching) { + watching = false; + SET_KEY_STATE(keycode); + // Let the standard keymap send the keycode down event. The up event will be masked. + return true; + } + + if (KEY_STATE(keycode)) { + UNSET_KEY_STATE(keycode); + // The key is already held, stop this process. The up event will be sent when the user + // releases the key. + return false; + } + } + + // Either the key isn't a standard key, or we need to send the down event. Continue standard + // processing + return true; + } else { + // Stop processing if it's a standard key and we're masking up. + return !(IS_STANDARD_KEYCODE(keycode) && KEY_STATE(keycode)); + } +} diff --git a/quantum/process_keycode/process_key_lock.h b/quantum/process_keycode/process_key_lock.h new file mode 100644 index 00000000000..237e103bcdb --- /dev/null +++ b/quantum/process_keycode/process_key_lock.h @@ -0,0 +1,24 @@ +/* Copyright 2017 Fredric Silberberg + * + * 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 . + */ + +#ifndef PROCESS_KEY_LOCK_H +#define PROCESS_KEY_LOCK_H + +#include "quantum.h" + +bool process_key_lock(uint16_t keycode, keyrecord_t *record); + +#endif // PROCESS_KEY_LOCK_H diff --git a/quantum/quantum.c b/quantum/quantum.c index 1f8ce6c46f5..c71a97bf283 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -193,6 +193,10 @@ bool process_record_quantum(keyrecord_t *record) { // } if (!( + #if defined(KEY_LOCK_ENABLE) + // Must run first to be able to mask key_up events. + process_key_lock(keycode, record) && + #endif process_record_kb(keycode, record) && #if defined(MIDI_ENABLE) && defined(MIDI_ADVANCED) process_midi(keycode, record) && diff --git a/quantum/quantum.h b/quantum/quantum.h index 453cb43f88a..9a6d691a155 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -99,6 +99,10 @@ extern uint32_t default_layer_state; #include "process_combo.h" #endif +#ifdef KEY_LOCK_ENABLE + #include "process_key_lock.h" +#endif + #define SEND_STRING(str) send_string(PSTR(str)) extern const bool ascii_to_shift_lut[0x80]; extern const uint8_t ascii_to_keycode_lut[0x80]; diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index acdb9248d60..1bb6706ba4c 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -419,6 +419,10 @@ enum quantum_keycodes { OUT_BT, #endif +#ifdef KEY_LOCK_ENABLE + KC_LOCK, +#endif + // always leave at the end SAFE_RANGE }; From 5fc4a664dc0be3f380aba9480b710b9047f29fad Mon Sep 17 00:00:00 2001 From: Fredric Silberberg Date: Sun, 6 Aug 2017 02:09:34 -0700 Subject: [PATCH 09/37] Added initial key lock documentation. --- docs/_summary.md | 1 + docs/key_lock.md | 11 +++++++++++ docs/make_instructions.md | 4 ++++ docs/quantum_keycodes.md | 1 + 4 files changed, 17 insertions(+) create mode 100644 docs/key_lock.md diff --git a/docs/_summary.md b/docs/_summary.md index 723377de982..0f65de0ddec 100644 --- a/docs/_summary.md +++ b/docs/_summary.md @@ -17,6 +17,7 @@ * [Mouse keys](mouse_keys.md) * [Unicode](unicode.md) * [Stenography](stenography.md) + * [Key Lock](key_lock.md) * Reference * [Glossary](glossary.md) diff --git a/docs/key_lock.md b/docs/key_lock.md new file mode 100644 index 00000000000..03cea208907 --- /dev/null +++ b/docs/key_lock.md @@ -0,0 +1,11 @@ +## Key Lock: Holding down keys for you + +Sometimes, you need to hold down a specific key for a long period of time. Whether this is while typing in ALL CAPS, or playing a video game that hasn't implemented auto-run, Key Lock is here to help. Key Lock adds a new keycode, `KC_LOCK`, that will hold down the next key you hit for you. The key is released when you hit it again. Here's an example: let's say you need to type in all caps for a few sentences. You hit KC_LOCK, and then shift. Now, shift will be considered held until you hit it again. You can think of key lock as caps lock, but supercharged. + +Here's how to use it: + +1. Pick a key on your keyboard. This will be the key lock key. Assign it the keycode `KC_LOCK`. This will be a single-action key: you won't be able to use it for anything else. +2. Enable key lock by including `KEY_LOCK_ENABLE = yes` in your Makefile. +3. That's it! + +Important: switching layers does not cancel the key lock. Additionally, key lock is only able to hold standard action keys. This does not include any of the QMK special functions, or shifted versions of keys such as KC_LPRN. If it's in the [basic_keycodes](basic_keycodes.md) list, it can be held. If it's not, then it can't be. diff --git a/docs/make_instructions.md b/docs/make_instructions.md index 64c1cb0f000..299c5785b27 100644 --- a/docs/make_instructions.md +++ b/docs/make_instructions.md @@ -158,6 +158,10 @@ This enables using the Quantum SYSEX API to send strings (somewhere?) This consumes about 5390 bytes. +`KEY_LOCK_ENABLE` + +This enables [key lock](key_lock.md). This consumes an additional 260 bytes. + ## Customizing Makefile options on a per-keymap basis If your keymap directory has a file called `Makefile` (note the filename), any Makefile options you set in that file will take precedence over other Makefile options for your particular keyboard. diff --git a/docs/quantum_keycodes.md b/docs/quantum_keycodes.md index 36dbda7a9c2..f13801ef592 100644 --- a/docs/quantum_keycodes.md +++ b/docs/quantum_keycodes.md @@ -17,6 +17,7 @@ On this page we have documented keycodes between `0x00FF` and `0xFFFF` which are |`FUNC(n)`/`F(n)`|Call `fn_action(n)`| |`M(n)`|to call macro n| |`MACROTAP(n)`|to macro-tap n idk FIXME| +|`KC_LOCK`|The [lock key](key_lock.md)| ## Bootmagic Keycodes From 7935f563e9d078e0f9530576cdccc6cef294345f Mon Sep 17 00:00:00 2001 From: Fredric Silberberg Date: Sun, 6 Aug 2017 13:00:46 -0700 Subject: [PATCH 10/37] Updated nyquist gaming layout. --- keyboards/nyquist/keymaps/333fred/README.md | 5 ++--- keyboards/nyquist/keymaps/333fred/keymap.c | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/keyboards/nyquist/keymaps/333fred/README.md b/keyboards/nyquist/keymaps/333fred/README.md index a25f9fcece7..96a03ea9b35 100644 --- a/keyboards/nyquist/keymaps/333fred/README.md +++ b/keyboards/nyquist/keymaps/333fred/README.md @@ -18,7 +18,7 @@ Qwerty |------+------+------+------+------+------|------+------+------+------+------+------| | Shift| Z | X | C | V | B | N | M | , | . |/ Ctrl| Shift| |------+------+------+------+------+------+------+------+------+------+------+------| -| Ctrl | Alt | F4 | GUI |Lower | Bksp | Spc | Ent | Alt | = | Game | Del r +| Ctrl | Alt | F4 | GUI |Lower | Bksp | Spc | Ent | Lock | = | Game | Del | `-----------------------------------------------------------------------------------' ``` @@ -61,7 +61,6 @@ Vim Movement (Hold down F) This layer is designed for playing games. All one-shot modification has been turned off, and the common game controls keys have been moved around for easier access. ``` Gaming mode (Raise) -All one-shot mods are disabled on this layer ,-----------------------------------------------------------------------------------. | ESC | | | | | | | | | | | | |------+------+------+------+------+------+------+------+------+------+------+------| @@ -71,6 +70,6 @@ All one-shot mods are disabled on this layer |------+------+------+------+------+------+------+------+------+------+------+------| | Shift| Z | | | | | | | | | | | |------+------+------+------+------+------+------+------+------+------+------+------| -| Enter| | | | Alt | Spc | Left | Up | Down | Right| | | +| Enter| | Lock | | Alt | Spc | Left | Up | Down | Right| | | `-----------------------------------------------------------------------------------' ``` diff --git a/keyboards/nyquist/keymaps/333fred/keymap.c b/keyboards/nyquist/keymaps/333fred/keymap.c index 20bf2988760..5d68a2de251 100644 --- a/keyboards/nyquist/keymaps/333fred/keymap.c +++ b/keyboards/nyquist/keymaps/333fred/keymap.c @@ -95,7 +95,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+------+------+------+------+------| * | Shift| Z | | | | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Enter| | | | Alt | Spc | Left | Up | Down | Right| | | + * | Enter| | Lock | | Alt | Spc | Left | Up | Down | Right| | | * `-----------------------------------------------------------------------------------' */ [_GAME] = KEYMAP( \ @@ -103,7 +103,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ KC_LCTL, _______, _______, _______, KC_F, _______, _______, _______, _______, _______, _______, _______, \ KC_LSFT, KC_Z, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - KC_ENT, _______, _______, _______, KC_LALT, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______ \ + KC_ENT, _______, KC_LOCK, _______, KC_LALT, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______ \ ) }; From bc59e093ec8535bb23e60ffcc0df4c23e042f052 Mon Sep 17 00:00:00 2001 From: Fredric Silberberg Date: Sun, 6 Aug 2017 13:09:16 -0700 Subject: [PATCH 11/37] Updated ergodox profile --- keyboards/ergodox/keymaps/333fred/Makefile | 2 +- keyboards/ergodox/keymaps/333fred/keymap.c | 25 +++++++--------------- 2 files changed, 9 insertions(+), 18 deletions(-) diff --git a/keyboards/ergodox/keymaps/333fred/Makefile b/keyboards/ergodox/keymaps/333fred/Makefile index 17f736458c6..2992054341a 100644 --- a/keyboards/ergodox/keymaps/333fred/Makefile +++ b/keyboards/ergodox/keymaps/333fred/Makefile @@ -3,7 +3,7 @@ LCD_BACKLIGHT_ENABLE = yes LCD_ENABLE = yes BACKLIGHT_ENABLE = yes NKRO_ENABLE = yes -TAP_DANCE_ENABLE = yes +KEY_LOCK_ENABLE = yes ifndef QUANTUM_DIR include ../../../../Makefile diff --git a/keyboards/ergodox/keymaps/333fred/keymap.c b/keyboards/ergodox/keymaps/333fred/keymap.c index e3f95132d3c..c1722c12262 100644 --- a/keyboards/ergodox/keymaps/333fred/keymap.c +++ b/keyboards/ergodox/keymaps/333fred/keymap.c @@ -40,15 +40,6 @@ enum custom_macros { KEEPASS_TYPE, }; -// Tap Dance Definitions -enum tap_dance_custom_keys { - TD_SEMICOLON_COLON = 0 -}; - -qk_tap_dance_action_t tap_dance_actions[] = { - [TD_SEMICOLON_COLON] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, KC_COLON) -}; - // NOTE: Cells marked with ACCESS must remain transparent, they're the keys that actually get to that layer const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -59,14 +50,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * | TAB | Q | W | E | R | T | L2 | | L2 | Y | U | I | O | P | \ | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | Esc | A | S | D |LT 3,F| G |------| |------| H | J | K | L |; / : | ' | + * | Esc | A | S | D |LT 3,F| G |------| |------| H | J | K | L | ; | ' | * |--------+------+------+------+------+------| L1 | |MO(3) |------+------+------+------+------+--------| * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * |LCTRL | F4 | F5 | LGUI | LALT | | Left | Down | Up | Right| RGUI | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. - * | Copy | Paste| | Alt |Ctrl/Esc| + * | Copy | Paste| | Alt | Lock | * ,------|------|------| |------+--------+------. * | | | PgUp | | PgDn | | | * | Bcksp|OSL(2)|------| |------| Ent |Space | @@ -86,12 +77,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_PGUP, KC_BSPC,OSL(SYMB), KC_DEL, // right hand - TG(CODE), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, - KC_H, KC_J, KC_K, KC_L, TD(TD_SEMICOLON_COLON),KC_QUOT, - MO(MDIA), KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), OSM(MOD_RSFT), - KC_LEFT,KC_DOWN,KC_UP, KC_RIGHT, KC_RGUI, - KC_RALT, CTL_T(KC_ESC), + TG(CODE), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + MO(MDIA), KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), OSM(MOD_RSFT), + KC_LEFT,KC_DOWN,KC_UP, KC_RIGHT, KC_RGUI, + KC_RALT, KC_LOCK, KC_PGDN, KC_RCTL, KC_ENT, KC_SPC ), From 916c4d799d277fe5ddf68d5f8426f89cd6f90b93 Mon Sep 17 00:00:00 2001 From: Fredric Silberberg Date: Sun, 6 Aug 2017 13:18:06 -0700 Subject: [PATCH 12/37] Added NKRO to nyquist layout. --- keyboards/nyquist/keymaps/333fred/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/keyboards/nyquist/keymaps/333fred/Makefile b/keyboards/nyquist/keymaps/333fred/Makefile index 471eac8b5e6..576bb3c30e1 100644 --- a/keyboards/nyquist/keymaps/333fred/Makefile +++ b/keyboards/nyquist/keymaps/333fred/Makefile @@ -1,4 +1,5 @@ KEY_LOCK_ENABLE = yes +NKRO_ENABLE = yes ifndef QUANTUM_DIR include ../../../../Makefile From 02f405708bb3a486224b857feb1f03f883f55ffe Mon Sep 17 00:00:00 2001 From: Fredric Silberberg Date: Sun, 6 Aug 2017 13:22:26 -0700 Subject: [PATCH 13/37] Remove hex print code. --- quantum/process_keycode/process_key_lock.c | 1 - 1 file changed, 1 deletion(-) diff --git a/quantum/process_keycode/process_key_lock.c b/quantum/process_keycode/process_key_lock.c index 60b0fcd9b15..e3632b74fb1 100644 --- a/quantum/process_keycode/process_key_lock.c +++ b/quantum/process_keycode/process_key_lock.c @@ -45,7 +45,6 @@ #define SET_KEY_STATE(code) SET_KEY_ARRAY_STATE(code, (GET_KEY_ARRAY(code) | SHIFT(GET_CODE_INDEX(code)))) #define UNSET_KEY_STATE(code) SET_KEY_ARRAY_STATE(code, (GET_KEY_ARRAY(code)) & ~(SHIFT(GET_CODE_INDEX(code)))) #define IS_STANDARD_KEYCODE(code) ((code) <= 0xFF) -#define print_hex64(num) do { print_hex32((num & 0xFFFFFFFF00000000) >> 32); print_hex32(num & 0x00000000FFFFFFFF); } while (0) // Locked key state. This is an array of 256 bits, one for each of the standard keys supported qmk. uint64_t key_state[4] = { 0x0, 0x0, 0x0, 0x0 }; From a3e1d9a8cc8b3d376d52f86aacae6315b15efebf Mon Sep 17 00:00:00 2001 From: Fredric Silberberg Date: Sun, 6 Aug 2017 14:14:27 -0700 Subject: [PATCH 14/37] Added support for locking One Shot modifiers. --- docs/key_lock.md | 2 +- keyboards/nyquist/keymaps/333fred/Makefile | 1 + quantum/process_keycode/process_key_lock.c | 41 ++++++++++++++++------ quantum/process_keycode/process_key_lock.h | 2 +- quantum/quantum.c | 2 +- 5 files changed, 34 insertions(+), 14 deletions(-) diff --git a/docs/key_lock.md b/docs/key_lock.md index 03cea208907..e424061a9a6 100644 --- a/docs/key_lock.md +++ b/docs/key_lock.md @@ -8,4 +8,4 @@ Here's how to use it: 2. Enable key lock by including `KEY_LOCK_ENABLE = yes` in your Makefile. 3. That's it! -Important: switching layers does not cancel the key lock. Additionally, key lock is only able to hold standard action keys. This does not include any of the QMK special functions, or shifted versions of keys such as KC_LPRN. If it's in the [basic_keycodes](basic_keycodes.md) list, it can be held. If it's not, then it can't be. +Important: switching layers does not cancel the key lock. Additionally, key lock is only able to hold standard action keys and One Shot modifier keys (for example, if you have your shift defined as `OSM(KC_LSFT)`; see [One Shot Keys](quantum_keycodes.md#one-shot-keys)). This does not include any of the QMK special functions (except One Shot modifiers), or shifted versions of keys such as KC_LPRN. If it's in the [basic_keycodes](basic_keycodes.md) list, it can be held. If it's not, then it can't be. diff --git a/keyboards/nyquist/keymaps/333fred/Makefile b/keyboards/nyquist/keymaps/333fred/Makefile index 576bb3c30e1..f8544328074 100644 --- a/keyboards/nyquist/keymaps/333fred/Makefile +++ b/keyboards/nyquist/keymaps/333fred/Makefile @@ -1,5 +1,6 @@ KEY_LOCK_ENABLE = yes NKRO_ENABLE = yes +CONSOLE_ENABLE = yes ifndef QUANTUM_DIR include ../../../../Makefile diff --git a/quantum/process_keycode/process_key_lock.c b/quantum/process_keycode/process_key_lock.c index e3632b74fb1..b1ba397a026 100644 --- a/quantum/process_keycode/process_key_lock.c +++ b/quantum/process_keycode/process_key_lock.c @@ -50,7 +50,16 @@ uint64_t key_state[4] = { 0x0, 0x0, 0x0, 0x0 }; bool watching = false; -bool process_key_lock(uint16_t keycode, keyrecord_t *record) { +// Translate any OSM keycodes back to their unmasked versions. +uint16_t inline translate_keycode(uint16_t keycode) { + if (keycode > QK_ONE_SHOT_MOD && keycode <= QK_ONE_SHOT_MOD_MAX) { + return keycode ^ QK_ONE_SHOT_MOD; + } else { + return keycode; + } +} + +bool process_key_lock(uint16_t *keycode, keyrecord_t *record) { // We start by categorizing the keypress event. In the event of a down // event, there are several possibilities: // 1. The key is not being locked, and we are not watching for new keys. @@ -76,44 +85,54 @@ bool process_key_lock(uint16_t keycode, keyrecord_t *record) { // 2. The key is being locked. In this case, we will mask the up event // by returning false, so the OS never sees that the key was released // until the user pressed the key again. + + // We translate any OSM keycodes back to their original keycodes, so that if the key being + // one-shot modded is a standard keycode, we can handle it. This is the only set of special + // keys that we handle + uint16_t translated_keycode = translate_keycode(*keycode); + if (record->event.pressed) { // Non-standard keycode, reset and return - if (!(IS_STANDARD_KEYCODE(keycode) || keycode == KC_LOCK)) { + if (!(IS_STANDARD_KEYCODE(translated_keycode) || translated_keycode == KC_LOCK)) { watching = false; return true; } // If we're already watching, turn off the watch. - if (keycode == KC_LOCK) { + if (translated_keycode == KC_LOCK) { watching = !watching; return false; } - - if (IS_STANDARD_KEYCODE(keycode)) { + + if (IS_STANDARD_KEYCODE(translated_keycode)) { // We check watching first. This is so that in the following scenario, we continue to // hold the key: KC_LOCK, KC_F, KC_LOCK, KC_F // If we checked in reverse order, we'd end up holding the key pressed after the second // KC_F press is registered, when the user likely meant to hold F if (watching) { watching = false; - SET_KEY_STATE(keycode); + SET_KEY_STATE(translated_keycode); + // We need to set the keycode passed in to be the translated keycode, in case we + // translated a OSM back to the original keycode. + *keycode = translated_keycode; // Let the standard keymap send the keycode down event. The up event will be masked. return true; } - - if (KEY_STATE(keycode)) { - UNSET_KEY_STATE(keycode); + + if (KEY_STATE(translated_keycode)) { + UNSET_KEY_STATE(translated_keycode); // The key is already held, stop this process. The up event will be sent when the user // releases the key. return false; } } - + // Either the key isn't a standard key, or we need to send the down event. Continue standard // processing return true; } else { // Stop processing if it's a standard key and we're masking up. - return !(IS_STANDARD_KEYCODE(keycode) && KEY_STATE(keycode)); + return !(IS_STANDARD_KEYCODE(translated_keycode) && KEY_STATE(translated_keycode)); } } + diff --git a/quantum/process_keycode/process_key_lock.h b/quantum/process_keycode/process_key_lock.h index 237e103bcdb..876db4a324c 100644 --- a/quantum/process_keycode/process_key_lock.h +++ b/quantum/process_keycode/process_key_lock.h @@ -19,6 +19,6 @@ #include "quantum.h" -bool process_key_lock(uint16_t keycode, keyrecord_t *record); +bool process_key_lock(uint16_t *keycode, keyrecord_t *record); #endif // PROCESS_KEY_LOCK_H diff --git a/quantum/quantum.c b/quantum/quantum.c index c71a97bf283..0243a7e0126 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -195,7 +195,7 @@ bool process_record_quantum(keyrecord_t *record) { if (!( #if defined(KEY_LOCK_ENABLE) // Must run first to be able to mask key_up events. - process_key_lock(keycode, record) && + process_key_lock(&keycode, record) && #endif process_record_kb(keycode, record) && #if defined(MIDI_ENABLE) && defined(MIDI_ADVANCED) From e9d755b6f46d76f2697d59f1a56fd3536729a7e7 Mon Sep 17 00:00:00 2001 From: Fredric Silberberg Date: Mon, 7 Aug 2017 22:02:57 -0700 Subject: [PATCH 15/37] Small gaming layer update --- keyboards/nyquist/keymaps/333fred/README.md | 2 +- keyboards/nyquist/keymaps/333fred/keymap.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/keyboards/nyquist/keymaps/333fred/README.md b/keyboards/nyquist/keymaps/333fred/README.md index 96a03ea9b35..f9f7dc02747 100644 --- a/keyboards/nyquist/keymaps/333fred/README.md +++ b/keyboards/nyquist/keymaps/333fred/README.md @@ -70,6 +70,6 @@ Gaming mode (Raise) |------+------+------+------+------+------+------+------+------+------+------+------| | Shift| Z | | | | | | | | | | | |------+------+------+------+------+------+------+------+------+------+------+------| -| Enter| | Lock | | Alt | Spc | Left | Up | Down | Right| | | +| Enter| | Lock | | Alt | Spc | Lower| Left | Up | Down | Right| | `-----------------------------------------------------------------------------------' ``` diff --git a/keyboards/nyquist/keymaps/333fred/keymap.c b/keyboards/nyquist/keymaps/333fred/keymap.c index 5d68a2de251..a2f2e9439ab 100644 --- a/keyboards/nyquist/keymaps/333fred/keymap.c +++ b/keyboards/nyquist/keymaps/333fred/keymap.c @@ -95,15 +95,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+------+------+------+------+------| * | Shift| Z | | | | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Enter| | Lock | | Alt | Spc | Left | Up | Down | Right| | | + * | Enter| | Lock | | Alt | Spc | Lower| Left | Up | Down | Right| | * `-----------------------------------------------------------------------------------' */ [_GAME] = KEYMAP( \ - KC_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - KC_LCTL, _______, _______, _______, KC_F, _______, _______, _______, _______, _______, _______, _______, \ - KC_LSFT, KC_Z, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - KC_ENT, _______, KC_LOCK, _______, KC_LALT, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______ \ + KC_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_LCTL, _______, _______, _______, KC_F, _______, _______, _______, _______, _______, _______, _______, \ + KC_LSFT, KC_Z, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_ENT, _______, KC_LOCK, _______, KC_LALT, OSL(_LOWER), KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______ \ ) }; From 114565fe811f0264acfa52c38f993b37b0add43d Mon Sep 17 00:00:00 2001 From: Fredric Silberberg Date: Mon, 7 Aug 2017 22:05:59 -0700 Subject: [PATCH 16/37] Rename SHIFT macro to BV_64 --- quantum/process_keycode/process_key_lock.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/quantum/process_keycode/process_key_lock.c b/quantum/process_keycode/process_key_lock.c index b1ba397a026..d7978f91c7a 100644 --- a/quantum/process_keycode/process_key_lock.c +++ b/quantum/process_keycode/process_key_lock.c @@ -18,14 +18,14 @@ #include "stdint.h" #include "process_key_lock.h" -#define SHIFT(shift) (((uint64_t)1) << (shift)) +#define BV_64(shift) (((uint64_t)1) << (shift)) #define GET_KEY_ARRAY(code) (((code) < 0x40) ? key_state[0] : \ ((code) < 0x80) ? key_state[1] : \ ((code) < 0xC0) ? key_state[2] : key_state[3]) #define GET_CODE_INDEX(code) (((code) < 0x40) ? (code) : \ ((code) < 0x80) ? (code) - 0x40 : \ ((code) < 0xC0) ? (code) - 0x80 : (code) - 0xC0) -#define KEY_STATE(code) (GET_KEY_ARRAY(code) & SHIFT(GET_CODE_INDEX(code))) == SHIFT(GET_CODE_INDEX(code)) +#define KEY_STATE(code) (GET_KEY_ARRAY(code) & BV_64(GET_CODE_INDEX(code))) == BV_64(GET_CODE_INDEX(code)) #define SET_KEY_ARRAY_STATE(code, val) do { \ switch (code) { \ case 0x00 ... 0x3F: \ @@ -42,8 +42,8 @@ break; \ } \ } while(0) -#define SET_KEY_STATE(code) SET_KEY_ARRAY_STATE(code, (GET_KEY_ARRAY(code) | SHIFT(GET_CODE_INDEX(code)))) -#define UNSET_KEY_STATE(code) SET_KEY_ARRAY_STATE(code, (GET_KEY_ARRAY(code)) & ~(SHIFT(GET_CODE_INDEX(code)))) +#define SET_KEY_STATE(code) SET_KEY_ARRAY_STATE(code, (GET_KEY_ARRAY(code) | BV_64(GET_CODE_INDEX(code)))) +#define UNSET_KEY_STATE(code) SET_KEY_ARRAY_STATE(code, (GET_KEY_ARRAY(code)) & ~(BV_64(GET_CODE_INDEX(code)))) #define IS_STANDARD_KEYCODE(code) ((code) <= 0xFF) // Locked key state. This is an array of 256 bits, one for each of the standard keys supported qmk. From 381506737727ecb5f903ee391dffe51d95281f4b Mon Sep 17 00:00:00 2001 From: Fredric Silberberg Date: Mon, 7 Aug 2017 22:19:13 -0700 Subject: [PATCH 17/37] Fixed gaming layer --- keyboards/nyquist/keymaps/333fred/README.md | 2 +- keyboards/nyquist/keymaps/333fred/keymap.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/keyboards/nyquist/keymaps/333fred/README.md b/keyboards/nyquist/keymaps/333fred/README.md index f9f7dc02747..4276591415d 100644 --- a/keyboards/nyquist/keymaps/333fred/README.md +++ b/keyboards/nyquist/keymaps/333fred/README.md @@ -70,6 +70,6 @@ Gaming mode (Raise) |------+------+------+------+------+------+------+------+------+------+------+------| | Shift| Z | | | | | | | | | | | |------+------+------+------+------+------+------+------+------+------+------+------| -| Enter| | Lock | | Alt | Spc | Lower| Left | Up | Down | Right| | +| Enter| | Lock | | Alt | Spc | Lower| Left | Up | Down | Right|QWERTY| `-----------------------------------------------------------------------------------' ``` diff --git a/keyboards/nyquist/keymaps/333fred/keymap.c b/keyboards/nyquist/keymaps/333fred/keymap.c index a2f2e9439ab..2edfeefe7b5 100644 --- a/keyboards/nyquist/keymaps/333fred/keymap.c +++ b/keyboards/nyquist/keymaps/333fred/keymap.c @@ -95,15 +95,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+------+------+------+------+------| * | Shift| Z | | | | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Enter| | Lock | | Alt | Spc | Lower| Left | Up | Down | Right| | + * | Enter| | Lock | | Alt | Spc | Lower| Left | Up | Down | Right|QWERTY| * `-----------------------------------------------------------------------------------' */ [_GAME] = KEYMAP( \ - KC_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - KC_LCTL, _______, _______, _______, KC_F, _______, _______, _______, _______, _______, _______, _______, \ - KC_LSFT, KC_Z, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - KC_ENT, _______, KC_LOCK, _______, KC_LALT, OSL(_LOWER), KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______ \ + KC_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_LCTL, _______, _______, _______, KC_F, _______, _______, _______, _______, _______, _______, _______, \ + KC_LSFT, KC_Z, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_ENT, _______, KC_LOCK, _______, KC_LALT, KC_SPC, OSL(_LOWER), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, TO(_QWERTY) \ ) }; From f1536a3f547a48a0b244be122937c3329dfd31e0 Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Fri, 4 Aug 2017 13:52:08 -0400 Subject: [PATCH 18/37] Change installation of avr-libc to avr-gcc, now that avr-libc is integrated into the avr-gcc build --- docs/build_environment_setup.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/build_environment_setup.md b/docs/build_environment_setup.md index 2282e9d1314..d2d63defbd5 100644 --- a/docs/build_environment_setup.md +++ b/docs/build_environment_setup.md @@ -50,10 +50,10 @@ If you have trouble and want to ask for help, it is useful to generate a *Win_Ch If you're using [homebrew,](http://brew.sh/) you can use the following commands: brew tap osx-cross/avr - brew install avr-libc + brew install avr-gcc brew install dfu-programmer -This is the recommended method. If you don't have homebrew, [install it!](http://brew.sh/) It's very much worth it for anyone who works in the command line. Note that the `make` and `make install` portion during the homebrew installation of avr-libc can take over 20 minutes and exhibit high CPU usage. +This is the recommended method. If you don't have homebrew, [install it!](http://brew.sh/) It's very much worth it for anyone who works in the command line. Note that the `make` and `make install` portion during the homebrew installation of avr-gcc can take over 20 minutes and exhibit high CPU usage. You can also try these instructions: From 5210f94a56483c23f5d302e654702d56ca70c206 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Mon, 7 Aug 2017 10:36:23 -0400 Subject: [PATCH 19/37] add version to make output --- tmk_core/rules.mk | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk index b7cb0a559aa..c198f9edbb0 100644 --- a/tmk_core/rules.mk +++ b/tmk_core/rules.mk @@ -237,6 +237,10 @@ sizeafter: $(BUILD_DIR)/$(TARGET).hex # test file sizes eventually # @if [[ $($(SIZE) --target=$(FORMAT) $(TARGET).hex | $(AWK) 'NR==2 {print "0x"$5}') -gt 0x200 ]]; then $(SECHO) "File is too big!"; fi +# Display qmk version information. +qmkversion : + @$(SILENT) || printf "QMK Firmware v$(shell git describe --abbrev=0 --tags 2>/dev/null)\n\n" + # Display compiler version information. gccversion : @$(SILENT) || $(CC) --version @@ -275,7 +279,7 @@ gccversion : $(eval CMD=$(BIN) $< $@ || exit 0) @$(BUILD_CMD) -BEGIN = gccversion sizebefore +BEGIN = qmkversion gccversion sizebefore # Link: create ELF output file from object files. .SECONDARY : $(BUILD_DIR)/$(TARGET).elf @@ -382,7 +386,7 @@ $(eval $(foreach OUTPUT,$(OUTPUTS),$(shell mkdir -p $(OUTPUT) 2>/dev/null))) # Listing of phony targets. -.PHONY : all finish sizebefore sizeafter gccversion \ -build elf hex eep lss sym coff extcoff \ +.PHONY : all finish sizebefore sizeafter qmkversion \ +gccversion build elf hex eep lss sym coff extcoff \ clean clean_list debug gdb-config show_path \ program teensy dfu flip dfu-ee flip-ee dfu-start \ No newline at end of file From 26d348b6d14e38c297c7c752740b5ffae8c6198c Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Tue, 8 Aug 2017 15:26:19 -0400 Subject: [PATCH 20/37] move version info to the top of the output --- Makefile | 3 ++- tmk_core/rules.mk | 6 +----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 5ed757dc29b..6364e0af8b3 100644 --- a/Makefile +++ b/Makefile @@ -390,6 +390,7 @@ endef define BUILD MAKE_VARS += VERBOSE=$(VERBOSE) COLOR=$(COLOR) COMMANDS += $$(COMMAND) + MAKE_MSG = QMK Firmware v$$(shell git describe --abbrev=0 --tags 2>/dev/null)\n\n$(MAKE_MSG) COMMAND_true_$$(COMMAND) := \ printf "$$(MAKE_MSG)" | \ $$(MAKE_MSG_FORMAT); \ @@ -420,7 +421,7 @@ define BUILD_TEST COMMAND := $1 MAKE_CMD := $$(MAKE) -r -R -C $(ROOT_DIR) -f build_test.mk $$(MAKE_TARGET) MAKE_VARS := TEST=$$(TEST_NAME) FULL_TESTS="$$(FULL_TESTS)" - MAKE_MSG := $$(MSG_MAKE_TEST) + MAKE_MSG := QMK Firmware v$$(shell git describe --abbrev=0 --tags 2>/dev/null)\n\n$$(MSG_MAKE_TEST) $$(eval $$(call BUILD)) ifneq ($$(MAKE_TARGET),clean) TEST_EXECUTABLE := $$(TEST_DIR)/$$(TEST_NAME).elf diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk index c198f9edbb0..be06d611b6c 100644 --- a/tmk_core/rules.mk +++ b/tmk_core/rules.mk @@ -237,10 +237,6 @@ sizeafter: $(BUILD_DIR)/$(TARGET).hex # test file sizes eventually # @if [[ $($(SIZE) --target=$(FORMAT) $(TARGET).hex | $(AWK) 'NR==2 {print "0x"$5}') -gt 0x200 ]]; then $(SECHO) "File is too big!"; fi -# Display qmk version information. -qmkversion : - @$(SILENT) || printf "QMK Firmware v$(shell git describe --abbrev=0 --tags 2>/dev/null)\n\n" - # Display compiler version information. gccversion : @$(SILENT) || $(CC) --version @@ -279,7 +275,7 @@ gccversion : $(eval CMD=$(BIN) $< $@ || exit 0) @$(BUILD_CMD) -BEGIN = qmkversion gccversion sizebefore +BEGIN = gccversion sizebefore # Link: create ELF output file from object files. .SECONDARY : $(BUILD_DIR)/$(TARGET).elf From 087d00f769c82fd2ac85158eb38b01224fb0183b Mon Sep 17 00:00:00 2001 From: skullY Date: Sun, 6 Aug 2017 21:01:32 -0700 Subject: [PATCH 21/37] commit line ending differences --- keyboards/uk78/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/uk78/config.h b/keyboards/uk78/config.h index 859fbf90ff1..e538ad33b77 100644 --- a/keyboards/uk78/config.h +++ b/keyboards/uk78/config.h @@ -73,4 +73,4 @@ along with this program. If not, see . #define RGBLIGHT_VAL_STEP 8 #endif -#endif \ No newline at end of file +#endif From 33a87c132c03b0016772b883cc129d2073528620 Mon Sep 17 00:00:00 2001 From: Ethan Madden Date: Fri, 4 Aug 2017 16:05:10 -0700 Subject: [PATCH 22/37] Base JC65 config jc65 builds properly, haven't test flashed yet Enabled RGB backlighting disabled some other features to save some space --- keyboards/jc65/Makefile | 3 ++ keyboards/jc65/config.h | 63 ++++++++++++++++++++++ keyboards/jc65/jc65.c | 28 ++++++++++ keyboards/jc65/jc65.h | 21 ++++++++ keyboards/jc65/keymaps/default/Makefile | 0 keyboards/jc65/keymaps/default/config.h | 1 + keyboards/jc65/keymaps/default/keymap.c | 11 ++++ keyboards/jc65/keymaps/default/readme.md | 0 keyboards/jc65/readme.md | 0 keyboards/jc65/rules.mk | 68 ++++++++++++++++++++++++ 10 files changed, 195 insertions(+) create mode 100644 keyboards/jc65/Makefile create mode 100644 keyboards/jc65/config.h create mode 100644 keyboards/jc65/jc65.c create mode 100644 keyboards/jc65/jc65.h create mode 100644 keyboards/jc65/keymaps/default/Makefile create mode 100644 keyboards/jc65/keymaps/default/config.h create mode 100644 keyboards/jc65/keymaps/default/keymap.c create mode 100644 keyboards/jc65/keymaps/default/readme.md create mode 100644 keyboards/jc65/readme.md create mode 100644 keyboards/jc65/rules.mk diff --git a/keyboards/jc65/Makefile b/keyboards/jc65/Makefile new file mode 100644 index 00000000000..57b2ef62e5f --- /dev/null +++ b/keyboards/jc65/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif diff --git a/keyboards/jc65/config.h b/keyboards/jc65/config.h new file mode 100644 index 00000000000..6e1306b2763 --- /dev/null +++ b/keyboards/jc65/config.h @@ -0,0 +1,63 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0002 +#define MANUFACTURER dou +#define PRODUCT KEYCLACK65-V1 +#define DESCRIPTION JC65 PCB + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +/* QMK JC65 PCB default pin-out */ +#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } +#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B7, D4, B1, B0, B5, B4, D7, D6, B3, F4, F5 } +#define UNUSED_PINS + +#define RGB_DI_PIN E2 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 20 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + +#define BACKLIGHT_PIN B6 +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 3 +#endif + +#define DIODE_DIRECTION COL2ROW +#define DEBOUNCING_DELAY 5 + +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ + ) + + + +#endif diff --git a/keyboards/jc65/jc65.c b/keyboards/jc65/jc65.c new file mode 100644 index 00000000000..82b1d574160 --- /dev/null +++ b/keyboards/jc65/jc65.c @@ -0,0 +1,28 @@ +#include "jc65.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/jc65/jc65.h b/keyboards/jc65/jc65.h new file mode 100644 index 00000000000..41ec3cf64e4 --- /dev/null +++ b/keyboards/jc65/jc65.h @@ -0,0 +1,21 @@ +#ifndef JC65_H +#define JC65_H + +#include "quantum.h" + +#define KEYMAP( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \ + K10, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, \ + K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, K3F, \ + K40, K41, K43, K44, K46, K48, K4A, K4B, K4C, K4D, K4E, K4F \ +)\ +{\ + {K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F}, \ + {K10, KC_NO, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F}, \ + {K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO, K2F}, \ + {K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E, K3F}, \ + {K40, K41, KC_NO, K43, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, K4B, K4C, K4D, K4E, K4F}, \ +} + +#endif diff --git a/keyboards/jc65/keymaps/default/Makefile b/keyboards/jc65/keymaps/default/Makefile new file mode 100644 index 00000000000..e69de29bb2d diff --git a/keyboards/jc65/keymaps/default/config.h b/keyboards/jc65/keymaps/default/config.h new file mode 100644 index 00000000000..a5568e400de --- /dev/null +++ b/keyboards/jc65/keymaps/default/config.h @@ -0,0 +1 @@ +#include "../../config.h" diff --git a/keyboards/jc65/keymaps/default/keymap.c b/keyboards/jc65/keymaps/default/keymap.c new file mode 100644 index 00000000000..de787f3892a --- /dev/null +++ b/keyboards/jc65/keymaps/default/keymap.c @@ -0,0 +1,11 @@ +#include "jc65.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = KEYMAP( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_BSPC, KC_INS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_SPACE, KC_SPACE, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), +}; diff --git a/keyboards/jc65/keymaps/default/readme.md b/keyboards/jc65/keymaps/default/readme.md new file mode 100644 index 00000000000..e69de29bb2d diff --git a/keyboards/jc65/readme.md b/keyboards/jc65/readme.md new file mode 100644 index 00000000000..e69de29bb2d diff --git a/keyboards/jc65/rules.mk b/keyboards/jc65/rules.mk new file mode 100644 index 00000000000..c2c02b6147a --- /dev/null +++ b/keyboards/jc65/rules.mk @@ -0,0 +1,68 @@ +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes +MIDI_ENABLE = no # MIDI controls +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 From daa5cee06510eb85226d3e6b6322786a8932c0ad Mon Sep 17 00:00:00 2001 From: Ethan Madden Date: Mon, 7 Aug 2017 19:35:21 -0700 Subject: [PATCH 23/37] Added my personal layout added RGB controls to my keymap --- keyboards/jc65/keymaps/jetpacktuxedo/Makefile | 0 keyboards/jc65/keymaps/jetpacktuxedo/config.h | 1 + keyboards/jc65/keymaps/jetpacktuxedo/keymap.c | 25 +++++++++++++++++++ .../jc65/keymaps/jetpacktuxedo/readme.md | 0 4 files changed, 26 insertions(+) create mode 100644 keyboards/jc65/keymaps/jetpacktuxedo/Makefile create mode 100644 keyboards/jc65/keymaps/jetpacktuxedo/config.h create mode 100644 keyboards/jc65/keymaps/jetpacktuxedo/keymap.c create mode 100644 keyboards/jc65/keymaps/jetpacktuxedo/readme.md diff --git a/keyboards/jc65/keymaps/jetpacktuxedo/Makefile b/keyboards/jc65/keymaps/jetpacktuxedo/Makefile new file mode 100644 index 00000000000..e69de29bb2d diff --git a/keyboards/jc65/keymaps/jetpacktuxedo/config.h b/keyboards/jc65/keymaps/jetpacktuxedo/config.h new file mode 100644 index 00000000000..a5568e400de --- /dev/null +++ b/keyboards/jc65/keymaps/jetpacktuxedo/config.h @@ -0,0 +1 @@ +#include "../../config.h" diff --git a/keyboards/jc65/keymaps/jetpacktuxedo/keymap.c b/keyboards/jc65/keymaps/jetpacktuxedo/keymap.c new file mode 100644 index 00000000000..af02b6f104f --- /dev/null +++ b/keyboards/jc65/keymaps/jetpacktuxedo/keymap.c @@ -0,0 +1,25 @@ +#include "jc65.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = KEYMAP( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_INS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_DEL, + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_SPACE, KC_SPACE, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = KEYMAP( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, KC_DEL, KC_TRNS, + MO(1), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_PGUP, KC_TRNS, KC_TRNS, KC_PGUP, KC_VOLD, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_HOME, KC_PGDN, KC_END + ), + [2] = KEYMAP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + MO(1), RGB_SAD, RGB_SAI, KC_TRNS, KC_TRNS, RGB_HUD, RGB_HUI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAD, RGB_VAI, KC_TRNS, KC_TRNS, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_TRNS, KC_TRNS, KC_TRNS + ), +}; diff --git a/keyboards/jc65/keymaps/jetpacktuxedo/readme.md b/keyboards/jc65/keymaps/jetpacktuxedo/readme.md new file mode 100644 index 00000000000..e69de29bb2d From 6b70b6a9907722a3a6d38a5f9f249df0b052d18c Mon Sep 17 00:00:00 2001 From: Ethan Madden Date: Tue, 8 Aug 2017 16:00:48 -0700 Subject: [PATCH 24/37] Readmes! --- keyboards/jc65/keymaps/default/readme.md | 10 +++++++++ .../jc65/keymaps/jetpacktuxedo/readme.md | 10 +++++++++ keyboards/jc65/readme.md | 22 +++++++++++++++++++ 3 files changed, 42 insertions(+) diff --git a/keyboards/jc65/keymaps/default/readme.md b/keyboards/jc65/keymaps/default/readme.md index e69de29bb2d..13430a630b8 100644 --- a/keyboards/jc65/keymaps/default/readme.md +++ b/keyboards/jc65/keymaps/default/readme.md @@ -0,0 +1,10 @@ +Default Keymap +=== + +Super simple default keymap with only a base layer. + +Keymap Maintainer: [Ethan Madden](https://github.com/jetpacktuxedo) + +Difference from base layout: This is (as close as I can tell) the same as the layout that ships on the boards other than default underglow color. + +Intended usage: This is mostly provided for testing before you build your own keymap and as a reference to a stock(ish) configuration diff --git a/keyboards/jc65/keymaps/jetpacktuxedo/readme.md b/keyboards/jc65/keymaps/jetpacktuxedo/readme.md index e69de29bb2d..4083d8f470f 100644 --- a/keyboards/jc65/keymaps/jetpacktuxedo/readme.md +++ b/keyboards/jc65/keymaps/jetpacktuxedo/readme.md @@ -0,0 +1,10 @@ +Jetpacktuxedo's Keymap +=== + +Split backspace, 6.25u space, caps is fn, my standard fn layer, reset + rgb controls on layer(2) + +Keymap Maintainer: [Ethan Madden](https://github.com/jetpacktuxedo) + +Difference from base layout: The base layer is the same, except caps is fn, and there are additional tools on layers + +Intended usage: This is my daily driver keymap diff --git a/keyboards/jc65/readme.md b/keyboards/jc65/readme.md index e69de29bb2d..55ed72229c0 100644 --- a/keyboards/jc65/readme.md +++ b/keyboards/jc65/readme.md @@ -0,0 +1,22 @@ +JC65 +=== + +![JC65](https://imgur.com/a/C2oa5) + +The JC65 PCB actually has two revisions: A QMK native version, and a PS2AVRGB version. Jchan offered both PCBs as options during the M65-A Round 1 group buy, and were also available choices for the 65% acrylic case group buy. In the near future both PCB versions should be available from keyclack.com when the storefront part opens. + +These docs are for the QMK version of the PCB. [More info on qmk.fm](http://qmk.fm/planck/) + +Keyboard Maintainer: [Ethan Madden](https://github.com/jetpacktuxedo) +Hardware Supported: JC65 rev.qmk +Hardware Availability: [keyclack.com](https://keyclack.com/) + +Make example for this keyboard (after setting up your build environment): + + make jc65-default + +Or to make and flash: + + make jc65-default-dfu + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. From d2e24354e1c14f5b86ede9cad915a3f394604f8d Mon Sep 17 00:00:00 2001 From: Jasonm23 Date: Wed, 9 Aug 2017 18:08:57 +0800 Subject: [PATCH 25/37] Add TKL keymap for GON NerdTKL --- keyboards/gonnerd/keymaps/tkl/Makefile | 21 +++++++++++++++++ keyboards/gonnerd/keymaps/tkl/keymap.c | 31 ++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 keyboards/gonnerd/keymaps/tkl/Makefile create mode 100644 keyboards/gonnerd/keymaps/tkl/keymap.c diff --git a/keyboards/gonnerd/keymaps/tkl/Makefile b/keyboards/gonnerd/keymaps/tkl/Makefile new file mode 100644 index 00000000000..5854366f9dd --- /dev/null +++ b/keyboards/gonnerd/keymaps/tkl/Makefile @@ -0,0 +1,21 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/gonnerd/keymaps/tkl/keymap.c b/keyboards/gonnerd/keymaps/tkl/keymap.c new file mode 100644 index 00000000000..b0ba335c59a --- /dev/null +++ b/keyboards/gonnerd/keymaps/tkl/keymap.c @@ -0,0 +1,31 @@ +#include "gonnerd.h" + +#define _x_ KC_NO +#define TRN KC_TRNS + +// Keymap layers +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = KEYMAP_TKL( \ + KC_ESC, 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_PSCR,KC_SLCK,KC_PAUS, \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME,KC_PGUP, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, \ + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, _x_, KC_ENT, \ + KC_LSFT, _x_, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, _x_, KC_UP, \ + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, MO(1), KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT \ + ), + + [1] = KEYMAP_TKL( \ + RESET, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, \ + _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, \ + _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, \ + _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, \ + _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, \ + _x_, _x_, _x_, _x_, _x_, _x_, TRN, _x_, _x_, _x_, _x_ \ + ) + +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; From aa660d61ea078dd8633b2fc0a3f6ff4be6a450ee Mon Sep 17 00:00:00 2001 From: Ryan Sullivan Date: Wed, 9 Aug 2017 09:47:16 -0400 Subject: [PATCH 26/37] Add Org60 keyboard This makes some small changes to the XD60 configuration. Also moves Eagleheardt's base keymap. --- keyboards/org60/Makefile | 3 + keyboards/org60/config.h | 82 +++++++++++++++++++ .../BASE => org60/keymaps/base}/keymap.c | 0 .../BASE => org60/keymaps/base}/readme.md | 0 keyboards/org60/org60.c | 19 +++++ keyboards/org60/org60.h | 37 +++++++++ keyboards/org60/readme.md | 21 +++++ keyboards/org60/rules.mk | 64 +++++++++++++++ keyboards/xd60/keymaps/base/keymap.c | 46 ----------- keyboards/xd60/keymaps/base/readme.md | 5 -- 10 files changed, 226 insertions(+), 51 deletions(-) create mode 100644 keyboards/org60/Makefile create mode 100644 keyboards/org60/config.h rename keyboards/{xd60/keymaps/BASE => org60/keymaps/base}/keymap.c (100%) rename keyboards/{xd60/keymaps/BASE => org60/keymaps/base}/readme.md (100%) create mode 100644 keyboards/org60/org60.c create mode 100644 keyboards/org60/org60.h create mode 100644 keyboards/org60/readme.md create mode 100644 keyboards/org60/rules.mk delete mode 100644 keyboards/xd60/keymaps/base/keymap.c delete mode 100644 keyboards/xd60/keymaps/base/readme.md diff --git a/keyboards/org60/Makefile b/keyboards/org60/Makefile new file mode 100644 index 00000000000..57b2ef62e5f --- /dev/null +++ b/keyboards/org60/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif diff --git a/keyboards/org60/config.h b/keyboards/org60/config.h new file mode 100644 index 00000000000..62b3b69a0ed --- /dev/null +++ b/keyboards/org60/config.h @@ -0,0 +1,82 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER 大橘子外设 (Large orange peripherals) +#define PRODUCT Org60 +#define DESCRIPTION Org60 Keyboard PCB by 大橘子外设 (Large orange peripherals) + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } +#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3 } +#define UNUSED_PINS + +/* Backlight Setup */ +#define BACKLIGHT_PIN F5 +#define BACKLIGHT_LEVELS 6 +//#define BACKLIGHT_BREATHING + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* RGB Underglow + * F6 PIN for Org60 that has pre-soldered WS2812 LEDs + */ +#define RGB_DI_PIN F6 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 20 // Number of LEDs +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +#define TAPPING_TERM 200 + +#endif diff --git a/keyboards/xd60/keymaps/BASE/keymap.c b/keyboards/org60/keymaps/base/keymap.c similarity index 100% rename from keyboards/xd60/keymaps/BASE/keymap.c rename to keyboards/org60/keymaps/base/keymap.c diff --git a/keyboards/xd60/keymaps/BASE/readme.md b/keyboards/org60/keymaps/base/readme.md similarity index 100% rename from keyboards/xd60/keymaps/BASE/readme.md rename to keyboards/org60/keymaps/base/readme.md diff --git a/keyboards/org60/org60.c b/keyboards/org60/org60.c new file mode 100644 index 00000000000..77a5e7c18bb --- /dev/null +++ b/keyboards/org60/org60.c @@ -0,0 +1,19 @@ +#include "org60.h" + + +extern inline void org60_caps_led_on(void); +extern inline void org60_bl_led_on(void); + +extern inline void org60_caps_led_off(void); +extern inline void org60_bl_led_off(void); + + +void led_set_kb(uint8_t usb_led) { + if (usb_led & (1<event.pressed) { register_code(KC_RSFT); } - else { unregister_code(KC_RSFT); } - break; - } - - return MACRO_NONE; -}; - -// Loop -void matrix_scan_user(void) { - // Empty -}; diff --git a/keyboards/xd60/keymaps/base/readme.md b/keyboards/xd60/keymaps/base/readme.md deleted file mode 100644 index 89f9acaa975..00000000000 --- a/keyboards/xd60/keymaps/base/readme.md +++ /dev/null @@ -1,5 +0,0 @@ -![Uses this layout](https://i.redd.it/v64eqwsrk8jx.jpg) - -All of the keys which CAN have a function should be assigned one. - -The keys with KC_NO cannot be assigned a value From b6ed990d58e374cbbfca1e9054ff76aaf1c9a446 Mon Sep 17 00:00:00 2001 From: Ryan Sullivan Date: Wed, 9 Aug 2017 09:50:07 -0400 Subject: [PATCH 27/37] Rename 'base' to 'default' Moves Eagleheardt's base layout to the default one for the Org60. Also changed to use the right header file. --- keyboards/org60/keymaps/{base => default}/keymap.c | 4 ++-- keyboards/org60/keymaps/{base => default}/readme.md | 0 2 files changed, 2 insertions(+), 2 deletions(-) rename keyboards/org60/keymaps/{base => default}/keymap.c (98%) rename keyboards/org60/keymaps/{base => default}/readme.md (100%) diff --git a/keyboards/org60/keymaps/base/keymap.c b/keyboards/org60/keymaps/default/keymap.c similarity index 98% rename from keyboards/org60/keymaps/base/keymap.c rename to keyboards/org60/keymaps/default/keymap.c index b3ccd5e584a..9d18d50e31d 100644 --- a/keyboards/org60/keymaps/base/keymap.c +++ b/keyboards/org60/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -#include "xd60.h" +#include "org60.h" #include "action_layer.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -43,4 +43,4 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // Loop void matrix_scan_user(void) { // Empty -}; +}; \ No newline at end of file diff --git a/keyboards/org60/keymaps/base/readme.md b/keyboards/org60/keymaps/default/readme.md similarity index 100% rename from keyboards/org60/keymaps/base/readme.md rename to keyboards/org60/keymaps/default/readme.md From 78ae28f24c6b71da8618c3dbb8a5bfe72bf53e10 Mon Sep 17 00:00:00 2001 From: Ryan Sullivan Date: Wed, 9 Aug 2017 09:51:24 -0400 Subject: [PATCH 28/37] Add 'boardy' keymap Initial version of my personal layout for my keyboard Boardy --- keyboards/org60/keymaps/boardy/Makefile | 15 +++ keyboards/org60/keymaps/boardy/keymap.c | 121 +++++++++++++++++++++++ keyboards/org60/keymaps/boardy/readme.md | 5 + 3 files changed, 141 insertions(+) create mode 100644 keyboards/org60/keymaps/boardy/Makefile create mode 100644 keyboards/org60/keymaps/boardy/keymap.c create mode 100644 keyboards/org60/keymaps/boardy/readme.md diff --git a/keyboards/org60/keymaps/boardy/Makefile b/keyboards/org60/keymaps/boardy/Makefile new file mode 100644 index 00000000000..0755d500937 --- /dev/null +++ b/keyboards/org60/keymaps/boardy/Makefile @@ -0,0 +1,15 @@ + +# QMK Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +CONSOLE_ENABLE = no # Enable debugging console +COMMAND_ENABLE = no # Commands for debug and configuration +TAP_DANCE_ENABLE = no # Tap Dance skills +UNICODE_ENABLE = no # Unicode + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif + + diff --git a/keyboards/org60/keymaps/boardy/keymap.c b/keyboards/org60/keymaps/boardy/keymap.c new file mode 100644 index 00000000000..635838f6cfb --- /dev/null +++ b/keyboards/org60/keymaps/boardy/keymap.c @@ -0,0 +1,121 @@ +#include "org60.h" +#include "action_layer.h" + +// Keyboard Layers +enum keyboard_layers { + _BASE, // Base Layer + _FUNCTION, // Function Layer +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = KEYMAP( + /* + 0: Base Layer + .--------------------------------------------------------------------------------------------------------------------------------------. + | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | _ | + | | + | | | | | | | | | | | | | | | + | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace | + |--------------------------------------------------------------------------------------------------------------------------------------| + | | | | | | | | | | | | { | ] | | | + | | | | | | | | | | | | | | | + | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | + |--------------------------------------------------------------------------------------------------------------------------------------| + | | | | | | | | | | | : | " | | + | | | | | | | | | | | | | | + | PrntScr | A | S | D | F | G | H | J | K | L | ; | ' | Enter | + |--------------------------------------------------------------------------------------------------------------------------------------| + | | | | | | | | | < | > | ? |░░░░░░| |░░░░░░░░| + | | | | | | | | | | | |░░░░░░| |░░░░░░░░| + | Shift | Z | X | C | V | B | N | M | , | . | / |░░░░░░| Up |░░░░░░░░| + |--------------------------------------------------------------------------------------------------------------------------------------| + | | | | | |░░░░░░| | | | + | | | | | |░░░░░░| | | | + | Ctrl | Win | Alt | Space | FnO |░░░░░░| Left | Down | Right | + '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + //--------------------------------------------------------------------------------------------------------------------------------------. + // | | | | | | | | | | | | | | + // | | | | | | | | | | | | | | + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NO, + //--------------------------------------------------------------------------------------------------------------------------------------| + // | | | | | | | | | | | | | | + // | | | | | | | | | | | | | | + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + //--------------------------------------------------------------------------------------------------------------------------------------| + // | | | | | | | | | | | | | + // | | | | | | | | | | | | | + KC_PSCR, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, + //--------------------------------------------------------------------------------------------------------------------------------------| + // | | | | | | | | | | |░░░░░░| |░░░░░░░░| + // | | | | | | | | | | |░░░░░░| |░░░░░░░░| + KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, KC_UP, KC_NO, + //--------------------------------------------------------------------------------------------------------------------------------------| + // | | | | |░░░░░░| | | | + // | | | | |░░░░░░| | | | + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, F(0), KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT), + //--------------------------------------------------------------------------------------------------------------------------------------' + + + [_FUNCTION] = KEYMAP( + /* + 1: Function Layer + .--------------------------------------------------------------------------------------------------------------------------------------. + | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | + | Esc | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Delete | + |--------------------------------------------------------------------------------------------------------------------------------------| + | | | | | | | | | | | | | | | + | | | | | RGB | RGB | RGB | RGB | | | | | | | + | Reset | 7 | 8 | 9 | Toggle | Mode | Pwr+ | Pwr- | | Insert | Pause | Home | End | Sleep | + |--------------------------------------------------------------------------------------------------------------------------------------| + | | | | | | | | | | | | | | + | | | | | RGB | RGB | RGB | RGB | | | Page | Page | | + | Caps Lock | 4 | 5 | 6 | Hue+ | Hue- | Sat+ | Sat- | | | Up | Down | Enter | + |--------------------------------------------------------------------------------------------------------------------------------------| + | | | | | | | | | | | |░░░░░░| |░░░░░░░░| + | | | | | | Back | Back | | Prev | Next | |░░░░░░| |░░░░░░░░| + | Shift | 1 | 2 | 3 | | Light+ | Light- | | Track | Track | |░░░░░░| Up |░░░░░░░░| + |--------------------------------------------------------------------------------------------------------------------------------------| + | | | | | |░░░░░░| | | | + | | | | | |░░░░░░| | | | + | Ctrl | Win | Alt | 0 | Fn0 |░░░░░░| Mute | Down | Right | + '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + //--------------------------------------------------------------------------------------------------------------------------------------. + // | | | | | | | | | | | | | | + // | | | | | | | | | | | | | | + KC_ESC, 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_DEL, KC_NO, + //--------------------------------------------------------------------------------------------------------------------------------------| + // | | | | | | | | | | | | | | + // | | | | | | | | | | | | | | + RESET, KC_7, KC_8, KC_9, RGB_TOG, RGB_MOD, RGB_VAI, RGB_VAD, KC_NO, KC_INS, KC_PAUS, KC_HOME, KC_END, KC_SLEP, + //--------------------------------------------------------------------------------------------------------------------------------------| + // | | | | | | | | | | | | | + // | | | | | | | | | | | | | + KC_CAPS, KC_4, KC_5, KC_6, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, KC_NO, KC_NO, KC_PGUP, KC_PGDN, KC_NO, KC_ENT, + //--------------------------------------------------------------------------------------------------------------------------------------| + // | | | | | | | | | | |░░░░░░| |░░░░░░░░| + // | | | | | | | | | | |░░░░░░| |░░░░░░░░| + KC_LSFT, KC_NO, KC_1, KC_2, KC_3, KC_NO, BL_INC, BL_DEC, KC_NO, KC_MPRV, KC_MNXT, KC_NO, KC_NO, KC_VOLU, KC_NO, + //--------------------------------------------------------------------------------------------------------------------------------------| + // | | | | |░░░░░░| | | | + // | | | | |░░░░░░| | | | + KC_LCTL, KC_LGUI, KC_LALT, KC_0, F(0), KC_NO, KC_MUTE, KC_VOLD, KC_MPLY), + //--------------------------------------------------------------------------------------------------------------------------------------' + +}; + + +// Custom Actions +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_MOMENTARY(_FUNCTION), // to Function overlay +}; + + +// Loop +void matrix_scan_user(void) { + // Empty +}; \ No newline at end of file diff --git a/keyboards/org60/keymaps/boardy/readme.md b/keyboards/org60/keymaps/boardy/readme.md new file mode 100644 index 00000000000..c7ea20a89ab --- /dev/null +++ b/keyboards/org60/keymaps/boardy/readme.md @@ -0,0 +1,5 @@ +# boardy layout + +![Uses this layout](http://i.imgur.com/k3g488o.jpg) + +This is my custom layout designed to be used with an Org60 (https://world.taobao.com/item/544441405112.htm) and custom plate specifically to suit my taste. \ No newline at end of file From a5ab2412ab6bb4df9be121faa8caaf900dc0ba0d Mon Sep 17 00:00:00 2001 From: Ryan Sullivan Date: Wed, 9 Aug 2017 09:57:48 -0400 Subject: [PATCH 29/37] Update readme Fixed link and small cleanup --- keyboards/org60/keymaps/boardy/readme.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/keyboards/org60/keymaps/boardy/readme.md b/keyboards/org60/keymaps/boardy/readme.md index c7ea20a89ab..3643fbce30e 100644 --- a/keyboards/org60/keymaps/boardy/readme.md +++ b/keyboards/org60/keymaps/boardy/readme.md @@ -1,5 +1,7 @@ -# boardy layout +# Boardy layout ![Uses this layout](http://i.imgur.com/k3g488o.jpg) -This is my custom layout designed to be used with an Org60 (https://world.taobao.com/item/544441405112.htm) and custom plate specifically to suit my taste. \ No newline at end of file +This is my custom layout for my board Boardy designed to be used with an [Org60] and custom plate. + +[Org60]: https://world.taobao.com/item/544441405112.htm From 72b706748938031395a34491b77a341197d31fe0 Mon Sep 17 00:00:00 2001 From: dwrz Date: Sun, 6 Aug 2017 15:08:04 +0000 Subject: [PATCH 30/37] Add piemod keymaps for Let's Split and Planck. --- keyboards/lets_split/keymaps/piemod/Makefile | 10 ++ keyboards/lets_split/keymaps/piemod/README.md | 31 +++++ keyboards/lets_split/keymaps/piemod/keymap.c | 121 ++++++++++++++++++ keyboards/planck/keymaps/piemod/Makefile | 10 ++ keyboards/planck/keymaps/piemod/README.md | 31 +++++ keyboards/planck/keymaps/piemod/keymap.c | 111 ++++++++++++++++ 6 files changed, 314 insertions(+) create mode 100755 keyboards/lets_split/keymaps/piemod/Makefile create mode 100644 keyboards/lets_split/keymaps/piemod/README.md create mode 100644 keyboards/lets_split/keymaps/piemod/keymap.c create mode 100755 keyboards/planck/keymaps/piemod/Makefile create mode 100644 keyboards/planck/keymaps/piemod/README.md create mode 100644 keyboards/planck/keymaps/piemod/keymap.c diff --git a/keyboards/lets_split/keymaps/piemod/Makefile b/keyboards/lets_split/keymaps/piemod/Makefile new file mode 100755 index 00000000000..1e48872e391 --- /dev/null +++ b/keyboards/lets_split/keymaps/piemod/Makefile @@ -0,0 +1,10 @@ +SUBPROJECT_DEFAULT = rev4 + +MOUSEKEY_ENABLE = yes +BLUETOOTH_ENABLE = yes +EXTRAKEY_ENABLE = yes +AUDIO_ENABLE = yes + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/lets_split/keymaps/piemod/README.md b/keyboards/lets_split/keymaps/piemod/README.md new file mode 100644 index 00000000000..f2a051da14e --- /dev/null +++ b/keyboards/lets_split/keymaps/piemod/README.md @@ -0,0 +1,31 @@ +PieMod +====== + +A keymap for users that need: + +- *P*: Programming symbols. + +- *I*: i3wm. + +- *E*: Emacs. + +- *M*: Macros. + +- *O*: Ortholinear. + +- *D*: Dvorak. + +Still a work-in-progress. Suggestions welcome @ https://github.com/dwrz/piemod. + +### Keymap + +![PieMod Keymap](./keymap.png) + +### TODO + +- [ ] Add Emacs layer. +- [ ] Add Macro layer. +- [ ] Add system control keys (rotation, brightness). +- [ ] Switch " and ' quotes (or function to toggle default). +- [ ] Add capslock. +. diff --git a/keyboards/lets_split/keymaps/piemod/keymap.c b/keyboards/lets_split/keymaps/piemod/keymap.c new file mode 100644 index 00000000000..558370fa864 --- /dev/null +++ b/keyboards/lets_split/keymaps/piemod/keymap.c @@ -0,0 +1,121 @@ +#include "lets_split.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +#define _DVORAK 0 +#define _ARROW 1 //F(1) +#define _SYMBOL 2 // F(2) +#define _NUMBER 3 // F(3) +#define _FUNCTION 4 // F(4) +#define _EMACS 5 // F(5) +#define _MACROS 6 // F(6) +#define _MOUSE 7 // F(7) + +enum custom_keycodes { + DVORAK = SAFE_RANGE, + ARROW, + SYMBOL, + NUMBER, + FUNCTION, + EMACS, + MACROS, + MOUSE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_DVORAK] = KEYMAP( \ + KC_ESC, KC_QUOTE, F(7), KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DELETE, \ + KC_TAB, F(1), F(2), F(3), F(4), KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENTER, \ + KC_LSHIFT, KC_SCOLON, F(5), KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_MINUS, \ + F(10), F(6), KC_MENU, KC_LALT, KC_LGUI, KC_BSPACE, KC_SPACE, KC_RCTRL, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT \ +), + +[_ARROW] = KEYMAP( \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_UP, KC_END, KC_PGUP, \ + KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO \ +), + +[_SYMBOL] = KEYMAP( \ + KC_TILD, KC_GRAVE, KC_NO, KC_EQUAL, KC_PLUS, KC_NO, KC_LBRACKET, KC_RBRACKET, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, \ + KC_NO, KC_NO, KC_TRNS, KC_SCOLON, KC_COLN, KC_NO, KC_LCBR, KC_RCBR, KC_DLR, KC_PERC, KC_CIRC, F(21), \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BSLASH, KC_SLASH, KC_EXLM, KC_AT, KC_HASH, KC_PIPE, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ASTR, KC_SLASH, KC_MINUS, KC_PLUS, KC_EQUAL \ +), + +[_NUMBER] = KEYMAP( \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_7, KC_8, KC_9, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_4, KC_5, KC_6, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_0, KC_1, KC_2, KC_3, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ASTR, KC_SLASH, KC_MINUS, KC_PLUS, KC_EQUAL \ +), + +[_FUNCTION] = KEYMAP( \ + KC_PSCREEN, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_AUDIO_MUTE, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE, \ + RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DELETE, KC_INSERT, KC_HOME, KC_PGDN, KC_PGUP, KC_END \ +), + +[_EMACS] = KEYMAP( \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO \ +), + +[_MACROS] = KEYMAP( \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO \ +), + +[_MOUSE] = KEYMAP( \ + KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_U, KC_NO, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_BTN1, KC_MS_BTN2, KC_MS_BTN3, KC_NO, KC_NO, KC_NO \ +) +}; + +enum function_id { + TEENSY_KEY, + CUSTOM_KEY, + L_CTRL_ALT_ENT, + R_CTRL_ALT_ENT, +}; + +int CAPSLOCKED = 0; + + const uint16_t PROGMEM fn_actions[] = { + + // DVORAK 0 + // ARROW 1, F(1) + // SYMBOL 2, F(2) + // NUMBER 3, F(3) + // FUNCTION 4, F(4) + // EMACS 5, F(5) + // MACROS 6, F(6) + // MOUSE 7, F(7) + + // Layers + [1] = ACTION_LAYER_TAP_KEY(1, KC_A), // FN1 = Momentary Arrow layer on A. + [2] = ACTION_LAYER_TAP_KEY(2, KC_O), // FN2 = Momentary symbOl layer on O. + [3] = ACTION_LAYER_TAP_KEY(3, KC_E), // FN3 = Momentary numbEr layer on E. + [4] = ACTION_LAYER_TAP_KEY(4, KC_U), // FN4 = Momentary fUnction layer on U. + [5] = ACTION_LAYER_TAP_KEY(5, KC_Q), // FN5 = Momentary emaQs layer on Q. + [6] = ACTION_LAYER_TAP_KEY(6, KC_LCTRL), // FN6 = Momentary MACROS on ??? key. + [7] = ACTION_LAYER_TAP_KEY(7, KC_COMMA), // FN7 = Momentary MOUSE on , key. + + // Special Keys + [10] = ACTION_MODS_KEY(KC_LCTRL, KC_LALT), // FN10 = Ctrl + Alt. + + // Symbols + [21] = ACTION_MODS_KEY(MOD_LSFT, KC_SLASH), // FN21 = Question mark. + + }; diff --git a/keyboards/planck/keymaps/piemod/Makefile b/keyboards/planck/keymaps/piemod/Makefile new file mode 100755 index 00000000000..1e48872e391 --- /dev/null +++ b/keyboards/planck/keymaps/piemod/Makefile @@ -0,0 +1,10 @@ +SUBPROJECT_DEFAULT = rev4 + +MOUSEKEY_ENABLE = yes +BLUETOOTH_ENABLE = yes +EXTRAKEY_ENABLE = yes +AUDIO_ENABLE = yes + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/planck/keymaps/piemod/README.md b/keyboards/planck/keymaps/piemod/README.md new file mode 100644 index 00000000000..f2a051da14e --- /dev/null +++ b/keyboards/planck/keymaps/piemod/README.md @@ -0,0 +1,31 @@ +PieMod +====== + +A keymap for users that need: + +- *P*: Programming symbols. + +- *I*: i3wm. + +- *E*: Emacs. + +- *M*: Macros. + +- *O*: Ortholinear. + +- *D*: Dvorak. + +Still a work-in-progress. Suggestions welcome @ https://github.com/dwrz/piemod. + +### Keymap + +![PieMod Keymap](./keymap.png) + +### TODO + +- [ ] Add Emacs layer. +- [ ] Add Macro layer. +- [ ] Add system control keys (rotation, brightness). +- [ ] Switch " and ' quotes (or function to toggle default). +- [ ] Add capslock. +. diff --git a/keyboards/planck/keymaps/piemod/keymap.c b/keyboards/planck/keymaps/piemod/keymap.c new file mode 100644 index 00000000000..e6e7a8a5a0a --- /dev/null +++ b/keyboards/planck/keymaps/piemod/keymap.c @@ -0,0 +1,111 @@ +#include "planck.h" +#include "action_layer.h" +#ifdef AUDIO_ENABLE + #include "audio.h" +#endif +#include "eeconfig.h" + +#define DVORAK 0 +#define ARROW 1 //F(1) +#define SYMBOL 2 // F(2) +#define NUMBER 3 // F(3) +#define FUNCTION 4 // F(4) +#define EMACS 5 // F(5) +#define CUSTOM_MACROS 6 // F(6) +#define MOUSE 7 // F(7) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [DVORAK] = { + {KC_ESC, KC_QUOTE, F(7), KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DELETE}, + {KC_TAB, F(1), F(2), F(3), F(4), KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENTER}, + {KC_LSHIFT, KC_SCOLON, F(5), KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_MINUS}, + {F(10), F(6), KC_MENU, KC_LALT, KC_LGUI, KC_BSPACE, KC_SPACE, KC_RCTRL, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT}, + }, + + [ARROW] = { + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_UP, KC_END, KC_PGUP}, + {KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN}, + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_NO}, + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO} + }, + + [SYMBOL] = { + {KC_TILD, KC_GRAVE, KC_NO, KC_EQUAL, KC_PLUS, KC_NO, KC_LBRACKET, KC_RBRACKET, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN}, + {KC_NO, KC_NO, KC_TRNS, KC_SCOLON, KC_COLN, KC_NO, KC_LCBR, KC_RCBR, KC_DLR, KC_PERC, KC_CIRC, F(21)}, + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BSLASH, KC_SLASH, KC_EXLM, KC_AT, KC_HASH, KC_PIPE}, + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ASTR, KC_SLASH, KC_MINUS, KC_PLUS, KC_EQUAL} + }, + + [NUMBER] = { + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_7, KC_8, KC_9, KC_NO}, + {KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_4, KC_5, KC_6, KC_NO}, + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_0, KC_1, KC_2, KC_3, KC_NO}, + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ASTR, KC_SLASH, KC_MINUS, KC_PLUS, KC_EQUAL} + }, + + [FUNCTION] = { + {KC_PSCREEN, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6}, + {KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12}, + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_AUDIO_MUTE, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE}, + {RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DELETE, KC_INSERT, KC_HOME, KC_PGDN, KC_PGUP, KC_END} + }, + + [EMACS] = { + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO}, + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO}, + {KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO}, + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO} + }, + + [CUSTOM_MACROS] = { + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO}, + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO}, + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO}, + {KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO} + }, + + [MOUSE] = { + {KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_U, KC_NO, KC_NO}, + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO}, + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO}, + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_BTN1, KC_MS_BTN2, KC_MS_BTN3, KC_NO, KC_NO, KC_NO} + }, + + }; + + enum function_id { + TEENSY_KEY, + CUSTOM_KEY, + L_CTRL_ALT_ENT, + R_CTRL_ALT_ENT, + }; + + int CAPSLOCKED = 0; + + const uint16_t PROGMEM fn_actions[] = { + + // DVORAK 0 + // ARROW 1, F(1) + // SYMBOL 2, F(2) + // NUMBER 3, F(3) + // FUNCTION 4, F(4) + // EMACS 5, F(5) + // MACROS 6, F(6) + // MOUSE 7, F(7) + + // Layers + [1] = ACTION_LAYER_TAP_KEY(1, KC_A), // FN1 = Momentary Arrow layer on A. + [2] = ACTION_LAYER_TAP_KEY(2, KC_O), // FN2 = Momentary symbOl layer on O. + [3] = ACTION_LAYER_TAP_KEY(3, KC_E), // FN3 = Momentary numbEr layer on E. + [4] = ACTION_LAYER_TAP_KEY(4, KC_U), // FN4 = Momentary fUnction layer on U. + [5] = ACTION_LAYER_TAP_KEY(5, KC_Q), // FN5 = Momentary emaQs layer on Q. + [6] = ACTION_LAYER_TAP_KEY(6, KC_LCTRL), // FN6 = Momentary MACROS on ??? key. + [7] = ACTION_LAYER_TAP_KEY(7, KC_COMMA), // FN7 = Momentary MOUSE on , key. + + // Special Keys + [10] = ACTION_MODS_KEY(KC_LCTRL, KC_LALT), // FN10 = Ctrl + Alt. + + // Symbols + [21] = ACTION_MODS_KEY(MOD_LSFT, KC_SLASH), // FN21 = Question mark. + + }; From 3fa32867ad03db239c395700d5b711c955b1aa07 Mon Sep 17 00:00:00 2001 From: dwrz Date: Sun, 6 Aug 2017 15:10:58 +0000 Subject: [PATCH 31/37] Remove makefile from Let's Split piemod. --- keyboards/lets_split/keymaps/piemod/Makefile | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100755 keyboards/lets_split/keymaps/piemod/Makefile diff --git a/keyboards/lets_split/keymaps/piemod/Makefile b/keyboards/lets_split/keymaps/piemod/Makefile deleted file mode 100755 index 1e48872e391..00000000000 --- a/keyboards/lets_split/keymaps/piemod/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -SUBPROJECT_DEFAULT = rev4 - -MOUSEKEY_ENABLE = yes -BLUETOOTH_ENABLE = yes -EXTRAKEY_ENABLE = yes -AUDIO_ENABLE = yes - -ifndef QUANTUM_DIR - include ../../../../Makefile -endif From 70407a1b6702d1001f8b92e486f215c1800ce82d Mon Sep 17 00:00:00 2001 From: dwrz Date: Thu, 10 Aug 2017 17:07:07 +0000 Subject: [PATCH 32/37] Add config.h to piemod keymap. --- keyboards/lets_split/keymaps/piemod/config.h | 37 ++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 keyboards/lets_split/keymaps/piemod/config.h diff --git a/keyboards/lets_split/keymaps/piemod/config.h b/keyboards/lets_split/keymaps/piemod/config.h new file mode 100644 index 00000000000..7f33a43630a --- /dev/null +++ b/keyboards/lets_split/keymaps/piemod/config.h @@ -0,0 +1,37 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 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 . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define _MASTER_RIGHT +// #define EE_HANDS + +#endif \ No newline at end of file From 6895c4510e1e683bf2cfa4a78dbde57a2a8554e4 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Thu, 10 Aug 2017 16:52:24 -0400 Subject: [PATCH 33/37] fix default layer songs --- lib/chibios | 2 +- quantum/quantum.c | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/chibios b/lib/chibios index 8fce03b3a75..d34e8eb8310 160000 --- a/lib/chibios +++ b/lib/chibios @@ -1 +1 @@ -Subproject commit 8fce03b3a75c743e5d5c40b9d59c1637c59d22a7 +Subproject commit d34e8eb83101a95f98892bf68605fe545821f320 diff --git a/quantum/quantum.c b/quantum/quantum.c index 0243a7e0126..7a632d709a5 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -40,13 +40,12 @@ extern backlight_config_t backlight_config; #ifndef AG_SWAP_SONG #define AG_SWAP_SONG SONG(AG_SWAP_SOUND) #endif - #ifndef DEFAULT_LAYER_SONGS - #define DEFAULT_LAYER_SONGS { } - #endif float goodbye_song[][2] = GOODBYE_SONG; float ag_norm_song[][2] = AG_NORM_SONG; float ag_swap_song[][2] = AG_SWAP_SONG; - float default_layer_songs[][16][2] = DEFAULT_LAYER_SONGS; + #ifdef DEFAULT_LAYER_SONGS + float default_layer_songs[][16][2] = DEFAULT_LAYER_SONGS; + #endif #endif static void do_code16 (uint16_t code, void (*f) (uint8_t)) { @@ -560,7 +559,7 @@ void send_string_with_delay(const char *str, uint8_t interval) { } void set_single_persistent_default_layer(uint8_t default_layer) { - #ifdef AUDIO_ENABLE + #if defined(AUDIO_ENABLE) && defined(DEFAULT_LAYER_SONGS) PLAY_SONG(default_layer_songs[default_layer]); #endif eeconfig_update_default_layer(1U< Date: Thu, 10 Aug 2017 18:54:14 -0400 Subject: [PATCH 34/37] move qmk version to very top, exclude when git isn't available --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 6364e0af8b3..ebad723bee8 100644 --- a/Makefile +++ b/Makefile @@ -19,6 +19,11 @@ endif # Otherwise the [OK], [ERROR] and [WARN] messages won't be displayed correctly override SILENT := false +QMK_VERSION := $(shell git describe --abbrev=0 --tags 2>/dev/null) +ifneq ($(QMK_VERSION),) +$(info QMK Firmware v$(QMK_VERSION)) +endif + ON_ERROR := error_occurred=1 BREAK_ON_ERRORS = no @@ -390,7 +395,6 @@ endef define BUILD MAKE_VARS += VERBOSE=$(VERBOSE) COLOR=$(COLOR) COMMANDS += $$(COMMAND) - MAKE_MSG = QMK Firmware v$$(shell git describe --abbrev=0 --tags 2>/dev/null)\n\n$(MAKE_MSG) COMMAND_true_$$(COMMAND) := \ printf "$$(MAKE_MSG)" | \ $$(MAKE_MSG_FORMAT); \ @@ -421,7 +425,7 @@ define BUILD_TEST COMMAND := $1 MAKE_CMD := $$(MAKE) -r -R -C $(ROOT_DIR) -f build_test.mk $$(MAKE_TARGET) MAKE_VARS := TEST=$$(TEST_NAME) FULL_TESTS="$$(FULL_TESTS)" - MAKE_MSG := QMK Firmware v$$(shell git describe --abbrev=0 --tags 2>/dev/null)\n\n$$(MSG_MAKE_TEST) + MAKE_MSG := $$(MSG_MAKE_TEST) $$(eval $$(call BUILD)) ifneq ($$(MAKE_TARGET),clean) TEST_EXECUTABLE := $$(TEST_DIR)/$$(TEST_NAME).elf From 897ceac26cd4ab4d4204e696bf0e94c7dd3914e0 Mon Sep 17 00:00:00 2001 From: Balz Guenat Date: Fri, 11 Aug 2017 18:53:08 +0200 Subject: [PATCH 35/37] add option to let ctrl override shift/gui for the GRAVE_ESC. This enables the ctrl+shift+esc shortcut to task manager on windows. --- keyboards/bananasplit/keymaps/coloneljesus/config.h | 1 + quantum/quantum.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/keyboards/bananasplit/keymaps/coloneljesus/config.h b/keyboards/bananasplit/keymaps/coloneljesus/config.h index 060f5922f2c..af6cf8ef1f1 100644 --- a/keyboards/bananasplit/keymaps/coloneljesus/config.h +++ b/keyboards/bananasplit/keymaps/coloneljesus/config.h @@ -20,5 +20,6 @@ #include "../../config.h" // place overrides here +#define GRAVE_ESC_CTRL_OVERRIDE #endif diff --git a/quantum/quantum.c b/quantum/quantum.c index 7a632d709a5..db52c782fcf 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -478,6 +478,11 @@ bool process_record_quantum(keyrecord_t *record) { void (*method)(uint8_t) = (record->event.pressed) ? &add_key : &del_key; uint8_t shifted = get_mods() & ((MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT) |MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI))); + +#ifdef GRAVE_ESC_CTRL_OVERRIDE + if (get_mods() & (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL))) + shifted = 0; +#endif method(shifted ? KC_GRAVE : KC_ESCAPE); send_keyboard_report(); From 188ed682e37dba98a8ba86240abf182a8a6d4268 Mon Sep 17 00:00:00 2001 From: Balz Guenat Date: Fri, 11 Aug 2017 21:43:49 +0200 Subject: [PATCH 36/37] add short comment to grave_esc_ctrl_override --- quantum/quantum.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/quantum/quantum.c b/quantum/quantum.c index db52c782fcf..aac1d07a9b1 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -480,6 +480,8 @@ bool process_record_quantum(keyrecord_t *record) { |MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI))); #ifdef GRAVE_ESC_CTRL_OVERRIDE + // if CTRL is pressed, ESC is always read as ESC, even if SHIFT or GUI is pressed. + // this is handy for the ctrl+shift+esc shortcut on windows, among other things. if (get_mods() & (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL))) shifted = 0; #endif From 5ad103fa51083cb26d3516e5598b7b2a099b1521 Mon Sep 17 00:00:00 2001 From: Balz Guenat Date: Fri, 11 Aug 2017 22:20:36 +0200 Subject: [PATCH 37/37] add description of new option to docs and add option (commented out) into template. --- docs/faq_keymap.md | 4 +++- quantum/template/config.h | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/faq_keymap.md b/docs/faq_keymap.md index d6442ac53ad..3c27958168f 100644 --- a/docs/faq_keymap.md +++ b/docs/faq_keymap.md @@ -116,7 +116,9 @@ https://github.com/tekezo/Karabiner/issues/403 ## Esc and `~ on a key -Use `GRAVE_ESC` or `KC_GESC` in your keymap. +Use `GRAVE_ESC` or `KC_GESC` in your keymap. `GUI`+`GRAVE_ESC` results in `\`` and `SHIFT`+`GRAVE_ESC` results in `~`. + +Note that this will break the CTRL+SHIFT+ESC shortcut to the Windows task manager. Use `#define GRAVE_ESC_CTRL_OVERRIDE` in your `config.h` to get the shortcut back. With this option, `ESC_GRAVE` results in `ESC` if `CTRL` is held, even if `SHIFT` or `GUI` are also held. ## Arrow on Right Modifier keys with Dual-Role This turns right modifer keys into arrow keys when the keys are tapped while still modifiers when the keys are hold. In TMK the dual-role function is dubbed **TAP**. diff --git a/quantum/template/config.h b/quantum/template/config.h index dbca45765d1..700a56f527c 100644 --- a/quantum/template/config.h +++ b/quantum/template/config.h @@ -67,6 +67,11 @@ along with this program. If not, see . /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + /* * Force NKRO *