From 32725dae5ba50f41bf16a80083727f08beaea7c6 Mon Sep 17 00:00:00 2001 From: Joshua T Date: Mon, 11 Jul 2016 17:49:12 -0500 Subject: Created replicaJunction keymaps. --- keyboards/atreus/keymaps/replicaJunction/keymap.c | 75 ++++ .../ergodox_ez/keymaps/replicaJunction/keymap.c | 414 +++++++++++++++++++++ 2 files changed, 489 insertions(+) create mode 100644 keyboards/atreus/keymaps/replicaJunction/keymap.c create mode 100644 keyboards/ergodox_ez/keymaps/replicaJunction/keymap.c diff --git a/keyboards/atreus/keymaps/replicaJunction/keymap.c b/keyboards/atreus/keymaps/replicaJunction/keymap.c new file mode 100644 index 000000000..7ff8933e8 --- /dev/null +++ b/keyboards/atreus/keymaps/replicaJunction/keymap.c @@ -0,0 +1,75 @@ +// this is the style you want to emulate. +// This is the canonical layout file for the Quantum project. If you want to add another keyboard, + +#include "atreus.h" + +// 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. + +// Note that whatever is set as layer 0 will be the default layer of the keyboard. + +#define _CO 0 // Colemak +#define _QW 1 // QWERTY +#define _NU 2 // Numpad +#define _FN 3 // Function +#define _DV 4 // Dvorak + +// Quick alias for visual sake +#define _______ KC_TRNS + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_CO] = { + {KC_Q, KC_W, KC_F, KC_P, KC_B, _______, KC_J, KC_L, KC_U, KC_Y, KC_SCLN }, + {KC_A, KC_R, KC_S, KC_T, KC_G, _______, KC_M, KC_N, KC_E, KC_I, KC_O }, + {KC_Z, KC_X, KC_C, KC_D, KC_V, KC_LCTL, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH }, + {KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_LALT, KC_SPC, MO(_NU), KC_MINS, KC_QUOT, KC_ENT } +}, + +[_DV] = { + {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_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_LCTL, KC_B, KC_M, KC_W, KC_V, KC_Z }, + {KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_LALT, KC_SPC, MO(_NU), KC_MINS, KC_SLSH, KC_ENT } +}, + +[_QW] = { /* Qwerty */ + {KC_Q, KC_W, KC_E, KC_R, KC_T, _______, KC_Y, KC_U, KC_I, KC_O, KC_P }, + {KC_A, KC_S, KC_D, KC_F, KC_G, _______, KC_H, KC_J, KC_K, KC_L, KC_SCLN }, + {KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LCTL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH }, + {KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC,KC_LALT, KC_SPC, MO(_NU), KC_MINS, KC_QUOT, KC_ENT } +}, + +[_NU] = { /* Numbers and symbols */ + {KC_EXLM, KC_AT, KC_UP, KC_LCBR, KC_RCBR, _______, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR}, + {KC_HASH, KC_LEFT, KC_DOWN, KC_RGHT, KC_DLR, _______, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS}, + {KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_AMPR, KC_LCTL, KC_TILD, KC_1, KC_2, KC_3, KC_BSLS}, + {MO(_FN), KC_INS, KC_LGUI, KC_LSFT, KC_DEL, KC_LALT, KC_SPC, _______, KC_DOT, KC_0, KC_EQL} +}, + +[_FN] = { /* Functions */ + {KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10}, + {KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, _______, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11}, + {_______, _______, _______, _______, _______, KC_LCTL, _______, KC_F1, KC_F2, KC_F3, KC_F12}, + {_______, _______, KC_LGUI, KC_LSFT, KC_BSPC, KC_LALT, KC_SPC, _______, _______, _______, RESET} +}}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; diff --git a/keyboards/ergodox_ez/keymaps/replicaJunction/keymap.c b/keyboards/ergodox_ez/keymaps/replicaJunction/keymap.c new file mode 100644 index 000000000..e52d04dd6 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/replicaJunction/keymap.c @@ -0,0 +1,414 @@ +#include "ergodox_ez.h" +#include "debug.h" +#include "action_layer.h" + +/* + * Keyboard: Ergodox + * Keymap: replicaJunction + * Version: 1.0 + * + * This keymap is designed to complement my Atreus keyboard layout, found in keyboards/atreus. + * The Atreus keyboard is a 40% board whose design was heavily influenced by the Ergodox, and I now + * have both keyboards, so I've designed these layouts in an effort to make switching between the + * two as easy as possible. + * + * The default key layout in this keymap is Colemak-ModDH. Information on that layout can be found + * here: https://colemakmods.github.io/mod-dh/ + */ + +#define BASE 0 // default layer +#define CODH 1 // Colemak +#define QWRT 2 // QWERTY layer +#define SYMB 3 // symbols +#define MDIA 4 // media keys +#define UTIL 5 // keyboard utilities +#define NUMP 6 // numpad +#define GAME 7 // mouse overlay for gamins + +#define _______ KC_TRNS // Simple alias that just makes the keymaps a bit easier to look at + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * Keymap: Colemak-ModDH + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | Esc | | ~SYMB| 6 | 7 | 8 | 9 | 0 | ' | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | \ | Q | W | F | P | B | Home | | BkSp | J | L | U | Y | ; | = | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Tab | A | R | S | T | G |------| |------| M | N | E | I | O | - | + * |--------+------+------+------+------+------| Hyper| | \ |------+------+------+------+------+--------| + * | LShft | Z | X | C | D | V | | | | K | H | , | , | / | RShft | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | LGui | [ | ] |CtlShf| SYMB | | Left | Up | Down | Right| \ | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | LCtrl| LAlt | | MDIA | RAlt | + * ,------|------|------| |------+------+------. + * | Ctl/ | Alt/ | Home | | PgUp | | SYMB/| + * | BkSp | Del |------| |------| Enter| Space| + * | | | NUMP | | PgDn | | | + * `--------------------' `--------------------' + */ + +[CODH] = KEYMAP( + // left hand + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, + KC_BSLS,KC_Q, KC_W, KC_F, KC_P, KC_B, KC_HOME, + KC_TAB, KC_A, KC_R, KC_S, KC_T, KC_G, + KC_LSFT,KC_Z, KC_X, KC_C, KC_D, KC_V, ALL_T(KC_NO), + KC_LGUI,KC_LBRC,KC_RBRC, LCTL(KC_LSFT), MO(SYMB), + + KC_LCTL, KC_LALT, + KC_HOME, + CTL_T(KC_BSPC), ALT_T(KC_DEL), MO(NUMP), + // right hand + TG(SYMB), KC_6, KC_7, KC_8, KC_9, KC_0, KC_QUOT, + KC_BSPC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN,KC_EQL, + KC_M, KC_N, KC_E, KC_I, KC_O, KC_MINS, + KC_BSLS, KC_K, KC_H, KC_DOT, KC_COMM,KC_SLSH,KC_RSFT, + KC_LEFT,KC_UP, KC_DOWN,KC_RGHT,KC_BSLS, + + MO(MDIA), KC_RALT, + KC_PGUP, + KC_PGDN, KC_ENT, LT(SYMB,KC_SPC) + ), + + /* + * Keymap: Dvorak layout + * + * The right index backspace is a nod to my TypeMatrix keyboard, which has + * Backspace in the center. + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | Esc | | ~SYMB| 6 | 7 | 8 | 9 | 0 | / | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | \ | ' | , | . | P | Y | Home | | BkSp | F | G | C | R | L | = | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Tab | A | O | E | U | I |------| |------| D | H | T | N | S | - | + * |--------+------+------+------+------+------| Hyper| | \ |------+------+------+------+------+--------| + * | LShft | ; | Q | J | K | X | | | | B | M | W | V | Z | RShft | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | LGui | [ | ] |CtlShf| SYMB | | Left | Up | Down | Right| \ | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | LCtrl| LAlt | | MDIA | RAlt | + * ,------|------|------| |------+------+------. + * | Ctl/ | Alt/ | Home | | PgUp | | SYMB/| + * | BkSp | Del |------| |------| Enter| Space| + * | | | NUMP | | PgDn | | | + * `--------------------' `--------------------' + */ + +// BASE +[BASE] = KEYMAP( + // left hand + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, + KC_BSLS,KC_QUOT,KC_COMM, KC_DOT, KC_P, KC_Y, KC_HOME, + KC_TAB, KC_A, KC_O, KC_E, KC_U, KC_I, + KC_LSFT,KC_SCLN,KC_Q, KC_J, KC_K, KC_X, ALL_T(KC_NO), + KC_LGUI,KC_LBRC,KC_RBRC, LCTL(KC_LSFT), MO(SYMB), + + KC_LCTL, KC_LALT, + KC_HOME, + CTL_T(KC_BSPC), ALT_T(KC_DEL), MO(NUMP), + // right hand + TG(SYMB), KC_6, KC_7, KC_8, KC_9, KC_0, KC_SLSH, + KC_BSPC, KC_F, KC_G, KC_C, KC_R, KC_L, KC_EQL, + KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, + KC_BSLS, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, + KC_LEFT,KC_UP, KC_DOWN,KC_RGHT,KC_BSLS, + + MO(MDIA), KC_RALT, + KC_PGUP, + KC_PGDN, KC_ENT, LT(SYMB,KC_SPC) + ), + + /* + * Keymap: QWERTY layout. + * + * This is optimized for gaming, not typing, so there aren't as many macros + * as the Dvorak layer. Some of the keys have also been moved to "game- + * like" locations, such as making the spacebar available to the left thumb, + * and repositioning the arrow keys at the bottom right corner. + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | Esc | |~SYMB | 6 | 7 | 8 | 9 | 0 | - | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | LShift | Q | W | E | R | T | +L1 | | BkSp | Y | U | I | O | P | ] | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Tab | A | S | D | F | G |------| |------| H | J | K | L | ; | ' | + * |--------+------+------+------+------+------| FN2 | | ~L1 |------+------+------+------+------+--------| + * | LShft | Z | X | C | V | B | | | | N | M | , | . | Up | RShft | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | LCtrl| ` | \ |CtlShf| SYMB | | SYMB | / | Left | Down | Right| + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | LCtrl| LAlt | | MDIA | ~GAME| + * ,------|------|------| |------+------+------. + * | | | Home | | PgUp | | SYMB/ + * | Space| LAlt |------| |------| Enter| Space| + * | | | End | | PgDn | | | + * `--------------------' `--------------------' + */ +[QWRT] = KEYMAP( // Layer1: QWERTY + // left hand + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, + KC_LSFT,KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HOME, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), + KC_LCTL,KC_GRV, KC_SLSH,LCTL(KC_LSFT), MO(SYMB), + + KC_LCTL,KC_LALT, + KC_HOME, + KC_SPC, KC_LALT, KC_END, + // right hand + TG(SYMB), KC_6, KC_7, KC_8, KC_9, KC_0, KC_RBRC, + KC_BSPC,KC_Y, KC_U, KC_I, KC_O, KC_P, KC_EQL, + KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_MINS, + KC_END, KC_N, KC_M, KC_COMM,KC_DOT, KC_UP ,KC_RSFT, + MO(SYMB),KC_UP, KC_LEFT,KC_DOWN,KC_RGHT, + + MO(MDIA),TG(GAME), + KC_PGUP, + KC_PGDN,KC_ENT,LT(SYMB,KC_SPC) + ), + + /* + * Keymap: Symbol / navigation Layer + * + * Inspired by Atreus. + * Note the two keys on the left thumb cluster. These change the "default" layer between key layouts. + * The RESET button also resets the Teensy, but note bug #164. + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | ! | @ | Up | { | } | | | | | Home | Up | End | | F12 | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | # | / | | | \ | $ |------| |------| | Left | Down | Right| | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | [ | ] | ( | ) | & | | | | | PgUp | | PgDn | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | SYMB | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * |Dvorak|QWERTY| | | RESET| + * ,------|------|------| |------+------+------. + * | | |Colemk| | | | | + * | | |------| |------| | SYMB | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[SYMB] = KEYMAP( + // left hand + _______,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, + _______,KC_EXLM,KC_AT, KC_UP, KC_LCBR,KC_RCBR,_______, + _______,KC_HASH,KC_SLSH,KC_PIPE,KC_BSLS,KC_DLR, + _______,KC_LBRC,KC_RBRC,KC_LPRN,KC_RPRN,KC_AMPR,_______, + _______,_______,_______,_______,_______, + + DF(BASE),DF(QWRT), + DF(CODH), + _______, _______, _______, + + // right hand + _______,KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______,_______,KC_HOME,KC_UP, KC_END, _______,KC_F12, + _______,KC_LEFT,KC_DOWN,KC_RGHT,_______,_______, + _______,_______,KC_PGUP,_______,KC_PGDN,_______,_______, + _______,_______,_______,_______,_______, + + _______, RESET, + _______, + _______, _______, _______ +), +/* Keymap: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | MsUp | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | Prev | Next | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | |Brwser| + * | | |------| |------| |Back | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// MEDIA AND MOUSE +[MDIA] = KEYMAP( + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_MS_U, _______, _______, _______, + _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_BTN1, KC_BTN2, + _______, _______, + _______, + _______, _______, _______, + // right hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, KC_MPLY, + _______, _______, _______, KC_MPRV, KC_MNXT, _______, _______, + KC_VOLU, KC_VOLD, KC_MUTE, _______, _______, + _______, _______, + _______, + _______, _______, KC_WBAK +), + +/* + * Keymap: Number pad. + * + * Note that the number keys here are actually numpad keystrokes. This often doesn't matter, but it may be relevant in a few cases. + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | | 7 | 8 | 9 | * | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| | 4 | 5 | 6 | + | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | 1 | 2 | 3 | / | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | 0 | . | 0 | = | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | Enter| + * | | | | | | | | + * `--------------------' `--------------------' + */ +[NUMP] = KEYMAP( + // left hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + + _______,_______, + _______, + _______,_______,_______, + // right hand + _______,_______,_______,_______,_______,_______,_______, + _______,KC_UP, KC_P7, KC_P8, KC_P9, KC_PAST,KC_F12, + KC_DOWN,KC_P4, KC_P5, KC_P6, KC_PPLS,_______, + _______,KC_AMPR,KC_P1, KC_P2, KC_P3, KC_PSLS,_______, + KC_P0, KC_PDOT,KC_P0, KC_EQL, _______, + + _______, _______, + _______, + _______, _______, KC_PENT + ), + + /* + * Keymap: Gaming + * + * This is mostly a mouse overlay for the right hand while the left hand uses the QWERTY layout. + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | |WhlUp | MsUp |WhlDn | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| |MsLeft|MsDown|MsRght| | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | |MClick| | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | ~GAME| + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------|RClick|LClick| + * | | | | | | | | + * `--------------------' `--------------------' + */ +[GAME] = KEYMAP( + // left hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + + _______,_______, + _______, + _______,_______,_______, + + // right hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_WH_U, KC_MS_U, KC_WH_D, _______, _______, + _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + KC_BTN3, _______, _______, _______, _______, + _______, _______, + _______, + _______, KC_BTN2, KC_BTN1 + ), +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + case BASE: + ergodox_right_led_1_on(); + break; + case QWRT: + ergodox_right_led_2_on(); + case SYMB: + ergodox_right_led_3_on(); + break; + case GAME: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + default: + // none + break; + } + +}; -- cgit v1.2.3 From fb46eb2de1b16f4700b486c9ef7fb34d35025209 Mon Sep 17 00:00:00 2001 From: Josh Colbeck Date: Tue, 12 Jul 2016 23:52:02 -0500 Subject: Added open resource macro tap to type, hold for resource --- keyboards/ergodox_ez/keymaps/josh/keymap.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/keyboards/ergodox_ez/keymaps/josh/keymap.c b/keyboards/ergodox_ez/keymaps/josh/keymap.c index de5664a25..9ceb87423 100644 --- a/keyboards/ergodox_ez/keymaps/josh/keymap.c +++ b/keyboards/ergodox_ez/keymaps/josh/keymap.c @@ -7,15 +7,16 @@ #define MDIA 2 // media keys //macros -#define CTL_SFT_T 100 -#define CTL_SFT_G 101 -#define CTL_ALT_H 102 +#define CTL_SFT_T 100 // open type +#define CTL_SFT_G 101 // find references +#define CTL_ALT_H 102 // open call hierarchy +#define CTL_SFT_R 103 // open resource const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 0: Basic layer * * ,--------------------------------------------------. ,--------------------------------------------------. - * | = | 1 | 2 | 3 | 4 | 5 | ESC | | M 100| 6 | 7 | 8 | 9 | 0 | - | + * | = | 1 | 2 | 3 | 4 | 5 | ESC | |M100/3| 6 | 7 | 8 | 9 | 0 | - | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * |TAB /Alt| Q | W | E | R | T | Meh | | Meh | Y | U | I | O | P |\ / ALT | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| @@ -46,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_HOME, KC_SPC,KC_BSPC,KC_END, // right hand - M(CTL_SFT_T),KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + LT(M(CTL_SFT_T), M(CTL_SFT_R)),KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, MEH_T(KC_NO),KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),CTL_T(KC_QUOT), MO(SYMB), KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, @@ -171,6 +172,12 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) } return MACRO(U(LCTL), U(LALT), END); break; + case CTL_SFT_R: + if (record->event.pressed) { + return MACRO(D(LCTL), D(LSFT), T(R), END); + } + return MACRO(U(LCTL), U(LSFT), END); + break; } return MACRO_NONE; }; -- cgit v1.2.3 From f90d89458c9ff8e33f1739c06681f28ffd95b5f9 Mon Sep 17 00:00:00 2001 From: Joshua T Date: Mon, 11 Jul 2016 17:49:12 -0500 Subject: Created replicaJunction keymaps. --- keyboards/atreus/keymaps/replicaJunction/keymap.c | 89 +++++ .../ergodox_ez/keymaps/replicaJunction/keymap.c | 414 +++++++++++++++++++++ 2 files changed, 503 insertions(+) create mode 100644 keyboards/atreus/keymaps/replicaJunction/keymap.c create mode 100644 keyboards/ergodox_ez/keymaps/replicaJunction/keymap.c diff --git a/keyboards/atreus/keymaps/replicaJunction/keymap.c b/keyboards/atreus/keymaps/replicaJunction/keymap.c new file mode 100644 index 000000000..79b2738aa --- /dev/null +++ b/keyboards/atreus/keymaps/replicaJunction/keymap.c @@ -0,0 +1,89 @@ +#include "atreus.h" + +/* + * Keyboard: Atreus + * Keymap: replicaJunction + * Version: 0.1 + * + * This keymap is designed to complement my Ergodox keyboard layout, found in keyboards/ergodox_ez. + * The Atreus keyboard is a 40% board whose design was heavily influenced by the Ergodox, and I now + * have both keyboards, so I've designed these layouts in an effort to make switching between the + * two as easy as possible. + * + * Clearly, the Atreus is the limiting factor in this equation, so I've taken heavy advantage of + * function and dual-role keys. + * + * The default key layout in this keymap is Colemak-ModDH. Information on that layout can be found + * here: https://colemakmods.github.io/mod-dh/ + */ + +// 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. + +// Note that whatever is set as layer 0 will be the default layer of the keyboard. + +#define _CO 0 // Colemak +#define _QW 1 // QWERTY +#define _NU 2 // Numpad +#define _FN 3 // Function +#define _DV 4 // Dvorak + +// Quick alias for visual sake +#define _______ KC_TRNS + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_CO] = { + {KC_Q, KC_W, KC_F, KC_P, KC_B, _______, KC_J, KC_L, KC_U, KC_Y, KC_SCLN }, + {KC_A, KC_R, KC_S, KC_T, KC_G, _______, KC_M, KC_N, KC_E, KC_I, KC_O }, + {KC_Z, KC_X, KC_C, KC_D, KC_V, KC_LCTL, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH }, + {KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_LALT, KC_SPC, MO(_NU), KC_MINS, KC_QUOT, KC_ENT } +}, + +[_DV] = { + {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_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_LCTL, KC_B, KC_M, KC_W, KC_V, KC_Z }, + {KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_LALT, KC_SPC, MO(_NU), KC_MINS, KC_SLSH, KC_ENT } +}, + +[_QW] = { /* Qwerty */ + {KC_Q, KC_W, KC_E, KC_R, KC_T, _______, KC_Y, KC_U, KC_I, KC_O, KC_P }, + {KC_A, KC_S, KC_D, KC_F, KC_G, _______, KC_H, KC_J, KC_K, KC_L, KC_SCLN }, + {KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LCTL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH }, + {KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_LALT, KC_SPC, MO(_NU), KC_MINS, KC_QUOT, KC_ENT } +}, + +[_NU] = { /* Numbers and symbols */ + {KC_EXLM, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR}, + {KC_HASH, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS}, + {KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_AMPR, KC_LCTL, KC_TILD, KC_1, KC_2, KC_3, KC_BSLS}, + {MO(_FN), KC_INS, KC_LGUI, KC_LSFT, KC_DEL, KC_LALT, KC_SPC, _______, KC_DOT, KC_0, KC_EQL} +}, + +[_FN] = { /* Functions */ + {KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10}, + {KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, _______, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11}, + {_______, _______, _______, _______, _______, KC_LCTL, _______, KC_F1, KC_F2, KC_F3, KC_F12}, + {_______, _______, KC_LGUI, KC_LSFT, KC_BSPC, KC_LALT, KC_SPC, _______, _______, _______, RESET} +}}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; diff --git a/keyboards/ergodox_ez/keymaps/replicaJunction/keymap.c b/keyboards/ergodox_ez/keymaps/replicaJunction/keymap.c new file mode 100644 index 000000000..be2290567 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/replicaJunction/keymap.c @@ -0,0 +1,414 @@ +#include "ergodox_ez.h" +#include "debug.h" +#include "action_layer.h" + +/* + * Keyboard: Ergodox + * Keymap: replicaJunction + * Version: 1.0 + * + * This keymap is designed to complement my Atreus keyboard layout, found in keyboards/atreus. + * The Atreus keyboard is a 40% board whose design was heavily influenced by the Ergodox, and I now + * have both keyboards, so I've designed these layouts in an effort to make switching between the + * two as easy as possible. + * + * The default key layout in this keymap is Colemak-ModDH. Information on that layout can be found + * here: https://colemakmods.github.io/mod-dh/ + */ + +#define BASE 0 // default layer +#define CODH 1 // Colemak +#define QWRT 2 // QWERTY layer +#define SYMB 3 // symbols +#define MDIA 4 // media keys +#define UTIL 5 // keyboard utilities +#define NUMP 6 // numpad +#define GAME 7 // mouse overlay for gaming + +#define _______ KC_TRNS // Simple alias that just makes the keymaps a bit easier to look at + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * Keymap: Colemak-ModDH + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | Esc | | ~SYMB| 6 | 7 | 8 | 9 | 0 | ' | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | \ | Q | W | F | P | B | Home | | BkSp | J | L | U | Y | ; | = | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Tab | A | R | S | T | G |------| |------| M | N | E | I | O | - | + * |--------+------+------+------+------+------| Hyper| | \ |------+------+------+------+------+--------| + * | LShft | Z | X | C | D | V | | | | K | H | , | , | / | RShft | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | LGui | [ | ] |CtlShf| SYMB | | Left | Up | Down | Right| \ | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | LCtrl| LAlt | | MDIA | RAlt | + * ,------|------|------| |------+------+------. + * | Ctl/ | Alt/ | Home | | PgUp | | SYMB/| + * | BkSp | Del |------| |------| Enter| Space| + * | | | NUMP | | PgDn | | | + * `--------------------' `--------------------' + */ + +[CODH] = KEYMAP( + // left hand + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, + KC_BSLS,KC_Q, KC_W, KC_F, KC_P, KC_B, KC_HOME, + KC_TAB, KC_A, KC_R, KC_S, KC_T, KC_G, + KC_LSFT,KC_Z, KC_X, KC_C, KC_D, KC_V, ALL_T(KC_NO), + KC_LGUI,KC_LBRC,KC_RBRC, LCTL(KC_LSFT), MO(SYMB), + + KC_LCTL, KC_LALT, + KC_HOME, + CTL_T(KC_BSPC), ALT_T(KC_DEL), MO(NUMP), + // right hand + TG(SYMB), KC_6, KC_7, KC_8, KC_9, KC_0, KC_QUOT, + KC_BSPC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN,KC_EQL, + KC_M, KC_N, KC_E, KC_I, KC_O, KC_MINS, + KC_BSLS, KC_K, KC_H, KC_DOT, KC_COMM,KC_SLSH,KC_RSFT, + KC_LEFT,KC_UP, KC_DOWN,KC_RGHT,KC_BSLS, + + MO(MDIA), KC_RALT, + KC_PGUP, + KC_PGDN, KC_ENT, LT(SYMB,KC_SPC) + ), + + /* + * Keymap: Dvorak layout + * + * The right index backspace is a nod to my TypeMatrix keyboard, which has + * Backspace in the center. + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | Esc | | ~SYMB| 6 | 7 | 8 | 9 | 0 | / | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | \ | ' | , | . | P | Y | Home | | BkSp | F | G | C | R | L | = | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Tab | A | O | E | U | I |------| |------| D | H | T | N | S | - | + * |--------+------+------+------+------+------| Hyper| | \ |------+------+------+------+------+--------| + * | LShft | ; | Q | J | K | X | | | | B | M | W | V | Z | RShft | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | LGui | [ | ] |CtlShf| SYMB | | Left | Up | Down | Right| \ | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | LCtrl| LAlt | | MDIA | RAlt | + * ,------|------|------| |------+------+------. + * | Ctl/ | Alt/ | Home | | PgUp | | SYMB/| + * | BkSp | Del |------| |------| Enter| Space| + * | | | NUMP | | PgDn | | | + * `--------------------' `--------------------' + */ + +// BASE +[BASE] = KEYMAP( + // left hand + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, + KC_BSLS,KC_QUOT,KC_COMM, KC_DOT, KC_P, KC_Y, KC_HOME, + KC_TAB, KC_A, KC_O, KC_E, KC_U, KC_I, + KC_LSFT,KC_SCLN,KC_Q, KC_J, KC_K, KC_X, ALL_T(KC_NO), + KC_LGUI,KC_LBRC,KC_RBRC, LCTL(KC_LSFT), MO(SYMB), + + KC_LCTL, KC_LALT, + KC_HOME, + CTL_T(KC_BSPC), ALT_T(KC_DEL), MO(NUMP), + // right hand + TG(SYMB), KC_6, KC_7, KC_8, KC_9, KC_0, KC_SLSH, + KC_BSPC, KC_F, KC_G, KC_C, KC_R, KC_L, KC_EQL, + KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, + KC_BSLS, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, + KC_LEFT,KC_UP, KC_DOWN,KC_RGHT,KC_BSLS, + + MO(MDIA), KC_RALT, + KC_PGUP, + KC_PGDN, KC_ENT, LT(SYMB,KC_SPC) + ), + + /* + * Keymap: QWERTY layout. + * + * This is optimized for gaming, not typing, so there aren't as many macros + * as the Dvorak layer. Some of the keys have also been moved to "game- + * like" locations, such as making the spacebar available to the left thumb, + * and repositioning the arrow keys at the bottom right corner. + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | Esc | |~SYMB | 6 | 7 | 8 | 9 | 0 | - | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | LShift | Q | W | E | R | T | +L1 | | BkSp | Y | U | I | O | P | ] | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Tab | A | S | D | F | G |------| |------| H | J | K | L | ; | ' | + * |--------+------+------+------+------+------| FN2 | | ~L1 |------+------+------+------+------+--------| + * | LShft | Z | X | C | V | B | | | | N | M | , | . | Up | RShft | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | LCtrl| ` | \ |CtlShf| SYMB | | SYMB | / | Left | Down | Right| + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | LCtrl| LAlt | | MDIA | ~GAME| + * ,------|------|------| |------+------+------. + * | | | Home | | PgUp | | SYMB/ + * | Space| LAlt |------| |------| Enter| Space| + * | | | End | | PgDn | | | + * `--------------------' `--------------------' + */ +[QWRT] = KEYMAP( // Layer1: QWERTY + // left hand + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, + KC_LSFT,KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HOME, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), + KC_LCTL,KC_GRV, KC_SLSH,LCTL(KC_LSFT), MO(SYMB), + + KC_LCTL,KC_LALT, + KC_HOME, + KC_SPC, KC_LALT, KC_END, + // right hand + TG(SYMB), KC_6, KC_7, KC_8, KC_9, KC_0, KC_RBRC, + KC_BSPC,KC_Y, KC_U, KC_I, KC_O, KC_P, KC_EQL, + KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_MINS, + KC_END, KC_N, KC_M, KC_COMM,KC_DOT, KC_UP ,KC_RSFT, + MO(SYMB),KC_UP, KC_LEFT,KC_DOWN,KC_RGHT, + + MO(MDIA),TG(GAME), + KC_PGUP, + KC_PGDN,KC_ENT,LT(SYMB,KC_SPC) + ), + + /* + * Keymap: Symbol / navigation Layer + * + * Inspired by Atreus. + * Note the two keys on the left thumb cluster. These change the "default" layer between key layouts. + * The RESET button also resets the Teensy, but note bug #164. + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | ! | @ | Up | { | } | | | | | Home | Up | End | | F12 | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | # | / | | | \ | $ |------| |------| | Left | Down | Right| | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | [ | ] | ( | ) | & | | | | | PgUp | | PgDn | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | SYMB | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * |Dvorak|QWERTY| | | RESET| + * ,------|------|------| |------+------+------. + * | | |Colemk| | | | | + * | | |------| |------| | SYMB | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[SYMB] = KEYMAP( + // left hand + _______,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, + _______,KC_EXLM,KC_AT, KC_UP, KC_LCBR,KC_RCBR,_______, + _______,KC_HASH,KC_SLSH,KC_PIPE,KC_BSLS,KC_DLR, + _______,KC_LBRC,KC_RBRC,KC_LPRN,KC_RPRN,KC_AMPR,_______, + _______,_______,_______,_______,_______, + + DF(BASE),DF(QWRT), + DF(CODH), + _______, _______, _______, + + // right hand + _______,KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______,_______,KC_HOME,KC_UP, KC_END, _______,KC_F12, + _______,KC_LEFT,KC_DOWN,KC_RGHT,_______,_______, + _______,_______,KC_PGUP,_______,KC_PGDN,_______,_______, + _______,_______,_______,_______,_______, + + _______, RESET, + _______, + _______, _______, _______ +), +/* Keymap: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | MsUp | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | Prev | Next | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | |Brwser| + * | | |------| |------| |Back | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// MEDIA AND MOUSE +[MDIA] = KEYMAP( + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_MS_U, _______, _______, _______, + _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_BTN1, KC_BTN2, + _______, _______, + _______, + _______, _______, _______, + // right hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, KC_MPLY, + _______, _______, _______, KC_MPRV, KC_MNXT, _______, _______, + KC_VOLU, KC_VOLD, KC_MUTE, _______, _______, + _______, _______, + _______, + _______, _______, KC_WBAK +), + +/* + * Keymap: Number pad. + * + * Note that the number keys here are actually numpad keystrokes. This often doesn't matter, but it may be relevant in a few cases. + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | | 7 | 8 | 9 | * | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| | 4 | 5 | 6 | + | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | 1 | 2 | 3 | / | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | 0 | . | 0 | = | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | Enter| + * | | | | | | | | + * `--------------------' `--------------------' + */ +[NUMP] = KEYMAP( + // left hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + + _______,_______, + _______, + _______,_______,_______, + // right hand + _______,_______,_______,_______,_______,_______,_______, + _______,KC_UP, KC_P7, KC_P8, KC_P9, KC_PAST,KC_F12, + KC_DOWN,KC_P4, KC_P5, KC_P6, KC_PPLS,_______, + _______,KC_AMPR,KC_P1, KC_P2, KC_P3, KC_PSLS,_______, + KC_P0, KC_PDOT,KC_P0, KC_EQL, _______, + + _______, _______, + _______, + _______, _______, KC_PENT + ), + + /* + * Keymap: Gaming + * + * This is mostly a mouse overlay for the right hand while the left hand uses the QWERTY layout. + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | |WhlUp | MsUp |WhlDn | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| |MsLeft|MsDown|MsRght| | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | |MClick| | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | ~GAME| + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------|RClick|LClick| + * | | | | | | | | + * `--------------------' `--------------------' + */ +[GAME] = KEYMAP( + // left hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + + _______,_______, + _______, + _______,_______,_______, + + // right hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_WH_U, KC_MS_U, KC_WH_D, _______, _______, + _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + KC_BTN3, _______, _______, _______, _______, + _______, _______, + _______, + _______, KC_BTN2, KC_BTN1 + ), +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + case BASE: + ergodox_right_led_1_on(); + break; + case QWRT: + ergodox_right_led_2_on(); + case SYMB: + ergodox_right_led_3_on(); + break; + case GAME: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + default: + // none + break; + } + +}; -- cgit v1.2.3 From 77377e2784705a6d31b81dc1a855201ff26700dc Mon Sep 17 00:00:00 2001 From: Joshua T Date: Fri, 15 Jul 2016 17:44:39 -0500 Subject: Fixed a merge conflict --- keyboards/atreus/keymaps/replicaJunction/keymap.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/keyboards/atreus/keymaps/replicaJunction/keymap.c b/keyboards/atreus/keymaps/replicaJunction/keymap.c index 992eabdbd..f2a8ff24c 100644 --- a/keyboards/atreus/keymaps/replicaJunction/keymap.c +++ b/keyboards/atreus/keymaps/replicaJunction/keymap.c @@ -1,6 +1,3 @@ -<<<<<<< HEAD -#include "atreus.h" - /* * Keyboard: Atreus * Keymap: replicaJunction @@ -17,12 +14,6 @@ * The default key layout in this keymap is Colemak-ModDH. Information on that layout can be found * here: https://colemakmods.github.io/mod-dh/ */ -======= -// this is the style you want to emulate. -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, - -#include "atreus.h" ->>>>>>> 32725dae5ba50f41bf16a80083727f08beaea7c6 // 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. -- cgit v1.2.3 From c5768a5f32b4521567688635a628d997ff7784e7 Mon Sep 17 00:00:00 2001 From: Joshua T Date: Fri, 15 Jul 2016 17:49:14 -0500 Subject: Added default layer switch QWERTY to Colemak --- keyboards/atreus/keymaps/replicaJunction/keymap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboards/atreus/keymaps/replicaJunction/keymap.c b/keyboards/atreus/keymaps/replicaJunction/keymap.c index f2a8ff24c..020d7a77c 100644 --- a/keyboards/atreus/keymaps/replicaJunction/keymap.c +++ b/keyboards/atreus/keymaps/replicaJunction/keymap.c @@ -26,7 +26,7 @@ #define _QW 1 // QWERTY #define _NU 2 // Numpad #define _FN 3 // Function -#define _DV 4 // Dvorak +#define _DV 4 // Dvorak (not currently used) // Quick alias for visual sake #define _______ KC_TRNS @@ -55,7 +55,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_NU] = { /* Numbers and symbols */ {KC_EXLM, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR}, - {KC_HASH, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS}, + {KC_HASH, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS}, {KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_AMPR, KC_LCTL, KC_TILD, KC_1, KC_2, KC_3, KC_BSLS}, {MO(_FN), KC_INS, KC_LGUI, KC_LSFT, KC_DEL, KC_LALT, KC_SPC, _______, KC_DOT, KC_0, KC_EQL} }, @@ -64,7 +64,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10}, {KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, _______, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11}, {_______, _______, _______, _______, _______, KC_LCTL, _______, KC_F1, KC_F2, KC_F3, KC_F12}, - {_______, _______, KC_LGUI, KC_LSFT, KC_BSPC, KC_LALT, KC_SPC, _______, _______, _______, RESET} + {_______, _______, KC_LGUI, KC_LSFT, KC_BSPC, KC_LALT, KC_SPC, _______, DF(_CO), DF(_QW), RESET} }}; const uint16_t PROGMEM fn_actions[] = { -- cgit v1.2.3 From 243ae75256d5458a7ef11985aa008c797ff18add Mon Sep 17 00:00:00 2001 From: Joshua T Date: Fri, 15 Jul 2016 17:49:14 -0500 Subject: Added default layer switch QWERTY to Colemak --- keyboards/atreus/keymaps/replicaJunction/keymap.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/keyboards/atreus/keymaps/replicaJunction/keymap.c b/keyboards/atreus/keymaps/replicaJunction/keymap.c index f2a8ff24c..30d2ef81a 100644 --- a/keyboards/atreus/keymaps/replicaJunction/keymap.c +++ b/keyboards/atreus/keymaps/replicaJunction/keymap.c @@ -15,6 +15,8 @@ * here: https://colemakmods.github.io/mod-dh/ */ +#include "atreus.h" + // 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 @@ -26,7 +28,7 @@ #define _QW 1 // QWERTY #define _NU 2 // Numpad #define _FN 3 // Function -#define _DV 4 // Dvorak +#define _DV 4 // Dvorak (not currently used) // Quick alias for visual sake #define _______ KC_TRNS @@ -55,7 +57,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_NU] = { /* Numbers and symbols */ {KC_EXLM, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR}, - {KC_HASH, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS}, + {KC_HASH, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS}, {KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_AMPR, KC_LCTL, KC_TILD, KC_1, KC_2, KC_3, KC_BSLS}, {MO(_FN), KC_INS, KC_LGUI, KC_LSFT, KC_DEL, KC_LALT, KC_SPC, _______, KC_DOT, KC_0, KC_EQL} }, @@ -64,7 +66,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10}, {KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, _______, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11}, {_______, _______, _______, _______, _______, KC_LCTL, _______, KC_F1, KC_F2, KC_F3, KC_F12}, - {_______, _______, KC_LGUI, KC_LSFT, KC_BSPC, KC_LALT, KC_SPC, _______, _______, _______, RESET} + {_______, _______, KC_LGUI, KC_LSFT, KC_BSPC, KC_LALT, KC_SPC, _______, DF(_CO), DF(_QW), RESET} }}; const uint16_t PROGMEM fn_actions[] = { -- cgit v1.2.3 From 377bcb00fb1a88a9549381f5da1e7b11cd623296 Mon Sep 17 00:00:00 2001 From: Joshua T Date: Tue, 19 Jul 2016 17:01:21 -0500 Subject: Added Gaming layer and removed Dvorak Also added tap/hold functions on central keys --- keyboards/atreus/keymaps/replicaJunction/keymap.c | 46 +++++++++++------------ 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/keyboards/atreus/keymaps/replicaJunction/keymap.c b/keyboards/atreus/keymaps/replicaJunction/keymap.c index 30d2ef81a..ba1331bce 100644 --- a/keyboards/atreus/keymaps/replicaJunction/keymap.c +++ b/keyboards/atreus/keymaps/replicaJunction/keymap.c @@ -26,47 +26,47 @@ #define _CO 0 // Colemak #define _QW 1 // QWERTY -#define _NU 2 // Numpad -#define _FN 3 // Function -#define _DV 4 // Dvorak (not currently used) +#define _GA 2 // Gaming +#define _NU 3 // Numpad +#define _FN 4 // Function // Quick alias for visual sake #define _______ KC_TRNS const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_CO] = { - {KC_Q, KC_W, KC_F, KC_P, KC_B, _______, KC_J, KC_L, KC_U, KC_Y, KC_SCLN }, - {KC_A, KC_R, KC_S, KC_T, KC_G, _______, KC_M, KC_N, KC_E, KC_I, KC_O }, - {KC_Z, KC_X, KC_C, KC_D, KC_V, KC_LCTL, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH }, - {KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_LALT, KC_SPC, MO(_NU), KC_MINS, KC_QUOT, KC_ENT } -}, - -[_DV] = { - {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_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_LCTL, KC_B, KC_M, KC_W, KC_V, KC_Z }, - {KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_LALT, KC_SPC, MO(_NU), KC_MINS, KC_SLSH, KC_ENT } + {KC_Q, KC_W, KC_F, KC_P, KC_B, _______, KC_J, KC_L, KC_U, KC_Y, KC_SCLN }, + {KC_A, KC_R, KC_S, KC_T, KC_G, _______, KC_M, KC_N, KC_E, KC_I, KC_O }, + {KC_Z, KC_X, KC_C, KC_D, KC_V, CTL_T(KC_BSPC), KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH }, + {KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_LSFT, ALT_T(KC_ENT), LT(_NU, KC_SPC), MO(_NU), KC_MINS, KC_QUOT, KC_EQL } }, [_QW] = { /* Qwerty */ - {KC_Q, KC_W, KC_E, KC_R, KC_T, _______, KC_Y, KC_U, KC_I, KC_O, KC_P }, - {KC_A, KC_S, KC_D, KC_F, KC_G, _______, KC_H, KC_J, KC_K, KC_L, KC_SCLN }, - {KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LCTL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH }, - {KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_LALT, KC_SPC, MO(_NU), KC_MINS, KC_QUOT, KC_ENT } + {KC_Q, KC_W, KC_E, KC_R, KC_T, _______, KC_Y, KC_U, KC_I, KC_O, KC_P }, + {KC_A, KC_S, KC_D, KC_F, KC_G, _______, KC_H, KC_J, KC_K, KC_L, KC_SCLN }, + {KC_Z, KC_X, KC_C, KC_V, KC_B, CTL_T(KC_BSPC), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH }, + {KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, ALT_T(KC_ENT), LT(_NU, KC_SPC), MO(_NU), TG(_GA), KC_QUOT, KC_EQL } }, [_NU] = { /* Numbers and symbols */ - {KC_EXLM, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR}, + {KC_GRV, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR}, {KC_HASH, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS}, - {KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_AMPR, KC_LCTL, KC_TILD, KC_1, KC_2, KC_3, KC_BSLS}, - {MO(_FN), KC_INS, KC_LGUI, KC_LSFT, KC_DEL, KC_LALT, KC_SPC, _______, KC_DOT, KC_0, KC_EQL} + {KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_AMPR, CTL_T(KC_BSPC), KC_TILD, KC_1, KC_2, KC_3, KC_BSLS}, + {MO(_FN), KC_INS, KC_LGUI, KC_LSFT, _______, _______, KC_SPC, _______, KC_DOT, KC_0, _______} }, [_FN] = { /* Functions */ {KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10}, {KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, _______, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11}, - {_______, _______, _______, _______, _______, KC_LCTL, _______, KC_F1, KC_F2, KC_F3, KC_F12}, - {_______, _______, KC_LGUI, KC_LSFT, KC_BSPC, KC_LALT, KC_SPC, _______, DF(_CO), DF(_QW), RESET} + {_______, _______, _______, _______, _______, _______, _______, KC_F1, KC_F2, KC_F3, KC_F12}, + {_______, _______, KC_LGUI, KC_LSFT, _______, _______, KC_SPC, _______, DF(_CO), DF(_QW), RESET} +}, + +[_GA] = { /* Gaming */ + {_______, _______, _______, _______, _______, _______, _______, KC_WH_U, KC_MS_U, KC_WH_D, _______ }, + {_______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______ }, + {_______, _______, _______, _______, _______, KC_BSPC, KC_BTN3, _______, KC_MS_D, _______, _______ }, + {_______, _______, _______, _______, KC_SPC, KC_BTN2, KC_BTN1, _______, _______, _______, _______ }, }}; const uint16_t PROGMEM fn_actions[] = { -- cgit v1.2.3 From 8cb2cf375b1494875551a42dbf8d6829f0dd7a92 Mon Sep 17 00:00:00 2001 From: Joshua T Date: Tue, 19 Jul 2016 17:33:10 -0500 Subject: Adjusted Atreus KEYMAP() function. This change adjusts the KEYMAP() function to provide a more visual representation of the key positions on the keyboard. Previously, keymaps have been defined directly using arrays for the Atreus keyboard. While this works, it doesn't utilize the helpful KEYMAP() function at all to allow the user to visually position the key codes for ease of editing. See the Ergodox-EZ KEYMAP() function and layouts for a great example of how this can work. This change should not break any existing Atreus layouts. At the time of this commit, there are two existing layouts for the Atreus board, and neither use the KEYMAP() function. --- keyboards/atreus/atreus.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/keyboards/atreus/atreus.h b/keyboards/atreus/atreus.h index 2b3803bc2..f841c3519 100644 --- a/keyboards/atreus/atreus.h +++ b/keyboards/atreus/atreus.h @@ -10,16 +10,16 @@ // The first section contains all of the arguements // The second converts the arguments into a two-dimensional array #define KEYMAP( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ ) \ { \ { k00, k01, k02, k03, k04, KC_NO, k05, k06, k07, k08, k09 }, \ { k10, k11, k12, k13, k14, KC_NO, k15, k16, k17, k18, k19 }, \ { k20, k21, k22, k23, k24, k35, k25, k26, k27, k28, k29 }, \ - { k2a, k30, k31, k32, k33, k34, k36, k37, k38, k39, k3a } \ + { k30, k31, k32, k33, k34, k36, k37, k38, k39, k3a, k3b } \ } #endif -- cgit v1.2.3 From 2a4947b28b55c084191e6c51e3194311432c4fc2 Mon Sep 17 00:00:00 2001 From: Joshua T Date: Tue, 19 Jul 2016 17:39:15 -0500 Subject: Modified Atreus layout to account for keymap() function --- keyboards/atreus/keymaps/replicaJunction/keymap.c | 60 +++++++++++------------ 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/keyboards/atreus/keymaps/replicaJunction/keymap.c b/keyboards/atreus/keymaps/replicaJunction/keymap.c index ba1331bce..d96fe008a 100644 --- a/keyboards/atreus/keymaps/replicaJunction/keymap.c +++ b/keyboards/atreus/keymaps/replicaJunction/keymap.c @@ -34,40 +34,40 @@ #define _______ KC_TRNS const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_CO] = { - {KC_Q, KC_W, KC_F, KC_P, KC_B, _______, KC_J, KC_L, KC_U, KC_Y, KC_SCLN }, - {KC_A, KC_R, KC_S, KC_T, KC_G, _______, KC_M, KC_N, KC_E, KC_I, KC_O }, - {KC_Z, KC_X, KC_C, KC_D, KC_V, CTL_T(KC_BSPC), KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH }, - {KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_LSFT, ALT_T(KC_ENT), LT(_NU, KC_SPC), MO(_NU), KC_MINS, KC_QUOT, KC_EQL } -}, +[_CO] = KEYMAP( + KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, + KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, + KC_Z, KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, + KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_LSFT, CTL_T(KC_BSPC), ALT_T(KC_ENT), LT(_NU, KC_SPC), MO(_NU), KC_MINS, KC_QUOT, KC_EQL +), -[_QW] = { /* Qwerty */ - {KC_Q, KC_W, KC_E, KC_R, KC_T, _______, KC_Y, KC_U, KC_I, KC_O, KC_P }, - {KC_A, KC_S, KC_D, KC_F, KC_G, _______, KC_H, KC_J, KC_K, KC_L, KC_SCLN }, - {KC_Z, KC_X, KC_C, KC_V, KC_B, CTL_T(KC_BSPC), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH }, - {KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, ALT_T(KC_ENT), LT(_NU, KC_SPC), MO(_NU), TG(_GA), KC_QUOT, KC_EQL } -}, +[_QW] = KEYMAP( /* Qwerty */ + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, CTL_T(KC_BSPC), ALT_T(KC_ENT), LT(_NU, KC_SPC), MO(_NU), TG(_GA), KC_QUOT, KC_EQL +), -[_NU] = { /* Numbers and symbols */ - {KC_GRV, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR}, - {KC_HASH, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS}, - {KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_AMPR, CTL_T(KC_BSPC), KC_TILD, KC_1, KC_2, KC_3, KC_BSLS}, - {MO(_FN), KC_INS, KC_LGUI, KC_LSFT, _______, _______, KC_SPC, _______, KC_DOT, KC_0, _______} -}, +[_NU] = KEYMAP( /* Numbers and symbols */ + KC_GRV, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR, + KC_HASH, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS, + KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_AMPR, KC_TILD, KC_1, KC_2, KC_3, KC_BSLS, + MO(_FN), KC_INS, KC_LGUI, KC_LSFT, _______, CTL_T(KC_BSPC), _______, KC_SPC, _______, KC_DOT, KC_0, _______ +), -[_FN] = { /* Functions */ - {KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10}, - {KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, _______, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11}, - {_______, _______, _______, _______, _______, _______, _______, KC_F1, KC_F2, KC_F3, KC_F12}, - {_______, _______, KC_LGUI, KC_LSFT, _______, _______, KC_SPC, _______, DF(_CO), DF(_QW), RESET} -}, +[_FN] = KEYMAP( /* Functions */ + KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10, + KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11, + _______, _______, _______, _______, _______, _______, KC_F1, KC_F2, KC_F3, KC_F12, + _______, _______, KC_LGUI, KC_LSFT, _______, _______, _______, _______, _______, DF(_CO), DF(_QW), RESET +), -[_GA] = { /* Gaming */ - {_______, _______, _______, _______, _______, _______, _______, KC_WH_U, KC_MS_U, KC_WH_D, _______ }, - {_______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______ }, - {_______, _______, _______, _______, _______, KC_BSPC, KC_BTN3, _______, KC_MS_D, _______, _______ }, - {_______, _______, _______, _______, KC_SPC, KC_BTN2, KC_BTN1, _______, _______, _______, _______ }, -}}; +[_GA] = KEYMAP( /* Gaming */ + _______, _______, _______, _______, _______, _______, KC_WH_U, KC_MS_U, KC_WH_D, _______, + _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, + _______, _______, _______, _______, _______, KC_BTN3, _______, KC_MS_D, _______, _______, + _______, _______, _______, _______, KC_SPC, KC_BSPC, KC_BTN2, KC_BTN1, _______, _______, _______, _______ +)}; const uint16_t PROGMEM fn_actions[] = { -- cgit v1.2.3 From 15ee180f0e70b318d18ff3ec729f3c769eefec94 Mon Sep 17 00:00:00 2001 From: Joshua T Date: Wed, 20 Jul 2016 00:38:56 -0500 Subject: Created readme and added screenshots --- .../replicaJunction/atreus-replica-base.png | Bin 0 -> 76849 bytes .../replicaJunction/atreus-replica-extend.png | Bin 0 -> 87081 bytes .../replicaJunction/atreus-replica-function.png | Bin 0 -> 91768 bytes .../keymaps/replicaJunction/atreus-replica-num.png | Bin 0 -> 72341 bytes keyboards/atreus/keymaps/replicaJunction/keymap.c | 44 +++++++++++++------- keyboards/atreus/keymaps/replicaJunction/readme.md | 45 +++++++++++++++++++++ 6 files changed, 74 insertions(+), 15 deletions(-) create mode 100644 keyboards/atreus/keymaps/replicaJunction/atreus-replica-base.png create mode 100644 keyboards/atreus/keymaps/replicaJunction/atreus-replica-extend.png create mode 100644 keyboards/atreus/keymaps/replicaJunction/atreus-replica-function.png create mode 100644 keyboards/atreus/keymaps/replicaJunction/atreus-replica-num.png create mode 100644 keyboards/atreus/keymaps/replicaJunction/readme.md diff --git a/keyboards/atreus/keymaps/replicaJunction/atreus-replica-base.png b/keyboards/atreus/keymaps/replicaJunction/atreus-replica-base.png new file mode 100644 index 000000000..c8efae964 Binary files /dev/null and b/keyboards/atreus/keymaps/replicaJunction/atreus-replica-base.png differ diff --git a/keyboards/atreus/keymaps/replicaJunction/atreus-replica-extend.png b/keyboards/atreus/keymaps/replicaJunction/atreus-replica-extend.png new file mode 100644 index 000000000..8548543f0 Binary files /dev/null and b/keyboards/atreus/keymaps/replicaJunction/atreus-replica-extend.png differ diff --git a/keyboards/atreus/keymaps/replicaJunction/atreus-replica-function.png b/keyboards/atreus/keymaps/replicaJunction/atreus-replica-function.png new file mode 100644 index 000000000..262e08ac9 Binary files /dev/null and b/keyboards/atreus/keymaps/replicaJunction/atreus-replica-function.png differ diff --git a/keyboards/atreus/keymaps/replicaJunction/atreus-replica-num.png b/keyboards/atreus/keymaps/replicaJunction/atreus-replica-num.png new file mode 100644 index 000000000..fefea53c5 Binary files /dev/null and b/keyboards/atreus/keymaps/replicaJunction/atreus-replica-num.png differ diff --git a/keyboards/atreus/keymaps/replicaJunction/keymap.c b/keyboards/atreus/keymaps/replicaJunction/keymap.c index d96fe008a..aa0e26fa4 100644 --- a/keyboards/atreus/keymaps/replicaJunction/keymap.c +++ b/keyboards/atreus/keymaps/replicaJunction/keymap.c @@ -27,18 +27,25 @@ #define _CO 0 // Colemak #define _QW 1 // QWERTY #define _GA 2 // Gaming -#define _NU 3 // Numpad -#define _FN 4 // Function +#define _EX 3 // Extend +#define _NU 4 // Numpad +#define _FN 5 // Function -// Quick alias for visual sake +// Some quick aliases, just to make it look pretty #define _______ KC_TRNS +#define KCX_CA LCTL(KC_LALT) +#define KCX_CS LCTL(KC_LSFT) +#define KCX_CSA LCTL(LSFT(KC_LALT)) +#define KCX_LST LSFT(KC_TAB) + +; // This doesn't do anything. It's just for VSCode because its syntax highlighting is weird for the above #define statements. const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_CO] = KEYMAP( - KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, - KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, - KC_Z, KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, - KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_LSFT, CTL_T(KC_BSPC), ALT_T(KC_ENT), LT(_NU, KC_SPC), MO(_NU), KC_MINS, KC_QUOT, KC_EQL + KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, + KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, + KC_Z, KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, + KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, SFT_T(KC_BSPC), CTL_T(KC_DEL), ALT_T(KC_ENT), LT(_NU, KC_SPC), MO(_EX), KC_MINS, KC_QUOT, KC_EQL ), [_QW] = KEYMAP( /* Qwerty */ @@ -48,18 +55,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, CTL_T(KC_BSPC), ALT_T(KC_ENT), LT(_NU, KC_SPC), MO(_NU), TG(_GA), KC_QUOT, KC_EQL ), +[_EX] = KEYMAP( /* Extend */ + _______, _______, _______, _______, _______, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_DEL, + KC_LGUI, KC_LALT, KC_LSFT, KC_LCTL, _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_BSPC, + KC_HYPR, KCX_CSA, KCX_CA, KCX_CS, _______, _______, KCX_LST, _______, KC_TAB, _______, + _______, _______, _______, _______, _______, _______, _______, KC_SPC, _______, _______, _______, KC_PSCR +), + [_NU] = KEYMAP( /* Numbers and symbols */ - KC_GRV, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR, - KC_HASH, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS, - KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_AMPR, KC_TILD, KC_1, KC_2, KC_3, KC_BSLS, - MO(_FN), KC_INS, KC_LGUI, KC_LSFT, _______, CTL_T(KC_BSPC), _______, KC_SPC, _______, KC_DOT, KC_0, _______ + KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_AMPR, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR, + KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_PIPE, KC_4, KC_5, KC_6, KC_MINS, + KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_BSLS, KC_1, KC_2, KC_3, KC_PLUS, + MO(_FN), _______, KC_LABK, KC_RABK, _______, _______, _______, _______, KC_0, KC_DOT, KC_EQL, _______ ), [_FN] = KEYMAP( /* Functions */ - KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10, - KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11, - _______, _______, _______, _______, _______, _______, KC_F1, KC_F2, KC_F3, KC_F12, - _______, _______, KC_LGUI, KC_LSFT, _______, _______, _______, _______, _______, DF(_CO), DF(_QW), RESET + KC_DEL, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, KC_F7, KC_F8, KC_F9, KC_F10, + KC_BSPC, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, _______, KC_F4, KC_F5, KC_F6, KC_F11, + _______, KC_VOLU, KC_MUTE, KC_VOLD, KC_MPLY, _______, KC_F1, KC_F2, KC_F3, KC_F12, + _______, _______, _______, _______, KC_MSTP, _______, _______, _______, KC_NO, DF(_CO), DF(_QW), RESET ), [_GA] = KEYMAP( /* Gaming */ diff --git a/keyboards/atreus/keymaps/replicaJunction/readme.md b/keyboards/atreus/keymaps/replicaJunction/readme.md new file mode 100644 index 000000000..0e8950cd5 --- /dev/null +++ b/keyboards/atreus/keymaps/replicaJunction/readme.md @@ -0,0 +1,45 @@ +# replicaJunction - Atreus Layout # + +This layout is designed to make the absolute most out of the Atreus 40% keyboard. + +I was enchanted with the idea of the Atreus keyboard after using my Ergodox for several months. I wanted something of a similar form factor that was easily portable, so I could bring and transport a keyboard to my workplace without much hassle. After building the Atreus keyboard, though, I realized very quickly that the 40% form factor requires a lot more creativity than a full-size keyboard (even one as strangely-shaped as the Ergodox). + +The default Atreus keyboard layout provides all the necessary keys in order to function with the keyboard, but as a programmer, I needed quicker access to just about everything. I noticed that the default layer didn't include any dual-role keys, and so I started on my journey to build my perfect layout for the Atreus. + +I won't claim that this layout is perfect for everyone. It does make several significant changes from the "normal" Atreus layout. In my own use, though, I've found this keyboard turbocharges my Atreus, and gives it the power of a full-size keyboard without the size. + +## Base Layer ## + +![Atreus base layout](atreus-replica-base.png) + +The letters on this layout are arranged in the [Colemak Mod-DH layout](https://colemakmods.github.io/mod-dh/). + +Note that there are four dual-purpose keys: Shift (Backspace), Ctrl (Delete), Alt (Enter), and Space (Number layer). In QMK, these dual-role keys can be made to hold their primary key by double-tapping the key and holding on the second tap. For example, if I wanted to insert a long string of Spaces, I would tap the Space key, then tap it again and hold. A single press and hold would trigger the secondary function of the key instead. + +There is still one blank key on this layout. I haven't decided what to use it for yet. On my keyboard, I have this assigned to another Shift key. + +## Extend Layer ## + +![Atreus extend layer](atreus-replica-extend.png) + +This layout is designed primarily for keyboard navigation. Arrow keys are easily accessible under the right hand (a welcome change from the original Atreus layout, which places them under the left hand), along with Home/End and PgUp/PgDn. + +Modifiers are also placed under the home row of the left hand. One of the single keyboard actions I use most is Shift+Ctrl+Left/Right to select a whole word; this layer makes those keypresses simple by adding the Ctrl and Shift keys in easy-to-reach locations. In fact, I liked this idea so much that I added double modifiers in the row beneath it, so I can now press Ctrl+Shift with a single key instead of pressing both keys individually. Using this layer takes some practice to remember which modifiers are under which fingers, but it makes for much less awkward hand motions when using modifiers on a regular basis. + +The Space key exists to prevent going from this layer directly into the Number layer. + +## Number and Symbol Layer ## + +![Atreus number and symbol layer](atreus-replica-num.png) + +This layer provides the only way of accessing number keys on this keyboard, since it's too small for its own number row. Note that even though they are laid out in the number pad fashion, they send the "regular" number keystrokes. Games and programs that specifically use NumPad keys are not supported in this layout at the moment. + +This layer also provides plenty of symbol shortcuts. Most of these can be accessed through other means (like Shift+8 for the asterisk), but having shortcut keys to them makes for one less keypress, which adds up quickly when using these symbols on a regular basis. I've been through many revisions of this concept on my Ergodox as well as the Atreus, and I've finally arrived at this layout as the one that provides the symbols I need most frequently in places I can think to expect them. The Ordinary layout from the Ergodox-EZ keyboard in this repository was a large influence in this design. + +## Function Layer ## + +![Atreus function layer](atreus-replica-function.png) + +Function keys (F1-F12) are on this layer, as well as some more generic "functions" such as media keys. I've also set up a mirror image of the arrows from the Extend layer in case I need to use these with my left hand, but I don't do this very often. + +The reset key is on this layer, as well as a toggle from Colemak to QWERTY and back. The QWERTY layer is not currently documented (nor is a small "gaming" layer that adds mouse keys on top of QWERTY). \ No newline at end of file -- cgit v1.2.3 From aaa180f46309efebd3150ab4f3f9edd619a8f6f6 Mon Sep 17 00:00:00 2001 From: Josh Colbeck Date: Wed, 20 Jul 2016 23:15:15 -0500 Subject: Added reset keys --- keyboards/ergodox_ez/keymaps/josh/keymap.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/keyboards/ergodox_ez/keymaps/josh/keymap.c b/keyboards/ergodox_ez/keymaps/josh/keymap.c index 9ceb87423..35becaff8 100644 --- a/keyboards/ergodox_ez/keymaps/josh/keymap.c +++ b/keyboards/ergodox_ez/keymaps/josh/keymap.c @@ -38,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Otherwise, it needs KC_* [BASE] = KEYMAP( // layer 0 : default // left hand - KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, + LT(MDIA, KC_EQL),KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, ALT_T(KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, ALL_T(KC_NO), KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(SYMB), @@ -47,11 +47,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_HOME, KC_SPC,KC_BSPC,KC_END, // right hand - LT(M(CTL_SFT_T), M(CTL_SFT_R)),KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - MEH_T(KC_NO),KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, - KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),CTL_T(KC_QUOT), - MO(SYMB), KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, - LALT(KC_LSFT),KC_LEFT,KC_DOWN,KC_UP, KC_RIGHT, + LT(M(CTL_SFT_T), + M(CTL_SFT_R)),KC_6, KC_7, KC_8, KC_9, KC_0, LT(MDIA, KC_MINS), + MEH_T(KC_NO), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN), CTL_T(KC_QUOT), + MO(SYMB), KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, + LALT(KC_LSFT),KC_LEFT,KC_DOWN,KC_UP, KC_RIGHT, KC_LALT, KC_CAPS, KC_PGUP, KC_PGDN,KC_DEL, KC_ENT @@ -101,7 +102,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 2: Media and mouse keys * * ,--------------------------------------------------. ,--------------------------------------------------. - * | | | | | | | | | | | | | | | | + * | | | | | | |RESET | |RESET | | | | | | | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * | | | | MsUp | | | | | | | | | | | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| @@ -121,7 +122,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // MEDIA AND MOUSE [MDIA] = 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, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -130,7 +131,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, // right hand - 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, 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_MPLY, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, -- cgit v1.2.3 From 876a6bdd4ca9033972d0a2d8c0c563cc6d7d9e7e Mon Sep 17 00:00:00 2001 From: Joshua T Date: Tue, 26 Jul 2016 01:44:57 -0500 Subject: Modified Atreus extend and Ergodox. Atreus: Removed home row Shift. It's under the thumb anyway. Also replaced dual modifier keys with macro keys (cut, copy, paste, undo). Ergodox: Made Colemak the default layer instead of Dvorak. Also began the process of bringing it in line with the Atreus layout I've been working on. --- .../replicaJunction/atreus-replica-extend.png | Bin 87081 -> 88880 bytes keyboards/atreus/keymaps/replicaJunction/keymap.c | 17 +- keyboards/atreus/keymaps/replicaJunction/readme.md | 6 +- .../ergodox_ez/keymaps/replicaJunction/keymap.c | 302 +++++++++------------ .../ergodox_ez/keymaps/replicaJunction/readme.md | 5 + 5 files changed, 151 insertions(+), 179 deletions(-) create mode 100644 keyboards/ergodox_ez/keymaps/replicaJunction/readme.md diff --git a/keyboards/atreus/keymaps/replicaJunction/atreus-replica-extend.png b/keyboards/atreus/keymaps/replicaJunction/atreus-replica-extend.png index 8548543f0..fd8f0a6e2 100644 Binary files a/keyboards/atreus/keymaps/replicaJunction/atreus-replica-extend.png and b/keyboards/atreus/keymaps/replicaJunction/atreus-replica-extend.png differ diff --git a/keyboards/atreus/keymaps/replicaJunction/keymap.c b/keyboards/atreus/keymaps/replicaJunction/keymap.c index aa0e26fa4..0470a4fa1 100644 --- a/keyboards/atreus/keymaps/replicaJunction/keymap.c +++ b/keyboards/atreus/keymaps/replicaJunction/keymap.c @@ -1,10 +1,10 @@ /* * Keyboard: Atreus * Keymap: replicaJunction - * Version: 0.1 + * Version: 0.3 * * This keymap is designed to complement my Ergodox keyboard layout, found in keyboards/ergodox_ez. - * The Atreus keyboard is a 40% board whose design was heavily influenced by the Ergodox, and I now + * The Atreus keyboard is a 40% board whose design was heavily influenced by the Ergodox. I now * have both keyboards, so I've designed these layouts in an effort to make switching between the * two as easy as possible. * @@ -37,6 +37,13 @@ #define KCX_CS LCTL(KC_LSFT) #define KCX_CSA LCTL(LSFT(KC_LALT)) #define KCX_LST LSFT(KC_TAB) +#define KX_COPY LCTL(KC_C) +#define KX_CUT LCTL(KC_X) +#define KX_PAST LCTL(KC_V) +#define KX_UNDO LCTL(KC_Z) + +// Uses 5 bytes of memory per 8 keys, but makes sure modifiers don't get "stuck" switching layers +#define PREVENT_STUCK_MODIFIERS ; // This doesn't do anything. It's just for VSCode because its syntax highlighting is weird for the above #define statements. @@ -57,9 +64,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_EX] = KEYMAP( /* Extend */ _______, _______, _______, _______, _______, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_DEL, - KC_LGUI, KC_LALT, KC_LSFT, KC_LCTL, _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_BSPC, - KC_HYPR, KCX_CSA, KCX_CA, KCX_CS, _______, _______, KCX_LST, _______, KC_TAB, _______, - _______, _______, _______, _______, _______, _______, _______, KC_SPC, _______, _______, _______, KC_PSCR + _______, KC_LGUI, KC_LALT, KC_LCTL, _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_BSPC, + KX_UNDO, KX_CUT, KX_COPY, _______, KX_PAST, _______, KCX_LST, _______, KC_TAB, _______, + _______, _______, _______, _______, KC_LSFT, _______, _______, KC_SPC, _______, _______, _______, KC_PSCR ), [_NU] = KEYMAP( /* Numbers and symbols */ diff --git a/keyboards/atreus/keymaps/replicaJunction/readme.md b/keyboards/atreus/keymaps/replicaJunction/readme.md index 0e8950cd5..1b96926e4 100644 --- a/keyboards/atreus/keymaps/replicaJunction/readme.md +++ b/keyboards/atreus/keymaps/replicaJunction/readme.md @@ -24,9 +24,11 @@ There is still one blank key on this layout. I haven't decided what to use it fo This layout is designed primarily for keyboard navigation. Arrow keys are easily accessible under the right hand (a welcome change from the original Atreus layout, which places them under the left hand), along with Home/End and PgUp/PgDn. -Modifiers are also placed under the home row of the left hand. One of the single keyboard actions I use most is Shift+Ctrl+Left/Right to select a whole word; this layer makes those keypresses simple by adding the Ctrl and Shift keys in easy-to-reach locations. In fact, I liked this idea so much that I added double modifiers in the row beneath it, so I can now press Ctrl+Shift with a single key instead of pressing both keys individually. Using this layer takes some practice to remember which modifiers are under which fingers, but it makes for much less awkward hand motions when using modifiers on a regular basis. +Modifiers are also placed under the home row of the left hand. One of the single keyboard actions I use most is Shift+Ctrl+Left/Right to select a whole word; this layer makes those keypresses simple by adding the Ctrl and Shift keys in easy-to-reach locations. -The Space key exists to prevent going from this layer directly into the Number layer. +For the common Ctrl shortcuts, I also added some hotkeys to this layer over the letter keys they are associated with. This gives the Extend key some extra utility by letting it "feel" like a Ctrl key in some cases. + +The Space key exists to prevent going from this layer directly into the Number layer. Similarly, the Shift key on the left thumb helps make sure that the Backspace function doesn't fire (the other role of this key on the base layout). ## Number and Symbol Layer ## diff --git a/keyboards/ergodox_ez/keymaps/replicaJunction/keymap.c b/keyboards/ergodox_ez/keymaps/replicaJunction/keymap.c index be2290567..b0b5cab7b 100644 --- a/keyboards/ergodox_ez/keymaps/replicaJunction/keymap.c +++ b/keyboards/ergodox_ez/keymaps/replicaJunction/keymap.c @@ -5,7 +5,7 @@ /* * Keyboard: Ergodox * Keymap: replicaJunction - * Version: 1.0 + * Version: 1.1 * * This keymap is designed to complement my Atreus keyboard layout, found in keyboards/atreus. * The Atreus keyboard is a 40% board whose design was heavily influenced by the Ergodox, and I now @@ -16,62 +16,64 @@ * here: https://colemakmods.github.io/mod-dh/ */ -#define BASE 0 // default layer -#define CODH 1 // Colemak -#define QWRT 2 // QWERTY layer -#define SYMB 3 // symbols -#define MDIA 4 // media keys -#define UTIL 5 // keyboard utilities -#define NUMP 6 // numpad -#define GAME 7 // mouse overlay for gaming +#define _CO 0 // Colemak +#define _DV 1 // Dvorak +#define _QW 2 // QWERTY +#define _ME 3 // media keys +#define _NU 4 // numpad +#define _EX 5 // extend +#define _GA 6 // mouse overlay for gaming #define _______ KC_TRNS // Simple alias that just makes the keymaps a bit easier to look at +// Uses 5 bytes of memory per 8 keys, but makes sure modifiers don't get "stuck" switching layers +#define PREVENT_STUCK_MODIFIERS + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* * Keymap: Colemak-ModDH * * ,--------------------------------------------------. ,--------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | Esc | | ~SYMB| 6 | 7 | 8 | 9 | 0 | ' | + * | ` | 1 | 2 | 3 | 4 | 5 | Esc | | | 6 | 7 | 8 | 9 | 0 | = | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | \ | Q | W | F | P | B | Home | | BkSp | J | L | U | Y | ; | = | + * | \ | Q | W | F | P | B | Home | | BkSp | J | L | U | Y | ; | - | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | Tab | A | R | S | T | G |------| |------| M | N | E | I | O | - | + * | Tab | A | R | S | T | G |------| |------| M | N | E | I | O | ' | * |--------+------+------+------+------+------| Hyper| | \ |------+------+------+------+------+--------| * | LShft | Z | X | C | D | V | | | | K | H | , | , | / | RShft | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | LGui | [ | ] |CtlShf| SYMB | | Left | Up | Down | Right| \ | + * | LGui | [ | ] |CtlShf| | | _EX | - | ' | Right| \ | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. - * | LCtrl| LAlt | | MDIA | RAlt | + * | LCtrl| LAlt | | Left | Right| * ,------|------|------| |------+------+------. - * | Ctl/ | Alt/ | Home | | PgUp | | SYMB/| + * | Ctl/ | Alt/ | Home | | Up | | _NU/ | * | BkSp | Del |------| |------| Enter| Space| - * | | | NUMP | | PgDn | | | + * | | | _NU | | Down | | | * `--------------------' `--------------------' */ -[CODH] = KEYMAP( +[_CO] = KEYMAP( // left hand KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, KC_BSLS,KC_Q, KC_W, KC_F, KC_P, KC_B, KC_HOME, KC_TAB, KC_A, KC_R, KC_S, KC_T, KC_G, KC_LSFT,KC_Z, KC_X, KC_C, KC_D, KC_V, ALL_T(KC_NO), - KC_LGUI,KC_LBRC,KC_RBRC, LCTL(KC_LSFT), MO(SYMB), + KC_LGUI,KC_LBRC,KC_RBRC, LCTL(KC_LSFT), MO(_NU), KC_LCTL, KC_LALT, KC_HOME, - CTL_T(KC_BSPC), ALT_T(KC_DEL), MO(NUMP), + CTL_T(KC_BSPC), ALT_T(KC_DEL), MO(_NU), // right hand - TG(SYMB), KC_6, KC_7, KC_8, KC_9, KC_0, KC_QUOT, - KC_BSPC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN,KC_EQL, - KC_M, KC_N, KC_E, KC_I, KC_O, KC_MINS, - KC_BSLS, KC_K, KC_H, KC_DOT, KC_COMM,KC_SLSH,KC_RSFT, - KC_LEFT,KC_UP, KC_DOWN,KC_RGHT,KC_BSLS, - - MO(MDIA), KC_RALT, - KC_PGUP, - KC_PGDN, KC_ENT, LT(SYMB,KC_SPC) + KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, + KC_BSPC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN,KC_MINS, + KC_M, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_BSLS, KC_K, KC_H, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT, + MO(_EX),KC_MINS,KC_QUOT,KC_RGHT,KC_BSLS, + + KC_LEFT, KC_RGHT, + KC_UP, + KC_DOWN, KC_ENT, LT(_NU,KC_SPC) ), /* @@ -81,7 +83,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * Backspace in the center. * * ,--------------------------------------------------. ,--------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | Esc | | ~SYMB| 6 | 7 | 8 | 9 | 0 | / | + * | ` | 1 | 2 | 3 | 4 | 5 | Esc | | | 6 | 7 | 8 | 9 | 0 | / | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * | \ | ' | , | . | P | Y | Home | | BkSp | F | G | C | R | L | = | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| @@ -89,39 +91,39 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| Hyper| | \ |------+------+------+------+------+--------| * | LShft | ; | Q | J | K | X | | | | B | M | W | V | Z | RShft | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | LGui | [ | ] |CtlShf| SYMB | | Left | Up | Down | Right| \ | + * | LGui | [ | ] |CtlShf| _NU | | Left | Up | Down | Right| \ | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. - * | LCtrl| LAlt | | MDIA | RAlt | + * | LCtrl| LAlt | | _ME | RAlt | * ,------|------|------| |------+------+------. - * | Ctl/ | Alt/ | Home | | PgUp | | SYMB/| + * | Ctl/ | Alt/ | Home | | PgUp | | _NU/ | * | BkSp | Del |------| |------| Enter| Space| - * | | | NUMP | | PgDn | | | + * | | | _NU | | PgDn | | | * `--------------------' `--------------------' */ -// BASE -[BASE] = KEYMAP( +// _DV +[_DV] = KEYMAP( // left hand KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, KC_BSLS,KC_QUOT,KC_COMM, KC_DOT, KC_P, KC_Y, KC_HOME, KC_TAB, KC_A, KC_O, KC_E, KC_U, KC_I, KC_LSFT,KC_SCLN,KC_Q, KC_J, KC_K, KC_X, ALL_T(KC_NO), - KC_LGUI,KC_LBRC,KC_RBRC, LCTL(KC_LSFT), MO(SYMB), + KC_LGUI,KC_LBRC,KC_RBRC, LCTL(KC_LSFT), MO(_NU), KC_LCTL, KC_LALT, KC_HOME, - CTL_T(KC_BSPC), ALT_T(KC_DEL), MO(NUMP), + CTL_T(KC_BSPC), ALT_T(KC_DEL), MO(_NU), // right hand - TG(SYMB), KC_6, KC_7, KC_8, KC_9, KC_0, KC_SLSH, + KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_SLSH, KC_BSPC, KC_F, KC_G, KC_C, KC_R, KC_L, KC_EQL, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_BSLS, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_LEFT,KC_UP, KC_DOWN,KC_RGHT,KC_BSLS, - MO(MDIA), KC_RALT, + MO(_ME), KC_RALT, KC_PGUP, - KC_PGDN, KC_ENT, LT(SYMB,KC_SPC) + KC_PGDN, KC_ENT, LT(_NU,KC_SPC) ), /* @@ -133,7 +135,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * and repositioning the arrow keys at the bottom right corner. * * ,--------------------------------------------------. ,--------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | Esc | |~SYMB | 6 | 7 | 8 | 9 | 0 | - | + * | ` | 1 | 2 | 3 | 4 | 5 | Esc | | | 6 | 7 | 8 | 9 | 0 | - | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * | LShift | Q | W | E | R | T | +L1 | | BkSp | Y | U | I | O | P | ] | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| @@ -141,156 +143,112 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| FN2 | | ~L1 |------+------+------+------+------+--------| * | LShft | Z | X | C | V | B | | | | N | M | , | . | Up | RShft | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | LCtrl| ` | \ |CtlShf| SYMB | | SYMB | / | Left | Down | Right| + * | LCtrl| ` | \ |CtlShf| _NU | | _NU | / | Left | Down | Right| * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. - * | LCtrl| LAlt | | MDIA | ~GAME| + * | LCtrl| LAlt | | _ME | ~_GA| * ,------|------|------| |------+------+------. - * | | | Home | | PgUp | | SYMB/ + * | | | Home | | PgUp | | _NU/ | * | Space| LAlt |------| |------| Enter| Space| * | | | End | | PgDn | | | * `--------------------' `--------------------' */ -[QWRT] = KEYMAP( // Layer1: QWERTY +[_QW] = KEYMAP( // Layer1: QWERTY // left hand KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, KC_LSFT,KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HOME, KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), - KC_LCTL,KC_GRV, KC_SLSH,LCTL(KC_LSFT), MO(SYMB), + KC_LCTL,KC_GRV, KC_SLSH,LCTL(KC_LSFT), MO(_NU), KC_LCTL,KC_LALT, KC_HOME, KC_SPC, KC_LALT, KC_END, // right hand - TG(SYMB), KC_6, KC_7, KC_8, KC_9, KC_0, KC_RBRC, - KC_BSPC,KC_Y, KC_U, KC_I, KC_O, KC_P, KC_EQL, - KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_MINS, - KC_END, KC_N, KC_M, KC_COMM,KC_DOT, KC_UP ,KC_RSFT, - MO(SYMB),KC_UP, KC_LEFT,KC_DOWN,KC_RGHT, + KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_RBRC, + KC_BSPC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_EQL, + KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_MINS, + KC_END, KC_N, KC_M, KC_COMM,KC_DOT, KC_UP ,KC_RSFT, + MO(_NU),KC_UP, KC_LEFT,KC_DOWN,KC_RGHT, - MO(MDIA),TG(GAME), + MO(_ME),TG(_GA), KC_PGUP, - KC_PGDN,KC_ENT,LT(SYMB,KC_SPC) + KC_PGDN,KC_ENT,LT(_NU,KC_SPC) ), - /* - * Keymap: Symbol / navigation Layer - * - * Inspired by Atreus. - * Note the two keys on the left thumb cluster. These change the "default" layer between key layouts. - * The RESET button also resets the Teensy, but note bug #164. - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | ! | @ | Up | { | } | | | | | Home | Up | End | | F12 | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | # | / | | | \ | $ |------| |------| | Left | Down | Right| | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | [ | ] | ( | ) | & | | | | | PgUp | | PgDn | | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | SYMB | | | | | | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * |Dvorak|QWERTY| | | RESET| - * ,------|------|------| |------+------+------. - * | | |Colemk| | | | | - * | | |------| |------| | SYMB | - * | | | | | | | | - * `--------------------' `--------------------' - */ -// SYMBOLS -[SYMB] = KEYMAP( - // left hand - _______,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, - _______,KC_EXLM,KC_AT, KC_UP, KC_LCBR,KC_RCBR,_______, - _______,KC_HASH,KC_SLSH,KC_PIPE,KC_BSLS,KC_DLR, - _______,KC_LBRC,KC_RBRC,KC_LPRN,KC_RPRN,KC_AMPR,_______, - _______,_______,_______,_______,_______, - - DF(BASE),DF(QWRT), - DF(CODH), - _______, _______, _______, - - // right hand - _______,KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - _______,_______,KC_HOME,KC_UP, KC_END, _______,KC_F12, - _______,KC_LEFT,KC_DOWN,KC_RGHT,_______,_______, - _______,_______,KC_PGUP,_______,KC_PGDN,_______,_______, - _______,_______,_______,_______,_______, - - _______, RESET, - _______, - _______, _______, _______ -), -/* Keymap: Media and mouse keys - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | | | | | | | | | | | | | | | | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | MsUp | | | | | | | | | | | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | | | | | | | Prev | Next | | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | |Brwser| - * | | |------| |------| |Back | - * | | | | | | | | - * `--------------------' `--------------------' - */ -// MEDIA AND MOUSE -[MDIA] = KEYMAP( - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, KC_MS_U, _______, _______, _______, - _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, KC_BTN1, KC_BTN2, - _______, _______, - _______, - _______, _______, _______, - // right hand - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, KC_MPLY, - _______, _______, _______, KC_MPRV, KC_MNXT, _______, _______, - KC_VOLU, KC_VOLD, KC_MUTE, _______, _______, - _______, _______, - _______, - _______, _______, KC_WBAK -), - /* - * Keymap: Number pad. + * Keymap: Numbers and symbols * * Note that the number keys here are actually numpad keystrokes. This often doesn't matter, but it may be relevant in a few cases. + * That's why the Num Lock key exists on this layer - just in case. + * + * This layer also contains the layout switches. + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | ! | @ | { | } | & | | | | / | 7 | 8 | 9 | * | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | # | $ | ( | ) | ` |------| |------| | | 4 | 5 | 6 | - | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | % | ^ | [ | ] | ~ | | | | \ | 1 | 2 | 3 | + | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | RESET|QWERTY|Dvorak|Colemk| | | 0 | . | = | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * |NumLck| | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[_NU] = KEYMAP( + // left hand + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, + _______, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_AMPR, _______, + _______, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, + _______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, _______, + RESET, DF(_QW), DF(_DV), DF(_CO), _______, + + KC_NLCK,_______, + _______, + _______,_______,_______, + // right hand + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, KC_SLSH, KC_P7, KC_P8, KC_P9, KC_PAST, _______, + KC_PIPE, KC_P4, KC_P5, KC_P6, KC_PMNS, _______, + _______, KC_BSLS, KC_P1, KC_P2, KC_P3, KC_PPLS, _______, + KC_P0, KC_PDOT, KC_EQL, _______, _______, + + _______, _______, + _______, + _______, _______, _______ + ), + + /* + * Keymap: Extend * * ,--------------------------------------------------. ,--------------------------------------------------. * | | | | | | | | | | | | | | | | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | | | | | | | | 7 | 8 | 9 | * | | + * | | | | | | | | | | | | | | | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | |------| |------| | 4 | 5 | 6 | + | | + * | | | | | | |------| |------| | | | | | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | | | | | | 1 | 2 | 3 | / | | + * | | | | | | | | | | | | | | | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | 0 | . | 0 | = | | + * | | | | | | | | | | | | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | | | | | | * ,------|------|------| |------+------+------. * | | | | | | | | - * | | |------| |------| | Enter| + * | | |------| |------| | | * | | | | | | | | * `--------------------' `--------------------' */ -[NUMP] = KEYMAP( +[_EX] = KEYMAP( // left hand _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -298,19 +256,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______,_______, - _______, + _______,_______, + _______, _______,_______,_______, // right hand - _______,_______,_______,_______,_______,_______,_______, - _______,KC_UP, KC_P7, KC_P8, KC_P9, KC_PAST,KC_F12, - KC_DOWN,KC_P4, KC_P5, KC_P6, KC_PPLS,_______, - _______,KC_AMPR,KC_P1, KC_P2, KC_P3, KC_PSLS,_______, - KC_P0, KC_PDOT,KC_P0, KC_EQL, _______, - - _______, _______, - _______, - _______, _______, KC_PENT + _______, _______, _______, _______, _______, _______, _______, + _______, KC_PGUP, KC_HOME, KC_UP, KC_END, _______, _______, + KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______ ), /* @@ -330,14 +287,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | |MClick| | | | | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. - * | | | | | ~GAME| + * | | | | | ~_GA| * ,------|------|------| |------+------+------. * | | | | | | | | * | | |------| |------|RClick|LClick| * | | | | | | | | * `--------------------' `--------------------' */ -[GAME] = KEYMAP( +[_GA] = KEYMAP( // left hand _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -362,7 +319,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) + [1] = ACTION_LAYER_TAP_TOGGLE(_NU) // FN1 - Momentary Layer 1 (Numbers and symbols) }; const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) @@ -388,22 +345,23 @@ void matrix_init_user(void) { // Runs constantly in the background, in a loop. void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + // uint8_t layer = biton32(layer_state); ergodox_board_led_off(); ergodox_right_led_1_off(); ergodox_right_led_2_off(); ergodox_right_led_3_off(); - switch (layer) { - case BASE: + + switch (layer_state) { + case _CO: ergodox_right_led_1_on(); break; - case QWRT: + case _QW: ergodox_right_led_2_on(); - case SYMB: + case _NU: ergodox_right_led_3_on(); break; - case GAME: + case _GA: ergodox_right_led_1_on(); ergodox_right_led_2_on(); default: diff --git a/keyboards/ergodox_ez/keymaps/replicaJunction/readme.md b/keyboards/ergodox_ez/keymaps/replicaJunction/readme.md new file mode 100644 index 000000000..8c4c03353 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/replicaJunction/readme.md @@ -0,0 +1,5 @@ +# replicaJunction - Ergodox (EZ) Layout + +I designed this layout, along with my complimentary Atreus layout, to address the challenge of having an Ergodox as my primary home keyboard and an Atreus as my primary work board. I wanted a layout that provided symbols in comfortable locations on both keyboards - but didn't require me to learn two separate sets of symbols for the two keyboards. + +I had originally used several keys as dual-role keys, where a tap would send a keypress and a long press and hold would trigger a different layer. However, after several months of experimenting with those ideas, I've begun moving away from that design due to performance. It's very hard to strike a balance between the time it takes to press a key normally while typing and the "delay" in the typing motion needed to trigger the alternate layer. I was frequently getting strange characters and artifacts because I pressed the function key + the symbol key too quickly, and the layer never shifted. \ No newline at end of file -- cgit v1.2.3 From 0064f1f84cf8470beb32557145dc5d1b9c977fc8 Mon Sep 17 00:00:00 2001 From: Joshua T Date: Sat, 30 Jul 2016 08:46:01 -0500 Subject: Moved my Ergodox keymap to match upstream changes --- keyboards/ergodox/keymaps/replicaJunction/keymap.c | 374 +++++++++++++++++++++ .../ergodox/keymaps/replicaJunction/readme.md | 5 + .../ergodox_ez/keymaps/replicaJunction/keymap.c | 372 -------------------- .../ergodox_ez/keymaps/replicaJunction/readme.md | 5 - 4 files changed, 379 insertions(+), 377 deletions(-) create mode 100644 keyboards/ergodox/keymaps/replicaJunction/keymap.c create mode 100644 keyboards/ergodox/keymaps/replicaJunction/readme.md delete mode 100644 keyboards/ergodox_ez/keymaps/replicaJunction/keymap.c delete mode 100644 keyboards/ergodox_ez/keymaps/replicaJunction/readme.md diff --git a/keyboards/ergodox/keymaps/replicaJunction/keymap.c b/keyboards/ergodox/keymaps/replicaJunction/keymap.c new file mode 100644 index 000000000..bc5cbc643 --- /dev/null +++ b/keyboards/ergodox/keymaps/replicaJunction/keymap.c @@ -0,0 +1,374 @@ +#include "ergodox_ez.h" +#include "debug.h" +#include "action_layer.h" + +/* + * Keyboard: Ergodox + * Keymap: replicaJunction + * Version: 1.1 + * + * This keymap is designed to complement my Atreus keyboard layout, found in keyboards/atreus. + * The Atreus keyboard is a 40% board whose design was heavily influenced by the Ergodox, and I now + * have both keyboards, so I've designed these layouts in an effort to make switching between the + * two as easy as possible. + * + * The default key layout in this keymap is Colemak-ModDH. Information on that layout can be found + * here: https://colemakmods.github.io/mod-dh/ + */ + +#define _CO 0 // Colemak +#define _DV 1 // Dvorak +#define _QW 2 // QWERTY +#define _ME 3 // media keys +#define _NU 4 // numpad +#define _EX 5 // extend +#define _GA 6 // mouse overlay for gaming + +#define _______ KC_TRNS // Simple alias that just makes the keymaps a bit easier to look at + +// Uses 5 bytes of memory per 8 keys, but makes sure modifiers don't get "stuck" switching layers +#define PREVENT_STUCK_MODIFIERS + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * Keymap: Colemak-ModDH + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | Esc | | | 6 | 7 | 8 | 9 | 0 | = | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | \ | Q | W | F | P | B | Home | | BkSp | J | L | U | Y | ; | - | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Tab | A | R | S | T | G |------| |------| M | N | E | I | O | ' | + * |--------+------+------+------+------+------| Hyper| | \ |------+------+------+------+------+--------| + * | LShft | Z | X | C | D | V | | | | K | H | , | , | / | RShft | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | LGui | [ | ] |CtlShf| | | _EX | - | ' | Right| \ | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | LCtrl| LAlt | | Left | Right| + * ,------|------|------| |------+------+------. + * |Shift/| Ctrl/| Home | | Up | Alt/| _NU/ | + * | BkSp | Del |------| |------| Enter| Space| + * | | | _NU | | Down | | | + * `--------------------' `--------------------' + */ + +[_CO] = KEYMAP( + // left hand + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, + KC_BSLS,KC_Q, KC_W, KC_F, KC_P, KC_B, KC_HOME, + KC_TAB, KC_A, KC_R, KC_S, KC_T, KC_G, + KC_LSFT,KC_Z, KC_X, KC_C, KC_D, KC_V, ALL_T(KC_NO), + KC_LGUI,KC_LBRC,KC_RBRC, LCTL(KC_LSFT), MO(_NU), + + KC_LCTL, KC_LALT, + KC_HOME, + SFT_T(KC_BSPC), CTL_T(KC_DEL), MO(_NU), + // right hand + KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, + KC_BSPC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN,KC_MINS, + KC_M, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_BSLS, KC_K, KC_H, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT, + MO(_EX),KC_MINS,KC_QUOT,KC_RGHT,KC_BSLS, + + KC_LEFT, KC_RGHT, + KC_UP, + KC_DOWN, ALT_T(KC_ENT), LT(_NU,KC_SPC) + ), + + /* + * Keymap: Dvorak layout + * + * The right index backspace is a nod to my TypeMatrix keyboard, which has + * Backspace in the center. + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | Esc | | | 6 | 7 | 8 | 9 | 0 | / | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | \ | ' | , | . | P | Y | Home | | BkSp | F | G | C | R | L | = | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Tab | A | O | E | U | I |------| |------| D | H | T | N | S | - | + * |--------+------+------+------+------+------| Hyper| | \ |------+------+------+------+------+--------| + * | LShft | ; | Q | J | K | X | | | | B | M | W | V | Z | RShft | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | LGui | [ | ] |CtlShf| _NU | | Left | Up | Down | Right| \ | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | LCtrl| LAlt | | _ME | RAlt | + * ,------|------|------| |------+------+------. + * | Ctl/ | Alt/ | Home | | PgUp | | _NU/ | + * | BkSp | Del |------| |------| Enter| Space| + * | | | _NU | | PgDn | | | + * `--------------------' `--------------------' + */ + +// _DV +[_DV] = KEYMAP( + // left hand + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, + KC_BSLS,KC_QUOT,KC_COMM, KC_DOT, KC_P, KC_Y, KC_HOME, + KC_TAB, KC_A, KC_O, KC_E, KC_U, KC_I, + KC_LSFT,KC_SCLN,KC_Q, KC_J, KC_K, KC_X, ALL_T(KC_NO), + KC_LGUI,KC_LBRC,KC_RBRC, LCTL(KC_LSFT), MO(_NU), + + KC_LCTL, KC_LALT, + KC_HOME, + CTL_T(KC_BSPC), ALT_T(KC_DEL), MO(_NU), + // right hand + KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_SLSH, + KC_BSPC, KC_F, KC_G, KC_C, KC_R, KC_L, KC_EQL, + KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, + KC_BSLS, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, + KC_LEFT,KC_UP, KC_DOWN,KC_RGHT,KC_BSLS, + + MO(_ME), KC_RALT, + KC_PGUP, + KC_PGDN, KC_ENT, LT(_NU,KC_SPC) + ), + + /* + * Keymap: QWERTY layout. + * + * This is optimized for gaming, not typing, so there aren't as many macros + * as the Dvorak layer. Some of the keys have also been moved to "game- + * like" locations, such as making the spacebar available to the left thumb, + * and repositioning the arrow keys at the bottom right corner. + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | Esc | | | 6 | 7 | 8 | 9 | 0 | - | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | LShift | Q | W | E | R | T | +L1 | | BkSp | Y | U | I | O | P | ] | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Tab | A | S | D | F | G |------| |------| H | J | K | L | ; | ' | + * |--------+------+------+------+------+------| FN2 | | ~L1 |------+------+------+------+------+--------| + * | LShft | Z | X | C | V | B | | | | N | M | , | . | Up | RShft | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | LCtrl| ` | \ |CtlShf| _NU | | ~_GA | / | Left | Down | Right| + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | LCtrl| LAlt | | _ME | ~_GA | + * ,------|------|------| |------+------+------. + * | | | Home | | PgUp | | _NU/ | + * | Space| LAlt |------| |------| Enter| Space| + * | | | End | | PgDn | | | + * `--------------------' `--------------------' + */ +[_QW] = KEYMAP( // Layer1: QWERTY + // left hand + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, + KC_LSFT,KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HOME, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), + KC_LCTL,KC_GRV, KC_SLSH,LCTL(KC_LSFT), MO(_NU), + + KC_LCTL,KC_LALT, + KC_HOME, + KC_SPC, KC_LALT, KC_END, + // right hand + KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_RBRC, + KC_BSPC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_EQL, + KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_MINS, + KC_END, KC_N, KC_M, KC_COMM,KC_DOT, KC_UP ,KC_RSFT, + TG(_GA),KC_UP, KC_LEFT,KC_DOWN,KC_RGHT, + + MO(_ME),TG(_GA), + KC_PGUP, + KC_PGDN,KC_ENT,LT(_NU,KC_SPC) + ), + +/* + * Keymap: Numbers and symbols + * + * Note that the number keys here are actually numpad keystrokes. This often doesn't matter, but it may be relevant in a few cases. + * That's why the Num Lock key exists on this layer - just in case. + * + * This layer also contains the layout switches. + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | ! | @ | { | } | & | | | | / | 7 | 8 | 9 | * | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | # | $ | ( | ) | ` |------| |------| | | 4 | 5 | 6 | - | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | % | ^ | [ | ] | ~ | | | | \ | 1 | 2 | 3 | + | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | RESET|QWERTY|Dvorak|Colemk| | | 0 | . | = | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * |NumLck| | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[_NU] = KEYMAP( + // left hand + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, + _______, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_AMPR, _______, + _______, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, + _______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, _______, + RESET, DF(_QW), DF(_DV), DF(_CO), _______, + + KC_NLCK,_______, + _______, + _______,_______,_______, + // right hand + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, KC_SLSH, KC_P7, KC_P8, KC_P9, KC_PAST, _______, + KC_PIPE, KC_P4, KC_P5, KC_P6, KC_PMNS, _______, + _______, KC_BSLS, KC_P1, KC_P2, KC_P3, KC_PPLS, _______, + KC_P0, KC_PDOT, KC_EQL, _______, _______, + + _______, _______, + _______, + _______, _______, _______ + ), + + /* + * Keymap: Extend + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[_EX] = KEYMAP( + // left hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + + _______,_______, + _______, + _______,_______,_______, + // right hand + _______, _______, _______, _______, _______, _______, _______, + _______, KC_PGUP, KC_HOME, KC_UP, KC_END, _______, _______, + KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______ + ), + + /* + * Keymap: Gaming + * + * This is mostly a mouse overlay for the right hand while the left hand uses the QWERTY layout. + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | |WhlUp | MsUp |WhlDn | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| |MsLeft|MsDown|MsRght| | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | |MClick| | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | ~_GA| + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------|RClick|LClick| + * | | | | | | | | + * `--------------------' `--------------------' + */ +[_GA] = KEYMAP( + // left hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + + _______,_______, + _______, + _______,_______,_______, + + // right hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_WH_U, KC_MS_U, KC_WH_D, _______, _______, + _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + KC_BTN3, _______, _______, _______, _______, + _______, _______, + _______, + _______, KC_BTN2, KC_BTN1 + ), +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_LAYER_TAP_TOGGLE(_NU) // FN1 - Momentary Layer 1 (Numbers and symbols) +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + uint8_t layer = biton32(layer_state); + // uint8_t default_layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + + switch (layer) { + case _CO: + ergodox_right_led_1_on(); + break; + case _QW: + ergodox_right_led_2_on(); + break; + case _NU: + ergodox_right_led_3_on(); + break; + case _GA: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + default: + // none + break; + } + +}; diff --git a/keyboards/ergodox/keymaps/replicaJunction/readme.md b/keyboards/ergodox/keymaps/replicaJunction/readme.md new file mode 100644 index 000000000..8c4c03353 --- /dev/null +++ b/keyboards/ergodox/keymaps/replicaJunction/readme.md @@ -0,0 +1,5 @@ +# replicaJunction - Ergodox (EZ) Layout + +I designed this layout, along with my complimentary Atreus layout, to address the challenge of having an Ergodox as my primary home keyboard and an Atreus as my primary work board. I wanted a layout that provided symbols in comfortable locations on both keyboards - but didn't require me to learn two separate sets of symbols for the two keyboards. + +I had originally used several keys as dual-role keys, where a tap would send a keypress and a long press and hold would trigger a different layer. However, after several months of experimenting with those ideas, I've begun moving away from that design due to performance. It's very hard to strike a balance between the time it takes to press a key normally while typing and the "delay" in the typing motion needed to trigger the alternate layer. I was frequently getting strange characters and artifacts because I pressed the function key + the symbol key too quickly, and the layer never shifted. \ No newline at end of file diff --git a/keyboards/ergodox_ez/keymaps/replicaJunction/keymap.c b/keyboards/ergodox_ez/keymaps/replicaJunction/keymap.c deleted file mode 100644 index b0b5cab7b..000000000 --- a/keyboards/ergodox_ez/keymaps/replicaJunction/keymap.c +++ /dev/null @@ -1,372 +0,0 @@ -#include "ergodox_ez.h" -#include "debug.h" -#include "action_layer.h" - -/* - * Keyboard: Ergodox - * Keymap: replicaJunction - * Version: 1.1 - * - * This keymap is designed to complement my Atreus keyboard layout, found in keyboards/atreus. - * The Atreus keyboard is a 40% board whose design was heavily influenced by the Ergodox, and I now - * have both keyboards, so I've designed these layouts in an effort to make switching between the - * two as easy as possible. - * - * The default key layout in this keymap is Colemak-ModDH. Information on that layout can be found - * here: https://colemakmods.github.io/mod-dh/ - */ - -#define _CO 0 // Colemak -#define _DV 1 // Dvorak -#define _QW 2 // QWERTY -#define _ME 3 // media keys -#define _NU 4 // numpad -#define _EX 5 // extend -#define _GA 6 // mouse overlay for gaming - -#define _______ KC_TRNS // Simple alias that just makes the keymaps a bit easier to look at - -// Uses 5 bytes of memory per 8 keys, but makes sure modifiers don't get "stuck" switching layers -#define PREVENT_STUCK_MODIFIERS - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* - * Keymap: Colemak-ModDH - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | Esc | | | 6 | 7 | 8 | 9 | 0 | = | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | \ | Q | W | F | P | B | Home | | BkSp | J | L | U | Y | ; | - | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | Tab | A | R | S | T | G |------| |------| M | N | E | I | O | ' | - * |--------+------+------+------+------+------| Hyper| | \ |------+------+------+------+------+--------| - * | LShft | Z | X | C | D | V | | | | K | H | , | , | / | RShft | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | LGui | [ | ] |CtlShf| | | _EX | - | ' | Right| \ | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | LCtrl| LAlt | | Left | Right| - * ,------|------|------| |------+------+------. - * | Ctl/ | Alt/ | Home | | Up | | _NU/ | - * | BkSp | Del |------| |------| Enter| Space| - * | | | _NU | | Down | | | - * `--------------------' `--------------------' - */ - -[_CO] = KEYMAP( - // left hand - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, - KC_BSLS,KC_Q, KC_W, KC_F, KC_P, KC_B, KC_HOME, - KC_TAB, KC_A, KC_R, KC_S, KC_T, KC_G, - KC_LSFT,KC_Z, KC_X, KC_C, KC_D, KC_V, ALL_T(KC_NO), - KC_LGUI,KC_LBRC,KC_RBRC, LCTL(KC_LSFT), MO(_NU), - - KC_LCTL, KC_LALT, - KC_HOME, - CTL_T(KC_BSPC), ALT_T(KC_DEL), MO(_NU), - // right hand - KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, - KC_BSPC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN,KC_MINS, - KC_M, KC_N, KC_E, KC_I, KC_O, KC_QUOT, - KC_BSLS, KC_K, KC_H, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT, - MO(_EX),KC_MINS,KC_QUOT,KC_RGHT,KC_BSLS, - - KC_LEFT, KC_RGHT, - KC_UP, - KC_DOWN, KC_ENT, LT(_NU,KC_SPC) - ), - - /* - * Keymap: Dvorak layout - * - * The right index backspace is a nod to my TypeMatrix keyboard, which has - * Backspace in the center. - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | Esc | | | 6 | 7 | 8 | 9 | 0 | / | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | \ | ' | , | . | P | Y | Home | | BkSp | F | G | C | R | L | = | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | Tab | A | O | E | U | I |------| |------| D | H | T | N | S | - | - * |--------+------+------+------+------+------| Hyper| | \ |------+------+------+------+------+--------| - * | LShft | ; | Q | J | K | X | | | | B | M | W | V | Z | RShft | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | LGui | [ | ] |CtlShf| _NU | | Left | Up | Down | Right| \ | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | LCtrl| LAlt | | _ME | RAlt | - * ,------|------|------| |------+------+------. - * | Ctl/ | Alt/ | Home | | PgUp | | _NU/ | - * | BkSp | Del |------| |------| Enter| Space| - * | | | _NU | | PgDn | | | - * `--------------------' `--------------------' - */ - -// _DV -[_DV] = KEYMAP( - // left hand - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, - KC_BSLS,KC_QUOT,KC_COMM, KC_DOT, KC_P, KC_Y, KC_HOME, - KC_TAB, KC_A, KC_O, KC_E, KC_U, KC_I, - KC_LSFT,KC_SCLN,KC_Q, KC_J, KC_K, KC_X, ALL_T(KC_NO), - KC_LGUI,KC_LBRC,KC_RBRC, LCTL(KC_LSFT), MO(_NU), - - KC_LCTL, KC_LALT, - KC_HOME, - CTL_T(KC_BSPC), ALT_T(KC_DEL), MO(_NU), - // right hand - KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_SLSH, - KC_BSPC, KC_F, KC_G, KC_C, KC_R, KC_L, KC_EQL, - KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, - KC_BSLS, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, - KC_LEFT,KC_UP, KC_DOWN,KC_RGHT,KC_BSLS, - - MO(_ME), KC_RALT, - KC_PGUP, - KC_PGDN, KC_ENT, LT(_NU,KC_SPC) - ), - - /* - * Keymap: QWERTY layout. - * - * This is optimized for gaming, not typing, so there aren't as many macros - * as the Dvorak layer. Some of the keys have also been moved to "game- - * like" locations, such as making the spacebar available to the left thumb, - * and repositioning the arrow keys at the bottom right corner. - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | Esc | | | 6 | 7 | 8 | 9 | 0 | - | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | LShift | Q | W | E | R | T | +L1 | | BkSp | Y | U | I | O | P | ] | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | Tab | A | S | D | F | G |------| |------| H | J | K | L | ; | ' | - * |--------+------+------+------+------+------| FN2 | | ~L1 |------+------+------+------+------+--------| - * | LShft | Z | X | C | V | B | | | | N | M | , | . | Up | RShft | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | LCtrl| ` | \ |CtlShf| _NU | | _NU | / | Left | Down | Right| - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | LCtrl| LAlt | | _ME | ~_GA| - * ,------|------|------| |------+------+------. - * | | | Home | | PgUp | | _NU/ | - * | Space| LAlt |------| |------| Enter| Space| - * | | | End | | PgDn | | | - * `--------------------' `--------------------' - */ -[_QW] = KEYMAP( // Layer1: QWERTY - // left hand - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, - KC_LSFT,KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HOME, - KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, - KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), - KC_LCTL,KC_GRV, KC_SLSH,LCTL(KC_LSFT), MO(_NU), - - KC_LCTL,KC_LALT, - KC_HOME, - KC_SPC, KC_LALT, KC_END, - // right hand - KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_RBRC, - KC_BSPC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_EQL, - KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_MINS, - KC_END, KC_N, KC_M, KC_COMM,KC_DOT, KC_UP ,KC_RSFT, - MO(_NU),KC_UP, KC_LEFT,KC_DOWN,KC_RGHT, - - MO(_ME),TG(_GA), - KC_PGUP, - KC_PGDN,KC_ENT,LT(_NU,KC_SPC) - ), - -/* - * Keymap: Numbers and symbols - * - * Note that the number keys here are actually numpad keystrokes. This often doesn't matter, but it may be relevant in a few cases. - * That's why the Num Lock key exists on this layer - just in case. - * - * This layer also contains the layout switches. - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | ! | @ | { | } | & | | | | / | 7 | 8 | 9 | * | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | # | $ | ( | ) | ` |------| |------| | | 4 | 5 | 6 | - | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | % | ^ | [ | ] | ~ | | | | \ | 1 | 2 | 3 | + | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | RESET|QWERTY|Dvorak|Colemk| | | 0 | . | = | | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * |NumLck| | | | | - * ,------|------|------| |------+------+------. - * | | | | | | | | - * | | |------| |------| | | - * | | | | | | | | - * `--------------------' `--------------------' - */ -[_NU] = KEYMAP( - // left hand - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, - _______, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_AMPR, _______, - _______, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, - _______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, _______, - RESET, DF(_QW), DF(_DV), DF(_CO), _______, - - KC_NLCK,_______, - _______, - _______,_______,_______, - // right hand - _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, - _______, KC_SLSH, KC_P7, KC_P8, KC_P9, KC_PAST, _______, - KC_PIPE, KC_P4, KC_P5, KC_P6, KC_PMNS, _______, - _______, KC_BSLS, KC_P1, KC_P2, KC_P3, KC_PPLS, _______, - KC_P0, KC_PDOT, KC_EQL, _______, _______, - - _______, _______, - _______, - _______, _______, _______ - ), - - /* - * Keymap: Extend - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | | | | | | | | | | | | | | | | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | | | | | | | | | | | | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | |------| |------| | | | | | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | | | | | | | | | | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | | | | | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | | | - * | | |------| |------| | | - * | | | | | | | | - * `--------------------' `--------------------' - */ -[_EX] = KEYMAP( - // left hand - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, - - _______,_______, - _______, - _______,_______,_______, - // right hand - _______, _______, _______, _______, _______, _______, _______, - _______, KC_PGUP, KC_HOME, KC_UP, KC_END, _______, _______, - KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, - _______, _______, - _______, - _______, _______, _______ - ), - - /* - * Keymap: Gaming - * - * This is mostly a mouse overlay for the right hand while the left hand uses the QWERTY layout. - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | | | | | | | | | | | | | | | | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | | | | | | | |WhlUp | MsUp |WhlDn | | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | |------| |------| |MsLeft|MsDown|MsRght| | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | | | | | | | | | | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | |MClick| | | | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | ~_GA| - * ,------|------|------| |------+------+------. - * | | | | | | | | - * | | |------| |------|RClick|LClick| - * | | | | | | | | - * `--------------------' `--------------------' - */ -[_GA] = KEYMAP( - // left hand - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, - - _______,_______, - _______, - _______,_______,_______, - - // right hand - _______, _______, _______, _______, _______, _______, _______, - _______, _______, KC_WH_U, KC_MS_U, KC_WH_D, _______, _______, - _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, - _______, _______, _______, _______, _______, _______, _______, - KC_BTN3, _______, _______, _______, _______, - _______, _______, - _______, - _______, KC_BTN2, KC_BTN1 - ), -}; - -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(_NU) // FN1 - Momentary Layer 1 (Numbers and symbols) -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; - -// Runs just one time when the keyboard initializes. -void matrix_init_user(void) { - -}; - -// Runs constantly in the background, in a loop. -void matrix_scan_user(void) { - - // uint8_t layer = biton32(layer_state); - - ergodox_board_led_off(); - ergodox_right_led_1_off(); - ergodox_right_led_2_off(); - ergodox_right_led_3_off(); - - switch (layer_state) { - case _CO: - ergodox_right_led_1_on(); - break; - case _QW: - ergodox_right_led_2_on(); - case _NU: - ergodox_right_led_3_on(); - break; - case _GA: - ergodox_right_led_1_on(); - ergodox_right_led_2_on(); - default: - // none - break; - } - -}; diff --git a/keyboards/ergodox_ez/keymaps/replicaJunction/readme.md b/keyboards/ergodox_ez/keymaps/replicaJunction/readme.md deleted file mode 100644 index 8c4c03353..000000000 --- a/keyboards/ergodox_ez/keymaps/replicaJunction/readme.md +++ /dev/null @@ -1,5 +0,0 @@ -# replicaJunction - Ergodox (EZ) Layout - -I designed this layout, along with my complimentary Atreus layout, to address the challenge of having an Ergodox as my primary home keyboard and an Atreus as my primary work board. I wanted a layout that provided symbols in comfortable locations on both keyboards - but didn't require me to learn two separate sets of symbols for the two keyboards. - -I had originally used several keys as dual-role keys, where a tap would send a keypress and a long press and hold would trigger a different layer. However, after several months of experimenting with those ideas, I've begun moving away from that design due to performance. It's very hard to strike a balance between the time it takes to press a key normally while typing and the "delay" in the typing motion needed to trigger the alternate layer. I was frequently getting strange characters and artifacts because I pressed the function key + the symbol key too quickly, and the layer never shifted. \ No newline at end of file -- cgit v1.2.3 From cf795a6f93a541c2ff5d64daa0aefd1f97d62035 Mon Sep 17 00:00:00 2001 From: Joshua T Date: Sat, 30 Jul 2016 09:19:17 -0500 Subject: Moved PREVENT_STUCK_MODIFIERS to config.h --- keyboards/atreus/config.h | 3 +++ keyboards/atreus/keymaps/replicaJunction/keymap.c | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboards/atreus/config.h b/keyboards/atreus/config.h index 624d90188..36624a4a1 100644 --- a/keyboards/atreus/config.h +++ b/keyboards/atreus/config.h @@ -67,6 +67,9 @@ along with this program. If not, see . keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ ) +/* Prevent modifiers from sticking when switching layers */ +#define PREVENT_STUCK_MODIFIERS + /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/atreus/keymaps/replicaJunction/keymap.c b/keyboards/atreus/keymaps/replicaJunction/keymap.c index 0470a4fa1..4e88f3bd1 100644 --- a/keyboards/atreus/keymaps/replicaJunction/keymap.c +++ b/keyboards/atreus/keymaps/replicaJunction/keymap.c @@ -42,9 +42,6 @@ #define KX_PAST LCTL(KC_V) #define KX_UNDO LCTL(KC_Z) -// Uses 5 bytes of memory per 8 keys, but makes sure modifiers don't get "stuck" switching layers -#define PREVENT_STUCK_MODIFIERS - ; // This doesn't do anything. It's just for VSCode because its syntax highlighting is weird for the above #define statements. const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -- cgit v1.2.3 From daa83afe2b8e225948e268b8a03b61b8f057ff70 Mon Sep 17 00:00:00 2001 From: Joshua T Date: Tue, 9 Aug 2016 20:51:22 -0500 Subject: Created keymap local config.h file Reverted the Atreus config.h to default and added one specific to this keymap. --- keyboards/atreus/config.h | 5 +- keyboards/atreus/keymaps/replicaJunction/config.h | 94 +++++++++++++++++++++++ 2 files changed, 95 insertions(+), 4 deletions(-) create mode 100644 keyboards/atreus/keymaps/replicaJunction/config.h diff --git a/keyboards/atreus/config.h b/keyboards/atreus/config.h index 36624a4a1..0e0393478 100644 --- a/keyboards/atreus/config.h +++ b/keyboards/atreus/config.h @@ -67,9 +67,6 @@ along with this program. If not, see . keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ ) -/* Prevent modifiers from sticking when switching layers */ -#define PREVENT_STUCK_MODIFIERS - /* * Feature disable options * These options are also useful to firmware size reduction. @@ -88,4 +85,4 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -#endif +#endif \ No newline at end of file diff --git a/keyboards/atreus/keymaps/replicaJunction/config.h b/keyboards/atreus/keymaps/replicaJunction/config.h new file mode 100644 index 000000000..437aa662c --- /dev/null +++ b/keyboards/atreus/keymaps/replicaJunction/config.h @@ -0,0 +1,94 @@ +/* +Config file - Atreus QMK with replicaJunction layout + +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 Technomancy +#define PRODUCT Atreus +#define DESCRIPTION q.m.k. keyboard firmware for Atreus + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 11 + +// Change this to how you wired your keyboard +// COLS: Left to right, ROWS: Top to bottom +#if defined(ATREUS_ASTAR) +# define MATRIX_ROW_PINS { D0, D1, D3, D2 } +# define MATRIX_COL_PINS { D7, C6, B5, B4, E6, D4, B6, F6, F7, D6, B7 } +# define UNUSED_PINS +#elif defined(ATREUS_TEENSY2) +# define MATRIX_ROW_PINS { D0, D1, D2, D3 } +# define MATRIX_COL_PINS { F6, F5, F4, B7, B6, B5, B4, B3, B2, B1, B0 } +# define UNUSED_PINS +#endif + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +//#define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +// Default: 5 +#define DEBOUNCING_DELAY 6 + +// I don't have any locking keys, so I don't need these features + +/* 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 command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* Prevent modifiers from sticking when switching layers */ +#define PREVENT_STUCK_MODIFIERS + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif -- cgit v1.2.3 From 5d78311612e5ee3824a2d707ce1377661318770e Mon Sep 17 00:00:00 2001 From: Joshua T Date: Tue, 9 Aug 2016 21:27:38 -0500 Subject: Reverted Ergodox config.h I will create a separate config.h for my keymap --- keyboards/ergodox/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/ergodox/config.h b/keyboards/ergodox/config.h index edc60caae..acb8cacbf 100644 --- a/keyboards/ergodox/config.h +++ b/keyboards/ergodox/config.h @@ -33,4 +33,4 @@ #endif -#endif /* KEYBOARDS_ERGODOX_CONFIG_H_ */ +#endif /* KEYBOARDS_ERGODOX_CONFIG_H_ */ \ No newline at end of file -- cgit v1.2.3 From fdb8a4cd658e940587f552e348a5c0b2732ffcba Mon Sep 17 00:00:00 2001 From: Joshua T Date: Tue, 9 Aug 2016 21:28:31 -0500 Subject: Created keymap-specific config.h --- keyboards/ergodox/keymaps/replicaJunction/config.h | 63 ++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 keyboards/ergodox/keymaps/replicaJunction/config.h diff --git a/keyboards/ergodox/keymaps/replicaJunction/config.h b/keyboards/ergodox/keymaps/replicaJunction/config.h new file mode 100644 index 000000000..d03e193db --- /dev/null +++ b/keyboards/ergodox/keymaps/replicaJunction/config.h @@ -0,0 +1,63 @@ +/* +Config file - Ergodox QMK with replicaJunction layout + +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 KEYBOARDS_ERGODOX_CONFIG_H_ +#define KEYBOARDS_ERGODOX_CONFIG_H_ + +#define MOUSEKEY_DELAY 100 +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_MAX_SPEED 3 +#define MOUSEKEY_TIME_TO_MAX 10 + +#define TAPPING_TOGGLE 1 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +#define TAPPING_TERM 200 +#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.) + +// Uses 5 bytes of memory per 8 keys, but makes sure modifiers don't get "stuck" switching layers +#define PREVENT_STUCK_MODIFIERS + +// I don't have any locking keys, so I don't need these features + + +/* 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 + +/* Prevent modifiers from sticking when switching layers */ +#define PREVENT_STUCK_MODIFIERS + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || \ + keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \ +) + +#ifdef SUBPROJECT_ez + #include "ez/config.h" +#endif +#ifdef SUBPROJECT_infinity + #include "infinity/config.h" +#endif + + +#endif /* KEYBOARDS_ERGODOX_CONFIG_H_ */ -- cgit v1.2.3 From ea8638b9440ca9e8cf99437b01c69c5f9e7693d5 Mon Sep 17 00:00:00 2001 From: Joshua T Date: Tue, 9 Aug 2016 21:29:22 -0500 Subject: Changed left thumb back to Ctrl/Alt Removed Shift from left thumb --- keyboards/ergodox/keymaps/replicaJunction/keymap.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/keyboards/ergodox/keymaps/replicaJunction/keymap.c b/keyboards/ergodox/keymaps/replicaJunction/keymap.c index bc5cbc643..6c8333ab0 100644 --- a/keyboards/ergodox/keymaps/replicaJunction/keymap.c +++ b/keyboards/ergodox/keymaps/replicaJunction/keymap.c @@ -1,7 +1,3 @@ -#include "ergodox_ez.h" -#include "debug.h" -#include "action_layer.h" - /* * Keyboard: Ergodox * Keymap: replicaJunction @@ -16,6 +12,10 @@ * here: https://colemakmods.github.io/mod-dh/ */ +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" + #define _CO 0 // Colemak #define _DV 1 // Dvorak #define _QW 2 // QWERTY @@ -26,9 +26,6 @@ #define _______ KC_TRNS // Simple alias that just makes the keymaps a bit easier to look at -// Uses 5 bytes of memory per 8 keys, but makes sure modifiers don't get "stuck" switching layers -#define PREVENT_STUCK_MODIFIERS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* * Keymap: Colemak-ModDH @@ -42,12 +39,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| Hyper| | \ |------+------+------+------+------+--------| * | LShft | Z | X | C | D | V | | | | K | H | , | , | / | RShft | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | LGui | [ | ] |CtlShf| | | _EX | - | ' | Right| \ | + * | LGui | [ | ] |CtlShf| LAlt | | _EX | - | ' | Right| \ | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | LCtrl| LAlt | | Left | Right| * ,------|------|------| |------+------+------. - * |Shift/| Ctrl/| Home | | Up | Alt/| _NU/ | + * |LCtrl/| LAlt/| Home | | Up | Alt/| _NU/ | * | BkSp | Del |------| |------| Enter| Space| * | | | _NU | | Down | | | * `--------------------' `--------------------' @@ -59,11 +56,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_BSLS,KC_Q, KC_W, KC_F, KC_P, KC_B, KC_HOME, KC_TAB, KC_A, KC_R, KC_S, KC_T, KC_G, KC_LSFT,KC_Z, KC_X, KC_C, KC_D, KC_V, ALL_T(KC_NO), - KC_LGUI,KC_LBRC,KC_RBRC, LCTL(KC_LSFT), MO(_NU), + KC_LGUI,KC_LBRC,KC_RBRC, LCTL(KC_LSFT), KC_LALT, KC_LCTL, KC_LALT, KC_HOME, - SFT_T(KC_BSPC), CTL_T(KC_DEL), MO(_NU), + CTL_T(KC_BSPC), ALT_T(KC_DEL), MO(_NU), // right hand KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, KC_BSPC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN,KC_MINS, -- cgit v1.2.3 From 82223aec6c6711ed0fd8180b9fc2df0717bf6654 Mon Sep 17 00:00:00 2001 From: Joshua T Date: Tue, 9 Aug 2016 21:34:55 -0500 Subject: Created build.bat Helper batch file for building the keyboard. --- util/build.bat | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 util/build.bat diff --git a/util/build.bat b/util/build.bat new file mode 100644 index 000000000..316bbfd54 --- /dev/null +++ b/util/build.bat @@ -0,0 +1,51 @@ +@echo off + +rem Use this batch file from within an IDE to automatically build your firmware. +rem You can pass command-line arguments to indicate which keyboard and keymap to build. +rem +rem Usage: +rem vscode-build.bat "Working directory" "Keyboard" "Keymap" +rem +rem Ex. vscode-build.bat C:\Projects\qmk_firmware Planck default + +SET ROOTDIR="%~dp0..\" + +rem Modify this to define your keyboard +rem SET KEYBOARD="ergodox_ez" +if [%1]==[] ( + echo. Keyboard is undefined; defaulting to Planck + SET KEYBOARD="Planck" +) ELSE ( + SET KEYBOARD="%1" +) + +rem Modify this line to adjust your keymap. +rem SET KEYMAP="replicaJunction" +if [%2]==[] ( + echo. Keyboard is undefined; defaulting to default + SET KEYMAP="default" +) ELSE ( + SET KEYMAP="%2" +) + +echo. +echo. -------------- +echo. Build started. +echo. -------------- +echo. +echo. Working directory: %ROOTDIR% +echo. Keyboard: %KEYBOARD% +echo. Keymap: %KEYMAP% +echo. +echo. +CD /D "%ROOTDIR%" +echo. Cleaning build directory... +make clean KEYBOARD=%KEYBOARD% KEYMAP=%KEYMAP% +echo. +echo. Making keyboard %KEYBOARD% with keymap %KEYMAP% +make KEYBOARD=%KEYBOARD% KEYMAP=%KEYMAP% +echo. +echo. ---------------- +echo. Build completed. +echo. ---------------- +exit /b \ No newline at end of file -- cgit v1.2.3 From 6a24bac9c40ea22e92421f7f9bb7c7af6f562fca Mon Sep 17 00:00:00 2001 From: Joshua T Date: Tue, 9 Aug 2016 22:16:21 -0500 Subject: Moved Shift keys to Z and ? Instead of using a thumb shift, I was given the idea of using the pinky keys as dual-role keys that also send the Shift keypress. This gives me a Shift key on each hand again, but it will make me learn to Shift with opposite hands after all. --- keyboards/atreus/keymaps/replicaJunction/keymap.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/keyboards/atreus/keymaps/replicaJunction/keymap.c b/keyboards/atreus/keymaps/replicaJunction/keymap.c index 4e88f3bd1..bc4011d2c 100644 --- a/keyboards/atreus/keymaps/replicaJunction/keymap.c +++ b/keyboards/atreus/keymaps/replicaJunction/keymap.c @@ -46,17 +46,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_CO] = KEYMAP( - KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, - KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, - KC_Z, KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, - KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, SFT_T(KC_BSPC), CTL_T(KC_DEL), ALT_T(KC_ENT), LT(_NU, KC_SPC), MO(_EX), KC_MINS, KC_QUOT, KC_EQL + KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, + KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, + SFT_T(KC_Z), KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, KC_DOT, SFT_T(KC_SLSH), + KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, CTL_T(KC_DEL), ALT_T(KC_ENT), LT(_NU, KC_SPC), MO(_EX), KC_MINS, KC_QUOT, KC_EQL ), [_QW] = KEYMAP( /* Qwerty */ - KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, - KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, - KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, - KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, CTL_T(KC_BSPC), ALT_T(KC_ENT), LT(_NU, KC_SPC), MO(_NU), TG(_GA), KC_QUOT, KC_EQL + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, + SFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, SFT_T(KC_SLSH), + KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, CTL_T(KC_BSPC), ALT_T(KC_ENT), LT(_NU, KC_SPC), MO(_NU), TG(_GA), KC_QUOT, KC_EQL ), [_EX] = KEYMAP( /* Extend */ @@ -84,7 +84,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, KC_WH_U, KC_MS_U, KC_WH_D, _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, _______, _______, _______, _______, KC_BTN3, _______, KC_MS_D, _______, _______, - _______, _______, _______, _______, KC_SPC, KC_BSPC, KC_BTN2, KC_BTN1, _______, _______, _______, _______ + _______, _______, _______, KC_LSFT, KC_SPC, KC_BSPC, KC_BTN2, KC_BTN1, _______, _______, _______, _______ )}; const uint16_t PROGMEM fn_actions[] = { -- cgit v1.2.3 From fe7b46579c05d4aa19d88bc61b8b04967a914f39 Mon Sep 17 00:00:00 2001 From: Daniel Date: Wed, 10 Aug 2016 19:37:59 -0500 Subject: completes first-pass at base layer --- .../ergodox/keymaps/common-nighthawk/keymap.c | 183 +++++++++++++++++++++ 1 file changed, 183 insertions(+) create mode 100644 keyboards/ergodox/keymaps/common-nighthawk/keymap.c diff --git a/keyboards/ergodox/keymaps/common-nighthawk/keymap.c b/keyboards/ergodox/keymaps/common-nighthawk/keymap.c new file mode 100644 index 000000000..f222ad839 --- /dev/null +++ b/keyboards/ergodox/keymaps/common-nighthawk/keymap.c @@ -0,0 +1,183 @@ +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" +#include "version.h" + +#define BASE 0 // default layer +#define SYMB 1 // symbols +#define MDIA 2 // media keys + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | Esc | x | x | x | x | x | Home | | End | x | x | x | x | x | `~ | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * |Tab/Ctrl| Q | W | E | R | T | Up | | PgUp | Y | U | I | O | P |Bks/Ctrl| + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | '"/Cmd | A | S | D | F | G |------| |------| H | J | K | L | ;: |Entr/Cmd| + * |--------+------+------+------+------+------| Down | | PgDn |------+------+------+------+------+--------| + * |_/LShift| Z | X | C | V | B | | | | N | M | ,< | .> | /? | RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | Alt | x | x | x | Left | |Right | x | x | x | Alt | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | x | x | | x | x | + * ,------|------|------| |------+--------+------. + * | | | x | | x | | | + * | ~L1 | x |------| |------| x | ~L1 | + * | | |Teensy| |Teensy| | | + * `--------------------' `----------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[BASE] = KEYMAP( // layer 0 : default + // left hand + KC_ESC, KC_1, KC_1, KC_1, KC_1, KC_1, KC_HOME, + CTL_T(KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_UP, + GUI_T(KC_QUOT), KC_A, KC_S, KC_D, KC_F, KC_G, + SFT_T(KC_UNDS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_DOWN, + KC_LALT, KC_1, KC_1, KC_1, KC_LEFT, + KC_1, KC_1, + KC_1, + KC_FN1, KC_1, RESET, + // right hand + KC_END, KC_1, KC_1, KC_1, KC_1, KC_1, KC_GRV, + KC_PGUP, KC_Y, KC_U, KC_I, KC_O, KC_P, CTL_T(KC_BSLS), + KC_H, KC_J, KC_K, KC_L, KC_SCOLON, GUI_T(KC_ENT), + KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_RGHT, KC_1, KC_1, KC_1, KC_RALT, + KC_1, KC_1, + KC_1, + RESET, KC_1, KC_FN1 + ), +/* Keymap 1: Symbol Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | . | 0 | = | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[SYMB] = KEYMAP( + // left hand + M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, + KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV, + KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + // right hand + KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, + KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS, + KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, + KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +/* Keymap 2: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | MsUp | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | Prev | Next | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | |Brwser| + * | | |------| |------| |Back | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// MEDIA AND MOUSE +[MDIA] = KEYMAP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_WBAK +), +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + break; + } + return MACRO_NONE; +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + // TODO: Make this relevant to the ErgoDox EZ. + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + default: + // none + break; + } + +}; -- cgit v1.2.3 From 916d12f9fab526d55bb864479520901635756f80 Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 12 Aug 2016 14:37:13 -0500 Subject: completes first-pass at symbol layer --- .../ergodox/keymaps/common-nighthawk/keymap.c | 72 +++++++++++----------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/keyboards/ergodox/keymaps/common-nighthawk/keymap.c b/keyboards/ergodox/keymaps/common-nighthawk/keymap.c index f222ad839..34fae9ac3 100644 --- a/keyboards/ergodox/keymaps/common-nighthawk/keymap.c +++ b/keyboards/ergodox/keymaps/common-nighthawk/keymap.c @@ -25,7 +25,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | x | x | | x | x | * ,------|------|------| |------+--------+------. * | | | x | | x | | | - * | ~L1 | x |------| |------| x | ~L1 | + * |Sp/~L1| L2 |------| |------| L2 |Sp/~L1| * | | |Teensy| |Teensy| | | * `--------------------' `----------------------' */ @@ -33,36 +33,36 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Otherwise, it needs KC_* [BASE] = KEYMAP( // layer 0 : default // left hand - KC_ESC, KC_1, KC_1, KC_1, KC_1, KC_1, KC_HOME, - CTL_T(KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_UP, - GUI_T(KC_QUOT), KC_A, KC_S, KC_D, KC_F, KC_G, - SFT_T(KC_UNDS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_DOWN, - KC_LALT, KC_1, KC_1, KC_1, KC_LEFT, - KC_1, KC_1, - KC_1, - KC_FN1, KC_1, RESET, + KC_ESC, KC_1, KC_1, KC_1, KC_1, KC_1, KC_HOME, + CTL_T(KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_UP, + GUI_T(KC_QUOT), KC_A, KC_S, KC_D, KC_F, KC_G, + SFT_T(KC_UNDS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_DOWN, + KC_LALT, KC_1, KC_1, KC_1, KC_LEFT, + KC_1, KC_1, + KC_1, + LT(SYMB, KC_SPC), TG(MDIA), RESET, // right hand - KC_END, KC_1, KC_1, KC_1, KC_1, KC_1, KC_GRV, - KC_PGUP, KC_Y, KC_U, KC_I, KC_O, KC_P, CTL_T(KC_BSLS), - KC_H, KC_J, KC_K, KC_L, KC_SCOLON, GUI_T(KC_ENT), - KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_RGHT, KC_1, KC_1, KC_1, KC_RALT, + KC_END, KC_1, KC_1, KC_1, KC_1, KC_1, KC_GRV, + KC_PGUP, KC_Y, KC_U, KC_I, KC_O, KC_P, CTL_T(KC_BSPC), + KC_H, KC_J, KC_K, KC_L, KC_SCOLON, GUI_T(KC_ENT), + KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_RGHT, KC_1, KC_1, KC_1, KC_RALT, KC_1, KC_1, KC_1, - RESET, KC_1, KC_FN1 + RESET, TG(MDIA), LT(SYMB, KC_SPC) ), /* Keymap 1: Symbol Layer * * ,--------------------------------------------------. ,--------------------------------------------------. - * |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | + * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | + * | | ! | ^ | { | ( | [ | | | | = | 7 | 8 | 9 | 0 | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | + * | | & | $ | } | ) | ] |------| |------| + | 4 | 5 | 6 | * | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | + * | | \ | # | @ | % | | | | | | - | 1 | 2 | 3 | / | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | | . | 0 | = | | + * | | | | | | | | | . | | | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | | | | | | @@ -75,28 +75,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // SYMBOLS [SYMB] = KEYMAP( // left hand - M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, - KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, - KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV, - KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS, - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, - KC_TRNS,KC_TRNS, + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + KC_TRNS, KC_EXLM, KC_CIRC, KC_LCBR, KC_LPRN, KC_LBRC, KC_TRNS, + KC_TRNS, KC_AMPR, KC_DLR, KC_RCBR, KC_RPRN, KC_RBRC, + KC_TRNS, KC_BSLS, KC_HASH, KC_AT, KC_PERC, KC_PIPE, 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, // right hand - KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, - KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS, - KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, - KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS, - KC_TRNS, KC_TRNS, + KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, + KC_TRNS, KC_EQL, KC_7, KC_8, KC_9, KC_0, KC_TRNS, + KC_PLUS, KC_4, KC_5, KC_6, KC_ASTR, KC_TRNS, + KC_TRNS, KC_MINS, KC_1, KC_2, KC_3, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_DOT, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS + KC_TRNS, KC_TRNS, KC_TRNS ), /* Keymap 2: Media and mouse keys * * ,--------------------------------------------------. ,--------------------------------------------------. - * | | | | | | | | | | | | | | | | + * |Version | | | | | | | | | | | | | | | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * | | | | MsUp | | | | | | | | | | | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| @@ -116,7 +116,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // MEDIA AND MOUSE [MDIA] = KEYMAP( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + M(0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, -- cgit v1.2.3 From 558bf2ed07ff04455b509c81a4f3312f5dbd308c Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 12 Aug 2016 19:27:44 -0500 Subject: completes first-pass at media layer --- .../ergodox/keymaps/common-nighthawk/keymap.c | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/keyboards/ergodox/keymaps/common-nighthawk/keymap.c b/keyboards/ergodox/keymaps/common-nighthawk/keymap.c index 34fae9ac3..7c232246d 100644 --- a/keyboards/ergodox/keymaps/common-nighthawk/keymap.c +++ b/keyboards/ergodox/keymaps/common-nighthawk/keymap.c @@ -11,13 +11,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 0: Basic layer * * ,--------------------------------------------------. ,--------------------------------------------------. - * | Esc | x | x | x | x | x | Home | | End | x | x | x | x | x | `~ | + * | Esc | x | x | x | _ | x | Home | | End | x | Esc | x | x | x | `~ | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * |Tab/Ctrl| Q | W | E | R | T | Up | | PgUp | Y | U | I | O | P |Bks/Ctrl| * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | '"/Cmd | A | S | D | F | G |------| |------| H | J | K | L | ;: |Entr/Cmd| * |--------+------+------+------+------+------| Down | | PgDn |------+------+------+------+------+--------| - * |_/LShift| Z | X | C | V | B | | | | N | M | ,< | .> | /? | RShift | + * |[/LShift| Z | X | C | V | B | | | | N | M | ,< | .> | /? |]/RShift| * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * | Alt | x | x | x | Left | |Right | x | x | x | Alt | * `----------------------------------' `----------------------------------' @@ -33,19 +33,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Otherwise, it needs KC_* [BASE] = KEYMAP( // layer 0 : default // left hand - KC_ESC, KC_1, KC_1, KC_1, KC_1, KC_1, KC_HOME, + KC_ESC, KC_1, KC_1, KC_1, KC_UNDS, KC_1, KC_HOME, CTL_T(KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_UP, GUI_T(KC_QUOT), KC_A, KC_S, KC_D, KC_F, KC_G, - SFT_T(KC_UNDS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_DOWN, + SFT_T(KC_LBRC), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_DOWN, KC_LALT, KC_1, KC_1, KC_1, KC_LEFT, KC_1, KC_1, KC_1, LT(SYMB, KC_SPC), TG(MDIA), RESET, // right hand - KC_END, KC_1, KC_1, KC_1, KC_1, KC_1, KC_GRV, + KC_END, KC_1, KC_ESC, KC_1, KC_1, KC_1, KC_GRV, KC_PGUP, KC_Y, KC_U, KC_I, KC_O, KC_P, CTL_T(KC_BSPC), KC_H, KC_J, KC_K, KC_L, KC_SCOLON, GUI_T(KC_ENT), - KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_RBRC), KC_RGHT, KC_1, KC_1, KC_1, KC_RALT, KC_1, KC_1, KC_1, @@ -98,13 +98,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,--------------------------------------------------. ,--------------------------------------------------. * |Version | | | | | | | | | | | | | | | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | MsUp | | | | | | | | | | | | + * | | | | MsUp | | | | | | Play | Prev | Next | | | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | + * | | |MsLeft|MsDown|MsRght| |------| |------| | Lclk | Rclk | | | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | | | | | | | Prev | Next | | | + * | | | | | | | | | | Mute |VolDn |VolUp | | | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | + * | | | | | | | | | | | | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | | | | | | @@ -120,16 +120,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, // right hand 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, - KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, - KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, + KC_TRNS, KC_MPLY, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_BTN1, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, 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_WBAK -- cgit v1.2.3 From 8019a074cfe39e2bf04c35bb5fb40c9ff9cda9a4 Mon Sep 17 00:00:00 2001 From: Daniel Date: Sun, 14 Aug 2016 20:43:05 -0500 Subject: minor tweaks to numpad and media layer --- .../ergodox/keymaps/common-nighthawk/keymap.c | 50 +++++++++++----------- 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/keyboards/ergodox/keymaps/common-nighthawk/keymap.c b/keyboards/ergodox/keymaps/common-nighthawk/keymap.c index 7c232246d..d57f66531 100644 --- a/keyboards/ergodox/keymaps/common-nighthawk/keymap.c +++ b/keyboards/ergodox/keymaps/common-nighthawk/keymap.c @@ -22,34 +22,32 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Alt | x | x | x | Left | |Right | x | x | x | Alt | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. - * | x | x | | x | x | + * |CapLok| x | | x | Del | * ,------|------|------| |------+--------+------. * | | | x | | x | | | * |Sp/~L1| L2 |------| |------| L2 |Sp/~L1| * | | |Teensy| |Teensy| | | * `--------------------' `----------------------' */ -// If it accepts an argument (i.e, is a function), it doesn't need KC_. -// Otherwise, it needs KC_* [BASE] = KEYMAP( // layer 0 : default // left hand - KC_ESC, KC_1, KC_1, KC_1, KC_UNDS, KC_1, KC_HOME, - CTL_T(KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_UP, - GUI_T(KC_QUOT), KC_A, KC_S, KC_D, KC_F, KC_G, - SFT_T(KC_LBRC), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_DOWN, - KC_LALT, KC_1, KC_1, KC_1, KC_LEFT, - KC_1, KC_1, - KC_1, - LT(SYMB, KC_SPC), TG(MDIA), RESET, + KC_ESC, KC_1, KC_1, KC_1, KC_UNDS, KC_1, KC_HOME, + CTL_T(KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_UP, + GUI_T(KC_QUOT), KC_A, KC_S, KC_D, KC_F, KC_G, + SFT_T(KC_LBRC), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_DOWN, + KC_LALT, KC_1, KC_1, KC_1, KC_LEFT, + KC_CAPS, KC_1, + KC_1, + LT(SYMB, KC_SPC), TG(MDIA), RESET, // right hand - KC_END, KC_1, KC_ESC, KC_1, KC_1, KC_1, KC_GRV, - KC_PGUP, KC_Y, KC_U, KC_I, KC_O, KC_P, CTL_T(KC_BSPC), - KC_H, KC_J, KC_K, KC_L, KC_SCOLON, GUI_T(KC_ENT), - KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_RBRC), - KC_RGHT, KC_1, KC_1, KC_1, KC_RALT, - KC_1, KC_1, + KC_END, KC_1, KC_ESC, KC_1, KC_1, KC_1, KC_GRV, + KC_PGUP, KC_Y, KC_U, KC_I, KC_O, KC_P, CTL_T(KC_BSPC), + KC_H, KC_J, KC_K, KC_L, KC_SCOLON, GUI_T(KC_ENT), + KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_RBRC), + KC_RGHT, KC_1, KC_1, KC_1, KC_RALT, + KC_1, KC_DEL, KC_1, - RESET, TG(MDIA), LT(SYMB, KC_SPC) + RESET, TG(MDIA), LT(SYMB, KC_SPC) ), /* Keymap 1: Symbol Layer * @@ -62,7 +60,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | | \ | # | @ | % | | | | | | - | 1 | 2 | 3 | / | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | | | . | | | + * | | | | | | | 0 | 0 | . | | | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | | | | | | @@ -88,7 +86,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_EQL, KC_7, KC_8, KC_9, KC_0, KC_TRNS, KC_PLUS, KC_4, KC_5, KC_6, KC_ASTR, KC_TRNS, KC_TRNS, KC_MINS, KC_1, KC_2, KC_3, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_DOT, KC_TRNS, KC_TRNS, + KC_0, KC_0, KC_DOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS @@ -98,11 +96,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,--------------------------------------------------. ,--------------------------------------------------. * |Version | | | | | | | | | | | | | | | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | MsUp | | | | | | Play | Prev | Next | | | | + * | | | xx | MsUp | xx | | | | | Play | Prev | Next | | | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | |MsLeft|MsDown|MsRght| |------| |------| | Lclk | Rclk | | | | + * | | |MsLeft|MsDown|MsRght| |------| |------| xx | Lclk | Rclk | | | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | | | | | Mute |VolDn |VolUp | | | | + * | | | xx | xx | xx | | | | | Mute |VolDn |VolUp | | | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * | | | | | | | | | | | | * `----------------------------------' `----------------------------------' @@ -117,9 +115,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // MEDIA AND MOUSE [MDIA] = KEYMAP( M(0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_NO, KC_MS_U, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -127,7 +125,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // right hand KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_BTN1, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, + KC_NO, KC_BTN1, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, -- cgit v1.2.3 From bc1059bc1e288e6db15e442cacad3df369421581 Mon Sep 17 00:00:00 2001 From: Joshua T Date: Tue, 16 Aug 2016 21:55:33 -0500 Subject: Minor changes to Extend and Number layers. Brought QWERTY layer in line with normal layer. Removed Undo function, as it interfered with Shift. Moved Tab and Shift-Tab, and added Insert. --- .../replicaJunction/atreus-replica-extend.png | Bin 88880 -> 91313 bytes .../keymaps/replicaJunction/atreus-replica-num.png | Bin 72341 -> 73126 bytes keyboards/atreus/keymaps/replicaJunction/keymap.c | 20 ++++++++++---------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/keyboards/atreus/keymaps/replicaJunction/atreus-replica-extend.png b/keyboards/atreus/keymaps/replicaJunction/atreus-replica-extend.png index fd8f0a6e2..61b5f647e 100644 Binary files a/keyboards/atreus/keymaps/replicaJunction/atreus-replica-extend.png and b/keyboards/atreus/keymaps/replicaJunction/atreus-replica-extend.png differ diff --git a/keyboards/atreus/keymaps/replicaJunction/atreus-replica-num.png b/keyboards/atreus/keymaps/replicaJunction/atreus-replica-num.png index fefea53c5..faeef089c 100644 Binary files a/keyboards/atreus/keymaps/replicaJunction/atreus-replica-num.png and b/keyboards/atreus/keymaps/replicaJunction/atreus-replica-num.png differ diff --git a/keyboards/atreus/keymaps/replicaJunction/keymap.c b/keyboards/atreus/keymaps/replicaJunction/keymap.c index bc4011d2c..a7126df64 100644 --- a/keyboards/atreus/keymaps/replicaJunction/keymap.c +++ b/keyboards/atreus/keymaps/replicaJunction/keymap.c @@ -49,28 +49,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, SFT_T(KC_Z), KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, KC_DOT, SFT_T(KC_SLSH), - KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, CTL_T(KC_DEL), ALT_T(KC_ENT), LT(_NU, KC_SPC), MO(_EX), KC_MINS, KC_QUOT, KC_EQL + KC_ESC, KC_TAB, KC_LGUI, KC_LALT, KC_BSPC, CTL_T(KC_DEL), ALT_T(KC_ENT), LT(_NU, KC_SPC), MO(_EX), KC_MINS, KC_QUOT, KC_EQL ), [_QW] = KEYMAP( /* Qwerty */ - KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, - KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, - SFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, SFT_T(KC_SLSH), - KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, CTL_T(KC_BSPC), ALT_T(KC_ENT), LT(_NU, KC_SPC), MO(_NU), TG(_GA), KC_QUOT, KC_EQL + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, + SFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, SFT_T(KC_SLSH), + KC_ESC, KC_TAB, KC_LGUI, KC_LALT, KC_BSPC, CTL_T(KC_DEL), ALT_T(KC_ENT), LT(_NU, KC_SPC), MO(_EX), KC_MINS, KC_QUOT, KC_EQL ), [_EX] = KEYMAP( /* Extend */ _______, _______, _______, _______, _______, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_DEL, _______, KC_LGUI, KC_LALT, KC_LCTL, _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_BSPC, - KX_UNDO, KX_CUT, KX_COPY, _______, KX_PAST, _______, KCX_LST, _______, KC_TAB, _______, + KC_CAPS, KX_CUT, KX_COPY, _______, KX_PAST, _______, KC_TAB, KCX_LST, _______, KC_INSERT, _______, _______, _______, _______, KC_LSFT, _______, _______, KC_SPC, _______, _______, _______, KC_PSCR ), [_NU] = KEYMAP( /* Numbers and symbols */ KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_AMPR, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR, - KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_PIPE, KC_4, KC_5, KC_6, KC_MINS, - KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_BSLS, KC_1, KC_2, KC_3, KC_PLUS, - MO(_FN), _______, KC_LABK, KC_RABK, _______, _______, _______, _______, KC_0, KC_DOT, KC_EQL, _______ + KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_TILD, KC_PIPE, KC_4, KC_5, KC_6, KC_MINS, + KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_GRV, KC_BSLS, KC_1, KC_2, KC_3, KC_PLUS, + TG(_GA), _______, _______, MO(_FN), _______, _______, _______, _______, KC_0, KC_DOT, KC_EQL, _______ ), [_FN] = KEYMAP( /* Functions */ @@ -83,7 +83,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_GA] = KEYMAP( /* Gaming */ _______, _______, _______, _______, _______, _______, KC_WH_U, KC_MS_U, KC_WH_D, _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, - _______, _______, _______, _______, _______, KC_BTN3, _______, KC_MS_D, _______, _______, + KC_Z, _______, _______, _______, _______, KC_BTN3, _______, KC_MS_D, _______, _______, _______, _______, _______, KC_LSFT, KC_SPC, KC_BSPC, KC_BTN2, KC_BTN1, _______, _______, _______, _______ )}; -- cgit v1.2.3 From cac69cb58029bf246b22038f034205afbedbc695 Mon Sep 17 00:00:00 2001 From: Joshua T Date: Wed, 24 Aug 2016 23:41:14 -0500 Subject: Several key placement fixes. * Switched Tab and Super on the default layout * Moved Shift on Extend to pinky * Moved Caps Lock to upper right corner * Moved gaming toggle to avoid blocking Escape --- .../atreus-replica-base-colemakdh.png | Bin 0 -> 76319 bytes .../keymaps/replicaJunction/atreus-replica-base.png | Bin 76849 -> 0 bytes .../replicaJunction/atreus-replica-extend.png | Bin 91313 -> 91555 bytes .../replicaJunction/atreus-replica-function.png | Bin 91768 -> 92516 bytes .../keymaps/replicaJunction/atreus-replica-game.png | Bin 0 -> 72509 bytes .../keymaps/replicaJunction/atreus-replica-num.png | Bin 73126 -> 73171 bytes keyboards/atreus/keymaps/replicaJunction/keymap.c | 12 ++++++------ keyboards/atreus/keymaps/replicaJunction/readme.md | 20 +++++++++++++++----- 8 files changed, 21 insertions(+), 11 deletions(-) create mode 100644 keyboards/atreus/keymaps/replicaJunction/atreus-replica-base-colemakdh.png delete mode 100644 keyboards/atreus/keymaps/replicaJunction/atreus-replica-base.png create mode 100644 keyboards/atreus/keymaps/replicaJunction/atreus-replica-game.png diff --git a/keyboards/atreus/keymaps/replicaJunction/atreus-replica-base-colemakdh.png b/keyboards/atreus/keymaps/replicaJunction/atreus-replica-base-colemakdh.png new file mode 100644 index 000000000..4640f9f52 Binary files /dev/null and b/keyboards/atreus/keymaps/replicaJunction/atreus-replica-base-colemakdh.png differ diff --git a/keyboards/atreus/keymaps/replicaJunction/atreus-replica-base.png b/keyboards/atreus/keymaps/replicaJunction/atreus-replica-base.png deleted file mode 100644 index c8efae964..000000000 Binary files a/keyboards/atreus/keymaps/replicaJunction/atreus-replica-base.png and /dev/null differ diff --git a/keyboards/atreus/keymaps/replicaJunction/atreus-replica-extend.png b/keyboards/atreus/keymaps/replicaJunction/atreus-replica-extend.png index 61b5f647e..08c2e6140 100644 Binary files a/keyboards/atreus/keymaps/replicaJunction/atreus-replica-extend.png and b/keyboards/atreus/keymaps/replicaJunction/atreus-replica-extend.png differ diff --git a/keyboards/atreus/keymaps/replicaJunction/atreus-replica-function.png b/keyboards/atreus/keymaps/replicaJunction/atreus-replica-function.png index 262e08ac9..34ad03dec 100644 Binary files a/keyboards/atreus/keymaps/replicaJunction/atreus-replica-function.png and b/keyboards/atreus/keymaps/replicaJunction/atreus-replica-function.png differ diff --git a/keyboards/atreus/keymaps/replicaJunction/atreus-replica-game.png b/keyboards/atreus/keymaps/replicaJunction/atreus-replica-game.png new file mode 100644 index 000000000..14ae35b54 Binary files /dev/null and b/keyboards/atreus/keymaps/replicaJunction/atreus-replica-game.png differ diff --git a/keyboards/atreus/keymaps/replicaJunction/atreus-replica-num.png b/keyboards/atreus/keymaps/replicaJunction/atreus-replica-num.png index faeef089c..6598acb27 100644 Binary files a/keyboards/atreus/keymaps/replicaJunction/atreus-replica-num.png and b/keyboards/atreus/keymaps/replicaJunction/atreus-replica-num.png differ diff --git a/keyboards/atreus/keymaps/replicaJunction/keymap.c b/keyboards/atreus/keymaps/replicaJunction/keymap.c index a7126df64..c229d22f1 100644 --- a/keyboards/atreus/keymaps/replicaJunction/keymap.c +++ b/keyboards/atreus/keymaps/replicaJunction/keymap.c @@ -49,28 +49,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, SFT_T(KC_Z), KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, KC_DOT, SFT_T(KC_SLSH), - KC_ESC, KC_TAB, KC_LGUI, KC_LALT, KC_BSPC, CTL_T(KC_DEL), ALT_T(KC_ENT), LT(_NU, KC_SPC), MO(_EX), KC_MINS, KC_QUOT, KC_EQL + KC_ESC, KC_LGUI, KC_TAB, KC_LALT, KC_BSPC, CTL_T(KC_DEL), ALT_T(KC_ENT), LT(_NU, KC_SPC), MO(_EX), KC_MINS, KC_QUOT, KC_EQL ), [_QW] = KEYMAP( /* Qwerty */ KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, SFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, SFT_T(KC_SLSH), - KC_ESC, KC_TAB, KC_LGUI, KC_LALT, KC_BSPC, CTL_T(KC_DEL), ALT_T(KC_ENT), LT(_NU, KC_SPC), MO(_EX), KC_MINS, KC_QUOT, KC_EQL + KC_ESC, KC_LGUI, KC_TAB, KC_LALT, KC_BSPC, CTL_T(KC_DEL), ALT_T(KC_ENT), LT(_NU, KC_SPC), MO(_EX), KC_MINS, KC_QUOT, KC_EQL ), [_EX] = KEYMAP( /* Extend */ - _______, _______, _______, _______, _______, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_DEL, + KC_CAPS, _______, _______, _______, _______, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_DEL, _______, KC_LGUI, KC_LALT, KC_LCTL, _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_BSPC, - KC_CAPS, KX_CUT, KX_COPY, _______, KX_PAST, _______, KC_TAB, KCX_LST, _______, KC_INSERT, - _______, _______, _______, _______, KC_LSFT, _______, _______, KC_SPC, _______, _______, _______, KC_PSCR + _______, KX_CUT, KX_COPY, _______, KX_PAST, _______, KC_TAB, KCX_LST, _______, KC_INSERT, + _______, _______, _______, _______, _______, _______, _______, KC_SPC, _______, _______, _______, KC_PSCR ), [_NU] = KEYMAP( /* Numbers and symbols */ KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_AMPR, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_TILD, KC_PIPE, KC_4, KC_5, KC_6, KC_MINS, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_GRV, KC_BSLS, KC_1, KC_2, KC_3, KC_PLUS, - TG(_GA), _______, _______, MO(_FN), _______, _______, _______, _______, KC_0, KC_DOT, KC_EQL, _______ + _______, TG(_GA), _______, MO(_FN), _______, _______, _______, _______, KC_0, KC_DOT, KC_EQL, _______ ), [_FN] = KEYMAP( /* Functions */ diff --git a/keyboards/atreus/keymaps/replicaJunction/readme.md b/keyboards/atreus/keymaps/replicaJunction/readme.md index 1b96926e4..21af48e8f 100644 --- a/keyboards/atreus/keymaps/replicaJunction/readme.md +++ b/keyboards/atreus/keymaps/replicaJunction/readme.md @@ -10,13 +10,13 @@ I won't claim that this layout is perfect for everyone. It does make several sig ## Base Layer ## -![Atreus base layout](atreus-replica-base.png) +![Atreus base layout](atreus-replica-base-colemakdh.png) The letters on this layout are arranged in the [Colemak Mod-DH layout](https://colemakmods.github.io/mod-dh/). Note that there are four dual-purpose keys: Shift (Backspace), Ctrl (Delete), Alt (Enter), and Space (Number layer). In QMK, these dual-role keys can be made to hold their primary key by double-tapping the key and holding on the second tap. For example, if I wanted to insert a long string of Spaces, I would tap the Space key, then tap it again and hold. A single press and hold would trigger the secondary function of the key instead. -There is still one blank key on this layout. I haven't decided what to use it for yet. On my keyboard, I have this assigned to another Shift key. +The secondary Alt on the left bottom row exists to provide a single-hand Alt+Tab shortcut, which would take two rows otherwise. ## Extend Layer ## @@ -24,11 +24,11 @@ There is still one blank key on this layout. I haven't decided what to use it fo This layout is designed primarily for keyboard navigation. Arrow keys are easily accessible under the right hand (a welcome change from the original Atreus layout, which places them under the left hand), along with Home/End and PgUp/PgDn. -Modifiers are also placed under the home row of the left hand. One of the single keyboard actions I use most is Shift+Ctrl+Left/Right to select a whole word; this layer makes those keypresses simple by adding the Ctrl and Shift keys in easy-to-reach locations. +Modifiers are also placed under the home row of the left hand. One of the single keyboard actions I use most is Shift+Ctrl+Left/Right to select a whole word; this layer makes those keypresses simple by adding the Ctrl key in an easy-to-reach location. For the common Ctrl shortcuts, I also added some hotkeys to this layer over the letter keys they are associated with. This gives the Extend key some extra utility by letting it "feel" like a Ctrl key in some cases. -The Space key exists to prevent going from this layer directly into the Number layer. Similarly, the Shift key on the left thumb helps make sure that the Backspace function doesn't fire (the other role of this key on the base layout). +The Space key exists to prevent going from this layer directly into the Number layer. Similarly, the Shift key on the left pinky helps make sure that the normal letter (Z) doesn't fire. ## Number and Symbol Layer ## @@ -44,4 +44,14 @@ This layer also provides plenty of symbol shortcuts. Most of these can be access Function keys (F1-F12) are on this layer, as well as some more generic "functions" such as media keys. I've also set up a mirror image of the arrows from the Extend layer in case I need to use these with my left hand, but I don't do this very often. -The reset key is on this layer, as well as a toggle from Colemak to QWERTY and back. The QWERTY layer is not currently documented (nor is a small "gaming" layer that adds mouse keys on top of QWERTY). \ No newline at end of file +The reset key is on this layer, as well as a toggle from Colemak to QWERTY and back. The QWERTY layer is not currently documented, but it is functionally identical to the base layer except for letter positions. + +## Gaming Layer ## + +![Atreus gaming layer](atreus-replica-game.png) + +This is a small layer developed to allow some simple gameplay without a mouse. This layer is a toggle (from the Number layer), so it is designed to stay on while in use. + +The keys on the left hand bring Space into the left thumb's reach, as well as overriding the dual-role Shift with its standard function (Z in both QWERTY and in Colemak). This allows easy Shift presses without blocking the Z key, commonly used in games. + +I would probably not consider this a hard-core gaming keyboard, and this layout does have the huge problem of blocking access to the number keys, but for more casual games, it plays quite well. I've used it quite a bit on Minecraft, for example, and I'm quite pleased with it. \ No newline at end of file -- cgit v1.2.3 From b0c3d596816c178ccd94738a3866a08b71027d0d Mon Sep 17 00:00:00 2001 From: Joshua T Date: Wed, 24 Aug 2016 23:49:33 -0500 Subject: Fixed getting "stuck" in gaming layer --- keyboards/atreus/keymaps/replicaJunction/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/atreus/keymaps/replicaJunction/keymap.c b/keyboards/atreus/keymaps/replicaJunction/keymap.c index c229d22f1..52d3677fa 100644 --- a/keyboards/atreus/keymaps/replicaJunction/keymap.c +++ b/keyboards/atreus/keymaps/replicaJunction/keymap.c @@ -84,7 +84,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, KC_WH_U, KC_MS_U, KC_WH_D, _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, KC_Z, _______, _______, _______, _______, KC_BTN3, _______, KC_MS_D, _______, _______, - _______, _______, _______, KC_LSFT, KC_SPC, KC_BSPC, KC_BTN2, KC_BTN1, _______, _______, _______, _______ + _______, TG(_GA), _______, KC_LSFT, KC_SPC, KC_BSPC, KC_BTN2, KC_BTN1, _______, _______, _______, _______ )}; const uint16_t PROGMEM fn_actions[] = { -- cgit v1.2.3 From 0c598f53c18419a10b143098b57a431c5545f906 Mon Sep 17 00:00:00 2001 From: Daniel Date: Thu, 1 Sep 2016 23:37:52 -0600 Subject: adds Hyper key. improves media layer. first attempt at tap dance. --- keyboards/ergodox/Makefile | 3 +- .../ergodox/keymaps/common-nighthawk/keymap.c | 75 ++++++++++++---------- 2 files changed, 43 insertions(+), 35 deletions(-) diff --git a/keyboards/ergodox/Makefile b/keyboards/ergodox/Makefile index 716535005..0dc0a7725 100644 --- a/keyboards/ergodox/Makefile +++ b/keyboards/ergodox/Makefile @@ -1,5 +1,6 @@ SUBPROJECT_DEFAULT = ez +TAP_DANCE_ENABLE = yes ifndef MAKEFILE_INCLUDED include ../../Makefile -endif \ No newline at end of file +endif diff --git a/keyboards/ergodox/keymaps/common-nighthawk/keymap.c b/keyboards/ergodox/keymaps/common-nighthawk/keymap.c index d57f66531..919b7946c 100644 --- a/keyboards/ergodox/keymaps/common-nighthawk/keymap.c +++ b/keyboards/ergodox/keymaps/common-nighthawk/keymap.c @@ -11,43 +11,48 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 0: Basic layer * * ,--------------------------------------------------. ,--------------------------------------------------. - * | Esc | x | x | x | _ | x | Home | | End | x | Esc | x | x | x | `~ | + * | Esc | x | x | x | _ | Hypr | Home | | End | Hypr | Esc | x | x | x | `~ | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * |Tab/Ctrl| Q | W | E | R | T | Up | | PgUp | Y | U | I | O | P |Bks/Ctrl| * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | '"/Cmd | A | S | D | F | G |------| |------| H | J | K | L | ;: |Entr/Cmd| * |--------+------+------+------+------+------| Down | | PgDn |------+------+------+------+------+--------| - * |[/LShift| Z | X | C | V | B | | | | N | M | ,< | .> | /? |]/RShift| + * | Sft//[ | Z | X | C | V | B | | | | N | M | ,< | .> | /? |]/RShift| * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * | Alt | x | x | x | Left | |Right | x | x | x | Alt | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. - * |CapLok| x | | x | Del | + * | Mute | VolUp| | Play | Del | * ,------|------|------| |------+--------+------. - * | | | x | | x | | | + * | | | VolDn| | Next | | | * |Sp/~L1| L2 |------| |------| L2 |Sp/~L1| - * | | |Teensy| |Teensy| | | + * | | |Teensy| | Prev | | | * `--------------------' `----------------------' */ + /* TO DO: turn on third light when shifted */ + /* consider turning caplock back on. but maybe not. */ + /* get less key presses for ShiftIt going with MEH or CAG */ + /* make all letter keys KC_NO for the media layer */ + /* add the mouse wheel up and down */ [BASE] = KEYMAP( // layer 0 : default // left hand - KC_ESC, KC_1, KC_1, KC_1, KC_UNDS, KC_1, KC_HOME, - CTL_T(KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_UP, - GUI_T(KC_QUOT), KC_A, KC_S, KC_D, KC_F, KC_G, - SFT_T(KC_LBRC), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_DOWN, - KC_LALT, KC_1, KC_1, KC_1, KC_LEFT, - KC_CAPS, KC_1, - KC_1, - LT(SYMB, KC_SPC), TG(MDIA), RESET, + KC_ESC, KC_1, KC_1, KC_1, KC_UNDS, ALL_T(KC_NO), KC_HOME, + CTL_T(KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_UP, + GUI_T(KC_QUOT), KC_A, KC_S, KC_D, KC_F, KC_G, + ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_LBRC), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_DOWN, + KC_LALT, KC_1, KC_1, KC_1, KC_LEFT, + KC_MUTE, KC_VOLU, + KC_VOLD, + LT(SYMB, KC_SPC), TG(MDIA), RESET, // right hand - KC_END, KC_1, KC_ESC, KC_1, KC_1, KC_1, KC_GRV, - KC_PGUP, KC_Y, KC_U, KC_I, KC_O, KC_P, CTL_T(KC_BSPC), - KC_H, KC_J, KC_K, KC_L, KC_SCOLON, GUI_T(KC_ENT), - KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_RBRC), - KC_RGHT, KC_1, KC_1, KC_1, KC_RALT, - KC_1, KC_DEL, - KC_1, - RESET, TG(MDIA), LT(SYMB, KC_SPC) + KC_END, ALL_T(KC_NO), KC_ESC, KC_1, KC_1, KC_1, KC_GRV, + KC_PGUP, KC_Y, KC_U, KC_I, KC_O, KC_P, CTL_T(KC_BSPC), + KC_H, KC_J, KC_K, KC_L, KC_SCOLON, GUI_T(KC_ENT), + KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_RBRC), + KC_RGHT, KC_1, KC_1, KC_1, KC_RALT, + KC_MPLY, KC_DEL, + KC_MNXT, + KC_MPRV, TG(MDIA), LT(SYMB, KC_SPC) ), /* Keymap 1: Symbol Layer * @@ -96,11 +101,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,--------------------------------------------------. ,--------------------------------------------------. * |Version | | | | | | | | | | | | | | | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | xx | MsUp | xx | | | | | Play | Prev | Next | | | | + * | | | | | | | | | | | WhDn | WhUp | | | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | |MsLeft|MsDown|MsRght| |------| |------| xx | Lclk | Rclk | | | | + * | | | | R-Ck | L-Ck | |------| |------| MsLt | MsDn | MsUp | MsRt | | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | xx | xx | xx | | | | | Mute |VolDn |VolUp | | | | + * | | | | | | | | | | | | | | | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * | | | | | | | | | | | | * `----------------------------------' `----------------------------------' @@ -115,19 +120,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // MEDIA AND MOUSE [MDIA] = KEYMAP( M(0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_NO, KC_MS_U, KC_NO, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, - KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, 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_BTN2, KC_BTN1, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, // right hand - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_MPLY, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, - KC_NO, KC_BTN1, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, 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, + KC_TRNS, KC_TRNS, KC_WH_U, KC_WH_D, KC_TRNS, KC_TRNS, KC_TRNS, + KC_MS_LEFT, KC_MS_DOWN, KC_MS_UP, KC_MS_RIGHT, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_WBAK @@ -168,7 +173,7 @@ void matrix_scan_user(void) { switch (layer) { // TODO: Make this relevant to the ErgoDox EZ. case 1: - ergodox_right_led_1_on(); + ergodox_right_led_3_on(); break; case 2: ergodox_right_led_2_on(); @@ -177,5 +182,7 @@ void matrix_scan_user(void) { // none break; } - + if (keyboard_report->mods & MOD_BIT(KC_LSFT)) { + ergodox_right_led_1_on (); + } }; -- cgit v1.2.3 From 250f096144529d6dbea4ae138da108440481ff22 Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 2 Sep 2016 14:35:15 -0600 Subject: adds tap dance and macro to move underscore and l- and r- brackets to base layer. --- .../ergodox/keymaps/common-nighthawk/Makefile | 6 ++ .../ergodox/keymaps/common-nighthawk/keymap.c | 76 +++++++++++++++------- 2 files changed, 57 insertions(+), 25 deletions(-) create mode 100644 keyboards/ergodox/keymaps/common-nighthawk/Makefile diff --git a/keyboards/ergodox/keymaps/common-nighthawk/Makefile b/keyboards/ergodox/keymaps/common-nighthawk/Makefile new file mode 100644 index 000000000..fafa40c43 --- /dev/null +++ b/keyboards/ergodox/keymaps/common-nighthawk/Makefile @@ -0,0 +1,6 @@ +SUBPROJECT_DEFAULT = ez +TAP_DANCE_ENABLE = yes + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/ergodox/keymaps/common-nighthawk/keymap.c b/keyboards/ergodox/keymaps/common-nighthawk/keymap.c index 919b7946c..974431370 100644 --- a/keyboards/ergodox/keymaps/common-nighthawk/keymap.c +++ b/keyboards/ergodox/keymaps/common-nighthawk/keymap.c @@ -7,17 +7,34 @@ #define SYMB 1 // symbols #define MDIA 2 // media keys +//Tap Dance Declarations +enum { + TD_J_LBRC = 0, + TD_K_RBRC, + TD_Y_ESC, +}; + +//Tap Dance Definitions +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_J_LBRC] = ACTION_TAP_DANCE_DOUBLE(KC_J, KC_LBRC), + [TD_K_RBRC] = ACTION_TAP_DANCE_DOUBLE(KC_K, KC_RBRC), + [TD_Y_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_Y, KC_ESC) +}; + +//Macro Declarations +static uint16_t sunds_timer; + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 0: Basic layer * * ,--------------------------------------------------. ,--------------------------------------------------. * | Esc | x | x | x | _ | Hypr | Home | | End | Hypr | Esc | x | x | x | `~ | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * |Tab/Ctrl| Q | W | E | R | T | Up | | PgUp | Y | U | I | O | P |Bks/Ctrl| + * |Tab/Ctrl| Q | W | E | R | T | Up | | PgUp |Y 2Esc| U | I | O | P |Bks/Ctrl| * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | '"/Cmd | A | S | D | F | G |------| |------| H | J | K | L | ;: |Entr/Cmd| + * | '"/Cmd | A | S | D | F | G |------| |------| H | J 2[ | K 2] | L | ;: |Entr/Cmd| * |--------+------+------+------+------+------| Down | | PgDn |------+------+------+------+------+--------| - * | Sft//[ | Z | X | C | V | B | | | | N | M | ,< | .> | /? |]/RShift| + * | _/Shft | Z | X | C | V | B | | | | N | M | ,< | .> | /? | _/Shft | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * | Alt | x | x | x | Left | |Right | x | x | x | Alt | * `----------------------------------' `----------------------------------' @@ -29,27 +46,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | |Teensy| | Prev | | | * `--------------------' `----------------------' */ - /* TO DO: turn on third light when shifted */ - /* consider turning caplock back on. but maybe not. */ - /* get less key presses for ShiftIt going with MEH or CAG */ - /* make all letter keys KC_NO for the media layer */ - /* add the mouse wheel up and down */ [BASE] = KEYMAP( // layer 0 : default // left hand - KC_ESC, KC_1, KC_1, KC_1, KC_UNDS, ALL_T(KC_NO), KC_HOME, - CTL_T(KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_UP, - GUI_T(KC_QUOT), KC_A, KC_S, KC_D, KC_F, KC_G, - ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_LBRC), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_DOWN, - KC_LALT, KC_1, KC_1, KC_1, KC_LEFT, - KC_MUTE, KC_VOLU, - KC_VOLD, - LT(SYMB, KC_SPC), TG(MDIA), RESET, + KC_ESC, KC_1, KC_1, KC_1, KC_UNDS, ALL_T(KC_NO), KC_HOME, + CTL_T(KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_UP, + GUI_T(KC_QUOT), KC_A, KC_S, KC_D, KC_F, KC_G, + M(1), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_DOWN, + KC_LALT, KC_1, KC_1, KC_1, KC_LEFT, + KC_MUTE, KC_VOLU, + KC_VOLD, + LT(SYMB, KC_SPC), TG(MDIA), RESET, // right hand - KC_END, ALL_T(KC_NO), KC_ESC, KC_1, KC_1, KC_1, KC_GRV, - KC_PGUP, KC_Y, KC_U, KC_I, KC_O, KC_P, CTL_T(KC_BSPC), - KC_H, KC_J, KC_K, KC_L, KC_SCOLON, GUI_T(KC_ENT), - KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_RBRC), - KC_RGHT, KC_1, KC_1, KC_1, KC_RALT, + KC_END, ALL_T(KC_NO), KC_ESC, KC_1, KC_1, KC_1, KC_GRV, + KC_PGUP, TD(TD_Y_ESC), KC_U, KC_I, KC_O, KC_P, CTL_T(KC_BSPC), + KC_H, TD(TD_J_LBRC), TD(TD_K_RBRC), KC_L, KC_SCOLON, GUI_T(KC_ENT), + KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, M(1), + KC_RGHT, KC_1, KC_1, KC_1, KC_RALT, KC_MPLY, KC_DEL, KC_MNXT, KC_MPRV, TG(MDIA), LT(SYMB, KC_SPC) @@ -148,10 +160,24 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) // MACRODOWN only works in this function switch(id) { case 0: - if (record->event.pressed) { - SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); - } - break; + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + break; + + case 1: + if (record->event.pressed) { + sunds_timer = timer_read(); + register_code (KC_LSFT); + } else { + if (timer_elapsed (sunds_timer) < TAPPING_TERM) { + register_code (KC_MINS); + unregister_code (KC_MINS); + } + unregister_code (KC_LSFT); + } + break; + } return MACRO_NONE; }; -- cgit v1.2.3 From b807867f955f95f832901b9d0cc0eed97ab8cea0 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 6 Sep 2016 21:56:27 -0600 Subject: moves brackets from J/K to U/I to remove block of common vim sequence. --- keyboards/ergodox/keymaps/common-nighthawk/keymap.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/keyboards/ergodox/keymaps/common-nighthawk/keymap.c b/keyboards/ergodox/keymaps/common-nighthawk/keymap.c index 974431370..ab0dcfece 100644 --- a/keyboards/ergodox/keymaps/common-nighthawk/keymap.c +++ b/keyboards/ergodox/keymaps/common-nighthawk/keymap.c @@ -9,15 +9,15 @@ //Tap Dance Declarations enum { - TD_J_LBRC = 0, - TD_K_RBRC, + TD_U_LBRC = 0, + TD_I_RBRC, TD_Y_ESC, }; //Tap Dance Definitions qk_tap_dance_action_t tap_dance_actions[] = { - [TD_J_LBRC] = ACTION_TAP_DANCE_DOUBLE(KC_J, KC_LBRC), - [TD_K_RBRC] = ACTION_TAP_DANCE_DOUBLE(KC_K, KC_RBRC), + [TD_U_LBRC] = ACTION_TAP_DANCE_DOUBLE(KC_U, KC_LBRC), + [TD_I_RBRC] = ACTION_TAP_DANCE_DOUBLE(KC_I, KC_RBRC), [TD_Y_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_Y, KC_ESC) }; @@ -30,9 +30,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,--------------------------------------------------. ,--------------------------------------------------. * | Esc | x | x | x | _ | Hypr | Home | | End | Hypr | Esc | x | x | x | `~ | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * |Tab/Ctrl| Q | W | E | R | T | Up | | PgUp |Y 2Esc| U | I | O | P |Bks/Ctrl| + * |Tab/Ctrl| Q | W | E | R | T | Up | | PgUp |Y 2Esc| U 2[ | I 2] | O | P |Bks/Ctrl| * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | '"/Cmd | A | S | D | F | G |------| |------| H | J 2[ | K 2] | L | ;: |Entr/Cmd| + * | '"/Cmd | A | S | D | F | G |------| |------| H | J | K | L | ;: |Entr/Cmd| * |--------+------+------+------+------+------| Down | | PgDn |------+------+------+------+------+--------| * | _/Shft | Z | X | C | V | B | | | | N | M | ,< | .> | /? | _/Shft | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' @@ -58,8 +58,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LT(SYMB, KC_SPC), TG(MDIA), RESET, // right hand KC_END, ALL_T(KC_NO), KC_ESC, KC_1, KC_1, KC_1, KC_GRV, - KC_PGUP, TD(TD_Y_ESC), KC_U, KC_I, KC_O, KC_P, CTL_T(KC_BSPC), - KC_H, TD(TD_J_LBRC), TD(TD_K_RBRC), KC_L, KC_SCOLON, GUI_T(KC_ENT), + KC_PGUP, TD(TD_Y_ESC), TD(TD_U_LBRC), TD(TD_I_RBRC), KC_O, KC_P, CTL_T(KC_BSPC), + KC_H, KC_J, KC_K, KC_L, KC_SCOLON, GUI_T(KC_ENT), KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, M(1), KC_RGHT, KC_1, KC_1, KC_1, KC_RALT, KC_MPLY, KC_DEL, -- cgit v1.2.3 From 8ec7341fb27186e9b3dceb8acd97c5d7fb263e1d Mon Sep 17 00:00:00 2001 From: Joshua T Date: Sat, 15 Oct 2016 15:28:16 -0500 Subject: Added Ctrl+` (ConEmu shortcut) --- keyboards/atreus/keymaps/replicaJunction/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/atreus/keymaps/replicaJunction/keymap.c b/keyboards/atreus/keymaps/replicaJunction/keymap.c index 52d3677fa..f7ef1174d 100644 --- a/keyboards/atreus/keymaps/replicaJunction/keymap.c +++ b/keyboards/atreus/keymaps/replicaJunction/keymap.c @@ -60,7 +60,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_EX] = KEYMAP( /* Extend */ - KC_CAPS, _______, _______, _______, _______, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_DEL, + KC_CAPS, _______, _______, _______, LCTL(KC_GRV), KC_PGUP, KC_HOME, KC_UP, KC_END, KC_DEL, _______, KC_LGUI, KC_LALT, KC_LCTL, _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_BSPC, _______, KX_CUT, KX_COPY, _______, KX_PAST, _______, KC_TAB, KCX_LST, _______, KC_INSERT, _______, _______, _______, _______, _______, _______, _______, KC_SPC, _______, _______, _______, KC_PSCR -- cgit v1.2.3 From a9c8f2f5b888e18857bc2987c4b5058912404abe Mon Sep 17 00:00:00 2001 From: Joshua T Date: Sat, 15 Oct 2016 16:44:26 -0500 Subject: Reduced TAPPING_TERM to 150 Also removed duplicate definition of PREVENT_STUCK_MODIFIERS --- keyboards/ergodox/keymaps/replicaJunction/config.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/keyboards/ergodox/keymaps/replicaJunction/config.h b/keyboards/ergodox/keymaps/replicaJunction/config.h index d03e193db..c620349ad 100644 --- a/keyboards/ergodox/keymaps/replicaJunction/config.h +++ b/keyboards/ergodox/keymaps/replicaJunction/config.h @@ -28,12 +28,9 @@ along with this program. If not, see . /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST -#define TAPPING_TERM 200 +#define TAPPING_TERM 150 #define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.) -// Uses 5 bytes of memory per 8 keys, but makes sure modifiers don't get "stuck" switching layers -#define PREVENT_STUCK_MODIFIERS - // I don't have any locking keys, so I don't need these features @@ -44,6 +41,7 @@ along with this program. If not, see . //#define LOCKING_RESYNC_ENABLE /* Prevent modifiers from sticking when switching layers */ +/* Uses 5 bytes of memory per 8 keys, but makes sure modifiers don't get "stuck" switching layers */ #define PREVENT_STUCK_MODIFIERS /* key combination for command */ -- cgit v1.2.3 From d9db5395b3f11728926dcde77046a5ac7bff0123 Mon Sep 17 00:00:00 2001 From: Joshua T Date: Sat, 15 Oct 2016 16:51:40 -0500 Subject: Updated layout to 1.2 - lots of changes Rewrote QWERTY to make it a first-class citizen instead of just a glorified game layer. Added a lot of keys to Extend layer to bring it in line with my Atreus. Plenty of other changes too. --- keyboards/ergodox/keymaps/replicaJunction/keymap.c | 186 ++++++++------------- 1 file changed, 74 insertions(+), 112 deletions(-) diff --git a/keyboards/ergodox/keymaps/replicaJunction/keymap.c b/keyboards/ergodox/keymaps/replicaJunction/keymap.c index 6c8333ab0..7c2b051f9 100644 --- a/keyboards/ergodox/keymaps/replicaJunction/keymap.c +++ b/keyboards/ergodox/keymaps/replicaJunction/keymap.c @@ -1,7 +1,7 @@ /* * Keyboard: Ergodox * Keymap: replicaJunction - * Version: 1.1 + * Version: 1.2 * * This keymap is designed to complement my Atreus keyboard layout, found in keyboards/atreus. * The Atreus keyboard is a 40% board whose design was heavily influenced by the Ergodox, and I now @@ -17,14 +17,22 @@ #include "action_layer.h" #define _CO 0 // Colemak -#define _DV 1 // Dvorak -#define _QW 2 // QWERTY -#define _ME 3 // media keys -#define _NU 4 // numpad -#define _EX 5 // extend -#define _GA 6 // mouse overlay for gaming +#define _QW 1 // QWERTY +#define _ME 2 // media keys +#define _NU 3 // numpad +#define _EX 4 // extend +#define _GA 5 // mouse overlay for gaming -#define _______ KC_TRNS // Simple alias that just makes the keymaps a bit easier to look at +// Some quick aliases, just to make it look pretty +#define _______ KC_TRNS +#define KCX_CGR LCTL(KC_GRV) +#define KCX_LST LSFT(KC_TAB) +#define KX_COPY LCTL(KC_C) +#define KX_CUT LCTL(KC_X) +#define KX_PAST LCTL(KC_V) +#define KX_UNDO LCTL(KC_Z) + +; // This doesn't do anything. It's just for VSCode because its syntax highlighting is weird for the above #define statements. const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* @@ -33,16 +41,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,--------------------------------------------------. ,--------------------------------------------------. * | ` | 1 | 2 | 3 | 4 | 5 | Esc | | | 6 | 7 | 8 | 9 | 0 | = | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | \ | Q | W | F | P | B | Home | | BkSp | J | L | U | Y | ; | - | + * | Tab | Q | W | F | P | B | Home | | BkSp | J | L | U | Y | ; | - | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | Tab | A | R | S | T | G |------| |------| M | N | E | I | O | ' | + * | LCtl | A | R | S | T | G |------| |------| M | N | E | I | O | ' | * |--------+------+------+------+------+------| Hyper| | \ |------+------+------+------+------+--------| * | LShft | Z | X | C | D | V | | | | K | H | , | , | / | RShft | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * | LGui | [ | ] |CtlShf| LAlt | | _EX | - | ' | Right| \ | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. - * | LCtrl| LAlt | | Left | Right| + * | LCtrl| ~GA | | Left | Right| * ,------|------|------| |------+------+------. * |LCtrl/| LAlt/| Home | | Up | Alt/| _NU/ | * | BkSp | Del |------| |------| Enter| Space| @@ -53,12 +61,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_CO] = KEYMAP( // left hand KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, - KC_BSLS,KC_Q, KC_W, KC_F, KC_P, KC_B, KC_HOME, - KC_TAB, KC_A, KC_R, KC_S, KC_T, KC_G, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_HOME, + KC_LCTL,KC_A, KC_R, KC_S, KC_T, KC_G, KC_LSFT,KC_Z, KC_X, KC_C, KC_D, KC_V, ALL_T(KC_NO), KC_LGUI,KC_LBRC,KC_RBRC, LCTL(KC_LSFT), KC_LALT, - KC_LCTL, KC_LALT, + KC_LCTL, TG(_GA), KC_HOME, CTL_T(KC_BSPC), ALT_T(KC_DEL), MO(_NU), // right hand @@ -73,56 +81,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_DOWN, ALT_T(KC_ENT), LT(_NU,KC_SPC) ), - /* - * Keymap: Dvorak layout - * - * The right index backspace is a nod to my TypeMatrix keyboard, which has - * Backspace in the center. - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | Esc | | | 6 | 7 | 8 | 9 | 0 | / | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | \ | ' | , | . | P | Y | Home | | BkSp | F | G | C | R | L | = | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | Tab | A | O | E | U | I |------| |------| D | H | T | N | S | - | - * |--------+------+------+------+------+------| Hyper| | \ |------+------+------+------+------+--------| - * | LShft | ; | Q | J | K | X | | | | B | M | W | V | Z | RShft | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | LGui | [ | ] |CtlShf| _NU | | Left | Up | Down | Right| \ | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | LCtrl| LAlt | | _ME | RAlt | - * ,------|------|------| |------+------+------. - * | Ctl/ | Alt/ | Home | | PgUp | | _NU/ | - * | BkSp | Del |------| |------| Enter| Space| - * | | | _NU | | PgDn | | | - * `--------------------' `--------------------' - */ - -// _DV -[_DV] = KEYMAP( - // left hand - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, - KC_BSLS,KC_QUOT,KC_COMM, KC_DOT, KC_P, KC_Y, KC_HOME, - KC_TAB, KC_A, KC_O, KC_E, KC_U, KC_I, - KC_LSFT,KC_SCLN,KC_Q, KC_J, KC_K, KC_X, ALL_T(KC_NO), - KC_LGUI,KC_LBRC,KC_RBRC, LCTL(KC_LSFT), MO(_NU), - - KC_LCTL, KC_LALT, - KC_HOME, - CTL_T(KC_BSPC), ALT_T(KC_DEL), MO(_NU), - // right hand - KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_SLSH, - KC_BSPC, KC_F, KC_G, KC_C, KC_R, KC_L, KC_EQL, - KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, - KC_BSLS, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, - KC_LEFT,KC_UP, KC_DOWN,KC_RGHT,KC_BSLS, - - MO(_ME), KC_RALT, - KC_PGUP, - KC_PGDN, KC_ENT, LT(_NU,KC_SPC) - ), - /* * Keymap: QWERTY layout. * @@ -132,45 +90,45 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * and repositioning the arrow keys at the bottom right corner. * * ,--------------------------------------------------. ,--------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | Esc | | | 6 | 7 | 8 | 9 | 0 | - | + * | ` | 1 | 2 | 3 | 4 | 5 | Esc | | | 6 | 7 | 8 | 9 | 0 | = | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | LShift | Q | W | E | R | T | +L1 | | BkSp | Y | U | I | O | P | ] | + * | LShift | Q | W | E | R | T | Home | | BkSp | Y | U | I | O | P | - | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | Tab | A | S | D | F | G |------| |------| H | J | K | L | ; | ' | - * |--------+------+------+------+------+------| FN2 | | ~L1 |------+------+------+------+------+--------| - * | LShft | Z | X | C | V | B | | | | N | M | , | . | Up | RShft | + * |--------+------+------+------+------+------| Hyper| | \ |------+------+------+------+------+--------| + * | LShft | Z | X | C | V | B | | | | N | M | , | . | / | RShft | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | LCtrl| ` | \ |CtlShf| _NU | | ~_GA | / | Left | Down | Right| + * | LGui | ` | \ |CtlShf| _NU | | _EX | - | ' | [ | ] | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. - * | LCtrl| LAlt | | _ME | ~_GA | + * | LCtrl| ~GA | | Left | Right| * ,------|------|------| |------+------+------. - * | | | Home | | PgUp | | _NU/ | - * | Space| LAlt |------| |------| Enter| Space| - * | | | End | | PgDn | | | + * |LCtrl/| LAlt/| Home | | Up | Alt/| _NU/ | + * | BkSp | Del |------| |------| Enter| Space| + * | | | _NU | | Down | | | * `--------------------' `--------------------' */ [_QW] = KEYMAP( // Layer1: QWERTY // left hand KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, - KC_LSFT,KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HOME, - KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HOME, + KC_LCTL,KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), KC_LCTL,KC_GRV, KC_SLSH,LCTL(KC_LSFT), MO(_NU), - KC_LCTL,KC_LALT, - KC_HOME, - KC_SPC, KC_LALT, KC_END, + KC_LCTL,TG(_GA), + KC_HOME, + CTL_T(KC_BSPC), ALT_T(KC_DEL), MO(_NU) // right hand - KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_RBRC, - KC_BSPC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_EQL, - KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_MINS, - KC_END, KC_N, KC_M, KC_COMM,KC_DOT, KC_UP ,KC_RSFT, - TG(_GA),KC_UP, KC_LEFT,KC_DOWN,KC_RGHT, + KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, + KC_BSPC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, + KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, + KC_BSLS, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT, + MO(_EX),KC_MINS,KC_QUOT,KC_RGHT,KC_BSLS, - MO(_ME),TG(_GA), - KC_PGUP, - KC_PGDN,KC_ENT,LT(_NU,KC_SPC) + KC_LEFT, KC_RGHT, + KC_UP, + KC_DOWN, ALT_T(KC_ENT), LT(_NU,KC_SPC) ), /* @@ -190,10 +148,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | | % | ^ | [ | ] | ~ | | | | \ | 1 | 2 | 3 | + | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | RESET|QWERTY|Dvorak|Colemk| | | 0 | . | = | | | + * | |QWERTY|Colemk| | | | 0 | . | = | | | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. - * |NumLck| | | | | + * |NumLck| RESET| | | | * ,------|------|------| |------+------+------. * | | | | | | | | * | | |------| |------| | | @@ -206,9 +164,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_AMPR, _______, _______, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, _______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, _______, - RESET, DF(_QW), DF(_DV), DF(_CO), _______, + _______, DF(_QW), DF(_CO), _______, _______, - KC_NLCK,_______, + KC_NLCK,RESET, _______, _______,_______,_______, // right hand @@ -227,13 +185,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * Keymap: Extend * * ,--------------------------------------------------. ,--------------------------------------------------. - * | | | | | | | | | | | | | | | | + * | | F11 | F12 | F13 | F14 | F15 | Mute | | | F16 | F17 | F18 | F19 | F20 | | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | | | | | | | | | | | | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | |------| |------| | | | | | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | | | | | | | | | | | + * | | | | | | Ctrl`| Vol | | | PgUp | Home | Up | End | Del | | + * |--------+------+------+------+------+------| Up | | |------+------+------+------+------+--------| + * | | | Gui | Alt | Ctrl | |------| |------| PgDn | Left | Down | Right| BkSp | PrntScr| + * |--------+------+------+------+------+------| Vol | | |------+------+------+------+------+--------| + * | | Undo | Cut | Copy | | Paste| Down | | | | ^Tab | Tab | |Insert| | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * | | | | | | | | | | | | * `----------------------------------' `----------------------------------' @@ -244,23 +202,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | |------| |------| | | * | | | | | | | | * `--------------------' `--------------------' + * + * Ctrl+` is a keyboard shortcut for the program ConEmu, which provides a Quake-style drop-down command prompt. + * */ [_EX] = KEYMAP( // left hand - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, + _______, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_MUTE, + _______, _______, _______, _______, _______, KCX_CGR, KC_VOLU, + _______, _______, KC_LGUI, KC_LALT, KC_LCTL, _______, + _______, KX_UNDO, KX_CUT, KX_COPY, _______, KX_PAST, KC_VOLD, _______, _______, _______, _______, _______, _______,_______, _______, _______,_______,_______, // right hand - _______, _______, _______, _______, _______, _______, _______, - _______, KC_PGUP, KC_HOME, KC_UP, KC_END, _______, _______, - KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, - _______, _______, _______, _______, _______, _______, _______, + _______, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, _______, + _______, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_DEL, _______, + KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_BSPC, KC_PSCR, + _______, KCX_LST, KC_TAB, _______, _______, KC_INS, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -270,7 +231,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* * Keymap: Gaming * - * This is mostly a mouse overlay for the right hand while the left hand uses the QWERTY layout. + * Provides a mouse overlay for the right hand, and also moves some "gamer friendly" keys to the left, such as space. + * This layer also removes a lot of dual-role keys, as when gaming, it's nicer not to need to keep track of those. * * ,--------------------------------------------------. ,--------------------------------------------------. * | | | | | | | | | | | | | | | | @@ -281,13 +243,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | | | | | | | | | | | | | | | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | |MClick| | | | | + * | LCtrl| | | | | | | | | | | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. - * | | | | | ~_GA| + * | | ~_GA | | |MClick| * ,------|------|------| |------+------+------. * | | | | | | | | - * | | |------| |------|RClick|LClick| + * | Space| |------| |------|RClick|LClick| * | | | | | | | | * `--------------------' `--------------------' */ @@ -297,19 +259,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, + KC_LCTL, _______, _______, _______, _______, _______,_______, _______, - _______,_______,_______, + KC_SPC, _______,_______, // right hand _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_WH_U, KC_MS_U, KC_WH_D, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_BTN3, _______, _______, _______, _______, - _______, _______, + _______, _______, _______, _______, _______, + _______, KC_BTN3, _______, _______, KC_BTN2, KC_BTN1 ), -- cgit v1.2.3 From c67f6ee872561358c1f4d29b2e36087b03080253 Mon Sep 17 00:00:00 2001 From: Joshua T Date: Sat, 15 Oct 2016 17:03:27 -0500 Subject: Added Menu key (the rclick menu) --- keyboards/ergodox/keymaps/replicaJunction/keymap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/ergodox/keymaps/replicaJunction/keymap.c b/keyboards/ergodox/keymaps/replicaJunction/keymap.c index 7c2b051f9..f57e7373f 100644 --- a/keyboards/ergodox/keymaps/replicaJunction/keymap.c +++ b/keyboards/ergodox/keymaps/replicaJunction/keymap.c @@ -189,9 +189,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * | | | | | | Ctrl`| Vol | | | PgUp | Home | Up | End | Del | | * |--------+------+------+------+------+------| Up | | |------+------+------+------+------+--------| - * | | | Gui | Alt | Ctrl | |------| |------| PgDn | Left | Down | Right| BkSp | PrntScr| + * | | | Gui | Alt | Ctrl | |------| |------| PgDn | Left | Down | Right| BkSp | Menu | * |--------+------+------+------+------+------| Vol | | |------+------+------+------+------+--------| - * | | Undo | Cut | Copy | | Paste| Down | | | | ^Tab | Tab | |Insert| | + * | | Undo | Cut | Copy | | Paste| Down | | | | ^Tab | Tab | |Insert| PrntScr| * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * | | | | | | | | | | | | * `----------------------------------' `----------------------------------' @@ -220,8 +220,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // right hand _______, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, _______, _______, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_DEL, _______, - KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_BSPC, KC_PSCR, - _______, KCX_LST, KC_TAB, _______, _______, KC_INS, _______, + KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_BSPC, KC_MENU, + _______, KCX_LST, KC_TAB, _______, _______, KC_INS, KC_PSCR, _______, _______, _______, _______, _______, _______, _______, _______, -- cgit v1.2.3 From 07149812889e433ce684b14666e89e27264a41ce Mon Sep 17 00:00:00 2001 From: Joshua T Date: Sat, 15 Oct 2016 17:19:07 -0500 Subject: Fixed typo --- keyboards/ergodox/keymaps/replicaJunction/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/ergodox/keymaps/replicaJunction/keymap.c b/keyboards/ergodox/keymaps/replicaJunction/keymap.c index f57e7373f..f3a2e9513 100644 --- a/keyboards/ergodox/keymaps/replicaJunction/keymap.c +++ b/keyboards/ergodox/keymaps/replicaJunction/keymap.c @@ -118,7 +118,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL,TG(_GA), KC_HOME, - CTL_T(KC_BSPC), ALT_T(KC_DEL), MO(_NU) + CTL_T(KC_BSPC), ALT_T(KC_DEL), MO(_NU), // right hand KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, KC_BSPC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, -- cgit v1.2.3 From 80fe2ea676d54d917209567a346963ab9fd93614 Mon Sep 17 00:00:00 2001 From: Joshua T Date: Sat, 15 Oct 2016 17:23:25 -0500 Subject: Switched Tab and Ctrl back --- keyboards/ergodox/keymaps/replicaJunction/keymap.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/keyboards/ergodox/keymaps/replicaJunction/keymap.c b/keyboards/ergodox/keymaps/replicaJunction/keymap.c index f3a2e9513..eaa781070 100644 --- a/keyboards/ergodox/keymaps/replicaJunction/keymap.c +++ b/keyboards/ergodox/keymaps/replicaJunction/keymap.c @@ -41,9 +41,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,--------------------------------------------------. ,--------------------------------------------------. * | ` | 1 | 2 | 3 | 4 | 5 | Esc | | | 6 | 7 | 8 | 9 | 0 | = | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Tab | Q | W | F | P | B | Home | | BkSp | J | L | U | Y | ; | - | + * | LCtrl | Q | W | F | P | B | Home | | BkSp | J | L | U | Y | ; | - | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | LCtl | A | R | S | T | G |------| |------| M | N | E | I | O | ' | + * | Tab | A | R | S | T | G |------| |------| M | N | E | I | O | ' | * |--------+------+------+------+------+------| Hyper| | \ |------+------+------+------+------+--------| * | LShft | Z | X | C | D | V | | | | K | H | , | , | / | RShft | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' @@ -61,8 +61,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_CO] = KEYMAP( // left hand KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, - KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_HOME, - KC_LCTL,KC_A, KC_R, KC_S, KC_T, KC_G, + KC_LCTL,KC_Q, KC_W, KC_F, KC_P, KC_B, KC_HOME, + KC_TAB, KC_A, KC_R, KC_S, KC_T, KC_G, KC_LSFT,KC_Z, KC_X, KC_C, KC_D, KC_V, ALL_T(KC_NO), KC_LGUI,KC_LBRC,KC_RBRC, LCTL(KC_LSFT), KC_LALT, @@ -92,7 +92,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,--------------------------------------------------. ,--------------------------------------------------. * | ` | 1 | 2 | 3 | 4 | 5 | Esc | | | 6 | 7 | 8 | 9 | 0 | = | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | LShift | Q | W | E | R | T | Home | | BkSp | Y | U | I | O | P | - | + * | LCtrl | Q | W | E | R | T | Home | | BkSp | Y | U | I | O | P | - | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | Tab | A | S | D | F | G |------| |------| H | J | K | L | ; | ' | * |--------+------+------+------+------+------| Hyper| | \ |------+------+------+------+------+--------| @@ -111,8 +111,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QW] = KEYMAP( // Layer1: QWERTY // left hand KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HOME, - KC_LCTL,KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LCTL,KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HOME, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), KC_LCTL,KC_GRV, KC_SLSH,LCTL(KC_LSFT), MO(_NU), -- cgit v1.2.3 From 1455a44a449378c55e178ac20d37146ab5132e7c Mon Sep 17 00:00:00 2001 From: Joshua T Date: Sat, 15 Oct 2016 17:41:36 -0500 Subject: Added = to match Atreus --- keyboards/ergodox/keymaps/replicaJunction/keymap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/ergodox/keymaps/replicaJunction/keymap.c b/keyboards/ergodox/keymaps/replicaJunction/keymap.c index eaa781070..d467c56b4 100644 --- a/keyboards/ergodox/keymaps/replicaJunction/keymap.c +++ b/keyboards/ergodox/keymaps/replicaJunction/keymap.c @@ -47,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| Hyper| | \ |------+------+------+------+------+--------| * | LShft | Z | X | C | D | V | | | | K | H | , | , | / | RShft | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | LGui | [ | ] |CtlShf| LAlt | | _EX | - | ' | Right| \ | + * | LGui | [ | ] |CtlShf| LAlt | | _EX | - | ' | = | \ | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | LCtrl| ~GA | | Left | Right| @@ -74,7 +74,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_BSPC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN,KC_MINS, KC_M, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_BSLS, KC_K, KC_H, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT, - MO(_EX),KC_MINS,KC_QUOT,KC_RGHT,KC_BSLS, + MO(_EX),KC_MINS,KC_QUOT,KC_EQL, KC_BSLS, KC_LEFT, KC_RGHT, KC_UP, @@ -98,7 +98,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| Hyper| | \ |------+------+------+------+------+--------| * | LShft | Z | X | C | V | B | | | | N | M | , | . | / | RShft | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | LGui | ` | \ |CtlShf| _NU | | _EX | - | ' | [ | ] | + * | LGui | ` | \ |CtlShf| _NU | | _EX | - | ' | = | \ | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | LCtrl| ~GA | | Left | Right| @@ -124,7 +124,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_BSPC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_BSLS, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT, - MO(_EX),KC_MINS,KC_QUOT,KC_RGHT,KC_BSLS, + MO(_EX),KC_MINS,KC_QUOT,KC_EQL, KC_BSLS, KC_LEFT, KC_RGHT, KC_UP, -- cgit v1.2.3 From 825563f34d233728b03e5311cc0d77c40123c1cb Mon Sep 17 00:00:00 2001 From: Joshua T Date: Sat, 15 Oct 2016 17:56:09 -0500 Subject: Moved Extend tab and ^tab --- keyboards/ergodox/keymaps/replicaJunction/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/ergodox/keymaps/replicaJunction/keymap.c b/keyboards/ergodox/keymaps/replicaJunction/keymap.c index d467c56b4..949a713ba 100644 --- a/keyboards/ergodox/keymaps/replicaJunction/keymap.c +++ b/keyboards/ergodox/keymaps/replicaJunction/keymap.c @@ -26,7 +26,7 @@ // Some quick aliases, just to make it look pretty #define _______ KC_TRNS #define KCX_CGR LCTL(KC_GRV) -#define KCX_LST LSFT(KC_TAB) +#define KX_STAB LSFT(KC_TAB) #define KX_COPY LCTL(KC_C) #define KX_CUT LCTL(KC_X) #define KX_PAST LCTL(KC_V) @@ -221,7 +221,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, _______, _______, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_DEL, _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_BSPC, KC_MENU, - _______, KCX_LST, KC_TAB, _______, _______, KC_INS, KC_PSCR, + _______, _______, KX_STAB, KC_TAB, _______, KC_INS, KC_PSCR, _______, _______, _______, _______, _______, _______, _______, _______, -- cgit v1.2.3 From a2adff94bb52b5fb7c50b90716255ccfae9f53c3 Mon Sep 17 00:00:00 2001 From: Joshua T Date: Sat, 15 Oct 2016 18:05:22 -0500 Subject: Reversed tilde and grave --- keyboards/ergodox/keymaps/replicaJunction/keymap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/ergodox/keymaps/replicaJunction/keymap.c b/keyboards/ergodox/keymaps/replicaJunction/keymap.c index 949a713ba..610fa5856 100644 --- a/keyboards/ergodox/keymaps/replicaJunction/keymap.c +++ b/keyboards/ergodox/keymaps/replicaJunction/keymap.c @@ -144,9 +144,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * | | ! | @ | { | } | & | | | | / | 7 | 8 | 9 | * | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | # | $ | ( | ) | ` |------| |------| | | 4 | 5 | 6 | - | | + * | | # | $ | ( | ) | ~ |------| |------| | | 4 | 5 | 6 | - | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | % | ^ | [ | ] | ~ | | | | \ | 1 | 2 | 3 | + | | + * | | % | ^ | [ | ] | ` | | | | \ | 1 | 2 | 3 | + | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * | |QWERTY|Colemk| | | | 0 | . | = | | | * `----------------------------------' `----------------------------------' @@ -162,8 +162,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // left hand _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_AMPR, _______, - _______, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, - _______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, _______, + _______, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_TILD, + _______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_GRV, _______, _______, DF(_QW), DF(_CO), _______, _______, KC_NLCK,RESET, -- cgit v1.2.3 From 896c1e6f1efbc7827249872ef64261facec484c5 Mon Sep 17 00:00:00 2001 From: Joshua T Date: Sat, 15 Oct 2016 18:19:09 -0500 Subject: Added a bit more detail to header --- keyboards/ergodox/keymaps/replicaJunction/keymap.c | 51 ++++++++++++---------- 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/keyboards/ergodox/keymaps/replicaJunction/keymap.c b/keyboards/ergodox/keymaps/replicaJunction/keymap.c index 610fa5856..b7a14c10c 100644 --- a/keyboards/ergodox/keymaps/replicaJunction/keymap.c +++ b/keyboards/ergodox/keymaps/replicaJunction/keymap.c @@ -8,6 +8,10 @@ * have both keyboards, so I've designed these layouts in an effort to make switching between the * two as easy as possible. * + * I've also tried to make use of the extra keys on the Ergodox in as logical of a manner as possible, + * adding to the layers in the Atreus config without disturbing what's there already. This allows for + * things like F11-F20, the Application (Menu) key, and better media key placement. + * * The default key layout in this keymap is Colemak-ModDH. Information on that layout can be found * here: https://colemakmods.github.io/mod-dh/ */ @@ -35,29 +39,28 @@ ; // This doesn't do anything. It's just for VSCode because its syntax highlighting is weird for the above #define statements. const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* - * Keymap: Colemak-ModDH - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | Esc | | | 6 | 7 | 8 | 9 | 0 | = | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | LCtrl | Q | W | F | P | B | Home | | BkSp | J | L | U | Y | ; | - | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | Tab | A | R | S | T | G |------| |------| M | N | E | I | O | ' | - * |--------+------+------+------+------+------| Hyper| | \ |------+------+------+------+------+--------| - * | LShft | Z | X | C | D | V | | | | K | H | , | , | / | RShft | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | LGui | [ | ] |CtlShf| LAlt | | _EX | - | ' | = | \ | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | LCtrl| ~GA | | Left | Right| - * ,------|------|------| |------+------+------. - * |LCtrl/| LAlt/| Home | | Up | Alt/| _NU/ | - * | BkSp | Del |------| |------| Enter| Space| - * | | | _NU | | Down | | | - * `--------------------' `--------------------' - */ - + /* + * Keymap: Colemak-ModDH + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | Esc | | | 6 | 7 | 8 | 9 | 0 | = | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | LCtrl | Q | W | F | P | B | Home | | BkSp | J | L | U | Y | ; | - | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Tab | A | R | S | T | G |------| |------| M | N | E | I | O | ' | + * |--------+------+------+------+------+------| Hyper| | \ |------+------+------+------+------+--------| + * | LShft | Z | X | C | D | V | | | | K | H | , | , | / | RShft | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | LGui | [ | ] |CtlShf| LAlt | | _EX | - | ' | = | \ | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | LCtrl| ~GA | | Left | Right| + * ,------|------|------| |------+------+------. + * |LCtrl/| LAlt/| Home | | Up | Alt/| _NU/ | + * | BkSp | Del |------| |------| Enter| Space| + * | | | _NU | | Down | | | + * `--------------------' `--------------------' + */ [_CO] = KEYMAP( // left hand KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, @@ -131,7 +134,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_DOWN, ALT_T(KC_ENT), LT(_NU,KC_SPC) ), -/* + /* * Keymap: Numbers and symbols * * Note that the number keys here are actually numpad keystrokes. This often doesn't matter, but it may be relevant in a few cases. -- cgit v1.2.3 From d9dede476fe91ea1ec99186ceb55cfad64e3f247 Mon Sep 17 00:00:00 2001 From: Joshua T Date: Sat, 15 Oct 2016 18:40:26 -0500 Subject: Added VS Code dir to .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 153fea093..1abaeb217 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,4 @@ CMakeLists.txt .browse.VC.db* *.stackdump util/Win_Check_Output.txt +.vscode \ No newline at end of file -- cgit v1.2.3 From 7d698cc494f984d8e526a6fb29f838ae0166e909 Mon Sep 17 00:00:00 2001 From: Joshua T Date: Mon, 24 Oct 2016 10:30:00 -0500 Subject: Added comments with ASCII art keymaps --- keyboards/atreus/keymaps/replicaJunction/keymap.c | 106 +++++++++++++++++++++- 1 file changed, 105 insertions(+), 1 deletion(-) diff --git a/keyboards/atreus/keymaps/replicaJunction/keymap.c b/keyboards/atreus/keymaps/replicaJunction/keymap.c index f7ef1174d..4d46db69e 100644 --- a/keyboards/atreus/keymaps/replicaJunction/keymap.c +++ b/keyboards/atreus/keymaps/replicaJunction/keymap.c @@ -45,6 +45,21 @@ ; // This doesn't do anything. It's just for VSCode because its syntax highlighting is weird for the above #define statements. const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* + * Colemak-ModDH + * + * ,----------------------------------. ,----------------------------------. + * | Q | W | F | P | B | | J | L | U | Y | ; | + * +------+------+------+------+------| +------+------+------+------+------| + * | A | R | S | T | G | | M | N | E | I | O | + * +------+------+------+------+------| +------+------+------+------+------| + * |Z Shft| X | C | D | V | ,------. ,------. | K | H | , | . |/ Shft| + * +------+------+------+------+------| | Ctrl | | Alt | +------+------+------+------+------| + * | Esc | Gui | Tab | Alt | Bksp | | Del | | Enter| |Sp/_NU| _EX | - | ' | = | + * `----------------------------------' `------' `------' `----------------------------------' + * + */ [_CO] = KEYMAP( KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, @@ -52,6 +67,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_LGUI, KC_TAB, KC_LALT, KC_BSPC, CTL_T(KC_DEL), ALT_T(KC_ENT), LT(_NU, KC_SPC), MO(_EX), KC_MINS, KC_QUOT, KC_EQL ), +/* + * QWERTY + * + * ,----------------------------------. ,----------------------------------. + * | Q | W | E | R | T | | Y | U | I | O | P | + * +------+------+------+------+------| +------+------+------+------+------| + * | A | S | D | F | G | | H | J | K | L | ; | + * +------+------+------+------+------| +------+------+------+------+------| + * |Z Shft| X | C | V | B | ,------. ,------. | N | M | , | . |/ Shft| + * +------+------+------+------+------| | Ctrl | | Alt | +------+------+------+------+------| + * | Esc | Gui | Tab | Alt | Bksp | | Del | | Enter| |Sp/_NU| _EX | - | ' | = | + * `----------------------------------' `------' `------' `----------------------------------' + * + */ [_QW] = KEYMAP( /* Qwerty */ KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, @@ -59,13 +88,45 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_LGUI, KC_TAB, KC_LALT, KC_BSPC, CTL_T(KC_DEL), ALT_T(KC_ENT), LT(_NU, KC_SPC), MO(_EX), KC_MINS, KC_QUOT, KC_EQL ), +/* + * Extend + * + * Ctrl+` is a keyboard shortcut for the program ConEmu, which brings up a dropdown console window. + * + * Also note that some dual-role keys are overridden here with their modifiers + * + * ,----------------------------------. ,----------------------------------. + * | Caps | | | |Ctrl `| | PgUp | Home | Up | End | Del | + * +------+------+------+------+------| +------+------+------+------+------| + * | | Gui | Alt | Ctrl | | | PgDn | Left | Down | Right| Bksp | + * +------+------+------+------+------| +------+------+------+------+------| + * | Shift| Cut | Copy | | Paste| ,------. ,------. | | ^Tab | Tab | |Insert| + * +------+------+------+------+------| | | | | +------+------+------+------+------| + * | | | | | | | | | | | Space| | | |PrntSc| + * `----------------------------------' `------' `------' `----------------------------------' + * + */ [_EX] = KEYMAP( /* Extend */ KC_CAPS, _______, _______, _______, LCTL(KC_GRV), KC_PGUP, KC_HOME, KC_UP, KC_END, KC_DEL, _______, KC_LGUI, KC_LALT, KC_LCTL, _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_BSPC, - _______, KX_CUT, KX_COPY, _______, KX_PAST, _______, KC_TAB, KCX_LST, _______, KC_INSERT, + KC_LSFT, KX_CUT, KX_COPY, _______, KX_PAST, _______, KCX_LST, KC_TAB, _______, KC_INS, _______, _______, _______, _______, _______, _______, _______, KC_SPC, _______, _______, _______, KC_PSCR ), +/* + * Numbers and symbols + * + * ,----------------------------------. ,----------------------------------. + * | ! | @ | { | } | & | | / | 7 | 8 | 9 | * | + * +------+------+------+------+------| +------+------+------+------+------| + * | # | $ | ( | ) | ~ | | | | 4 | 5 | 6 | - | + * +------+------+------+------+------| +------+------+------+------+------| + * | % | ^ | [ | ] | ` | ,------. ,------. | \ | 1 | 2 | 3 | + | + * +------+------+------+------+------| | | | | +------+------+------+------+------| + * | | _GA | | _FN | | | | | | | | 0 | . | = | | + * `----------------------------------' `------' `------' `----------------------------------' + * + */ [_NU] = KEYMAP( /* Numbers and symbols */ KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_AMPR, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_TILD, KC_PIPE, KC_4, KC_5, KC_6, KC_MINS, @@ -73,6 +134,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, TG(_GA), _______, MO(_FN), _______, _______, _______, _______, KC_0, KC_DOT, KC_EQL, _______ ), +/* + * Functions + * + * ,----------------------------------. ,----------------------------------. + * | | | | | | | | F7 | F8 | F9 | F10 | + * +------+------+------+------+------| +------+------+------+------+------| + * | | | | | | | | F4 | F5 | F6 | F11 | + * +------+------+------+------+------| +------+------+------+------+------| + * | | Vol ^| Mute | Vol v| Play | ,------. ,------. | | F1 | F2 | F3 | F12 | + * +------+------+------+------+------| | | | | +------+------+------+------+------| + * | | | | | Stop | | | | | | | | _CO | _GA | RESET| + * `----------------------------------' `------' `------' `----------------------------------' + * + */ [_FN] = KEYMAP( /* Functions */ KC_DEL, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_BSPC, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, _______, KC_F4, KC_F5, KC_F6, KC_F11, @@ -80,6 +155,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, KC_MSTP, _______, _______, _______, KC_NO, DF(_CO), DF(_QW), RESET ), +/* + * Gaming + * + * ,----------------------------------. ,----------------------------------. + * | | | | | | | |Whl Up| MUp |Whl Dn| | + * +------+------+------+------+------| +------+------+------+------+------| + * | | | | | | | | MLeft| MDown|MRight| | + * +------+------+------+------+------| +------+------+------+------+------| + * | Z | | | | | ,------. ,------. |MClick| | | | | + * +------+------+------+------+------| | Bksp | |RClick| +------+------+------+------+------| + * | | _GA | | Shift| Space| | | | | |LClick| | | | | + * `----------------------------------' `------' `------' `----------------------------------' + * + */ [_GA] = KEYMAP( /* Gaming */ _______, _______, _______, _______, _______, _______, KC_WH_U, KC_MS_U, KC_WH_D, _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, @@ -87,6 +176,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, TG(_GA), _______, KC_LSFT, KC_SPC, KC_BSPC, KC_BTN2, KC_BTN1, _______, _______, _______, _______ )}; +/* + * Template + * + * ,----------------------------------. ,----------------------------------. + * | | | | | | | | | | | | + * +------+------+------+------+------| +------+------+------+------+------| + * | | | | | | | | | | | | + * +------+------+------+------+------| +------+------+------+------+------| + * | | | | | | ,------. ,------. | | | | | | + * +------+------+------+------+------| | | | | +------+------+------+------+------| + * | | | | | | | | | | | | | | | | + * `----------------------------------' `------' `------' `----------------------------------' + * + */ + const uint16_t PROGMEM fn_actions[] = { }; -- cgit v1.2.3 From 59bef40aab37f8dd4db61e601f2a0e9b5991e993 Mon Sep 17 00:00:00 2001 From: Zach Nielsen Date: Thu, 10 Nov 2016 12:14:54 -0800 Subject: Keep unicode's input_mode through a power cycle --- quantum/process_keycode/process_unicode.c | 6 ++++++ tmk_core/common/eeconfig.h | 1 + 2 files changed, 7 insertions(+) diff --git a/quantum/process_keycode/process_unicode.c b/quantum/process_keycode/process_unicode.c index cd3a610b4..f42f25538 100644 --- a/quantum/process_keycode/process_unicode.c +++ b/quantum/process_keycode/process_unicode.c @@ -1,6 +1,7 @@ #include "process_unicode.h" static uint8_t input_mode; +static uint8_t first_flag = 0; __attribute__((weak)) uint16_t hex_to_keycode(uint8_t hex) @@ -17,6 +18,7 @@ uint16_t hex_to_keycode(uint8_t hex) void set_unicode_input_mode(uint8_t os_target) { input_mode = os_target; + eeprom_update_byte(EECONFIG_UNICODEMODE, os_target); } uint8_t get_unicode_input_mode(void) { @@ -75,6 +77,10 @@ void register_hex(uint16_t hex) { bool process_unicode(uint16_t keycode, keyrecord_t *record) { if (keycode > QK_UNICODE && record->event.pressed) { + if (first_flag == 0) { + set_unicode_input_mode(eeprom_read_byte(EECONFIG_UNICODEMODE)); + first_flag = 1; + } uint16_t unicode = keycode & 0x7FFF; unicode_input_start(); register_hex(unicode); diff --git a/tmk_core/common/eeconfig.h b/tmk_core/common/eeconfig.h index d8caa346f..280dc7ab6 100644 --- a/tmk_core/common/eeconfig.h +++ b/tmk_core/common/eeconfig.h @@ -33,6 +33,7 @@ along with this program. If not, see . #define EECONFIG_BACKLIGHT (uint8_t *)6 #define EECONFIG_AUDIO (uint8_t *)7 #define EECONFIG_RGBLIGHT (uint32_t *)8 +#define EECONFIG_UNICODEMODE (uint8_t *)12 /* debug bit */ -- cgit v1.2.3 From c07ef5c6abd7875c19c4bcbe3bcaecd123862fd3 Mon Sep 17 00:00:00 2001 From: Zach Nielsen Date: Thu, 10 Nov 2016 12:26:56 -0800 Subject: Adding my (zach) keymaps for planck and preonic --- keyboards/planck/keymaps/zach/Makefile | 29 ++ keyboards/planck/keymaps/zach/config.h | 91 ++++ keyboards/planck/keymaps/zach/keymap.c | 48 ++ .../planck/keymaps/zach/zach_common_functions.c | 538 +++++++++++++++++++++ keyboards/preonic/keymaps/zach/Makefile | 29 ++ keyboards/preonic/keymaps/zach/config.h | 95 ++++ keyboards/preonic/keymaps/zach/keymap.c | 54 +++ .../preonic/keymaps/zach/zach_common_functions.c | 538 +++++++++++++++++++++ 8 files changed, 1422 insertions(+) create mode 100644 keyboards/planck/keymaps/zach/Makefile create mode 100644 keyboards/planck/keymaps/zach/config.h create mode 100644 keyboards/planck/keymaps/zach/keymap.c create mode 100644 keyboards/planck/keymaps/zach/zach_common_functions.c create mode 100644 keyboards/preonic/keymaps/zach/Makefile create mode 100644 keyboards/preonic/keymaps/zach/config.h create mode 100644 keyboards/preonic/keymaps/zach/keymap.c create mode 100644 keyboards/preonic/keymaps/zach/zach_common_functions.c diff --git a/keyboards/planck/keymaps/zach/Makefile b/keyboards/planck/keymaps/zach/Makefile new file mode 100644 index 000000000..b0009147a --- /dev/null +++ b/keyboards/planck/keymaps/zach/Makefile @@ -0,0 +1,29 @@ +# Zach Planck Makefile +# Max .hex size is about 28636 bytes + +# 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 +# +TAP_DANCE_ENABLE = yes # Enable TapDance functionality +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # 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 +USB_6KRO_ENABLE = no # 6key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +VARIABLE_TRACE = no # Debug changes to variable values +UNICODE_ENABLE = yes # Unicode +UNICODEMAP_ENABLE = yes # Enable extended 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. +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/planck/keymaps/zach/config.h b/keyboards/planck/keymaps/zach/config.h new file mode 100644 index 000000000..1be800545 --- /dev/null +++ b/keyboards/planck/keymaps/zach/config.h @@ -0,0 +1,91 @@ +/* +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 MANUFACTURER Ortholinear Keyboards +#define PRODUCT The Planck Keyboard +#define DESCRIPTION A compact ortholinear keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* Planck PCB default pin-out */ +#define MATRIX_ROW_PINS { D0, D5, B5, B6 } +#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 } +#define UNUSED_PINS + +#define BACKLIGHT_PIN B7 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +//#define BACKLIGHT_BREATHING // LED breathing +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 5 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* 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 command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +#define NO_ACTION_TAPPING +#define NO_ACTION_ONESHOT +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION +#define PREVENT_STUCK_MODIFIERS +//#define DYNAMIC_MACRO_ENABLE // Enable if you need to use the macro functionality +//#define SPACE_CADET // Parenthesis on L/R shift + +#ifdef SUBPROJECT_rev3 + #include "rev3/config.h" +#endif +#ifdef SUBPROJECT_rev4 + #include "rev4/config.h" +#endif + +#endif diff --git a/keyboards/planck/keymaps/zach/keymap.c b/keyboards/planck/keymaps/zach/keymap.c new file mode 100644 index 000000000..d3cde5bb9 --- /dev/null +++ b/keyboards/planck/keymaps/zach/keymap.c @@ -0,0 +1,48 @@ +// Zach Nielsen Custom Planck Keyboard layout +#include "planck.h" +#define PLANCK_YES // This is the Planck +#include "zach_common_functions.c" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_COLEMAK] = { /* Base Layer */ + {KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, KC_BSPC}, + {KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT}, + {SHFT_CAP,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, + {CTRLB, TD(SUP), KC_LALT, KC_LCTL, TD(LOW), KC_SPC, KC_SPC, TD(RAI), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +[_SWCOLE] = { /* Software Colemak */ + {_______, CM_Q, CM_W, CM_F, CM_P, CM_G, CM_J, CM_L, CM_U, CM_Y, KC_QUOT, _______}, + {_______, CM_A, CM_R, CM_S, CM_T, CM_D, CM_H, CM_N, CM_E, CM_I, CM_O, _______}, + {_______, CM_Z, CM_X, CM_C, CM_V, CM_B, CM_K, CM_M, CM_COMM, CM_DOT, CM_SLSH, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +}, + +[_RAISE] = { /* RAISE - Numpad and Unicode symbols */ + {KC_GRV, SUPA2, FACE, DISFACE, SHRUG, PLUMIN, IBANG, KC_7, KC_8, KC_9, KC_COLN, _______}, + {KC_DEL, DEGREE, MICRO, WOMEGA, OMEGA, PENGY, KC_ENT, KC_4, KC_5, KC_6, KC_SLSH, KC_ASTR}, + {_______, KC_COLN, TFLIP, LAROW, RAROW, DUCK, KC_SPC, KC_1, KC_2, KC_3, KC_MINS, KC_PLUS}, + {_______, KC_PIPE, TPUT, _______, _______, KC_TAB, KC_TAB, _______, KC_0, KC_0, KC_DOT, KC_EQL} +}, + +[_LOWER] = { /* LOWER - Symbols, Paging, CtrAltDel */ + {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_QUES, KC_DQT, KC_DEL}, + {KC_DEL, KC_LBRC, KC_RBRC, KC_MINS, KC_UNDS, KC_HOME, KC_END, KC_LPRN, KC_RPRN, KC_SLSH, KC_SCLN, KC_PGUP}, + {CPYPST, XXXXXXX, C(KC_X), KC_LABK, KC_RABK, XXXXXXX, XXXXXXX, KC_LCBR, KC_RCBR, KC_BSLS, KC_COLN, KC_PGDN}, + {_______, _______, _______, _______, _______, KC_TAB, KC_TAB, _______, _______, _______, _______, _______} +}, + +[_ADJUST] = { /* ADJUST - Macros, Layer Switching, Function Keys */ + {UNIWIN, Sil_Usr, Sil_Pas, PENGY, DUCK, KC_INS, KC_NLCK, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX}, + {UNILIN, UltiU, UltiP, RANDIG, RANDIG, SWCOLE, COLEMAK, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX}, + {_______, CADKEY, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX}, + {_______, _______, _______, _______, _______, RESET, RESET, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX} +}, + +[_UNICODES] = { /* UNICODES - Extra layer for unicode stuff */ + {_______, TFLIP, XXXXXXX, FINGER, IBANG, roman7, XXXXXXX, XXXXXXX, ROMAN7, TappyL, TappyR, _______}, + {KC_DEL, TPUT, FACE, DISFACE, SHRUG, roman4, roman5, roman6, ROMAN4, ROMAN5, ROMAN6, _______}, + {XXXXXXX, PENIS, BOOBS, LAROW, RAROW, roman1, roman2, roman3, ROMAN1, ROMAN2, ROMAN3, XXXXXXX}, + {_______, _______, _______, _______, _______, KC_SPC, KC_SPC, _______, _______, _______, _______, _______} +} +}; diff --git a/keyboards/planck/keymaps/zach/zach_common_functions.c b/keyboards/planck/keymaps/zach/zach_common_functions.c new file mode 100644 index 000000000..f01929f5d --- /dev/null +++ b/keyboards/planck/keymaps/zach/zach_common_functions.c @@ -0,0 +1,538 @@ +#ifndef ZACH_COMMON_FUNCTIONS +#define ZACH_COMMON_FUNCTIONS +#include "eeconfig.h" +#include "action_layer.h" +#include "keymap_colemak.h" +#include "extra_functions.c" +extern keymap_config_t keymap_config; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO +#define C(n) RCTL(n) +#define CADKEY RCTL(RALT(KC_DEL)) + +void tap(uint16_t keycode){ + register_code(keycode); + unregister_code(keycode); +}; + +void persistant_default_layer_set(uint16_t default_layer){ + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +}; + +// Automatic number generation of important keywords +enum my_keycodes{ + // Layer numbers + _COLEMAK = 0, + _SWCOLE, + _RAISE, + _LOWER, + _ADJUST, + _UNICODES, + // These use process_record_user() + COLEMAK = SAFE_RANGE, + SWCOLE, + LOWER, + RAISE, + SHFT_CAP, + CTRLB, + CPYPST, + FACE, + UNIWIN, + UNILIN, + DISFACE, + TFLIP, + TPUT, + SHRUG, + PENIS, + BOOBS, + Sil_Pas, + Sil_Usr, + UltiU, + UltiP, + TappyR, + TappyL, + RANDIG, + FINGER, + // Tap_Dance nums + RAI = 0, + LOW, + SUP +}; + +#ifdef AUDIO_ENABLE +#include "audio.h" +float tone_startup[][2] = SONG(STARTUP_SOUND); +float tone_goodbye[][2] = SONG(GOODBYE_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +float tone_swcole[][2] = SONG(QWERTY_SOUND); +float tone_capslock_on[][2] = SONG(CAPS_LOCK_ON_SOUND); +float tone_capslock_off[][2] = SONG(CAPS_LOCK_OFF_SOUND); +float tone_ctrl_mod[][2] = SONG(COIN_SOUND); +float tone_copy[][2] = SONG(SCROLL_LOCK_ON_SOUND); +float tone_paste[][2] = SONG(SCROLL_LOCK_OFF_SOUND); +float uniwin[][2] = SONG(UNICODE_WINDOWS); +float unilin[][2] = SONG(UNICODE_LINUX); +#endif + +#ifdef TAP_DANCE_ENABLE +#define TAPPING_TERM 200 + +uint8_t Lstate = 0, Rstate = 0; +uint32_t Ltimer = 0, Rtimer = 0; +uint32_t Ltimes[3], Rtimes[4]; // Ratio of tap times should be about 1.335 (L/R) +void rhythm_parse(void){ + int L = Ltimes[0] + Ltimes[1] + Ltimes[2]; // Start to end time + int R = Rtimes[0] + Rtimes[1] + Rtimes[2] + Rtimes[3]; + if(abs(R-L) > 10){ + tap(KC_N); tap(KC_O); + return; + } else { + L = (L / 3)*100; // Average time per tap * 100 + R = (R / 4); + if(abs(abs(L/R)-133) > 1){ + tap(KC_N); tap(KC_O); + tap(KC_P); tap(KC_E); + return; + } else { + tap(KC_O); tap(KC_K); + return; + } + } +}; + +void dance_raise_press(qk_tap_dance_state_t *state, void *user_data){// Called on each tap + switch(state->count){ // Only turn the layer on once + case 1: + layer_off(_UNICODES); + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + break; + } +}; +void dance_raise_lift(qk_tap_dance_state_t *state, void *user_data){ // Called on release + switch(state->count){ + case 1: // Normal action. Turn off layers + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + layer_off(_UNICODES); + break; + } +}; +///////////////////////////////////////////////////////////////////// +void dance_lower_press(qk_tap_dance_state_t *state, void *user_data){// Called on tap + switch(state->count){ + case 1: // Turn on lower + layer_off(_UNICODES); + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + break; + } +}; +void dance_lower_lift(qk_tap_dance_state_t *state, void *user_data){ // Called on release + switch(state->count){ + case 1: // Normal action. Turn off layers + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + layer_off(_UNICODES); + break; + case 2: // Turn on _UNICODES layer + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + layer_on(_UNICODES); + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_ctrl_mod, false, 0); + #endif + break; + } +}; +///////////////////////////////////////////////////////////////////// +void dance_super_press(qk_tap_dance_state_t *state, void *user_data){ // Called on down + if(state->count == 1){ + register_code(KC_LGUI); + } +} +void dance_super_done(qk_tap_dance_state_t *state, void *user_data){ // Called on timeout + switch(state->count){ + case 2: + register_code(KC_LGUI); + tap(KC_L); + unregister_code(KC_LGUI); + break; + } +} +void dance_super_lift(qk_tap_dance_state_t *state, void *user_data){ // Called on up + unregister_code(KC_LGUI); +} + +qk_tap_dance_action_t tap_dance_actions[] = { + [RAI] = ACTION_TAP_DANCE_FN_ADVANCED(dance_raise_press, NULL, dance_raise_lift), + [LOW] = ACTION_TAP_DANCE_FN_ADVANCED(dance_lower_press, NULL, dance_lower_lift), + [SUP] = ACTION_TAP_DANCE_FN_ADVANCED(dance_super_press, dance_super_done, dance_super_lift) +}; +#endif + +#ifdef UNICODE_ENABLE +// Unicode shortcuts +#define IBANG UC(0x203D) +#define RAROW UC(0x2192) +#define LAROW UC(0x2190) +#define DEGREE UC(0x00B0) +#define OMEGA UC(0x03A9) +#define WOMEGA UC(0x03C9) +#define MICRO UC(0x00B5) +#define PLUMIN UC(0x00B1) +#define SUPA2 UC(0x00B2) +#define ROMAN1 UC(0x2160) +#define ROMAN2 UC(0x2161) +#define ROMAN3 UC(0x2162) +#define ROMAN4 UC(0x2163) +#define ROMAN5 UC(0x2164) +#define ROMAN6 UC(0x2165) +#define ROMAN7 UC(0x2166) +#define roman1 UC(0x2170) +#define roman2 UC(0x2171) +#define roman3 UC(0x2172) +#define roman4 UC(0x2173) +#define roman5 UC(0x2174) +#define roman6 UC(0x2175) +#define roman7 UC(0x2176) + +#ifdef UNICODEMAP_ENABLE // For Unicode characters larger than 0x8000. Send with X() +enum Ext_Unicode{ + PENGUIN = 0, + BOAR, + MONKEY, + DRAGON, + CHICK, + TUMBLER +}; +const uint32_t PROGMEM unicode_map[] = { + [PENGUIN] = 0x1F427, + [BOAR] = 0x1F417, + [MONKEY] = 0x1F412, + [DRAGON] = 0x1F409, + [CHICK] = 0x1F425, + [TUMBLER] = 0x1F943 +}; +#define PENGY X(PENGUIN) +#define BOARY X(BOAR) +#define MNKY X(MONKEY) +#define DRGN X(DRAGON) +#define DUCK X(CHICK) +#define TMBL X(TUMBLER) +#endif + +#endif + +static uint16_t key_timer; +static uint8_t caps_status = 0; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case COLEMAK: + if(record->event.pressed){ + persistant_default_layer_set(1UL<<_COLEMAK); + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_colemak, false, 0); + #endif + } + return false; + break; + case SWCOLE: + if(record->event.pressed){ + persistant_default_layer_set(1UL<<_SWCOLE); + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_swcole, false, 0); + #endif + } + return false; + break; + #ifndef TAP_DANCE_ENABLE + 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 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; + #endif + case SHFT_CAP: + if(record->event.pressed){ + key_timer = timer_read(); // if the key is being pressed, we start the timer. + register_code(KC_LSHIFT); + } else { // this means the key was just released (tap or "held down") + if(timer_elapsed(key_timer) < 152){ // Time in ms, the threshold we pick for counting something as a tap. + tap(KC_CAPS); + if(caps_status == 0){ + caps_status = 1; + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_capslock_on, false, 0); + #endif + } else { + caps_status = 0; + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_capslock_off, false, 0); + #endif + } + } + unregister_code(KC_LSHIFT); + } + return false; + break; + case CTRLB: // Control-B on tap (bold) + if(record->event.pressed){ + key_timer = timer_read(); // if the key is being pressed, we start the timer. + register_code(KC_LCTL); + } else { // this means the key was just released (tap or "held down") + if (timer_elapsed(key_timer) < 152) { // Time in ms, the threshold we pick for counting something as a tap. + tap(KC_B); + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_ctrl_mod, false, 0); + #endif + #ifdef BACKLIGHT_BREATHING + breathing_speed_set(2); + breathing_pulse(); + #endif + } + unregister_code(KC_LCTL); + } + return false; + break; + case CPYPST: // One key copy/paste + if(record->event.pressed){ + key_timer = timer_read(); + } else { + if (timer_elapsed(key_timer) > 152) { // Hold, copy + register_code(KC_LCTL); + tap(KC_C); + unregister_code(KC_LCTL); + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_copy, false, 0); + #endif + } else { // Tap, paste + register_code(KC_LCTL); + tap(KC_V); + unregister_code(KC_LCTL); + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_paste, false, 0); + #endif + } + } + return false; + break; + #ifdef UNICODE_ENABLE + case UNIWIN: + if(record->event.pressed){ + set_unicode_input_mode(UC_WIN); + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(uniwin, false, 0); + #endif + } + return false; + break; + case UNILIN: + if(record->event.pressed){ + set_unicode_input_mode(UC_LNX); + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(unilin, false, 0); + #endif + } + return false; + break; + case DISFACE: // ಠ_ಠ + if(record->event.pressed){ + process_unicode((0x0CA0|QK_UNICODE), record); // Eye + register_code(KC_RSFT); + tap(KC_MINS); + unregister_code(KC_RSFT); + process_unicode((0x0CA0|QK_UNICODE), record); // Eye + } + return false; + break; + case TFLIP: // (╯°□°)╯ ︵ ┻━┻ + if(record->event.pressed){ + register_code(KC_RSFT); + tap(KC_9); + unregister_code(KC_RSFT); + process_unicode((0x256F|QK_UNICODE), record); // Arm + process_unicode((0x00B0|QK_UNICODE), record); // Eye + process_unicode((0x25A1|QK_UNICODE), record); // Mouth + process_unicode((0x00B0|QK_UNICODE), record); // Eye + register_code(KC_RSFT); + tap(KC_0); + unregister_code(KC_RSFT); + process_unicode((0x256F|QK_UNICODE), record); // Arm + tap(KC_SPC); + process_unicode((0x0361|QK_UNICODE), record); // Flippy + tap(KC_SPC); + process_unicode((0x253B|QK_UNICODE), record); // Table + process_unicode((0x2501|QK_UNICODE), record); // Table + process_unicode((0x253B|QK_UNICODE), record); // Table + } + return false; + break; + case TPUT: // ┬──┬ ノ( ゜-゜ノ) + if(record->event.pressed){ + process_unicode((0x252C|QK_UNICODE), record); // Table + process_unicode((0x2500|QK_UNICODE), record); // Table + process_unicode((0x2500|QK_UNICODE), record); // Table + process_unicode((0x252C|QK_UNICODE), record); // Table + tap(KC_SPC); + process_unicode((0x30CE|QK_UNICODE), record); // Arm + register_code(KC_RSFT); + tap(KC_9); + unregister_code(KC_RSFT); + tap(KC_SPC); + process_unicode((0x309C|QK_UNICODE), record); // Eye + tap(KC_MINS); + process_unicode((0x309C|QK_UNICODE), record); // Eye + process_unicode((0x30CE|QK_UNICODE), record); // Arm + register_code(KC_RSFT); + tap(KC_0); + unregister_code(KC_RSFT); + } + return false; + break; + case SHRUG: // ¯\_(ツ)_/¯ + if(record->event.pressed){ + process_unicode((0x00AF|QK_UNICODE), record); // Hand + tap(KC_BSLS); // Arm + register_code(KC_RSFT); + tap(KC_UNDS); // Arm + tap(KC_LPRN); // Head + unregister_code(KC_RSFT); + process_unicode((0x30C4|QK_UNICODE), record); // Face + register_code(KC_RSFT); + tap(KC_RPRN); // Head + tap(KC_UNDS); // Arm + unregister_code(KC_RSFT); + tap(KC_SLSH); // Arm + process_unicode((0x00AF|QK_UNICODE), record); // Hand + } + return false; + break; + #endif + case FACE: // (o_O) + if(record->event.pressed){ + register_code(KC_RSFT); + tap(KC_LPRN); + unregister_code(KC_RSFT); + tap(KC_O); + register_code(KC_RSFT); + tap(KC_UNDS); + tap(KC_O); + tap(KC_RPRN); + unregister_code(KC_RSFT); + } + return false; + break; + #ifdef TAP_DANCE_ENABLE + case TappyR: + if(record->event.pressed){ + if(timer_elapsed32(Rtimer) > 1052){ + Rstate = 0; + } + switch(Rstate){ + case 0: + Rtimer = timer_read32(); + Rstate++; + break; + case 1: + Rtimes[0] = timer_elapsed32(Rtimer); + Rtimer = timer_read32(); + Rstate++; + break; + case 2: + Rtimes[1] = timer_elapsed32(Rtimer); + Rtimer = timer_read32(); + Rstate++; + break; + case 3: + Rtimes[2] = timer_elapsed32(Rtimer); + Rstate = 0; + break; + } + if(Rstate == 0 && Lstate == 0) rhythm_parse(); + } + return false; + break; + case TappyL: + if(record->event.pressed){ + if(timer_elapsed32(Ltimer) > 1052){ + Lstate = 0; + } + switch(Lstate){ + case 0: + Ltimer = timer_read32(); + Lstate++; + break; + case 1: + Ltimes[0] = timer_elapsed32(Ltimer); + Ltimer = timer_read32(); + Lstate++; + break; + case 2: + Ltimes[1] = timer_elapsed32(Ltimer); + Lstate = 0; + break; + } + if(Rstate == 0 && Lstate == 0) rhythm_parse(); + } + return false; + break; + #endif + #endif + case RANDIG: + if (record->event.pressed) { + tap_random_base64(); + } + return false; + break; + } + return true; +}; + +#ifdef AUDIO_ENABLE +void matrix_init_user(void){ // Run once at startup + #ifdef AUDIO_ENABLE + _delay_ms(50); // gets rid of tick + PLAY_NOTE_ARRAY(tone_startup, false, 0); + #endif +} + +void play_goodbye_tone(void){ + PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + _delay_ms(150); +} + +void shutdown_user(){ + PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + _delay_ms(150); + stop_all_notes(); +} + +void music_on_user(void){ // Run when the music layer is turned on + PLAY_NOTE_ARRAY(tone_startup, false, 0); +} + +void music_off_user(void){ // Run when music is turned off + PLAY_NOTE_ARRAY(tone_goodbye, false, 0); +} +#endif + +#endif diff --git a/keyboards/preonic/keymaps/zach/Makefile b/keyboards/preonic/keymaps/zach/Makefile new file mode 100644 index 000000000..bd49d142c --- /dev/null +++ b/keyboards/preonic/keymaps/zach/Makefile @@ -0,0 +1,29 @@ +# Zach Preonic Makefile +# Max .hex size is about 28636 bytes + +# 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 +# +TAP_DANCE_ENABLE = yes # Enable TapDance functionality +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # 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 +USB_6KRO_ENABLE = no # 6key Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = yes # Audio output on port C6 +VARIABLE_TRACE = no # Debug changes to variable values +UNICODE_ENABLE = yes # Unicode +UNICODEMAP_ENABLE = no # Enable extended 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. +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/preonic/keymaps/zach/config.h b/keyboards/preonic/keymaps/zach/config.h new file mode 100644 index 000000000..59959524f --- /dev/null +++ b/keyboards/preonic/keymaps/zach/config.h @@ -0,0 +1,95 @@ +/* +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 0x6061 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Ortholinear Keyboards +#define PRODUCT The Preonic Keyboard +#define DESCRIPTION A compact ortholinear keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 12 + +/* Planck PCB default pin-out */ +#define MATRIX_ROW_PINS { D2, D5, B5, B6, D3 } +#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 } +#define UNUSED_PINS + +#define BACKLIGHT_PIN B7 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + + +#define BACKLIGHT_BREATHING // LED breathing +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 5 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* 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 command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* ws2812 RGB LED */ +//#define RGB_DI_PIN D1 +//#define RGBLIGHT_TIMER +//#define RGBLED_NUM 28 // Number of LEDs +//#define RGBLIGHT_HUE_STEP 10 +//#define RGBLIGHT_SAT_STEP 17 +//#define RGBLIGHT_VAL_STEP 17 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +#define NO_ACTION_TAPPING +#define NO_ACTION_ONESHOT +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION +#define PREVENT_STUCK_MODIFIERS +//#define DYNAMIC_MACRO_ENABLE // Enable if you need to use the macro functionality +//#define SPACE_CADET // Parenthesis on L/R shift + + +#endif diff --git a/keyboards/preonic/keymaps/zach/keymap.c b/keyboards/preonic/keymaps/zach/keymap.c new file mode 100644 index 000000000..423ca4b86 --- /dev/null +++ b/keyboards/preonic/keymaps/zach/keymap.c @@ -0,0 +1,54 @@ +// Zach Nielsen Custom Preonic Keyboard layout +#include "preonic.h" +#define PREONIC_YES // This is the Preonic +#include "zach_common_functions.c" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_COLEMAK] = { /* Base Layer */ + {KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC}, + {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, KC_ENT}, + {KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT}, + {SHFT_CAP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, + {CTRLB, TD(SUP), KC_LALT, KC_LCTL, TD(LOW), KC_SPC, KC_SPC, TD(RAI), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +[_SWCOLE] = { /* Software Colemak */ + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, CM_Q, CM_W, CM_F, CM_P, CM_G, CM_J, CM_L, CM_U, CM_Y, KC_QUOT, _______}, + {_______, CM_A, CM_R, CM_S, CM_T, CM_D, CM_H, CM_N, CM_E, CM_I, CM_O, _______}, + {_______, CM_Z, CM_X, CM_C, CM_V, CM_B, CM_K, CM_M, CM_COMM, CM_DOT, CM_SLSH, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +}, + +[_RAISE] = { /* RAISE - Numpad and Unicode symbols */ + {KC_TILD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {KC_GRV, SUPA2, FACE, DISFACE, SHRUG, PLUMIN, IBANG, KC_7, KC_8, KC_9, KC_COLN, _______}, + {KC_DEL, DEGREE, MICRO, WOMEGA, OMEGA, XXXXXXX, KC_ENT, KC_4, KC_5, KC_6, KC_SLSH, KC_ASTR}, + {_______, KC_COLN, TFLIP, LAROW, RAROW, XXXXXXX, KC_SPC, KC_1, KC_2, KC_3, KC_MINS, KC_PLUS}, + {_______, KC_PIPE, TPUT, _______, _______, KC_TAB, KC_TAB, _______, KC_0, KC_0, KC_DOT, KC_EQL} +}, + +[_LOWER] = { /* LOWER - Symbols, Paging, CtrAltDel */ + {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_QUES, KC_DQT, KC_DEL}, + {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_QUES, KC_DQT, KC_DEL}, + {KC_DEL, KC_LBRC, KC_RBRC, KC_MINS, KC_UNDS, KC_HOME, KC_END, KC_LPRN, KC_RPRN, KC_SLSH, KC_SCLN, KC_PGUP}, + {CPYPST, XXXXXXX, C(KC_X), KC_LABK, KC_RABK, XXXXXXX, XXXXXXX, KC_LCBR, KC_RCBR, KC_BSLS, KC_COLN, KC_PGDN}, + {_______, _______, _______, _______, _______, KC_TAB, KC_TAB, _______, _______, _______, _______, _______} +}, + +[_ADJUST] = { /* ADJUST - Macros, Layer Switching, Function Keys */ + {UNIWIN, XXXXXXX, XXXXXXX, RANDIG, RANDIG, KC_INS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, AU_TOG, MU_TOG}, + {UNILIN, SUPA2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX}, + {XXXXXXX, DEGREE, IBANG, LAROW, RAROW, SWCOLE, COLEMAK, KC_F5, KC_F6, KC_F7, KC_F8, BL_INC}, + {_______, CADKEY, MICRO, WOMEGA, OMEGA, XXXXXXX, XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, BL_DEC}, + {_______, _______, _______, _______, _______, RESET, RESET, _______, XXXXXXX, MUV_DE, MUV_IN, BL_TOGG} +}, + +[_UNICODES] = { /* UNICODES - Extra layer for unicode stuff */ + {_______, XXXXXXX, XXXXXXX, FINGER, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______}, + {_______, TFLIP, XXXXXXX, XXXXXXX, IBANG, roman7, XXXXXXX, XXXXXXX, ROMAN7, XXXXXXX, XXXXXXX, _______}, + {KC_DEL, TPUT, FACE, DISFACE, SHRUG, roman4, roman5, roman6, ROMAN4, ROMAN5, ROMAN6, _______}, + {XXXXXXX, PENIS, BOOBS, LAROW, RAROW, roman1, roman2, roman3, ROMAN1, ROMAN2, ROMAN3, XXXXXXX}, + {_______, _______, _______, _______, _______, KC_SPC, KC_SPC, _______, _______, _______, _______, _______} +} +}; diff --git a/keyboards/preonic/keymaps/zach/zach_common_functions.c b/keyboards/preonic/keymaps/zach/zach_common_functions.c new file mode 100644 index 000000000..f01929f5d --- /dev/null +++ b/keyboards/preonic/keymaps/zach/zach_common_functions.c @@ -0,0 +1,538 @@ +#ifndef ZACH_COMMON_FUNCTIONS +#define ZACH_COMMON_FUNCTIONS +#include "eeconfig.h" +#include "action_layer.h" +#include "keymap_colemak.h" +#include "extra_functions.c" +extern keymap_config_t keymap_config; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO +#define C(n) RCTL(n) +#define CADKEY RCTL(RALT(KC_DEL)) + +void tap(uint16_t keycode){ + register_code(keycode); + unregister_code(keycode); +}; + +void persistant_default_layer_set(uint16_t default_layer){ + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +}; + +// Automatic number generation of important keywords +enum my_keycodes{ + // Layer numbers + _COLEMAK = 0, + _SWCOLE, + _RAISE, + _LOWER, + _ADJUST, + _UNICODES, + // These use process_record_user() + COLEMAK = SAFE_RANGE, + SWCOLE, + LOWER, + RAISE, + SHFT_CAP, + CTRLB, + CPYPST, + FACE, + UNIWIN, + UNILIN, + DISFACE, + TFLIP, + TPUT, + SHRUG, + PENIS, + BOOBS, + Sil_Pas, + Sil_Usr, + UltiU, + UltiP, + TappyR, + TappyL, + RANDIG, + FINGER, + // Tap_Dance nums + RAI = 0, + LOW, + SUP +}; + +#ifdef AUDIO_ENABLE +#include "audio.h" +float tone_startup[][2] = SONG(STARTUP_SOUND); +float tone_goodbye[][2] = SONG(GOODBYE_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +float tone_swcole[][2] = SONG(QWERTY_SOUND); +float tone_capslock_on[][2] = SONG(CAPS_LOCK_ON_SOUND); +float tone_capslock_off[][2] = SONG(CAPS_LOCK_OFF_SOUND); +float tone_ctrl_mod[][2] = SONG(COIN_SOUND); +float tone_copy[][2] = SONG(SCROLL_LOCK_ON_SOUND); +float tone_paste[][2] = SONG(SCROLL_LOCK_OFF_SOUND); +float uniwin[][2] = SONG(UNICODE_WINDOWS); +float unilin[][2] = SONG(UNICODE_LINUX); +#endif + +#ifdef TAP_DANCE_ENABLE +#define TAPPING_TERM 200 + +uint8_t Lstate = 0, Rstate = 0; +uint32_t Ltimer = 0, Rtimer = 0; +uint32_t Ltimes[3], Rtimes[4]; // Ratio of tap times should be about 1.335 (L/R) +void rhythm_parse(void){ + int L = Ltimes[0] + Ltimes[1] + Ltimes[2]; // Start to end time + int R = Rtimes[0] + Rtimes[1] + Rtimes[2] + Rtimes[3]; + if(abs(R-L) > 10){ + tap(KC_N); tap(KC_O); + return; + } else { + L = (L / 3)*100; // Average time per tap * 100 + R = (R / 4); + if(abs(abs(L/R)-133) > 1){ + tap(KC_N); tap(KC_O); + tap(KC_P); tap(KC_E); + return; + } else { + tap(KC_O); tap(KC_K); + return; + } + } +}; + +void dance_raise_press(qk_tap_dance_state_t *state, void *user_data){// Called on each tap + switch(state->count){ // Only turn the layer on once + case 1: + layer_off(_UNICODES); + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + break; + } +}; +void dance_raise_lift(qk_tap_dance_state_t *state, void *user_data){ // Called on release + switch(state->count){ + case 1: // Normal action. Turn off layers + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + layer_off(_UNICODES); + break; + } +}; +///////////////////////////////////////////////////////////////////// +void dance_lower_press(qk_tap_dance_state_t *state, void *user_data){// Called on tap + switch(state->count){ + case 1: // Turn on lower + layer_off(_UNICODES); + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + break; + } +}; +void dance_lower_lift(qk_tap_dance_state_t *state, void *user_data){ // Called on release + switch(state->count){ + case 1: // Normal action. Turn off layers + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + layer_off(_UNICODES); + break; + case 2: // Turn on _UNICODES layer + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + layer_on(_UNICODES); + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_ctrl_mod, false, 0); + #endif + break; + } +}; +///////////////////////////////////////////////////////////////////// +void dance_super_press(qk_tap_dance_state_t *state, void *user_data){ // Called on down + if(state->count == 1){ + register_code(KC_LGUI); + } +} +void dance_super_done(qk_tap_dance_state_t *state, void *user_data){ // Called on timeout + switch(state->count){ + case 2: + register_code(KC_LGUI); + tap(KC_L); + unregister_code(KC_LGUI); + break; + } +} +void dance_super_lift(qk_tap_dance_state_t *state, void *user_data){ // Called on up + unregister_code(KC_LGUI); +} + +qk_tap_dance_action_t tap_dance_actions[] = { + [RAI] = ACTION_TAP_DANCE_FN_ADVANCED(dance_raise_press, NULL, dance_raise_lift), + [LOW] = ACTION_TAP_DANCE_FN_ADVANCED(dance_lower_press, NULL, dance_lower_lift), + [SUP] = ACTION_TAP_DANCE_FN_ADVANCED(dance_super_press, dance_super_done, dance_super_lift) +}; +#endif + +#ifdef UNICODE_ENABLE +// Unicode shortcuts +#define IBANG UC(0x203D) +#define RAROW UC(0x2192) +#define LAROW UC(0x2190) +#define DEGREE UC(0x00B0) +#define OMEGA UC(0x03A9) +#define WOMEGA UC(0x03C9) +#define MICRO UC(0x00B5) +#define PLUMIN UC(0x00B1) +#define SUPA2 UC(0x00B2) +#define ROMAN1 UC(0x2160) +#define ROMAN2 UC(0x2161) +#define ROMAN3 UC(0x2162) +#define ROMAN4 UC(0x2163) +#define ROMAN5 UC(0x2164) +#define ROMAN6 UC(0x2165) +#define ROMAN7 UC(0x2166) +#define roman1 UC(0x2170) +#define roman2 UC(0x2171) +#define roman3 UC(0x2172) +#define roman4 UC(0x2173) +#define roman5 UC(0x2174) +#define roman6 UC(0x2175) +#define roman7 UC(0x2176) + +#ifdef UNICODEMAP_ENABLE // For Unicode characters larger than 0x8000. Send with X() +enum Ext_Unicode{ + PENGUIN = 0, + BOAR, + MONKEY, + DRAGON, + CHICK, + TUMBLER +}; +const uint32_t PROGMEM unicode_map[] = { + [PENGUIN] = 0x1F427, + [BOAR] = 0x1F417, + [MONKEY] = 0x1F412, + [DRAGON] = 0x1F409, + [CHICK] = 0x1F425, + [TUMBLER] = 0x1F943 +}; +#define PENGY X(PENGUIN) +#define BOARY X(BOAR) +#define MNKY X(MONKEY) +#define DRGN X(DRAGON) +#define DUCK X(CHICK) +#define TMBL X(TUMBLER) +#endif + +#endif + +static uint16_t key_timer; +static uint8_t caps_status = 0; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case COLEMAK: + if(record->event.pressed){ + persistant_default_layer_set(1UL<<_COLEMAK); + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_colemak, false, 0); + #endif + } + return false; + break; + case SWCOLE: + if(record->event.pressed){ + persistant_default_layer_set(1UL<<_SWCOLE); + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_swcole, false, 0); + #endif + } + return false; + break; + #ifndef TAP_DANCE_ENABLE + 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 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; + #endif + case SHFT_CAP: + if(record->event.pressed){ + key_timer = timer_read(); // if the key is being pressed, we start the timer. + register_code(KC_LSHIFT); + } else { // this means the key was just released (tap or "held down") + if(timer_elapsed(key_timer) < 152){ // Time in ms, the threshold we pick for counting something as a tap. + tap(KC_CAPS); + if(caps_status == 0){ + caps_status = 1; + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_capslock_on, false, 0); + #endif + } else { + caps_status = 0; + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_capslock_off, false, 0); + #endif + } + } + unregister_code(KC_LSHIFT); + } + return false; + break; + case CTRLB: // Control-B on tap (bold) + if(record->event.pressed){ + key_timer = timer_read(); // if the key is being pressed, we start the timer. + register_code(KC_LCTL); + } else { // this means the key was just released (tap or "held down") + if (timer_elapsed(key_timer) < 152) { // Time in ms, the threshold we pick for counting something as a tap. + tap(KC_B); + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_ctrl_mod, false, 0); + #endif + #ifdef BACKLIGHT_BREATHING + breathing_speed_set(2); + breathing_pulse(); + #endif + } + unregister_code(KC_LCTL); + } + return false; + break; + case CPYPST: // One key copy/paste + if(record->event.pressed){ + key_timer = timer_read(); + } else { + if (timer_elapsed(key_timer) > 152) { // Hold, copy + register_code(KC_LCTL); + tap(KC_C); + unregister_code(KC_LCTL); + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_copy, false, 0); + #endif + } else { // Tap, paste + register_code(KC_LCTL); + tap(KC_V); + unregister_code(KC_LCTL); + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_paste, false, 0); + #endif + } + } + return false; + break; + #ifdef UNICODE_ENABLE + case UNIWIN: + if(record->event.pressed){ + set_unicode_input_mode(UC_WIN); + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(uniwin, false, 0); + #endif + } + return false; + break; + case UNILIN: + if(record->event.pressed){ + set_unicode_input_mode(UC_LNX); + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(unilin, false, 0); + #endif + } + return false; + break; + case DISFACE: // ಠ_ಠ + if(record->event.pressed){ + process_unicode((0x0CA0|QK_UNICODE), record); // Eye + register_code(KC_RSFT); + tap(KC_MINS); + unregister_code(KC_RSFT); + process_unicode((0x0CA0|QK_UNICODE), record); // Eye + } + return false; + break; + case TFLIP: // (╯°□°)╯ ︵ ┻━┻ + if(record->event.pressed){ + register_code(KC_RSFT); + tap(KC_9); + unregister_code(KC_RSFT); + process_unicode((0x256F|QK_UNICODE), record); // Arm + process_unicode((0x00B0|QK_UNICODE), record); // Eye + process_unicode((0x25A1|QK_UNICODE), record); // Mouth + process_unicode((0x00B0|QK_UNICODE), record); // Eye + register_code(KC_RSFT); + tap(KC_0); + unregister_code(KC_RSFT); + process_unicode((0x256F|QK_UNICODE), record); // Arm + tap(KC_SPC); + process_unicode((0x0361|QK_UNICODE), record); // Flippy + tap(KC_SPC); + process_unicode((0x253B|QK_UNICODE), record); // Table + process_unicode((0x2501|QK_UNICODE), record); // Table + process_unicode((0x253B|QK_UNICODE), record); // Table + } + return false; + break; + case TPUT: // ┬──┬ ノ( ゜-゜ノ) + if(record->event.pressed){ + process_unicode((0x252C|QK_UNICODE), record); // Table + process_unicode((0x2500|QK_UNICODE), record); // Table + process_unicode((0x2500|QK_UNICODE), record); // Table + process_unicode((0x252C|QK_UNICODE), record); // Table + tap(KC_SPC); + process_unicode((0x30CE|QK_UNICODE), record); // Arm + register_code(KC_RSFT); + tap(KC_9); + unregister_code(KC_RSFT); + tap(KC_SPC); + process_unicode((0x309C|QK_UNICODE), record); // Eye + tap(KC_MINS); + process_unicode((0x309C|QK_UNICODE), record); // Eye + process_unicode((0x30CE|QK_UNICODE), record); // Arm + register_code(KC_RSFT); + tap(KC_0); + unregister_code(KC_RSFT); + } + return false; + break; + case SHRUG: // ¯\_(ツ)_/¯ + if(record->event.pressed){ + process_unicode((0x00AF|QK_UNICODE), record); // Hand + tap(KC_BSLS); // Arm + register_code(KC_RSFT); + tap(KC_UNDS); // Arm + tap(KC_LPRN); // Head + unregister_code(KC_RSFT); + process_unicode((0x30C4|QK_UNICODE), record); // Face + register_code(KC_RSFT); + tap(KC_RPRN); // Head + tap(KC_UNDS); // Arm + unregister_code(KC_RSFT); + tap(KC_SLSH); // Arm + process_unicode((0x00AF|QK_UNICODE), record); // Hand + } + return false; + break; + #endif + case FACE: // (o_O) + if(record->event.pressed){ + register_code(KC_RSFT); + tap(KC_LPRN); + unregister_code(KC_RSFT); + tap(KC_O); + register_code(KC_RSFT); + tap(KC_UNDS); + tap(KC_O); + tap(KC_RPRN); + unregister_code(KC_RSFT); + } + return false; + break; + #ifdef TAP_DANCE_ENABLE + case TappyR: + if(record->event.pressed){ + if(timer_elapsed32(Rtimer) > 1052){ + Rstate = 0; + } + switch(Rstate){ + case 0: + Rtimer = timer_read32(); + Rstate++; + break; + case 1: + Rtimes[0] = timer_elapsed32(Rtimer); + Rtimer = timer_read32(); + Rstate++; + break; + case 2: + Rtimes[1] = timer_elapsed32(Rtimer); + Rtimer = timer_read32(); + Rstate++; + break; + case 3: + Rtimes[2] = timer_elapsed32(Rtimer); + Rstate = 0; + break; + } + if(Rstate == 0 && Lstate == 0) rhythm_parse(); + } + return false; + break; + case TappyL: + if(record->event.pressed){ + if(timer_elapsed32(Ltimer) > 1052){ + Lstate = 0; + } + switch(Lstate){ + case 0: + Ltimer = timer_read32(); + Lstate++; + break; + case 1: + Ltimes[0] = timer_elapsed32(Ltimer); + Ltimer = timer_read32(); + Lstate++; + break; + case 2: + Ltimes[1] = timer_elapsed32(Ltimer); + Lstate = 0; + break; + } + if(Rstate == 0 && Lstate == 0) rhythm_parse(); + } + return false; + break; + #endif + #endif + case RANDIG: + if (record->event.pressed) { + tap_random_base64(); + } + return false; + break; + } + return true; +}; + +#ifdef AUDIO_ENABLE +void matrix_init_user(void){ // Run once at startup + #ifdef AUDIO_ENABLE + _delay_ms(50); // gets rid of tick + PLAY_NOTE_ARRAY(tone_startup, false, 0); + #endif +} + +void play_goodbye_tone(void){ + PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + _delay_ms(150); +} + +void shutdown_user(){ + PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + _delay_ms(150); + stop_all_notes(); +} + +void music_on_user(void){ // Run when the music layer is turned on + PLAY_NOTE_ARRAY(tone_startup, false, 0); +} + +void music_off_user(void){ // Run when music is turned off + PLAY_NOTE_ARRAY(tone_goodbye, false, 0); +} +#endif + +#endif -- cgit v1.2.3 From 4c0aa02b2e476a8f939586a0da2f28f2a44c83c3 Mon Sep 17 00:00:00 2001 From: Zach Nielsen Date: Thu, 10 Nov 2016 12:59:55 -0800 Subject: Missed some stuff. Added a song (stole it from reddit). --- keyboards/planck/keymaps/zach/Makefile | 2 +- keyboards/planck/keymaps/zach/config.h | 3 ++ .../planck/keymaps/zach/zach_common_functions.c | 61 +--------------------- keyboards/preonic/keymaps/zach/Makefile | 2 +- .../preonic/keymaps/zach/zach_common_functions.c | 61 +--------------------- quantum/audio/song_list.h | 12 +++++ 6 files changed, 19 insertions(+), 122 deletions(-) diff --git a/keyboards/planck/keymaps/zach/Makefile b/keyboards/planck/keymaps/zach/Makefile index b0009147a..977f1a901 100644 --- a/keyboards/planck/keymaps/zach/Makefile +++ b/keyboards/planck/keymaps/zach/Makefile @@ -16,7 +16,7 @@ USB_6KRO_ENABLE = no # 6key Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 -VARIABLE_TRACE = no # Debug changes to variable values +#VARIABLE_TRACE = no # Debug changes to variable values UNICODE_ENABLE = yes # Unicode UNICODEMAP_ENABLE = yes # Enable extended unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/planck/keymaps/zach/config.h b/keyboards/planck/keymaps/zach/config.h index 1be800545..7deb9ebfe 100644 --- a/keyboards/planck/keymaps/zach/config.h +++ b/keyboards/planck/keymaps/zach/config.h @@ -53,8 +53,10 @@ along with this program. If not, see . /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ //#define LOCKING_SUPPORT_ENABLE +#undef LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ //#define LOCKING_RESYNC_ENABLE +#undef LOCKING_RESYNC_ENABLE /* key combination for command */ #define IS_COMMAND() ( \ @@ -70,6 +72,7 @@ along with this program. If not, see . //#define NO_DEBUG /* disable print */ //#define NO_PRINT +#undef NO_PRINT /* disable action features */ //#define NO_ACTION_LAYER diff --git a/keyboards/planck/keymaps/zach/zach_common_functions.c b/keyboards/planck/keymaps/zach/zach_common_functions.c index f01929f5d..7d14dcf3f 100644 --- a/keyboards/planck/keymaps/zach/zach_common_functions.c +++ b/keyboards/planck/keymaps/zach/zach_common_functions.c @@ -3,7 +3,6 @@ #include "eeconfig.h" #include "action_layer.h" #include "keymap_colemak.h" -#include "extra_functions.c" extern keymap_config_t keymap_config; // Fillers to make layering more clear @@ -249,7 +248,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; - #ifndef TAP_DANCE_ENABLE case RAISE: if(record->event.pressed){ layer_on(_RAISE); @@ -270,7 +268,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; - #endif case SHFT_CAP: if(record->event.pressed){ key_timer = timer_read(); // if the key is being pressed, we start the timer. @@ -441,62 +438,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; - #ifdef TAP_DANCE_ENABLE - case TappyR: - if(record->event.pressed){ - if(timer_elapsed32(Rtimer) > 1052){ - Rstate = 0; - } - switch(Rstate){ - case 0: - Rtimer = timer_read32(); - Rstate++; - break; - case 1: - Rtimes[0] = timer_elapsed32(Rtimer); - Rtimer = timer_read32(); - Rstate++; - break; - case 2: - Rtimes[1] = timer_elapsed32(Rtimer); - Rtimer = timer_read32(); - Rstate++; - break; - case 3: - Rtimes[2] = timer_elapsed32(Rtimer); - Rstate = 0; - break; - } - if(Rstate == 0 && Lstate == 0) rhythm_parse(); - } - return false; - break; - case TappyL: - if(record->event.pressed){ - if(timer_elapsed32(Ltimer) > 1052){ - Lstate = 0; - } - switch(Lstate){ - case 0: - Ltimer = timer_read32(); - Lstate++; - break; - case 1: - Ltimes[0] = timer_elapsed32(Ltimer); - Ltimer = timer_read32(); - Lstate++; - break; - case 2: - Ltimes[1] = timer_elapsed32(Ltimer); - Lstate = 0; - break; - } - if(Rstate == 0 && Lstate == 0) rhythm_parse(); - } - return false; - break; - #endif - #endif case RANDIG: if (record->event.pressed) { tap_random_base64(); @@ -507,7 +448,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; }; -#ifdef AUDIO_ENABLE void matrix_init_user(void){ // Run once at startup #ifdef AUDIO_ENABLE _delay_ms(50); // gets rid of tick @@ -515,6 +455,7 @@ void matrix_init_user(void){ // Run once at startup #endif } +#ifdef AUDIO_ENABLE void play_goodbye_tone(void){ PLAY_NOTE_ARRAY(tone_goodbye, false, 0); _delay_ms(150); diff --git a/keyboards/preonic/keymaps/zach/Makefile b/keyboards/preonic/keymaps/zach/Makefile index bd49d142c..f0a84abac 100644 --- a/keyboards/preonic/keymaps/zach/Makefile +++ b/keyboards/preonic/keymaps/zach/Makefile @@ -16,7 +16,7 @@ USB_6KRO_ENABLE = no # 6key Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = yes # Audio output on port C6 -VARIABLE_TRACE = no # Debug changes to variable values +#VARIABLE_TRACE = no # Debug changes to variable values UNICODE_ENABLE = yes # Unicode UNICODEMAP_ENABLE = no # Enable extended unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/preonic/keymaps/zach/zach_common_functions.c b/keyboards/preonic/keymaps/zach/zach_common_functions.c index f01929f5d..7d14dcf3f 100644 --- a/keyboards/preonic/keymaps/zach/zach_common_functions.c +++ b/keyboards/preonic/keymaps/zach/zach_common_functions.c @@ -3,7 +3,6 @@ #include "eeconfig.h" #include "action_layer.h" #include "keymap_colemak.h" -#include "extra_functions.c" extern keymap_config_t keymap_config; // Fillers to make layering more clear @@ -249,7 +248,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; - #ifndef TAP_DANCE_ENABLE case RAISE: if(record->event.pressed){ layer_on(_RAISE); @@ -270,7 +268,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; - #endif case SHFT_CAP: if(record->event.pressed){ key_timer = timer_read(); // if the key is being pressed, we start the timer. @@ -441,62 +438,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; - #ifdef TAP_DANCE_ENABLE - case TappyR: - if(record->event.pressed){ - if(timer_elapsed32(Rtimer) > 1052){ - Rstate = 0; - } - switch(Rstate){ - case 0: - Rtimer = timer_read32(); - Rstate++; - break; - case 1: - Rtimes[0] = timer_elapsed32(Rtimer); - Rtimer = timer_read32(); - Rstate++; - break; - case 2: - Rtimes[1] = timer_elapsed32(Rtimer); - Rtimer = timer_read32(); - Rstate++; - break; - case 3: - Rtimes[2] = timer_elapsed32(Rtimer); - Rstate = 0; - break; - } - if(Rstate == 0 && Lstate == 0) rhythm_parse(); - } - return false; - break; - case TappyL: - if(record->event.pressed){ - if(timer_elapsed32(Ltimer) > 1052){ - Lstate = 0; - } - switch(Lstate){ - case 0: - Ltimer = timer_read32(); - Lstate++; - break; - case 1: - Ltimes[0] = timer_elapsed32(Ltimer); - Ltimer = timer_read32(); - Lstate++; - break; - case 2: - Ltimes[1] = timer_elapsed32(Ltimer); - Lstate = 0; - break; - } - if(Rstate == 0 && Lstate == 0) rhythm_parse(); - } - return false; - break; - #endif - #endif case RANDIG: if (record->event.pressed) { tap_random_base64(); @@ -507,7 +448,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; }; -#ifdef AUDIO_ENABLE void matrix_init_user(void){ // Run once at startup #ifdef AUDIO_ENABLE _delay_ms(50); // gets rid of tick @@ -515,6 +455,7 @@ void matrix_init_user(void){ // Run once at startup #endif } +#ifdef AUDIO_ENABLE void play_goodbye_tone(void){ PLAY_NOTE_ARRAY(tone_goodbye, false, 0); _delay_ms(150); diff --git a/quantum/audio/song_list.h b/quantum/audio/song_list.h index 8022ca672..623f24f32 100644 --- a/quantum/audio/song_list.h +++ b/quantum/audio/song_list.h @@ -3,6 +3,10 @@ #ifndef SONG_LIST_H #define SONG_LIST_H +#define COIN_SOUND \ + E__NOTE(_A5 ),\ + HD_NOTE(_E6 ), + #define ODE_TO_JOY \ Q__NOTE(_E4), Q__NOTE(_E4), Q__NOTE(_F4), Q__NOTE(_G4), \ Q__NOTE(_G4), Q__NOTE(_F4), Q__NOTE(_E4), Q__NOTE(_D4), \ @@ -122,4 +126,12 @@ E__NOTE(_E5), \ E__NOTE(_D5), +#define UNICODE_WINDOWS \ + E__NOTE(_B5), \ + S__NOTE(_E6), + +#define UNICODE_LINUX \ + E__NOTE(_E6), \ + S__NOTE(_B5), + #endif -- cgit v1.2.3 From f388bb5bdacb39a5309ca7594940184bbf35e84b Mon Sep 17 00:00:00 2001 From: nielsenz Date: Thu, 10 Nov 2016 13:39:46 -0800 Subject: Removed some common functions from my keymap --- keyboards/planck/keymaps/zach/keymap.c | 8 ++++---- keyboards/planck/keymaps/zach/zach_common_functions.c | 9 --------- keyboards/preonic/keymaps/zach/keymap.c | 4 ++-- keyboards/preonic/keymaps/zach/zach_common_functions.c | 9 --------- 4 files changed, 6 insertions(+), 24 deletions(-) diff --git a/keyboards/planck/keymaps/zach/keymap.c b/keyboards/planck/keymaps/zach/keymap.c index d3cde5bb9..710477df5 100644 --- a/keyboards/planck/keymaps/zach/keymap.c +++ b/keyboards/planck/keymaps/zach/keymap.c @@ -33,16 +33,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }, [_ADJUST] = { /* ADJUST - Macros, Layer Switching, Function Keys */ - {UNIWIN, Sil_Usr, Sil_Pas, PENGY, DUCK, KC_INS, KC_NLCK, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX}, - {UNILIN, UltiU, UltiP, RANDIG, RANDIG, SWCOLE, COLEMAK, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX}, + {UNIWIN, XXXXXXX, XXXXXXX, PENGY, DUCK, KC_INS, KC_NLCK, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX}, + {UNILIN, XXXXXXX, XXXXXXX, RANDIG, RANDIG, SWCOLE, COLEMAK, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX}, {_______, CADKEY, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX}, {_______, _______, _______, _______, _______, RESET, RESET, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX} }, [_UNICODES] = { /* UNICODES - Extra layer for unicode stuff */ - {_______, TFLIP, XXXXXXX, FINGER, IBANG, roman7, XXXXXXX, XXXXXXX, ROMAN7, TappyL, TappyR, _______}, + {_______, TFLIP, XXXXXXX, XXXXXXX, IBANG, roman7, XXXXXXX, XXXXXXX, ROMAN7, XXXXXXX, XXXXXXX, _______}, {KC_DEL, TPUT, FACE, DISFACE, SHRUG, roman4, roman5, roman6, ROMAN4, ROMAN5, ROMAN6, _______}, - {XXXXXXX, PENIS, BOOBS, LAROW, RAROW, roman1, roman2, roman3, ROMAN1, ROMAN2, ROMAN3, XXXXXXX}, + {XXXXXXX, XXXXXXX, XXXXXXX, LAROW, RAROW, roman1, roman2, roman3, ROMAN1, ROMAN2, ROMAN3, XXXXXXX}, {_______, _______, _______, _______, _______, KC_SPC, KC_SPC, _______, _______, _______, _______, _______} } }; diff --git a/keyboards/planck/keymaps/zach/zach_common_functions.c b/keyboards/planck/keymaps/zach/zach_common_functions.c index 7d14dcf3f..1f907e6cb 100644 --- a/keyboards/planck/keymaps/zach/zach_common_functions.c +++ b/keyboards/planck/keymaps/zach/zach_common_functions.c @@ -45,16 +45,7 @@ enum my_keycodes{ TFLIP, TPUT, SHRUG, - PENIS, - BOOBS, - Sil_Pas, - Sil_Usr, - UltiU, - UltiP, - TappyR, - TappyL, RANDIG, - FINGER, // Tap_Dance nums RAI = 0, LOW, diff --git a/keyboards/preonic/keymaps/zach/keymap.c b/keyboards/preonic/keymaps/zach/keymap.c index 423ca4b86..6ce37840b 100644 --- a/keyboards/preonic/keymaps/zach/keymap.c +++ b/keyboards/preonic/keymaps/zach/keymap.c @@ -45,10 +45,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }, [_UNICODES] = { /* UNICODES - Extra layer for unicode stuff */ - {_______, XXXXXXX, XXXXXXX, FINGER, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______}, + {_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______}, {_______, TFLIP, XXXXXXX, XXXXXXX, IBANG, roman7, XXXXXXX, XXXXXXX, ROMAN7, XXXXXXX, XXXXXXX, _______}, {KC_DEL, TPUT, FACE, DISFACE, SHRUG, roman4, roman5, roman6, ROMAN4, ROMAN5, ROMAN6, _______}, - {XXXXXXX, PENIS, BOOBS, LAROW, RAROW, roman1, roman2, roman3, ROMAN1, ROMAN2, ROMAN3, XXXXXXX}, + {XXXXXXX, XXXXXXX, XXXXXXX, LAROW, RAROW, roman1, roman2, roman3, ROMAN1, ROMAN2, ROMAN3, XXXXXXX}, {_______, _______, _______, _______, _______, KC_SPC, KC_SPC, _______, _______, _______, _______, _______} } }; diff --git a/keyboards/preonic/keymaps/zach/zach_common_functions.c b/keyboards/preonic/keymaps/zach/zach_common_functions.c index 7d14dcf3f..1f907e6cb 100644 --- a/keyboards/preonic/keymaps/zach/zach_common_functions.c +++ b/keyboards/preonic/keymaps/zach/zach_common_functions.c @@ -45,16 +45,7 @@ enum my_keycodes{ TFLIP, TPUT, SHRUG, - PENIS, - BOOBS, - Sil_Pas, - Sil_Usr, - UltiU, - UltiP, - TappyR, - TappyL, RANDIG, - FINGER, // Tap_Dance nums RAI = 0, LOW, -- cgit v1.2.3 From 80c5ada3394c5ad8087df00ef878eb2cbcd87d70 Mon Sep 17 00:00:00 2001 From: Zach Nielsen Date: Thu, 10 Nov 2016 13:47:07 -0800 Subject: Missed removing a function --- .../planck/keymaps/zach/zach_common_functions.c | 23 ---------------------- .../preonic/keymaps/zach/zach_common_functions.c | 23 ---------------------- 2 files changed, 46 deletions(-) diff --git a/keyboards/planck/keymaps/zach/zach_common_functions.c b/keyboards/planck/keymaps/zach/zach_common_functions.c index 1f907e6cb..b77f2b241 100644 --- a/keyboards/planck/keymaps/zach/zach_common_functions.c +++ b/keyboards/planck/keymaps/zach/zach_common_functions.c @@ -70,29 +70,6 @@ float unilin[][2] = SONG(UNICODE_LINUX); #ifdef TAP_DANCE_ENABLE #define TAPPING_TERM 200 -uint8_t Lstate = 0, Rstate = 0; -uint32_t Ltimer = 0, Rtimer = 0; -uint32_t Ltimes[3], Rtimes[4]; // Ratio of tap times should be about 1.335 (L/R) -void rhythm_parse(void){ - int L = Ltimes[0] + Ltimes[1] + Ltimes[2]; // Start to end time - int R = Rtimes[0] + Rtimes[1] + Rtimes[2] + Rtimes[3]; - if(abs(R-L) > 10){ - tap(KC_N); tap(KC_O); - return; - } else { - L = (L / 3)*100; // Average time per tap * 100 - R = (R / 4); - if(abs(abs(L/R)-133) > 1){ - tap(KC_N); tap(KC_O); - tap(KC_P); tap(KC_E); - return; - } else { - tap(KC_O); tap(KC_K); - return; - } - } -}; - void dance_raise_press(qk_tap_dance_state_t *state, void *user_data){// Called on each tap switch(state->count){ // Only turn the layer on once case 1: diff --git a/keyboards/preonic/keymaps/zach/zach_common_functions.c b/keyboards/preonic/keymaps/zach/zach_common_functions.c index 1f907e6cb..b77f2b241 100644 --- a/keyboards/preonic/keymaps/zach/zach_common_functions.c +++ b/keyboards/preonic/keymaps/zach/zach_common_functions.c @@ -70,29 +70,6 @@ float unilin[][2] = SONG(UNICODE_LINUX); #ifdef TAP_DANCE_ENABLE #define TAPPING_TERM 200 -uint8_t Lstate = 0, Rstate = 0; -uint32_t Ltimer = 0, Rtimer = 0; -uint32_t Ltimes[3], Rtimes[4]; // Ratio of tap times should be about 1.335 (L/R) -void rhythm_parse(void){ - int L = Ltimes[0] + Ltimes[1] + Ltimes[2]; // Start to end time - int R = Rtimes[0] + Rtimes[1] + Rtimes[2] + Rtimes[3]; - if(abs(R-L) > 10){ - tap(KC_N); tap(KC_O); - return; - } else { - L = (L / 3)*100; // Average time per tap * 100 - R = (R / 4); - if(abs(abs(L/R)-133) > 1){ - tap(KC_N); tap(KC_O); - tap(KC_P); tap(KC_E); - return; - } else { - tap(KC_O); tap(KC_K); - return; - } - } -}; - void dance_raise_press(qk_tap_dance_state_t *state, void *user_data){// Called on each tap switch(state->count){ // Only turn the layer on once case 1: -- cgit v1.2.3 From abee80929880f0813149eb458f968666a18dd6cc Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 18 Nov 2016 11:11:08 -0600 Subject: moves brackets to top row. --- keyboards/ergodox/keymaps/common-nighthawk/keymap.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/keyboards/ergodox/keymaps/common-nighthawk/keymap.c b/keyboards/ergodox/keymaps/common-nighthawk/keymap.c index ab0dcfece..14ed257ee 100644 --- a/keyboards/ergodox/keymaps/common-nighthawk/keymap.c +++ b/keyboards/ergodox/keymaps/common-nighthawk/keymap.c @@ -28,7 +28,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 0: Basic layer * * ,--------------------------------------------------. ,--------------------------------------------------. - * | Esc | x | x | x | _ | Hypr | Home | | End | Hypr | Esc | x | x | x | `~ | + * | Esc | x | x | x | Esc | Hypr | Home | | End | Esc | [ | ] | x | `~ | `~ | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * |Tab/Ctrl| Q | W | E | R | T | Up | | PgUp |Y 2Esc| U 2[ | I 2] | O | P |Bks/Ctrl| * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| @@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [BASE] = KEYMAP( // layer 0 : default // left hand - KC_ESC, KC_1, KC_1, KC_1, KC_UNDS, ALL_T(KC_NO), KC_HOME, + KC_ESC, KC_1, KC_1, KC_1, KC_ESC, ALL_T(KC_NO), KC_HOME, CTL_T(KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_UP, GUI_T(KC_QUOT), KC_A, KC_S, KC_D, KC_F, KC_G, M(1), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_DOWN, @@ -57,7 +57,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_VOLD, LT(SYMB, KC_SPC), TG(MDIA), RESET, // right hand - KC_END, ALL_T(KC_NO), KC_ESC, KC_1, KC_1, KC_1, KC_GRV, + KC_END, KC_ESC, KC_LBRC, KC_RBRC, KC_1, KC_GRV, KC_GRV, KC_PGUP, TD(TD_Y_ESC), TD(TD_U_LBRC), TD(TD_I_RBRC), KC_O, KC_P, CTL_T(KC_BSPC), KC_H, KC_J, KC_K, KC_L, KC_SCOLON, GUI_T(KC_ENT), KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, M(1), @@ -71,11 +71,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,--------------------------------------------------. ,--------------------------------------------------. * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | ! | ^ | { | ( | [ | | | | = | 7 | 8 | 9 | 0 | | + * | | ! | ^ | [ | ( | { | | | | = | 7 | 8 | 9 | 0 | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | & | $ | } | ) | ] |------| |------| + | 4 | 5 | 6 | * | | + * | | & | $ | ] | ) | } |------| |------| + | 4 | 5 | 6 | * | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | \ | # | @ | % | | | | | | - | 1 | 2 | 3 | / | | + * | | \ | @ | # | % | | | | | | - | 1 | 2 | 3 | / | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * | | | | | | | 0 | 0 | . | | | * `----------------------------------' `----------------------------------' @@ -91,9 +91,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [SYMB] = KEYMAP( // left hand KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, - KC_TRNS, KC_EXLM, KC_CIRC, KC_LCBR, KC_LPRN, KC_LBRC, KC_TRNS, - KC_TRNS, KC_AMPR, KC_DLR, KC_RCBR, KC_RPRN, KC_RBRC, - KC_TRNS, KC_BSLS, KC_HASH, KC_AT, KC_PERC, KC_PIPE, KC_TRNS, + KC_TRNS, KC_EXLM, KC_CIRC, KC_LBRC, KC_LPRN, KC_LCBR, KC_TRNS, + KC_TRNS, KC_AMPR, KC_DLR, KC_RBRC, KC_RPRN, KC_RCBR, + KC_TRNS, KC_BSLS, KC_AT, KC_HASH, KC_PERC, KC_PIPE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, -- cgit v1.2.3 From a94eb16bd7d06bcb55136fa67c2b3ec99f146c72 Mon Sep 17 00:00:00 2001 From: Daniel Date: Sun, 27 Nov 2016 16:12:32 -0600 Subject: removes the double actions from the metakeys. --- .../ergodox/keymaps/common-nighthawk/keymap.c | 32 ++++++++++------------ 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/keyboards/ergodox/keymaps/common-nighthawk/keymap.c b/keyboards/ergodox/keymaps/common-nighthawk/keymap.c index 14ed257ee..be12debba 100644 --- a/keyboards/ergodox/keymaps/common-nighthawk/keymap.c +++ b/keyboards/ergodox/keymaps/common-nighthawk/keymap.c @@ -11,14 +11,12 @@ enum { TD_U_LBRC = 0, TD_I_RBRC, - TD_Y_ESC, }; //Tap Dance Definitions qk_tap_dance_action_t tap_dance_actions[] = { [TD_U_LBRC] = ACTION_TAP_DANCE_DOUBLE(KC_U, KC_LBRC), - [TD_I_RBRC] = ACTION_TAP_DANCE_DOUBLE(KC_I, KC_RBRC), - [TD_Y_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_Y, KC_ESC) + [TD_I_RBRC] = ACTION_TAP_DANCE_DOUBLE(KC_I, KC_RBRC) }; //Macro Declarations @@ -28,43 +26,43 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 0: Basic layer * * ,--------------------------------------------------. ,--------------------------------------------------. - * | Esc | x | x | x | Esc | Hypr | Home | | End | Esc | [ | ] | x | `~ | `~ | + * | _ | x | x | _ | Esc | Hypr | Home | | End | Hypr | [ | ] | x | `~ | Bks | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * |Tab/Ctrl| Q | W | E | R | T | Up | | PgUp |Y 2Esc| U 2[ | I 2] | O | P |Bks/Ctrl| + * |Ctrl/Tab| Q | W | E | R | T | Up | | PgUp | Y | U 2[ | I 2] | O | P | Ctrl | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | '"/Cmd | A | S | D | F | G |------| |------| H | J | K | L | ;: |Entr/Cmd| + * | Cmd | A | S | D | F | G |------| |------| H | J | K | L | ;: |Entr/Cmd| * |--------+------+------+------+------+------| Down | | PgDn |------+------+------+------+------+--------| - * | _/Shft | Z | X | C | V | B | | | | N | M | ,< | .> | /? | _/Shft | + * | Shft | Z | X | C | V | B | | | | N | M | ,< | .> | /? | Shft | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | Alt | x | x | x | Left | |Right | x | x | x | Alt | + * | Alt | x | x | x | Left | |Right | Bks | x | x | Alt | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | Mute | VolUp| | Play | Del | * ,------|------|------| |------+--------+------. * | | | VolDn| | Next | | | - * |Sp/~L1| L2 |------| |------| L2 |Sp/~L1| + * |Sp/~L1| L2 |------| |------| L2 |'"/~L1| * | | |Teensy| | Prev | | | * `--------------------' `----------------------' */ [BASE] = KEYMAP( // layer 0 : default // left hand - KC_ESC, KC_1, KC_1, KC_1, KC_ESC, ALL_T(KC_NO), KC_HOME, + KC_UNDS, KC_1, KC_1, KC_UNDS, KC_ESC, ALL_T(KC_NO), KC_HOME, CTL_T(KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_UP, - GUI_T(KC_QUOT), KC_A, KC_S, KC_D, KC_F, KC_G, - M(1), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_DOWN, + KC_LGUI, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_DOWN, KC_LALT, KC_1, KC_1, KC_1, KC_LEFT, KC_MUTE, KC_VOLU, KC_VOLD, LT(SYMB, KC_SPC), TG(MDIA), RESET, // right hand - KC_END, KC_ESC, KC_LBRC, KC_RBRC, KC_1, KC_GRV, KC_GRV, - KC_PGUP, TD(TD_Y_ESC), TD(TD_U_LBRC), TD(TD_I_RBRC), KC_O, KC_P, CTL_T(KC_BSPC), + KC_END, ALL_T(KC_NO), KC_LBRC, KC_RBRC, KC_1, KC_GRV, KC_BSPC, + KC_PGUP, KC_Y, TD(TD_U_LBRC), TD(TD_I_RBRC), KC_O, KC_P, KC_LCTRL, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, GUI_T(KC_ENT), - KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, M(1), - KC_RGHT, KC_1, KC_1, KC_1, KC_RALT, + KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_RGHT, KC_BSPC, KC_1, KC_1, KC_RALT, KC_MPLY, KC_DEL, KC_MNXT, - KC_MPRV, TG(MDIA), LT(SYMB, KC_SPC) + KC_MPRV, TG(MDIA), LT(SYMB, KC_QUOT) ), /* Keymap 1: Symbol Layer * -- cgit v1.2.3 From 1f52dbcac01c37157c29038334e1f7b5be9bd4aa Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 6 Dec 2016 14:15:23 -0600 Subject: removes double-tab brackets and adds back quot to left cmd. --- keyboards/ergodox/keymaps/common-nighthawk/keymap.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/keyboards/ergodox/keymaps/common-nighthawk/keymap.c b/keyboards/ergodox/keymaps/common-nighthawk/keymap.c index be12debba..5a1e46b7b 100644 --- a/keyboards/ergodox/keymaps/common-nighthawk/keymap.c +++ b/keyboards/ergodox/keymaps/common-nighthawk/keymap.c @@ -26,37 +26,37 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 0: Basic layer * * ,--------------------------------------------------. ,--------------------------------------------------. - * | _ | x | x | _ | Esc | Hypr | Home | | End | Hypr | [ | ] | x | `~ | Bks | + * | _ | x | x | _ | Esc | Hypr | Home | | End | Hypr | [ | ] | `~ | `~ | Bks | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * |Ctrl/Tab| Q | W | E | R | T | Up | | PgUp | Y | U 2[ | I 2] | O | P | Ctrl | + * |Ctrl/Tab| Q | W | E | R | T | Up | | PgUp | Y | U | I | O | P | Ctrl | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | Cmd | A | S | D | F | G |------| |------| H | J | K | L | ;: |Entr/Cmd| + * | Cmd/"' | A | S | D | F | G |------| |------| H | J | K | L | ;: |Cmd/Entr| * |--------+------+------+------+------+------| Down | | PgDn |------+------+------+------+------+--------| * | Shft | Z | X | C | V | B | | | | N | M | ,< | .> | /? | Shft | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * | Alt | x | x | x | Left | |Right | Bks | x | x | Alt | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. - * | Mute | VolUp| | Play | Del | + * |Teensy| VolUp| | Play | Del | * ,------|------|------| |------+--------+------. * | | | VolDn| | Next | | | * |Sp/~L1| L2 |------| |------| L2 |'"/~L1| - * | | |Teensy| | Prev | | | + * | | | Mute | | Prev | | | * `--------------------' `----------------------' */ [BASE] = KEYMAP( // layer 0 : default // left hand KC_UNDS, KC_1, KC_1, KC_UNDS, KC_ESC, ALL_T(KC_NO), KC_HOME, CTL_T(KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_UP, - KC_LGUI, KC_A, KC_S, KC_D, KC_F, KC_G, + GUI_T(KC_QUOT), KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_DOWN, KC_LALT, KC_1, KC_1, KC_1, KC_LEFT, - KC_MUTE, KC_VOLU, + RESET, KC_VOLU, KC_VOLD, - LT(SYMB, KC_SPC), TG(MDIA), RESET, + LT(SYMB, KC_SPC), TG(MDIA), KC_MUTE, // right hand - KC_END, ALL_T(KC_NO), KC_LBRC, KC_RBRC, KC_1, KC_GRV, KC_BSPC, - KC_PGUP, KC_Y, TD(TD_U_LBRC), TD(TD_I_RBRC), KC_O, KC_P, KC_LCTRL, + KC_END, ALL_T(KC_NO), KC_LBRC, KC_RBRC, KC_GRV, KC_GRV, KC_BSPC, + KC_PGUP, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LCTRL, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, GUI_T(KC_ENT), KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RGHT, KC_BSPC, KC_1, KC_1, KC_RALT, -- cgit v1.2.3 From eac8fa799909817bfc7cb4043448f85551154c6b Mon Sep 17 00:00:00 2001 From: Ofer Plesser Date: Sat, 10 Dec 2016 00:49:11 +0200 Subject: Implemented basic key combination feature --- build_keyboard.mk | 5 +++ quantum/process_keycode/process_combo.c | 66 +++++++++++++++++++++++++++++++++ quantum/process_keycode/process_combo.h | 25 +++++++++++++ quantum/quantum.c | 3 ++ quantum/quantum.h | 4 ++ 5 files changed, 103 insertions(+) create mode 100644 quantum/process_keycode/process_combo.c create mode 100644 quantum/process_keycode/process_combo.h diff --git a/build_keyboard.mk b/build_keyboard.mk index ce505de12..14f4f36bc 100644 --- a/build_keyboard.mk +++ b/build_keyboard.mk @@ -144,6 +144,11 @@ ifeq ($(strip $(MIDI_ENABLE)), yes) SRC += $(QUANTUM_DIR)/process_keycode/process_midi.c endif +ifeq ($(strip $(COMBO_ENABLE)), yes) + OPT_DEFS += -DCOMBO_ENABLE + SRC += $(QUANTUM_DIR)/process_keycode/process_combo.c +endif + ifeq ($(strip $(VIRTSER_ENABLE)), yes) OPT_DEFS += -DVIRTSER_ENABLE endif diff --git a/quantum/process_keycode/process_combo.c b/quantum/process_keycode/process_combo.c new file mode 100644 index 000000000..a6cfed11a --- /dev/null +++ b/quantum/process_keycode/process_combo.c @@ -0,0 +1,66 @@ +#include "process_combo.h" +#include "print.h" + +// __attribute__ ((weak)) +// combo_t key_combos[] = { + +// }; + +#define SEND_KEY(key) \ +do { \ + register_code16(key); \ + send_keyboard_report(); \ + unregister_code16(key); \ +} while(0) + + +#define ALL_COMBO_KEYS_ARE_DOWN (((1<state) +static bool process_single_combo(combo_t *combo, uint16_t keycode, keyrecord_t *record) +{ + uint8_t count = 0; + bool is_combo_key = false; + // bool combo_key_released = false; + + // Count the number of combo keys + for (const uint16_t *key = combo->keys; COMBO_END != pgm_read_word(key); ++key, ++count); + + for (uint8_t i = 0; i < count; ++i) { + uint16_t key = pgm_read_word(&combo->keys[i]); + + if (key == keycode) { + is_combo_key = true; + + if (record->event.pressed) { + combo->state |= (1<state) { + // The combo was sent, no need to send released key + return true; + } + + combo->state &= ~(1<action); + combo->state = 0; + } + + return is_combo_key; +} + + +bool process_combo(uint16_t keycode, keyrecord_t *record) +{ + bool is_combo_key = false; + + for (int i = 0; i < NUM_ELEMS(key_combos); ++i) { + combo_t *combo = &key_combos[i]; + is_combo_key |= process_single_combo(combo, keycode, record); + } + + return !is_combo_key; +} \ No newline at end of file diff --git a/quantum/process_keycode/process_combo.h b/quantum/process_keycode/process_combo.h new file mode 100644 index 000000000..68786c0f1 --- /dev/null +++ b/quantum/process_keycode/process_combo.h @@ -0,0 +1,25 @@ +#ifndef PROCESS_COMBO_H +#define PROCESS_COMBO_H + +#include +#include "progmem.h" +#include "quantum.h" + + +typedef struct +{ + const uint16_t *keys; + uint16_t action; + uint32_t state; +} combo_t; + + +#define COMBO_END 0 +#define NUM_ELEMS(a) (sizeof(a)/sizeof 0[a]) + + +extern combo_t key_combos[1]; + +bool process_combo(uint16_t keycode, keyrecord_t *record); + +#endif \ No newline at end of file diff --git a/quantum/quantum.c b/quantum/quantum.c index f653564a6..eabeacff8 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -113,6 +113,9 @@ bool process_record_quantum(keyrecord_t *record) { if (!( process_record_kb(keycode, record) && + #ifdef COMBO_ENABLE + process_combo(keycode, record) && + #endif #ifdef MIDI_ENABLE process_midi(keycode, record) && #endif diff --git a/quantum/quantum.h b/quantum/quantum.h index e6adf974a..8614c053a 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -63,6 +63,10 @@ extern uint32_t default_layer_state; #include "process_printer.h" #endif +#ifdef COMBO_ENABLE + #include "process_combo.h" +#endif + #define SEND_STRING(str) send_string(PSTR(str)) void send_string(const char *str); -- cgit v1.2.3 From b6bf4e0dce062a535685c4e772f613252d401ed3 Mon Sep 17 00:00:00 2001 From: Ofer Plesser Date: Sat, 10 Dec 2016 16:11:59 +0200 Subject: Added support for timing out combos if a key as been pressed for longer than COMBO_TERM --- quantum/process_keycode/process_combo.c | 107 +++++++++++++++++++++++--------- quantum/process_keycode/process_combo.h | 20 +++++- quantum/quantum.c | 5 ++ 3 files changed, 101 insertions(+), 31 deletions(-) diff --git a/quantum/process_keycode/process_combo.c b/quantum/process_keycode/process_combo.c index a6cfed11a..ff7e8aba5 100644 --- a/quantum/process_keycode/process_combo.c +++ b/quantum/process_keycode/process_combo.c @@ -1,11 +1,6 @@ #include "process_combo.h" #include "print.h" -// __attribute__ ((weak)) -// combo_t key_combos[] = { - -// }; - #define SEND_KEY(key) \ do { \ register_code16(key); \ @@ -13,54 +8,110 @@ do { \ unregister_code16(key); \ } while(0) +#define COMBO_TIMER_ELAPSED -1 + +#if COMBO_TERM +#define IS_COMBO_KEY_HELD(combo) (COMBO_TIMER_ELAPSED == combo->timer ? false : true) +#define RESET_COMBO_TIMER_AND_KEY(combo) combo->timer = 0; combo->key = 0 +#else +#define IS_COMBO_KEY_HELD(combo) (true) +#define RESET_COMBO_TIMER_AND_KEY(combo) do {} while (0) +#endif + + +__attribute__ ((weak)) +combo_t key_combos[COMBO_COUNT] = { + +}; + +static inline void reset_combo(combo_t *combo) +{ + combo->state = 0; + RESET_COMBO_TIMER_AND_KEY(combo); +} #define ALL_COMBO_KEYS_ARE_DOWN (((1<state) +#define NO_COMBO_KEYS_ARE_DOWN (0 == combo->state) +#define KEY_STATE_DOWN(key) do{ combo->state |= (1<state &= ~(1<keys; ;++count) { + uint16_t key = pgm_read_word(&keys[count]); + if (keycode == key) index = count; + if (COMBO_END == key) break; + } - // Count the number of combo keys - for (const uint16_t *key = combo->keys; COMBO_END != pgm_read_word(key); ++key, ++count); + /* Return if not a combo key */ + if (-1 == index) return false; - for (uint8_t i = 0; i < count; ++i) { - uint16_t key = pgm_read_word(&combo->keys[i]); + bool is_combo_active = IS_COMBO_KEY_HELD(combo); - if (key == keycode) { - is_combo_key = true; + if (record->event.pressed) { + KEY_STATE_DOWN(index); + +#if COMBO_TERM + if (is_combo_active) { + combo->timer = timer_read(); + combo->key = keycode; + } +#endif - if (record->event.pressed) { - combo->state |= (1<state) { - // The combo was sent, no need to send released key - return true; - } + } else { + if (is_combo_active && combo->state) { /* Combo key was tapped */ + RESET_COMBO_TIMER_AND_KEY(combo); + SEND_KEY(keycode); + } - combo->state &= ~(1<key) { /* Held combo key was released */ + unregister_code16(combo->key); } +#endif + + KEY_STATE_UP(index); } - if (ALL_COMBO_KEYS_ARE_DOWN) { + if (ALL_COMBO_KEYS_ARE_DOWN && is_combo_active) { SEND_KEY(combo->action); - combo->state = 0; + reset_combo(combo); + } + + if(NO_COMBO_KEYS_ARE_DOWN && !is_combo_active) { + reset_combo(combo); } - return is_combo_key; + return is_combo_active; } - bool process_combo(uint16_t keycode, keyrecord_t *record) { bool is_combo_key = false; - for (int i = 0; i < NUM_ELEMS(key_combos); ++i) { + for (int i = 0; i < COMBO_COUNT; ++i) { combo_t *combo = &key_combos[i]; is_combo_key |= process_single_combo(combo, keycode, record); } return !is_combo_key; +} + +void matrix_scan_combo(void) +{ +#if COMBO_TERM + for (int i = 0; i < COMBO_COUNT; ++i) { + combo_t *combo = &key_combos[i]; + if (combo->timer && + combo->timer != COMBO_TIMER_ELAPSED && + timer_elapsed(combo->timer) > COMBO_TERM) { + + combo->timer = COMBO_TIMER_ELAPSED; + unregister_code16(combo->key); + register_code16(combo->key); + } + } +#endif } \ No newline at end of file diff --git a/quantum/process_keycode/process_combo.h b/quantum/process_keycode/process_combo.h index 68786c0f1..c475acd33 100644 --- a/quantum/process_keycode/process_combo.h +++ b/quantum/process_keycode/process_combo.h @@ -5,21 +5,35 @@ #include "progmem.h" #include "quantum.h" +#ifndef COMBO_TERM +#define COMBO_TERM TAPPING_TERM +#endif typedef struct { const uint16_t *keys; uint16_t action; uint32_t state; +#if COMBO_TERM + uint16_t timer; + uint16_t key; +#endif } combo_t; +#if COMBO_TERM +#define COMBO(ck, ca) {.keys = &(ck)[0], .action = (ca), .state = 0, .timer = 0, .key = 0} +#else +#define COMBO(ck, ca) {.keys = &(ck)[0], .action = (ca), .state = 0 } +#endif #define COMBO_END 0 -#define NUM_ELEMS(a) (sizeof(a)/sizeof 0[a]) +#ifndef COMBO_COUNT +#define COMBO_COUNT 0 +#endif - -extern combo_t key_combos[1]; +extern combo_t key_combos[COMBO_COUNT]; bool process_combo(uint16_t keycode, keyrecord_t *record); +void matrix_scan_combo(void); #endif \ No newline at end of file diff --git a/quantum/quantum.c b/quantum/quantum.c index eabeacff8..7767b6301 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -509,6 +509,11 @@ void matrix_scan_quantum() { #ifdef TAP_DANCE_ENABLE matrix_scan_tap_dance(); #endif + + #ifdef COMBO_ENABLE + matrix_scan_combo(); + #endif + matrix_scan_kb(); } -- cgit v1.2.3 From ebe351a6905d5031d5383b4ad7fe551e0e844d52 Mon Sep 17 00:00:00 2001 From: lucwastiaux Date: Thu, 15 Dec 2016 07:22:31 +0800 Subject: enable brackets using the - key on the right, and cleanups --- keyboards/ergodox/keymaps/dvorak_programmer/keymap.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c index f3d02f688..3d7e1893c 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c +++ b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c @@ -58,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = KEYMAP( // layer 0 : default // left hand KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, - LT(MOUSE,KC_TAB), KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, MO(KEY_SEL), + LT(MOUSE,KC_TAB), KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, MO(KEY_SEL), MO(SHELL_NAV), KC_A, KC_O, KC_E, KC_U, KC_I, KC_FN3, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, MO(KEY_NAV), OSL(SHORTCUTS),KC_FN4, KC_FN5,OSL(SYMBOL),MO(NUMBER), @@ -69,7 +69,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // right hand KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSLS, KC_PGUP, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, - KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, + KC_D, KC_H, KC_T, KC_N, KC_S, LT(BRACKETS,KC_MINS), KC_PGDN, KC_B, KC_M, KC_W, KC_V, KC_Z, TD(TD_SHIFT_CAPSLOCK), // lower keys - browser tab control RSFT(RCTL(KC_TAB)), RCTL(KC_TAB), RCTL(KC_T), LALT(KC_LEFT), RCTL(KC_W), @@ -209,12 +209,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BRACKETS] = KEYMAP( // left hand - 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,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,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,M(OPEN_CLOSE_CURLY), M(OPEN_CLOSE_PAREN),M(OPEN_CLOSE_BRACKET), KC_TRNS,KC_TRNS, + KC_TRNS,KC_LPRN, KC_RPRN, KC_LBRC, KC_RBRC, KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, KC_LCBR, KC_RCBR, 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, // right hand -- cgit v1.2.3 From 6e7cfa83b9424061914793b02757fa4ec75b356b Mon Sep 17 00:00:00 2001 From: Ofer Plesser Date: Fri, 16 Dec 2016 21:50:28 +0200 Subject: Refactored as well as added support for action keys in combos --- quantum/process_keycode/process_combo.c | 123 ++++++++++++++++++-------------- quantum/process_keycode/process_combo.h | 34 +++++---- 2 files changed, 89 insertions(+), 68 deletions(-) diff --git a/quantum/process_keycode/process_combo.c b/quantum/process_keycode/process_combo.c index ff7e8aba5..e2189ad98 100644 --- a/quantum/process_keycode/process_combo.c +++ b/quantum/process_keycode/process_combo.c @@ -1,39 +1,39 @@ #include "process_combo.h" #include "print.h" -#define SEND_KEY(key) \ -do { \ - register_code16(key); \ - send_keyboard_report(); \ - unregister_code16(key); \ -} while(0) #define COMBO_TIMER_ELAPSED -1 -#if COMBO_TERM -#define IS_COMBO_KEY_HELD(combo) (COMBO_TIMER_ELAPSED == combo->timer ? false : true) -#define RESET_COMBO_TIMER_AND_KEY(combo) combo->timer = 0; combo->key = 0 -#else -#define IS_COMBO_KEY_HELD(combo) (true) -#define RESET_COMBO_TIMER_AND_KEY(combo) do {} while (0) -#endif - __attribute__ ((weak)) -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { }; -static inline void reset_combo(combo_t *combo) +__attribute__ ((weak)) +void process_combo_event(uint8_t combo_index, bool pressed) { + +} + +static uint8_t current_combo_index = 0; + +static inline void send_combo(uint16_t action, bool pressed) { - combo->state = 0; - RESET_COMBO_TIMER_AND_KEY(combo); + if (action) { + if (pressed) { + register_code16(action); + } else { + unregister_code16(action); + } + } else { + process_combo_event(current_combo_index, pressed); + } } -#define ALL_COMBO_KEYS_ARE_DOWN (((1<state) -#define NO_COMBO_KEYS_ARE_DOWN (0 == combo->state) -#define KEY_STATE_DOWN(key) do{ combo->state |= (1<state &= ~(1<state) +#define NO_COMBO_KEYS_ARE_DOWN (0 == combo->state) +#define KEY_STATE_DOWN(key) do{ combo->state |= (1<state &= ~(1<timer ? false : true; if (record->event.pressed) { KEY_STATE_DOWN(index); - -#if COMBO_TERM + if (is_combo_active) { - combo->timer = timer_read(); - combo->key = keycode; - } + if (ALL_COMBO_KEYS_ARE_DOWN) { /* Combo was pressed */ + send_combo(combo->keycode, true); + combo->timer = COMBO_TIMER_ELAPSED; + } else { /* Combo key was pressed */ + combo->timer = timer_read(); +#ifdef COMBO_ALLOW_ACTION_KEYS + combo->prev_record = *record; +#else + combo->prev_key = keycode; #endif - + } + } } else { - if (is_combo_active && combo->state) { /* Combo key was tapped */ - RESET_COMBO_TIMER_AND_KEY(combo); - SEND_KEY(keycode); + if (ALL_COMBO_KEYS_ARE_DOWN) { /* Combo was released */ + send_combo(combo->keycode, false); } -#if COMBO_TERM - if (!is_combo_active && keycode == combo->key) { /* Held combo key was released */ - unregister_code16(combo->key); - } + if (is_combo_active) { /* Combo key was tapped */ +#ifdef COMBO_ALLOW_ACTION_KEYS + record->event.pressed = true; + process_action(record, store_or_get_action(record->event.pressed, record->event.key)); + record->event.pressed = false; + process_action(record, store_or_get_action(record->event.pressed, record->event.key)); +#else + register_code16(keycode); + send_keyboard_report(); + unregister_code16(keycode); #endif + combo->timer = 0; + } - KEY_STATE_UP(index); + KEY_STATE_UP(index); } - if (ALL_COMBO_KEYS_ARE_DOWN && is_combo_active) { - SEND_KEY(combo->action); - reset_combo(combo); - } - - if(NO_COMBO_KEYS_ARE_DOWN && !is_combo_active) { - reset_combo(combo); + if (NO_COMBO_KEYS_ARE_DOWN) { + combo->timer = 0; } return is_combo_active; @@ -91,8 +100,8 @@ bool process_combo(uint16_t keycode, keyrecord_t *record) { bool is_combo_key = false; - for (int i = 0; i < COMBO_COUNT; ++i) { - combo_t *combo = &key_combos[i]; + for (current_combo_index = 0; current_combo_index < COMBO_COUNT; ++current_combo_index) { + combo_t *combo = &key_combos[current_combo_index]; is_combo_key |= process_single_combo(combo, keycode, record); } @@ -101,17 +110,25 @@ bool process_combo(uint16_t keycode, keyrecord_t *record) void matrix_scan_combo(void) { -#if COMBO_TERM for (int i = 0; i < COMBO_COUNT; ++i) { combo_t *combo = &key_combos[i]; if (combo->timer && combo->timer != COMBO_TIMER_ELAPSED && timer_elapsed(combo->timer) > COMBO_TERM) { - + + /* This disables the combo, meaning key events for this + * combo will be handled by the next processors in the chain + */ combo->timer = COMBO_TIMER_ELAPSED; - unregister_code16(combo->key); - register_code16(combo->key); + +#ifdef COMBO_ALLOW_ACTION_KEYS + process_action(&combo->prev_record, + store_or_get_action(combo->prev_record.event.pressed, + combo->prev_record.event.key)); +#else + unregister_code16(combo->prev_key); + register_code16(combo->prev_key); +#endif } } -#endif -} \ No newline at end of file +} diff --git a/quantum/process_keycode/process_combo.h b/quantum/process_keycode/process_combo.h index c475acd33..847f2b737 100644 --- a/quantum/process_keycode/process_combo.h +++ b/quantum/process_keycode/process_combo.h @@ -5,35 +5,39 @@ #include "progmem.h" #include "quantum.h" -#ifndef COMBO_TERM -#define COMBO_TERM TAPPING_TERM -#endif - typedef struct { const uint16_t *keys; - uint16_t action; + uint16_t keycode; +#ifdef EXTRA_EXTRA_LONG_COMBOS uint32_t state; -#if COMBO_TERM +#elif EXTRA_LONG_COMBOS + uint16_t state; +#else + uint8_t state; +#endif uint16_t timer; - uint16_t key; +#ifdef COMBO_ALLOW_ACTION_KEYS + keyrecord_t prev_record; +#else + uint16_t prev_key; #endif } combo_t; -#if COMBO_TERM -#define COMBO(ck, ca) {.keys = &(ck)[0], .action = (ca), .state = 0, .timer = 0, .key = 0} -#else -#define COMBO(ck, ca) {.keys = &(ck)[0], .action = (ca), .state = 0 } -#endif +#define COMBO(ck, ca) {.keys = &(ck)[0], .keycode = (ca)} +#define COMBO_ACTION(ck) {.keys = &(ck)[0]} + #define COMBO_END 0 #ifndef COMBO_COUNT #define COMBO_COUNT 0 #endif - -extern combo_t key_combos[COMBO_COUNT]; +#ifndef COMBO_TERM +#define COMBO_TERM TAPPING_TERM +#endif bool process_combo(uint16_t keycode, keyrecord_t *record); void matrix_scan_combo(void); +void process_combo_event(uint8_t combo_index, bool pressed); -#endif \ No newline at end of file +#endif -- cgit v1.2.3 From 40abf8bc9ce22cab472f79e3a97c413ac5648986 Mon Sep 17 00:00:00 2001 From: Ofer Plesser Date: Fri, 16 Dec 2016 22:00:29 +0200 Subject: Moved combo processing lower down in process logic --- quantum/quantum.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/quantum/quantum.c b/quantum/quantum.c index 7767b6301..e5385bc21 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -113,9 +113,6 @@ bool process_record_quantum(keyrecord_t *record) { if (!( process_record_kb(keycode, record) && - #ifdef COMBO_ENABLE - process_combo(keycode, record) && - #endif #ifdef MIDI_ENABLE process_midi(keycode, record) && #endif @@ -131,6 +128,9 @@ bool process_record_quantum(keyrecord_t *record) { #ifndef DISABLE_CHORDING process_chording(keycode, record) && #endif + #ifdef COMBO_ENABLE + process_combo(keycode, record) && + #endif #ifdef UNICODE_ENABLE process_unicode(keycode, record) && #endif -- cgit v1.2.3 From eb588d630cdaf6be8ad7514c4b22025aefaa6992 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Wed, 28 Dec 2016 19:27:48 +0100 Subject: ergodox: Update algernon's keymap to v1.10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Miscellaneous ============= * `µ` can now be entered with UCIS. * `™` can now be entered with UCIS. Tools ===== * `tools/hid-commands` can now find Banshee, and prefers it over Kodi. * `tools/hid-commands` can now find Chrome too, not juts Chromium. Signed-off-by: Gergely Nagy --- keyboards/ergodox/keymaps/algernon/NEWS.md | 14 ++++++++++++++ keyboards/ergodox/keymaps/algernon/keymap.c | 8 ++++---- keyboards/ergodox/keymaps/algernon/tools/hid-commands | 5 +++-- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/keyboards/ergodox/keymaps/algernon/NEWS.md b/keyboards/ergodox/keymaps/algernon/NEWS.md index e11998998..ee9d60670 100644 --- a/keyboards/ergodox/keymaps/algernon/NEWS.md +++ b/keyboards/ergodox/keymaps/algernon/NEWS.md @@ -1,5 +1,19 @@ +## v1.10 + +*2016-12-28* + +### Miscellaneous + +* `µ` can now be entered with UCIS. +* `™` can now be entered with UCIS. + +### Tools + +* `tools/hid-commands` can now find Banshee, and prefers it over Kodi. +* `tools/hid-commands` can now find Chrome too, not juts Chromium. + ## v1.9 *2016-10-16* diff --git a/keyboards/ergodox/keymaps/algernon/keymap.c b/keyboards/ergodox/keymaps/algernon/keymap.c index bad240337..b615f3f5f 100644 --- a/keyboards/ergodox/keymaps/algernon/keymap.c +++ b/keyboards/ergodox/keymaps/algernon/keymap.c @@ -96,8 +96,6 @@ enum { uint16_t gui_timer = 0; -uint16_t kf_timers[12]; - #if KEYLOGGER_ENABLE # ifdef AUTOLOG_ENABLE bool log_enable = true; @@ -786,7 +784,7 @@ static void ang_tap_dance_tmux_pane_select (qk_tap_dance_state_t *state, void *u if (state->count >= 2) { kc = KC_Z; } - + register_code(KC_LALT); register_code(KC_SPC); unregister_code(KC_SPC); @@ -1040,7 +1038,9 @@ const qk_ucis_symbol_t ucis_symbol_table[] = UCIS_TABLE UCIS_SYM("heart", 0x2764), UCIS_SYM("bolt", 0x26a1), UCIS_SYM("pi", 0x03c0), - UCIS_SYM("mouse", 0x1f401) + UCIS_SYM("mouse", 0x1f401), + UCIS_SYM("micro", 0x00b5), + UCIS_SYM("tm", 0x2122) ); bool process_record_user (uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/ergodox/keymaps/algernon/tools/hid-commands b/keyboards/ergodox/keymaps/algernon/tools/hid-commands index a29d38f41..54ca7556a 100755 --- a/keyboards/ergodox/keymaps/algernon/tools/hid-commands +++ b/keyboards/ergodox/keymaps/algernon/tools/hid-commands @@ -16,7 +16,8 @@ _cmd_appsel () { } cmd_appsel_music () { - wmctrl -x -a rhythmbox || wmctrl -x -a spotify || wmctrl -x -a kodi || true + wmctrl -x -a rhythmbox || wmctrl -x -a spotify || \ + wmctrl -x -a banshee || wmctrl -x -a kodi || true xdotool key Escape } @@ -33,7 +34,7 @@ cmd_appsel_term () { } cmd_appsel_chrome () { - _cmd_appsel chromium + _cmd_appsel chrom } cmd_appsel_start () { -- cgit v1.2.3 From 748181dccddb8c9fa52a776f4fcd904ddca9aa31 Mon Sep 17 00:00:00 2001 From: Scott Wilson Date: Wed, 28 Dec 2016 16:29:02 -0500 Subject: Add extern for 'led' global, set 'weak' attribute for rgblight_set() --- quantum/rgblight.c | 1 + quantum/rgblight.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/quantum/rgblight.c b/quantum/rgblight.c index 6e335a483..0f7a1d828 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -370,6 +370,7 @@ void rgblight_setrgb(uint8_t r, uint8_t g, uint8_t b) { rgblight_set(); } ++__attribute__ ((weak)) void rgblight_set(void) { if (rgblight_config.enable) { #ifdef RGBW diff --git a/quantum/rgblight.h b/quantum/rgblight.h index ceb624692..726b8de72 100644 --- a/quantum/rgblight.h +++ b/quantum/rgblight.h @@ -40,6 +40,8 @@ #include "eeconfig.h" #include "light_ws2812.h" +extern LED_TYPE led[RGBLED_NUM]; + extern const uint8_t RGBLED_BREATHING_INTERVALS[4] PROGMEM; extern const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[3] PROGMEM; extern const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[3] PROGMEM; -- cgit v1.2.3 From d8a608f3ff4cb4d73cd57be500fd9881e230099d Mon Sep 17 00:00:00 2001 From: Wilba6582 Date: Thu, 29 Dec 2016 18:28:48 +1100 Subject: Keycode refactor --- quantum/keymap.h | 314 +-------------------------------------------- quantum/keymap_common.c | 16 ++- quantum/quantum_keycodes.h | 313 ++++++++++++++++++++++++++++++++++++++++++++ tmk_core/common/keycode.h | 2 +- 4 files changed, 331 insertions(+), 314 deletions(-) create mode 100644 quantum/quantum_keycodes.h diff --git a/quantum/keymap.h b/quantum/keymap.h index 745c55279..c000d2da8 100644 --- a/quantum/keymap.h +++ b/quantum/keymap.h @@ -38,318 +38,16 @@ along with this program. If not, see . #define RESET QK_RESET #endif -/* translates key to keycode */ +#include "quantum_keycodes.h" + +// translates key to keycode uint16_t keymap_key_to_keycode(uint8_t layer, keypos_t key); +// translates function id to action +uint16_t keymap_function_id_to_action( uint16_t function_id ); + extern const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS]; extern const uint16_t fn_actions[]; -enum quantum_keycodes { - // Ranges used in shortucuts - not to be used directly - QK_TMK = 0x0000, - QK_TMK_MAX = 0x00FF, - QK_MODS = 0x0100, - QK_LCTL = 0x0100, - QK_LSFT = 0x0200, - QK_LALT = 0x0400, - QK_LGUI = 0x0800, - QK_RMODS_MIN = 0x1000, - QK_RCTL = 0x1100, - QK_RSFT = 0x1200, - QK_RALT = 0x1400, - QK_RGUI = 0x1800, - QK_MODS_MAX = 0x1FFF, - QK_FUNCTION = 0x2000, - QK_FUNCTION_MAX = 0x2FFF, - QK_MACRO = 0x3000, - QK_MACRO_MAX = 0x3FFF, - QK_LAYER_TAP = 0x4000, - QK_LAYER_TAP_MAX = 0x4FFF, - QK_TO = 0x5000, - QK_TO_MAX = 0x50FF, - QK_MOMENTARY = 0x5100, - QK_MOMENTARY_MAX = 0x51FF, - QK_DEF_LAYER = 0x5200, - QK_DEF_LAYER_MAX = 0x52FF, - QK_TOGGLE_LAYER = 0x5300, - QK_TOGGLE_LAYER_MAX = 0x53FF, - QK_ONE_SHOT_LAYER = 0x5400, - QK_ONE_SHOT_LAYER_MAX = 0x54FF, - QK_ONE_SHOT_MOD = 0x5500, - QK_ONE_SHOT_MOD_MAX = 0x55FF, -#ifndef DISABLE_CHORDING - QK_CHORDING = 0x5600, - QK_CHORDING_MAX = 0x56FF, -#endif - QK_MOD_TAP = 0x6000, - QK_MOD_TAP_MAX = 0x6FFF, - QK_TAP_DANCE = 0x7100, - QK_TAP_DANCE_MAX = 0x71FF, -#ifdef UNICODEMAP_ENABLE - QK_UNICODE_MAP = 0x7800, - QK_UNICODE_MAP_MAX = 0x7FFF, -#endif -#ifdef UNICODE_ENABLE - QK_UNICODE = 0x8000, - QK_UNICODE_MAX = 0xFFFF, -#endif - - // Loose keycodes - to be used directly - - RESET = 0x7000, - DEBUG, - MAGIC_SWAP_CONTROL_CAPSLOCK, - MAGIC_CAPSLOCK_TO_CONTROL, - MAGIC_SWAP_LALT_LGUI, - MAGIC_SWAP_RALT_RGUI, - MAGIC_NO_GUI, - MAGIC_SWAP_GRAVE_ESC, - MAGIC_SWAP_BACKSLASH_BACKSPACE, - MAGIC_HOST_NKRO, - MAGIC_SWAP_ALT_GUI, - MAGIC_UNSWAP_CONTROL_CAPSLOCK, - MAGIC_UNCAPSLOCK_TO_CONTROL, - MAGIC_UNSWAP_LALT_LGUI, - MAGIC_UNSWAP_RALT_RGUI, - MAGIC_UNNO_GUI, - MAGIC_UNSWAP_GRAVE_ESC, - MAGIC_UNSWAP_BACKSLASH_BACKSPACE, - MAGIC_UNHOST_NKRO, - MAGIC_UNSWAP_ALT_GUI, - MAGIC_TOGGLE_NKRO, - - // Leader key -#ifndef DISABLE_LEADER - KC_LEAD, -#endif - - // Audio on/off/toggle - AU_ON, - AU_OFF, - AU_TOG, - - // Music mode on/off/toggle - MU_ON, - MU_OFF, - MU_TOG, - - // Music voice iterate - MUV_IN, - MUV_DE, - - // Midi mode on/off - MIDI_ON, - MIDI_OFF, - - // Backlight functionality - BL_0, - BL_1, - BL_2, - BL_3, - BL_4, - BL_5, - BL_6, - BL_7, - BL_8, - BL_9, - BL_10, - BL_11, - BL_12, - BL_13, - BL_14, - BL_15, - BL_DEC, - BL_INC, - BL_TOGG, - BL_STEP, - - // RGB functionality - RGB_TOG, - RGB_MOD, - RGB_HUI, - RGB_HUD, - RGB_SAI, - RGB_SAD, - RGB_VAI, - RGB_VAD, - - // Left shift, open paren - KC_LSPO, - - // Right shift, close paren - KC_RSPC, - - // Printing - PRINT_ON, - PRINT_OFF, - - // always leave at the end - SAFE_RANGE -}; - -// Ability to use mods in layouts -#define LCTL(kc) (kc | QK_LCTL) -#define LSFT(kc) (kc | QK_LSFT) -#define LALT(kc) (kc | QK_LALT) -#define LGUI(kc) (kc | QK_LGUI) -#define RCTL(kc) (kc | QK_RCTL) -#define RSFT(kc) (kc | QK_RSFT) -#define RALT(kc) (kc | QK_RALT) -#define RGUI(kc) (kc | QK_RGUI) - -#define HYPR(kc) (kc | QK_LCTL | QK_LSFT | QK_LALT | QK_LGUI) -#define MEH(kc) (kc | QK_LCTL | QK_LSFT | QK_LALT) -#define LCAG(kc) (kc | QK_LCTL | QK_LALT | QK_LGUI) -#define ALTG(kc) (kc | QK_RCTL | QK_RALT) - -#define MOD_HYPR 0xf -#define MOD_MEH 0x7 - - -// Aliases for shifted symbols -// Each key has a 4-letter code, and some have longer aliases too. -// While the long aliases are descriptive, the 4-letter codes -// make for nicer grid layouts (everything lines up), and are -// the preferred style for Quantum. -#define KC_TILD LSFT(KC_GRV) // ~ -#define KC_TILDE KC_TILD - -#define KC_EXLM LSFT(KC_1) // ! -#define KC_EXCLAIM KC_EXLM - -#define KC_AT LSFT(KC_2) // @ - -#define KC_HASH LSFT(KC_3) // # - -#define KC_DLR LSFT(KC_4) // $ -#define KC_DOLLAR KC_DLR - -#define KC_PERC LSFT(KC_5) // % -#define KC_PERCENT KC_PERC - -#define KC_CIRC LSFT(KC_6) // ^ -#define KC_CIRCUMFLEX KC_CIRC - -#define KC_AMPR LSFT(KC_7) // & -#define KC_AMPERSAND KC_AMPR - -#define KC_ASTR LSFT(KC_8) // * -#define KC_ASTERISK KC_ASTR - -#define KC_LPRN LSFT(KC_9) // ( -#define KC_LEFT_PAREN KC_LPRN - -#define KC_RPRN LSFT(KC_0) // ) -#define KC_RIGHT_PAREN KC_RPRN - -#define KC_UNDS LSFT(KC_MINS) // _ -#define KC_UNDERSCORE KC_UNDS - -#define KC_PLUS LSFT(KC_EQL) // + - -#define KC_LCBR LSFT(KC_LBRC) // { -#define KC_LEFT_CURLY_BRACE KC_LCBR - -#define KC_RCBR LSFT(KC_RBRC) // } -#define KC_RIGHT_CURLY_BRACE KC_RCBR - -#define KC_LABK LSFT(KC_COMM) // < -#define KC_LEFT_ANGLE_BRACKET KC_LABK - -#define KC_RABK LSFT(KC_DOT) // > -#define KC_RIGHT_ANGLE_BRACKET KC_RABK - -#define KC_COLN LSFT(KC_SCLN) // : -#define KC_COLON KC_COLN - -#define KC_PIPE LSFT(KC_BSLS) // | - -#define KC_LT LSFT(KC_COMM) // < - -#define KC_GT LSFT(KC_DOT) // > - -#define KC_QUES LSFT(KC_SLSH) // ? -#define KC_QUESTION KC_QUES - -#define KC_DQT LSFT(KC_QUOT) // " -#define KC_DOUBLE_QUOTE KC_DQT -#define KC_DQUO KC_DQT - -#define KC_DELT KC_DELETE // Del key (four letter code) - -// Alias for function layers than expand past FN31 -#define FUNC(kc) (kc | QK_FUNCTION) - -// Aliases -#define S(kc) LSFT(kc) -#define F(kc) FUNC(kc) - -#define M(kc) (kc | QK_MACRO) - -#define MACRODOWN(...) (record->event.pressed ? MACRO(__VA_ARGS__) : MACRO_NONE) - -// L-ayer, T-ap - 256 keycode max, 16 layer max -#define LT(layer, kc) (kc | QK_LAYER_TAP | ((layer & 0xF) << 8)) - -#define AG_SWAP MAGIC_SWAP_ALT_GUI -#define AG_NORM MAGIC_UNSWAP_ALT_GUI - -#define BL_ON BL_9 -#define BL_OFF BL_0 - -#define MI_ON MIDI_ON -#define MI_OFF MIDI_OFF - -// GOTO layer - 16 layers max -// when: -// ON_PRESS = 1 -// ON_RELEASE = 2 -// Unless you have a good reason not to do so, prefer ON_PRESS (1) as your default. -// In fact, we changed it to assume ON_PRESS for sanity/simplicity. If needed, you can add your own -// keycode modeled after the old version, kept below for this. -/* #define TO(layer, when) (layer | QK_TO | (when << 0x4)) */ -#define TO(layer) (layer | QK_TO | (ON_PRESS << 0x4)) - -// Momentary switch layer - 256 layer max -#define MO(layer) (layer | QK_MOMENTARY) - -// Set default layer - 256 layer max -#define DF(layer) (layer | QK_DEF_LAYER) - -// Toggle to layer - 256 layer max -#define TG(layer) (layer | QK_TOGGLE_LAYER) - -// One-shot layer - 256 layer max -#define OSL(layer) (layer | QK_ONE_SHOT_LAYER) - -// One-shot mod -#define OSM(mod) (mod | QK_ONE_SHOT_MOD) - -// M-od, T-ap - 256 keycode max -#define MT(mod, kc) (kc | QK_MOD_TAP | ((mod & 0xF) << 8)) -#define CTL_T(kc) MT(MOD_LCTL, kc) -#define SFT_T(kc) MT(MOD_LSFT, kc) -#define ALT_T(kc) MT(MOD_LALT, kc) -#define GUI_T(kc) MT(MOD_LGUI, kc) -#define C_S_T(kc) MT((MOD_LCTL | MOD_LSFT), kc) // Control + Shift e.g. for gnome-terminal -#define MEH_T(kc) MT((MOD_LCTL | MOD_LSFT | MOD_LALT), kc) // Meh is a less hyper version of the Hyper key -- doesn't include Win or Cmd, so just alt+shift+ctrl -#define LCAG_T(kc) MT((MOD_LCTL | MOD_LALT | MOD_LGUI), kc) // Left control alt and gui -#define ALL_T(kc) MT((MOD_LCTL | MOD_LSFT | MOD_LALT | MOD_LGUI), kc) // see http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/ - -// Dedicated keycode versions for Hyper and Meh, if you want to use them as standalone keys rather than mod-tap -#define KC_HYPR HYPR(KC_NO) -#define KC_MEH MEH(KC_NO) - -#ifdef UNICODE_ENABLE - // For sending unicode codes. - // You may not send codes over 7FFF -- this supports most of UTF8. - // To have a key that sends out Œ, go UC(0x0152) - #define UNICODE(n) (n | QK_UNICODE) - #define UC(n) UNICODE(n) -#endif - -#ifdef UNICODEMAP_ENABLE - #define X(n) (n | QK_UNICODE_MAP) -#endif #endif diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index 833e5a8f8..eced3d2bb 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c @@ -48,12 +48,10 @@ action_t action_for_key(uint8_t layer, keypos_t key) action_t action; uint8_t action_layer, when, mod; - // The arm-none-eabi compiler generates out of bounds warnings when using the fn_actions directly for some reason - const uint16_t* actions = fn_actions; switch (keycode) { case KC_FN0 ... KC_FN31: - action.code = pgm_read_word(&actions[FN_INDEX(keycode)]); + action.code = keymap_function_id_to_action(FN_INDEX(keycode)); break; case KC_A ... KC_EXSEL: case KC_LCTRL ... KC_RGUI: @@ -79,7 +77,7 @@ action_t action_for_key(uint8_t layer, keypos_t key) case QK_FUNCTION ... QK_FUNCTION_MAX: ; // Is a shortcut for function action_layer, pull last 12bits // This means we have 4,096 FN macros at our disposal - action.code = pgm_read_word(&actions[(int)keycode & 0xFFF]); + action.code = keymap_function_id_to_action( (int)keycode & 0xFFF ); break; case QK_MACRO ... QK_MACRO_MAX: action.code = ACTION_MACRO(keycode & 0xFF); @@ -163,9 +161,17 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { } -/* translates key to keycode */ +// translates key to keycode +__attribute__ ((weak)) uint16_t keymap_key_to_keycode(uint8_t layer, keypos_t key) { // Read entire word (16bits) return pgm_read_word(&keymaps[(layer)][(key.row)][(key.col)]); } + +// translates function id to action +__attribute__ ((weak)) +uint16_t keymap_function_id_to_action( uint16_t function_id ) +{ + return pgm_read_word(&fn_actions[function_id]); +} diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h new file mode 100644 index 000000000..5cd3c8e78 --- /dev/null +++ b/quantum/quantum_keycodes.h @@ -0,0 +1,313 @@ + +#ifndef QUANTUM_KEYCODES_H +#define QUANTUM_KEYCODES_H + +enum quantum_keycodes { + // Ranges used in shortucuts - not to be used directly + QK_TMK = 0x0000, + QK_TMK_MAX = 0x00FF, + QK_MODS = 0x0100, + QK_LCTL = 0x0100, + QK_LSFT = 0x0200, + QK_LALT = 0x0400, + QK_LGUI = 0x0800, + QK_RMODS_MIN = 0x1000, + QK_RCTL = 0x1100, + QK_RSFT = 0x1200, + QK_RALT = 0x1400, + QK_RGUI = 0x1800, + QK_MODS_MAX = 0x1FFF, + QK_FUNCTION = 0x2000, + QK_FUNCTION_MAX = 0x2FFF, + QK_MACRO = 0x3000, + QK_MACRO_MAX = 0x3FFF, + QK_LAYER_TAP = 0x4000, + QK_LAYER_TAP_MAX = 0x4FFF, + QK_TO = 0x5000, + QK_TO_MAX = 0x50FF, + QK_MOMENTARY = 0x5100, + QK_MOMENTARY_MAX = 0x51FF, + QK_DEF_LAYER = 0x5200, + QK_DEF_LAYER_MAX = 0x52FF, + QK_TOGGLE_LAYER = 0x5300, + QK_TOGGLE_LAYER_MAX = 0x53FF, + QK_ONE_SHOT_LAYER = 0x5400, + QK_ONE_SHOT_LAYER_MAX = 0x54FF, + QK_ONE_SHOT_MOD = 0x5500, + QK_ONE_SHOT_MOD_MAX = 0x55FF, +#ifndef DISABLE_CHORDING + QK_CHORDING = 0x5600, + QK_CHORDING_MAX = 0x56FF, +#endif + QK_MOD_TAP = 0x6000, + QK_MOD_TAP_MAX = 0x6FFF, + QK_TAP_DANCE = 0x7100, + QK_TAP_DANCE_MAX = 0x71FF, +#ifdef UNICODEMAP_ENABLE + QK_UNICODE_MAP = 0x7800, + QK_UNICODE_MAP_MAX = 0x7FFF, +#endif +#ifdef UNICODE_ENABLE + QK_UNICODE = 0x8000, + QK_UNICODE_MAX = 0xFFFF, +#endif + + // Loose keycodes - to be used directly + + RESET = 0x7000, + DEBUG, + MAGIC_SWAP_CONTROL_CAPSLOCK, + MAGIC_CAPSLOCK_TO_CONTROL, + MAGIC_SWAP_LALT_LGUI, + MAGIC_SWAP_RALT_RGUI, + MAGIC_NO_GUI, + MAGIC_SWAP_GRAVE_ESC, + MAGIC_SWAP_BACKSLASH_BACKSPACE, + MAGIC_HOST_NKRO, + MAGIC_SWAP_ALT_GUI, + MAGIC_UNSWAP_CONTROL_CAPSLOCK, + MAGIC_UNCAPSLOCK_TO_CONTROL, + MAGIC_UNSWAP_LALT_LGUI, + MAGIC_UNSWAP_RALT_RGUI, + MAGIC_UNNO_GUI, + MAGIC_UNSWAP_GRAVE_ESC, + MAGIC_UNSWAP_BACKSLASH_BACKSPACE, + MAGIC_UNHOST_NKRO, + MAGIC_UNSWAP_ALT_GUI, + MAGIC_TOGGLE_NKRO, + + // Leader key +#ifndef DISABLE_LEADER + KC_LEAD, +#endif + + // Audio on/off/toggle + AU_ON, + AU_OFF, + AU_TOG, + + // Music mode on/off/toggle + MU_ON, + MU_OFF, + MU_TOG, + + // Music voice iterate + MUV_IN, + MUV_DE, + + // Midi mode on/off + MIDI_ON, + MIDI_OFF, + + // Backlight functionality + BL_0, + BL_1, + BL_2, + BL_3, + BL_4, + BL_5, + BL_6, + BL_7, + BL_8, + BL_9, + BL_10, + BL_11, + BL_12, + BL_13, + BL_14, + BL_15, + BL_DEC, + BL_INC, + BL_TOGG, + BL_STEP, + + // RGB functionality + RGB_TOG, + RGB_MOD, + RGB_HUI, + RGB_HUD, + RGB_SAI, + RGB_SAD, + RGB_VAI, + RGB_VAD, + + // Left shift, open paren + KC_LSPO, + + // Right shift, close paren + KC_RSPC, + + // Printing + PRINT_ON, + PRINT_OFF, + + // always leave at the end + SAFE_RANGE +}; + +// Ability to use mods in layouts +#define LCTL(kc) (kc | QK_LCTL) +#define LSFT(kc) (kc | QK_LSFT) +#define LALT(kc) (kc | QK_LALT) +#define LGUI(kc) (kc | QK_LGUI) +#define RCTL(kc) (kc | QK_RCTL) +#define RSFT(kc) (kc | QK_RSFT) +#define RALT(kc) (kc | QK_RALT) +#define RGUI(kc) (kc | QK_RGUI) + +#define HYPR(kc) (kc | QK_LCTL | QK_LSFT | QK_LALT | QK_LGUI) +#define MEH(kc) (kc | QK_LCTL | QK_LSFT | QK_LALT) +#define LCAG(kc) (kc | QK_LCTL | QK_LALT | QK_LGUI) +#define ALTG(kc) (kc | QK_RCTL | QK_RALT) + +#define MOD_HYPR 0xf +#define MOD_MEH 0x7 + + +// Aliases for shifted symbols +// Each key has a 4-letter code, and some have longer aliases too. +// While the long aliases are descriptive, the 4-letter codes +// make for nicer grid layouts (everything lines up), and are +// the preferred style for Quantum. +#define KC_TILD LSFT(KC_GRV) // ~ +#define KC_TILDE KC_TILD + +#define KC_EXLM LSFT(KC_1) // ! +#define KC_EXCLAIM KC_EXLM + +#define KC_AT LSFT(KC_2) // @ + +#define KC_HASH LSFT(KC_3) // # + +#define KC_DLR LSFT(KC_4) // $ +#define KC_DOLLAR KC_DLR + +#define KC_PERC LSFT(KC_5) // % +#define KC_PERCENT KC_PERC + +#define KC_CIRC LSFT(KC_6) // ^ +#define KC_CIRCUMFLEX KC_CIRC + +#define KC_AMPR LSFT(KC_7) // & +#define KC_AMPERSAND KC_AMPR + +#define KC_ASTR LSFT(KC_8) // * +#define KC_ASTERISK KC_ASTR + +#define KC_LPRN LSFT(KC_9) // ( +#define KC_LEFT_PAREN KC_LPRN + +#define KC_RPRN LSFT(KC_0) // ) +#define KC_RIGHT_PAREN KC_RPRN + +#define KC_UNDS LSFT(KC_MINS) // _ +#define KC_UNDERSCORE KC_UNDS + +#define KC_PLUS LSFT(KC_EQL) // + + +#define KC_LCBR LSFT(KC_LBRC) // { +#define KC_LEFT_CURLY_BRACE KC_LCBR + +#define KC_RCBR LSFT(KC_RBRC) // } +#define KC_RIGHT_CURLY_BRACE KC_RCBR + +#define KC_LABK LSFT(KC_COMM) // < +#define KC_LEFT_ANGLE_BRACKET KC_LABK + +#define KC_RABK LSFT(KC_DOT) // > +#define KC_RIGHT_ANGLE_BRACKET KC_RABK + +#define KC_COLN LSFT(KC_SCLN) // : +#define KC_COLON KC_COLN + +#define KC_PIPE LSFT(KC_BSLS) // | + +#define KC_LT LSFT(KC_COMM) // < + +#define KC_GT LSFT(KC_DOT) // > + +#define KC_QUES LSFT(KC_SLSH) // ? +#define KC_QUESTION KC_QUES + +#define KC_DQT LSFT(KC_QUOT) // " +#define KC_DOUBLE_QUOTE KC_DQT +#define KC_DQUO KC_DQT + +#define KC_DELT KC_DELETE // Del key (four letter code) + +// Alias for function layers than expand past FN31 +#define FUNC(kc) (kc | QK_FUNCTION) + +// Aliases +#define S(kc) LSFT(kc) +#define F(kc) FUNC(kc) + +#define M(kc) (kc | QK_MACRO) + +#define MACRODOWN(...) (record->event.pressed ? MACRO(__VA_ARGS__) : MACRO_NONE) + +// L-ayer, T-ap - 256 keycode max, 16 layer max +#define LT(layer, kc) (kc | QK_LAYER_TAP | ((layer & 0xF) << 8)) + +#define AG_SWAP MAGIC_SWAP_ALT_GUI +#define AG_NORM MAGIC_UNSWAP_ALT_GUI + +#define BL_ON BL_9 +#define BL_OFF BL_0 + +#define MI_ON MIDI_ON +#define MI_OFF MIDI_OFF + +// GOTO layer - 16 layers max +// when: +// ON_PRESS = 1 +// ON_RELEASE = 2 +// Unless you have a good reason not to do so, prefer ON_PRESS (1) as your default. +// In fact, we changed it to assume ON_PRESS for sanity/simplicity. If needed, you can add your own +// keycode modeled after the old version, kept below for this. +/* #define TO(layer, when) (layer | QK_TO | (when << 0x4)) */ +#define TO(layer) (layer | QK_TO | (ON_PRESS << 0x4)) + +// Momentary switch layer - 256 layer max +#define MO(layer) (layer | QK_MOMENTARY) + +// Set default layer - 256 layer max +#define DF(layer) (layer | QK_DEF_LAYER) + +// Toggle to layer - 256 layer max +#define TG(layer) (layer | QK_TOGGLE_LAYER) + +// One-shot layer - 256 layer max +#define OSL(layer) (layer | QK_ONE_SHOT_LAYER) + +// One-shot mod +#define OSM(mod) (mod | QK_ONE_SHOT_MOD) + +// M-od, T-ap - 256 keycode max +#define MT(mod, kc) (kc | QK_MOD_TAP | ((mod & 0xF) << 8)) +#define CTL_T(kc) MT(MOD_LCTL, kc) +#define SFT_T(kc) MT(MOD_LSFT, kc) +#define ALT_T(kc) MT(MOD_LALT, kc) +#define GUI_T(kc) MT(MOD_LGUI, kc) +#define C_S_T(kc) MT((MOD_LCTL | MOD_LSFT), kc) // Control + Shift e.g. for gnome-terminal +#define MEH_T(kc) MT((MOD_LCTL | MOD_LSFT | MOD_LALT), kc) // Meh is a less hyper version of the Hyper key -- doesn't include Win or Cmd, so just alt+shift+ctrl +#define LCAG_T(kc) MT((MOD_LCTL | MOD_LALT | MOD_LGUI), kc) // Left control alt and gui +#define ALL_T(kc) MT((MOD_LCTL | MOD_LSFT | MOD_LALT | MOD_LGUI), kc) // see http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/ + +// Dedicated keycode versions for Hyper and Meh, if you want to use them as standalone keys rather than mod-tap +#define KC_HYPR HYPR(KC_NO) +#define KC_MEH MEH(KC_NO) + +#ifdef UNICODE_ENABLE + // For sending unicode codes. + // You may not send codes over 7FFF -- this supports most of UTF8. + // To have a key that sends out Œ, go UC(0x0152) + #define UNICODE(n) (n | QK_UNICODE) + #define UC(n) UNICODE(n) +#endif + +#ifdef UNICODEMAP_ENABLE + #define X(n) (n | QK_UNICODE_MAP) +#endif + +#endif // QUANTUM_KEYCODES_H diff --git a/tmk_core/common/keycode.h b/tmk_core/common/keycode.h index 2f208c54e..54e9c322c 100644 --- a/tmk_core/common/keycode.h +++ b/tmk_core/common/keycode.h @@ -85,7 +85,7 @@ along with this program. If not, see . #define KC_LCAP KC_LOCKING_CAPS #define KC_LNUM KC_LOCKING_NUM #define KC_LSCR KC_LOCKING_SCROLL -#define KC_ERAS KC_ALT_ERASE, +#define KC_ERAS KC_ALT_ERASE #define KC_CLR KC_CLEAR /* Japanese specific */ #define KC_ZKHK KC_GRAVE -- cgit v1.2.3 From dd685eceb2045371d38f24d454f1ab08ca7416f4 Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Thu, 29 Dec 2016 12:13:30 +0200 Subject: API Sysex fixes Fix memory leaks by using stack instead of malloc Reduce memory usage by having less temporary bufffers Remove warnings by adding includes Decrease code size by 608 bytes (mostly due to not linking malloc) More robust handling of buffer overflows --- quantum/api/api_sysex.c | 60 +++++++++++++++++++++++++++++++------------ quantum/config_common.h | 2 ++ tmk_core/protocol/lufa/lufa.c | 32 +++++++++++++++-------- tmk_core/protocol/lufa/lufa.h | 4 ++- 4 files changed, 71 insertions(+), 27 deletions(-) diff --git a/quantum/api/api_sysex.c b/quantum/api/api_sysex.c index a4a554e76..868f854b9 100644 --- a/quantum/api/api_sysex.c +++ b/quantum/api/api_sysex.c @@ -1,4 +1,6 @@ #include "api_sysex.h" +#include "sysex_tools.h" +#include "print.h" void send_bytes_sysex(uint8_t message_type, uint8_t data_type, uint8_t * bytes, uint16_t length) { // SEND_STRING("\nTX: "); @@ -6,24 +8,50 @@ void send_bytes_sysex(uint8_t message_type, uint8_t data_type, uint8_t * bytes, // send_byte(bytes[i]); // SEND_STRING(" "); // } - uint8_t * precode = malloc(sizeof(uint8_t) * (length + 2)); - precode[0] = message_type; - precode[1] = data_type; - memcpy(precode + 2, bytes, length); - uint8_t * encoded = malloc(sizeof(uint8_t) * (sysex_encoded_length(length + 2))); - uint16_t encoded_length = sysex_encode(encoded, precode, length + 2); - uint8_t * array = malloc(sizeof(uint8_t) * (encoded_length + 5)); - array[0] = 0xF0; - array[1] = 0x00; - array[2] = 0x00; - array[3] = 0x00; - array[encoded_length + 4] = 0xF7; - memcpy(array + 4, encoded, encoded_length); - midi_send_array(&midi_device, encoded_length + 5, array); + if (length > API_SYSEX_MAX_SIZE) { + xprintf("Sysex msg too big %d %d %d", message_type, data_type, length); + return; + } + + + // The buffer size required is calculated as the following + // API_SYSEX_MAX_SIZE is the maximum length + // In addition to that we have a two byte message header consisting of the message_type and data_type + // This has to be encoded with an additional overhead of one byte for every starting 7 bytes + // We just add one extra byte in case it's not divisible by 7 + // Then we have an unencoded header consisting of 4 bytes + // Plus a one byte terminator + const unsigned message_header = 2; + const unsigned unencoded_message = API_SYSEX_MAX_SIZE + message_header; + const unsigned encoding_overhead = unencoded_message / 7 + 1; + const unsigned encoded_size = unencoded_message + encoding_overhead; + const unsigned unencoded_header = 4; + const unsigned terminator = 1; + const unsigned buffer_size = encoded_size + unencoded_header + terminator; + uint8_t buffer[encoded_size + unencoded_header + terminator]; + // The unencoded header + buffer[0] = 0xF0; + buffer[1] = 0x00; + buffer[2] = 0x00; + buffer[3] = 0x00; + + // We copy the message to the end of the array, this way we can do an inplace encoding, using the same + // buffer for both input and output + const unsigned message_size = length + message_header; + uint8_t* unencoded_start = buffer + buffer_size - message_size; + uint8_t* ptr = unencoded_start; + *(ptr++) = message_type; + *(ptr++) = data_type; + memcpy(ptr, bytes, length); + + unsigned encoded_length = sysex_encode(buffer + unencoded_header, unencoded_start, message_size); + unsigned final_size = unencoded_header + encoded_length + terminator; + buffer[final_size - 1] = 0xF7; + midi_send_array(&midi_device, final_size, buffer); // SEND_STRING("\nTD: "); // for (uint8_t i = 0; i < encoded_length + 5; i++) { - // send_byte(array[i]); + // send_byte(buffer[i]); // SEND_STRING(" "); // } -} \ No newline at end of file +} diff --git a/quantum/config_common.h b/quantum/config_common.h index 17c11faeb..4bdb2065d 100644 --- a/quantum/config_common.h +++ b/quantum/config_common.h @@ -80,4 +80,6 @@ # endif #endif +#define API_SYSEX_MAX_SIZE 32 + #endif diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index 097189770..6dd5959dc 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -1252,28 +1252,40 @@ void cc_callback(MidiDevice * device, // midi_send_cc(device, (chan + 1) % 16, num, val); } +#ifdef API_SYSEX_ENABLE uint8_t midi_buffer[MIDI_SYSEX_BUFFER] = {0}; +#endif void sysex_callback(MidiDevice * device, uint16_t start, uint8_t length, uint8_t * data) { #ifdef API_SYSEX_ENABLE // SEND_STRING("\n"); // send_word(start); // SEND_STRING(": "); + // Don't store the header + int16_t pos = start - 4; for (uint8_t place = 0; place < length; place++) { // send_byte(*data); - midi_buffer[start + place] = *data; - if (*data == 0xF7) { - // SEND_STRING("\nRD: "); - // for (uint8_t i = 0; i < start + place + 1; i++){ - // send_byte(midi_buffer[i]); - // SEND_STRING(" "); - // } - uint8_t * decoded = malloc(sizeof(uint8_t) * (sysex_decoded_length(start + place - 4))); - uint16_t decode_length = sysex_decode(decoded, midi_buffer + 4, start + place - 4); - process_api(decode_length, decoded); + if (pos >= 0) { + if (*data == 0xF7) { + // SEND_STRING("\nRD: "); + // for (uint8_t i = 0; i < start + place + 1; i++){ + // send_byte(midi_buffer[i]); + // SEND_STRING(" "); + // } + const unsigned decoded_length = sysex_decoded_length(pos); + uint8_t decoded[API_SYSEX_MAX_SIZE]; + sysex_decode(decoded, midi_buffer, pos); + process_api(decoded_length, decoded); + return; + } + else if (pos >= MIDI_SYSEX_BUFFER) { + return; + } + midi_buffer[pos] = *data; } // SEND_STRING(" "); data++; + pos++; } #endif } diff --git a/tmk_core/protocol/lufa/lufa.h b/tmk_core/protocol/lufa/lufa.h index b11854101..a049fd43c 100644 --- a/tmk_core/protocol/lufa/lufa.h +++ b/tmk_core/protocol/lufa/lufa.h @@ -70,7 +70,6 @@ typedef struct { #ifdef MIDI_ENABLE void MIDI_Task(void); MidiDevice midi_device; - #define MIDI_SYSEX_BUFFER 32 #endif #ifdef API_ENABLE @@ -79,6 +78,9 @@ typedef struct { #ifdef API_SYSEX_ENABLE #include "api_sysex.h" + // Allocate space for encoding overhead. + //The header and terminator are not stored to save a few bytes of precious ram + #define MIDI_SYSEX_BUFFER (API_SYSEX_MAX_SIZE + API_SYSEX_MAX_SIZE / 7 + (API_SYSEX_MAX_SIZE % 7 ? 1 : 0)) #endif // #if LUFA_VERSION_INTEGER < 0x120730 -- cgit v1.2.3 From 52430ef0d62ccb0135e030e158d99575c83b6ba3 Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Thu, 29 Dec 2016 12:26:41 +0200 Subject: Remove extra file that has been commited by mistake --- keyboards/planck/out.txt | 66 ------------------------------------------------ 1 file changed, 66 deletions(-) delete mode 100644 keyboards/planck/out.txt diff --git a/keyboards/planck/out.txt b/keyboards/planck/out.txt deleted file mode 100644 index 644a6a777..000000000 --- a/keyboards/planck/out.txt +++ /dev/null @@ -1,66 +0,0 @@ --------- begin -------- -avr-gcc.exe (AVR_8_bit_GNU_Toolchain_3.5.0_1662) 4.9.2 -Copyright (C) 2014 Free Software Foundation, Inc. -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -Compiling: ../../keyboards/planck/planck.c [OK] -Compiling: ../../keyboards/planck/keymaps/experimental/keymap.c [WARNINGS] - | - | ../../keyboards/planck/keymaps/experimental/keymap.c: In function 'action_get_macro': - | ../../keyboards/planck/keymaps/experimental/keymap.c:227:17: warning: implicit declaration of function 'breathing_speed_set' [-Wimplicit-function-declaration] - | breathing_speed_set(2); - | ^ - | ../../keyboards/planck/keymaps/experimental/keymap.c:228:17: warning: implicit declaration of function 'breathing_pulse' [-Wimplicit-function-declaration] - | breathing_pulse(); - | ^ - | -Compiling: ../../quantum/quantum.c [OK] -Compiling: ../../quantum/keymap.c [OK] -Compiling: ../../quantum/keycode_config.c [OK] -Compiling: ../../quantum/matrix.c [OK] -Compiling: ../../quantum/audio/audio.c [OK] -Compiling: ../../quantum/audio/voices.c [OK] -Compiling: ../../quantum/audio/luts.c [OK] -Compiling: ../../tmk_core/protocol/lufa/lufa.c [OK] -Compiling: ../../tmk_core/protocol/lufa/descriptor.c [OK] -Compiling: ../../tmk_core/protocol/lufa/LUFA-git/LUFA/Drivers/USB/Class/Common/HIDParser.c [OK] -Compiling: ../../tmk_core/protocol/lufa/LUFA-git/LUFA/Drivers/USB/Core/AVR8/Device_AVR8.c [OK] -Compiling: ../../tmk_core/protocol/lufa/LUFA-git/LUFA/Drivers/USB/Core/AVR8/EndpointStream_AVR8.c [OK] -Compiling: ../../tmk_core/protocol/lufa/LUFA-git/LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.c [OK] -Compiling: ../../tmk_core/protocol/lufa/LUFA-git/LUFA/Drivers/USB/Core/AVR8/Host_AVR8.c [OK] -Compiling: ../../tmk_core/protocol/lufa/LUFA-git/LUFA/Drivers/USB/Core/AVR8/PipeStream_AVR8.c [OK] -Compiling: ../../tmk_core/protocol/lufa/LUFA-git/LUFA/Drivers/USB/Core/AVR8/Pipe_AVR8.c [OK] -Compiling: ../../tmk_core/protocol/lufa/LUFA-git/LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.c [OK] -Compiling: ../../tmk_core/protocol/lufa/LUFA-git/LUFA/Drivers/USB/Core/AVR8/USBInterrupt_AVR8.c [OK] -Compiling: ../../tmk_core/protocol/lufa/LUFA-git/LUFA/Drivers/USB/Core/ConfigDescriptors.c [OK] -Compiling: ../../tmk_core/protocol/lufa/LUFA-git/LUFA/Drivers/USB/Core/DeviceStandardReq.c [OK] -Compiling: ../../tmk_core/protocol/lufa/LUFA-git/LUFA/Drivers/USB/Core/Events.c [OK] -Compiling: ../../tmk_core/protocol/lufa/LUFA-git/LUFA/Drivers/USB/Core/HostStandardReq.c [OK] -Compiling: ../../tmk_core/protocol/lufa/LUFA-git/LUFA/Drivers/USB/Core/USBTask.c [OK] -Compiling: ../../tmk_core/common/host.c [OK] -Compiling: ../../tmk_core/common/keyboard.c [OK] -Compiling: ../../tmk_core/common/action.c [OK] -Compiling: ../../tmk_core/common/action_tapping.c [OK] -Compiling: ../../tmk_core/common/action_macro.c [OK] -Compiling: ../../tmk_core/common/action_layer.c [OK] -Compiling: ../../tmk_core/common/action_util.c [OK] -Compiling: ../../tmk_core/common/print.c [OK] -Compiling: ../../tmk_core/common/debug.c [OK] -Compiling: ../../tmk_core/common/util.c [OK] -Compiling: ../../tmk_core/common/avr/suspend.c [OK] -Assembling: ../../tmk_core/common/avr/xprintf.S [OK] -Compiling: ../../tmk_core/common/avr/timer.c [OK] -Compiling: ../../tmk_core/common/avr/bootloader.c [OK] -Compiling: ../../tmk_core/common/magic.c [OK] -Compiling: ../../tmk_core/common/avr/eeconfig.c [OK] -Compiling: ../../tmk_core/common/mousekey.c [OK] -Compiling: ../../tmk_core/common/command.c [OK] -Compiling: ../../tmk_core/common/backlight.c [OK] -Linking: .build/planck_experimental.elf [ERRORS] - | - | .build/obj_planck_experimental/keyboards/planck/keymaps/experimental/keymap.o: In function `action_get_macro': - | C:\Users\Fred Wales\Documents\Programming\qmk_firmware\keyboards\planck/../../keyboards/planck/keymaps/experimental/keymap.c:240: undefined reference to `breathing_speed_set' - | C:\Users\Fred Wales\Documents\Programming\qmk_firmware\keyboards\planck/../../keyboards/planck/keymaps/experimental/keymap.c:241: undefined reference to `breathing_pulse' - | collect2.exe: error: ld returned 1 exit status - | -- cgit v1.2.3 From 2acfd2ab2b445e4f7b40fed099a9c53ce88917e5 Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Thu, 29 Dec 2016 14:56:01 +0200 Subject: Remove extra parenthesis from Makefile Cygwin had trouble running the tests --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index aa33c40f1..9e81b1d49 100644 --- a/Makefile +++ b/Makefile @@ -473,7 +473,7 @@ if [ $$error_occured -gt 0 ]; then echo $$error_occured > $(ERROR_FILE); fi; endef define RUN_TEST +error_occured=0;\ -$($(TEST)_COMMAND))\ +$($(TEST)_COMMAND)\ if [ $$error_occured -gt 0 ]; then echo $$error_occured > $(ERROR_FILE); fi; endef -- cgit v1.2.3 From 1d1f2b4ee2447bee94552cad8288757e093d900b Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Thu, 29 Dec 2016 15:20:43 +0200 Subject: Clean up the SKIP_GIT code --- Makefile | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/Makefile b/Makefile index 9e81b1d49..9cc77c55c 100644 --- a/Makefile +++ b/Makefile @@ -485,11 +485,11 @@ $(SUBPROJECTS): %: %-allkm # Let's match everything, we handle all the rule parsing ourselves .PHONY: % -ifndef SKIP_GIT %: # Check if we have the CMP tool installed cmp --version >/dev/null 2>&1; if [ $$? -gt 0 ]; then printf "$(MSG_NO_CMP)"; exit 1; fi; # Check if the submodules are dirty, and display a warning if they are +ifndef SKIP_GIT git submodule status --recursive 2>/dev/null | \ while IFS= read -r x; do \ case "$$x" in \ @@ -497,6 +497,7 @@ ifndef SKIP_GIT *) printf "$(MSG_SUBMODULE_DIRTY)";break;; \ esac \ done +endif rm -f $(ERROR_FILE) > /dev/null 2>&1 $(eval $(call PARSE_RULE,$@)) $(eval $(call SET_SILENT_MODE)) @@ -508,22 +509,6 @@ ifndef SKIP_GIT if [ -f $(ERROR_FILE) ]; then printf "$(MSG_ERRORS)" & exit 1; fi; $(foreach TEST,$(TESTS),$(RUN_TEST)) if [ -f $(ERROR_FILE) ]; then printf "$(MSG_ERRORS)" & exit 1; fi; -else -%: - # Check if we have the CMP tool installed - cmp --version >/dev/null 2>&1; if [ $$? -gt 0 ]; then printf "$(MSG_NO_CMP)"; exit 1; fi; - rm -f $(ERROR_FILE) > /dev/null 2>&1 - $(eval $(call PARSE_RULE,$@)) - $(eval $(call SET_SILENT_MODE)) - # Run all the commands in the same shell, notice the + at the first line - # it has to be there to allow parallel execution of the submake - # This always tries to compile everything, even if error occurs in the middle - # But we return the error code at the end, to trigger travis failures - $(foreach COMMAND,$(COMMANDS),$(RUN_COMMAND)) - if [ -f $(ERROR_FILE) ]; then printf "$(MSG_ERRORS)" & exit 1; fi; - $(foreach TEST,$(TESTS),$(RUN_TEST)) - if [ -f $(ERROR_FILE) ]; then printf "$(MSG_ERRORS)" & exit 1; fi; -endif # All should compile everything .PHONY: all -- cgit v1.2.3 From b8e74c378b1f118178edf0634d9fa7f0f9dd5e08 Mon Sep 17 00:00:00 2001 From: Scott Wilson Date: Thu, 29 Dec 2016 09:32:02 -0500 Subject: Removed errant + --- quantum/rgblight.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quantum/rgblight.c b/quantum/rgblight.c index 0f7a1d828..52a09817a 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -370,7 +370,7 @@ void rgblight_setrgb(uint8_t r, uint8_t g, uint8_t b) { rgblight_set(); } -+__attribute__ ((weak)) +__attribute__ ((weak)) void rgblight_set(void) { if (rgblight_config.enable) { #ifdef RGBW -- cgit v1.2.3 From 925ed44405c979f0b37e9d12bb088738cd33e04e Mon Sep 17 00:00:00 2001 From: TerryMathews Date: Sat, 31 Dec 2016 13:19:05 -0500 Subject: Establish support for AMJPAD --- keyboards/amjpad/Makefile | 3 + keyboards/amjpad/amjpad.c | 30 +++++++++ keyboards/amjpad/amjpad.h | 46 ++++++++++++++ keyboards/amjpad/config.h | 94 +++++++++++++++++++++++++++ keyboards/amjpad/keymaps/default/keymap.c | 101 ++++++++++++++++++++++++++++++ keyboards/amjpad/rules.mk | 66 +++++++++++++++++++ 6 files changed, 340 insertions(+) create mode 100644 keyboards/amjpad/Makefile create mode 100644 keyboards/amjpad/amjpad.c create mode 100644 keyboards/amjpad/amjpad.h create mode 100644 keyboards/amjpad/config.h create mode 100644 keyboards/amjpad/keymaps/default/keymap.c create mode 100644 keyboards/amjpad/rules.mk diff --git a/keyboards/amjpad/Makefile b/keyboards/amjpad/Makefile new file mode 100644 index 000000000..4e2a6f00f --- /dev/null +++ b/keyboards/amjpad/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif \ No newline at end of file diff --git a/keyboards/amjpad/amjpad.c b/keyboards/amjpad/amjpad.c new file mode 100644 index 000000000..ac5991bd0 --- /dev/null +++ b/keyboards/amjpad/amjpad.c @@ -0,0 +1,30 @@ +#include "amjpad.h" +#include "led.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + matrix_init_user(); + led_init_ports(); +}; + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + matrix_scan_user(); +}; + +void led_init_ports(void) { + // * Set our LED pins as output + DDRD |= (1<<6); +} + +void led_set_kb(uint8_t usb_led) { + if (usb_led & (1< + +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 0x0003 +#define MANUFACTURER AMJ +#define PRODUCT PAD +#define DESCRIPTION QMK keyboard firmware for AMJ PAD + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 4 + +// ROWS: Top to bottom, COLS: Left to right + +#define MATRIX_ROW_PINS { F7, F6, F5, F4, D5, D0 } +#define MATRIX_COL_PINS { F1, F0, E6, C7 } +#define UNUSED_PINS + +#define BACKLIGHT_PIN B6 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* 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 command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* Backlight configuration + */ +#define BACKLIGHT_LEVELS 4 + +/* Underlight configuration + */ + +#define RGB_DI_PIN E2 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 8 // Number of LEDs +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/amjpad/keymaps/default/keymap.c b/keyboards/amjpad/keymaps/default/keymap.c new file mode 100644 index 000000000..362afd107 --- /dev/null +++ b/keyboards/amjpad/keymaps/default/keymap.c @@ -0,0 +1,101 @@ +#include "amjpad.h" + +#ifdef RGBLIGHT_ENABLE +#include "rgblight.h" +#endif + +// Used for SHIFT_ESC +#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) + +// 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 _BL 0 +#define _FL 1 + +#define _______ KC_TRNS + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: (Base Layer) Default Layer + * ,-------------------. + * |Esc |TAB |BS | = | + * |----|----|----|----| + * | NL | / | * | - | + * |----|----|----|----| + * | 7 | 8 | 9 | | + * |----|----|----| + | + * | 4 | 5 | 6 | | + * |----|----|----|----| + * | 1 | 2 | 3 | | + * |----|----|----| En | + * | 0 |./FN| | + * `-------------------' + */ + +[_BL] = KEYMAP( + KC_ESC,KC_TAB,KC_BSPC,KC_PEQL, \ + KC_NLCK,KC_PSLS,KC_PAST,KC_PMNS, \ + KC_P7, KC_P8, KC_P9, KC_PPLS, \ + KC_P4, KC_P5, KC_P6, \ + KC_P1, KC_P2, KC_P3, KC_PENT, \ + KC_P0, LT(_FL,KC_PDOT)), + + /* Keymap _FL: Function Layer + * ,-------------------. + * |Esc |TAB |BS | = | + * |----|----|----|----| + * | NL | / | * | - | + * |----|----|----|----| + * | 7 | 8 | 9 | | + * |----|----|----|RST | + * | 4 | 5 | 6 | | + * |----|----|----|----| + * | 1 | 2 | 3 | | + * |----|----|----| En | + * | 0 |./FN| | + * `-------------------' + */ +[_FL] = KEYMAP( + + KC_ESC,KC_TAB,KC_BSPC,KC_PEQL, \ + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ + KC_P7, KC_P8, KC_P9, RESET, \ + KC_P4, KC_P5, KC_P6, \ + KC_P1, KC_P2, KC_P3, KC_PENT, \ + KC_P0, LT(_FL,KC_PDOT)), +}; + +enum function_id { + SHIFT_ESC, +}; + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_FUNCTION(SHIFT_ESC), +}; + +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { + static uint8_t shift_esc_shift_mask; + switch (id) { + case SHIFT_ESC: + shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; + if (record->event.pressed) { + if (shift_esc_shift_mask) { + add_key(KC_GRV); + send_keyboard_report(); + } else { + add_key(KC_ESC); + send_keyboard_report(); + } + } else { + if (shift_esc_shift_mask) { + del_key(KC_GRV); + send_keyboard_report(); + } else { + del_key(KC_ESC); + send_keyboard_report(); + } + } + break; + } +} diff --git a/keyboards/amjpad/rules.mk b/keyboards/amjpad/rules.mk new file mode 100644 index 000000000..d8ec42365 --- /dev/null +++ b/keyboards/amjpad/rules.mk @@ -0,0 +1,66 @@ + +# 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 +# comment out to disable the options. +# +BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= no # 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 # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +RGBLIGHT_ENABLE ?= no # Enable keyboard underlight functionality (+4870) +BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality (+1150) +MIDI_ENABLE ?= no # MIDI controls +AUDIO_ENABLE ?= no +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID -- cgit v1.2.3 From 0aa413af44b292e4b44d8f8aee1a92f2cb113438 Mon Sep 17 00:00:00 2001 From: Jonas Oberschweiber Date: Sat, 31 Dec 2016 19:37:56 +0100 Subject: Add support for supplementary planes for OS X --- quantum/process_keycode/process_unicode.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/quantum/process_keycode/process_unicode.c b/quantum/process_keycode/process_unicode.c index cd3a610b4..2606cf0c8 100644 --- a/quantum/process_keycode/process_unicode.c +++ b/quantum/process_keycode/process_unicode.c @@ -116,7 +116,16 @@ bool process_unicode_map(uint16_t keycode, keyrecord_t *record) { const uint32_t* map = unicode_map; uint16_t index = keycode & 0x7FF; uint32_t code = pgm_read_dword_far(&map[index]); - if ((code > 0xFFFF && input_mode == UC_OSX) || (code > 0xFFFFF && input_mode == UC_LNX)) { + if (code > 0xFFFF && code <= 0x10ffff && input_mode == UC_OSX) { + // Convert to UTF-16 surrogate pair + code -= 0x10000; + uint32_t lo = code & 0x3ff; + uint32_t hi = (code & 0xffc00) >> 10; + unicode_input_start(); + register_hex32(hi + 0xd800); + register_hex32(lo + 0xdc00); + unicode_input_finish(); + } else if ((code > 0x10ffff && input_mode == UC_OSX) || (code > 0xFFFFF && input_mode == UC_LNX)) { // when character is out of range supported by the OS unicode_map_input_error(); } else { -- cgit v1.2.3 From acffbb480f616f87889698230c35284cc54c45dd Mon Sep 17 00:00:00 2001 From: Daniel Date: Sun, 1 Jan 2017 20:09:30 -0700 Subject: adds dedicated double-quote key. --- keyboards/ergodox/keymaps/common-nighthawk/keymap.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/keyboards/ergodox/keymaps/common-nighthawk/keymap.c b/keyboards/ergodox/keymaps/common-nighthawk/keymap.c index 5a1e46b7b..debf384f3 100644 --- a/keyboards/ergodox/keymaps/common-nighthawk/keymap.c +++ b/keyboards/ergodox/keymaps/common-nighthawk/keymap.c @@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // left hand KC_UNDS, KC_1, KC_1, KC_UNDS, KC_ESC, ALL_T(KC_NO), KC_HOME, CTL_T(KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_UP, - GUI_T(KC_QUOT), KC_A, KC_S, KC_D, KC_F, KC_G, + M(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_DOWN, KC_LALT, KC_1, KC_1, KC_1, KC_LEFT, RESET, KC_VOLU, @@ -166,13 +166,17 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case 1: if (record->event.pressed) { sunds_timer = timer_read(); - register_code (KC_LSFT); + register_code (KC_LGUI); } else { if (timer_elapsed (sunds_timer) < TAPPING_TERM) { - register_code (KC_MINS); - unregister_code (KC_MINS); + unregister_code (KC_LGUI); + register_code (KC_LSFT); + register_code (KC_QUOT); + unregister_code (KC_QUOT); + unregister_code (KC_LSFT); + register_code (KC_LGUI); } - unregister_code (KC_LSFT); + unregister_code (KC_LGUI); } break; -- cgit v1.2.3 From 0de3a5d0b251132be367474a8439cfb986019a58 Mon Sep 17 00:00:00 2001 From: Daniel Date: Sun, 1 Jan 2017 20:55:10 -0700 Subject: reverts change outside of personal keymap. --- keyboards/ergodox/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/keyboards/ergodox/Makefile b/keyboards/ergodox/Makefile index 0dc0a7725..716535005 100644 --- a/keyboards/ergodox/Makefile +++ b/keyboards/ergodox/Makefile @@ -1,6 +1,5 @@ SUBPROJECT_DEFAULT = ez -TAP_DANCE_ENABLE = yes ifndef MAKEFILE_INCLUDED include ../../Makefile -endif +endif \ No newline at end of file -- cgit v1.2.3 From ffc1d97672bcfcf9d7b687025cb70e284c75fd67 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Mon, 2 Jan 2017 09:57:39 -0500 Subject: Update config.h --- keyboards/ergodox/ez/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/ergodox/ez/config.h b/keyboards/ergodox/ez/config.h index 2e273eb97..6a8c66d7d 100644 --- a/keyboards/ergodox/ez/config.h +++ b/keyboards/ergodox/ez/config.h @@ -57,7 +57,7 @@ along with this program. If not, see . /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 -#define USB_MAX_POWER_CONSUMPTION 50 +#define USB_MAX_POWER_CONSUMPTION 500 /* * Feature disable options -- cgit v1.2.3 From b23a963becf9a77f59130e015fcd226db2068849 Mon Sep 17 00:00:00 2001 From: Brendan Johan Lee Date: Mon, 2 Jan 2017 19:12:06 +0100 Subject: Added the deadcyclo layout --- keyboards/ergodox/keymaps/deadcyclo/keymap.c | 273 ++++++++++++++++++++++++++ keyboards/ergodox/keymaps/deadcyclo/readme.md | 10 + 2 files changed, 283 insertions(+) create mode 100644 keyboards/ergodox/keymaps/deadcyclo/keymap.c create mode 100644 keyboards/ergodox/keymaps/deadcyclo/readme.md diff --git a/keyboards/ergodox/keymaps/deadcyclo/keymap.c b/keyboards/ergodox/keymaps/deadcyclo/keymap.c new file mode 100644 index 000000000..edd8ca6e1 --- /dev/null +++ b/keyboards/ergodox/keymaps/deadcyclo/keymap.c @@ -0,0 +1,273 @@ +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" +#include "version.h" + +#define BASE 0 // default layer +#define SYMB 1 // symbols +#define MDIA 2 // media keys +#define NAVG 3 // navigation + +enum custom_keycodes { + PLACEHOLDER = SAFE_RANGE, // can always be here + EPRM, + VRSN, + RGB_SLD +}; + +// TODO: Get rid of of keys I don't want. Make others that I do. Set up lots of makros (Using hyper (and meh)) keys (where to put them?) +// TODO: Need to change hotkeys for lastpass, and potentially make my own keys for them on one of my layers +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | Esc/L3 | 1 | 2 | 3 | 4 | 5 | 6 | | 6 | 7 | 8 | 9 | 0 | - | =/L3 | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab/L1 | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \/L1 | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | LCtrl | A | S | D | F | G |------| |------| H | J | K | L |; / L2| ctrl/'| + * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| + * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |Grv/L1| '" |AltShf| Lalt | Ralt | | Lalt | Ralt | [ | ] | ~/L1 | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | App | Home | | PgUp | Ins | + * ,------|------|------| |------+--------+------. + * | | | End | | PgDn | | | + * | Space| TAB |------| |------| BSPC |Enter | + * | | | [ | | ] | | | + * `--------------------' `----------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[BASE] = KEYMAP( // layer 0 : default + // left hand + LT(NAVG,KC_ESC), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, + LT(SYMB,KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), + LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_RALT,KC_LALT, + ALT_T(KC_APP), KC_HOME, + KC_END, + KC_SPC,KC_TAB,KC_LBRC, + // right hand + KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, LT(NAVG,KC_EQL), + TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, LT(SYMB, KC_BSLS), + KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),CTL_T(KC_QUOT), + MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, + KC_LALT, KC_RALT,KC_LBRC,KC_RBRC, LT(SYMB,KC_TILD), + KC_PGUP, KC_INS, + KC_PGDN, + KC_RBRC,KC_BSPC, KC_ENT + ), +/* Keymap 1: Symbol Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | . | 0 | = | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| DEL | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[SYMB] = KEYMAP( + // left hand + KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, + KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV, + KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + // right hand + KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_TRNS, + KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS, + KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, + KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_DEL, KC_TRNS +), +/* Keymap 2: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | MsUp | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | Prev | Next | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | |Brwser| + * | | |------| |------| |Back | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// MEDIA AND MOUSE +[MDIA] = KEYMAP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_WBAK +), + +/* Keymap 3: Navigation TODO: Printscreen, pg up down, home, end, others? Insert for example + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | Version| | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | up | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | left | down | right| |------| |------| | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// NAVIGATION +[NAVG] = KEYMAP( + VRSN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, 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, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, 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 +), +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + break; + case 1: + if (record->event.pressed) { // For resetting EEPROM + eeconfig_init(); + } + break; + } + return MACRO_NONE; +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + // dynamically generate these. + case EPRM: + if (record->event.pressed) { + eeconfig_init(); + } + return false; + break; + case VRSN: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + break; + case RGB_SLD: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + rgblight_mode(1); + #endif + } + return false; + break; + } + return true; +} + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + case 3: + ergodox_right_led_3_on(); + break; + case 4: + ergodox_right_led_1_on(); // TODO: Make a fourth layer + ergodox_right_led_3_on(); + break; + default: + // none + break; + } + +}; diff --git a/keyboards/ergodox/keymaps/deadcyclo/readme.md b/keyboards/ergodox/keymaps/deadcyclo/readme.md new file mode 100644 index 000000000..915507440 --- /dev/null +++ b/keyboards/ergodox/keymaps/deadcyclo/readme.md @@ -0,0 +1,10 @@ +# ErgoDox EZ 1337 configuration + +Custom layout based on the default layout. Intended for interational users of us intl-altgr layout. Note that +some common keys might be missing, as this layout is intented to be used on *nix systems by users familiar +with their system. The layout is geared towards avoiding using the rat (mouse for those of you who are +unfamiliar with tiling window managers) as much as possibly. + +# Changelog + +- 02.01.2017 Added delete key on second layer -- cgit v1.2.3 From a85aefd27af5d890d9e2dbf25513b84bfef8dfb0 Mon Sep 17 00:00:00 2001 From: Brendan Johan Lee Date: Tue, 3 Jan 2017 15:09:25 +0100 Subject: fix version macro making layer 3 sticky on deadcyclo layout --- keyboards/ergodox/keymaps/deadcyclo/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/ergodox/keymaps/deadcyclo/keymap.c b/keyboards/ergodox/keymaps/deadcyclo/keymap.c index edd8ca6e1..d75c805bf 100644 --- a/keyboards/ergodox/keymaps/deadcyclo/keymap.c +++ b/keyboards/ergodox/keymaps/deadcyclo/keymap.c @@ -148,7 +148,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 3: Navigation TODO: Printscreen, pg up down, home, end, others? Insert for example * * ,--------------------------------------------------. ,--------------------------------------------------. - * | Version| | | | | | | | | | | | | | | + * | | VER | | | | | | | | | | | | | | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * | | | | up | | | | | | | | | | | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| @@ -168,7 +168,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // NAVIGATION [NAVG] = KEYMAP( - VRSN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, VRSN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, -- cgit v1.2.3 From 8377d5fdc57ab0a4f1757d9f787592ede1b94cfe Mon Sep 17 00:00:00 2001 From: Kaleb Elwert Date: Tue, 3 Jan 2017 23:41:52 -0800 Subject: Initial whitefox support --- keyboards/whitefox/Makefile | 3 + keyboards/whitefox/bootloader_defs.h | 1 + keyboards/whitefox/chconf.h | 524 ++++++++++++++++++++++++++++ keyboards/whitefox/config.h | 78 +++++ keyboards/whitefox/halconf.h | 353 +++++++++++++++++++ keyboards/whitefox/keymaps/default/keymap.c | 51 +++ keyboards/whitefox/keymaps/matt3o/keymap.c | 92 +++++ keyboards/whitefox/led.c | 24 ++ keyboards/whitefox/matrix.c | 132 +++++++ keyboards/whitefox/mcuconf.h | 66 ++++ keyboards/whitefox/rules.mk | 68 ++++ keyboards/whitefox/whitefox.c | 17 + keyboards/whitefox/whitefox.h | 54 +++ 13 files changed, 1463 insertions(+) create mode 100644 keyboards/whitefox/Makefile create mode 100644 keyboards/whitefox/bootloader_defs.h create mode 100644 keyboards/whitefox/chconf.h create mode 100644 keyboards/whitefox/config.h create mode 100644 keyboards/whitefox/halconf.h create mode 100644 keyboards/whitefox/keymaps/default/keymap.c create mode 100644 keyboards/whitefox/keymaps/matt3o/keymap.c create mode 100644 keyboards/whitefox/led.c create mode 100644 keyboards/whitefox/matrix.c create mode 100644 keyboards/whitefox/mcuconf.h create mode 100644 keyboards/whitefox/rules.mk create mode 100644 keyboards/whitefox/whitefox.c create mode 100644 keyboards/whitefox/whitefox.h diff --git a/keyboards/whitefox/Makefile b/keyboards/whitefox/Makefile new file mode 100644 index 000000000..4e2a6f00f --- /dev/null +++ b/keyboards/whitefox/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif \ No newline at end of file diff --git a/keyboards/whitefox/bootloader_defs.h b/keyboards/whitefox/bootloader_defs.h new file mode 100644 index 000000000..c67153be6 --- /dev/null +++ b/keyboards/whitefox/bootloader_defs.h @@ -0,0 +1 @@ +#define KIIBOHD_BOOTLOADER diff --git a/keyboards/whitefox/chconf.h b/keyboards/whitefox/chconf.h new file mode 100644 index 000000000..43c845739 --- /dev/null +++ b/keyboards/whitefox/chconf.h @@ -0,0 +1,524 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#define CH_CFG_ST_RESOLUTION 32 + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#define CH_CFG_ST_FREQUENCY 1000 + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#define CH_CFG_ST_TIMEDELTA 0 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#define CH_CFG_TIME_QUANTUM 20 + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#define CH_CFG_MEMCORE_SIZE 0 + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#define CH_CFG_NO_IDLE_THREAD FALSE + +/* Use __WFI in the idle thread for waiting. Does lower the power + * consumption. */ +#define CORTEX_ENABLE_WFI_IDLE TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#define CH_CFG_OPTIMIZE_SPEED TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_TM FALSE + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_REGISTRY TRUE + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_WAITEXIT TRUE + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_SEMAPHORES TRUE + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MUTEXES TRUE + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_CONDVARS TRUE + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_EVENTS TRUE + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MESSAGES TRUE + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_MAILBOXES TRUE + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMCORE TRUE + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#define CH_CFG_USE_HEAP TRUE + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMPOOLS TRUE + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#define CH_CFG_USE_DYNAMIC TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_STATISTICS FALSE + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_SYSTEM_STATE_CHECK FALSE + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_CHECKS FALSE + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_ASSERTS FALSE + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_BUFFER_SIZE 128 + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#define CH_DBG_ENABLE_STACK_CHECK FALSE + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_FILL_THREADS FALSE + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#define CH_DBG_THREADS_PROFILING FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p chThdInit() API. + * + * @note It is invoked from within @p chThdInit() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/keyboards/whitefox/config.h b/keyboards/whitefox/config.h new file mode 100644 index 000000000..b7116341f --- /dev/null +++ b/keyboards/whitefox/config.h @@ -0,0 +1,78 @@ +/* +Copyright 2015 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 + +#define PREVENT_STUCK_MODIFIERS + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0F0F +#define DEVICE_VER 0x0001 +/* in python2: list(u"whatever".encode('utf-16-le')) */ +/* at most 32 characters or the ugly hack in usb_main.c borks */ +#define MANUFACTURER "Input Club" +#define USBSTR_MANUFACTURER 'I', '\x00', 'n', '\x00', 'p', '\x00', 'u', '\x00', 't', '\x00', ' ', '\x00', 'C', '\x00', 'l', '\x00', 'u', '\x00', 'b', '\x00' +#define PRODUCT "WhiteFox/QMK" +#define USBSTR_PRODUCT 'W', '\x00', 'h', '\x00', 'i', '\x00', 't', '\x00', 'e', '\x00', 'F', '\x00', 'o', '\x00', 'x', '\x00', ' ', '\x00' + +/* key matrix size */ +#define MATRIX_ROWS 9 +#define MATRIX_COLS 8 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 6 + +/* 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 command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* Keymap for Infinity prototype */ +//#define INFINITY_PROTOTYPE + +/* Keymap for Infinity 1.1a (first revision with LED support) */ +//#define INFINITY_LED + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/whitefox/halconf.h b/keyboards/whitefox/halconf.h new file mode 100644 index 000000000..46b37a4f4 --- /dev/null +++ b/keyboards/whitefox/halconf.h @@ -0,0 +1,353 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef _HALCONF_H_ +#define _HALCONF_H_ + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the EXT subsystem. + */ +#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) +#define HAL_USE_EXT FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT FALSE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C FALSE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM FALSE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB TRUE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 256 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +#endif /* _HALCONF_H_ */ + +/** @} */ diff --git a/keyboards/whitefox/keymaps/default/keymap.c b/keyboards/whitefox/keymaps/default/keymap.c new file mode 100644 index 000000000..426b226a0 --- /dev/null +++ b/keyboards/whitefox/keymaps/default/keymap.c @@ -0,0 +1,51 @@ +/* +Copyright 2015 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 . +*/ +#include "whitefox.h" + +const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Layer 0: Default Layer + * ,---------------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `|Ins| + * |---------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]|Backs|Del| + * |---------------------------------------------------------------| + * |CapsLo| A| S| D| F| G| H| J| K| L| ;| '|Enter |PgU| + * |---------------------------------------------------------------| + * |Shif| | Z| X| C| V| B| N| M| ,| .| /|Shift |Up |PgD| + * |---------------------------------------------------------------| + * |Ctrl|Gui |Alt | Space |Fn0 |Alt |Gui | |Lef|Dow|Rig| + * `---------------------------------------------------------------' + */ + [0] = KEYMAP( \ + ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSLS,GRV, INS, \ + TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSPC, DEL, \ + CAPS,A, S, D, F, G, H, J, K, L, SCLN,QUOT,NUHS,ENT, PGUP,\ + LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH,RSFT, UP, PGDN,\ + LCTL,LGUI,LALT, SPC, RALT,FN0, RCTL, LEFT,DOWN,RGHT \ + ), + [1] = KEYMAP( \ + TRNS,F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS,TRNS,MUTE,\ + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PSCR,SLCK,PAUS,TRNS, TRNS,\ + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, VOLU,\ + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, PGUP,VOLD,\ + TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS, HOME,PGDN,END \ + ), +}; + +const uint16_t fn_actions[] = { + [0] = ACTION_LAYER_MOMENTARY(1), +}; diff --git a/keyboards/whitefox/keymaps/matt3o/keymap.c b/keyboards/whitefox/keymaps/matt3o/keymap.c new file mode 100644 index 000000000..ecadcd284 --- /dev/null +++ b/keyboards/whitefox/keymaps/matt3o/keymap.c @@ -0,0 +1,92 @@ +/* +Copyright 2015 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 . +*/ +#include "whitefox.h" + +const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Layer 0: Default Layer + * ,---------------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `|Ins| + * |---------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]|Backs|Del| + * |---------------------------------------------------------------| + * |CapsLo| A| S| D| F| G| H| J| K| L| ;| '|Enter |PgU| + * |---------------------------------------------------------------| + * |Shif| | Z| X| C| V| B| N| M| ,| .| /|Shift |Up |PgD| + * |---------------------------------------------------------------| + * |Ctrl|Gui |Alt | Space |Fn0 |Alt |Gui | |Lef|Dow|Rig| + * `---------------------------------------------------------------' + */ + [0] = KEYMAP( \ + ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSLS,GRV, MUTE,\ + TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSPC, DEL, \ + FN0, A, S, D, F, G, H, J, K, L, SCLN,QUOT,NUHS,ENT, PGUP,\ + LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH,RSFT, UP, PGDN,\ + LCTL,LGUI,LALT, SPC, RALT,FN1, RCTL, LEFT,DOWN,RGHT \ + ), + [1] = KEYMAP( \ + TRNS,F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS,TRNS,TRNS,\ + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,DEL , INS ,\ + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, VOLU,\ + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, PGUP,VOLD,\ + TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS, HOME,PGDN,END \ + ), + [2] = KEYMAP( \ + SLEP,P1, P2, P3, P4, P5, P6, P7, P8, P9, P0, TRNS,TRNS,TRNS,TRNS,FN2, \ + TRNS,TRNS,FN5 ,FN6 ,TRNS,FN7 ,TRNS,TRNS,TRNS,TRNS,PSCR,TRNS,TRNS,TRNS, FN3, \ + CAPS,TRNS,TRNS,TRNS,FN4 ,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,\ + TRNS,TRNS,TRNS,TRNS,CALC,TRNS,TRNS,TRNS,MAIL,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,\ + TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS, TRNS,TRNS,TRNS \ + ), +}; + +/* Give numbers some descriptive names */ +#define ACTION_LEDS_ALL 1 +#define ACTION_LEDS_GAME 2 + +const uint16_t fn_actions[] = { + [0] = ACTION_LAYER_MOMENTARY(1), + [1] = ACTION_LAYER_MOMENTARY(2), + [2] = ACTION_FUNCTION(ACTION_LEDS_ALL), + [3] = ACTION_FUNCTION(ACTION_LEDS_GAME), + + [4] = ACTION_USAGE_CONSUMER(0x1B4), + [5] = ACTION_USAGE_CONSUMER(0x196), + [6] = ACTION_USAGE_CONSUMER(0x1A6), + [7] = ACTION_USAGE_CONSUMER(0x1A0), + +}; + +/* custom action function */ +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { + /* + (void)opt; + switch(id) { + case ACTION_LEDS_ALL: + if(record->event.pressed) { + // signal the LED controller thread + chMBPost(&led_mailbox, LED_MSG_GAME_TOGGLE, TIME_IMMEDIATE); + } + break; + case ACTION_LEDS_GAME: + if(record->event.pressed) { + // signal the LED controller thread + chMBPost(&led_mailbox, LED_MSG_ALL_TOGGLE, TIME_IMMEDIATE); + } + break; + } + */ +} diff --git a/keyboards/whitefox/led.c b/keyboards/whitefox/led.c new file mode 100644 index 000000000..aed66c7c0 --- /dev/null +++ b/keyboards/whitefox/led.c @@ -0,0 +1,24 @@ +/* +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 . +*/ + +#include "hal.h" + +#include "led.h" + + +void led_set(uint8_t usb_led) { +} diff --git a/keyboards/whitefox/matrix.c b/keyboards/whitefox/matrix.c new file mode 100644 index 000000000..ce35bca28 --- /dev/null +++ b/keyboards/whitefox/matrix.c @@ -0,0 +1,132 @@ +#include +#include +#include +#include "hal.h" +#include "timer.h" +#include "wait.h" +#include "print.h" +#include "matrix.h" + + +/* + * Matt3o's WhiteFox + * Column pins are input with internal pull-down. Row pins are output and strobe with high. + * Key is high or 1 when it turns on. + * + * col: { PTD0, PTD1, PTD4, PTD5, PTD6, PTD7, PTC1, PTC2 } + * row: { PTB2, PTB3, PTB18, PTB19, PTC0, PTC8, PTC9, PTC10, PTC11 } + */ +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; +static bool debouncing = false; +static uint16_t debouncing_time = 0; + + +void matrix_init(void) +{ +//debug_matrix = true; + /* Column(sense) */ + palSetPadMode(GPIOD, 0, PAL_MODE_INPUT_PULLDOWN); + palSetPadMode(GPIOD, 1, PAL_MODE_INPUT_PULLDOWN); + palSetPadMode(GPIOD, 4, PAL_MODE_INPUT_PULLDOWN); + palSetPadMode(GPIOD, 5, PAL_MODE_INPUT_PULLDOWN); + palSetPadMode(GPIOD, 6, PAL_MODE_INPUT_PULLDOWN); + palSetPadMode(GPIOD, 7, PAL_MODE_INPUT_PULLDOWN); + palSetPadMode(GPIOC, 1, PAL_MODE_INPUT_PULLDOWN); + palSetPadMode(GPIOC, 2, PAL_MODE_INPUT_PULLDOWN); + + /* Row(strobe) */ + palSetPadMode(GPIOB, 2, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOB, 3, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOB, 18, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOB, 19, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOC, 0, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOC, 8, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOC, 9, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOC, 10, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOC, 11, PAL_MODE_OUTPUT_PUSHPULL); + + memset(matrix, 0, MATRIX_ROWS); + memset(matrix_debouncing, 0, MATRIX_ROWS); +} + +uint8_t matrix_scan(void) +{ + for (int row = 0; row < MATRIX_ROWS; row++) { + matrix_row_t data = 0; + + // strobe row + switch (row) { + case 0: palSetPad(GPIOB, 2); break; + case 1: palSetPad(GPIOB, 3); break; + case 2: palSetPad(GPIOB, 18); break; + case 3: palSetPad(GPIOB, 19); break; + case 4: palSetPad(GPIOC, 0); break; + case 5: palSetPad(GPIOC, 8); break; + case 6: palSetPad(GPIOC, 9); break; + case 7: palSetPad(GPIOC, 10); break; + case 8: palSetPad(GPIOC, 11); break; + } + + wait_us(1); // need wait to settle pin state + + // read col data: { PTD0, PTD1, PTD4, PTD5, PTD6, PTD7, PTC1, PTC2 } + data = ((palReadPort(GPIOC) & 0x06UL) << 5) | + ((palReadPort(GPIOD) & 0xF0UL) >> 2) | + (palReadPort(GPIOD) & 0x03UL); + + // un-strobe row + switch (row) { + case 0: palClearPad(GPIOB, 2); break; + case 1: palClearPad(GPIOB, 3); break; + case 2: palClearPad(GPIOB, 18); break; + case 3: palClearPad(GPIOB, 19); break; + case 4: palClearPad(GPIOC, 0); break; + case 5: palClearPad(GPIOC, 8); break; + case 6: palClearPad(GPIOC, 9); break; + case 7: palClearPad(GPIOC, 10); break; + case 8: palClearPad(GPIOC, 11); break; + } + + if (matrix_debouncing[row] != data) { + matrix_debouncing[row] = data; + debouncing = true; + debouncing_time = timer_read(); + } + } + + if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) { + for (int row = 0; row < MATRIX_ROWS; row++) { + matrix[row] = matrix_debouncing[row]; + } + debouncing = false; + } + return 1; +} + +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & (1</os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +# - For Teensies, FAMILY = KINETIS and SERIES is either +# KL2x (LC) or K20x (3.0,3.1,3.2). +# - For Infinity KB, SERIES = K20x +MCU_FAMILY = KINETIS +MCU_SERIES = K20x + +# Linker script to use +# - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +# - NOTE: a custom ld script is needed for EEPROM on Teensy LC +# - LDSCRIPT = +# - MKL26Z64 for Teensy LC +# - MK20DX128 for Teensy 3.0 +# - MK20DX256 for Teensy 3.1 and 3.2 +# - MK20DX128BLDR4 for Infinity with Kiibohd bootloader +# - MK20DX256BLDR8 for Infinity ErgoDox with Kiibohd bootloader +MCU_LDSCRIPT = MK20DX256BLDR8 + +# Startup code to use +# - it should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ +# - STARTUP = +# - kl2x for Teensy LC +# - k20x5 for Teensy 3.0 and Infinity KB +# - k20x7 for Teensy 3.1 and 3.2 +MCU_STARTUP = k20x7 + +# Board: it should exist either in /os/hal/boards/ +# or /boards +# - BOARD = +# - PJRC_TEENSY_LC for Teensy LC +# - PJRC_TEENSY_3 for Teensy 3.0 +# - PJRC_TEENSY_3_1 for Teensy 3.1 or 3.2 +# - MCHCK_K20 for Infinity KB +BOARD = PJRC_TEENSY_3_1 + +# Cortex version +# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 +MCU = cortex-m4 + +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +# I.e. 6 for Teensy LC; 7 for Teensy 3.x +ARMV = 7 + +# Vector table for application +# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ +# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB +#OPT_DEFS = -DCORTEX_VTOR_INIT=0x00001000 +OPT_DEFS = + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration +## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.) +MOUSEKEY_ENABLE ?= yes # Mouse keys +EXTRAKEY_ENABLE ?= yes # Audio control and System control +#CONSOLE_ENABLE ?= yes # Console for debug +COMMAND_ENABLE ?= yes # Commands for debug and configuration +#SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend +NKRO_ENABLE ?= yes # USB Nkey Rollover +CUSTOM_MATRIX ?= yes # Custom matrix file diff --git a/keyboards/whitefox/whitefox.c b/keyboards/whitefox/whitefox.c new file mode 100644 index 000000000..d35bf8338 --- /dev/null +++ b/keyboards/whitefox/whitefox.c @@ -0,0 +1,17 @@ +/* +Copyright 2012,2013 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 . +*/ +#include "whitefox.h" diff --git a/keyboards/whitefox/whitefox.h b/keyboards/whitefox/whitefox.h new file mode 100644 index 000000000..0ffcdca01 --- /dev/null +++ b/keyboards/whitefox/whitefox.h @@ -0,0 +1,54 @@ +/* +Copyright 2014 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 WHITEFOX_H +#define WHITEFOX_H + +#include "quantum.h" + +/* WhiteFox + * ,---------------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `|Ins| + * |---------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]|Backs|Del| + * |---------------------------------------------------------------| + * |CapsL | A| S| D| F| G| H| J| K| L| ;| '|Enter |PgU| + * |---------------------------------------------------------------| + * |Shif| | Z| X| C| V| B| N| M| ,| .| /|Shift |Up |PgD| + * |---------------------------------------------------------------| + * |Ctrl|Gui |Alt | Space |App |Alt |Gui | |Lef|Dow|Rig| + * `---------------------------------------------------------------' + */ + +#define KEYMAP( \ + K00, K10, K20, K30, K40, K50, K60, K70, K80, K01, K11, K21, K31, K41, K51, K61, \ + K71, K81, K02, K12, K22, K32, K42, K52, K62, K72, K82, K03, K13, K23, K33, \ + K43, K53, K63, K73, K83, K04, K14, K24, K34, K44, K54, K64, K74, K84, K05, \ + K15, K25, K35, K45, K55, K65, K75, K85, K06, K16, K26, K36, K46, K56, K66, \ + K76, K86, K07, K17, K27, K37, K47, K57, K67, K77 \ +) { \ + { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07 }, \ + { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17 }, \ + { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27 }, \ + { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37 }, \ + { KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47 }, \ + { KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57 }, \ + { KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_##K66, KC_##K67 }, \ + { KC_##K70, KC_##K71, KC_##K72, KC_##K73, KC_##K74, KC_##K75, KC_##K76, KC_##K77 }, \ + { KC_##K80, KC_##K81, KC_##K82, KC_##K83, KC_##K84, KC_##K85, KC_##K86, KC_NO } \ +} + +#endif -- cgit v1.2.3 From 300c71a02381947ec5c8414ddad17c98c357d958 Mon Sep 17 00:00:00 2001 From: Kaleb Elwert Date: Wed, 4 Jan 2017 00:05:18 -0800 Subject: Remove unneeded define --- keyboards/whitefox/mcuconf.h | 1 - 1 file changed, 1 deletion(-) diff --git a/keyboards/whitefox/mcuconf.h b/keyboards/whitefox/mcuconf.h index ab1f7d724..68c29cf68 100644 --- a/keyboards/whitefox/mcuconf.h +++ b/keyboards/whitefox/mcuconf.h @@ -31,7 +31,6 @@ #define KINETIS_MCG_MODE KINETIS_MCG_MODE_PEE #define KINETIS_PLLCLK_FREQUENCY 96000000UL #define KINETIS_SYSCLK_FREQUENCY 48000000UL -#define KINETIS_XTAL_FREQUENCY 16000000UL #if 0 /* FEI mode - 48 MHz with internal 32.768 kHz crystal */ -- cgit v1.2.3 From 262d31c389cf60460ff6707be90695df3647141b Mon Sep 17 00:00:00 2001 From: Kaleb Elwert Date: Wed, 4 Jan 2017 00:29:58 -0800 Subject: Add whitefox readme --- keyboards/whitefox/readme.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 keyboards/whitefox/readme.md diff --git a/keyboards/whitefox/readme.md b/keyboards/whitefox/readme.md new file mode 100644 index 000000000..0714ad563 --- /dev/null +++ b/keyboards/whitefox/readme.md @@ -0,0 +1,7 @@ +WhiteFox keyboard firmware +====================== + +This is an experimental port which came from the original TMK WhiteFox repo. + +The LED controller was not ported, as the original was a dirty hack and it would +be good to have complete support. -- cgit v1.2.3 From 5fca9ff4d5f448394b21799421708a84bdec1707 Mon Sep 17 00:00:00 2001 From: Jeremy Cowgar Date: Wed, 4 Jan 2017 10:51:00 -0500 Subject: =?UTF-8?q?Added=20Jeremy=E2=80=99s=20developers=20keymap=20for=20?= =?UTF-8?q?the=20Planck?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- keyboards/planck/keymaps/jeremy-dev/keymap.c | 180 ++++++++++++++++++++++++++ keyboards/planck/keymaps/jeremy-dev/readme.md | 85 ++++++++++++ 2 files changed, 265 insertions(+) create mode 100644 keyboards/planck/keymaps/jeremy-dev/keymap.c create mode 100644 keyboards/planck/keymaps/jeremy-dev/readme.md diff --git a/keyboards/planck/keymaps/jeremy-dev/keymap.c b/keyboards/planck/keymaps/jeremy-dev/keymap.c new file mode 100644 index 000000000..e7ed09b12 --- /dev/null +++ b/keyboards/planck/keymaps/jeremy-dev/keymap.c @@ -0,0 +1,180 @@ +// This is the personal keymap of Jeremy Cowgar (@jcowgar). It is written for the programmer. + +// Configuration options +#define PREVENT_STUCK_MODIFIERS + +#include "planck.h" +#include "action_layer.h" +#include "eeconfig.h" + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +enum my_layers { + ALPH = 0, + NUMS, + CURS, + SYMB, + FKEY +}; + +// Each macro gets a name for readability. +enum my_keycodes { + MY_ABVE = SAFE_RANGE, + MY_BELW, + MY_TERM, + MY_DEQL, // /= + MY_MEQL, // *= + MY_SEQL, // -= + MY_PEQL, // += + MY_NEQL, // != + MY_LTGT, // <> + MY_DPIP, // || + MY_DAMP, // && +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [ALPH] = { + {KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P}, + {KC_A, KC_S, KC_D, KC_F, KC_G, KC_LPRN, KC_RPRN, KC_H, KC_J, KC_K, KC_L, KC_SCLN}, + {SFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_LCBR, KC_RCBR, KC_N, KC_M, KC_COMM, KC_DOT, SFT_T(KC_SLSH)}, + {CTL_T(KC_TAB), OSL(FKEY), OSL(NUMS), OSL(SYMB), KC_SPC, ALT_T(KC_BSPC), GUI_T(KC_DELT), KC_ENT, OSL(SYMB), OSL(CURS), TG(CURS), CTL_T(KC_ESC)} + }, + [NUMS] = { + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_COMM, KC_7, KC_8, KC_9, KC_SLSH}, + {KC_LSFT, KC_LGUI, KC_LALT, KC_LCTL, KC_NO, KC_TRNS, KC_TRNS, KC_LPRN, KC_4, KC_5, KC_6, KC_ASTR}, + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_RPRN, KC_1, KC_2, KC_3, KC_MINS}, + {KC_NO, KC_NO, KC_TRNS, TG(NUMS), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_DOT, KC_EQL, KC_PLUS} + }, + [CURS] = { + {KC_MPLY, KC_BSPC, KC_UP, KC_DELT, KC_PGUP, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO}, + {KC_VOLU, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_TRNS, KC_TRNS, KC_NO, KC_LCTL, KC_LALT, KC_LGUI, KC_LSFT}, + {KC_VOLD, KC_NO, MY_ABVE, MY_TERM, KC_NO, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_LSFT}, + {KC_MUTE, KC_NO, MY_BELW, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_NO} + }, + [SYMB] = { + {MY_DEQL, MY_MEQL, MY_SEQL, MY_PEQL, MY_NEQL, KC_NO, KC_NO, MY_LTGT, KC_LABK, KC_RABK, KC_COLN, KC_DLR}, + {KC_SLSH, KC_ASTR, KC_MINS, KC_PLUS, KC_EQL, KC_NO, KC_PIPE, MY_DPIP, KC_GRV, KC_QUOT, KC_DQUO, KC_HASH}, + {KC_BSLS, KC_CIRC, KC_PERC, KC_UNDS, KC_NO, KC_NO, KC_AMPR, MY_DAMP, KC_TILD, KC_AT, KC_EXLM, KC_QUES}, + {KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO} + }, + [FKEY] = { + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F9, KC_F10, KC_F11, KC_F12}, + {KC_LSFT, KC_LGUI, KC_LALT, KC_LCTL, KC_NO, KC_NO, KC_NO, KC_NO, KC_F5, KC_F6, KC_F7, KC_F8}, + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F1, KC_F2, KC_F3, KC_F4}, + {KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO} + } +}; + +void press_key(uint16_t key) { + register_code(key); + unregister_code(key); +} + +void press_two_keys(uint16_t key1, uint16_t key2) { + register_code(key1); + register_code(key2); + unregister_code(key2); + unregister_code(key1); +} + +void press_three_keys(uint16_t key1, uint16_t key2, uint16_t key3) { + register_code(key1); + register_code(key2); + register_code(key3); + unregister_code(key3); + unregister_code(key2); + unregister_code(key1); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case MY_BELW: + if (record->event.pressed) { + press_two_keys(KC_LGUI, KC_RGHT); + press_key(KC_ENT); + } + + return false; + + case MY_ABVE: + if (record->event.pressed) { + press_two_keys(KC_LGUI, KC_LEFT); + press_key(KC_ENT); + press_key(KC_UP); + } + + return false; + + case MY_TERM: + if (record->event.pressed) { + press_three_keys(KC_LGUI, KC_LSFT, KC_ENT); + } + + return false; + + case MY_DEQL: // /= + if (record->event.pressed) { + press_key(KC_SLSH); + press_key(KC_EQL); + } + + return false; + + case MY_MEQL: // *= + if (record->event.pressed) { + press_two_keys(KC_LSFT, KC_ASTR); + press_key(KC_EQL); + } + + return false; + + case MY_SEQL: // -= + if (record->event.pressed) { + press_key(KC_MINS); + press_key(KC_EQL); + } + + return false; + + case MY_PEQL: // += + if (record->event.pressed) { + press_two_keys(KC_LSFT, KC_PLUS); + press_key(KC_EQL); + } + + return false; + + case MY_NEQL: // != + if (record->event.pressed) { + press_two_keys(KC_LSFT, KC_EXLM); + press_key(KC_EQL); + } + + return false; + + case MY_LTGT: // <> + if (record->event.pressed) { + press_two_keys(KC_LSFT, KC_LABK); + press_two_keys(KC_LSFT, KC_RABK); + } + + return false; + + case MY_DPIP: // || + if (record->event.pressed) { + press_two_keys(KC_LSFT, KC_PIPE); + press_two_keys(KC_LSFT, KC_PIPE); + } + + return false; + + case MY_DAMP: // && + if (record->event.pressed) { + press_two_keys(KC_LSFT, KC_AMPR); + press_two_keys(KC_LSFT, KC_AMPR); + } + + return false; + } + + return true; +} diff --git a/keyboards/planck/keymaps/jeremy-dev/readme.md b/keyboards/planck/keymaps/jeremy-dev/readme.md new file mode 100644 index 000000000..b6a402d69 --- /dev/null +++ b/keyboards/planck/keymaps/jeremy-dev/readme.md @@ -0,0 +1,85 @@ +Jeremy Cowgar's Planck Keymap +============================= + +I am a programmer by trade and suffer from the beginning stages of RSI. As a programmer, I use letters, symbols and cursor navigation most often. To prevent strange finger gymnastics, I wrote a script to rank which non-letter characters occurred in my primary source projects most often and then placed these characters in the easiest to reach locations, within reason and for me. I made heavy use of momentary layer toggling. + +Layers +------ + +The key mapping is made up of 5 layers: Letters, Symbols, Navigation, Numbers, and Function Keys. + +The layout can be viewed visually at: + +http://www.keyboard-layout-editor.com/#/gists/319474e5e2d199e583371ed1d2aec316 + +* Purple buttons are dual function keys. +* Green buttons are layer momentary toggle keys. +* Red buttons are layer persistent toggle keys. + +The keys have multiple symbols: + +* Upper left: standard layer, the letter layer +* Upper right: function layer +* Lower left: navigation layer +* Lower right: symbol layer + +The symbols in the layout editor are not entirely clear. + +The Z and ? keys double as shift keys. Hold for a shift, tap for a Z or ? + +The bottom row from left to right: + +* Tab when pressed, Control when held. It also is the volume mute key when in the "Navigation" layer +* Function layer momentary toggle +* Number layer momentary toggle +* Symbol layer momentary toggle. When in the "Number" layer, this key also makes the "Number" layer sticky for using the 10 key for quite a bit of entry +* Space +* Backspace when tapped, Option when held +* Delete when tapped, Command when held +* Return +* Symbol layer momentary toggle. When in the "Number" layer, key also is the zero key. +* Navigation layer momentary toggle +* Navigation layer toggle. This was included for when you are browsing a website, document or otherwise wish to stay in navigation mode. When in the "Number" layer, the key is the = symbol +* Escape when pressed, Control when held. When in the "Number" layer, the key is the + symbol + +General Notes +------------- + +The letter layer is separated by 2 center rows of keys. This spreads the hands out a little further which helps not twist the wrists as much. The 2 center rows are [], (), [], and Ctrl and Alt keys. + +The symbol layer keys are accessed by the thumbs. They are the closest to the thumbs, instead of the number toggle, because in my code I found I used symbols much more often than numbers. There are two symbol layer keys because the symbols spread across the right and left half of the keyboard. Thus, some symbols are easier hit with the left hand modifier or right hand modifier. + +The number layer key is only accessible by the left thumb because all of the number keys are on the right side of the keyboard. When in the number layer, you can press the key to the right to make that layer sticky when you are going to do a lot of number entry. + +The function layer key is only accessible by the left thumb because all of the function keys are on the right side of the keyboard. + +The navigation layer key is only accessible by the right thumb because all of the navigation keys are on the left side of the keyboard. You can press the key to the right of the navigation layer to make the navigation layer sticky when you are doing a lot of navigation, reading a web page for example. + +When using the number or navigation layers, the same hand that accesses the momentary layer toggle key also has the 4 primary modifiers under their home row. + +* Pointer finger is control +* Middle finger is option +* Ring finger is command +* Pinky finger is shift + +This is so you can easily press Cmd+Shift+F4 or when navigating, select text or words of text by pressing Shift+Control, for example. + +Some keys are duplicated. For example, () are available in easy to reach locations while in the Number layer because they are often used in math. + +The symbol layer has additional helpers for programming including a single keys that enter /=, \*=, -=, +=, !=, <>, ||, and &&. It also includes three special Return keys on the left: + +* Up CR which moves the cursor up, to the end of the line and then presses CR +* Down CR which moves the cursor to the end of the line and then presses CR +* Right ; which moves the cursor to the end of the line and presses ; for C styled languages, such as JavaScript which is a primary language I use + +Word of Warning +--------------- + +I have been using the keymap for some time now and believe it to be a good keymap. There are a few things through the week that I wonder if it would have been better if this key were moved to that location. + +This keymap may change for further optimization. + +Please Give Feedback! +--------------------- + +I am very interested in your feedback. Send me a message here on GitHub, r/jcowgar or @jcowgar. -- cgit v1.2.3 From ccde1d8b5e8be798a8ab6ee7ace3088d5a474929 Mon Sep 17 00:00:00 2001 From: Kaleb Elwert Date: Wed, 4 Jan 2017 21:19:32 -0800 Subject: Add white fox to keyboards readme --- keyboards/readme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/keyboards/readme.md b/keyboards/readme.md index 81a23c7e5..02bce70f0 100644 --- a/keyboards/readme.md +++ b/keyboards/readme.md @@ -52,4 +52,5 @@ These keyboards are part of the QMK repository, but their manufacturers are not * [Satan](/keyboards/satan) — A GH60 variant. * [SixKeyBoard](/keyboards/sixkeyboard) — A 6-key keyboard made by TechKeys. * [TheVan 44](/keyboars/tv44) — A 44-key staggered keybard by Evangs. +* [WhiteFox](/keyboards/whitefox) — A 65% keyboard designed as a partnership by matt3o, Massdrop and Input Club * [Vision Division](/keyboards/vision_division) — Full Size / Split Linear Keyboard by IBNobody. -- cgit v1.2.3 From ca9a3dcb7113ea2a4ecec0b327c78bbf641386ca Mon Sep 17 00:00:00 2001 From: Kaleb Elwert Date: Wed, 4 Jan 2017 21:20:06 -0800 Subject: Fix unrelated spelling error --- keyboards/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/readme.md b/keyboards/readme.md index 02bce70f0..d2f41ad7e 100644 --- a/keyboards/readme.md +++ b/keyboards/readme.md @@ -51,6 +51,6 @@ These keyboards are part of the QMK repository, but their manufacturers are not * [S60-x](/keyboards/s60-x) — DIY compact keyboard designed by VinnyCordeiro for Sentraq. * [Satan](/keyboards/satan) — A GH60 variant. * [SixKeyBoard](/keyboards/sixkeyboard) — A 6-key keyboard made by TechKeys. -* [TheVan 44](/keyboars/tv44) — A 44-key staggered keybard by Evangs. +* [TheVan 44](/keyboards/tv44) — A 44-key staggered keybard by Evangs. * [WhiteFox](/keyboards/whitefox) — A 65% keyboard designed as a partnership by matt3o, Massdrop and Input Club * [Vision Division](/keyboards/vision_division) — Full Size / Split Linear Keyboard by IBNobody. -- cgit v1.2.3 From 0bd03d698c26d95dee11d12a1723976bb470c24a Mon Sep 17 00:00:00 2001 From: ishigoya Date: Fri, 6 Jan 2017 16:41:14 +0900 Subject: new file: keyboards/ergodox/keymaps/ishigoya-jp/keymap.c --- keyboards/ergodox/keymaps/ishigoya-jp/keymap.c | 962 +++++++++++++++++++++++++ 1 file changed, 962 insertions(+) create mode 100644 keyboards/ergodox/keymaps/ishigoya-jp/keymap.c diff --git a/keyboards/ergodox/keymaps/ishigoya-jp/keymap.c b/keyboards/ergodox/keymaps/ishigoya-jp/keymap.c new file mode 100644 index 000000000..e582e8a1f --- /dev/null +++ b/keyboards/ergodox/keymaps/ishigoya-jp/keymap.c @@ -0,0 +1,962 @@ +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" +#include "keymap_jp.h" + +static uint16_t start; + +#define BASE 0 // EN layer +#define JP 1 // Japanese +#define JPXON 2 // JP + Fn +#define JPKAZARI 3 // JP + KAZARI +#define JPTOPROW 4 // JP + TOPROW +#define JPTRKZ 5 // JP + TOPROW + KAZARI +#define NUM 6 // Numbers + +#define CTLSHFT 1 +#define CUTCOPY 2 + +//kana macro definitions start here + +#define JPVU 4 +#define JPNU 6 +#define JPKO 7 +#define JPSA 8 +#define JPKE 9 +#define JPHE 10 +#define JPSHI 11 +#define JPKA 12 +#define JPKI 13 +#define JPSU 14 +#define JPSO 15 +#define JPHI 16 +#define JPCHI 17 +#define JPFU 18 +#define JPSE 19 +#define JPTSU 20 +#define JPKU 21 +#define JPTE 22 +#define JPTA 23 +#define JPTO 24 +#define JPHA 25 +#define JPHO 26 +#define JPXKE 27 +#define JPXU 28 +#define JPXKA 29 +#define JPXA 30 +#define JPXO 31 +#define JPGO 32 +#define JPZA 33 +#define JPGE 34 +#define JPBE 35 +#define JPYU 36 +#define JPJI 37 +#define JPGA 38 +#define JPGI 39 +#define JPZU 40 +#define JPZO 41 +#define JPBI 42 +#define JPDI 43 +#define JPZE 44 +#define JPDU 45 +#define JPGU 46 +#define JPYA 47 +#define JPYO 48 +#define JPDE 49 +#define JPDA 50 +#define JPDO 51 +#define JPBA 52 +#define JPBO 53 +#define JPRI 54 +#define JPRE 55 +#define JPRA 56 +#define JPNA 57 +#define JPNO 58 +#define JPMI 59 +#define JPMU 60 +#define JPME 61 +#define JPNE 62 +#define JPMA 63 +#define JPXTU 64 +#define JPWA 65 +#define JPRU 66 +#define JPWO 67 +#define JPNI 68 +#define JPNN 69 +#define JPMO 70 +#define JPRO 71 +#define JPXE 72 +#define JPXI 73 +#define JPXYU 74 +#define JPXYA 75 +#define JPXYO 76 +#define JPPE 77 +#define JPPU 78 +#define JPPI 79 +#define JPPA 80 +#define JPPO 81 +#define JPBU 82 + +// kana macro definitions end here + +#define SHIFT 86 +#define KAZARI 87 +#define JPFN 88 //shifts to JPXON layer +#define TOJPLOUT 89 +#define TOENL 90 +#define TOJPL 91 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * + * ,----------------------------------------------------. ,--------------------------------------------------. + * | En / 和 | | ^ | % | | |Selall| | Undo | | $ | @ | LT | UP | RT | + * |----------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | D | R | W | B | Cut | | PgUP | J | F | U | P | DN | \ | + * |----------+------+------+------+------+------| Copy | | |------+------+------+------+------+--------| + * | / | A | S | H | T | G |------| |------| Y | N | E | O | I | , | + * |----------+------+------+------+------+------|Paste | | PgDN |------+------+------+------+------+--------| + * | Ctl+Shft | Z | X | M | C | V | | | | . | L | K | ' | ? | tmux | + * `----------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | LCtrl | LGui | Alt| _ | Esc | |MouseL|MouseR| - | ~ | Ctrl | + * `------------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * |MidMs | Del | | VolUp| Mute | + * ,------|------|------| |------+--------+------. + * | | | | | VolDn| | | + * | Space| Shift|------| |------| Backsp |Enter | + * | | | Num | | Esc | | | + * `--------------------' `----------------------' + * + * + * tmux prefix set to C-b + * + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[BASE] = KEYMAP( // layer 0 : default + // left hand + M(TOJPLOUT), KC_NO, KC_EQL, LSFT(KC_5), KC_NO, KC_NO, LCTL(KC_A), + KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, M(CUTCOPY), + KC_SLSH, KC_A, KC_S, KC_H, KC_T, KC_G, + M(CTLSHFT), KC_Z, KC_X, KC_M, KC_C, KC_V, LCTL(KC_V), + KC_RCTL, KC_LGUI, KC_LALT,JP_UNDS,KC_LCTL, + KC_BTN3, KC_DEL, + KC_NO, + KC_SPC,KC_LSFT,F(1), + // right hand + LCTL(KC_Z), KC_NO, LSFT(KC_4), JP_AT, KC_LEFT, KC_UP, KC_RIGHT, + KC_PGUP, KC_J, KC_F, KC_U, KC_P, KC_DOWN, LSFT(KC_3), + KC_Y, KC_N, KC_E, KC_O, KC_I, KC_COMMA, + KC_PGDN, KC_DOT, KC_L, KC_K, LSFT(KC_7), KC_QUES, LCTL(KC_B), + KC_BTN1, KC_BTN2,KC_MINS,JP_TILD, KC_RCTL, + KC_VOLU, KC_MUTE, + KC_VOLD, + KC_SPC,KC_BSLS, KC_ENT + ), +/* Keymap 1: Japanese + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | En / 和| | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | |   nu | ko | sa | he | ke | | | | fu | se | tsu | ku | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | to | shi | ka | ki | su |------| |------| a | ha | te | ta | u | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | mu | so | hi | chi | me | | | | | ma | ho | i | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | shift| fn |------| |------| |kazari| + * | | | Num | | | | | + * `--------------------' `--------------------' + * + * + * + */ +[JP] = KEYMAP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, M(JPNU), M(JPKO), M(JPSA), M(JPHE), M(JPKE), KC_TRNS, + KC_TRNS, M(JPTO), M(JPSHI), M(JPKA), M(JPKI), M(JPSU), + KC_TRNS, M(JPMU), M(JPSO), M(JPHI), M(JPCHI), M(JPME), KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_NO, + M(SHIFT), M(JPFN), F(1), + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, M(JPFU), M(JPSE), M(JPTSU), M(JPKU), KC_TRNS, KC_TRNS, + KC_A, M(JPHA), M(JPTE), M(JPTA), KC_U, KC_TRNS, + KC_TRNS, KC_TRNS, M(JPMA), M(JPHO), KC_I, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,M(KAZARI) +), +/* Keymap 2: Japanese with Fn + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | |   | xe | | | xke | | | | xya | | xtsu | xo | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | xka | | |------| |------| xa | xyo | | | xu | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | | xi | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + * + * + * + */ +[JPXON] = KEYMAP( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, M(JPXE), KC_NO, M(JPXKE), KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, M(JPXKA), 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_TRNS, KC_TRNS, + // right hand + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, M(JPXYA), KC_NO, M(JPXTU), M(JPXO), KC_NO, KC_NO, + M(JPXA), M(JPXYO), M(JPXYU), KC_NO, M(JPXU), KC_NO, + KC_NO, KC_NO,KC_NO, KC_NO, M(JPXI), 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 +), +/* Keymap 3: Japanese with kazari + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | |   | go | za | be | ge | | | | bu | ze | du | gu | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | do | ji | ga | gi | zu |------| |------| | ba | de | da | vu | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | zo | bi | di | | | | | | | bo | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + * + * + * + */ +[JPKAZARI] = KEYMAP( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, M(JPGO), M(JPZA), M(JPBE), M(JPGE), KC_NO, + KC_NO, M(JPDO), M(JPJI), M(JPGA), M(JPGI), M(JPZU), + KC_NO, KC_NO, M(JPZO), M(JPBI), M(JPDI), KC_NO, KC_NO, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, + KC_NO, + M(SHIFT), KC_NO, KC_TRNS, + // right hand + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, M(JPBU), M(JPZE), M(JPDU), M(JPGU), KC_NO, KC_NO, + KC_NO, M(JPBA), M(JPDE), M(JPDA), M(JPVU), KC_NO, + KC_NO, KC_NO, KC_NO, M(JPBO), 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 +), +/* Keymap 4: Japanese with Toprow + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | |   | e | - | re | | | | | ya | ne | ru | o | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | ra | ri | na | no | mi |------| |------| wa | yo | yu | ni | nn | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | mo | ro | wo | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + * + * + * + */ +[JPTOPROW] = KEYMAP( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_E, KC_MINS, M(JPRE), KC_NO, KC_NO, + KC_NO, M(JPRA), M(JPRI), M(JPNA), M(JPNO), M(JPMI), + 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_TRNS, KC_NO, KC_NO, + // right hand + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, M(JPYA), M(JPNE), M(JPRU), KC_O, KC_NO, KC_NO, + M(JPWA), M(JPYO), M(JPYU), M(JPNI), M(JPNN), KC_NO, + KC_NO, KC_NO, M(JPMO), M(JPRO), M(JPWO), KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, + KC_NO, + KC_NO, KC_NO, M(KAZARI) +), + +/* Keymap 5: Japanese with Toprow and Kazari + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | |   | | | pe | | | | | pu | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| | pa | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | pi | | | | | | | | po | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + * + * + * + */ +[JPTRKZ] = KEYMAP( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, M(JPPE),KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, M(JPPI), KC_NO, KC_NO, KC_NO, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, + KC_NO, + KC_TRNS, KC_NO, KC_NO, + // right hand + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, M(JPPU), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, M(JPPA), KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, M(JPPO), 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 +), +/* Keymap 6: Number Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | " | [ | ] | | | | | % | 7 | 8 | 9 | | F12 | + * |--------+------+------+------+------+------| ; | | |------+------+------+------+------+--------| + * | | | / | + | { | } |------| |------| ! | 4 | 5 | 6 | 0 | , | + * |--------+------+------+------+------+------| : | | & |------+------+------+------+------+--------| + * | | | * | - | ( | ) | | | | . | 1 | 2 | 3 | ? | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | # | | < | = | > | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| Back | Ent | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// Numbers +[NUM] = KEYMAP( + // left hand + KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_NO, + KC_NO, KC_NO, KC_NO, JP_DQT, KC_RBRACKET, KC_BSPC, KC_SCLN, + KC_NO, KC_NO, KC_SLSH, JP_PLUS, LSFT(KC_RBRACKET), JP_RCBR, + KC_NO, KC_NO, JP_ASTR, KC_MINS, LSFT(KC_8), LSFT(KC_9), JP_COLN, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_HASH, + KC_NO, KC_NO, + KC_NO, + KC_NO, KC_NO, KC_TRNS, + // right hand + KC_NO, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + LSFT(KC_JYEN), KC_PERC, KC_7, KC_8, KC_9, KC_NO, KC_F12, + KC_EXLM, KC_4, KC_5, KC_6, KC_0, KC_COMM, + LSFT(KC_6), KC_DOT, KC_1, KC_2, KC_3, KC_QUES, KC_NO, + KC_LT,JP_EQL, KC_GT, KC_NO, KC_NO, + KC_NO, KC_NO, + KC_NO, + KC_SPC, KC_BSLS, KC_DOT +), +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_LAYER_MOMENTARY(NUM) // FN1 - Momentary Layer 6 (Numbers) +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + + // MACRO only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + case CTLSHFT: + if (record->event.pressed) { + return MACRO( D(LSFT), D(LCTL), END); + } else { + return MACRO( U(LSFT), U(LCTL), END); + } + break; + case CUTCOPY: + if (record->event.pressed) { + start = timer_read(); + } else { + if (timer_elapsed(start) > 150) { + return MACRO( D(LCTL), T(X), U(LCTL), END); + } else { + return MACRO( D(LCTL), T(C), U(LCTL), END); + } + } + break; + + // kana macros start here + + case JPVU: + if (record->event.pressed) { + return MACRO( I(1), T(V), T(U), END); + } + break; + case JPNU: + if (record->event.pressed) { + return MACRO( I(1), T(N), T(U), END); + } + break; + case JPKO: + if (record->event.pressed) { + return MACRO( I(1), T(K), T(O), END); + } + break; + case JPSA: + if (record->event.pressed) { + return MACRO( I(1), T(S), T(A), END); + } + break; + case JPKE: + if (record->event.pressed) { + return MACRO( I(1), T(K), T(E), END); + } + break; + case JPHE: + if (record->event.pressed) { + return MACRO( I(1), T(H), T(E), END); + } + break; + case JPSHI: + if (record->event.pressed) { + return MACRO( I(1), T(S), T(H), T(I), END); + } + break; + case JPKA: + if (record->event.pressed) { + return MACRO( I(1), T(K), T(A), END); + } + break; + case JPKI: + if (record->event.pressed) { + return MACRO( I(1), T(K), T(I), END); + } + break; + case JPSU: + if (record->event.pressed) { + return MACRO( I(1), T(S), T(U), END); + } + break; + case JPSO: + if (record->event.pressed) { + return MACRO( I(1), T(S), T(O), END); + } + break; + case JPHI: + if (record->event.pressed) { + return MACRO( I(1), T(H), T(I), END); + } + break; + case JPCHI: + if (record->event.pressed) { + return MACRO( I(1), T(C), T(H), T(I), END); + } + break; + case JPFU: + if (record->event.pressed) { + return MACRO( I(1), T(F), T(U), END); + } + break; + case JPSE: + if (record->event.pressed) { + return MACRO( I(1), T(S), T(E), END); + } + break; + case JPTSU: + if (record->event.pressed) { + return MACRO( I(1), T(T), T(S), T(U), END); + } + break; + case JPKU: + if (record->event.pressed) { + return MACRO( I(1), T(K), T(U), END); + } + break; + case JPTE: + if (record->event.pressed) { + return MACRO( I(1), T(T), T(E), END); + } + break; + case JPTA: + if (record->event.pressed) { + return MACRO( I(1), T(T), T(A), END); + } + break; + case JPTO: + if (record->event.pressed) { + return MACRO( I(1), T(T), T(O), END); + } + break; + case JPHA: + if (record->event.pressed) { + return MACRO( I(1), T(H), T(A), END); + } + break; + case JPHO: + if (record->event.pressed) { + return MACRO( I(1), T(H), T(O), END); + } + break; + case JPXKE: + if (record->event.pressed) { + return MACRO( I(1), T(X), T(K), T(E), END); + } + break; + case JPXU: + if (record->event.pressed) { + return MACRO( I(1), T(X), T(U), END); + } + break; + case JPXKA: + if (record->event.pressed) { + return MACRO( I(1), T(X), T(K), T(A), END); + } + break; + case JPXA: + if (record->event.pressed) { + return MACRO( I(1), T(X), T(A), END); + } + break; + case JPXO: + if (record->event.pressed) { + return MACRO( I(1), T(X), T(O), END); + } + break; + case JPGO: + if (record->event.pressed) { + return MACRO( I(1), T(G), T(O), END); + } + break; + case JPZA: + if (record->event.pressed) { + return MACRO( I(1), T(Z), T(A), END); + } + break; + case JPGE: + if (record->event.pressed) { + return MACRO( I(1), T(G), T(E), END); + } + break; + case JPBE: + if (record->event.pressed) { + return MACRO( I(1), T(B), T(E), END); + } + break; + case JPYU: + if (record->event.pressed) { + return MACRO( I(1), T(Y), T(U), END); + } + break; + case JPJI: + if (record->event.pressed) { + return MACRO( I(1), T(J), T(I), END); + } + break; + case JPGA: + if (record->event.pressed) { + return MACRO( I(1), T(G), T(A), END); + } + break; + case JPGI: + if (record->event.pressed) { + return MACRO( I(1), T(G), T(I), END); + } + break; + case JPZU: + if (record->event.pressed) { + return MACRO( I(1), T(Z), T(U), END); + } + break; + case JPZO: + if (record->event.pressed) { + return MACRO( I(1), T(Z), T(O), END); + } + break; + case JPBI: + if (record->event.pressed) { + return MACRO( I(1), T(B), T(I), END); + } + break; + case JPDI: + if (record->event.pressed) { + return MACRO( I(1), T(D), T(I), END); + } + break; + case JPZE: + if (record->event.pressed) { + return MACRO( I(1), T(Z), T(E), END); + } + break; + case JPDU: + if (record->event.pressed) { + return MACRO( I(1), T(D), T(U), END); + } + break; + case JPGU: + if (record->event.pressed) { + return MACRO( I(1), T(G), T(U), END); + } + break; + case JPYA: + if (record->event.pressed) { + return MACRO( I(1), T(Y), T(A), END); + } + break; + case JPYO: + if (record->event.pressed) { + return MACRO( I(1), T(Y), T(O), END); + } + break; + case JPDE: + if (record->event.pressed) { + return MACRO( I(1), T(D), T(E), END); + } + break; + case JPDA: + if (record->event.pressed) { + return MACRO( I(1), T(D), T(A), END); + } + break; + case JPDO: + if (record->event.pressed) { + return MACRO( I(1), T(D), T(O), END); + } + break; + case JPBA: + if (record->event.pressed) { + return MACRO( I(1), T(B), T(A), END); + } + break; + case JPBO: + if (record->event.pressed) { + return MACRO( I(1), T(B), T(O), END); + } + break; + case JPRI: + if (record->event.pressed) { + return MACRO( I(1), T(R), T(I), END); + } + break; + case JPRE: + if (record->event.pressed) { + return MACRO( I(1), T(R), T(E), END); + } + break; + case JPRA: + if (record->event.pressed) { + return MACRO( I(1), T(R), T(A), END); + } + break; + case JPNA: + if (record->event.pressed) { + return MACRO( I(1), T(N), T(A), END); + } + break; + case JPNO: + if (record->event.pressed) { + return MACRO( I(1), T(N), T(O), END); + } + break; + case JPMI: + if (record->event.pressed) { + return MACRO( I(1), T(M), T(I), END); + } + break; + case JPMU: + if (record->event.pressed) { + return MACRO( I(1), T(M), T(U), END); + } + break; + case JPME: + if (record->event.pressed) { + return MACRO( I(1), T(M), T(E), END); + } + break; + case JPNE: + if (record->event.pressed) { + return MACRO( I(1), T(N), T(E), END); + } + break; + case JPMA: + if (record->event.pressed) { + return MACRO( I(1), T(M), T(A), END); + } + break; + case JPXTU: + if (record->event.pressed) { + return MACRO( I(1), T(X), T(T), T(U), END); + } + break; + case JPWA: + if (record->event.pressed) { + return MACRO( I(1), T(W), T(A), END); + } + break; + case JPRU: + if (record->event.pressed) { + return MACRO( I(1), T(R), T(U), END); + } + break; + case JPWO: + if (record->event.pressed) { + return MACRO( I(1), T(W), T(O), END); + } + break; + case JPNI: + if (record->event.pressed) { + return MACRO( I(1), T(N), T(I), END); + } + break; + case JPNN: + if (record->event.pressed) { + return MACRO( I(1), T(N), T(N), END); + } + break; + case JPMO: + if (record->event.pressed) { + return MACRO( I(1), T(M), T(O), END); + } + break; + case JPRO: + if (record->event.pressed) { + return MACRO( I(1), T(R), T(O), END); + } + break; + case JPXE: + if (record->event.pressed) { + return MACRO( I(1), T(X), T(E), END); + } + break; + case JPXI: + if (record->event.pressed) { + return MACRO( I(1), T(X), T(I), END); + } + break; + case JPXYU: + if (record->event.pressed) { + return MACRO( I(1), T(X), T(Y), T(U), END); + } + break; + case JPXYA: + if (record->event.pressed) { + return MACRO( I(1), T(X), T(Y), T(A), END); + } + break; + case JPXYO: + if (record->event.pressed) { + return MACRO( I(1), T(X), T(Y), T(O), END); + } + break; + case JPPE: + if (record->event.pressed) { + return MACRO( I(1), T(P), T(E), END); + } + break; + case JPPU: + if (record->event.pressed) { + return MACRO( I(1), T(P), T(U), END); + } + break; + case JPPI: + if (record->event.pressed) { + return MACRO( I(1), T(P), T(I), END); + } + break; + case JPPA: + if (record->event.pressed) { + return MACRO( I(1), T(P), T(A), END); + } + break; + case JPPO: + if (record->event.pressed) { + return MACRO( I(1), T(P), T(O), END); + } + break; + case JPBU: + if (record->event.pressed) { + return MACRO( I(1), T(B), T(U), END); + } + break; + + // kana macros end here + + break; + case SHIFT: + if (record->event.pressed) { + start = timer_read(); + if (layer_state == (1<event.pressed) { + start = timer_read(); + if (layer_state == (1<event.pressed) { + start = timer_read(); + layer_state = (1<event.pressed) { + if (default_layer_state == (1<event.pressed) { + default_layer_state = (1<event.pressed) { + default_layer_state = (1< Date: Fri, 6 Jan 2017 17:53:04 +0900 Subject: new file: keyboards/ergodox/keymaps/ishigoya-jp/img/keyboard-layout-enL.png new file: keyboards/ergodox/keymaps/ishigoya-jp/img/keyboard-layout-jpL.png new file: keyboards/ergodox/keymaps/ishigoya-jp/img/keyboard-layout-numL.png modified: keyboards/ergodox/keymaps/ishigoya-jp/keymap.c new file: keyboards/ergodox/keymaps/ishigoya-jp/readme.md --- .../ishigoya-jp/img/keyboard-layout-enL.png | Bin 0 -> 84725 bytes .../ishigoya-jp/img/keyboard-layout-jpL.png | Bin 0 -> 82660 bytes .../ishigoya-jp/img/keyboard-layout-numL.png | Bin 0 -> 72923 bytes keyboards/ergodox/keymaps/ishigoya-jp/keymap.c | 6 +-- keyboards/ergodox/keymaps/ishigoya-jp/readme.md | 54 +++++++++++++++++++++ 5 files changed, 57 insertions(+), 3 deletions(-) create mode 100755 keyboards/ergodox/keymaps/ishigoya-jp/img/keyboard-layout-enL.png create mode 100755 keyboards/ergodox/keymaps/ishigoya-jp/img/keyboard-layout-jpL.png create mode 100755 keyboards/ergodox/keymaps/ishigoya-jp/img/keyboard-layout-numL.png create mode 100644 keyboards/ergodox/keymaps/ishigoya-jp/readme.md diff --git a/keyboards/ergodox/keymaps/ishigoya-jp/img/keyboard-layout-enL.png b/keyboards/ergodox/keymaps/ishigoya-jp/img/keyboard-layout-enL.png new file mode 100755 index 000000000..e6aec35bf Binary files /dev/null and b/keyboards/ergodox/keymaps/ishigoya-jp/img/keyboard-layout-enL.png differ diff --git a/keyboards/ergodox/keymaps/ishigoya-jp/img/keyboard-layout-jpL.png b/keyboards/ergodox/keymaps/ishigoya-jp/img/keyboard-layout-jpL.png new file mode 100755 index 000000000..69a1f6948 Binary files /dev/null and b/keyboards/ergodox/keymaps/ishigoya-jp/img/keyboard-layout-jpL.png differ diff --git a/keyboards/ergodox/keymaps/ishigoya-jp/img/keyboard-layout-numL.png b/keyboards/ergodox/keymaps/ishigoya-jp/img/keyboard-layout-numL.png new file mode 100755 index 000000000..8b2cce5e6 Binary files /dev/null and b/keyboards/ergodox/keymaps/ishigoya-jp/img/keyboard-layout-numL.png differ diff --git a/keyboards/ergodox/keymaps/ishigoya-jp/keymap.c b/keyboards/ergodox/keymaps/ishigoya-jp/keymap.c index e582e8a1f..c219ce884 100644 --- a/keyboards/ergodox/keymaps/ishigoya-jp/keymap.c +++ b/keyboards/ergodox/keymaps/ishigoya-jp/keymap.c @@ -484,7 +484,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) break; case JPSHI: if (record->event.pressed) { - return MACRO( I(1), T(S), T(H), T(I), END); + return MACRO( I(1), T(S), T(I), END); } break; case JPKA: @@ -514,7 +514,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) break; case JPCHI: if (record->event.pressed) { - return MACRO( I(1), T(C), T(H), T(I), END); + return MACRO( I(1), T(T), T(I), END); } break; case JPFU: @@ -529,7 +529,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) break; case JPTSU: if (record->event.pressed) { - return MACRO( I(1), T(T), T(S), T(U), END); + return MACRO( I(1), T(T), T(U), END); } break; case JPKU: diff --git a/keyboards/ergodox/keymaps/ishigoya-jp/readme.md b/keyboards/ergodox/keymaps/ishigoya-jp/readme.md new file mode 100644 index 000000000..9ee557335 --- /dev/null +++ b/keyboards/ergodox/keymaps/ishigoya-jp/readme.md @@ -0,0 +1,54 @@ +This is a dual English-Japanese keymap that utilises a thumb-shift system for Japanese input. You can read more about this layout on my blog [here](https://ishigoya.com). + +### Some Editing Necessary +The system I created this on is a Chromebook, and uses a Japanese keymap, so some of the key mappings may not be the same as those on your system. In particular, the Escape key on layer 0 is mapped to KC_LCTL. + +### Layouts +------ +#### English layer - layer 0 +The English layout is a modified Workman layout, and is pictured below: + +![English layout](img/keyboard-layout-enL.png) + +Some of the punctuation keys have been moved to a separate number/symbol layer. + +#### Number / Symbol layer - layer 6 + +The Number / Symbol layer is reachable through a ACTION_LAYER_MOMENTARY function. The blue LED is illuminated when this layer is active. It is accessible from the English or Japanese layers. + +![Number layout](img/keyboard-layout-numL.png) + +#### Japanese layers - layers 1-5 + +There are 5 layers involved in Japanese input. The TOJPLOUT macro is mapped to the En / 和 button, and switches default layer between layer 0 (English) and 1 (main Japanese layer). When layer 1 is the default layer, the red LED is on. It also outputs the ZKHK button to change the input method language. + +On keypress, strings of romaji characters are output by the keyboard using macros, and these simulate the input of individual keys on a latin keyboard. + +![Japanese layout](img/keyboard-layout-jpL.png) + +Layer 1 is the JP layer. Keys on this layer correspond to singleton keys, or keys on the bottom row where a key is shared. For example, pressing the "ふ や" key outputs `ふ` (or "fu"). + +Layer 2 is the JPXON layer, and is active while holding the Fn key. This prints keys that are prefaced by "x" when writing in romaji. For example, pressing the "ふ や" key while holding the Fn key outputs `ゃ` (or "xya"). + +Layer 3 is the JPKAZARI layer, and is active while holding the 飾り key. This provides letters with dakuten. For example, pressing the "ふ や" key while holding the 飾り key outputs `ぶ` (or "bu"). + +Layer 4 is the JPTOPROW layer, and is active while holding the シフト key. Keys on this line correspond to top row keys on shared keys in the image. For example, pressing the "ふ や" key while holding the シフト key outputs `や` (or "ya"). + +Layer 5 is the JPTRKZ layer, and is active while holding both the シフト key and the 飾り key. This layer contains handakuten keys. For example, pressing the "ふ や" while holding both the シフト key and the 飾り key outputs `ぷ` (or "pu"). + +I've also separated out the #define sections and the macros required for kana for easy copying, in case anyone else should wish to make a kana-based layout. + +When tapped, the シフト key acts as a space key, and the 飾り key acts as a return key. This allows them to function as 変換 and 無変換, respectively, in many IMEs. + +Furthermore the Fn key, when tapped, acts as an F7 key, providing easy switching to katakana in many IMEs. + +### Other features +The cut/copy button gives copy functionality on a short press, and cut functionality on a long press. + +The tmux prefix button outputs Control-B. + +The Control & Shift key acts as holding the control and shift keys at the same time. + +SelAll outputs Control-A. + +Undo outputs Control-Z. -- cgit v1.2.3 From 6fba925f413ca6cbd164f8023e83e8529f7af02a Mon Sep 17 00:00:00 2001 From: Joshua T Date: Fri, 6 Jan 2017 17:07:58 -0600 Subject: Fixed key not matching its diagram --- keyboards/ergodox/keymaps/replicaJunction/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/ergodox/keymaps/replicaJunction/keymap.c b/keyboards/ergodox/keymaps/replicaJunction/keymap.c index b7a14c10c..c9213553c 100644 --- a/keyboards/ergodox/keymaps/replicaJunction/keymap.c +++ b/keyboards/ergodox/keymaps/replicaJunction/keymap.c @@ -117,7 +117,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL,KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HOME, KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), - KC_LCTL,KC_GRV, KC_SLSH,LCTL(KC_LSFT), MO(_NU), + KC_LGUI,KC_GRV, KC_SLSH,LCTL(KC_LSFT), MO(_NU), KC_LCTL,TG(_GA), KC_HOME, -- cgit v1.2.3 From 5ce7ec9ea5f120b791c03273b4ce5ce69e4b6c8d Mon Sep 17 00:00:00 2001 From: Joshua T Date: Fri, 6 Jan 2017 17:08:14 -0600 Subject: Increased TAPPING_TERM to 200 --- keyboards/ergodox/keymaps/replicaJunction/config.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/keyboards/ergodox/keymaps/replicaJunction/config.h b/keyboards/ergodox/keymaps/replicaJunction/config.h index c620349ad..d32b46e4e 100644 --- a/keyboards/ergodox/keymaps/replicaJunction/config.h +++ b/keyboards/ergodox/keymaps/replicaJunction/config.h @@ -28,7 +28,9 @@ along with this program. If not, see . /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST -#define TAPPING_TERM 150 +// MS the button needs to be held before a tap becomes a hold (default: 200) +#define TAPPING_TERM 200 + #define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.) // I don't have any locking keys, so I don't need these features -- cgit v1.2.3 From fe517245440a031112c8a2f2ebd46210bf0e5d83 Mon Sep 17 00:00:00 2001 From: Joshua T Date: Fri, 6 Jan 2017 19:56:11 -0600 Subject: Updated Atreus layout to 0.4 Removed Alt on base layer, replaced with Function layer. Moved function keys to left hand. Added mouse keys to right hand on the function layer. Moved middle click on gaming layer to be consistent with mouse layer. Added macro _USER. Macro contents are not implemented yet. --- keyboards/atreus/keymaps/replicaJunction/keymap.c | 54 ++++++++++++----------- 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/keyboards/atreus/keymaps/replicaJunction/keymap.c b/keyboards/atreus/keymaps/replicaJunction/keymap.c index 4d46db69e..d746b4722 100644 --- a/keyboards/atreus/keymaps/replicaJunction/keymap.c +++ b/keyboards/atreus/keymaps/replicaJunction/keymap.c @@ -1,7 +1,7 @@ /* * Keyboard: Atreus * Keymap: replicaJunction - * Version: 0.3 + * Version: 0.4 * * This keymap is designed to complement my Ergodox keyboard layout, found in keyboards/ergodox_ez. * The Atreus keyboard is a 40% board whose design was heavily influenced by the Ergodox. I now @@ -42,6 +42,8 @@ #define KX_PAST LCTL(KC_V) #define KX_UNDO LCTL(KC_Z) +#define _USER 0 // User macro + ; // This doesn't do anything. It's just for VSCode because its syntax highlighting is weird for the above #define statements. const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -56,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * +------+------+------+------+------| +------+------+------+------+------| * |Z Shft| X | C | D | V | ,------. ,------. | K | H | , | . |/ Shft| * +------+------+------+------+------| | Ctrl | | Alt | +------+------+------+------+------| - * | Esc | Gui | Tab | Alt | Bksp | | Del | | Enter| |Sp/_NU| _EX | - | ' | = | + * | Esc | Gui | Tab | _FN | Bksp | | Del | | Enter| |Sp/_NU| _EX | - | ' | = | * `----------------------------------' `------' `------' `----------------------------------' * */ @@ -64,7 +66,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, SFT_T(KC_Z), KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, KC_DOT, SFT_T(KC_SLSH), - KC_ESC, KC_LGUI, KC_TAB, KC_LALT, KC_BSPC, CTL_T(KC_DEL), ALT_T(KC_ENT), LT(_NU, KC_SPC), MO(_EX), KC_MINS, KC_QUOT, KC_EQL + KC_ESC, KC_LGUI, KC_TAB, MO(_FN), KC_BSPC, CTL_T(KC_DEL), ALT_T(KC_ENT), LT(_NU, KC_SPC), MO(_EX), KC_MINS, KC_QUOT, KC_EQL ), /* @@ -77,7 +79,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * +------+------+------+------+------| +------+------+------+------+------| * |Z Shft| X | C | V | B | ,------. ,------. | N | M | , | . |/ Shft| * +------+------+------+------+------| | Ctrl | | Alt | +------+------+------+------+------| - * | Esc | Gui | Tab | Alt | Bksp | | Del | | Enter| |Sp/_NU| _EX | - | ' | = | + * | Esc | Gui | Tab | _FN | Bksp | | Del | | Enter| |Sp/_NU| _EX | - | ' | = | * `----------------------------------' `------' `------' `----------------------------------' * */ @@ -85,7 +87,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, SFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, SFT_T(KC_SLSH), - KC_ESC, KC_LGUI, KC_TAB, KC_LALT, KC_BSPC, CTL_T(KC_DEL), ALT_T(KC_ENT), LT(_NU, KC_SPC), MO(_EX), KC_MINS, KC_QUOT, KC_EQL + KC_ESC, KC_LGUI, KC_TAB, MO(_FN), KC_BSPC, CTL_T(KC_DEL), ALT_T(KC_ENT), LT(_NU, KC_SPC), MO(_EX), KC_MINS, KC_QUOT, KC_EQL ), /* @@ -96,21 +98,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * Also note that some dual-role keys are overridden here with their modifiers * * ,----------------------------------. ,----------------------------------. - * | Caps | | | |Ctrl `| | PgUp | Home | Up | End | Del | + * | | | | |Ctrl `| | PgUp | Home | Up | End | Del | * +------+------+------+------+------| +------+------+------+------+------| * | | Gui | Alt | Ctrl | | | PgDn | Left | Down | Right| Bksp | * +------+------+------+------+------| +------+------+------+------+------| * | Shift| Cut | Copy | | Paste| ,------. ,------. | | ^Tab | Tab | |Insert| - * +------+------+------+------+------| | | | | +------+------+------+------+------| - * | | | | | | | | | | | Space| | | |PrntSc| + * +------+------+------+------+------| | Del | | Enter| +------+------+------+------+------| + * | | | | | | | | | | | Space|XXXXXX| | |PrntSc| * `----------------------------------' `------' `------' `----------------------------------' * */ [_EX] = KEYMAP( /* Extend */ - KC_CAPS, _______, _______, _______, LCTL(KC_GRV), KC_PGUP, KC_HOME, KC_UP, KC_END, KC_DEL, + _______, _______, _______, _______, LCTL(KC_GRV), KC_PGUP, KC_HOME, KC_UP, KC_END, KC_DEL, _______, KC_LGUI, KC_LALT, KC_LCTL, _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_BSPC, KC_LSFT, KX_CUT, KX_COPY, _______, KX_PAST, _______, KCX_LST, KC_TAB, _______, KC_INS, - _______, _______, _______, _______, _______, _______, _______, KC_SPC, _______, _______, _______, KC_PSCR + _______, _______, _______, _______, _______, KC_DEL, KC_ENT, KC_SPC, _______, _______, _______, KC_PSCR ), /* @@ -123,7 +125,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * +------+------+------+------+------| +------+------+------+------+------| * | % | ^ | [ | ] | ` | ,------. ,------. | \ | 1 | 2 | 3 | + | * +------+------+------+------+------| | | | | +------+------+------+------+------| - * | | _GA | | _FN | | | | | | | | 0 | . | = | | + * | | _GA | | | | | | | | |XXXXXX| 0 | . | = | | * `----------------------------------' `------' `------' `----------------------------------' * */ @@ -131,28 +133,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_AMPR, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_TILD, KC_PIPE, KC_4, KC_5, KC_6, KC_MINS, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_GRV, KC_BSLS, KC_1, KC_2, KC_3, KC_PLUS, - _______, TG(_GA), _______, MO(_FN), _______, _______, _______, _______, KC_0, KC_DOT, KC_EQL, _______ + _______, TG(_GA), _______, _______, _______, _______, _______, _______, KC_0, KC_DOT, KC_EQL, _______ ), /* * Functions * * ,----------------------------------. ,----------------------------------. - * | | | | | | | | F7 | F8 | F9 | F10 | + * | Caps | F7 | F8 | F9 | F10 | | _USER|Whl Up| MUp |Whl Dn| | * +------+------+------+------+------| +------+------+------+------+------| - * | | | | | | | | F4 | F5 | F6 | F11 | + * | | F4 | F5 | F6 | F11 | | Vol ^| MLeft| MDown|MRight| | * +------+------+------+------+------| +------+------+------+------+------| - * | | Vol ^| Mute | Vol v| Play | ,------. ,------. | | F1 | F2 | F3 | F12 | - * +------+------+------+------+------| | | | | +------+------+------+------+------| - * | | | | | Stop | | | | | | | | _CO | _GA | RESET| + * | | F1 | F2 | F3 | F12 | ,------. ,------. | Vol v| | | | | + * +------+------+------+------+------| | | |RClick| +------+------+------+------+------| + * | | | |XXXXXX| | | | | | |LClick|MClick| _CO | _GA | RESET| * `----------------------------------' `------' `------' `----------------------------------' * */ [_FN] = KEYMAP( /* Functions */ - KC_DEL, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, KC_F7, KC_F8, KC_F9, KC_F10, - KC_BSPC, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, _______, KC_F4, KC_F5, KC_F6, KC_F11, - _______, KC_VOLU, KC_MUTE, KC_VOLD, KC_MPLY, _______, KC_F1, KC_F2, KC_F3, KC_F12, - _______, _______, _______, _______, KC_MSTP, _______, _______, _______, KC_NO, DF(_CO), DF(_QW), RESET + KC_CAPS, KC_F7, KC_F8, KC_F9, KC_F10, M(_USER),KC_WH_U, KC_MS_U, KC_WH_D, _______, + _______, KC_F4, KC_F5, KC_F6, KC_F11, KC_VOLU, KC_MS_L, KC_MS_D, KC_MS_R, _______, + _______, KC_F1, KC_F2, KC_F3, KC_F12, KC_VOLD, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_BTN2, KC_BTN1, KC_BTN3, DF(_CO), DF(_QW), RESET ), /* @@ -163,17 +165,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * +------+------+------+------+------| +------+------+------+------+------| * | | | | | | | | MLeft| MDown|MRight| | * +------+------+------+------+------| +------+------+------+------+------| - * | Z | | | | | ,------. ,------. |MClick| | | | | + * | Z | | | | | ,------. ,------. | | | | | | * +------+------+------+------+------| | Bksp | |RClick| +------+------+------+------+------| - * | | _GA | | Shift| Space| | | | | |LClick| | | | | + * | | _GA | | Shift| Space| | | | | |LClick|MClick| | | | * `----------------------------------' `------' `------' `----------------------------------' * */ [_GA] = KEYMAP( /* Gaming */ _______, _______, _______, _______, _______, _______, KC_WH_U, KC_MS_U, KC_WH_D, _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, - KC_Z, _______, _______, _______, _______, KC_BTN3, _______, KC_MS_D, _______, _______, - _______, TG(_GA), _______, KC_LSFT, KC_SPC, KC_BSPC, KC_BTN2, KC_BTN1, _______, _______, _______, _______ + KC_Z, _______, _______, _______, _______, _______, _______, KC_MS_D, _______, _______, + _______, TG(_GA), _______, KC_LSFT, KC_SPC, KC_BSPC, KC_BTN2, KC_BTN1, KC_BTN3, _______, _______, _______ )}; /* @@ -199,7 +201,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function switch(id) { - case 0: + case _USER: if (record->event.pressed) { register_code(KC_RSFT); } else { -- cgit v1.2.3 From 677ae86bdea2af7dcc35b17b0cea3e1e4374b4ca Mon Sep 17 00:00:00 2001 From: Joshua T Date: Sat, 7 Jan 2017 13:07:55 -0600 Subject: Added another Shift on Extend layer. This moves the GUI key to the pinkie, but honestly, I never use that function anyway. --- keyboards/atreus/keymaps/replicaJunction/keymap.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/keyboards/atreus/keymaps/replicaJunction/keymap.c b/keyboards/atreus/keymaps/replicaJunction/keymap.c index d746b4722..d39a184d4 100644 --- a/keyboards/atreus/keymaps/replicaJunction/keymap.c +++ b/keyboards/atreus/keymaps/replicaJunction/keymap.c @@ -100,7 +100,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,----------------------------------. ,----------------------------------. * | | | | |Ctrl `| | PgUp | Home | Up | End | Del | * +------+------+------+------+------| +------+------+------+------+------| - * | | Gui | Alt | Ctrl | | | PgDn | Left | Down | Right| Bksp | + * | Gui | Shift| Alt | Ctrl | | | PgDn | Left | Down | Right| Bksp | * +------+------+------+------+------| +------+------+------+------+------| * | Shift| Cut | Copy | | Paste| ,------. ,------. | | ^Tab | Tab | |Insert| * +------+------+------+------+------| | Del | | Enter| +------+------+------+------+------| @@ -110,7 +110,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_EX] = KEYMAP( /* Extend */ _______, _______, _______, _______, LCTL(KC_GRV), KC_PGUP, KC_HOME, KC_UP, KC_END, KC_DEL, - _______, KC_LGUI, KC_LALT, KC_LCTL, _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_BSPC, + KC_LGUI, KC_LSFT, KC_LALT, KC_LCTL, _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_BSPC, KC_LSFT, KX_CUT, KX_COPY, _______, KX_PAST, _______, KCX_LST, KC_TAB, _______, KC_INS, _______, _______, _______, _______, _______, KC_DEL, KC_ENT, KC_SPC, _______, _______, _______, KC_PSCR ), @@ -140,20 +140,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * Functions * * ,----------------------------------. ,----------------------------------. - * | Caps | F7 | F8 | F9 | F10 | | _USER|Whl Up| MUp |Whl Dn| | + * | Caps | F9 | F10 | F11 | F12 | | _USER|Whl Up| MUp |Whl Dn| | * +------+------+------+------+------| +------+------+------+------+------| - * | | F4 | F5 | F6 | F11 | | Vol ^| MLeft| MDown|MRight| | + * | | F5 | F6 | F7 | F8 | | Vol ^| MLeft| MDown|MRight| | * +------+------+------+------+------| +------+------+------+------+------| - * | | F1 | F2 | F3 | F12 | ,------. ,------. | Vol v| | | | | + * | | F1 | F2 | F3 | F4 | ,------. ,------. | Vol v| | | | | * +------+------+------+------+------| | | |RClick| +------+------+------+------+------| * | | | |XXXXXX| | | | | | |LClick|MClick| _CO | _GA | RESET| * `----------------------------------' `------' `------' `----------------------------------' * */ [_FN] = KEYMAP( /* Functions */ - KC_CAPS, KC_F7, KC_F8, KC_F9, KC_F10, M(_USER),KC_WH_U, KC_MS_U, KC_WH_D, _______, - _______, KC_F4, KC_F5, KC_F6, KC_F11, KC_VOLU, KC_MS_L, KC_MS_D, KC_MS_R, _______, - _______, KC_F1, KC_F2, KC_F3, KC_F12, KC_VOLD, _______, _______, _______, _______, + KC_CAPS, KC_F9, KC_F10, KC_F11, KC_F12, M(_USER),KC_WH_U, KC_MS_U, KC_WH_D, _______, + _______, KC_F5, KC_F6, KC_F7, KC_F8, KC_VOLU, KC_MS_L, KC_MS_D, KC_MS_R, _______, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_VOLD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BTN2, KC_BTN1, KC_BTN3, DF(_CO), DF(_QW), RESET ), -- cgit v1.2.3 From b7b44dc481430438552d91b7069d5e37a5e3a649 Mon Sep 17 00:00:00 2001 From: Joshua T Date: Sat, 7 Jan 2017 13:57:51 -0600 Subject: Updated README and images to reflect latest keymap --- .../atreus-replica-base-colemakdh.png | Bin 76319 -> 0 bytes .../keymaps/replicaJunction/atreus-replica-base.png | Bin 0 -> 75363 bytes .../replicaJunction/atreus-replica-extend.png | Bin 91555 -> 92445 bytes .../replicaJunction/atreus-replica-function.png | Bin 92516 -> 91749 bytes .../keymaps/replicaJunction/atreus-replica-game.png | Bin 72509 -> 72856 bytes .../keymaps/replicaJunction/atreus-replica-num.png | Bin 73171 -> 74690 bytes keyboards/atreus/keymaps/replicaJunction/readme.md | 16 ++++++++++------ 7 files changed, 10 insertions(+), 6 deletions(-) delete mode 100644 keyboards/atreus/keymaps/replicaJunction/atreus-replica-base-colemakdh.png create mode 100644 keyboards/atreus/keymaps/replicaJunction/atreus-replica-base.png diff --git a/keyboards/atreus/keymaps/replicaJunction/atreus-replica-base-colemakdh.png b/keyboards/atreus/keymaps/replicaJunction/atreus-replica-base-colemakdh.png deleted file mode 100644 index 4640f9f52..000000000 Binary files a/keyboards/atreus/keymaps/replicaJunction/atreus-replica-base-colemakdh.png and /dev/null differ diff --git a/keyboards/atreus/keymaps/replicaJunction/atreus-replica-base.png b/keyboards/atreus/keymaps/replicaJunction/atreus-replica-base.png new file mode 100644 index 000000000..1d5bd78db Binary files /dev/null and b/keyboards/atreus/keymaps/replicaJunction/atreus-replica-base.png differ diff --git a/keyboards/atreus/keymaps/replicaJunction/atreus-replica-extend.png b/keyboards/atreus/keymaps/replicaJunction/atreus-replica-extend.png index 08c2e6140..cf4db3e2c 100644 Binary files a/keyboards/atreus/keymaps/replicaJunction/atreus-replica-extend.png and b/keyboards/atreus/keymaps/replicaJunction/atreus-replica-extend.png differ diff --git a/keyboards/atreus/keymaps/replicaJunction/atreus-replica-function.png b/keyboards/atreus/keymaps/replicaJunction/atreus-replica-function.png index 34ad03dec..30e5621e4 100644 Binary files a/keyboards/atreus/keymaps/replicaJunction/atreus-replica-function.png and b/keyboards/atreus/keymaps/replicaJunction/atreus-replica-function.png differ diff --git a/keyboards/atreus/keymaps/replicaJunction/atreus-replica-game.png b/keyboards/atreus/keymaps/replicaJunction/atreus-replica-game.png index 14ae35b54..95f8be5e0 100644 Binary files a/keyboards/atreus/keymaps/replicaJunction/atreus-replica-game.png and b/keyboards/atreus/keymaps/replicaJunction/atreus-replica-game.png differ diff --git a/keyboards/atreus/keymaps/replicaJunction/atreus-replica-num.png b/keyboards/atreus/keymaps/replicaJunction/atreus-replica-num.png index 6598acb27..3c445f90c 100644 Binary files a/keyboards/atreus/keymaps/replicaJunction/atreus-replica-num.png and b/keyboards/atreus/keymaps/replicaJunction/atreus-replica-num.png differ diff --git a/keyboards/atreus/keymaps/replicaJunction/readme.md b/keyboards/atreus/keymaps/replicaJunction/readme.md index 21af48e8f..6ac3cb00a 100644 --- a/keyboards/atreus/keymaps/replicaJunction/readme.md +++ b/keyboards/atreus/keymaps/replicaJunction/readme.md @@ -10,13 +10,15 @@ I won't claim that this layout is perfect for everyone. It does make several sig ## Base Layer ## -![Atreus base layout](atreus-replica-base-colemakdh.png) +![Atreus base layout](atreus-replica-base.png) The letters on this layout are arranged in the [Colemak Mod-DH layout](https://colemakmods.github.io/mod-dh/). -Note that there are four dual-purpose keys: Shift (Backspace), Ctrl (Delete), Alt (Enter), and Space (Number layer). In QMK, these dual-role keys can be made to hold their primary key by double-tapping the key and holding on the second tap. For example, if I wanted to insert a long string of Spaces, I would tap the Space key, then tap it again and hold. A single press and hold would trigger the secondary function of the key instead. +The primary mechanism for the Shift keys in this keyboard are the dual-role Z and slash keys. Pressing the key sends the keystroke, while holding the key sends a shift. This is a design choice taken from the xyverz layout, and one I find much more intuitive than a thumb shift. In addition, the pinky doesn't need to stretch as far to reach these keys as it does to reach a standard Shift key. -The secondary Alt on the left bottom row exists to provide a single-hand Alt+Tab shortcut, which would take two rows otherwise. +Occasionally, when typing the letter Z, I'll hold the key down a fraction of a second too long, and the keyboard will shift instead. If you're not a confident typist, this dual-role Shift key layout is probably not a good solution. In that case, I'd suggest moving Shift onto the Backspace key (press for Backspace, hold for Shift). + +In addition to the Shift keys, there are three dual-purpose keys: Ctrl (Delete), Alt (Enter), and Space (Number layer). In QMK, these dual-role keys can be made to hold their primary key with a tap and hold. For example, if I wanted to insert a long string of Spaces, I would tap the Space key, then tap it again and hold. A single press and hold would trigger the secondary function of the key instead. ## Extend Layer ## @@ -42,9 +44,11 @@ This layer also provides plenty of symbol shortcuts. Most of these can be access ![Atreus function layer](atreus-replica-function.png) -Function keys (F1-F12) are on this layer, as well as some more generic "functions" such as media keys. I've also set up a mirror image of the arrows from the Extend layer in case I need to use these with my left hand, but I don't do this very often. +Function keys (F1-F12) are on this layer. Their layout in groups of four comes from Jeremy's Atreus layout in this repository. I'd been using 1-9 in a numpad layout, then adding 10-12 on the side...I suppose it took seeing someone else do it this way for me to realize how much more sense it makes. + +On the right side are mouse keys - cursor left/right/up/down, and scroll up/down. Volume keys are also here, though really only because there was room for them (I'm not entirely happy with their positions). -The reset key is on this layer, as well as a toggle from Colemak to QWERTY and back. The QWERTY layer is not currently documented, but it is functionally identical to the base layer except for letter positions. +Finally, the reset key is on this layer, as well as toggles from Colemak to QWERTY and back. The QWERTY layer is not currently documented, but it is functionally identical to the base layer except for letter positions. ## Gaming Layer ## @@ -54,4 +58,4 @@ This is a small layer developed to allow some simple gameplay without a mouse. T The keys on the left hand bring Space into the left thumb's reach, as well as overriding the dual-role Shift with its standard function (Z in both QWERTY and in Colemak). This allows easy Shift presses without blocking the Z key, commonly used in games. -I would probably not consider this a hard-core gaming keyboard, and this layout does have the huge problem of blocking access to the number keys, but for more casual games, it plays quite well. I've used it quite a bit on Minecraft, for example, and I'm quite pleased with it. \ No newline at end of file +I would probably not consider the Atreus a hard-core gaming keyboard in the first place, and this layout does have the huge problem of blocking access to the number keys, but for more casual games, it plays quite well. I've used it quite a bit on Minecraft, for example, and I'm quite pleased with it. \ No newline at end of file -- cgit v1.2.3 From cfb45027bb08ac271d43ac087952b8da71309a00 Mon Sep 17 00:00:00 2001 From: Joshua T Date: Sat, 7 Jan 2017 14:05:04 -0600 Subject: Removed build.bat Make.exe is easy enough to use, and there's no real sense in having a wrapper aroung it. --- util/build.bat | 51 --------------------------------------------------- 1 file changed, 51 deletions(-) delete mode 100644 util/build.bat diff --git a/util/build.bat b/util/build.bat deleted file mode 100644 index 316bbfd54..000000000 --- a/util/build.bat +++ /dev/null @@ -1,51 +0,0 @@ -@echo off - -rem Use this batch file from within an IDE to automatically build your firmware. -rem You can pass command-line arguments to indicate which keyboard and keymap to build. -rem -rem Usage: -rem vscode-build.bat "Working directory" "Keyboard" "Keymap" -rem -rem Ex. vscode-build.bat C:\Projects\qmk_firmware Planck default - -SET ROOTDIR="%~dp0..\" - -rem Modify this to define your keyboard -rem SET KEYBOARD="ergodox_ez" -if [%1]==[] ( - echo. Keyboard is undefined; defaulting to Planck - SET KEYBOARD="Planck" -) ELSE ( - SET KEYBOARD="%1" -) - -rem Modify this line to adjust your keymap. -rem SET KEYMAP="replicaJunction" -if [%2]==[] ( - echo. Keyboard is undefined; defaulting to default - SET KEYMAP="default" -) ELSE ( - SET KEYMAP="%2" -) - -echo. -echo. -------------- -echo. Build started. -echo. -------------- -echo. -echo. Working directory: %ROOTDIR% -echo. Keyboard: %KEYBOARD% -echo. Keymap: %KEYMAP% -echo. -echo. -CD /D "%ROOTDIR%" -echo. Cleaning build directory... -make clean KEYBOARD=%KEYBOARD% KEYMAP=%KEYMAP% -echo. -echo. Making keyboard %KEYBOARD% with keymap %KEYMAP% -make KEYBOARD=%KEYBOARD% KEYMAP=%KEYMAP% -echo. -echo. ---------------- -echo. Build completed. -echo. ---------------- -exit /b \ No newline at end of file -- cgit v1.2.3 From b0a9bd319bf5535e2762746da8ff77dd3cf87ca4 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Sun, 8 Jan 2017 22:45:16 +0700 Subject: om telolet om --- keyboards/planck/keymaps/priyadi/Makefile | 2 +- keyboards/planck/keymaps/priyadi/keymap.c | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/keyboards/planck/keymaps/priyadi/Makefile b/keyboards/planck/keymaps/priyadi/Makefile index d9d4f3d1d..336608b8c 100644 --- a/keyboards/planck/keymaps/priyadi/Makefile +++ b/keyboards/planck/keymaps/priyadi/Makefile @@ -10,7 +10,7 @@ COMMAND_ENABLE = no # 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 = yes # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = yes # Audio output on port C6 +AUDIO_ENABLE = yes # Audio output on port C6 UNICODE_ENABLE = no # Unicode UNICODEMAP_ENABLE = yes # Unicode map BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/planck/keymaps/priyadi/keymap.c b/keyboards/planck/keymaps/priyadi/keymap.c index f0dafebf3..57fe86ff7 100644 --- a/keyboards/planck/keymaps/priyadi/keymap.c +++ b/keyboards/planck/keymaps/priyadi/keymap.c @@ -11,6 +11,8 @@ #include "process_unicode.h" #include "quantum.h" +// #define TOLELOT_ENABLE + extern keymap_config_t keymap_config; enum layers { @@ -323,6 +325,7 @@ float tone_windows[][2] = SONG(SCROLL_LOCK_ON_SOUND); float tone_osx[][2] = SONG(NUM_LOCK_ON_SOUND); float tone_click[][2] = SONG(MUSICAL_NOTE(_F3, 2)); float tone_release[][2] = SONG(MUSICAL_NOTE(_A3, 2)); +float tone_tolelot[][2] = SONG(Q__NOTE(_E5), Q__NOTE(_C5), Q__NOTE(_D5)); #endif void persistant_default_layer_set(uint16_t default_layer) { @@ -334,12 +337,18 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // faux clicky // if (record->event.pressed) PLAY_NOTE_ARRAY(tone_click, false, 0); #ifdef AUDIO_ENABLE + #ifdef TOLELOT_ENABLE + if (record->event.pressed) { + PLAY_NOTE_ARRAY(tone_tolelot, false, 0); + } + #else if (record->event.pressed) { PLAY_NOTE_ARRAY(tone_click, false, 0); } else { PLAY_NOTE_ARRAY(tone_release, false, 0); } #endif + #endif switch (keycode) { // QWERTZ style comma and dot: semicolon and colon when shifted -- cgit v1.2.3 From 58b2536bf106fd18a265843ba43784fa3e6be384 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Sun, 8 Jan 2017 22:45:16 +0700 Subject: om telolet om --- keyboards/planck/keymaps/priyadi/Makefile | 2 +- keyboards/planck/keymaps/priyadi/keymap.c | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/keyboards/planck/keymaps/priyadi/Makefile b/keyboards/planck/keymaps/priyadi/Makefile index d9d4f3d1d..336608b8c 100644 --- a/keyboards/planck/keymaps/priyadi/Makefile +++ b/keyboards/planck/keymaps/priyadi/Makefile @@ -10,7 +10,7 @@ COMMAND_ENABLE = no # 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 = yes # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = yes # Audio output on port C6 +AUDIO_ENABLE = yes # Audio output on port C6 UNICODE_ENABLE = no # Unicode UNICODEMAP_ENABLE = yes # Unicode map BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/planck/keymaps/priyadi/keymap.c b/keyboards/planck/keymaps/priyadi/keymap.c index f0dafebf3..57fe86ff7 100644 --- a/keyboards/planck/keymaps/priyadi/keymap.c +++ b/keyboards/planck/keymaps/priyadi/keymap.c @@ -11,6 +11,8 @@ #include "process_unicode.h" #include "quantum.h" +// #define TOLELOT_ENABLE + extern keymap_config_t keymap_config; enum layers { @@ -323,6 +325,7 @@ float tone_windows[][2] = SONG(SCROLL_LOCK_ON_SOUND); float tone_osx[][2] = SONG(NUM_LOCK_ON_SOUND); float tone_click[][2] = SONG(MUSICAL_NOTE(_F3, 2)); float tone_release[][2] = SONG(MUSICAL_NOTE(_A3, 2)); +float tone_tolelot[][2] = SONG(Q__NOTE(_E5), Q__NOTE(_C5), Q__NOTE(_D5)); #endif void persistant_default_layer_set(uint16_t default_layer) { @@ -334,12 +337,18 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // faux clicky // if (record->event.pressed) PLAY_NOTE_ARRAY(tone_click, false, 0); #ifdef AUDIO_ENABLE + #ifdef TOLELOT_ENABLE + if (record->event.pressed) { + PLAY_NOTE_ARRAY(tone_tolelot, false, 0); + } + #else if (record->event.pressed) { PLAY_NOTE_ARRAY(tone_click, false, 0); } else { PLAY_NOTE_ARRAY(tone_release, false, 0); } #endif + #endif switch (keycode) { // QWERTZ style comma and dot: semicolon and colon when shifted -- cgit v1.2.3 From 02055406e88253440decfc1af73bc8662e6ebd98 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Mon, 9 Jan 2017 02:50:13 +0700 Subject: Greek alphabet layer --- keyboards/planck/keymaps/priyadi/keymap.c | 187 +++++++++++++++++++++++++++++- 1 file changed, 183 insertions(+), 4 deletions(-) diff --git a/keyboards/planck/keymaps/priyadi/keymap.c b/keyboards/planck/keymaps/priyadi/keymap.c index 57fe86ff7..2e979221a 100644 --- a/keyboards/planck/keymaps/priyadi/keymap.c +++ b/keyboards/planck/keymaps/priyadi/keymap.c @@ -23,6 +23,8 @@ enum layers { _NUM, _FUNC, _EMOJI, + _GREEKU, + _GREEKL, _GUI, }; @@ -38,6 +40,7 @@ enum planck_keycodes { FUNC, EMOJI, GUI, + GREEK, // os switchers LINUX, @@ -100,6 +103,59 @@ enum unicode_name { SUN, // sun MOON, // moon SKULL, // skull + + // greek letters + UALPH, + UBETA, + UGAMM, + UDELT, + UEPSI, + UZETA, + UETA, + UTHET, + UIOTA, + UKAPP, + ULAMB, + UMU, + UNU, + UXI, + UOMIC, + UPI, + URHO, + USIGM, + UTAU, + UUPSI, + UPHI, + UCHI, + UPSI, + UOMEG, + + LALPH, + LBETA, + LGAMM, + LDELT, + LEPSI, + LZETA, + LETA, + LTHET, + LIOTA, + LKAPP, + LLAMB, + LMU, + LNU, + LXI, + LOMIC, + LPI, + LRHO, + LSIGM, + LTAU, + LUPSI, + LPHI, + LCHI, + LPSI, + LOMEG, + + FSIGM, }; const uint32_t PROGMEM unicode_map[] = { @@ -150,6 +206,57 @@ const uint32_t PROGMEM unicode_map[] = { [SUN] = 0x2600, [MOON] = 0x1F314, [SKULL] = 0x1F480, + + // greek letters + [UALPH] = 0x0391, + [UBETA] = 0x0392, + [UGAMM] = 0x0393, + [UDELT] = 0x0394, + [UEPSI] = 0x0395, + [UZETA] = 0x0396, + [UETA] = 0x0397, + [UTHET] = 0x0398, + [UIOTA] = 0x0399, + [UKAPP] = 0x039A, + [ULAMB] = 0x039B, + [UMU] = 0x039C, + [UNU] = 0x039D, + [UXI] = 0x039E, + [UOMIC] = 0x039F, + [UPI] = 0x03A0, + [URHO] = 0x03A1, + [USIGM] = 0x03A3, + [UTAU] = 0x03A4, + [UUPSI] = 0x03A5, + [UPHI] = 0x03A6, + [UCHI] = 0x03A7, + [UPSI] = 0x03A8, + [UOMEG] = 0x03A9, + [LALPH] = 0x03B1, + [LBETA] = 0x03B2, + [LGAMM] = 0x03B3, + [LDELT] = 0x03B4, + [LEPSI] = 0x03B5, + [LZETA] = 0x03B6, + [LETA] = 0x03B7, + [LTHET] = 0x03B8, + [LIOTA] = 0x03B9, + [LKAPP] = 0x03BA, + [LLAMB] = 0x03BB, + [LMU] = 0x03BC, + [LNU] = 0x03BD, + [LXI] = 0x03BE, + [LOMIC] = 0x03BF, + [LPI] = 0x03C0, + [LRHO] = 0x03C1, + [LSIGM] = 0x03C3, + [LTAU] = 0x03C4, + [LUPSI] = 0x03C5, + [LPHI] = 0x03C6, + [LCHI] = 0x03C7, + [LPSI] = 0x03C8, + [LOMEG] = 0x03C9, + [FSIGM] = 0x03C2, }; @@ -176,14 +283,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| Z | X | C | V | B | N | M | , | . | / |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | GUI | Alt | Punc | Num | Space | Func |Emoji |AltGr | GUI | Ctrl | + * | Ctrl | GUI | Alt | Punc | Num | Space | Func |Emoji |Greek |AltGr | Ctrl | * `-----------------------------------------------------------------------------------' */ [_QWERTY] = { {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, {KC_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}, - {KC_LCTL, KC_LGUI, KC_LALT, PUNC, NUM, KC_SPC, KC_SPC, FUNC, EMOJI, KC_RALT, KC_RGUI, KC_RCTL} + {KC_LCTL, KC_LALT, KC_LGUI, PUNC, NUM, KC_SPC, KC_SPC, FUNC, EMOJI, GREEK, KC_RALT, KC_RCTL} }, /* Colemak @@ -222,6 +329,42 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} }, +/* Uppercase Greek + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_GREEKU] = { + {_______, _______, _______,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), _______, _______}, + {_______,X(UZETA), X(UCHI), X(UPSI),X(UOMEG),X(UBETA), X(UNU), X(UMU), _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +}, + +/* Lowercase Greek + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_GREEKL] = { + {_______, _______,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), _______, _______}, + {_______,X(LZETA), X(LCHI), X(LPSI),X(LOMEG),X(LBETA), X(LNU), X(LMU), _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +}, + /* Punc * ,-----------------------------------------------------------------------------------. * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | ` | @@ -350,12 +493,48 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #endif #endif + bool lshifted = keyboard_report->mods & MOD_BIT(KC_LSFT); + bool rshifted = keyboard_report->mods & MOD_BIT(KC_RSFT); + switch (keycode) { + // Greek layer handling + case GREEK: + if (record->event.pressed) { + if (lshifted || rshifted) { + layer_on(_GREEKU); + layer_off(_GREEKL); + } else { + layer_on(_GREEKL); + layer_off(_GREEKU); + } + } else { + layer_off(_GREEKU); + layer_off(_GREEKL); + } + return false; + break; + + case KC_LSFT: + case KC_RSFT: + ; + uint8_t layer = biton32(layer_state); + if (layer == _GREEKU || layer == _GREEKL) { + if (record->event.pressed) { + layer_on(_GREEKU); + layer_off(_GREEKL); + } else { + if (lshifted ^ rshifted) { // if only one shift is pressed + layer_on(_GREEKL); + layer_off(_GREEKU); + } + } + } + return true; + break; + // QWERTZ style comma and dot: semicolon and colon when shifted case KC_COMM: if (record->event.pressed) { - bool lshifted = keyboard_report->mods & MOD_BIT(KC_LSFT); - bool rshifted = keyboard_report->mods & MOD_BIT(KC_RSFT); if (lshifted || rshifted) { if (lshifted) unregister_code(KC_LSFT); if (rshifted) unregister_code(KC_RSFT); -- cgit v1.2.3 From 30b80a23f3cafd846937b37b249f2df4411e1f5a Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Mon, 9 Jan 2017 02:59:10 +0700 Subject: Unregister all mods before inputting Unicode, and reregister afterwards --- quantum/process_keycode/process_unicode.c | 41 +++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/quantum/process_keycode/process_unicode.c b/quantum/process_keycode/process_unicode.c index cd3a610b4..a30e93ae3 100644 --- a/quantum/process_keycode/process_unicode.c +++ b/quantum/process_keycode/process_unicode.c @@ -1,6 +1,8 @@ #include "process_unicode.h" +#include "action_util.h" static uint8_t input_mode; +uint8_t mods; __attribute__((weak)) uint16_t hex_to_keycode(uint8_t hex) @@ -25,6 +27,19 @@ uint8_t get_unicode_input_mode(void) { __attribute__((weak)) void unicode_input_start (void) { + // save current mods + mods = keyboard_report->mods; + + // unregister all mods to start from clean state + if (mods & MOD_BIT(KC_LSFT)) unregister_code(KC_LSFT); + if (mods & MOD_BIT(KC_RSFT)) unregister_code(KC_RSFT); + if (mods & MOD_BIT(KC_LCTL)) unregister_code(KC_LCTL); + if (mods & MOD_BIT(KC_RCTL)) unregister_code(KC_RCTL); + if (mods & MOD_BIT(KC_LALT)) unregister_code(KC_LALT); + if (mods & MOD_BIT(KC_RALT)) unregister_code(KC_RALT); + if (mods & MOD_BIT(KC_LGUI)) unregister_code(KC_LGUI); + if (mods & MOD_BIT(KC_RGUI)) unregister_code(KC_RGUI); + switch(input_mode) { case UC_OSX: register_code(KC_LALT); @@ -54,15 +69,25 @@ void unicode_input_start (void) { __attribute__((weak)) void unicode_input_finish (void) { switch(input_mode) { - case UC_OSX: - case UC_WIN: - unregister_code(KC_LALT); - break; - case UC_LNX: - register_code(KC_SPC); - unregister_code(KC_SPC); - break; + case UC_OSX: + case UC_WIN: + unregister_code(KC_LALT); + break; + case UC_LNX: + register_code(KC_SPC); + unregister_code(KC_SPC); + break; } + + // reregister previously set mods + if (mods & MOD_BIT(KC_LSFT)) register_code(KC_LSFT); + if (mods & MOD_BIT(KC_RSFT)) register_code(KC_RSFT); + if (mods & MOD_BIT(KC_LCTL)) register_code(KC_LCTL); + if (mods & MOD_BIT(KC_RCTL)) register_code(KC_RCTL); + if (mods & MOD_BIT(KC_LALT)) register_code(KC_LALT); + if (mods & MOD_BIT(KC_RALT)) register_code(KC_RALT); + if (mods & MOD_BIT(KC_LGUI)) register_code(KC_LGUI); + if (mods & MOD_BIT(KC_RGUI)) register_code(KC_RGUI); } void register_hex(uint16_t hex) { -- cgit v1.2.3 From f74ff86f9c5f3dfe1ee2b6e2b6d82edd4935ba1f Mon Sep 17 00:00:00 2001 From: milestogo Date: Sun, 8 Jan 2017 22:02:01 -0800 Subject: kinesis remap --- keyboards/kinesis/Makefile | 4 +- keyboards/kinesis/alvicstep/Makefile | 3 + keyboards/kinesis/alvicstep/alvicstep.c | 105 ++++ keyboards/kinesis/alvicstep/alvicstep.h | 67 +++ keyboards/kinesis/alvicstep/config.h | 35 ++ .../alvicstep/docs/docs/kicad/kinesis-cache.lib | 232 ++++++++ .../kinesis/alvicstep/docs/docs/kicad/kinesis.pro | 83 +++ .../kinesis/alvicstep/docs/docs/kicad/kinesis.sch | 634 +++++++++++++++++++++ .../alvicstep/docs/docs/photos/P1050573.jpg | Bin 0 -> 177711 bytes .../alvicstep/docs/docs/photos/P1050574.jpg | Bin 0 -> 343978 bytes .../alvicstep/docs/docs/photos/P1050575.jpg | Bin 0 -> 266771 bytes keyboards/kinesis/alvicstep/docs/docs/readme.txt | 52 ++ .../kinesis/alvicstep/docs/docs/schematic.png | Bin 0 -> 175014 bytes .../kinesis/alvicstep/docs/kicad/kinesis-cache.lib | 232 ++++++++ keyboards/kinesis/alvicstep/docs/kicad/kinesis.pro | 83 +++ keyboards/kinesis/alvicstep/docs/kicad/kinesis.sch | 634 +++++++++++++++++++++ .../kinesis/alvicstep/docs/photos/P1050573.jpg | Bin 0 -> 177711 bytes .../kinesis/alvicstep/docs/photos/P1050574.jpg | Bin 0 -> 343978 bytes .../kinesis/alvicstep/docs/photos/P1050575.jpg | Bin 0 -> 266771 bytes keyboards/kinesis/alvicstep/docs/readme.txt | 52 ++ keyboards/kinesis/alvicstep/docs/schematic.png | Bin 0 -> 175014 bytes keyboards/kinesis/alvicstep/matrix.c | 228 ++++++++ keyboards/kinesis/alvicstep/readme.md | 46 ++ keyboards/kinesis/alvicstep/rules.mk | 10 + keyboards/kinesis/config.h | 49 +- keyboards/kinesis/docs/kicad/kinesis-cache.lib | 232 -------- keyboards/kinesis/docs/kicad/kinesis.pro | 83 --- keyboards/kinesis/docs/kicad/kinesis.sch | 634 --------------------- keyboards/kinesis/docs/photos/P1050573.jpg | Bin 177711 -> 0 bytes keyboards/kinesis/docs/photos/P1050574.jpg | Bin 343978 -> 0 bytes keyboards/kinesis/docs/photos/P1050575.jpg | Bin 266771 -> 0 bytes keyboards/kinesis/docs/readme.txt | 52 -- keyboards/kinesis/docs/schematic.png | Bin 175014 -> 0 bytes keyboards/kinesis/keymaps/default/keymap.c | 32 +- keyboards/kinesis/keymaps/dvorak/Makefile | 21 + keyboards/kinesis/keymaps/dvorak/config.h | 8 + keyboards/kinesis/keymaps/dvorak/keymap.c | 93 +++ keyboards/kinesis/keymaps/milestogo/Makefile | 21 + keyboards/kinesis/keymaps/milestogo/config.h | 8 + keyboards/kinesis/keymaps/milestogo/keymap.c | 331 +++++++++++ keyboards/kinesis/keymaps/milestogo/readme.md | 2 + keyboards/kinesis/kinesis.c | 105 ---- keyboards/kinesis/kinesis.h | 70 +-- keyboards/kinesis/matrix.c | 228 -------- keyboards/kinesis/readme.md | 42 +- keyboards/kinesis/stapelberg/Makefile | 3 + keyboards/kinesis/stapelberg/config.h | 50 ++ .../kinesis/stapelberg/images/controller_board.jpg | Bin 0 -> 129312 bytes .../kinesis/stapelberg/images/exterior_reset.jpg | Bin 0 -> 97794 bytes .../kinesis/stapelberg/images/teensy_detail.jpg | Bin 0 -> 119748 bytes keyboards/kinesis/stapelberg/readme.md | 55 ++ keyboards/kinesis/stapelberg/rules.mk | 10 + keyboards/kinesis/stapelberg/stapelberg.c | 28 + keyboards/kinesis/stapelberg/stapelberg.h | 72 +++ 54 files changed, 3234 insertions(+), 1495 deletions(-) create mode 100644 keyboards/kinesis/alvicstep/Makefile create mode 100644 keyboards/kinesis/alvicstep/alvicstep.c create mode 100644 keyboards/kinesis/alvicstep/alvicstep.h create mode 100644 keyboards/kinesis/alvicstep/config.h create mode 100644 keyboards/kinesis/alvicstep/docs/docs/kicad/kinesis-cache.lib create mode 100644 keyboards/kinesis/alvicstep/docs/docs/kicad/kinesis.pro create mode 100644 keyboards/kinesis/alvicstep/docs/docs/kicad/kinesis.sch create mode 100644 keyboards/kinesis/alvicstep/docs/docs/photos/P1050573.jpg create mode 100644 keyboards/kinesis/alvicstep/docs/docs/photos/P1050574.jpg create mode 100644 keyboards/kinesis/alvicstep/docs/docs/photos/P1050575.jpg create mode 100644 keyboards/kinesis/alvicstep/docs/docs/readme.txt create mode 100644 keyboards/kinesis/alvicstep/docs/docs/schematic.png create mode 100644 keyboards/kinesis/alvicstep/docs/kicad/kinesis-cache.lib create mode 100644 keyboards/kinesis/alvicstep/docs/kicad/kinesis.pro create mode 100644 keyboards/kinesis/alvicstep/docs/kicad/kinesis.sch create mode 100644 keyboards/kinesis/alvicstep/docs/photos/P1050573.jpg create mode 100644 keyboards/kinesis/alvicstep/docs/photos/P1050574.jpg create mode 100644 keyboards/kinesis/alvicstep/docs/photos/P1050575.jpg create mode 100644 keyboards/kinesis/alvicstep/docs/readme.txt create mode 100644 keyboards/kinesis/alvicstep/docs/schematic.png create mode 100644 keyboards/kinesis/alvicstep/matrix.c create mode 100644 keyboards/kinesis/alvicstep/readme.md create mode 100644 keyboards/kinesis/alvicstep/rules.mk delete mode 100644 keyboards/kinesis/docs/kicad/kinesis-cache.lib delete mode 100644 keyboards/kinesis/docs/kicad/kinesis.pro delete mode 100644 keyboards/kinesis/docs/kicad/kinesis.sch delete mode 100644 keyboards/kinesis/docs/photos/P1050573.jpg delete mode 100644 keyboards/kinesis/docs/photos/P1050574.jpg delete mode 100644 keyboards/kinesis/docs/photos/P1050575.jpg delete mode 100644 keyboards/kinesis/docs/readme.txt delete mode 100644 keyboards/kinesis/docs/schematic.png create mode 100644 keyboards/kinesis/keymaps/dvorak/Makefile create mode 100644 keyboards/kinesis/keymaps/dvorak/config.h create mode 100644 keyboards/kinesis/keymaps/dvorak/keymap.c create mode 100644 keyboards/kinesis/keymaps/milestogo/Makefile create mode 100644 keyboards/kinesis/keymaps/milestogo/config.h create mode 100644 keyboards/kinesis/keymaps/milestogo/keymap.c create mode 100644 keyboards/kinesis/keymaps/milestogo/readme.md delete mode 100644 keyboards/kinesis/matrix.c create mode 100644 keyboards/kinesis/stapelberg/Makefile create mode 100644 keyboards/kinesis/stapelberg/config.h create mode 100644 keyboards/kinesis/stapelberg/images/controller_board.jpg create mode 100644 keyboards/kinesis/stapelberg/images/exterior_reset.jpg create mode 100644 keyboards/kinesis/stapelberg/images/teensy_detail.jpg create mode 100644 keyboards/kinesis/stapelberg/readme.md create mode 100644 keyboards/kinesis/stapelberg/rules.mk create mode 100644 keyboards/kinesis/stapelberg/stapelberg.c create mode 100644 keyboards/kinesis/stapelberg/stapelberg.h diff --git a/keyboards/kinesis/Makefile b/keyboards/kinesis/Makefile index 4e2a6f00f..fbf05ca4a 100644 --- a/keyboards/kinesis/Makefile +++ b/keyboards/kinesis/Makefile @@ -1,3 +1,5 @@ +SUBPROJECT_DEFAULT = alvicstep + ifndef MAKEFILE_INCLUDED include ../../Makefile -endif \ No newline at end of file +endif diff --git a/keyboards/kinesis/alvicstep/Makefile b/keyboards/kinesis/alvicstep/Makefile new file mode 100644 index 000000000..bd09e5885 --- /dev/null +++ b/keyboards/kinesis/alvicstep/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../../Makefile +endif diff --git a/keyboards/kinesis/alvicstep/alvicstep.c b/keyboards/kinesis/alvicstep/alvicstep.c new file mode 100644 index 000000000..fba9f5136 --- /dev/null +++ b/keyboards/kinesis/alvicstep/alvicstep.c @@ -0,0 +1,105 @@ +#include "kinesis.h" + +// begin section origin https://github.com/alvicstep/tmk_keyboard + +void all_led_off(void) +{ + PORTD = 0b11111111; +} + +void all_led_on(void) +{ + PORTD = 0b00000000; +} +void num_lock_led_on(void) +{ + PORTD = 0b11101111; +} + +void caps_lock_led_on(void) +{ + PORTD = 0b01111111; +} + +void scroll_lock_led_on(void) +{ + PORTD = 0b11011111; +} +void keypad_led_on(void) +{ + PORTD = 0b10111111; +} +void blink_all_leds(void) +{ + all_led_on(); + _delay_ms(500); + + all_led_off(); + _delay_ms(100); + + caps_lock_led_on(); + _delay_ms(100); + + num_lock_led_on(); + _delay_ms(100); + + scroll_lock_led_on(); + _delay_ms(100); + + keypad_led_on(); + _delay_ms(100); + + //back + + scroll_lock_led_on(); + _delay_ms(100); + + num_lock_led_on(); + _delay_ms(100); + + caps_lock_led_on(); + _delay_ms(100); + + all_led_off(); +} + +// End section origin https://github.com/alvicstep/tmk_keyboard + + void matrix_init_kb(void) { + blink_all_leds(); + 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 + +//Copyright 2014 Warren Janssens + uint8_t leds = 0xF0; + if (usb_led & 1 << USB_LED_NUM_LOCK) + leds &= ~0x10; + if (usb_led & 1 << USB_LED_CAPS_LOCK) + leds &= ~0x80; + if (usb_led & 1 << USB_LED_SCROLL_LOCK) + leds &= ~0x20; + PORTD = (PORTD & 0x0F) | leds; + + led_set_user(usb_led); + +} + + diff --git a/keyboards/kinesis/alvicstep/alvicstep.h b/keyboards/kinesis/alvicstep/alvicstep.h new file mode 100644 index 000000000..f91a52314 --- /dev/null +++ b/keyboards/kinesis/alvicstep/alvicstep.h @@ -0,0 +1,67 @@ +#ifndef KINESIS_ALVICSTEP_H +#define KINESIS_ALVICSTEP_H + +#include "../kinesis.h" + + +#define KEYMAP( \ + k02,k22,k12,k01,k21,k11,k00,k20,k10, \ + k80,k70,k60,k50,k40,k30, \ + k81,k71,k61,k51,k41,k31, \ + k82,k72,k62,k52,k42,k32, \ + k83,k73,k63,k53,k43,k33, \ + k74,k64,k54,k34, \ + k36,k35, \ + k55, \ + k56,k46,k75, \ + k03,k23,k13,k04,k24,k14,k05,k85,k84, \ + k94,kA4,kB4,kD4,kE4,kF4, \ + k95,kA5,kB5,kD5,kE5,kF5, \ + k96,kA6,kB6,kD6,kE6,kF6, \ + k97,kA7,kB7,kD7,kE7,kF7, \ + k93,kB3,kD3,kE3, \ + k47,k66, \ + k67, \ + k87,k76,k86 \ +) { \ + { k00, k01, k02, k03, k04, k05, KC_NO, KC_NO }, \ + { k10, k11, k12, k13, k14, KC_NO, KC_NO, KC_NO }, \ + { k20, k21, k22, k23, k24, KC_NO, KC_NO, KC_NO }, \ + { k30, k31, k32, k33, k34, k35, k36, KC_NO }, \ + { k40, k41, k42, k43, KC_NO, KC_NO, k46, k47 }, \ + { k50, k51, k52, k53, k54, k55, k56, KC_NO }, \ + { k60, k61, k62, k63, k64, KC_NO, k66, k67 }, \ + { k70, k71, k72, k73, k74, k75, k76, KC_NO }, \ + { k80, k81, k82, k83, k84, k85, k86, k87}, \ + { KC_NO, KC_NO ,KC_NO ,k93, k94, k95, k96, k97}, \ + { KC_NO, KC_NO ,KC_NO ,KC_NO, kA4, kA5, kA6, kA7}, \ + { KC_NO, KC_NO ,KC_NO ,kB3, kB4, kB5, kB6, kB7}, \ + { KC_NO, KC_NO ,KC_NO ,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO}, \ + { KC_NO, KC_NO ,KC_NO ,kD3, kD4, kD5, kD6, kD7}, \ + { KC_NO, KC_NO ,KC_NO ,kE3, kE4, kE5, kE6, kE7}, \ + { KC_NO, KC_NO ,KC_NO ,KC_NO, kF4, kF5, kF6, kF7} \ +} + + +/* Row pin configuration +PF0 A +PF1 B +PF2 C +PF3 G 0 = U4, 1 = U5 + + + r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 rA rB rC rD rE rF +PB0 c0| f6 f8 f7 5 4 3 2 1 =+ +PB1 c1| f3 f5 f4 t r e w q TAB +PB2 c2| ESC f2 f1 g f d s a CL +PB3 c3| f9 f11 f10 b v c x z LS UP DN [{ ]} +PB4 c4| f12 SL PS RT LT §± `~ 6 7 8 9 0 -_ +PB5 c5| PB PGM KPD y u i o p \ +PB6 c6| LC DL BS RC EN SP h j k l ;: '" +PB7 c7| RA PU PD n m ,< .> /? RS + */ + + + + +#endif diff --git a/keyboards/kinesis/alvicstep/config.h b/keyboards/kinesis/alvicstep/config.h new file mode 100644 index 000000000..88b7e2644 --- /dev/null +++ b/keyboards/kinesis/alvicstep/config.h @@ -0,0 +1,35 @@ +#ifndef ALVICSTEP_CONFIG_H +#define ALVICSTEP_CONFIG_H + +#include "../config.h" + +/* USB Device descriptor parameter */ +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 + +/* key matrix size */ +#define MATRIX_ROWS 16 +#define MATRIX_COLS 8 + +/* + * 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) + * +*/ +//Passed through the port multipler, so 4 pins =16 +#define MATRIX_ROW_PINS { F0,F1, F2, F3 } + +// May be upside down. +#define MATRIX_COL_PINS { B0,B1, B2, B3, B4, B5, B6, B7 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + + +#endif diff --git a/keyboards/kinesis/alvicstep/docs/docs/kicad/kinesis-cache.lib b/keyboards/kinesis/alvicstep/docs/docs/kicad/kinesis-cache.lib new file mode 100644 index 000000000..f798d39d6 --- /dev/null +++ b/keyboards/kinesis/alvicstep/docs/docs/kicad/kinesis-cache.lib @@ -0,0 +1,232 @@ +EESchema-LIBRARY Version 2.3 Date: Wednesday, November 12, 2014 'pmt' 10:15:19 pm +#encoding utf-8 +# +# AT90S4414-P +# +DEF AT90S4414-P IC 0 40 Y Y 1 F N +F0 "IC" -850 1880 40 H V L BNN +F1 "AT90S4414-P" 450 -1950 40 H V L BNN +F2 "DIL40" 0 0 30 H V C CIN +F3 "~" 0 0 60 H V C CNN +ALIAS AT90S8515-P +$FPLIST + 40DIP-ELL600 + 40dip600 +$ENDFPLIST +DRAW +S -850 1850 850 -1850 0 1 10 f +X (T0)PB0 1 1000 700 150 L 40 40 1 1 B +X (T1)PB1 2 1000 600 150 L 40 40 1 1 B +X (AIN0)PB2 3 1000 500 150 L 40 40 1 1 B +X (AIN1)PB3 4 1000 400 150 L 40 40 1 1 B +X (~SS~)PB4 5 1000 300 150 L 40 40 1 1 B +X (MOSI)PB5 6 1000 200 150 L 40 40 1 1 B +X (MISO)PB6 7 1000 100 150 L 40 40 1 1 B +X (SCK)PB7 8 1000 0 150 L 40 40 1 1 B +X ~RESET 9 -1000 1700 150 R 40 40 1 1 I +X (RXD)PD0 10 1000 -1000 150 L 40 40 1 1 B +X GND 20 0 -2000 150 U 40 40 1 1 W +X ALE 30 1000 850 150 L 40 40 1 1 O +X VCC 40 0 2000 150 D 40 40 1 1 W +X (TXD)PD1 11 1000 -1100 150 L 40 40 1 1 B +X (A8)PC0 21 1000 -150 150 L 40 40 1 1 B +X ICP 31 -1000 -1400 150 R 40 40 1 1 I +X (INT0)PD2 12 1000 -1200 150 L 40 40 1 1 B +X (A9)PC1 22 1000 -250 150 L 40 40 1 1 B +X (AD7)PA7 32 1000 1000 150 L 40 40 1 1 B +X (INT1)PD3 13 1000 -1300 150 L 40 40 1 1 B +X (A10)PC2 23 1000 -350 150 L 40 40 1 1 B +X (AD6)PA6 33 1000 1100 150 L 40 40 1 1 B +X PD4 14 1000 -1400 150 L 40 40 1 1 B +X (A11)PC3 24 1000 -450 150 L 40 40 1 1 B +X (AD5)PA5 34 1000 1200 150 L 40 40 1 1 B +X (OC1A)PD5 15 1000 -1500 150 L 40 40 1 1 B +X (A12)PC4 25 1000 -550 150 L 40 40 1 1 B +X (AD4)PA4 35 1000 1300 150 L 40 40 1 1 B +X (~WR~)PD6 16 1000 -1600 150 L 40 40 1 1 B +X (A13)PC5 26 1000 -650 150 L 40 40 1 1 B +X (AD3)PA3 36 1000 1400 150 L 40 40 1 1 B +X (~RD~)PD7 17 1000 -1700 150 L 40 40 1 1 B +X (A14)PC6 27 1000 -750 150 L 40 40 1 1 B +X (AD2)PA2 37 1000 1500 150 L 40 40 1 1 B +X XTAL2 18 -1000 1200 150 R 40 40 1 1 B +X (A15)PC7 28 1000 -850 150 L 40 40 1 1 B +X (AD1)PA1 38 1000 1600 150 L 40 40 1 1 B +X XTAL1 19 -1000 800 150 R 40 40 1 1 B +X OC1B 29 -1000 -1500 150 R 40 40 1 1 W +X (AD0)PA0 39 1000 1700 150 L 40 40 1 1 B +ENDDRAW +ENDDEF +# +# ATMEGA16U4-A +# +DEF ATMEGA16U4-A U 0 40 Y Y 1 F N +F0 "U" -950 1700 40 H V C CNN +F1 "ATMEGA16U4-A" 700 -1500 40 H V C CNN +F2 "TQFP44" 0 0 35 H V C CIN +F3 "~" 1100 1100 60 H V C CNN +ALIAS ATMEGA16U4RC-A ATMEGA32U4-A ATMEGA32U4RC-A +$FPLIST + TQFP44 +$ENDFPLIST +DRAW +S -1000 1650 950 -1450 0 1 10 f +X (INT6/AIN0)PE6 1 1100 -650 150 L 40 40 1 1 B +X UVCC 2 -450 1800 150 D 40 40 1 1 W +X D- 3 -1150 100 150 R 40 40 1 1 B +X D+ 4 -1150 200 150 R 40 40 1 1 B +X UGND 5 -400 -1600 150 U 40 40 1 1 P +X UCAP 6 -1150 -50 150 R 40 40 1 1 P +X VBUS 7 -1150 350 150 R 40 40 1 1 P +X (SS/PCINT0)PB0 8 1100 1550 150 L 40 40 1 1 B +X (SCLK/PCINT1)PB1 9 1100 1450 150 L 40 40 1 1 B +X (PDI/MOSI/PCINT2)PB2 10 1100 1350 150 L 40 40 1 1 B +X (RXD/INT2)PD2 20 1100 150 150 L 40 40 1 1 B +X (ADC13/OC1B/OC4B/PCINT13)PB6 30 1100 950 150 L 40 40 1 1 B +X (ADC1)PF1 40 1100 -950 150 L 40 40 1 1 B +X (PDO/MISO/PCINT3)PB3 11 1100 1250 150 L 40 40 1 1 B +X (TXD/INT3)PD3 21 1100 50 150 L 40 40 1 1 B +X (OC3A/~OC4A~)PC6 31 1100 650 150 L 40 40 1 1 B +X (ADC0)PF0 41 1100 -850 150 L 40 40 1 1 B +X (OC0A/OC1C/~RTS~/PCINT7)PB7 12 1100 850 150 L 40 40 1 1 B +X (XCK1/~CTS~)PD5 22 1100 -150 150 L 40 40 1 1 B +X (ICP3/CLK0/OC4A)PC7 32 1100 550 150 L 40 40 1 1 B +X AREF 42 -1150 -850 150 R 40 40 1 1 P +X ~RESET~ 13 -1150 1550 150 R 40 40 1 1 I +X GND 23 -50 -1600 150 U 40 40 1 1 W +X (~HWB~)PE2 33 1100 -550 150 L 40 40 1 1 B +X GND 43 150 -1600 150 U 40 40 1 1 W +X VCC 14 -200 1800 150 D 40 40 1 1 W +X AVCC 24 150 1800 150 D 40 40 1 1 W +X VCC 34 -100 1800 150 D 40 40 1 1 W +X AVCC 44 250 1800 150 D 40 40 1 1 W +X GND 15 -150 -1600 150 U 40 40 1 1 W +X (ICP2/ADC8)PD4 25 1100 -50 150 L 40 40 1 1 B +X GND 35 50 -1600 150 U 40 40 1 1 W +X XTAL2 16 -1150 950 150 R 40 40 1 1 O +X (T1/~OC4D~/ADC9)PD6 26 1100 -250 150 L 40 40 1 1 B +X (ADC7/TDI)PF7 36 1100 -1350 150 L 40 40 1 1 B +X XTAL1 17 -1150 1150 150 R 40 40 1 1 I +X (T0/OC4D/ADC10)PD7 27 1100 -350 150 L 40 40 1 1 B +X (ADC6/TDO)PF6 37 1100 -1250 150 L 40 40 1 1 B +X (OC0B/SCL/INT0)PD0 18 1100 350 150 L 40 40 1 1 B +X (ADC11/PCINT4)PB4 28 1100 1150 150 L 40 40 1 1 B +X (ADC5/TMS)PF5 38 1100 -1150 150 L 40 40 1 1 B +X (SDA/INT1)PD1 19 1100 250 150 L 40 40 1 1 B +X (ADC12/OC1A/~OC4B~/PCINT12)PB5 29 1100 1050 150 L 40 40 1 1 B +X (ADC4/TCK)PF4 39 1100 -1050 150 L 40 40 1 1 B +ENDDRAW +ENDDEF +# +# C +# +DEF C C 0 10 N Y 1 F N +F0 "C" 0 100 40 H V L CNN +F1 "C" 6 -85 40 H V L CNN +F2 "~" 38 -150 30 H V C CNN +F3 "~" 0 0 60 H V C CNN +$FPLIST + SM* + C? + C1-1 +$ENDFPLIST +DRAW +P 2 0 1 20 -80 -30 80 -30 N +P 2 0 1 20 -80 30 80 30 N +X ~ 1 0 200 170 D 40 40 1 1 P +X ~ 2 0 -200 170 U 40 40 1 1 P +ENDDRAW +ENDDEF +# +# CONN_7 +# +DEF CONN_7 P 0 40 Y N 1 F N +F0 "P" -30 0 60 V V C CNN +F1 "CONN_7" 70 0 60 V V C CNN +F2 "~" 0 0 60 H V C CNN +F3 "~" 0 0 60 H V C CNN +DRAW +S -100 350 150 -350 0 1 0 N +X P1 1 -350 300 250 R 50 50 1 1 P I +X P2 2 -350 200 250 R 50 50 1 1 P I +X P3 3 -350 100 250 R 50 50 1 1 P I +X P4 4 -350 0 250 R 50 50 1 1 P I +X P5 5 -350 -100 250 R 50 50 1 1 P I +X P6 6 -350 -200 250 R 50 50 1 1 P I +X P7 7 -350 -300 250 R 50 50 1 1 P I +ENDDRAW +ENDDEF +# +# GND +# +DEF ~GND #PWR 0 0 Y Y 1 F P +F0 "#PWR" 0 0 30 H I C CNN +F1 "GND" 0 -70 30 H I C CNN +F2 "~" 0 0 60 H V C CNN +F3 "~" 0 0 60 H V C CNN +DRAW +P 4 0 1 0 -50 0 0 -50 50 0 -50 0 N +X GND 1 0 0 0 U 30 30 1 1 W N +ENDDRAW +ENDDEF +# +# R +# +DEF R R 0 0 N Y 1 F N +F0 "R" 80 0 40 V V C CNN +F1 "R" 7 1 40 V V C CNN +F2 "~" -70 0 30 V V C CNN +F3 "~" 0 0 30 H V C CNN +$FPLIST + R? + SM0603 + SM0805 + R?-* + SM1206 +$ENDFPLIST +DRAW +S -40 150 40 -150 0 1 12 N +X ~ 1 0 250 100 D 60 60 1 1 P +X ~ 2 0 -250 100 U 60 60 1 1 P +ENDDRAW +ENDDEF +# +# USB-MINI-B +# +DEF USB-MINI-B CON 0 40 Y Y 1 F N +F0 "CON" -250 450 60 H V C CNN +F1 "USB-MINI-B" -50 -500 60 H V C CNN +F2 "~" 0 0 60 H V C CNN +F3 "~" 0 0 60 H V C CNN +$FPLIST + USB-Mini-B-Jack +$ENDFPLIST +DRAW +S -350 400 350 -400 0 1 0 N +X VBUS 1 -550 300 200 R 50 50 1 1 W +X D- 2 -550 150 200 R 50 50 1 1 B +X D+ 3 -550 0 200 R 50 50 1 1 B +X ID 4 -550 -150 200 R 50 50 1 1 B +X GND 5 -550 -300 200 R 50 50 1 1 W +X SHELL1 6 550 300 200 L 50 50 1 1 B +X SHELL2 7 550 150 200 L 50 50 1 1 B +X SHELL3 8 550 -150 200 L 50 50 1 1 B +X SHELL4 9 550 -300 200 L 50 50 1 1 B +ENDDRAW +ENDDEF +# +# VCC +# +DEF VCC #PWR 0 0 Y Y 1 F P +F0 "#PWR" 0 100 30 H I C CNN +F1 "VCC" 0 100 30 H V C CNN +F2 "~" 0 0 60 H V C CNN +F3 "~" 0 0 60 H V C CNN +DRAW +X VCC 1 0 0 0 U 20 20 0 0 W N +C 0 50 20 0 1 0 N +P 3 0 1 0 0 0 0 30 0 30 N +ENDDRAW +ENDDEF +# +#End Library diff --git a/keyboards/kinesis/alvicstep/docs/docs/kicad/kinesis.pro b/keyboards/kinesis/alvicstep/docs/docs/kicad/kinesis.pro new file mode 100644 index 000000000..9f130b509 --- /dev/null +++ b/keyboards/kinesis/alvicstep/docs/docs/kicad/kinesis.pro @@ -0,0 +1,83 @@ +update=Wednesday, November 05, 2014 'pmt' 12:08:47 pm +version=1 +last_client=pcbnew +[cvpcb] +version=1 +NetIExt=net +[cvpcb/libraries] +EquName1=devcms +[general] +version=1 +[eeschema] +version=1 +PageLayoutDescrFile= +SubpartIdSeparator=0 +SubpartFirstId=65 +LibDir=../../../lib/kicad/library +NetFmtName= +RptD_X=0 +RptD_Y=100 +RptLab=1 +LabSize=60 +[eeschema/libraries] +LibName1=power +LibName2=device +LibName3=transistors +LibName4=conn +LibName5=linear +LibName6=regul +LibName7=74xx +LibName8=cmos4000 +LibName9=adc-dac +LibName10=memory +LibName11=xilinx +LibName12=special +LibName13=microcontrollers +LibName14=dsp +LibName15=microchip +LibName16=analog_switches +LibName17=motorola +LibName18=texas +LibName19=intel +LibName20=audio +LibName21=interface +LibName22=digital-audio +LibName23=philips +LibName24=display +LibName25=cypress +LibName26=siliconi +LibName27=opto +LibName28=atmel +LibName29=contrib +LibName30=valves +LibName31=custom +[pcbnew] +version=1 +LastNetListRead= +UseCmpFile=1 +PadDrill=1.016000000000 +PadDrillOvalY=1.016000000000 +PadSizeH=1.524000000000 +PadSizeV=1.524000000000 +PcbTextSizeV=1.500000000000 +PcbTextSizeH=1.500000000000 +PcbTextThickness=0.300000000000 +ModuleTextSizeV=1.000000000000 +ModuleTextSizeH=1.000000000000 +ModuleTextSizeThickness=0.150000000000 +SolderMaskClearance=0.000000000000 +SolderMaskMinWidth=0.000000000000 +DrawSegmentWidth=0.200000000000 +BoardOutlineThickness=0.100000000000 +ModuleOutlineThickness=0.150000000000 +[pcbnew/libraries] +LibDir=../../../lib/kicad/modules +LibName1=custom +LibName2=Sockets +LibName3=Connect +LibName4=Discret +LibName5=Divers +LibName6=Display +LibName7=LEDs +LibName8=SMD_Packages +LibName9=Sockets_DIP diff --git a/keyboards/kinesis/alvicstep/docs/docs/kicad/kinesis.sch b/keyboards/kinesis/alvicstep/docs/docs/kicad/kinesis.sch new file mode 100644 index 000000000..f75335aa0 --- /dev/null +++ b/keyboards/kinesis/alvicstep/docs/docs/kicad/kinesis.sch @@ -0,0 +1,634 @@ +EESchema Schematic File Version 2 +LIBS:power +LIBS:device +LIBS:transistors +LIBS:conn +LIBS:linear +LIBS:regul +LIBS:74xx +LIBS:cmos4000 +LIBS:adc-dac +LIBS:memory +LIBS:xilinx +LIBS:special +LIBS:microcontrollers +LIBS:dsp +LIBS:microchip +LIBS:analog_switches +LIBS:motorola +LIBS:texas +LIBS:intel +LIBS:audio +LIBS:interface +LIBS:digital-audio +LIBS:philips +LIBS:display +LIBS:cypress +LIBS:siliconi +LIBS:opto +LIBS:atmel +LIBS:contrib +LIBS:valves +LIBS:custom +LIBS:kinesis-cache +EELAYER 27 0 +EELAYER END +$Descr A4 11693 8268 +encoding utf-8 +Sheet 1 1 +Title "" +Date "13 nov 2014" +Rev "" +Comp "" +Comment1 "" +Comment2 "" +Comment3 "" +Comment4 "" +$EndDescr +$Comp +L C C4 +U 1 1 545804FB +P 2850 4250 +F 0 "C4" H 2850 4350 40 0000 L CNN +F 1 "1uF" H 2856 4165 40 0000 L CNN +F 2 "~" H 2888 4100 30 0000 C CNN +F 3 "~" H 2850 4250 60 0000 C CNN + 1 2850 4250 + -1 0 0 1 +$EndComp +$Comp +L R R3 +U 1 1 545805E8 +P 2500 4000 +F 0 "R3" V 2580 4000 40 0000 C CNN +F 1 "22" V 2507 4001 40 0000 C CNN +F 2 "~" V 2430 4000 30 0000 C CNN +F 3 "~" H 2500 4000 30 0000 C CNN + 1 2500 4000 + 0 -1 -1 0 +$EndComp +$Comp +L R R2 +U 1 1 545805FA +P 2500 3800 +F 0 "R2" V 2580 3800 40 0000 C CNN +F 1 "22" V 2507 3801 40 0000 C CNN +F 2 "~" V 2430 3800 30 0000 C CNN +F 3 "~" H 2500 3800 30 0000 C CNN + 1 2500 3800 + 0 -1 -1 0 +$EndComp +Entry Wire Line + 6450 2450 6550 2550 +Entry Wire Line + 6450 2550 6550 2650 +Entry Wire Line + 6450 2650 6550 2750 +Entry Wire Line + 6450 2750 6550 2850 +Entry Wire Line + 6450 2950 6550 3050 +Entry Wire Line + 6450 3050 6550 3150 +Entry Wire Line + 6450 2850 6550 2950 +Entry Wire Line + 6450 3150 6550 3250 +Wire Wire Line + 10250 1800 10750 1800 +Entry Wire Line + 10750 1800 10850 1900 +Entry Wire Line + 10750 1900 10850 2000 +Entry Wire Line + 10750 2000 10850 2100 +Entry Wire Line + 10750 2800 10850 2900 +Entry Wire Line + 10750 2900 10850 3000 +Entry Wire Line + 10750 3000 10850 3100 +Entry Wire Line + 10750 3100 10850 3200 +Entry Wire Line + 10750 3200 10850 3300 +Entry Wire Line + 10750 3300 10850 3400 +$Comp +L AT90S8515-P IC2 +U 1 1 545A62EA +P 9250 3500 +F 0 "IC2" H 8400 5380 40 0000 L BNN +F 1 "AT90S8515-P" H 9700 1550 40 0000 L BNN +F 2 "DIL40" H 9250 3500 30 0000 C CIN +F 3 "" H 9250 3500 60 0000 C CNN + 1 9250 3500 + 1 0 0 -1 +$EndComp +NoConn ~ 10250 2650 +Entry Wire Line + 10750 3650 10850 3750 +Entry Wire Line + 10750 3750 10850 3850 +Entry Wire Line + 10750 3850 10850 3950 +Entry Wire Line + 10750 3950 10850 4050 +Entry Wire Line + 10750 4050 10850 4150 +Entry Wire Line + 10750 4150 10850 4250 +Entry Wire Line + 10750 4350 10850 4450 +Entry Wire Line + 10750 4250 10850 4350 +NoConn ~ 8250 4900 +NoConn ~ 8250 5000 +NoConn ~ 8250 1800 +Wire Wire Line + 10250 1900 10750 1900 +Wire Wire Line + 10250 2000 10750 2000 +Wire Wire Line + 10250 2100 10750 2100 +Wire Wire Line + 10250 2200 10750 2200 +Wire Wire Line + 10250 2300 10750 2300 +Wire Wire Line + 10250 2400 10750 2400 +Wire Wire Line + 10250 2500 10750 2500 +Text Label 10350 1800 0 60 ~ 0 +A +Text Label 10350 1900 0 60 ~ 0 +B +Text Label 10350 2000 0 60 ~ 0 +C +Text Label 10350 2100 0 60 ~ 0 +G +Wire Wire Line + 10250 2800 10750 2800 +Wire Wire Line + 10250 2900 10750 2900 +Wire Wire Line + 10250 3000 10750 3000 +Wire Wire Line + 10250 3100 10750 3100 +Wire Wire Line + 10250 3200 10750 3200 +Wire Wire Line + 10250 3300 10750 3300 +Wire Wire Line + 10250 3400 10750 3400 +Wire Wire Line + 10250 3500 10750 3500 +Text Label 10350 2800 0 60 ~ 0 +DL2 +Text Label 10350 2900 0 60 ~ 0 +DR1 +Text Label 10350 3000 0 60 ~ 0 +DR2 +Text Label 10350 3100 0 60 ~ 0 +DL1 +Text Label 10350 3400 0 60 ~ 0 +SCL +Text Label 10350 3500 0 60 ~ 0 +SDA +Wire Wire Line + 10250 3650 10750 3650 +Wire Wire Line + 10250 3750 10750 3750 +Wire Wire Line + 10250 3850 10750 3850 +Wire Wire Line + 10250 3950 10750 3950 +Wire Wire Line + 10250 4050 10750 4050 +Wire Wire Line + 10250 4150 10750 4150 +Wire Wire Line + 10250 4250 10750 4250 +Wire Wire Line + 10250 4350 10750 4350 +Text Label 10350 3650 0 60 ~ 0 +R1 +Text Label 10350 3750 0 60 ~ 0 +R2 +Text Label 10350 3850 0 60 ~ 0 +R3 +Text Label 10350 3950 0 60 ~ 0 +R4 +Text Label 10350 4050 0 60 ~ 0 +R5 +Text Label 10350 4150 0 60 ~ 0 +R6 +Text Label 10350 4250 0 60 ~ 0 +R7 +Text Label 10350 4350 0 60 ~ 0 +R8 +Wire Wire Line + 10250 4500 10750 4500 +Wire Wire Line + 10250 4600 10750 4600 +Wire Wire Line + 10250 4700 10750 4700 +Wire Wire Line + 10250 4800 10750 4800 +Wire Wire Line + 10250 4900 10750 4900 +Wire Wire Line + 10250 5000 10750 5000 +Wire Wire Line + 10250 5100 10750 5100 +Wire Wire Line + 10250 5200 10750 5200 +Text Label 10350 4600 0 60 ~ 0 +FS1 +Text Label 10350 5000 0 60 ~ 0 +FS3 +Text Label 10350 5200 0 60 ~ 0 +FS2 +$Comp +L GND #PWR01 +U 1 1 545A7377 +P 9250 5600 +F 0 "#PWR01" H 9250 5600 30 0001 C CNN +F 1 "GND" H 9250 5530 30 0001 C CNN +F 2 "" H 9250 5600 60 0000 C CNN +F 3 "" H 9250 5600 60 0000 C CNN + 1 9250 5600 + 1 0 0 -1 +$EndComp +Wire Wire Line + 9250 5500 9250 5600 +Text Label 10350 4700 0 60 ~ 0 +CLOCK +Text Label 10350 4800 0 60 ~ 0 +DATA +NoConn ~ 10750 4700 +NoConn ~ 10750 4800 +Text Label 10350 3200 0 60 ~ 0 +KP +Text Label 10350 3300 0 60 ~ 0 +PGM +Text Label 10350 2500 0 60 ~ 0 +BUZZ +NoConn ~ 8250 2300 +NoConn ~ 8250 2700 +$Comp +L GND #PWR02 +U 1 1 545A7565 +P 4750 5700 +F 0 "#PWR02" H 4750 5700 30 0001 C CNN +F 1 "GND" H 4750 5630 30 0001 C CNN +F 2 "" H 4750 5700 60 0000 C CNN +F 3 "" H 4750 5700 60 0000 C CNN + 1 4750 5700 + 1 0 0 -1 +$EndComp +Entry Wire Line + 6450 3650 6550 3750 +Entry Wire Line + 6450 3750 6550 3850 +Entry Wire Line + 6450 4150 6550 4250 +Entry Wire Line + 6450 4250 6550 4350 +Entry Wire Line + 6450 4050 6550 4150 +Entry Wire Line + 6450 4350 6550 4450 +NoConn ~ 3750 2850 +Wire Wire Line + 1200 2000 6450 2000 +NoConn ~ 3750 3050 +Wire Wire Line + 2750 3800 3750 3800 +Wire Wire Line + 2750 3900 3750 3900 +Wire Wire Line + 2750 3900 2750 4000 +Wire Bus Line + 6550 2100 6550 6050 +Wire Bus Line + 10850 1600 10850 6050 +Text Label 6050 4350 0 60 ~ 0 +DL1 +Text Label 6050 4250 0 60 ~ 0 +DR2 +Text Label 6050 4150 0 60 ~ 0 +DR1 +Text Label 6050 4050 0 60 ~ 0 +DL2 +Text Label 6050 2450 0 60 ~ 0 +R1 +Text Label 6050 2550 0 60 ~ 0 +R2 +Text Label 6050 2650 0 60 ~ 0 +R3 +Text Label 6050 2750 0 60 ~ 0 +R4 +Text Label 6050 2850 0 60 ~ 0 +R5 +Text Label 6050 2950 0 60 ~ 0 +R6 +Text Label 6050 3050 0 60 ~ 0 +R7 +Text Label 6050 3150 0 60 ~ 0 +R8 +Text Label 6050 5050 0 60 ~ 0 +A +Text Label 6050 5150 0 60 ~ 0 +B +Text Label 6050 5250 0 60 ~ 0 +C +Text Label 6050 5350 0 60 ~ 0 +G +Text Label 1300 3800 0 60 ~ 0 +D+ +Text Label 1300 4000 0 60 ~ 0 +D- +NoConn ~ 10750 2200 +NoConn ~ 10750 2300 +NoConn ~ 10750 2400 +Text Label 10350 4500 0 60 ~ 0 +GND +NoConn ~ 10750 4900 +NoConn ~ 10750 5100 +Text Label 6050 3450 0 60 ~ 0 +KP +Text Label 6050 3350 0 60 ~ 0 +PGM +$Comp +L ATMEGA32U4-A U1 +U 1 1 5462E0B1 +P 4900 4000 +F 0 "U1" H 3950 5700 40 0000 C CNN +F 1 "ATMEGA32U4-A" H 5600 2500 40 0000 C CNN +F 2 "TQFP44" H 4900 4000 35 0000 C CIN +F 3 "" H 6000 5100 60 0000 C CNN + 1 4900 4000 + 1 0 0 -1 +$EndComp +Wire Wire Line + 3750 4850 3750 5600 +Wire Wire Line + 4450 2200 5150 2200 +Connection ~ 4700 2200 +Connection ~ 4800 2200 +Connection ~ 5050 2200 +Connection ~ 4800 2000 +Wire Wire Line + 6000 2450 6450 2450 +Wire Wire Line + 6000 2550 6450 2550 +Wire Wire Line + 6000 2650 6450 2650 +Wire Wire Line + 6000 2750 6450 2750 +Wire Wire Line + 6000 2850 6450 2850 +Wire Wire Line + 6000 2950 6450 2950 +Wire Wire Line + 6000 3050 6450 3050 +Wire Wire Line + 6000 3150 6450 3150 +Wire Wire Line + 6000 5050 6450 5050 +Wire Wire Line + 6000 5150 6450 5150 +Wire Wire Line + 6000 5250 6450 5250 +Wire Wire Line + 6000 4050 6450 4050 +Wire Wire Line + 6000 4150 6450 4150 +Wire Wire Line + 6000 4250 6450 4250 +Wire Wire Line + 6000 4350 6450 4350 +Wire Wire Line + 6000 4550 6450 4550 +Entry Wire Line + 6450 3350 6550 3450 +Entry Wire Line + 6450 3450 6550 3550 +Entry Wire Line + 6450 5050 6550 5150 +Entry Wire Line + 6450 5150 6550 5250 +Entry Wire Line + 6450 5250 6550 5350 +Entry Wire Line + 6450 5350 6550 5450 +Entry Wire Line + 6450 4650 6550 4750 +Wire Wire Line + 6000 3350 6450 3350 +Wire Wire Line + 6000 3450 6450 3450 +Wire Wire Line + 1200 5600 6450 5600 +Connection ~ 4950 5600 +Connection ~ 4850 5600 +Wire Wire Line + 4750 5600 4750 5700 +Connection ~ 4750 5600 +Connection ~ 4500 5600 +Text Label 6050 4550 0 60 ~ 0 +HWB +Wire Wire Line + 6000 5350 6450 5350 +Wire Wire Line + 6000 3650 6450 3650 +Wire Wire Line + 6000 3750 6450 3750 +Text Label 6050 3650 0 60 ~ 0 +SCL +Text Label 6050 3750 0 60 ~ 0 +SDA +Wire Wire Line + 6000 3850 6450 3850 +Wire Wire Line + 6000 3950 6450 3950 +Wire Wire Line + 6000 4650 6450 4650 +Text Label 6050 4650 0 60 ~ 0 +BUZZ +NoConn ~ 10750 4600 +NoConn ~ 10750 5000 +NoConn ~ 10750 5200 +Entry Wire Line + 10750 3400 10850 3500 +Entry Wire Line + 10750 3500 10850 3600 +Entry Wire Line + 10750 4500 10850 4600 +Wire Wire Line + 2850 4050 3750 4050 +Text Label 2950 4050 0 60 ~ 0 +UCAP +Wire Wire Line + 6000 4850 6450 4850 +Wire Wire Line + 6000 4950 6450 4950 +NoConn ~ 6450 4850 +NoConn ~ 6450 4950 +NoConn ~ 6450 4550 +$Comp +L USB-MINI-B CON1 +U 1 1 546431C1 +P 2100 5050 +F 0 "CON1" H 1850 5500 60 0000 C CNN +F 1 "USB-MINI-B" H 2050 4550 60 0000 C CNN +F 2 "" H 2100 5050 60 0000 C CNN +F 3 "" H 2100 5050 60 0000 C CNN + 1 2100 5050 + 0 1 1 0 +$EndComp +$Comp +L VCC #PWR03 +U 1 1 54643698 +P 2400 4400 +F 0 "#PWR03" H 2400 4500 30 0001 C CNN +F 1 "VCC" H 2400 4500 30 0000 C CNN +F 2 "" H 2400 4400 60 0000 C CNN +F 3 "" H 2400 4400 60 0000 C CNN + 1 2400 4400 + 1 0 0 -1 +$EndComp +Text Notes 2600 2750 0 60 ~ 0 +Teensy 2.0\n(not fully drawn) +$Comp +L CONN_7 B7K-PH-K-S1 +U 1 1 54643939 +P 1950 6900 +F 0 "B7K-PH-K-S1" V 1920 6900 60 0000 C CNN +F 1 "CONN_7" V 2020 6900 60 0000 C CNN +F 2 "" H 1950 6900 60 0000 C CNN +F 3 "" H 1950 6900 60 0000 C CNN + 1 1950 6900 + 1 0 0 -1 +$EndComp +Connection ~ 3750 5600 +Connection ~ 2400 5600 +Connection ~ 2250 5600 +Connection ~ 1950 5600 +Wire Wire Line + 2400 4400 2400 4500 +Wire Wire Line + 2250 4000 2250 4500 +Wire Wire Line + 1200 3800 2250 3800 +Wire Wire Line + 2100 3800 2100 4500 +Wire Wire Line + 2850 4450 2850 5600 +Connection ~ 2850 5600 +Entry Wire Line + 1100 6800 1200 6900 +Entry Wire Line + 1100 6900 1200 7000 +Entry Wire Line + 1100 7000 1200 7100 +Entry Wire Line + 1100 6700 1200 6800 +Wire Wire Line + 1200 6600 1600 6600 +Wire Wire Line + 1200 6700 1600 6700 +Wire Wire Line + 1200 6800 1600 6800 +Wire Wire Line + 1200 6900 1600 6900 +Wire Wire Line + 1200 7000 1600 7000 +Wire Wire Line + 1200 7100 1600 7100 +Wire Wire Line + 1200 7200 1600 7200 +Text Label 1300 6600 0 60 ~ 0 +FS2 +Text Label 1300 6700 0 60 ~ 0 +FS1 +Text Label 1300 6800 0 60 ~ 0 +VCC +Text Label 1300 6900 0 60 ~ 0 +D- +Text Label 1300 7000 0 60 ~ 0 +D+ +Text Label 1300 7100 0 60 ~ 0 +GND +Text Label 1300 7200 0 60 ~ 0 +FS3 +NoConn ~ 3750 2450 +Wire Wire Line + 3600 2000 3600 3650 +Wire Wire Line + 3600 3650 3750 3650 +NoConn ~ 1950 4500 +Wire Bus Line + 1100 1900 1100 7100 +NoConn ~ 1200 6600 +NoConn ~ 1200 6700 +NoConn ~ 1200 7200 +Connection ~ 2100 3800 +Wire Wire Line + 1200 4000 2250 4000 +Entry Wire Line + 1100 3700 1200 3800 +Entry Wire Line + 1100 3900 1200 4000 +Text Label 10350 1500 0 60 ~ 0 +VCC +Entry Wire Line + 1100 1900 1200 2000 +Text Label 1250 2000 0 60 ~ 0 +VCC +Entry Wire Line + 1100 5500 1200 5600 +Connection ~ 1800 5600 +Text Label 1300 5600 0 60 ~ 0 +GND +Wire Wire Line + 9250 5500 10750 5500 +Entry Wire Line + 10750 5500 10850 5600 +Text Label 10350 5500 0 60 ~ 0 +GND +Wire Wire Line + 9250 1500 10750 1500 +Entry Wire Line + 10750 1500 10850 1600 +Connection ~ 3600 2000 +Wire Wire Line + 4800 2000 4800 2200 +Entry Wire Line + 6450 2000 6550 2100 +Text Label 6050 2000 0 60 ~ 0 +VCC +Connection ~ 5050 5600 +Entry Wire Line + 6450 5600 6550 5700 +Text Label 6050 5600 0 60 ~ 0 +GND +NoConn ~ 6450 3850 +NoConn ~ 6450 3950 +Wire Wire Line + 1800 4500 1500 4500 +Wire Wire Line + 1500 4500 1500 5600 +Connection ~ 1500 5600 +Entry Wire Line + 10750 2500 10850 2600 +Entry Wire Line + 10750 2100 10850 2200 +Text Notes 1000 5300 1 60 ~ 0 +Sacrificial USB cable from header to Teensy +Text Notes 7850 5950 0 60 ~ 0 +Ribbon cable between Teensy pins and socket +Wire Bus Line + 10850 6050 6550 6050 +$EndSCHEMATC diff --git a/keyboards/kinesis/alvicstep/docs/docs/photos/P1050573.jpg b/keyboards/kinesis/alvicstep/docs/docs/photos/P1050573.jpg new file mode 100644 index 000000000..027ab9efb Binary files /dev/null and b/keyboards/kinesis/alvicstep/docs/docs/photos/P1050573.jpg differ diff --git a/keyboards/kinesis/alvicstep/docs/docs/photos/P1050574.jpg b/keyboards/kinesis/alvicstep/docs/docs/photos/P1050574.jpg new file mode 100644 index 000000000..d49c492b8 Binary files /dev/null and b/keyboards/kinesis/alvicstep/docs/docs/photos/P1050574.jpg differ diff --git a/keyboards/kinesis/alvicstep/docs/docs/photos/P1050575.jpg b/keyboards/kinesis/alvicstep/docs/docs/photos/P1050575.jpg new file mode 100644 index 000000000..50cc9897c Binary files /dev/null and b/keyboards/kinesis/alvicstep/docs/docs/photos/P1050575.jpg differ diff --git a/keyboards/kinesis/alvicstep/docs/docs/readme.txt b/keyboards/kinesis/alvicstep/docs/docs/readme.txt new file mode 100644 index 000000000..af33ac490 --- /dev/null +++ b/keyboards/kinesis/alvicstep/docs/docs/readme.txt @@ -0,0 +1,52 @@ +This directory of documentation was copied from https://github.com/wjanssens/tmk_keyboard/tree/master/keyboard/kinesis +and is probably Copyright 2014 Warren Janssens +and probably released under GPL v2, which may be recovered at . + +Row configuration +PF0 A +PF1 B +PF2 C +PF3 G 0 = U4, 1 = U5 + +Column configuration + 4y0 4y1 4y2 4y3 4y4 4y5 4y6 4y7 5y0 5y1 5y2 5y3 5y4 5y5 5y6 5y7 + r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 r16 +PB0 21 c1 f6 f8 f7 5 4 3 2 1 =+ +PB1 22 c2 f3 f5 f4 t r e w q TAB +PB2 23 c3 ESC f2 f1 g f d s a CL +PB3 24 c4 f9 f11 f10 b v c x z LS UP DN [{ ]} +PB4 25 c5 f12 SL PS RT LT §± `~ 6 7 8 9 0 -_ +PB5 26 c6 PB PGM KPD y u i o p \ +PB6 27 c7 LC DL BS RC EN SP h j k l ;: '" +PB7 28 c8 RA PU PD n m ,< .> /? RS + */ + + +40 pin connector + + DL2 1 40 VCC + DR1 2 39 A + DR2 3 38 B + DL1 4 37 C + KPD 5 36 G + PGM 6 35 + SCL 7 34 + SDA 8 33 + RST 9 32 BUZZ + WP 10 31 EA + FS1 11 30 ALE + CLOCK 12 29 PSEN + DATA 13 28 r8 + 14 27 r7 + FS3 15 26 r6 + 16 25 r5 + FS2 17 24 r4 + XTAL1 18 23 r3 + XTAL2 19 22 r2 + GND 20 21 r1 + + +references: +https://github.com/chrisandreae/keyboard-firmware + + diff --git a/keyboards/kinesis/alvicstep/docs/docs/schematic.png b/keyboards/kinesis/alvicstep/docs/docs/schematic.png new file mode 100644 index 000000000..fa9405a1f Binary files /dev/null and b/keyboards/kinesis/alvicstep/docs/docs/schematic.png differ diff --git a/keyboards/kinesis/alvicstep/docs/kicad/kinesis-cache.lib b/keyboards/kinesis/alvicstep/docs/kicad/kinesis-cache.lib new file mode 100644 index 000000000..f798d39d6 --- /dev/null +++ b/keyboards/kinesis/alvicstep/docs/kicad/kinesis-cache.lib @@ -0,0 +1,232 @@ +EESchema-LIBRARY Version 2.3 Date: Wednesday, November 12, 2014 'pmt' 10:15:19 pm +#encoding utf-8 +# +# AT90S4414-P +# +DEF AT90S4414-P IC 0 40 Y Y 1 F N +F0 "IC" -850 1880 40 H V L BNN +F1 "AT90S4414-P" 450 -1950 40 H V L BNN +F2 "DIL40" 0 0 30 H V C CIN +F3 "~" 0 0 60 H V C CNN +ALIAS AT90S8515-P +$FPLIST + 40DIP-ELL600 + 40dip600 +$ENDFPLIST +DRAW +S -850 1850 850 -1850 0 1 10 f +X (T0)PB0 1 1000 700 150 L 40 40 1 1 B +X (T1)PB1 2 1000 600 150 L 40 40 1 1 B +X (AIN0)PB2 3 1000 500 150 L 40 40 1 1 B +X (AIN1)PB3 4 1000 400 150 L 40 40 1 1 B +X (~SS~)PB4 5 1000 300 150 L 40 40 1 1 B +X (MOSI)PB5 6 1000 200 150 L 40 40 1 1 B +X (MISO)PB6 7 1000 100 150 L 40 40 1 1 B +X (SCK)PB7 8 1000 0 150 L 40 40 1 1 B +X ~RESET 9 -1000 1700 150 R 40 40 1 1 I +X (RXD)PD0 10 1000 -1000 150 L 40 40 1 1 B +X GND 20 0 -2000 150 U 40 40 1 1 W +X ALE 30 1000 850 150 L 40 40 1 1 O +X VCC 40 0 2000 150 D 40 40 1 1 W +X (TXD)PD1 11 1000 -1100 150 L 40 40 1 1 B +X (A8)PC0 21 1000 -150 150 L 40 40 1 1 B +X ICP 31 -1000 -1400 150 R 40 40 1 1 I +X (INT0)PD2 12 1000 -1200 150 L 40 40 1 1 B +X (A9)PC1 22 1000 -250 150 L 40 40 1 1 B +X (AD7)PA7 32 1000 1000 150 L 40 40 1 1 B +X (INT1)PD3 13 1000 -1300 150 L 40 40 1 1 B +X (A10)PC2 23 1000 -350 150 L 40 40 1 1 B +X (AD6)PA6 33 1000 1100 150 L 40 40 1 1 B +X PD4 14 1000 -1400 150 L 40 40 1 1 B +X (A11)PC3 24 1000 -450 150 L 40 40 1 1 B +X (AD5)PA5 34 1000 1200 150 L 40 40 1 1 B +X (OC1A)PD5 15 1000 -1500 150 L 40 40 1 1 B +X (A12)PC4 25 1000 -550 150 L 40 40 1 1 B +X (AD4)PA4 35 1000 1300 150 L 40 40 1 1 B +X (~WR~)PD6 16 1000 -1600 150 L 40 40 1 1 B +X (A13)PC5 26 1000 -650 150 L 40 40 1 1 B +X (AD3)PA3 36 1000 1400 150 L 40 40 1 1 B +X (~RD~)PD7 17 1000 -1700 150 L 40 40 1 1 B +X (A14)PC6 27 1000 -750 150 L 40 40 1 1 B +X (AD2)PA2 37 1000 1500 150 L 40 40 1 1 B +X XTAL2 18 -1000 1200 150 R 40 40 1 1 B +X (A15)PC7 28 1000 -850 150 L 40 40 1 1 B +X (AD1)PA1 38 1000 1600 150 L 40 40 1 1 B +X XTAL1 19 -1000 800 150 R 40 40 1 1 B +X OC1B 29 -1000 -1500 150 R 40 40 1 1 W +X (AD0)PA0 39 1000 1700 150 L 40 40 1 1 B +ENDDRAW +ENDDEF +# +# ATMEGA16U4-A +# +DEF ATMEGA16U4-A U 0 40 Y Y 1 F N +F0 "U" -950 1700 40 H V C CNN +F1 "ATMEGA16U4-A" 700 -1500 40 H V C CNN +F2 "TQFP44" 0 0 35 H V C CIN +F3 "~" 1100 1100 60 H V C CNN +ALIAS ATMEGA16U4RC-A ATMEGA32U4-A ATMEGA32U4RC-A +$FPLIST + TQFP44 +$ENDFPLIST +DRAW +S -1000 1650 950 -1450 0 1 10 f +X (INT6/AIN0)PE6 1 1100 -650 150 L 40 40 1 1 B +X UVCC 2 -450 1800 150 D 40 40 1 1 W +X D- 3 -1150 100 150 R 40 40 1 1 B +X D+ 4 -1150 200 150 R 40 40 1 1 B +X UGND 5 -400 -1600 150 U 40 40 1 1 P +X UCAP 6 -1150 -50 150 R 40 40 1 1 P +X VBUS 7 -1150 350 150 R 40 40 1 1 P +X (SS/PCINT0)PB0 8 1100 1550 150 L 40 40 1 1 B +X (SCLK/PCINT1)PB1 9 1100 1450 150 L 40 40 1 1 B +X (PDI/MOSI/PCINT2)PB2 10 1100 1350 150 L 40 40 1 1 B +X (RXD/INT2)PD2 20 1100 150 150 L 40 40 1 1 B +X (ADC13/OC1B/OC4B/PCINT13)PB6 30 1100 950 150 L 40 40 1 1 B +X (ADC1)PF1 40 1100 -950 150 L 40 40 1 1 B +X (PDO/MISO/PCINT3)PB3 11 1100 1250 150 L 40 40 1 1 B +X (TXD/INT3)PD3 21 1100 50 150 L 40 40 1 1 B +X (OC3A/~OC4A~)PC6 31 1100 650 150 L 40 40 1 1 B +X (ADC0)PF0 41 1100 -850 150 L 40 40 1 1 B +X (OC0A/OC1C/~RTS~/PCINT7)PB7 12 1100 850 150 L 40 40 1 1 B +X (XCK1/~CTS~)PD5 22 1100 -150 150 L 40 40 1 1 B +X (ICP3/CLK0/OC4A)PC7 32 1100 550 150 L 40 40 1 1 B +X AREF 42 -1150 -850 150 R 40 40 1 1 P +X ~RESET~ 13 -1150 1550 150 R 40 40 1 1 I +X GND 23 -50 -1600 150 U 40 40 1 1 W +X (~HWB~)PE2 33 1100 -550 150 L 40 40 1 1 B +X GND 43 150 -1600 150 U 40 40 1 1 W +X VCC 14 -200 1800 150 D 40 40 1 1 W +X AVCC 24 150 1800 150 D 40 40 1 1 W +X VCC 34 -100 1800 150 D 40 40 1 1 W +X AVCC 44 250 1800 150 D 40 40 1 1 W +X GND 15 -150 -1600 150 U 40 40 1 1 W +X (ICP2/ADC8)PD4 25 1100 -50 150 L 40 40 1 1 B +X GND 35 50 -1600 150 U 40 40 1 1 W +X XTAL2 16 -1150 950 150 R 40 40 1 1 O +X (T1/~OC4D~/ADC9)PD6 26 1100 -250 150 L 40 40 1 1 B +X (ADC7/TDI)PF7 36 1100 -1350 150 L 40 40 1 1 B +X XTAL1 17 -1150 1150 150 R 40 40 1 1 I +X (T0/OC4D/ADC10)PD7 27 1100 -350 150 L 40 40 1 1 B +X (ADC6/TDO)PF6 37 1100 -1250 150 L 40 40 1 1 B +X (OC0B/SCL/INT0)PD0 18 1100 350 150 L 40 40 1 1 B +X (ADC11/PCINT4)PB4 28 1100 1150 150 L 40 40 1 1 B +X (ADC5/TMS)PF5 38 1100 -1150 150 L 40 40 1 1 B +X (SDA/INT1)PD1 19 1100 250 150 L 40 40 1 1 B +X (ADC12/OC1A/~OC4B~/PCINT12)PB5 29 1100 1050 150 L 40 40 1 1 B +X (ADC4/TCK)PF4 39 1100 -1050 150 L 40 40 1 1 B +ENDDRAW +ENDDEF +# +# C +# +DEF C C 0 10 N Y 1 F N +F0 "C" 0 100 40 H V L CNN +F1 "C" 6 -85 40 H V L CNN +F2 "~" 38 -150 30 H V C CNN +F3 "~" 0 0 60 H V C CNN +$FPLIST + SM* + C? + C1-1 +$ENDFPLIST +DRAW +P 2 0 1 20 -80 -30 80 -30 N +P 2 0 1 20 -80 30 80 30 N +X ~ 1 0 200 170 D 40 40 1 1 P +X ~ 2 0 -200 170 U 40 40 1 1 P +ENDDRAW +ENDDEF +# +# CONN_7 +# +DEF CONN_7 P 0 40 Y N 1 F N +F0 "P" -30 0 60 V V C CNN +F1 "CONN_7" 70 0 60 V V C CNN +F2 "~" 0 0 60 H V C CNN +F3 "~" 0 0 60 H V C CNN +DRAW +S -100 350 150 -350 0 1 0 N +X P1 1 -350 300 250 R 50 50 1 1 P I +X P2 2 -350 200 250 R 50 50 1 1 P I +X P3 3 -350 100 250 R 50 50 1 1 P I +X P4 4 -350 0 250 R 50 50 1 1 P I +X P5 5 -350 -100 250 R 50 50 1 1 P I +X P6 6 -350 -200 250 R 50 50 1 1 P I +X P7 7 -350 -300 250 R 50 50 1 1 P I +ENDDRAW +ENDDEF +# +# GND +# +DEF ~GND #PWR 0 0 Y Y 1 F P +F0 "#PWR" 0 0 30 H I C CNN +F1 "GND" 0 -70 30 H I C CNN +F2 "~" 0 0 60 H V C CNN +F3 "~" 0 0 60 H V C CNN +DRAW +P 4 0 1 0 -50 0 0 -50 50 0 -50 0 N +X GND 1 0 0 0 U 30 30 1 1 W N +ENDDRAW +ENDDEF +# +# R +# +DEF R R 0 0 N Y 1 F N +F0 "R" 80 0 40 V V C CNN +F1 "R" 7 1 40 V V C CNN +F2 "~" -70 0 30 V V C CNN +F3 "~" 0 0 30 H V C CNN +$FPLIST + R? + SM0603 + SM0805 + R?-* + SM1206 +$ENDFPLIST +DRAW +S -40 150 40 -150 0 1 12 N +X ~ 1 0 250 100 D 60 60 1 1 P +X ~ 2 0 -250 100 U 60 60 1 1 P +ENDDRAW +ENDDEF +# +# USB-MINI-B +# +DEF USB-MINI-B CON 0 40 Y Y 1 F N +F0 "CON" -250 450 60 H V C CNN +F1 "USB-MINI-B" -50 -500 60 H V C CNN +F2 "~" 0 0 60 H V C CNN +F3 "~" 0 0 60 H V C CNN +$FPLIST + USB-Mini-B-Jack +$ENDFPLIST +DRAW +S -350 400 350 -400 0 1 0 N +X VBUS 1 -550 300 200 R 50 50 1 1 W +X D- 2 -550 150 200 R 50 50 1 1 B +X D+ 3 -550 0 200 R 50 50 1 1 B +X ID 4 -550 -150 200 R 50 50 1 1 B +X GND 5 -550 -300 200 R 50 50 1 1 W +X SHELL1 6 550 300 200 L 50 50 1 1 B +X SHELL2 7 550 150 200 L 50 50 1 1 B +X SHELL3 8 550 -150 200 L 50 50 1 1 B +X SHELL4 9 550 -300 200 L 50 50 1 1 B +ENDDRAW +ENDDEF +# +# VCC +# +DEF VCC #PWR 0 0 Y Y 1 F P +F0 "#PWR" 0 100 30 H I C CNN +F1 "VCC" 0 100 30 H V C CNN +F2 "~" 0 0 60 H V C CNN +F3 "~" 0 0 60 H V C CNN +DRAW +X VCC 1 0 0 0 U 20 20 0 0 W N +C 0 50 20 0 1 0 N +P 3 0 1 0 0 0 0 30 0 30 N +ENDDRAW +ENDDEF +# +#End Library diff --git a/keyboards/kinesis/alvicstep/docs/kicad/kinesis.pro b/keyboards/kinesis/alvicstep/docs/kicad/kinesis.pro new file mode 100644 index 000000000..9f130b509 --- /dev/null +++ b/keyboards/kinesis/alvicstep/docs/kicad/kinesis.pro @@ -0,0 +1,83 @@ +update=Wednesday, November 05, 2014 'pmt' 12:08:47 pm +version=1 +last_client=pcbnew +[cvpcb] +version=1 +NetIExt=net +[cvpcb/libraries] +EquName1=devcms +[general] +version=1 +[eeschema] +version=1 +PageLayoutDescrFile= +SubpartIdSeparator=0 +SubpartFirstId=65 +LibDir=../../../lib/kicad/library +NetFmtName= +RptD_X=0 +RptD_Y=100 +RptLab=1 +LabSize=60 +[eeschema/libraries] +LibName1=power +LibName2=device +LibName3=transistors +LibName4=conn +LibName5=linear +LibName6=regul +LibName7=74xx +LibName8=cmos4000 +LibName9=adc-dac +LibName10=memory +LibName11=xilinx +LibName12=special +LibName13=microcontrollers +LibName14=dsp +LibName15=microchip +LibName16=analog_switches +LibName17=motorola +LibName18=texas +LibName19=intel +LibName20=audio +LibName21=interface +LibName22=digital-audio +LibName23=philips +LibName24=display +LibName25=cypress +LibName26=siliconi +LibName27=opto +LibName28=atmel +LibName29=contrib +LibName30=valves +LibName31=custom +[pcbnew] +version=1 +LastNetListRead= +UseCmpFile=1 +PadDrill=1.016000000000 +PadDrillOvalY=1.016000000000 +PadSizeH=1.524000000000 +PadSizeV=1.524000000000 +PcbTextSizeV=1.500000000000 +PcbTextSizeH=1.500000000000 +PcbTextThickness=0.300000000000 +ModuleTextSizeV=1.000000000000 +ModuleTextSizeH=1.000000000000 +ModuleTextSizeThickness=0.150000000000 +SolderMaskClearance=0.000000000000 +SolderMaskMinWidth=0.000000000000 +DrawSegmentWidth=0.200000000000 +BoardOutlineThickness=0.100000000000 +ModuleOutlineThickness=0.150000000000 +[pcbnew/libraries] +LibDir=../../../lib/kicad/modules +LibName1=custom +LibName2=Sockets +LibName3=Connect +LibName4=Discret +LibName5=Divers +LibName6=Display +LibName7=LEDs +LibName8=SMD_Packages +LibName9=Sockets_DIP diff --git a/keyboards/kinesis/alvicstep/docs/kicad/kinesis.sch b/keyboards/kinesis/alvicstep/docs/kicad/kinesis.sch new file mode 100644 index 000000000..f75335aa0 --- /dev/null +++ b/keyboards/kinesis/alvicstep/docs/kicad/kinesis.sch @@ -0,0 +1,634 @@ +EESchema Schematic File Version 2 +LIBS:power +LIBS:device +LIBS:transistors +LIBS:conn +LIBS:linear +LIBS:regul +LIBS:74xx +LIBS:cmos4000 +LIBS:adc-dac +LIBS:memory +LIBS:xilinx +LIBS:special +LIBS:microcontrollers +LIBS:dsp +LIBS:microchip +LIBS:analog_switches +LIBS:motorola +LIBS:texas +LIBS:intel +LIBS:audio +LIBS:interface +LIBS:digital-audio +LIBS:philips +LIBS:display +LIBS:cypress +LIBS:siliconi +LIBS:opto +LIBS:atmel +LIBS:contrib +LIBS:valves +LIBS:custom +LIBS:kinesis-cache +EELAYER 27 0 +EELAYER END +$Descr A4 11693 8268 +encoding utf-8 +Sheet 1 1 +Title "" +Date "13 nov 2014" +Rev "" +Comp "" +Comment1 "" +Comment2 "" +Comment3 "" +Comment4 "" +$EndDescr +$Comp +L C C4 +U 1 1 545804FB +P 2850 4250 +F 0 "C4" H 2850 4350 40 0000 L CNN +F 1 "1uF" H 2856 4165 40 0000 L CNN +F 2 "~" H 2888 4100 30 0000 C CNN +F 3 "~" H 2850 4250 60 0000 C CNN + 1 2850 4250 + -1 0 0 1 +$EndComp +$Comp +L R R3 +U 1 1 545805E8 +P 2500 4000 +F 0 "R3" V 2580 4000 40 0000 C CNN +F 1 "22" V 2507 4001 40 0000 C CNN +F 2 "~" V 2430 4000 30 0000 C CNN +F 3 "~" H 2500 4000 30 0000 C CNN + 1 2500 4000 + 0 -1 -1 0 +$EndComp +$Comp +L R R2 +U 1 1 545805FA +P 2500 3800 +F 0 "R2" V 2580 3800 40 0000 C CNN +F 1 "22" V 2507 3801 40 0000 C CNN +F 2 "~" V 2430 3800 30 0000 C CNN +F 3 "~" H 2500 3800 30 0000 C CNN + 1 2500 3800 + 0 -1 -1 0 +$EndComp +Entry Wire Line + 6450 2450 6550 2550 +Entry Wire Line + 6450 2550 6550 2650 +Entry Wire Line + 6450 2650 6550 2750 +Entry Wire Line + 6450 2750 6550 2850 +Entry Wire Line + 6450 2950 6550 3050 +Entry Wire Line + 6450 3050 6550 3150 +Entry Wire Line + 6450 2850 6550 2950 +Entry Wire Line + 6450 3150 6550 3250 +Wire Wire Line + 10250 1800 10750 1800 +Entry Wire Line + 10750 1800 10850 1900 +Entry Wire Line + 10750 1900 10850 2000 +Entry Wire Line + 10750 2000 10850 2100 +Entry Wire Line + 10750 2800 10850 2900 +Entry Wire Line + 10750 2900 10850 3000 +Entry Wire Line + 10750 3000 10850 3100 +Entry Wire Line + 10750 3100 10850 3200 +Entry Wire Line + 10750 3200 10850 3300 +Entry Wire Line + 10750 3300 10850 3400 +$Comp +L AT90S8515-P IC2 +U 1 1 545A62EA +P 9250 3500 +F 0 "IC2" H 8400 5380 40 0000 L BNN +F 1 "AT90S8515-P" H 9700 1550 40 0000 L BNN +F 2 "DIL40" H 9250 3500 30 0000 C CIN +F 3 "" H 9250 3500 60 0000 C CNN + 1 9250 3500 + 1 0 0 -1 +$EndComp +NoConn ~ 10250 2650 +Entry Wire Line + 10750 3650 10850 3750 +Entry Wire Line + 10750 3750 10850 3850 +Entry Wire Line + 10750 3850 10850 3950 +Entry Wire Line + 10750 3950 10850 4050 +Entry Wire Line + 10750 4050 10850 4150 +Entry Wire Line + 10750 4150 10850 4250 +Entry Wire Line + 10750 4350 10850 4450 +Entry Wire Line + 10750 4250 10850 4350 +NoConn ~ 8250 4900 +NoConn ~ 8250 5000 +NoConn ~ 8250 1800 +Wire Wire Line + 10250 1900 10750 1900 +Wire Wire Line + 10250 2000 10750 2000 +Wire Wire Line + 10250 2100 10750 2100 +Wire Wire Line + 10250 2200 10750 2200 +Wire Wire Line + 10250 2300 10750 2300 +Wire Wire Line + 10250 2400 10750 2400 +Wire Wire Line + 10250 2500 10750 2500 +Text Label 10350 1800 0 60 ~ 0 +A +Text Label 10350 1900 0 60 ~ 0 +B +Text Label 10350 2000 0 60 ~ 0 +C +Text Label 10350 2100 0 60 ~ 0 +G +Wire Wire Line + 10250 2800 10750 2800 +Wire Wire Line + 10250 2900 10750 2900 +Wire Wire Line + 10250 3000 10750 3000 +Wire Wire Line + 10250 3100 10750 3100 +Wire Wire Line + 10250 3200 10750 3200 +Wire Wire Line + 10250 3300 10750 3300 +Wire Wire Line + 10250 3400 10750 3400 +Wire Wire Line + 10250 3500 10750 3500 +Text Label 10350 2800 0 60 ~ 0 +DL2 +Text Label 10350 2900 0 60 ~ 0 +DR1 +Text Label 10350 3000 0 60 ~ 0 +DR2 +Text Label 10350 3100 0 60 ~ 0 +DL1 +Text Label 10350 3400 0 60 ~ 0 +SCL +Text Label 10350 3500 0 60 ~ 0 +SDA +Wire Wire Line + 10250 3650 10750 3650 +Wire Wire Line + 10250 3750 10750 3750 +Wire Wire Line + 10250 3850 10750 3850 +Wire Wire Line + 10250 3950 10750 3950 +Wire Wire Line + 10250 4050 10750 4050 +Wire Wire Line + 10250 4150 10750 4150 +Wire Wire Line + 10250 4250 10750 4250 +Wire Wire Line + 10250 4350 10750 4350 +Text Label 10350 3650 0 60 ~ 0 +R1 +Text Label 10350 3750 0 60 ~ 0 +R2 +Text Label 10350 3850 0 60 ~ 0 +R3 +Text Label 10350 3950 0 60 ~ 0 +R4 +Text Label 10350 4050 0 60 ~ 0 +R5 +Text Label 10350 4150 0 60 ~ 0 +R6 +Text Label 10350 4250 0 60 ~ 0 +R7 +Text Label 10350 4350 0 60 ~ 0 +R8 +Wire Wire Line + 10250 4500 10750 4500 +Wire Wire Line + 10250 4600 10750 4600 +Wire Wire Line + 10250 4700 10750 4700 +Wire Wire Line + 10250 4800 10750 4800 +Wire Wire Line + 10250 4900 10750 4900 +Wire Wire Line + 10250 5000 10750 5000 +Wire Wire Line + 10250 5100 10750 5100 +Wire Wire Line + 10250 5200 10750 5200 +Text Label 10350 4600 0 60 ~ 0 +FS1 +Text Label 10350 5000 0 60 ~ 0 +FS3 +Text Label 10350 5200 0 60 ~ 0 +FS2 +$Comp +L GND #PWR01 +U 1 1 545A7377 +P 9250 5600 +F 0 "#PWR01" H 9250 5600 30 0001 C CNN +F 1 "GND" H 9250 5530 30 0001 C CNN +F 2 "" H 9250 5600 60 0000 C CNN +F 3 "" H 9250 5600 60 0000 C CNN + 1 9250 5600 + 1 0 0 -1 +$EndComp +Wire Wire Line + 9250 5500 9250 5600 +Text Label 10350 4700 0 60 ~ 0 +CLOCK +Text Label 10350 4800 0 60 ~ 0 +DATA +NoConn ~ 10750 4700 +NoConn ~ 10750 4800 +Text Label 10350 3200 0 60 ~ 0 +KP +Text Label 10350 3300 0 60 ~ 0 +PGM +Text Label 10350 2500 0 60 ~ 0 +BUZZ +NoConn ~ 8250 2300 +NoConn ~ 8250 2700 +$Comp +L GND #PWR02 +U 1 1 545A7565 +P 4750 5700 +F 0 "#PWR02" H 4750 5700 30 0001 C CNN +F 1 "GND" H 4750 5630 30 0001 C CNN +F 2 "" H 4750 5700 60 0000 C CNN +F 3 "" H 4750 5700 60 0000 C CNN + 1 4750 5700 + 1 0 0 -1 +$EndComp +Entry Wire Line + 6450 3650 6550 3750 +Entry Wire Line + 6450 3750 6550 3850 +Entry Wire Line + 6450 4150 6550 4250 +Entry Wire Line + 6450 4250 6550 4350 +Entry Wire Line + 6450 4050 6550 4150 +Entry Wire Line + 6450 4350 6550 4450 +NoConn ~ 3750 2850 +Wire Wire Line + 1200 2000 6450 2000 +NoConn ~ 3750 3050 +Wire Wire Line + 2750 3800 3750 3800 +Wire Wire Line + 2750 3900 3750 3900 +Wire Wire Line + 2750 3900 2750 4000 +Wire Bus Line + 6550 2100 6550 6050 +Wire Bus Line + 10850 1600 10850 6050 +Text Label 6050 4350 0 60 ~ 0 +DL1 +Text Label 6050 4250 0 60 ~ 0 +DR2 +Text Label 6050 4150 0 60 ~ 0 +DR1 +Text Label 6050 4050 0 60 ~ 0 +DL2 +Text Label 6050 2450 0 60 ~ 0 +R1 +Text Label 6050 2550 0 60 ~ 0 +R2 +Text Label 6050 2650 0 60 ~ 0 +R3 +Text Label 6050 2750 0 60 ~ 0 +R4 +Text Label 6050 2850 0 60 ~ 0 +R5 +Text Label 6050 2950 0 60 ~ 0 +R6 +Text Label 6050 3050 0 60 ~ 0 +R7 +Text Label 6050 3150 0 60 ~ 0 +R8 +Text Label 6050 5050 0 60 ~ 0 +A +Text Label 6050 5150 0 60 ~ 0 +B +Text Label 6050 5250 0 60 ~ 0 +C +Text Label 6050 5350 0 60 ~ 0 +G +Text Label 1300 3800 0 60 ~ 0 +D+ +Text Label 1300 4000 0 60 ~ 0 +D- +NoConn ~ 10750 2200 +NoConn ~ 10750 2300 +NoConn ~ 10750 2400 +Text Label 10350 4500 0 60 ~ 0 +GND +NoConn ~ 10750 4900 +NoConn ~ 10750 5100 +Text Label 6050 3450 0 60 ~ 0 +KP +Text Label 6050 3350 0 60 ~ 0 +PGM +$Comp +L ATMEGA32U4-A U1 +U 1 1 5462E0B1 +P 4900 4000 +F 0 "U1" H 3950 5700 40 0000 C CNN +F 1 "ATMEGA32U4-A" H 5600 2500 40 0000 C CNN +F 2 "TQFP44" H 4900 4000 35 0000 C CIN +F 3 "" H 6000 5100 60 0000 C CNN + 1 4900 4000 + 1 0 0 -1 +$EndComp +Wire Wire Line + 3750 4850 3750 5600 +Wire Wire Line + 4450 2200 5150 2200 +Connection ~ 4700 2200 +Connection ~ 4800 2200 +Connection ~ 5050 2200 +Connection ~ 4800 2000 +Wire Wire Line + 6000 2450 6450 2450 +Wire Wire Line + 6000 2550 6450 2550 +Wire Wire Line + 6000 2650 6450 2650 +Wire Wire Line + 6000 2750 6450 2750 +Wire Wire Line + 6000 2850 6450 2850 +Wire Wire Line + 6000 2950 6450 2950 +Wire Wire Line + 6000 3050 6450 3050 +Wire Wire Line + 6000 3150 6450 3150 +Wire Wire Line + 6000 5050 6450 5050 +Wire Wire Line + 6000 5150 6450 5150 +Wire Wire Line + 6000 5250 6450 5250 +Wire Wire Line + 6000 4050 6450 4050 +Wire Wire Line + 6000 4150 6450 4150 +Wire Wire Line + 6000 4250 6450 4250 +Wire Wire Line + 6000 4350 6450 4350 +Wire Wire Line + 6000 4550 6450 4550 +Entry Wire Line + 6450 3350 6550 3450 +Entry Wire Line + 6450 3450 6550 3550 +Entry Wire Line + 6450 5050 6550 5150 +Entry Wire Line + 6450 5150 6550 5250 +Entry Wire Line + 6450 5250 6550 5350 +Entry Wire Line + 6450 5350 6550 5450 +Entry Wire Line + 6450 4650 6550 4750 +Wire Wire Line + 6000 3350 6450 3350 +Wire Wire Line + 6000 3450 6450 3450 +Wire Wire Line + 1200 5600 6450 5600 +Connection ~ 4950 5600 +Connection ~ 4850 5600 +Wire Wire Line + 4750 5600 4750 5700 +Connection ~ 4750 5600 +Connection ~ 4500 5600 +Text Label 6050 4550 0 60 ~ 0 +HWB +Wire Wire Line + 6000 5350 6450 5350 +Wire Wire Line + 6000 3650 6450 3650 +Wire Wire Line + 6000 3750 6450 3750 +Text Label 6050 3650 0 60 ~ 0 +SCL +Text Label 6050 3750 0 60 ~ 0 +SDA +Wire Wire Line + 6000 3850 6450 3850 +Wire Wire Line + 6000 3950 6450 3950 +Wire Wire Line + 6000 4650 6450 4650 +Text Label 6050 4650 0 60 ~ 0 +BUZZ +NoConn ~ 10750 4600 +NoConn ~ 10750 5000 +NoConn ~ 10750 5200 +Entry Wire Line + 10750 3400 10850 3500 +Entry Wire Line + 10750 3500 10850 3600 +Entry Wire Line + 10750 4500 10850 4600 +Wire Wire Line + 2850 4050 3750 4050 +Text Label 2950 4050 0 60 ~ 0 +UCAP +Wire Wire Line + 6000 4850 6450 4850 +Wire Wire Line + 6000 4950 6450 4950 +NoConn ~ 6450 4850 +NoConn ~ 6450 4950 +NoConn ~ 6450 4550 +$Comp +L USB-MINI-B CON1 +U 1 1 546431C1 +P 2100 5050 +F 0 "CON1" H 1850 5500 60 0000 C CNN +F 1 "USB-MINI-B" H 2050 4550 60 0000 C CNN +F 2 "" H 2100 5050 60 0000 C CNN +F 3 "" H 2100 5050 60 0000 C CNN + 1 2100 5050 + 0 1 1 0 +$EndComp +$Comp +L VCC #PWR03 +U 1 1 54643698 +P 2400 4400 +F 0 "#PWR03" H 2400 4500 30 0001 C CNN +F 1 "VCC" H 2400 4500 30 0000 C CNN +F 2 "" H 2400 4400 60 0000 C CNN +F 3 "" H 2400 4400 60 0000 C CNN + 1 2400 4400 + 1 0 0 -1 +$EndComp +Text Notes 2600 2750 0 60 ~ 0 +Teensy 2.0\n(not fully drawn) +$Comp +L CONN_7 B7K-PH-K-S1 +U 1 1 54643939 +P 1950 6900 +F 0 "B7K-PH-K-S1" V 1920 6900 60 0000 C CNN +F 1 "CONN_7" V 2020 6900 60 0000 C CNN +F 2 "" H 1950 6900 60 0000 C CNN +F 3 "" H 1950 6900 60 0000 C CNN + 1 1950 6900 + 1 0 0 -1 +$EndComp +Connection ~ 3750 5600 +Connection ~ 2400 5600 +Connection ~ 2250 5600 +Connection ~ 1950 5600 +Wire Wire Line + 2400 4400 2400 4500 +Wire Wire Line + 2250 4000 2250 4500 +Wire Wire Line + 1200 3800 2250 3800 +Wire Wire Line + 2100 3800 2100 4500 +Wire Wire Line + 2850 4450 2850 5600 +Connection ~ 2850 5600 +Entry Wire Line + 1100 6800 1200 6900 +Entry Wire Line + 1100 6900 1200 7000 +Entry Wire Line + 1100 7000 1200 7100 +Entry Wire Line + 1100 6700 1200 6800 +Wire Wire Line + 1200 6600 1600 6600 +Wire Wire Line + 1200 6700 1600 6700 +Wire Wire Line + 1200 6800 1600 6800 +Wire Wire Line + 1200 6900 1600 6900 +Wire Wire Line + 1200 7000 1600 7000 +Wire Wire Line + 1200 7100 1600 7100 +Wire Wire Line + 1200 7200 1600 7200 +Text Label 1300 6600 0 60 ~ 0 +FS2 +Text Label 1300 6700 0 60 ~ 0 +FS1 +Text Label 1300 6800 0 60 ~ 0 +VCC +Text Label 1300 6900 0 60 ~ 0 +D- +Text Label 1300 7000 0 60 ~ 0 +D+ +Text Label 1300 7100 0 60 ~ 0 +GND +Text Label 1300 7200 0 60 ~ 0 +FS3 +NoConn ~ 3750 2450 +Wire Wire Line + 3600 2000 3600 3650 +Wire Wire Line + 3600 3650 3750 3650 +NoConn ~ 1950 4500 +Wire Bus Line + 1100 1900 1100 7100 +NoConn ~ 1200 6600 +NoConn ~ 1200 6700 +NoConn ~ 1200 7200 +Connection ~ 2100 3800 +Wire Wire Line + 1200 4000 2250 4000 +Entry Wire Line + 1100 3700 1200 3800 +Entry Wire Line + 1100 3900 1200 4000 +Text Label 10350 1500 0 60 ~ 0 +VCC +Entry Wire Line + 1100 1900 1200 2000 +Text Label 1250 2000 0 60 ~ 0 +VCC +Entry Wire Line + 1100 5500 1200 5600 +Connection ~ 1800 5600 +Text Label 1300 5600 0 60 ~ 0 +GND +Wire Wire Line + 9250 5500 10750 5500 +Entry Wire Line + 10750 5500 10850 5600 +Text Label 10350 5500 0 60 ~ 0 +GND +Wire Wire Line + 9250 1500 10750 1500 +Entry Wire Line + 10750 1500 10850 1600 +Connection ~ 3600 2000 +Wire Wire Line + 4800 2000 4800 2200 +Entry Wire Line + 6450 2000 6550 2100 +Text Label 6050 2000 0 60 ~ 0 +VCC +Connection ~ 5050 5600 +Entry Wire Line + 6450 5600 6550 5700 +Text Label 6050 5600 0 60 ~ 0 +GND +NoConn ~ 6450 3850 +NoConn ~ 6450 3950 +Wire Wire Line + 1800 4500 1500 4500 +Wire Wire Line + 1500 4500 1500 5600 +Connection ~ 1500 5600 +Entry Wire Line + 10750 2500 10850 2600 +Entry Wire Line + 10750 2100 10850 2200 +Text Notes 1000 5300 1 60 ~ 0 +Sacrificial USB cable from header to Teensy +Text Notes 7850 5950 0 60 ~ 0 +Ribbon cable between Teensy pins and socket +Wire Bus Line + 10850 6050 6550 6050 +$EndSCHEMATC diff --git a/keyboards/kinesis/alvicstep/docs/photos/P1050573.jpg b/keyboards/kinesis/alvicstep/docs/photos/P1050573.jpg new file mode 100644 index 000000000..027ab9efb Binary files /dev/null and b/keyboards/kinesis/alvicstep/docs/photos/P1050573.jpg differ diff --git a/keyboards/kinesis/alvicstep/docs/photos/P1050574.jpg b/keyboards/kinesis/alvicstep/docs/photos/P1050574.jpg new file mode 100644 index 000000000..d49c492b8 Binary files /dev/null and b/keyboards/kinesis/alvicstep/docs/photos/P1050574.jpg differ diff --git a/keyboards/kinesis/alvicstep/docs/photos/P1050575.jpg b/keyboards/kinesis/alvicstep/docs/photos/P1050575.jpg new file mode 100644 index 000000000..50cc9897c Binary files /dev/null and b/keyboards/kinesis/alvicstep/docs/photos/P1050575.jpg differ diff --git a/keyboards/kinesis/alvicstep/docs/readme.txt b/keyboards/kinesis/alvicstep/docs/readme.txt new file mode 100644 index 000000000..af33ac490 --- /dev/null +++ b/keyboards/kinesis/alvicstep/docs/readme.txt @@ -0,0 +1,52 @@ +This directory of documentation was copied from https://github.com/wjanssens/tmk_keyboard/tree/master/keyboard/kinesis +and is probably Copyright 2014 Warren Janssens +and probably released under GPL v2, which may be recovered at . + +Row configuration +PF0 A +PF1 B +PF2 C +PF3 G 0 = U4, 1 = U5 + +Column configuration + 4y0 4y1 4y2 4y3 4y4 4y5 4y6 4y7 5y0 5y1 5y2 5y3 5y4 5y5 5y6 5y7 + r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 r16 +PB0 21 c1 f6 f8 f7 5 4 3 2 1 =+ +PB1 22 c2 f3 f5 f4 t r e w q TAB +PB2 23 c3 ESC f2 f1 g f d s a CL +PB3 24 c4 f9 f11 f10 b v c x z LS UP DN [{ ]} +PB4 25 c5 f12 SL PS RT LT §± `~ 6 7 8 9 0 -_ +PB5 26 c6 PB PGM KPD y u i o p \ +PB6 27 c7 LC DL BS RC EN SP h j k l ;: '" +PB7 28 c8 RA PU PD n m ,< .> /? RS + */ + + +40 pin connector + + DL2 1 40 VCC + DR1 2 39 A + DR2 3 38 B + DL1 4 37 C + KPD 5 36 G + PGM 6 35 + SCL 7 34 + SDA 8 33 + RST 9 32 BUZZ + WP 10 31 EA + FS1 11 30 ALE + CLOCK 12 29 PSEN + DATA 13 28 r8 + 14 27 r7 + FS3 15 26 r6 + 16 25 r5 + FS2 17 24 r4 + XTAL1 18 23 r3 + XTAL2 19 22 r2 + GND 20 21 r1 + + +references: +https://github.com/chrisandreae/keyboard-firmware + + diff --git a/keyboards/kinesis/alvicstep/docs/schematic.png b/keyboards/kinesis/alvicstep/docs/schematic.png new file mode 100644 index 000000000..fa9405a1f Binary files /dev/null and b/keyboards/kinesis/alvicstep/docs/schematic.png differ diff --git a/keyboards/kinesis/alvicstep/matrix.c b/keyboards/kinesis/alvicstep/matrix.c new file mode 100644 index 000000000..cb0d5ad7d --- /dev/null +++ b/keyboards/kinesis/alvicstep/matrix.c @@ -0,0 +1,228 @@ +/* +Copyright 2014 Warren Janssens + +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 . +*/ + +/* + * scan matrix + */ +#include +#include +#include +#include +#include "action_layer.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "led.h" +#include "config.h" + +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif +static uint8_t debouncing = DEBOUNCE; + +/* matrix state(1:on, 0:off) */ +static uint8_t matrix[MATRIX_ROWS]; +static uint8_t matrix_debouncing[MATRIX_ROWS]; + +static matrix_row_t read_row(uint8_t row); +static void unselect_rows(void); +static void select_rows(uint8_t row); + +__attribute__ ((weak)) +void matrix_init_quantum(void) { + matrix_init_kb(); +} + +__attribute__ ((weak)) +void matrix_scan_quantum(void) { + matrix_scan_kb(); +} + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +__attribute__ ((weak)) +void matrix_init_user(void) { +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +inline +uint8_t matrix_rows(void) +{ + return MATRIX_ROWS; +} + + +inline +uint8_t matrix_cols(void) +{ + return MATRIX_COLS; +} + +void matrix_init(void) +{ + //debug_enable = true; + + //dprint("matrix_init"); dprintln(); + // output high (leds) + DDRD = 0xFF; + PORTD = 0xFF; + + // output low (multiplexers) + DDRF = 0xFF; + PORTF = 0x00; + + // input with pullup (matrix) + DDRB = 0x00; + PORTB = 0xFF; + + // input with pullup (program and keypad buttons) + DDRC = 0x00; + PORTC = 0xFF; + + // initialize row and col + unselect_rows(); + + // initialize matrix state: all keys off + for (uint8_t i=0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + matrix_debouncing[i] = 0; + } + +} + +uint8_t matrix_scan(void) +{ + + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + select_rows(i); + uint8_t row = read_row(i); + if (matrix_debouncing[i] != row) { + matrix_debouncing[i] = row; + if (debouncing) { + debug("bounce!: "); debug_hex(debouncing); debug("\n"); + } + debouncing = DEBOUNCE; + } + unselect_rows(); + } + + if (debouncing) { + if (--debouncing) { + _delay_ms(1); + } else { + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + matrix[i] = matrix_debouncing[i]; + } + } + } + matrix_scan_quantum(); + return 1; +} + +bool matrix_is_modified(void) +{ + if (debouncing) return false; + return true; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1< /? RS + */ + + diff --git a/keyboards/kinesis/alvicstep/readme.md b/keyboards/kinesis/alvicstep/readme.md new file mode 100644 index 000000000..974e42e50 --- /dev/null +++ b/keyboards/kinesis/alvicstep/readme.md @@ -0,0 +1,46 @@ +kinesis-advantage keyboard firmware +====================== + +This directory is called alvicstep because https://github.com/alvicstep did the heavy work and took the photos in the doc directory. +alvicstep did NOT do anything related to the QMK implementation, so don't bug him/her. + +There are other ways of replacing the CPU in the kinesis, this one uses jumper wires from the Teensy to the original DIP socket + + +## Kinesis specific information +This is a port of https://github.com/alvicstep/tmk_keyboard, +which is a fork of https://github.com/wjanssens/tmk_keyboard, +which is based on work from https://github.com/chrisandreae/keyboard-firmware + +If you replace the kinesis CPU as described in the doc folder, then this code should allow you to use QMK. +I've tested with a Teensy 2++, remember to change the CPU if you use a 32u4 instead. + +Not yet implemented: +- Kinesis EEProm reading or writing +- Audio - this should be simple if we remove hardcoded pins from audio.h and switch to E7 + + + +## Quantum MK Firmware + +For the full Quantum feature list, see [the parent readme.md](/doc/readme.md). + +## Building + +Download or clone the whole firmware and navigate to the keyboards/kinesis-advantage folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. + +Depending on which keymap you would like to use, you will have to compile slightly differently. + +### Default + +To build with the default keymap, simply run `make`. + +### Other Keymaps + +Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files. + +To build the firmware binary hex file with a keymap just do `make` with `keymap` option like: + +$ make keymap=[default|jack|] + +Keymaps follow the format **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/` diff --git a/keyboards/kinesis/alvicstep/rules.mk b/keyboards/kinesis/alvicstep/rules.mk new file mode 100644 index 000000000..fb421a34f --- /dev/null +++ b/keyboards/kinesis/alvicstep/rules.mk @@ -0,0 +1,10 @@ +ifndef QUANTUM_DIR + include ../../../Makefile +endif + +# just silently stop, since we need to upload with teensy uploader +upload: build + + + + diff --git a/keyboards/kinesis/config.h b/keyboards/kinesis/config.h index 8f1fdbdb6..7cb0532c6 100644 --- a/keyboards/kinesis/config.h +++ b/keyboards/kinesis/config.h @@ -22,58 +22,22 @@ along with this program. If not, see . /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 -#define DEVICE_VER 0x0001 #define MANUFACTURER You #define PRODUCT kinesis-advantage #define DESCRIPTION A custom keyboard // Mouse -#define MOUSEKEY_DELAY 20 +#define MOUSEKEY_DELAY 60 #define MOUSEKEY_INTERVAL 20 #define MOUSEKEY_MAX_SPEED 4 -#define MOUSEKEY_TIME_TO_MAX 20 +#define MOUSEKEY_TIME_TO_MAX 10 #define MOUSEKEY_WHEEL_MAX_SPEED 1 #define MOUSEKEY_WHEEL_DELTA 1 #define MOUSEKEY_WHEEL_TIME_TO_MAX 1 -/* key matrix size */ -#define MATRIX_ROWS 16 -#define MATRIX_COLS 8 - -/* - * 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) - * -*/ -//Passed through the port multipler, so 4 pins =16 -#define MATRIX_ROW_PINS { F0,F1, F2, F3 } - -// May be upside down. -#define MATRIX_COL_PINS { B0,B1, B2, B3, B4, B5, B6, B7 } -#define UNUSED_PINS - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -// #define BACKLIGHT_PIN B7 -// #define BACKLIGHT_BREATHING -// #define BACKLIGHT_LEVELS 3 - - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 -/* define if matrix has ghost (lacks anti-ghosting diodes) */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ @@ -171,4 +135,13 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION + + +#ifdef SUBPROJECT_alvicstep + #include "alvicstep/config.h" +#endif +#ifdef SUBPROJECT_stapelberg + #include "stapelberg/config.h" +#endif + #endif diff --git a/keyboards/kinesis/docs/kicad/kinesis-cache.lib b/keyboards/kinesis/docs/kicad/kinesis-cache.lib deleted file mode 100644 index f798d39d6..000000000 --- a/keyboards/kinesis/docs/kicad/kinesis-cache.lib +++ /dev/null @@ -1,232 +0,0 @@ -EESchema-LIBRARY Version 2.3 Date: Wednesday, November 12, 2014 'pmt' 10:15:19 pm -#encoding utf-8 -# -# AT90S4414-P -# -DEF AT90S4414-P IC 0 40 Y Y 1 F N -F0 "IC" -850 1880 40 H V L BNN -F1 "AT90S4414-P" 450 -1950 40 H V L BNN -F2 "DIL40" 0 0 30 H V C CIN -F3 "~" 0 0 60 H V C CNN -ALIAS AT90S8515-P -$FPLIST - 40DIP-ELL600 - 40dip600 -$ENDFPLIST -DRAW -S -850 1850 850 -1850 0 1 10 f -X (T0)PB0 1 1000 700 150 L 40 40 1 1 B -X (T1)PB1 2 1000 600 150 L 40 40 1 1 B -X (AIN0)PB2 3 1000 500 150 L 40 40 1 1 B -X (AIN1)PB3 4 1000 400 150 L 40 40 1 1 B -X (~SS~)PB4 5 1000 300 150 L 40 40 1 1 B -X (MOSI)PB5 6 1000 200 150 L 40 40 1 1 B -X (MISO)PB6 7 1000 100 150 L 40 40 1 1 B -X (SCK)PB7 8 1000 0 150 L 40 40 1 1 B -X ~RESET 9 -1000 1700 150 R 40 40 1 1 I -X (RXD)PD0 10 1000 -1000 150 L 40 40 1 1 B -X GND 20 0 -2000 150 U 40 40 1 1 W -X ALE 30 1000 850 150 L 40 40 1 1 O -X VCC 40 0 2000 150 D 40 40 1 1 W -X (TXD)PD1 11 1000 -1100 150 L 40 40 1 1 B -X (A8)PC0 21 1000 -150 150 L 40 40 1 1 B -X ICP 31 -1000 -1400 150 R 40 40 1 1 I -X (INT0)PD2 12 1000 -1200 150 L 40 40 1 1 B -X (A9)PC1 22 1000 -250 150 L 40 40 1 1 B -X (AD7)PA7 32 1000 1000 150 L 40 40 1 1 B -X (INT1)PD3 13 1000 -1300 150 L 40 40 1 1 B -X (A10)PC2 23 1000 -350 150 L 40 40 1 1 B -X (AD6)PA6 33 1000 1100 150 L 40 40 1 1 B -X PD4 14 1000 -1400 150 L 40 40 1 1 B -X (A11)PC3 24 1000 -450 150 L 40 40 1 1 B -X (AD5)PA5 34 1000 1200 150 L 40 40 1 1 B -X (OC1A)PD5 15 1000 -1500 150 L 40 40 1 1 B -X (A12)PC4 25 1000 -550 150 L 40 40 1 1 B -X (AD4)PA4 35 1000 1300 150 L 40 40 1 1 B -X (~WR~)PD6 16 1000 -1600 150 L 40 40 1 1 B -X (A13)PC5 26 1000 -650 150 L 40 40 1 1 B -X (AD3)PA3 36 1000 1400 150 L 40 40 1 1 B -X (~RD~)PD7 17 1000 -1700 150 L 40 40 1 1 B -X (A14)PC6 27 1000 -750 150 L 40 40 1 1 B -X (AD2)PA2 37 1000 1500 150 L 40 40 1 1 B -X XTAL2 18 -1000 1200 150 R 40 40 1 1 B -X (A15)PC7 28 1000 -850 150 L 40 40 1 1 B -X (AD1)PA1 38 1000 1600 150 L 40 40 1 1 B -X XTAL1 19 -1000 800 150 R 40 40 1 1 B -X OC1B 29 -1000 -1500 150 R 40 40 1 1 W -X (AD0)PA0 39 1000 1700 150 L 40 40 1 1 B -ENDDRAW -ENDDEF -# -# ATMEGA16U4-A -# -DEF ATMEGA16U4-A U 0 40 Y Y 1 F N -F0 "U" -950 1700 40 H V C CNN -F1 "ATMEGA16U4-A" 700 -1500 40 H V C CNN -F2 "TQFP44" 0 0 35 H V C CIN -F3 "~" 1100 1100 60 H V C CNN -ALIAS ATMEGA16U4RC-A ATMEGA32U4-A ATMEGA32U4RC-A -$FPLIST - TQFP44 -$ENDFPLIST -DRAW -S -1000 1650 950 -1450 0 1 10 f -X (INT6/AIN0)PE6 1 1100 -650 150 L 40 40 1 1 B -X UVCC 2 -450 1800 150 D 40 40 1 1 W -X D- 3 -1150 100 150 R 40 40 1 1 B -X D+ 4 -1150 200 150 R 40 40 1 1 B -X UGND 5 -400 -1600 150 U 40 40 1 1 P -X UCAP 6 -1150 -50 150 R 40 40 1 1 P -X VBUS 7 -1150 350 150 R 40 40 1 1 P -X (SS/PCINT0)PB0 8 1100 1550 150 L 40 40 1 1 B -X (SCLK/PCINT1)PB1 9 1100 1450 150 L 40 40 1 1 B -X (PDI/MOSI/PCINT2)PB2 10 1100 1350 150 L 40 40 1 1 B -X (RXD/INT2)PD2 20 1100 150 150 L 40 40 1 1 B -X (ADC13/OC1B/OC4B/PCINT13)PB6 30 1100 950 150 L 40 40 1 1 B -X (ADC1)PF1 40 1100 -950 150 L 40 40 1 1 B -X (PDO/MISO/PCINT3)PB3 11 1100 1250 150 L 40 40 1 1 B -X (TXD/INT3)PD3 21 1100 50 150 L 40 40 1 1 B -X (OC3A/~OC4A~)PC6 31 1100 650 150 L 40 40 1 1 B -X (ADC0)PF0 41 1100 -850 150 L 40 40 1 1 B -X (OC0A/OC1C/~RTS~/PCINT7)PB7 12 1100 850 150 L 40 40 1 1 B -X (XCK1/~CTS~)PD5 22 1100 -150 150 L 40 40 1 1 B -X (ICP3/CLK0/OC4A)PC7 32 1100 550 150 L 40 40 1 1 B -X AREF 42 -1150 -850 150 R 40 40 1 1 P -X ~RESET~ 13 -1150 1550 150 R 40 40 1 1 I -X GND 23 -50 -1600 150 U 40 40 1 1 W -X (~HWB~)PE2 33 1100 -550 150 L 40 40 1 1 B -X GND 43 150 -1600 150 U 40 40 1 1 W -X VCC 14 -200 1800 150 D 40 40 1 1 W -X AVCC 24 150 1800 150 D 40 40 1 1 W -X VCC 34 -100 1800 150 D 40 40 1 1 W -X AVCC 44 250 1800 150 D 40 40 1 1 W -X GND 15 -150 -1600 150 U 40 40 1 1 W -X (ICP2/ADC8)PD4 25 1100 -50 150 L 40 40 1 1 B -X GND 35 50 -1600 150 U 40 40 1 1 W -X XTAL2 16 -1150 950 150 R 40 40 1 1 O -X (T1/~OC4D~/ADC9)PD6 26 1100 -250 150 L 40 40 1 1 B -X (ADC7/TDI)PF7 36 1100 -1350 150 L 40 40 1 1 B -X XTAL1 17 -1150 1150 150 R 40 40 1 1 I -X (T0/OC4D/ADC10)PD7 27 1100 -350 150 L 40 40 1 1 B -X (ADC6/TDO)PF6 37 1100 -1250 150 L 40 40 1 1 B -X (OC0B/SCL/INT0)PD0 18 1100 350 150 L 40 40 1 1 B -X (ADC11/PCINT4)PB4 28 1100 1150 150 L 40 40 1 1 B -X (ADC5/TMS)PF5 38 1100 -1150 150 L 40 40 1 1 B -X (SDA/INT1)PD1 19 1100 250 150 L 40 40 1 1 B -X (ADC12/OC1A/~OC4B~/PCINT12)PB5 29 1100 1050 150 L 40 40 1 1 B -X (ADC4/TCK)PF4 39 1100 -1050 150 L 40 40 1 1 B -ENDDRAW -ENDDEF -# -# C -# -DEF C C 0 10 N Y 1 F N -F0 "C" 0 100 40 H V L CNN -F1 "C" 6 -85 40 H V L CNN -F2 "~" 38 -150 30 H V C CNN -F3 "~" 0 0 60 H V C CNN -$FPLIST - SM* - C? - C1-1 -$ENDFPLIST -DRAW -P 2 0 1 20 -80 -30 80 -30 N -P 2 0 1 20 -80 30 80 30 N -X ~ 1 0 200 170 D 40 40 1 1 P -X ~ 2 0 -200 170 U 40 40 1 1 P -ENDDRAW -ENDDEF -# -# CONN_7 -# -DEF CONN_7 P 0 40 Y N 1 F N -F0 "P" -30 0 60 V V C CNN -F1 "CONN_7" 70 0 60 V V C CNN -F2 "~" 0 0 60 H V C CNN -F3 "~" 0 0 60 H V C CNN -DRAW -S -100 350 150 -350 0 1 0 N -X P1 1 -350 300 250 R 50 50 1 1 P I -X P2 2 -350 200 250 R 50 50 1 1 P I -X P3 3 -350 100 250 R 50 50 1 1 P I -X P4 4 -350 0 250 R 50 50 1 1 P I -X P5 5 -350 -100 250 R 50 50 1 1 P I -X P6 6 -350 -200 250 R 50 50 1 1 P I -X P7 7 -350 -300 250 R 50 50 1 1 P I -ENDDRAW -ENDDEF -# -# GND -# -DEF ~GND #PWR 0 0 Y Y 1 F P -F0 "#PWR" 0 0 30 H I C CNN -F1 "GND" 0 -70 30 H I C CNN -F2 "~" 0 0 60 H V C CNN -F3 "~" 0 0 60 H V C CNN -DRAW -P 4 0 1 0 -50 0 0 -50 50 0 -50 0 N -X GND 1 0 0 0 U 30 30 1 1 W N -ENDDRAW -ENDDEF -# -# R -# -DEF R R 0 0 N Y 1 F N -F0 "R" 80 0 40 V V C CNN -F1 "R" 7 1 40 V V C CNN -F2 "~" -70 0 30 V V C CNN -F3 "~" 0 0 30 H V C CNN -$FPLIST - R? - SM0603 - SM0805 - R?-* - SM1206 -$ENDFPLIST -DRAW -S -40 150 40 -150 0 1 12 N -X ~ 1 0 250 100 D 60 60 1 1 P -X ~ 2 0 -250 100 U 60 60 1 1 P -ENDDRAW -ENDDEF -# -# USB-MINI-B -# -DEF USB-MINI-B CON 0 40 Y Y 1 F N -F0 "CON" -250 450 60 H V C CNN -F1 "USB-MINI-B" -50 -500 60 H V C CNN -F2 "~" 0 0 60 H V C CNN -F3 "~" 0 0 60 H V C CNN -$FPLIST - USB-Mini-B-Jack -$ENDFPLIST -DRAW -S -350 400 350 -400 0 1 0 N -X VBUS 1 -550 300 200 R 50 50 1 1 W -X D- 2 -550 150 200 R 50 50 1 1 B -X D+ 3 -550 0 200 R 50 50 1 1 B -X ID 4 -550 -150 200 R 50 50 1 1 B -X GND 5 -550 -300 200 R 50 50 1 1 W -X SHELL1 6 550 300 200 L 50 50 1 1 B -X SHELL2 7 550 150 200 L 50 50 1 1 B -X SHELL3 8 550 -150 200 L 50 50 1 1 B -X SHELL4 9 550 -300 200 L 50 50 1 1 B -ENDDRAW -ENDDEF -# -# VCC -# -DEF VCC #PWR 0 0 Y Y 1 F P -F0 "#PWR" 0 100 30 H I C CNN -F1 "VCC" 0 100 30 H V C CNN -F2 "~" 0 0 60 H V C CNN -F3 "~" 0 0 60 H V C CNN -DRAW -X VCC 1 0 0 0 U 20 20 0 0 W N -C 0 50 20 0 1 0 N -P 3 0 1 0 0 0 0 30 0 30 N -ENDDRAW -ENDDEF -# -#End Library diff --git a/keyboards/kinesis/docs/kicad/kinesis.pro b/keyboards/kinesis/docs/kicad/kinesis.pro deleted file mode 100644 index 9f130b509..000000000 --- a/keyboards/kinesis/docs/kicad/kinesis.pro +++ /dev/null @@ -1,83 +0,0 @@ -update=Wednesday, November 05, 2014 'pmt' 12:08:47 pm -version=1 -last_client=pcbnew -[cvpcb] -version=1 -NetIExt=net -[cvpcb/libraries] -EquName1=devcms -[general] -version=1 -[eeschema] -version=1 -PageLayoutDescrFile= -SubpartIdSeparator=0 -SubpartFirstId=65 -LibDir=../../../lib/kicad/library -NetFmtName= -RptD_X=0 -RptD_Y=100 -RptLab=1 -LabSize=60 -[eeschema/libraries] -LibName1=power -LibName2=device -LibName3=transistors -LibName4=conn -LibName5=linear -LibName6=regul -LibName7=74xx -LibName8=cmos4000 -LibName9=adc-dac -LibName10=memory -LibName11=xilinx -LibName12=special -LibName13=microcontrollers -LibName14=dsp -LibName15=microchip -LibName16=analog_switches -LibName17=motorola -LibName18=texas -LibName19=intel -LibName20=audio -LibName21=interface -LibName22=digital-audio -LibName23=philips -LibName24=display -LibName25=cypress -LibName26=siliconi -LibName27=opto -LibName28=atmel -LibName29=contrib -LibName30=valves -LibName31=custom -[pcbnew] -version=1 -LastNetListRead= -UseCmpFile=1 -PadDrill=1.016000000000 -PadDrillOvalY=1.016000000000 -PadSizeH=1.524000000000 -PadSizeV=1.524000000000 -PcbTextSizeV=1.500000000000 -PcbTextSizeH=1.500000000000 -PcbTextThickness=0.300000000000 -ModuleTextSizeV=1.000000000000 -ModuleTextSizeH=1.000000000000 -ModuleTextSizeThickness=0.150000000000 -SolderMaskClearance=0.000000000000 -SolderMaskMinWidth=0.000000000000 -DrawSegmentWidth=0.200000000000 -BoardOutlineThickness=0.100000000000 -ModuleOutlineThickness=0.150000000000 -[pcbnew/libraries] -LibDir=../../../lib/kicad/modules -LibName1=custom -LibName2=Sockets -LibName3=Connect -LibName4=Discret -LibName5=Divers -LibName6=Display -LibName7=LEDs -LibName8=SMD_Packages -LibName9=Sockets_DIP diff --git a/keyboards/kinesis/docs/kicad/kinesis.sch b/keyboards/kinesis/docs/kicad/kinesis.sch deleted file mode 100644 index f75335aa0..000000000 --- a/keyboards/kinesis/docs/kicad/kinesis.sch +++ /dev/null @@ -1,634 +0,0 @@ -EESchema Schematic File Version 2 -LIBS:power -LIBS:device -LIBS:transistors -LIBS:conn -LIBS:linear -LIBS:regul -LIBS:74xx -LIBS:cmos4000 -LIBS:adc-dac -LIBS:memory -LIBS:xilinx -LIBS:special -LIBS:microcontrollers -LIBS:dsp -LIBS:microchip -LIBS:analog_switches -LIBS:motorola -LIBS:texas -LIBS:intel -LIBS:audio -LIBS:interface -LIBS:digital-audio -LIBS:philips -LIBS:display -LIBS:cypress -LIBS:siliconi -LIBS:opto -LIBS:atmel -LIBS:contrib -LIBS:valves -LIBS:custom -LIBS:kinesis-cache -EELAYER 27 0 -EELAYER END -$Descr A4 11693 8268 -encoding utf-8 -Sheet 1 1 -Title "" -Date "13 nov 2014" -Rev "" -Comp "" -Comment1 "" -Comment2 "" -Comment3 "" -Comment4 "" -$EndDescr -$Comp -L C C4 -U 1 1 545804FB -P 2850 4250 -F 0 "C4" H 2850 4350 40 0000 L CNN -F 1 "1uF" H 2856 4165 40 0000 L CNN -F 2 "~" H 2888 4100 30 0000 C CNN -F 3 "~" H 2850 4250 60 0000 C CNN - 1 2850 4250 - -1 0 0 1 -$EndComp -$Comp -L R R3 -U 1 1 545805E8 -P 2500 4000 -F 0 "R3" V 2580 4000 40 0000 C CNN -F 1 "22" V 2507 4001 40 0000 C CNN -F 2 "~" V 2430 4000 30 0000 C CNN -F 3 "~" H 2500 4000 30 0000 C CNN - 1 2500 4000 - 0 -1 -1 0 -$EndComp -$Comp -L R R2 -U 1 1 545805FA -P 2500 3800 -F 0 "R2" V 2580 3800 40 0000 C CNN -F 1 "22" V 2507 3801 40 0000 C CNN -F 2 "~" V 2430 3800 30 0000 C CNN -F 3 "~" H 2500 3800 30 0000 C CNN - 1 2500 3800 - 0 -1 -1 0 -$EndComp -Entry Wire Line - 6450 2450 6550 2550 -Entry Wire Line - 6450 2550 6550 2650 -Entry Wire Line - 6450 2650 6550 2750 -Entry Wire Line - 6450 2750 6550 2850 -Entry Wire Line - 6450 2950 6550 3050 -Entry Wire Line - 6450 3050 6550 3150 -Entry Wire Line - 6450 2850 6550 2950 -Entry Wire Line - 6450 3150 6550 3250 -Wire Wire Line - 10250 1800 10750 1800 -Entry Wire Line - 10750 1800 10850 1900 -Entry Wire Line - 10750 1900 10850 2000 -Entry Wire Line - 10750 2000 10850 2100 -Entry Wire Line - 10750 2800 10850 2900 -Entry Wire Line - 10750 2900 10850 3000 -Entry Wire Line - 10750 3000 10850 3100 -Entry Wire Line - 10750 3100 10850 3200 -Entry Wire Line - 10750 3200 10850 3300 -Entry Wire Line - 10750 3300 10850 3400 -$Comp -L AT90S8515-P IC2 -U 1 1 545A62EA -P 9250 3500 -F 0 "IC2" H 8400 5380 40 0000 L BNN -F 1 "AT90S8515-P" H 9700 1550 40 0000 L BNN -F 2 "DIL40" H 9250 3500 30 0000 C CIN -F 3 "" H 9250 3500 60 0000 C CNN - 1 9250 3500 - 1 0 0 -1 -$EndComp -NoConn ~ 10250 2650 -Entry Wire Line - 10750 3650 10850 3750 -Entry Wire Line - 10750 3750 10850 3850 -Entry Wire Line - 10750 3850 10850 3950 -Entry Wire Line - 10750 3950 10850 4050 -Entry Wire Line - 10750 4050 10850 4150 -Entry Wire Line - 10750 4150 10850 4250 -Entry Wire Line - 10750 4350 10850 4450 -Entry Wire Line - 10750 4250 10850 4350 -NoConn ~ 8250 4900 -NoConn ~ 8250 5000 -NoConn ~ 8250 1800 -Wire Wire Line - 10250 1900 10750 1900 -Wire Wire Line - 10250 2000 10750 2000 -Wire Wire Line - 10250 2100 10750 2100 -Wire Wire Line - 10250 2200 10750 2200 -Wire Wire Line - 10250 2300 10750 2300 -Wire Wire Line - 10250 2400 10750 2400 -Wire Wire Line - 10250 2500 10750 2500 -Text Label 10350 1800 0 60 ~ 0 -A -Text Label 10350 1900 0 60 ~ 0 -B -Text Label 10350 2000 0 60 ~ 0 -C -Text Label 10350 2100 0 60 ~ 0 -G -Wire Wire Line - 10250 2800 10750 2800 -Wire Wire Line - 10250 2900 10750 2900 -Wire Wire Line - 10250 3000 10750 3000 -Wire Wire Line - 10250 3100 10750 3100 -Wire Wire Line - 10250 3200 10750 3200 -Wire Wire Line - 10250 3300 10750 3300 -Wire Wire Line - 10250 3400 10750 3400 -Wire Wire Line - 10250 3500 10750 3500 -Text Label 10350 2800 0 60 ~ 0 -DL2 -Text Label 10350 2900 0 60 ~ 0 -DR1 -Text Label 10350 3000 0 60 ~ 0 -DR2 -Text Label 10350 3100 0 60 ~ 0 -DL1 -Text Label 10350 3400 0 60 ~ 0 -SCL -Text Label 10350 3500 0 60 ~ 0 -SDA -Wire Wire Line - 10250 3650 10750 3650 -Wire Wire Line - 10250 3750 10750 3750 -Wire Wire Line - 10250 3850 10750 3850 -Wire Wire Line - 10250 3950 10750 3950 -Wire Wire Line - 10250 4050 10750 4050 -Wire Wire Line - 10250 4150 10750 4150 -Wire Wire Line - 10250 4250 10750 4250 -Wire Wire Line - 10250 4350 10750 4350 -Text Label 10350 3650 0 60 ~ 0 -R1 -Text Label 10350 3750 0 60 ~ 0 -R2 -Text Label 10350 3850 0 60 ~ 0 -R3 -Text Label 10350 3950 0 60 ~ 0 -R4 -Text Label 10350 4050 0 60 ~ 0 -R5 -Text Label 10350 4150 0 60 ~ 0 -R6 -Text Label 10350 4250 0 60 ~ 0 -R7 -Text Label 10350 4350 0 60 ~ 0 -R8 -Wire Wire Line - 10250 4500 10750 4500 -Wire Wire Line - 10250 4600 10750 4600 -Wire Wire Line - 10250 4700 10750 4700 -Wire Wire Line - 10250 4800 10750 4800 -Wire Wire Line - 10250 4900 10750 4900 -Wire Wire Line - 10250 5000 10750 5000 -Wire Wire Line - 10250 5100 10750 5100 -Wire Wire Line - 10250 5200 10750 5200 -Text Label 10350 4600 0 60 ~ 0 -FS1 -Text Label 10350 5000 0 60 ~ 0 -FS3 -Text Label 10350 5200 0 60 ~ 0 -FS2 -$Comp -L GND #PWR01 -U 1 1 545A7377 -P 9250 5600 -F 0 "#PWR01" H 9250 5600 30 0001 C CNN -F 1 "GND" H 9250 5530 30 0001 C CNN -F 2 "" H 9250 5600 60 0000 C CNN -F 3 "" H 9250 5600 60 0000 C CNN - 1 9250 5600 - 1 0 0 -1 -$EndComp -Wire Wire Line - 9250 5500 9250 5600 -Text Label 10350 4700 0 60 ~ 0 -CLOCK -Text Label 10350 4800 0 60 ~ 0 -DATA -NoConn ~ 10750 4700 -NoConn ~ 10750 4800 -Text Label 10350 3200 0 60 ~ 0 -KP -Text Label 10350 3300 0 60 ~ 0 -PGM -Text Label 10350 2500 0 60 ~ 0 -BUZZ -NoConn ~ 8250 2300 -NoConn ~ 8250 2700 -$Comp -L GND #PWR02 -U 1 1 545A7565 -P 4750 5700 -F 0 "#PWR02" H 4750 5700 30 0001 C CNN -F 1 "GND" H 4750 5630 30 0001 C CNN -F 2 "" H 4750 5700 60 0000 C CNN -F 3 "" H 4750 5700 60 0000 C CNN - 1 4750 5700 - 1 0 0 -1 -$EndComp -Entry Wire Line - 6450 3650 6550 3750 -Entry Wire Line - 6450 3750 6550 3850 -Entry Wire Line - 6450 4150 6550 4250 -Entry Wire Line - 6450 4250 6550 4350 -Entry Wire Line - 6450 4050 6550 4150 -Entry Wire Line - 6450 4350 6550 4450 -NoConn ~ 3750 2850 -Wire Wire Line - 1200 2000 6450 2000 -NoConn ~ 3750 3050 -Wire Wire Line - 2750 3800 3750 3800 -Wire Wire Line - 2750 3900 3750 3900 -Wire Wire Line - 2750 3900 2750 4000 -Wire Bus Line - 6550 2100 6550 6050 -Wire Bus Line - 10850 1600 10850 6050 -Text Label 6050 4350 0 60 ~ 0 -DL1 -Text Label 6050 4250 0 60 ~ 0 -DR2 -Text Label 6050 4150 0 60 ~ 0 -DR1 -Text Label 6050 4050 0 60 ~ 0 -DL2 -Text Label 6050 2450 0 60 ~ 0 -R1 -Text Label 6050 2550 0 60 ~ 0 -R2 -Text Label 6050 2650 0 60 ~ 0 -R3 -Text Label 6050 2750 0 60 ~ 0 -R4 -Text Label 6050 2850 0 60 ~ 0 -R5 -Text Label 6050 2950 0 60 ~ 0 -R6 -Text Label 6050 3050 0 60 ~ 0 -R7 -Text Label 6050 3150 0 60 ~ 0 -R8 -Text Label 6050 5050 0 60 ~ 0 -A -Text Label 6050 5150 0 60 ~ 0 -B -Text Label 6050 5250 0 60 ~ 0 -C -Text Label 6050 5350 0 60 ~ 0 -G -Text Label 1300 3800 0 60 ~ 0 -D+ -Text Label 1300 4000 0 60 ~ 0 -D- -NoConn ~ 10750 2200 -NoConn ~ 10750 2300 -NoConn ~ 10750 2400 -Text Label 10350 4500 0 60 ~ 0 -GND -NoConn ~ 10750 4900 -NoConn ~ 10750 5100 -Text Label 6050 3450 0 60 ~ 0 -KP -Text Label 6050 3350 0 60 ~ 0 -PGM -$Comp -L ATMEGA32U4-A U1 -U 1 1 5462E0B1 -P 4900 4000 -F 0 "U1" H 3950 5700 40 0000 C CNN -F 1 "ATMEGA32U4-A" H 5600 2500 40 0000 C CNN -F 2 "TQFP44" H 4900 4000 35 0000 C CIN -F 3 "" H 6000 5100 60 0000 C CNN - 1 4900 4000 - 1 0 0 -1 -$EndComp -Wire Wire Line - 3750 4850 3750 5600 -Wire Wire Line - 4450 2200 5150 2200 -Connection ~ 4700 2200 -Connection ~ 4800 2200 -Connection ~ 5050 2200 -Connection ~ 4800 2000 -Wire Wire Line - 6000 2450 6450 2450 -Wire Wire Line - 6000 2550 6450 2550 -Wire Wire Line - 6000 2650 6450 2650 -Wire Wire Line - 6000 2750 6450 2750 -Wire Wire Line - 6000 2850 6450 2850 -Wire Wire Line - 6000 2950 6450 2950 -Wire Wire Line - 6000 3050 6450 3050 -Wire Wire Line - 6000 3150 6450 3150 -Wire Wire Line - 6000 5050 6450 5050 -Wire Wire Line - 6000 5150 6450 5150 -Wire Wire Line - 6000 5250 6450 5250 -Wire Wire Line - 6000 4050 6450 4050 -Wire Wire Line - 6000 4150 6450 4150 -Wire Wire Line - 6000 4250 6450 4250 -Wire Wire Line - 6000 4350 6450 4350 -Wire Wire Line - 6000 4550 6450 4550 -Entry Wire Line - 6450 3350 6550 3450 -Entry Wire Line - 6450 3450 6550 3550 -Entry Wire Line - 6450 5050 6550 5150 -Entry Wire Line - 6450 5150 6550 5250 -Entry Wire Line - 6450 5250 6550 5350 -Entry Wire Line - 6450 5350 6550 5450 -Entry Wire Line - 6450 4650 6550 4750 -Wire Wire Line - 6000 3350 6450 3350 -Wire Wire Line - 6000 3450 6450 3450 -Wire Wire Line - 1200 5600 6450 5600 -Connection ~ 4950 5600 -Connection ~ 4850 5600 -Wire Wire Line - 4750 5600 4750 5700 -Connection ~ 4750 5600 -Connection ~ 4500 5600 -Text Label 6050 4550 0 60 ~ 0 -HWB -Wire Wire Line - 6000 5350 6450 5350 -Wire Wire Line - 6000 3650 6450 3650 -Wire Wire Line - 6000 3750 6450 3750 -Text Label 6050 3650 0 60 ~ 0 -SCL -Text Label 6050 3750 0 60 ~ 0 -SDA -Wire Wire Line - 6000 3850 6450 3850 -Wire Wire Line - 6000 3950 6450 3950 -Wire Wire Line - 6000 4650 6450 4650 -Text Label 6050 4650 0 60 ~ 0 -BUZZ -NoConn ~ 10750 4600 -NoConn ~ 10750 5000 -NoConn ~ 10750 5200 -Entry Wire Line - 10750 3400 10850 3500 -Entry Wire Line - 10750 3500 10850 3600 -Entry Wire Line - 10750 4500 10850 4600 -Wire Wire Line - 2850 4050 3750 4050 -Text Label 2950 4050 0 60 ~ 0 -UCAP -Wire Wire Line - 6000 4850 6450 4850 -Wire Wire Line - 6000 4950 6450 4950 -NoConn ~ 6450 4850 -NoConn ~ 6450 4950 -NoConn ~ 6450 4550 -$Comp -L USB-MINI-B CON1 -U 1 1 546431C1 -P 2100 5050 -F 0 "CON1" H 1850 5500 60 0000 C CNN -F 1 "USB-MINI-B" H 2050 4550 60 0000 C CNN -F 2 "" H 2100 5050 60 0000 C CNN -F 3 "" H 2100 5050 60 0000 C CNN - 1 2100 5050 - 0 1 1 0 -$EndComp -$Comp -L VCC #PWR03 -U 1 1 54643698 -P 2400 4400 -F 0 "#PWR03" H 2400 4500 30 0001 C CNN -F 1 "VCC" H 2400 4500 30 0000 C CNN -F 2 "" H 2400 4400 60 0000 C CNN -F 3 "" H 2400 4400 60 0000 C CNN - 1 2400 4400 - 1 0 0 -1 -$EndComp -Text Notes 2600 2750 0 60 ~ 0 -Teensy 2.0\n(not fully drawn) -$Comp -L CONN_7 B7K-PH-K-S1 -U 1 1 54643939 -P 1950 6900 -F 0 "B7K-PH-K-S1" V 1920 6900 60 0000 C CNN -F 1 "CONN_7" V 2020 6900 60 0000 C CNN -F 2 "" H 1950 6900 60 0000 C CNN -F 3 "" H 1950 6900 60 0000 C CNN - 1 1950 6900 - 1 0 0 -1 -$EndComp -Connection ~ 3750 5600 -Connection ~ 2400 5600 -Connection ~ 2250 5600 -Connection ~ 1950 5600 -Wire Wire Line - 2400 4400 2400 4500 -Wire Wire Line - 2250 4000 2250 4500 -Wire Wire Line - 1200 3800 2250 3800 -Wire Wire Line - 2100 3800 2100 4500 -Wire Wire Line - 2850 4450 2850 5600 -Connection ~ 2850 5600 -Entry Wire Line - 1100 6800 1200 6900 -Entry Wire Line - 1100 6900 1200 7000 -Entry Wire Line - 1100 7000 1200 7100 -Entry Wire Line - 1100 6700 1200 6800 -Wire Wire Line - 1200 6600 1600 6600 -Wire Wire Line - 1200 6700 1600 6700 -Wire Wire Line - 1200 6800 1600 6800 -Wire Wire Line - 1200 6900 1600 6900 -Wire Wire Line - 1200 7000 1600 7000 -Wire Wire Line - 1200 7100 1600 7100 -Wire Wire Line - 1200 7200 1600 7200 -Text Label 1300 6600 0 60 ~ 0 -FS2 -Text Label 1300 6700 0 60 ~ 0 -FS1 -Text Label 1300 6800 0 60 ~ 0 -VCC -Text Label 1300 6900 0 60 ~ 0 -D- -Text Label 1300 7000 0 60 ~ 0 -D+ -Text Label 1300 7100 0 60 ~ 0 -GND -Text Label 1300 7200 0 60 ~ 0 -FS3 -NoConn ~ 3750 2450 -Wire Wire Line - 3600 2000 3600 3650 -Wire Wire Line - 3600 3650 3750 3650 -NoConn ~ 1950 4500 -Wire Bus Line - 1100 1900 1100 7100 -NoConn ~ 1200 6600 -NoConn ~ 1200 6700 -NoConn ~ 1200 7200 -Connection ~ 2100 3800 -Wire Wire Line - 1200 4000 2250 4000 -Entry Wire Line - 1100 3700 1200 3800 -Entry Wire Line - 1100 3900 1200 4000 -Text Label 10350 1500 0 60 ~ 0 -VCC -Entry Wire Line - 1100 1900 1200 2000 -Text Label 1250 2000 0 60 ~ 0 -VCC -Entry Wire Line - 1100 5500 1200 5600 -Connection ~ 1800 5600 -Text Label 1300 5600 0 60 ~ 0 -GND -Wire Wire Line - 9250 5500 10750 5500 -Entry Wire Line - 10750 5500 10850 5600 -Text Label 10350 5500 0 60 ~ 0 -GND -Wire Wire Line - 9250 1500 10750 1500 -Entry Wire Line - 10750 1500 10850 1600 -Connection ~ 3600 2000 -Wire Wire Line - 4800 2000 4800 2200 -Entry Wire Line - 6450 2000 6550 2100 -Text Label 6050 2000 0 60 ~ 0 -VCC -Connection ~ 5050 5600 -Entry Wire Line - 6450 5600 6550 5700 -Text Label 6050 5600 0 60 ~ 0 -GND -NoConn ~ 6450 3850 -NoConn ~ 6450 3950 -Wire Wire Line - 1800 4500 1500 4500 -Wire Wire Line - 1500 4500 1500 5600 -Connection ~ 1500 5600 -Entry Wire Line - 10750 2500 10850 2600 -Entry Wire Line - 10750 2100 10850 2200 -Text Notes 1000 5300 1 60 ~ 0 -Sacrificial USB cable from header to Teensy -Text Notes 7850 5950 0 60 ~ 0 -Ribbon cable between Teensy pins and socket -Wire Bus Line - 10850 6050 6550 6050 -$EndSCHEMATC diff --git a/keyboards/kinesis/docs/photos/P1050573.jpg b/keyboards/kinesis/docs/photos/P1050573.jpg deleted file mode 100644 index 027ab9efb..000000000 Binary files a/keyboards/kinesis/docs/photos/P1050573.jpg and /dev/null differ diff --git a/keyboards/kinesis/docs/photos/P1050574.jpg b/keyboards/kinesis/docs/photos/P1050574.jpg deleted file mode 100644 index d49c492b8..000000000 Binary files a/keyboards/kinesis/docs/photos/P1050574.jpg and /dev/null differ diff --git a/keyboards/kinesis/docs/photos/P1050575.jpg b/keyboards/kinesis/docs/photos/P1050575.jpg deleted file mode 100644 index 50cc9897c..000000000 Binary files a/keyboards/kinesis/docs/photos/P1050575.jpg and /dev/null differ diff --git a/keyboards/kinesis/docs/readme.txt b/keyboards/kinesis/docs/readme.txt deleted file mode 100644 index af33ac490..000000000 --- a/keyboards/kinesis/docs/readme.txt +++ /dev/null @@ -1,52 +0,0 @@ -This directory of documentation was copied from https://github.com/wjanssens/tmk_keyboard/tree/master/keyboard/kinesis -and is probably Copyright 2014 Warren Janssens -and probably released under GPL v2, which may be recovered at . - -Row configuration -PF0 A -PF1 B -PF2 C -PF3 G 0 = U4, 1 = U5 - -Column configuration - 4y0 4y1 4y2 4y3 4y4 4y5 4y6 4y7 5y0 5y1 5y2 5y3 5y4 5y5 5y6 5y7 - r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 r16 -PB0 21 c1 f6 f8 f7 5 4 3 2 1 =+ -PB1 22 c2 f3 f5 f4 t r e w q TAB -PB2 23 c3 ESC f2 f1 g f d s a CL -PB3 24 c4 f9 f11 f10 b v c x z LS UP DN [{ ]} -PB4 25 c5 f12 SL PS RT LT §± `~ 6 7 8 9 0 -_ -PB5 26 c6 PB PGM KPD y u i o p \ -PB6 27 c7 LC DL BS RC EN SP h j k l ;: '" -PB7 28 c8 RA PU PD n m ,< .> /? RS - */ - - -40 pin connector - - DL2 1 40 VCC - DR1 2 39 A - DR2 3 38 B - DL1 4 37 C - KPD 5 36 G - PGM 6 35 - SCL 7 34 - SDA 8 33 - RST 9 32 BUZZ - WP 10 31 EA - FS1 11 30 ALE - CLOCK 12 29 PSEN - DATA 13 28 r8 - 14 27 r7 - FS3 15 26 r6 - 16 25 r5 - FS2 17 24 r4 - XTAL1 18 23 r3 - XTAL2 19 22 r2 - GND 20 21 r1 - - -references: -https://github.com/chrisandreae/keyboard-firmware - - diff --git a/keyboards/kinesis/docs/schematic.png b/keyboards/kinesis/docs/schematic.png deleted file mode 100644 index fa9405a1f..000000000 Binary files a/keyboards/kinesis/docs/schematic.png and /dev/null differ diff --git a/keyboards/kinesis/keymaps/default/keymap.c b/keyboards/kinesis/keymaps/default/keymap.c index 3bf80699c..01a66b5e5 100644 --- a/keyboards/kinesis/keymaps/default/keymap.c +++ b/keyboards/kinesis/keymaps/default/keymap.c @@ -1,10 +1,6 @@ #include "kinesis.h" -#include "action_layer.h" -#define QWERTY 0 // Base qerty -#define SYMB 1// Symbol layer - -// An almost entirely blank keymap. Test layers with the upper right hand key - 1 in normal mode, reset in layer 2. +#define QWERTY 0 // Base qwerty /**************************************************************************************************** @@ -33,7 +29,6 @@ * `--------------------' `--------------------' */ - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [QWERTY] = KEYMAP( KC_ESC, KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_F6 ,KC_F7 ,KC_F8, @@ -45,7 +40,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL,KC_LALT, KC_HOME, KC_BSPC,KC_DEL ,KC_END , - KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 ,KC_PSCR ,KC_SLCK ,KC_PAUS, KC_FN0, KC_1, + KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 ,KC_PSCR ,KC_SLCK ,KC_PAUS, KC_FN0, KC_1, KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_MINS, KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_BSLS, KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN,KC_QUOT, @@ -54,32 +49,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_RGUI,KC_RCTL, KC_PGUP, KC_PGDN,KC_ENTER ,KC_SPC - ), -[SYMB] = 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, - 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, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_FN0, RESET, - 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, 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, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS ) }; -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_TAP_TOGGLE(SYMB) , // FN1 - Momentary Layer 1 (Symbols) +const uint16_t PROGMEM fn_actions[] = { }; diff --git a/keyboards/kinesis/keymaps/dvorak/Makefile b/keyboards/kinesis/keymaps/dvorak/Makefile new file mode 100644 index 000000000..9d3df5964 --- /dev/null +++ b/keyboards/kinesis/keymaps/dvorak/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 = no # 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/kinesis/keymaps/dvorak/config.h b/keyboards/kinesis/keymaps/dvorak/config.h new file mode 100644 index 000000000..8893d122e --- /dev/null +++ b/keyboards/kinesis/keymaps/dvorak/config.h @@ -0,0 +1,8 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here + +#endif diff --git a/keyboards/kinesis/keymaps/dvorak/keymap.c b/keyboards/kinesis/keymaps/dvorak/keymap.c new file mode 100644 index 000000000..9008bc808 --- /dev/null +++ b/keyboards/kinesis/keymaps/dvorak/keymap.c @@ -0,0 +1,93 @@ +#include "kinesis.h" + +#define _DVORAK 0 // Base Dvorak layer +#define _MEDIA 1 // Media layer + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_DVORAK] = KEYMAP( + // left hand + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, + KC_BSPC, KC_A, KC_O, KC_E, KC_U, KC_I, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, + KC_ESC, KC_LBRC, KC_DOWN, KC_UP, + // left thumb + KC_LGUI, KC_LCTL, + KC_LALT, + KC_BSPC, KC_DEL, TG(_MEDIA), + // right hand + KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, KC_FN0, KC_1, + KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, + KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, + KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, + KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, + KC_LEFT, KC_RIGHT, KC_RBRC, KC_BSLS, + // right thumb + KC_RCTL, KC_RGUI, + KC_RALT, + TG(_MEDIA), KC_ENT, KC_SPC + ), + +[_MEDIA] = KEYMAP( + // left hand + 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_BTN4, KC_BTN3, KC_BTN2, KC_BTN1, KC_NO, + KC_NO, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, + KC_NO, KC_NO, KC_MS_D, KC_MS_U, + // left thumb + KC_NO, KC_NO, + KC_NO, + KC_NO, KC_NO, KC_TRNS, + // right hand + 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_POWER, + KC_NO, KC_VOLU, KC_MS_U, KC_VOLD, KC_NO, KC_NO, + KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, KC_NO, + KC_NO, KC_MPRV, KC_MPLY, KC_MNXT, KC_NO, KC_NO, + KC_MS_L, KC_MS_R, KC_NO, KC_NO, + // right thumb + KC_NO, KC_NO, + KC_NO, + KC_TRNS, KC_ENT, KC_NO +) +}; + + +const uint16_t PROGMEM fn_actions[] = { + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; + + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/kinesis/keymaps/milestogo/Makefile b/keyboards/kinesis/keymaps/milestogo/Makefile new file mode 100644 index 000000000..9d3df5964 --- /dev/null +++ b/keyboards/kinesis/keymaps/milestogo/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 = no # 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/kinesis/keymaps/milestogo/config.h b/keyboards/kinesis/keymaps/milestogo/config.h new file mode 100644 index 000000000..8893d122e --- /dev/null +++ b/keyboards/kinesis/keymaps/milestogo/config.h @@ -0,0 +1,8 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here + +#endif diff --git a/keyboards/kinesis/keymaps/milestogo/keymap.c b/keyboards/kinesis/keymaps/milestogo/keymap.c new file mode 100644 index 000000000..c2635eefe --- /dev/null +++ b/keyboards/kinesis/keymaps/milestogo/keymap.c @@ -0,0 +1,331 @@ +#include "kinesis.h" +#include "action_layer.h" +#include "mousekey.h" + +#define _QWERTY 0 // Base qerty +#define _SYMB 1// Symbol layer +#define _MOUSE 2// +#define _TRANS 3// + + + +/* Macros */ +enum { + NONE = 0, + // Diagonal mouse movement + A_MUL, + A_MUR, + A_MDL, + A_MDR, +}; + + +// Why so many gui keys, why not just map all the OS X stuff to buttons? Good question. +/**************************************************************************************************** +* +* Keymap: Default Layer in Qwerty +* +* ,-------------------------------------------------------------------------------------------------------------------. +* | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F8 | F9 | F10 | F12 | FN0 | FN1 | FN2 | | bOOT | +* |--------+------+------+------+------+------+---------------------------+------+------+------+------+------+--------| +* | =+ | 1! | 2@ | 3# | 4$ | 5% | | 6^ | 7& | 8* | 9( | 0) | -_ | +* |--------+------+------+------+------+------| +------+------+------+------+------+--------| +* | Tab | Q | W | E | R | T | | Y | U | I | O | P | \| | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* |MouseFN0| A | S | D | F | G | | H | J | K | L | ;: | '" | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | Shift | Z | X | C | V | B | | N | M | ,. | .> | /? | Shift | +* `--------+------+------+------+------+------- `------+------+------+------+------+--------' +* | ~` | ESC |GUI/L |L1/RT | | L1/UP|GUI/DN| [{ | ]} | +* `---------------------------' `---------------------------' +* ,-------------. ,-------------. +* | CTRL | GUI | | ALT | GUI | +* ,------|------|------| |------+------+------. +* | | | Home | | PgUp | | | +* | BkSp | Del |------| |------|Return| Space| +* | | | End | | PgDn | | | +* `--------------------' `--------------------' +*/ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_QWERTY] = KEYMAP( + KC_ESC, KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_F6 ,KC_F7 ,KC_F8, + KC_EQL, KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , + KC_TAB, KC_Q ,KC_W ,KC_E ,KC_R ,KC_T , + KC_FN0 ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G , + KC_LSFT,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B , + KC_GRAVE, KC_ESC, KC_FN4, KC_FN5, + KC_LCTL,KC_LGUI, + KC_HOME, + KC_BSPC,KC_DEL ,KC_FN0 , + KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 ,KC_FN0 ,KC_FN1 ,KC_FN2, KC_NO, RESET, + KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_MINS, + KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_BSLS, + KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN,KC_QUOT, + KC_N ,KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_RSFT, + KC_FN6, KC_FN7, KC_LBRC ,KC_RBRC, + KC_RALT,KC_RGUI, + KC_PGUP, + KC_PGDN,KC_ENTER ,KC_SPC + ), + +/* _SYMBol level +* +* ,-------------------------------------------------------------------------------------------------------------------. +* | | | | | | | | | | | | | | | | bOOT | +* |--------+------+------+------+------+------+---------------------------+------+------+------+------+------+--------| +* | | | * | # | | | | | | | | | | +* |--------+------+------+------+------+------| +------+------+------+------+------+--------| +* | | / | [ | ] | | | | | | | | | | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | | | { | } | | | | | | | | | | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | | = | ( | ) | | | | | | | | | | +* `--------+------+------+------+------+------- `------+------+------+------+------+--------' +* | | |GUI/L |L1/RT | | L1/UP|GUI/DN| { | } | +* `---------------------------' `---------------------------' +* ,-------------. ,-------------. +* | CTRL | GUI | | ALT | GUI | +* ,------|------|------| |------+------+------. +* | | | Home | | PgUp | | | +* | BkSp | Del |------| |------|Mouse1|Mouse2| +* | | | End | | PgDn |LClick|Rclick| +* `--------------------' `--------------------' +*/ + + + +[_SYMB] = KEYMAP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_ASTR, KC_HASH, KC_TRNS, KC_TRNS, + KC_TRNS, KC_SLSH, KC_LBRC, KC_RBRC, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, RSFT(KC_LBRC), RSFT(KC_RBRC), KC_TRNS, KC_TRNS, + KC_TRNS, KC_EQL, RSFT(KC_9), RSFT(KC_0), KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_FN4, KC_FN5, + 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_FN0, KC_2, + 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, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_FN6, KC_FN7, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), +/* Keymap: Movement and function layer +* +* ,-------------------------------------------------------------------------------------------------------------------. +* | Caps | F1 | F2 | F3 | F4 | F5 | F6 | F8 | F9 | F10 | F12 | FN0 | FN1 | FN2 | Tada | bOOT | +* |--------+------+------+------+------+------+---------------------------+------+------+------+------+------+--------| +* | =+ | ! | @ | # | $ | % | | ^ | & | * | ( | ) |MS Fast | +* |--------+------+------+------+------+------| +------+------+------+------+------+--------| +* | Tab | | | Up | |PgUp | | MwU |MS_UL | MS_U |MS_UR | | Ms Norm| +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* |MouseFN1| C^A | Left | Down |Right | C^E | | | MS_L |Mouse1| MS_R | |MS Slow | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | | GuiZ | GUI X| GUI C| GUI_V|PgDown| | MWD | MDown|MS Dwn|MS_DR | ? | | +* `--------+------+------+------+------+------- `------+------+------+------+------+--------' +* | `~ | ESC | | | | | | { | } | +* `---------------------------' `---------------------------' +* ,-------------. ,-------------. +* | CTRL | GUI | | ALT | GUI | +* ,------|------|------| |------+------+------. +* | | | Home | | PgUp | | | +* | BkSp | Del |------| |------|Mouse1|Mouse2| +* | | | End | | PgDn |LClick|Rclick| +* `--------------------' `--------------------' +*/ + + +[_MOUSE] = KEYMAP( + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_EXLM ,KC_AT, KC_HASH, KC_DLR ,KC_PERC , + KC_TRNS, KC_NO, KC_NO, KC_UP, KC_NO, KC_PGUP, + KC_FN1, LCTL(KC_A),KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_E), + KC_TRNS, LGUI(KC_Z),LGUI(KC_X),LGUI(KC_C),LGUI(KC_V),KC_PGDN, + KC_TRNS, KC_TRNS, KC_NO, KC_NO, + 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_FN0,RESET, + KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_ACL2, + KC_WH_U, M(A_MUL), KC_MS_U, M(A_MUR), KC_NO, KC_ACL1, + KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, KC_ACL0, + KC_WH_D, M(A_MDL), KC_MS_D, M(A_MDR), RSFT(KC_LBRC), RSFT(KC_RBRC), + KC_LCBR, KC_RCBR, KC_NO, KC_NO, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_BTN1, KC_BTN2 + ), + + + +/* EMPTY +* +* ,-------------------------------------------------------------------------------------------------------------------. +* | | | | | | | | | | | | | | | | bOOT | +* |--------+------+------+------+------+------+---------------------------+------+------+------+------+------+--------| +* | | | | | | | | | | | | | | +* |--------+------+------+------+------+------| +------+------+------+------+------+--------| +* | | | | | | | | | | | | | | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | | | | | | | | | | | | | | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | | | | | | | | | | | | | | +* `--------+------+------+------+------+------- `------+------+------+------+------+--------' +* | | | | | | | | | | +* `---------------------------' `---------------------------' +* ,-------------. ,-------------. +* | Ctrl | Alt | | Gui | Ctrl | +* ,------|------|------| |------+------+------. +* | | | Home | | PgUp | | | +* | BkSp | Del |------| |------|Mouse1|Mouse2| +* | | | End | | PgDn |LClick|Rclick| +* `--------------------' `--------------------' +*/ + + + +[_TRANS] = 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, + 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_FN10, KC_FN11, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_FN0, KC_2, + 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, 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, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), + + +}; + + + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_TAP_TOGGLE(_MOUSE) , + [1] = ACTION_LAYER_TOGGLE(_MOUSE) , + [2] = ACTION_LAYER_TAP_TOGGLE(_SYMB) , + [5]= ACTION_LAYER_TAP_KEY(_SYMB,KC_RIGHT), + [4]= ACTION_MODS_TAP_KEY(MOD_LGUI,KC_LEFT), + [6]= ACTION_LAYER_TAP_KEY(_SYMB,KC_UP), + [7]= ACTION_MODS_TAP_KEY(MOD_LGUI,KC_DOWN), + + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + + // from algernon's ErgoDox EZ layout, + case A_MUL: + if (record->event.pressed) { + mousekey_on(KC_MS_UP); + mousekey_on(KC_MS_LEFT); + } else { + mousekey_off(KC_MS_UP); + mousekey_off(KC_MS_LEFT); + } + mousekey_send(); + break; + + case A_MUR: + if (record->event.pressed) { + mousekey_on(KC_MS_UP); + mousekey_on(KC_MS_RIGHT); + } else { + mousekey_off(KC_MS_UP); + mousekey_off(KC_MS_RIGHT); + } + mousekey_send(); + break; + + case A_MDL: + if (record->event.pressed) { + mousekey_on(KC_MS_DOWN); + mousekey_on(KC_MS_LEFT); + } else { + mousekey_off(KC_MS_DOWN); + mousekey_off(KC_MS_LEFT); + } + mousekey_send(); + break; + + case A_MDR: + if (record->event.pressed) { + mousekey_on(KC_MS_DOWN); + mousekey_on(KC_MS_RIGHT); + } else { + mousekey_off(KC_MS_DOWN); + mousekey_off(KC_MS_RIGHT); + } + mousekey_send(); + break; + } + return MACRO_NONE; +}; + + +void matrix_init_user(void) { + + +} + +void matrix_scan_user(void) { + +#ifdef ALVICSTEP_CONFIG_H + int8_t layer = biton32(layer_state); + + switch (layer) { + case 1: + if (!(host_keyboard_leds() & (1 << USB_LED_CAPS_LOCK))) { + all_led_off(); + caps_lock_led_on(); + } + break; + + case 2: + if (!(host_keyboard_leds() & (1 << USB_LED_SCROLL_LOCK))) { + all_led_off(); + scroll_lock_led_on(); + } + case 0: + all_led_off(); + num_lock_led_on(); + break; + default: + break; + } +#endif + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/kinesis/keymaps/milestogo/readme.md b/keyboards/kinesis/keymaps/milestogo/readme.md new file mode 100644 index 000000000..76356a687 --- /dev/null +++ b/keyboards/kinesis/keymaps/milestogo/readme.md @@ -0,0 +1,2 @@ +# a programmer friendly keymap for the kinesis-advantage +# not really baked yet. diff --git a/keyboards/kinesis/kinesis.c b/keyboards/kinesis/kinesis.c index 1fee90e6f..7a6a1be54 100644 --- a/keyboards/kinesis/kinesis.c +++ b/keyboards/kinesis/kinesis.c @@ -1,106 +1 @@ #include "kinesis.h" - -// begin section origin https://github.com/alvicstep/tmk_keyboard - - -void all_led_off(void) -{ - PORTD = 0b11111111; -} - -void all_led_on(void) -{ - PORTD = 0b00000000; -} -void num_lock_led_on(void) -{ - PORTD = 0b11101111; -} - -void caps_lock_led_on(void) -{ - PORTD = 0b01111111; -} - -void scroll_lock_led_on(void) -{ - PORTD = 0b11011111; -} -void keypad_led_on(void) -{ - PORTD = 0b10111111; -} -void blink_all_leds(void) -{ - all_led_on(); - _delay_ms(500); - - all_led_off(); - _delay_ms(100); - - caps_lock_led_on(); - _delay_ms(100); - - num_lock_led_on(); - _delay_ms(100); - - scroll_lock_led_on(); - _delay_ms(100); - - keypad_led_on(); - _delay_ms(100); - - //back - - scroll_lock_led_on(); - _delay_ms(100); - - num_lock_led_on(); - _delay_ms(100); - - caps_lock_led_on(); - _delay_ms(100); - - all_led_off(); -} - -// End section origin https://github.com/alvicstep/tmk_keyboard - - void matrix_init_kb(void) { - blink_all_leds(); - 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 - -//Copyright 2014 Warren Janssens - uint8_t leds = 0xF0; - if (usb_led & 1 << USB_LED_NUM_LOCK) - leds &= ~0x10; - if (usb_led & 1 << USB_LED_CAPS_LOCK) - leds &= ~0x80; - if (usb_led & 1 << USB_LED_SCROLL_LOCK) - leds &= ~0x20; - PORTD = (PORTD & 0x0F) | leds; - - led_set_user(usb_led); - -} - - diff --git a/keyboards/kinesis/kinesis.h b/keyboards/kinesis/kinesis.h index c04fbda15..66713731f 100644 --- a/keyboards/kinesis/kinesis.h +++ b/keyboards/kinesis/kinesis.h @@ -1,67 +1,23 @@ #ifndef KINESIS_H #define KINESIS_H -#include "quantum.h" - - -// The first section contains all of the arguements -// The second converts the arguments into a two-dimensional array +#ifdef SUBPROJECT_alvicstep + #include "alvicstep.h" +#endif +#ifdef SUBPROJECT_stapelberg + #include "stapelberg.h" +#endif -#define KEYMAP( \ - k02,k22,k12,k01,k21,k11,k00,k20,k10, \ - k80,k70,k60,k50,k40,k30, \ - k81,k71,k61,k51,k41,k31, \ - k82,k72,k62,k52,k42,k32, \ - k83,k73,k63,k53,k43,k33, \ - k74,k64,k54,k34, \ - k36,k35, \ - k55, \ - k56,k46,k75, \ - k03,k23,k13,k04,k24,k14,k05,k85,k84, \ - k94,kA4,kB4,kD4,kE4,kF4, \ - k95,kA5,kB5,kD5,kE5,kF5, \ - k96,kA6,kB6,kD6,kE6,kF6, \ - k97,kA7,kB7,kD7,kE7,kF7, \ - k93,kB3,kD3,kE3, \ - k47,k66, \ - k67, \ - k87,k76,k86 \ -) { \ - { k00, k01, k02, k03, k04, k05, KC_NO, KC_NO }, \ - { k10, k11, k12, k13, k14, KC_NO, KC_NO, KC_NO }, \ - { k20, k21, k22, k23, k24, KC_NO, KC_NO, KC_NO }, \ - { k30, k31, k32, k33, k34, k35, k36, KC_NO }, \ - { k40, k41, k42, k43, KC_NO, KC_NO, k46, k47 }, \ - { k50, k51, k52, k53, k54, k55, k56, KC_NO }, \ - { k60, k61, k62, k63, k64, KC_NO, k66, k67 }, \ - { k70, k71, k72, k73, k74, k75, k76, KC_NO }, \ - { k80, k81, k82, k83, KC_NO ,KC_NO, k86, k87}, \ - { KC_NO, KC_NO ,KC_NO ,k93, k94, k95, k96, k97}, \ - { KC_NO, KC_NO ,KC_NO ,KC_NO, kA4, kA5, kA6, kA7}, \ - { KC_NO, KC_NO ,KC_NO ,kB3, kB4, kB5, kB6, kB7}, \ - { KC_NO, KC_NO ,KC_NO ,KC_NO, KC_NO, KC_NO, k84, k85}, \ - { KC_NO, KC_NO ,KC_NO ,kD3, kD4, kD5, kD6, kD7}, \ - { KC_NO, KC_NO ,KC_NO ,kE3, kE4, kE5, kE6, kE7}, \ - { KC_NO, KC_NO ,KC_NO ,KC_NO, kF4, kF5, kF6, kF7} \ -} +#include "quantum.h" -/* 4y0 A 4y1 B 4y2 4y3 D 4y4 E 4y5 F 4y6 G 4y7 H 5y0 I 5y1 J 5y2 K 5y3 L 5y4 M 5y5 N 5y6 O 5y7 P */ +void all_led_off(void); +void all_led_on(void); +void num_lock_led_on(void); +void caps_lock_led_on(void); +void scroll_lock_led_on(void); +void keypad_led_on(void); -/* - 0 1 2 3 4 5 6 7 8 9 A B C D E F - A B C D E F G H I J K L M N O P - 4y0 4y1 4y2 4y3 4y4 4y5 4y6 4y7 5y0 5y1 5y2 5y3 5y4 5y5 5y6 5y7 - r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 -0 PB0 21 c0 f6 f8 f7 5 4 3 2 1 =+ -1 PB1 22 c1 f3 f5 f4 t r e w q TAB -2 PB2 23 c2 ESC f2 f1 g f d s a CL -3 PB3 24 c3 f9 f11 f10 b v c x z LS UP DN [{ ]} -4 PB4 25 c4 f12 SL PS RT LT §± `~ 6 7 8 9 0 -_ -5 PB5 26 c5 PB PGM KPD LA HM END y u i o p \ -6 PB6 27 c6 LC DEL BS RC ENT SP h j k l ;: '" -7 PB7 28 c7 RA PU PD n m ,< .> /? RS -*/ #endif diff --git a/keyboards/kinesis/matrix.c b/keyboards/kinesis/matrix.c deleted file mode 100644 index cb0d5ad7d..000000000 --- a/keyboards/kinesis/matrix.c +++ /dev/null @@ -1,228 +0,0 @@ -/* -Copyright 2014 Warren Janssens - -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 . -*/ - -/* - * scan matrix - */ -#include -#include -#include -#include -#include "action_layer.h" -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" -#include "led.h" -#include "config.h" - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif -static uint8_t debouncing = DEBOUNCE; - -/* matrix state(1:on, 0:off) */ -static uint8_t matrix[MATRIX_ROWS]; -static uint8_t matrix_debouncing[MATRIX_ROWS]; - -static matrix_row_t read_row(uint8_t row); -static void unselect_rows(void); -static void select_rows(uint8_t row); - -__attribute__ ((weak)) -void matrix_init_quantum(void) { - matrix_init_kb(); -} - -__attribute__ ((weak)) -void matrix_scan_quantum(void) { - matrix_scan_kb(); -} - -__attribute__ ((weak)) -void matrix_init_kb(void) { - matrix_init_user(); -} - -__attribute__ ((weak)) -void matrix_scan_kb(void) { - matrix_scan_user(); -} - -__attribute__ ((weak)) -void matrix_init_user(void) { -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} - -inline -uint8_t matrix_rows(void) -{ - return MATRIX_ROWS; -} - - -inline -uint8_t matrix_cols(void) -{ - return MATRIX_COLS; -} - -void matrix_init(void) -{ - //debug_enable = true; - - //dprint("matrix_init"); dprintln(); - // output high (leds) - DDRD = 0xFF; - PORTD = 0xFF; - - // output low (multiplexers) - DDRF = 0xFF; - PORTF = 0x00; - - // input with pullup (matrix) - DDRB = 0x00; - PORTB = 0xFF; - - // input with pullup (program and keypad buttons) - DDRC = 0x00; - PORTC = 0xFF; - - // initialize row and col - unselect_rows(); - - // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - matrix_debouncing[i] = 0; - } - -} - -uint8_t matrix_scan(void) -{ - - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - select_rows(i); - uint8_t row = read_row(i); - if (matrix_debouncing[i] != row) { - matrix_debouncing[i] = row; - if (debouncing) { - debug("bounce!: "); debug_hex(debouncing); debug("\n"); - } - debouncing = DEBOUNCE; - } - unselect_rows(); - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - matrix_scan_quantum(); - return 1; -} - -bool matrix_is_modified(void) -{ - if (debouncing) return false; - return true; -} - -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1< /? RS - */ - - diff --git a/keyboards/kinesis/readme.md b/keyboards/kinesis/readme.md index 79c86581e..2813ee273 100644 --- a/keyboards/kinesis/readme.md +++ b/keyboards/kinesis/readme.md @@ -1,42 +1,12 @@ -kinesis-advantage keyboard firmware -====================== +# Firmware for the Kinesis advantage keyboard -## Kinesis specific information -This is a port of https://github.com/alvicstep/tmk_keyboard, -which is a fork of https://github.com/wjanssens/tmk_keyboard, -which is based on work from https://github.com/chrisandreae/keyboard-firmware +There are at least two different ways to replace the controller in this keyboard. -If you replace the kinesis CPU as described in the doc folder, then this code should allow you to use QMK. -I've tested with a Teensy 2++, remember to change the CPU if you use a 32u4 instead. +The Stapelberg folder contains the docs and configuration for using the custom controller created by Michael Stapelberg. -Not yet implemented: -- Kinesis EEProm reading or writing -- Audio - this should be simple if we remove hardcoded pins from audio.h and switch to E7 +The alvicstep folder contains docs and configuration for directly wiring a Teensy2++ to the existing controller board. This follows the pinouts described in https://github.com/alvicstep/tmk_keyboard, which is where the name comes from. +## Keymaps +Both hardware solutions should work with the same keymaps -## Quantum MK Firmware - -For the full Quantum feature list, see [the parent readme.md](/doc/readme.md). - -## Building - -Download or clone the whole firmware and navigate to the keyboards/kinesis-advantage folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. - -Depending on which keymap you would like to use, you will have to compile slightly differently. - -### Default - -To build with the default keymap, simply run `make default`. - -### Other Keymaps - -Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files. - -To build the firmware binary hex file with a keymap just do `make` with a keymap like this: - -``` -$ make [default|jack|] -``` - -Keymaps follow the format **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/` diff --git a/keyboards/kinesis/stapelberg/Makefile b/keyboards/kinesis/stapelberg/Makefile new file mode 100644 index 000000000..bd09e5885 --- /dev/null +++ b/keyboards/kinesis/stapelberg/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../../Makefile +endif diff --git a/keyboards/kinesis/stapelberg/config.h b/keyboards/kinesis/stapelberg/config.h new file mode 100644 index 000000000..0677e0ade --- /dev/null +++ b/keyboards/kinesis/stapelberg/config.h @@ -0,0 +1,50 @@ +#ifndef STAPELBERG_CONFIG_H +#define STAPELBERG_CONFIG_H + +#include "../config.h" + +/* USB Device descriptor parameter */ +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0002 + +/* key matrix size */ +#define MATRIX_ROWS 15 +#define MATRIX_COLS 7 + +/* + * 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, D4, D5, D6, D7, C0, C1, C2, C3, C4, C5, C6 } +#define MATRIX_COL_PINS { B0, B1, B2, B3, B4, B5, B6 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* don't know if this should be defined at the board or top level. Assuming board +#define MOUSEKEY_DELAY 100 +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_MAX_SPEED 3 +#define MOUSEKEY_TIME_TO_MAX 10 +*/ + +#define IGNORE_MOD_TAP_INTERRUPT + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + + +#endif diff --git a/keyboards/kinesis/stapelberg/images/controller_board.jpg b/keyboards/kinesis/stapelberg/images/controller_board.jpg new file mode 100644 index 000000000..b18f76f7e Binary files /dev/null and b/keyboards/kinesis/stapelberg/images/controller_board.jpg differ diff --git a/keyboards/kinesis/stapelberg/images/exterior_reset.jpg b/keyboards/kinesis/stapelberg/images/exterior_reset.jpg new file mode 100644 index 000000000..6edda8130 Binary files /dev/null and b/keyboards/kinesis/stapelberg/images/exterior_reset.jpg differ diff --git a/keyboards/kinesis/stapelberg/images/teensy_detail.jpg b/keyboards/kinesis/stapelberg/images/teensy_detail.jpg new file mode 100644 index 000000000..12e6c1c8a Binary files /dev/null and b/keyboards/kinesis/stapelberg/images/teensy_detail.jpg differ diff --git a/keyboards/kinesis/stapelberg/readme.md b/keyboards/kinesis/stapelberg/readme.md new file mode 100644 index 000000000..b04a0bd49 --- /dev/null +++ b/keyboards/kinesis/stapelberg/readme.md @@ -0,0 +1,55 @@ +# kinesis_stapelberg keyboard firmware + +This folder contains the firmware customization required to run QMK on the custom controller for the Kinesis Advantage created by Michael Stapelberg. +It differs from the `alvicstep keyboard in that the existing QMK Kinesis Advantage project uses the existing controller board provided by Kinesis. + +The controller board hardware is described +[here](http://michael.stapelberg.de/Artikel/kinesis_custom_controller) + +Mapping the pin assignments was done using the corresponding matrix description provided at this +[link](https://github.com/stapelberg/kinesis-firmware/blob/master/kb_kinesis/config.kspec) + +This code makes no attempt to drive the four LEDs provided on the controller board. + + +## Building the Hardware + +If you want to perform this customization, these parts may be helpful. + +| Function | Quantity | Vendor | Part Number | +| ------------------------------------------------------ | -------- | ------- | ------------ | +| 13 pin connector for function keys and finger keywells | 4 | Digi-Key | WM14526-ND | +| 10 pin headers for thumb clusters | 4 | Digi-Key | 609-3250-ND | +| 8 pin cable for thumb clusters | 2 | Digi-Key | SAM8928-ND | +| Teensy++ 2.0 | 1 | Digi-Key | 1528-1056-ND | +| 2 pin right angle header for reset | 1 | Digi-Key | 3M9467-ND | +| Reset cables | 2 | Sparkfun | PRT-09140 | + +The board and connections are shown here +![](images/controller_board.jpg) + +The Teensy mounting detail can be seen here. +I used a socket for prototyping. +![](images/teensy_detail.jpg) + + +Since the proper mounting of the Teensy board places the reset button in a tight space, I added a 2-pin header to the reset and ground pins on the edge of the board. +Shorting these two pins together will reset the board. +I also put female to male header jumper cables on these so they could be accessed outside the enclosure. +The exterior cables can be seen here. +![](images/exterior_reset.jpg) + + +## Keymaps + +### Default + +To build with the default keymap, run `make default` while in the +`kinesis_stapelberg` working directory. + +### Dvorak + +This keymap contains a dvorak implementation as well as media and symbol layers. + +Run `make dvorak` while in the `kinesis_stapelberg` working directory. + diff --git a/keyboards/kinesis/stapelberg/rules.mk b/keyboards/kinesis/stapelberg/rules.mk new file mode 100644 index 000000000..fb421a34f --- /dev/null +++ b/keyboards/kinesis/stapelberg/rules.mk @@ -0,0 +1,10 @@ +ifndef QUANTUM_DIR + include ../../../Makefile +endif + +# just silently stop, since we need to upload with teensy uploader +upload: build + + + + diff --git a/keyboards/kinesis/stapelberg/stapelberg.c b/keyboards/kinesis/stapelberg/stapelberg.c new file mode 100644 index 000000000..111db81fe --- /dev/null +++ b/keyboards/kinesis/stapelberg/stapelberg.c @@ -0,0 +1,28 @@ +#include "stapelberg.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/kinesis/stapelberg/stapelberg.h b/keyboards/kinesis/stapelberg/stapelberg.h new file mode 100644 index 000000000..c90fc3d52 --- /dev/null +++ b/keyboards/kinesis/stapelberg/stapelberg.h @@ -0,0 +1,72 @@ +#ifndef KINESIS_STAPELBERG_H +#define KINESIS_STAPELBERG_H + +#include "quantum.h" + +// This a shortcut to help you visually see your layout. +// The first section contains all of the arguments as on the physical keyboard +// The second converts the arguments into the 2-D scanned array + +#define KEYMAP( \ + kC0,kD0,kE0,kC1,kD1,kE1,kC2,kD2,kE2, \ + k00,k10,k20,k30,k40,k50, \ + k01,k11,k21,k31,k41,k51, \ + k02,k12,k22,k32,k42,k52, \ + k03,k13,k23,k33,k43,k53, \ + k14,k24,k34,k54, \ + k56,k55, \ + k35, \ + k36,k46,k25, \ + kC3,kD3,kE3,kC4,kD4,kE4,kC5,kE5,kD5, \ + k60,k70,k80,k90,kA0,kB0, \ + k61,k71,k81,k91,kA1,kB1, \ + k62,k72,k82,k92,kA2,kB2, \ + k63,k73,k83,k93,kA3,kB3, \ + k64,k84,k94,kA4, \ + k96,k85, \ + k86, \ + k66,k75,k65 \ +) { \ + { k00, k01, k02, k03, KC_NO, KC_NO, KC_NO }, \ + { k10, k11, k12, k13, k14, KC_NO, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, KC_NO }, \ + { k30, k31, k32, k33, k34, k35, k36 }, \ + { k40, k41, k42, k43, KC_NO, KC_NO, k46 }, \ + { k50, k51, k52, k53, k54, k55, k56 }, \ + { k60, k61, k62, k63, k64, k65, k66 }, \ + { k70, k71, k72, k73, KC_NO, k75, KC_NO }, \ + { k80, k81, k82, k83, k84, k85, k86 }, \ + { k90, k91, k92, k93, k94, KC_NO, k96 }, \ + { kA0, kA1, kA2, kA3, kA4, KC_NO, KC_NO }, \ + { kB0, kB1, kB2, kB3, KC_NO, KC_NO, KC_NO }, \ + { kC0, kC1, kC2, kC3, kC4, kC5, KC_NO }, \ + { kD0, kD1, kD2, kD3, kD4, kD5, KC_NO }, \ + { kE0, kE1, kE2, kE3, kE4, kE5, KC_NO } \ +} + +/* +This is the Stapelberg matrix as published at +https://github.com/stapelberg/kinesis-firmware/blob/master/kb_kinesis/config.kspec +Along with the pins for each row and column + PB0 PB1 PB2 PB3 PB4 PB5 PB6 + kx0 kx1 kx2 kx3 kx4 kx5 kx6 +PD0 k0x Row: EQL TAB CAP LSH X2 -- -- +PD1 k1x Row: 1 Q A Z BQ -- -- +PD2 k2x Row: 2 W S X INS END -- +PD3 k3x Row: 3 E D C LFT HOM BAK +PD4 k4x Row: 4 R F V -- -- DEL +PD5 k5x Row: 5 T G B RT LAL LCT +PD6 k6x Row: 6 Y H N UP SPC PGD +PD7 k7x Row: 7 U J M -- RET -- +PB0 k8x Row: 8 I K COM DWN RCT PGU +PB1 k9x Row: 9 O L PER LBR -- RAL +PB2 kAx Row: 0 P SEM SLA RBR -- -- +PB3 kBx Row: MIN BSL APO RSH X1 -- -- +PB4 kCx Row: ESC F3 F6 F9 F12 PAU -- +PB5 kDx Row: F1 F4 F7 F10 PRT PRG -- +PB6 kEx Row: F2 F5 F8 F11 SLK KEY -- +*/ + + + +#endif -- cgit v1.2.3 From 62f1c13c3ad56e1a3fd90328355c57a4b1b61c6a Mon Sep 17 00:00:00 2001 From: milestogo Date: Sun, 8 Jan 2017 22:17:47 -0800 Subject: trying to clean up duplicate docs --- .../alvicstep/docs/docs/kicad/kinesis-cache.lib | 232 -------- .../kinesis/alvicstep/docs/docs/kicad/kinesis.pro | 83 --- .../kinesis/alvicstep/docs/docs/kicad/kinesis.sch | 634 --------------------- .../alvicstep/docs/docs/photos/P1050573.jpg | Bin 177711 -> 0 bytes .../alvicstep/docs/docs/photos/P1050574.jpg | Bin 343978 -> 0 bytes .../alvicstep/docs/docs/photos/P1050575.jpg | Bin 266771 -> 0 bytes keyboards/kinesis/alvicstep/docs/docs/readme.txt | 52 -- .../kinesis/alvicstep/docs/docs/schematic.png | Bin 175014 -> 0 bytes 8 files changed, 1001 deletions(-) delete mode 100644 keyboards/kinesis/alvicstep/docs/docs/kicad/kinesis-cache.lib delete mode 100644 keyboards/kinesis/alvicstep/docs/docs/kicad/kinesis.pro delete mode 100644 keyboards/kinesis/alvicstep/docs/docs/kicad/kinesis.sch delete mode 100644 keyboards/kinesis/alvicstep/docs/docs/photos/P1050573.jpg delete mode 100644 keyboards/kinesis/alvicstep/docs/docs/photos/P1050574.jpg delete mode 100644 keyboards/kinesis/alvicstep/docs/docs/photos/P1050575.jpg delete mode 100644 keyboards/kinesis/alvicstep/docs/docs/readme.txt delete mode 100644 keyboards/kinesis/alvicstep/docs/docs/schematic.png diff --git a/keyboards/kinesis/alvicstep/docs/docs/kicad/kinesis-cache.lib b/keyboards/kinesis/alvicstep/docs/docs/kicad/kinesis-cache.lib deleted file mode 100644 index f798d39d6..000000000 --- a/keyboards/kinesis/alvicstep/docs/docs/kicad/kinesis-cache.lib +++ /dev/null @@ -1,232 +0,0 @@ -EESchema-LIBRARY Version 2.3 Date: Wednesday, November 12, 2014 'pmt' 10:15:19 pm -#encoding utf-8 -# -# AT90S4414-P -# -DEF AT90S4414-P IC 0 40 Y Y 1 F N -F0 "IC" -850 1880 40 H V L BNN -F1 "AT90S4414-P" 450 -1950 40 H V L BNN -F2 "DIL40" 0 0 30 H V C CIN -F3 "~" 0 0 60 H V C CNN -ALIAS AT90S8515-P -$FPLIST - 40DIP-ELL600 - 40dip600 -$ENDFPLIST -DRAW -S -850 1850 850 -1850 0 1 10 f -X (T0)PB0 1 1000 700 150 L 40 40 1 1 B -X (T1)PB1 2 1000 600 150 L 40 40 1 1 B -X (AIN0)PB2 3 1000 500 150 L 40 40 1 1 B -X (AIN1)PB3 4 1000 400 150 L 40 40 1 1 B -X (~SS~)PB4 5 1000 300 150 L 40 40 1 1 B -X (MOSI)PB5 6 1000 200 150 L 40 40 1 1 B -X (MISO)PB6 7 1000 100 150 L 40 40 1 1 B -X (SCK)PB7 8 1000 0 150 L 40 40 1 1 B -X ~RESET 9 -1000 1700 150 R 40 40 1 1 I -X (RXD)PD0 10 1000 -1000 150 L 40 40 1 1 B -X GND 20 0 -2000 150 U 40 40 1 1 W -X ALE 30 1000 850 150 L 40 40 1 1 O -X VCC 40 0 2000 150 D 40 40 1 1 W -X (TXD)PD1 11 1000 -1100 150 L 40 40 1 1 B -X (A8)PC0 21 1000 -150 150 L 40 40 1 1 B -X ICP 31 -1000 -1400 150 R 40 40 1 1 I -X (INT0)PD2 12 1000 -1200 150 L 40 40 1 1 B -X (A9)PC1 22 1000 -250 150 L 40 40 1 1 B -X (AD7)PA7 32 1000 1000 150 L 40 40 1 1 B -X (INT1)PD3 13 1000 -1300 150 L 40 40 1 1 B -X (A10)PC2 23 1000 -350 150 L 40 40 1 1 B -X (AD6)PA6 33 1000 1100 150 L 40 40 1 1 B -X PD4 14 1000 -1400 150 L 40 40 1 1 B -X (A11)PC3 24 1000 -450 150 L 40 40 1 1 B -X (AD5)PA5 34 1000 1200 150 L 40 40 1 1 B -X (OC1A)PD5 15 1000 -1500 150 L 40 40 1 1 B -X (A12)PC4 25 1000 -550 150 L 40 40 1 1 B -X (AD4)PA4 35 1000 1300 150 L 40 40 1 1 B -X (~WR~)PD6 16 1000 -1600 150 L 40 40 1 1 B -X (A13)PC5 26 1000 -650 150 L 40 40 1 1 B -X (AD3)PA3 36 1000 1400 150 L 40 40 1 1 B -X (~RD~)PD7 17 1000 -1700 150 L 40 40 1 1 B -X (A14)PC6 27 1000 -750 150 L 40 40 1 1 B -X (AD2)PA2 37 1000 1500 150 L 40 40 1 1 B -X XTAL2 18 -1000 1200 150 R 40 40 1 1 B -X (A15)PC7 28 1000 -850 150 L 40 40 1 1 B -X (AD1)PA1 38 1000 1600 150 L 40 40 1 1 B -X XTAL1 19 -1000 800 150 R 40 40 1 1 B -X OC1B 29 -1000 -1500 150 R 40 40 1 1 W -X (AD0)PA0 39 1000 1700 150 L 40 40 1 1 B -ENDDRAW -ENDDEF -# -# ATMEGA16U4-A -# -DEF ATMEGA16U4-A U 0 40 Y Y 1 F N -F0 "U" -950 1700 40 H V C CNN -F1 "ATMEGA16U4-A" 700 -1500 40 H V C CNN -F2 "TQFP44" 0 0 35 H V C CIN -F3 "~" 1100 1100 60 H V C CNN -ALIAS ATMEGA16U4RC-A ATMEGA32U4-A ATMEGA32U4RC-A -$FPLIST - TQFP44 -$ENDFPLIST -DRAW -S -1000 1650 950 -1450 0 1 10 f -X (INT6/AIN0)PE6 1 1100 -650 150 L 40 40 1 1 B -X UVCC 2 -450 1800 150 D 40 40 1 1 W -X D- 3 -1150 100 150 R 40 40 1 1 B -X D+ 4 -1150 200 150 R 40 40 1 1 B -X UGND 5 -400 -1600 150 U 40 40 1 1 P -X UCAP 6 -1150 -50 150 R 40 40 1 1 P -X VBUS 7 -1150 350 150 R 40 40 1 1 P -X (SS/PCINT0)PB0 8 1100 1550 150 L 40 40 1 1 B -X (SCLK/PCINT1)PB1 9 1100 1450 150 L 40 40 1 1 B -X (PDI/MOSI/PCINT2)PB2 10 1100 1350 150 L 40 40 1 1 B -X (RXD/INT2)PD2 20 1100 150 150 L 40 40 1 1 B -X (ADC13/OC1B/OC4B/PCINT13)PB6 30 1100 950 150 L 40 40 1 1 B -X (ADC1)PF1 40 1100 -950 150 L 40 40 1 1 B -X (PDO/MISO/PCINT3)PB3 11 1100 1250 150 L 40 40 1 1 B -X (TXD/INT3)PD3 21 1100 50 150 L 40 40 1 1 B -X (OC3A/~OC4A~)PC6 31 1100 650 150 L 40 40 1 1 B -X (ADC0)PF0 41 1100 -850 150 L 40 40 1 1 B -X (OC0A/OC1C/~RTS~/PCINT7)PB7 12 1100 850 150 L 40 40 1 1 B -X (XCK1/~CTS~)PD5 22 1100 -150 150 L 40 40 1 1 B -X (ICP3/CLK0/OC4A)PC7 32 1100 550 150 L 40 40 1 1 B -X AREF 42 -1150 -850 150 R 40 40 1 1 P -X ~RESET~ 13 -1150 1550 150 R 40 40 1 1 I -X GND 23 -50 -1600 150 U 40 40 1 1 W -X (~HWB~)PE2 33 1100 -550 150 L 40 40 1 1 B -X GND 43 150 -1600 150 U 40 40 1 1 W -X VCC 14 -200 1800 150 D 40 40 1 1 W -X AVCC 24 150 1800 150 D 40 40 1 1 W -X VCC 34 -100 1800 150 D 40 40 1 1 W -X AVCC 44 250 1800 150 D 40 40 1 1 W -X GND 15 -150 -1600 150 U 40 40 1 1 W -X (ICP2/ADC8)PD4 25 1100 -50 150 L 40 40 1 1 B -X GND 35 50 -1600 150 U 40 40 1 1 W -X XTAL2 16 -1150 950 150 R 40 40 1 1 O -X (T1/~OC4D~/ADC9)PD6 26 1100 -250 150 L 40 40 1 1 B -X (ADC7/TDI)PF7 36 1100 -1350 150 L 40 40 1 1 B -X XTAL1 17 -1150 1150 150 R 40 40 1 1 I -X (T0/OC4D/ADC10)PD7 27 1100 -350 150 L 40 40 1 1 B -X (ADC6/TDO)PF6 37 1100 -1250 150 L 40 40 1 1 B -X (OC0B/SCL/INT0)PD0 18 1100 350 150 L 40 40 1 1 B -X (ADC11/PCINT4)PB4 28 1100 1150 150 L 40 40 1 1 B -X (ADC5/TMS)PF5 38 1100 -1150 150 L 40 40 1 1 B -X (SDA/INT1)PD1 19 1100 250 150 L 40 40 1 1 B -X (ADC12/OC1A/~OC4B~/PCINT12)PB5 29 1100 1050 150 L 40 40 1 1 B -X (ADC4/TCK)PF4 39 1100 -1050 150 L 40 40 1 1 B -ENDDRAW -ENDDEF -# -# C -# -DEF C C 0 10 N Y 1 F N -F0 "C" 0 100 40 H V L CNN -F1 "C" 6 -85 40 H V L CNN -F2 "~" 38 -150 30 H V C CNN -F3 "~" 0 0 60 H V C CNN -$FPLIST - SM* - C? - C1-1 -$ENDFPLIST -DRAW -P 2 0 1 20 -80 -30 80 -30 N -P 2 0 1 20 -80 30 80 30 N -X ~ 1 0 200 170 D 40 40 1 1 P -X ~ 2 0 -200 170 U 40 40 1 1 P -ENDDRAW -ENDDEF -# -# CONN_7 -# -DEF CONN_7 P 0 40 Y N 1 F N -F0 "P" -30 0 60 V V C CNN -F1 "CONN_7" 70 0 60 V V C CNN -F2 "~" 0 0 60 H V C CNN -F3 "~" 0 0 60 H V C CNN -DRAW -S -100 350 150 -350 0 1 0 N -X P1 1 -350 300 250 R 50 50 1 1 P I -X P2 2 -350 200 250 R 50 50 1 1 P I -X P3 3 -350 100 250 R 50 50 1 1 P I -X P4 4 -350 0 250 R 50 50 1 1 P I -X P5 5 -350 -100 250 R 50 50 1 1 P I -X P6 6 -350 -200 250 R 50 50 1 1 P I -X P7 7 -350 -300 250 R 50 50 1 1 P I -ENDDRAW -ENDDEF -# -# GND -# -DEF ~GND #PWR 0 0 Y Y 1 F P -F0 "#PWR" 0 0 30 H I C CNN -F1 "GND" 0 -70 30 H I C CNN -F2 "~" 0 0 60 H V C CNN -F3 "~" 0 0 60 H V C CNN -DRAW -P 4 0 1 0 -50 0 0 -50 50 0 -50 0 N -X GND 1 0 0 0 U 30 30 1 1 W N -ENDDRAW -ENDDEF -# -# R -# -DEF R R 0 0 N Y 1 F N -F0 "R" 80 0 40 V V C CNN -F1 "R" 7 1 40 V V C CNN -F2 "~" -70 0 30 V V C CNN -F3 "~" 0 0 30 H V C CNN -$FPLIST - R? - SM0603 - SM0805 - R?-* - SM1206 -$ENDFPLIST -DRAW -S -40 150 40 -150 0 1 12 N -X ~ 1 0 250 100 D 60 60 1 1 P -X ~ 2 0 -250 100 U 60 60 1 1 P -ENDDRAW -ENDDEF -# -# USB-MINI-B -# -DEF USB-MINI-B CON 0 40 Y Y 1 F N -F0 "CON" -250 450 60 H V C CNN -F1 "USB-MINI-B" -50 -500 60 H V C CNN -F2 "~" 0 0 60 H V C CNN -F3 "~" 0 0 60 H V C CNN -$FPLIST - USB-Mini-B-Jack -$ENDFPLIST -DRAW -S -350 400 350 -400 0 1 0 N -X VBUS 1 -550 300 200 R 50 50 1 1 W -X D- 2 -550 150 200 R 50 50 1 1 B -X D+ 3 -550 0 200 R 50 50 1 1 B -X ID 4 -550 -150 200 R 50 50 1 1 B -X GND 5 -550 -300 200 R 50 50 1 1 W -X SHELL1 6 550 300 200 L 50 50 1 1 B -X SHELL2 7 550 150 200 L 50 50 1 1 B -X SHELL3 8 550 -150 200 L 50 50 1 1 B -X SHELL4 9 550 -300 200 L 50 50 1 1 B -ENDDRAW -ENDDEF -# -# VCC -# -DEF VCC #PWR 0 0 Y Y 1 F P -F0 "#PWR" 0 100 30 H I C CNN -F1 "VCC" 0 100 30 H V C CNN -F2 "~" 0 0 60 H V C CNN -F3 "~" 0 0 60 H V C CNN -DRAW -X VCC 1 0 0 0 U 20 20 0 0 W N -C 0 50 20 0 1 0 N -P 3 0 1 0 0 0 0 30 0 30 N -ENDDRAW -ENDDEF -# -#End Library diff --git a/keyboards/kinesis/alvicstep/docs/docs/kicad/kinesis.pro b/keyboards/kinesis/alvicstep/docs/docs/kicad/kinesis.pro deleted file mode 100644 index 9f130b509..000000000 --- a/keyboards/kinesis/alvicstep/docs/docs/kicad/kinesis.pro +++ /dev/null @@ -1,83 +0,0 @@ -update=Wednesday, November 05, 2014 'pmt' 12:08:47 pm -version=1 -last_client=pcbnew -[cvpcb] -version=1 -NetIExt=net -[cvpcb/libraries] -EquName1=devcms -[general] -version=1 -[eeschema] -version=1 -PageLayoutDescrFile= -SubpartIdSeparator=0 -SubpartFirstId=65 -LibDir=../../../lib/kicad/library -NetFmtName= -RptD_X=0 -RptD_Y=100 -RptLab=1 -LabSize=60 -[eeschema/libraries] -LibName1=power -LibName2=device -LibName3=transistors -LibName4=conn -LibName5=linear -LibName6=regul -LibName7=74xx -LibName8=cmos4000 -LibName9=adc-dac -LibName10=memory -LibName11=xilinx -LibName12=special -LibName13=microcontrollers -LibName14=dsp -LibName15=microchip -LibName16=analog_switches -LibName17=motorola -LibName18=texas -LibName19=intel -LibName20=audio -LibName21=interface -LibName22=digital-audio -LibName23=philips -LibName24=display -LibName25=cypress -LibName26=siliconi -LibName27=opto -LibName28=atmel -LibName29=contrib -LibName30=valves -LibName31=custom -[pcbnew] -version=1 -LastNetListRead= -UseCmpFile=1 -PadDrill=1.016000000000 -PadDrillOvalY=1.016000000000 -PadSizeH=1.524000000000 -PadSizeV=1.524000000000 -PcbTextSizeV=1.500000000000 -PcbTextSizeH=1.500000000000 -PcbTextThickness=0.300000000000 -ModuleTextSizeV=1.000000000000 -ModuleTextSizeH=1.000000000000 -ModuleTextSizeThickness=0.150000000000 -SolderMaskClearance=0.000000000000 -SolderMaskMinWidth=0.000000000000 -DrawSegmentWidth=0.200000000000 -BoardOutlineThickness=0.100000000000 -ModuleOutlineThickness=0.150000000000 -[pcbnew/libraries] -LibDir=../../../lib/kicad/modules -LibName1=custom -LibName2=Sockets -LibName3=Connect -LibName4=Discret -LibName5=Divers -LibName6=Display -LibName7=LEDs -LibName8=SMD_Packages -LibName9=Sockets_DIP diff --git a/keyboards/kinesis/alvicstep/docs/docs/kicad/kinesis.sch b/keyboards/kinesis/alvicstep/docs/docs/kicad/kinesis.sch deleted file mode 100644 index f75335aa0..000000000 --- a/keyboards/kinesis/alvicstep/docs/docs/kicad/kinesis.sch +++ /dev/null @@ -1,634 +0,0 @@ -EESchema Schematic File Version 2 -LIBS:power -LIBS:device -LIBS:transistors -LIBS:conn -LIBS:linear -LIBS:regul -LIBS:74xx -LIBS:cmos4000 -LIBS:adc-dac -LIBS:memory -LIBS:xilinx -LIBS:special -LIBS:microcontrollers -LIBS:dsp -LIBS:microchip -LIBS:analog_switches -LIBS:motorola -LIBS:texas -LIBS:intel -LIBS:audio -LIBS:interface -LIBS:digital-audio -LIBS:philips -LIBS:display -LIBS:cypress -LIBS:siliconi -LIBS:opto -LIBS:atmel -LIBS:contrib -LIBS:valves -LIBS:custom -LIBS:kinesis-cache -EELAYER 27 0 -EELAYER END -$Descr A4 11693 8268 -encoding utf-8 -Sheet 1 1 -Title "" -Date "13 nov 2014" -Rev "" -Comp "" -Comment1 "" -Comment2 "" -Comment3 "" -Comment4 "" -$EndDescr -$Comp -L C C4 -U 1 1 545804FB -P 2850 4250 -F 0 "C4" H 2850 4350 40 0000 L CNN -F 1 "1uF" H 2856 4165 40 0000 L CNN -F 2 "~" H 2888 4100 30 0000 C CNN -F 3 "~" H 2850 4250 60 0000 C CNN - 1 2850 4250 - -1 0 0 1 -$EndComp -$Comp -L R R3 -U 1 1 545805E8 -P 2500 4000 -F 0 "R3" V 2580 4000 40 0000 C CNN -F 1 "22" V 2507 4001 40 0000 C CNN -F 2 "~" V 2430 4000 30 0000 C CNN -F 3 "~" H 2500 4000 30 0000 C CNN - 1 2500 4000 - 0 -1 -1 0 -$EndComp -$Comp -L R R2 -U 1 1 545805FA -P 2500 3800 -F 0 "R2" V 2580 3800 40 0000 C CNN -F 1 "22" V 2507 3801 40 0000 C CNN -F 2 "~" V 2430 3800 30 0000 C CNN -F 3 "~" H 2500 3800 30 0000 C CNN - 1 2500 3800 - 0 -1 -1 0 -$EndComp -Entry Wire Line - 6450 2450 6550 2550 -Entry Wire Line - 6450 2550 6550 2650 -Entry Wire Line - 6450 2650 6550 2750 -Entry Wire Line - 6450 2750 6550 2850 -Entry Wire Line - 6450 2950 6550 3050 -Entry Wire Line - 6450 3050 6550 3150 -Entry Wire Line - 6450 2850 6550 2950 -Entry Wire Line - 6450 3150 6550 3250 -Wire Wire Line - 10250 1800 10750 1800 -Entry Wire Line - 10750 1800 10850 1900 -Entry Wire Line - 10750 1900 10850 2000 -Entry Wire Line - 10750 2000 10850 2100 -Entry Wire Line - 10750 2800 10850 2900 -Entry Wire Line - 10750 2900 10850 3000 -Entry Wire Line - 10750 3000 10850 3100 -Entry Wire Line - 10750 3100 10850 3200 -Entry Wire Line - 10750 3200 10850 3300 -Entry Wire Line - 10750 3300 10850 3400 -$Comp -L AT90S8515-P IC2 -U 1 1 545A62EA -P 9250 3500 -F 0 "IC2" H 8400 5380 40 0000 L BNN -F 1 "AT90S8515-P" H 9700 1550 40 0000 L BNN -F 2 "DIL40" H 9250 3500 30 0000 C CIN -F 3 "" H 9250 3500 60 0000 C CNN - 1 9250 3500 - 1 0 0 -1 -$EndComp -NoConn ~ 10250 2650 -Entry Wire Line - 10750 3650 10850 3750 -Entry Wire Line - 10750 3750 10850 3850 -Entry Wire Line - 10750 3850 10850 3950 -Entry Wire Line - 10750 3950 10850 4050 -Entry Wire Line - 10750 4050 10850 4150 -Entry Wire Line - 10750 4150 10850 4250 -Entry Wire Line - 10750 4350 10850 4450 -Entry Wire Line - 10750 4250 10850 4350 -NoConn ~ 8250 4900 -NoConn ~ 8250 5000 -NoConn ~ 8250 1800 -Wire Wire Line - 10250 1900 10750 1900 -Wire Wire Line - 10250 2000 10750 2000 -Wire Wire Line - 10250 2100 10750 2100 -Wire Wire Line - 10250 2200 10750 2200 -Wire Wire Line - 10250 2300 10750 2300 -Wire Wire Line - 10250 2400 10750 2400 -Wire Wire Line - 10250 2500 10750 2500 -Text Label 10350 1800 0 60 ~ 0 -A -Text Label 10350 1900 0 60 ~ 0 -B -Text Label 10350 2000 0 60 ~ 0 -C -Text Label 10350 2100 0 60 ~ 0 -G -Wire Wire Line - 10250 2800 10750 2800 -Wire Wire Line - 10250 2900 10750 2900 -Wire Wire Line - 10250 3000 10750 3000 -Wire Wire Line - 10250 3100 10750 3100 -Wire Wire Line - 10250 3200 10750 3200 -Wire Wire Line - 10250 3300 10750 3300 -Wire Wire Line - 10250 3400 10750 3400 -Wire Wire Line - 10250 3500 10750 3500 -Text Label 10350 2800 0 60 ~ 0 -DL2 -Text Label 10350 2900 0 60 ~ 0 -DR1 -Text Label 10350 3000 0 60 ~ 0 -DR2 -Text Label 10350 3100 0 60 ~ 0 -DL1 -Text Label 10350 3400 0 60 ~ 0 -SCL -Text Label 10350 3500 0 60 ~ 0 -SDA -Wire Wire Line - 10250 3650 10750 3650 -Wire Wire Line - 10250 3750 10750 3750 -Wire Wire Line - 10250 3850 10750 3850 -Wire Wire Line - 10250 3950 10750 3950 -Wire Wire Line - 10250 4050 10750 4050 -Wire Wire Line - 10250 4150 10750 4150 -Wire Wire Line - 10250 4250 10750 4250 -Wire Wire Line - 10250 4350 10750 4350 -Text Label 10350 3650 0 60 ~ 0 -R1 -Text Label 10350 3750 0 60 ~ 0 -R2 -Text Label 10350 3850 0 60 ~ 0 -R3 -Text Label 10350 3950 0 60 ~ 0 -R4 -Text Label 10350 4050 0 60 ~ 0 -R5 -Text Label 10350 4150 0 60 ~ 0 -R6 -Text Label 10350 4250 0 60 ~ 0 -R7 -Text Label 10350 4350 0 60 ~ 0 -R8 -Wire Wire Line - 10250 4500 10750 4500 -Wire Wire Line - 10250 4600 10750 4600 -Wire Wire Line - 10250 4700 10750 4700 -Wire Wire Line - 10250 4800 10750 4800 -Wire Wire Line - 10250 4900 10750 4900 -Wire Wire Line - 10250 5000 10750 5000 -Wire Wire Line - 10250 5100 10750 5100 -Wire Wire Line - 10250 5200 10750 5200 -Text Label 10350 4600 0 60 ~ 0 -FS1 -Text Label 10350 5000 0 60 ~ 0 -FS3 -Text Label 10350 5200 0 60 ~ 0 -FS2 -$Comp -L GND #PWR01 -U 1 1 545A7377 -P 9250 5600 -F 0 "#PWR01" H 9250 5600 30 0001 C CNN -F 1 "GND" H 9250 5530 30 0001 C CNN -F 2 "" H 9250 5600 60 0000 C CNN -F 3 "" H 9250 5600 60 0000 C CNN - 1 9250 5600 - 1 0 0 -1 -$EndComp -Wire Wire Line - 9250 5500 9250 5600 -Text Label 10350 4700 0 60 ~ 0 -CLOCK -Text Label 10350 4800 0 60 ~ 0 -DATA -NoConn ~ 10750 4700 -NoConn ~ 10750 4800 -Text Label 10350 3200 0 60 ~ 0 -KP -Text Label 10350 3300 0 60 ~ 0 -PGM -Text Label 10350 2500 0 60 ~ 0 -BUZZ -NoConn ~ 8250 2300 -NoConn ~ 8250 2700 -$Comp -L GND #PWR02 -U 1 1 545A7565 -P 4750 5700 -F 0 "#PWR02" H 4750 5700 30 0001 C CNN -F 1 "GND" H 4750 5630 30 0001 C CNN -F 2 "" H 4750 5700 60 0000 C CNN -F 3 "" H 4750 5700 60 0000 C CNN - 1 4750 5700 - 1 0 0 -1 -$EndComp -Entry Wire Line - 6450 3650 6550 3750 -Entry Wire Line - 6450 3750 6550 3850 -Entry Wire Line - 6450 4150 6550 4250 -Entry Wire Line - 6450 4250 6550 4350 -Entry Wire Line - 6450 4050 6550 4150 -Entry Wire Line - 6450 4350 6550 4450 -NoConn ~ 3750 2850 -Wire Wire Line - 1200 2000 6450 2000 -NoConn ~ 3750 3050 -Wire Wire Line - 2750 3800 3750 3800 -Wire Wire Line - 2750 3900 3750 3900 -Wire Wire Line - 2750 3900 2750 4000 -Wire Bus Line - 6550 2100 6550 6050 -Wire Bus Line - 10850 1600 10850 6050 -Text Label 6050 4350 0 60 ~ 0 -DL1 -Text Label 6050 4250 0 60 ~ 0 -DR2 -Text Label 6050 4150 0 60 ~ 0 -DR1 -Text Label 6050 4050 0 60 ~ 0 -DL2 -Text Label 6050 2450 0 60 ~ 0 -R1 -Text Label 6050 2550 0 60 ~ 0 -R2 -Text Label 6050 2650 0 60 ~ 0 -R3 -Text Label 6050 2750 0 60 ~ 0 -R4 -Text Label 6050 2850 0 60 ~ 0 -R5 -Text Label 6050 2950 0 60 ~ 0 -R6 -Text Label 6050 3050 0 60 ~ 0 -R7 -Text Label 6050 3150 0 60 ~ 0 -R8 -Text Label 6050 5050 0 60 ~ 0 -A -Text Label 6050 5150 0 60 ~ 0 -B -Text Label 6050 5250 0 60 ~ 0 -C -Text Label 6050 5350 0 60 ~ 0 -G -Text Label 1300 3800 0 60 ~ 0 -D+ -Text Label 1300 4000 0 60 ~ 0 -D- -NoConn ~ 10750 2200 -NoConn ~ 10750 2300 -NoConn ~ 10750 2400 -Text Label 10350 4500 0 60 ~ 0 -GND -NoConn ~ 10750 4900 -NoConn ~ 10750 5100 -Text Label 6050 3450 0 60 ~ 0 -KP -Text Label 6050 3350 0 60 ~ 0 -PGM -$Comp -L ATMEGA32U4-A U1 -U 1 1 5462E0B1 -P 4900 4000 -F 0 "U1" H 3950 5700 40 0000 C CNN -F 1 "ATMEGA32U4-A" H 5600 2500 40 0000 C CNN -F 2 "TQFP44" H 4900 4000 35 0000 C CIN -F 3 "" H 6000 5100 60 0000 C CNN - 1 4900 4000 - 1 0 0 -1 -$EndComp -Wire Wire Line - 3750 4850 3750 5600 -Wire Wire Line - 4450 2200 5150 2200 -Connection ~ 4700 2200 -Connection ~ 4800 2200 -Connection ~ 5050 2200 -Connection ~ 4800 2000 -Wire Wire Line - 6000 2450 6450 2450 -Wire Wire Line - 6000 2550 6450 2550 -Wire Wire Line - 6000 2650 6450 2650 -Wire Wire Line - 6000 2750 6450 2750 -Wire Wire Line - 6000 2850 6450 2850 -Wire Wire Line - 6000 2950 6450 2950 -Wire Wire Line - 6000 3050 6450 3050 -Wire Wire Line - 6000 3150 6450 3150 -Wire Wire Line - 6000 5050 6450 5050 -Wire Wire Line - 6000 5150 6450 5150 -Wire Wire Line - 6000 5250 6450 5250 -Wire Wire Line - 6000 4050 6450 4050 -Wire Wire Line - 6000 4150 6450 4150 -Wire Wire Line - 6000 4250 6450 4250 -Wire Wire Line - 6000 4350 6450 4350 -Wire Wire Line - 6000 4550 6450 4550 -Entry Wire Line - 6450 3350 6550 3450 -Entry Wire Line - 6450 3450 6550 3550 -Entry Wire Line - 6450 5050 6550 5150 -Entry Wire Line - 6450 5150 6550 5250 -Entry Wire Line - 6450 5250 6550 5350 -Entry Wire Line - 6450 5350 6550 5450 -Entry Wire Line - 6450 4650 6550 4750 -Wire Wire Line - 6000 3350 6450 3350 -Wire Wire Line - 6000 3450 6450 3450 -Wire Wire Line - 1200 5600 6450 5600 -Connection ~ 4950 5600 -Connection ~ 4850 5600 -Wire Wire Line - 4750 5600 4750 5700 -Connection ~ 4750 5600 -Connection ~ 4500 5600 -Text Label 6050 4550 0 60 ~ 0 -HWB -Wire Wire Line - 6000 5350 6450 5350 -Wire Wire Line - 6000 3650 6450 3650 -Wire Wire Line - 6000 3750 6450 3750 -Text Label 6050 3650 0 60 ~ 0 -SCL -Text Label 6050 3750 0 60 ~ 0 -SDA -Wire Wire Line - 6000 3850 6450 3850 -Wire Wire Line - 6000 3950 6450 3950 -Wire Wire Line - 6000 4650 6450 4650 -Text Label 6050 4650 0 60 ~ 0 -BUZZ -NoConn ~ 10750 4600 -NoConn ~ 10750 5000 -NoConn ~ 10750 5200 -Entry Wire Line - 10750 3400 10850 3500 -Entry Wire Line - 10750 3500 10850 3600 -Entry Wire Line - 10750 4500 10850 4600 -Wire Wire Line - 2850 4050 3750 4050 -Text Label 2950 4050 0 60 ~ 0 -UCAP -Wire Wire Line - 6000 4850 6450 4850 -Wire Wire Line - 6000 4950 6450 4950 -NoConn ~ 6450 4850 -NoConn ~ 6450 4950 -NoConn ~ 6450 4550 -$Comp -L USB-MINI-B CON1 -U 1 1 546431C1 -P 2100 5050 -F 0 "CON1" H 1850 5500 60 0000 C CNN -F 1 "USB-MINI-B" H 2050 4550 60 0000 C CNN -F 2 "" H 2100 5050 60 0000 C CNN -F 3 "" H 2100 5050 60 0000 C CNN - 1 2100 5050 - 0 1 1 0 -$EndComp -$Comp -L VCC #PWR03 -U 1 1 54643698 -P 2400 4400 -F 0 "#PWR03" H 2400 4500 30 0001 C CNN -F 1 "VCC" H 2400 4500 30 0000 C CNN -F 2 "" H 2400 4400 60 0000 C CNN -F 3 "" H 2400 4400 60 0000 C CNN - 1 2400 4400 - 1 0 0 -1 -$EndComp -Text Notes 2600 2750 0 60 ~ 0 -Teensy 2.0\n(not fully drawn) -$Comp -L CONN_7 B7K-PH-K-S1 -U 1 1 54643939 -P 1950 6900 -F 0 "B7K-PH-K-S1" V 1920 6900 60 0000 C CNN -F 1 "CONN_7" V 2020 6900 60 0000 C CNN -F 2 "" H 1950 6900 60 0000 C CNN -F 3 "" H 1950 6900 60 0000 C CNN - 1 1950 6900 - 1 0 0 -1 -$EndComp -Connection ~ 3750 5600 -Connection ~ 2400 5600 -Connection ~ 2250 5600 -Connection ~ 1950 5600 -Wire Wire Line - 2400 4400 2400 4500 -Wire Wire Line - 2250 4000 2250 4500 -Wire Wire Line - 1200 3800 2250 3800 -Wire Wire Line - 2100 3800 2100 4500 -Wire Wire Line - 2850 4450 2850 5600 -Connection ~ 2850 5600 -Entry Wire Line - 1100 6800 1200 6900 -Entry Wire Line - 1100 6900 1200 7000 -Entry Wire Line - 1100 7000 1200 7100 -Entry Wire Line - 1100 6700 1200 6800 -Wire Wire Line - 1200 6600 1600 6600 -Wire Wire Line - 1200 6700 1600 6700 -Wire Wire Line - 1200 6800 1600 6800 -Wire Wire Line - 1200 6900 1600 6900 -Wire Wire Line - 1200 7000 1600 7000 -Wire Wire Line - 1200 7100 1600 7100 -Wire Wire Line - 1200 7200 1600 7200 -Text Label 1300 6600 0 60 ~ 0 -FS2 -Text Label 1300 6700 0 60 ~ 0 -FS1 -Text Label 1300 6800 0 60 ~ 0 -VCC -Text Label 1300 6900 0 60 ~ 0 -D- -Text Label 1300 7000 0 60 ~ 0 -D+ -Text Label 1300 7100 0 60 ~ 0 -GND -Text Label 1300 7200 0 60 ~ 0 -FS3 -NoConn ~ 3750 2450 -Wire Wire Line - 3600 2000 3600 3650 -Wire Wire Line - 3600 3650 3750 3650 -NoConn ~ 1950 4500 -Wire Bus Line - 1100 1900 1100 7100 -NoConn ~ 1200 6600 -NoConn ~ 1200 6700 -NoConn ~ 1200 7200 -Connection ~ 2100 3800 -Wire Wire Line - 1200 4000 2250 4000 -Entry Wire Line - 1100 3700 1200 3800 -Entry Wire Line - 1100 3900 1200 4000 -Text Label 10350 1500 0 60 ~ 0 -VCC -Entry Wire Line - 1100 1900 1200 2000 -Text Label 1250 2000 0 60 ~ 0 -VCC -Entry Wire Line - 1100 5500 1200 5600 -Connection ~ 1800 5600 -Text Label 1300 5600 0 60 ~ 0 -GND -Wire Wire Line - 9250 5500 10750 5500 -Entry Wire Line - 10750 5500 10850 5600 -Text Label 10350 5500 0 60 ~ 0 -GND -Wire Wire Line - 9250 1500 10750 1500 -Entry Wire Line - 10750 1500 10850 1600 -Connection ~ 3600 2000 -Wire Wire Line - 4800 2000 4800 2200 -Entry Wire Line - 6450 2000 6550 2100 -Text Label 6050 2000 0 60 ~ 0 -VCC -Connection ~ 5050 5600 -Entry Wire Line - 6450 5600 6550 5700 -Text Label 6050 5600 0 60 ~ 0 -GND -NoConn ~ 6450 3850 -NoConn ~ 6450 3950 -Wire Wire Line - 1800 4500 1500 4500 -Wire Wire Line - 1500 4500 1500 5600 -Connection ~ 1500 5600 -Entry Wire Line - 10750 2500 10850 2600 -Entry Wire Line - 10750 2100 10850 2200 -Text Notes 1000 5300 1 60 ~ 0 -Sacrificial USB cable from header to Teensy -Text Notes 7850 5950 0 60 ~ 0 -Ribbon cable between Teensy pins and socket -Wire Bus Line - 10850 6050 6550 6050 -$EndSCHEMATC diff --git a/keyboards/kinesis/alvicstep/docs/docs/photos/P1050573.jpg b/keyboards/kinesis/alvicstep/docs/docs/photos/P1050573.jpg deleted file mode 100644 index 027ab9efb..000000000 Binary files a/keyboards/kinesis/alvicstep/docs/docs/photos/P1050573.jpg and /dev/null differ diff --git a/keyboards/kinesis/alvicstep/docs/docs/photos/P1050574.jpg b/keyboards/kinesis/alvicstep/docs/docs/photos/P1050574.jpg deleted file mode 100644 index d49c492b8..000000000 Binary files a/keyboards/kinesis/alvicstep/docs/docs/photos/P1050574.jpg and /dev/null differ diff --git a/keyboards/kinesis/alvicstep/docs/docs/photos/P1050575.jpg b/keyboards/kinesis/alvicstep/docs/docs/photos/P1050575.jpg deleted file mode 100644 index 50cc9897c..000000000 Binary files a/keyboards/kinesis/alvicstep/docs/docs/photos/P1050575.jpg and /dev/null differ diff --git a/keyboards/kinesis/alvicstep/docs/docs/readme.txt b/keyboards/kinesis/alvicstep/docs/docs/readme.txt deleted file mode 100644 index af33ac490..000000000 --- a/keyboards/kinesis/alvicstep/docs/docs/readme.txt +++ /dev/null @@ -1,52 +0,0 @@ -This directory of documentation was copied from https://github.com/wjanssens/tmk_keyboard/tree/master/keyboard/kinesis -and is probably Copyright 2014 Warren Janssens -and probably released under GPL v2, which may be recovered at . - -Row configuration -PF0 A -PF1 B -PF2 C -PF3 G 0 = U4, 1 = U5 - -Column configuration - 4y0 4y1 4y2 4y3 4y4 4y5 4y6 4y7 5y0 5y1 5y2 5y3 5y4 5y5 5y6 5y7 - r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 r16 -PB0 21 c1 f6 f8 f7 5 4 3 2 1 =+ -PB1 22 c2 f3 f5 f4 t r e w q TAB -PB2 23 c3 ESC f2 f1 g f d s a CL -PB3 24 c4 f9 f11 f10 b v c x z LS UP DN [{ ]} -PB4 25 c5 f12 SL PS RT LT §± `~ 6 7 8 9 0 -_ -PB5 26 c6 PB PGM KPD y u i o p \ -PB6 27 c7 LC DL BS RC EN SP h j k l ;: '" -PB7 28 c8 RA PU PD n m ,< .> /? RS - */ - - -40 pin connector - - DL2 1 40 VCC - DR1 2 39 A - DR2 3 38 B - DL1 4 37 C - KPD 5 36 G - PGM 6 35 - SCL 7 34 - SDA 8 33 - RST 9 32 BUZZ - WP 10 31 EA - FS1 11 30 ALE - CLOCK 12 29 PSEN - DATA 13 28 r8 - 14 27 r7 - FS3 15 26 r6 - 16 25 r5 - FS2 17 24 r4 - XTAL1 18 23 r3 - XTAL2 19 22 r2 - GND 20 21 r1 - - -references: -https://github.com/chrisandreae/keyboard-firmware - - diff --git a/keyboards/kinesis/alvicstep/docs/docs/schematic.png b/keyboards/kinesis/alvicstep/docs/docs/schematic.png deleted file mode 100644 index fa9405a1f..000000000 Binary files a/keyboards/kinesis/alvicstep/docs/docs/schematic.png and /dev/null differ -- cgit v1.2.3 From 9d4cc2f3f1666fc110506c6a982c53d1df67548b Mon Sep 17 00:00:00 2001 From: milestogo Date: Sun, 8 Jan 2017 22:25:41 -0800 Subject: removing old programmer layout, in favor of milestogo --- keyboards/kinesis/keymaps/programmer/Makefile | 21 --- keyboards/kinesis/keymaps/programmer/config.h | 8 - keyboards/kinesis/keymaps/programmer/keymap.c | 245 ------------------------- keyboards/kinesis/keymaps/programmer/readme.md | 2 - 4 files changed, 276 deletions(-) delete mode 100644 keyboards/kinesis/keymaps/programmer/Makefile delete mode 100644 keyboards/kinesis/keymaps/programmer/config.h delete mode 100644 keyboards/kinesis/keymaps/programmer/keymap.c delete mode 100644 keyboards/kinesis/keymaps/programmer/readme.md diff --git a/keyboards/kinesis/keymaps/programmer/Makefile b/keyboards/kinesis/keymaps/programmer/Makefile deleted file mode 100644 index 9d3df5964..000000000 --- a/keyboards/kinesis/keymaps/programmer/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# 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 = no # 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/kinesis/keymaps/programmer/config.h b/keyboards/kinesis/keymaps/programmer/config.h deleted file mode 100644 index 8893d122e..000000000 --- a/keyboards/kinesis/keymaps/programmer/config.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" - -// place overrides here - -#endif diff --git a/keyboards/kinesis/keymaps/programmer/keymap.c b/keyboards/kinesis/keymaps/programmer/keymap.c deleted file mode 100644 index 83fb7bd5f..000000000 --- a/keyboards/kinesis/keymaps/programmer/keymap.c +++ /dev/null @@ -1,245 +0,0 @@ -#include "kinesis.h" -#include "action_layer.h" -#include "mousekey.h" - -#define QWERTY 0 // Base qerty -#define SYMB 1// Symbol layer -#define MOUSE 2// - - - - -/* Macros */ -enum { - NONE = 0, - // Diagonal mouse movement - A_MUL, - A_MUR, - A_MDL, - A_MDR, -}; - - -// Borrowing very heavily from -// https://github.com/alvicstep/tmk_keyboard -/**************************************************************************************************** -* -* Keymap: Default Layer in Qwerty -* -* ,-------------------------------------------------------------------------------------------------------------------. -* | Esc | F1 | F2 | F3 | F4 | F5 | F6 | F8 | F9 | F10 | F12 | FN0 | FN1 | FN2 | | bOOT | -* |--------+------+------+------+------+------+---------------------------+------+------+------+------+------+--------| -* | =+ | 1! | 2@ | 3# | 4$ | 5% | | 6^ | 7& | 8* | 9( | 0) | -_ | -* |--------+------+------+------+------+------| +------+------+------+------+------+--------| -* | Tab | Q | W | E | R | T | | Y | U | I | O | P | \| | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* |MouseFN1| A | S | D | F | G | | H | J | K | L | ;: | '" | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | Shift | Z | X | C | V | B | | N | M | ,. | .> | /? | Shift | -* `--------+------+------+------+------+------- `------+------+------+------+------+--------' -* | `~ | ESC |MOUSE1|MOUSE2| | [{ | ]} | ESC | GUI | -* `---------------------------' `---------------------------' -* ,-------------. ,-------------. -* | Ctrl | Alt | | Gui | Ctrl | -* ,------|------|------| |------+------+------. -* | | | Home | | PgUp | | | -* | BkSp | Del |------| |------|Return| Space| -* | | | End | | PgDn | | | -* `--------------------' `--------------------' -*/ - - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[QWERTY] = KEYMAP( - KC_ESC, KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_F6 ,KC_F7 ,KC_F8, - KC_EQL, KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , - KC_TAB, KC_Q ,KC_W ,KC_E ,KC_R ,KC_T , - KC_FN1 ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G , - KC_LSFT,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B , - KC_GRV ,KC_ESC, KC_BTN1,KC_BTN2, - KC_LCTL,KC_LALT, - KC_HOME, - KC_BSPC,KC_DEL ,KC_FN0 , - KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 ,KC_FN0 ,KC_FN1 ,KC_FN2, KC_NO, RESET, - KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_MINS, - KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_BSLS, - KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN,KC_QUOT, - KC_N ,KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_RSFT, - KC_LBRC,KC_RBRC, KC_ESC, KC_RGUI, - KC_RGUI,KC_RCTL, - KC_PGUP, - KC_PGDN,KC_ENTER ,KC_SPC - ), -[SYMB] = 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, - 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, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_FN0, KC_2, - 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, 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, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS - ), -/* Keymap: Movement and function layer -* -* ,-------------------------------------------------------------------------------------------------------------------. -* | Caps | F1 | F2 | F3 | F4 | F5 | F6 | F8 | F9 | F10 | F12 | FN0 | FN1 | FN2 | Tada | bOOT | -* |--------+------+------+------+------+------+---------------------------+------+------+------+------+------+--------| -* | =+ | ! | @ | # | $ | % | | ^ | & | * | ( | ) |MS Fast | -* |--------+------+------+------+------+------| +------+------+------+------+------+--------| -* | Tab | | | Up | |PgUp | | MwU |MS_UL | MS_U |MS_UR | | Ms Norm| -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* |MouseFN1| C^A | Left | Down |Right | C^E | | | MS_L |Mouse1| MS_R | |MS Slow | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | | GuiZ | GUI X| GUI C| GUI_V|PgDown| | MWD | MDown|MS Dwn|MS_DR | ? | | -* `--------+------+------+------+------+------- `------+------+------+------+------+--------' -* | `~ | ESC | < | > | | { | } | ESC | | -* `---------------------------' `---------------------------' -* ,-------------. ,-------------. -* | Ctrl | Alt | | Gui | Ctrl | -* ,------|------|------| |------+------+------. -* | | | Home | | PgUp | | | -* | BkSp | Del |------| |------|Mouse1|Mouse2| -* | | | End | | PgDn |LClick|Rclick| -* `--------------------' `--------------------' -*/ - - -[MOUSE] = KEYMAP( - KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_EXLM ,KC_AT, KC_HASH, KC_DLR ,KC_PERC , - KC_TRNS, KC_NO, KC_NO, KC_UP, KC_NO, KC_PGUP, - KC_FN1, LCTL(KC_A),KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_E), - KC_TRNS, LGUI(KC_Z),LGUI(KC_X),LGUI(KC_C),LGUI(KC_V),KC_PGDN, - KC_TRNS, KC_TRNS, KC_LABK, KC_RABK, - 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_FN0,RESET, - KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_ACL2, - KC_WH_U, M(A_MUL), KC_MS_U, M(A_MUR), KC_NO, KC_ACL1, - KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, KC_ACL0, - KC_WH_D, M(A_MDL), KC_MS_D, M(A_MDR), KC_TRNS, KC_TRNS, - KC_LCBR, KC_RCBR, KC_ESC, KC_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_BTN1, KC_BTN2 - ), - - -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_TAP_TOGGLE(MOUSE) , // FN1 - Momentary Layer 1 (Symbols) - [1] = ACTION_LAYER_TOGGLE(MOUSE) , // FN1 - Momentary Layer 1 (Symbols) - [2] = ACTION_LAYER_TAP_TOGGLE(SYMB) , // FN1 - Momentary Layer 1 (Symbols) - - -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - - // from algernon's ErgoDox EZ layout, - case A_MUL: - if (record->event.pressed) { - mousekey_on(KC_MS_UP); - mousekey_on(KC_MS_LEFT); - } else { - mousekey_off(KC_MS_UP); - mousekey_off(KC_MS_LEFT); - } - mousekey_send(); - break; - - case A_MUR: - if (record->event.pressed) { - mousekey_on(KC_MS_UP); - mousekey_on(KC_MS_RIGHT); - } else { - mousekey_off(KC_MS_UP); - mousekey_off(KC_MS_RIGHT); - } - mousekey_send(); - break; - - case A_MDL: - if (record->event.pressed) { - mousekey_on(KC_MS_DOWN); - mousekey_on(KC_MS_LEFT); - } else { - mousekey_off(KC_MS_DOWN); - mousekey_off(KC_MS_LEFT); - } - mousekey_send(); - break; - - case A_MDR: - if (record->event.pressed) { - mousekey_on(KC_MS_DOWN); - mousekey_on(KC_MS_RIGHT); - } else { - mousekey_off(KC_MS_DOWN); - mousekey_off(KC_MS_RIGHT); - } - mousekey_send(); - break; - } - return MACRO_NONE; -}; - - -void matrix_init_user(void) { - - -} - -void matrix_scan_user(void) { - int8_t layer = biton32(layer_state); - - switch (layer) { - case 1: - all_led_off(); - break; - case 2: - if (!(host_keyboard_leds() & (1 << USB_LED_CAPS_LOCK))) { - all_led_off(); - caps_lock_led_on(); - } - break; - case 0: - all_led_off(); - num_lock_led_on(); - break; - default: - break; - } - -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - -void led_set_user(uint8_t usb_led) { - -} diff --git a/keyboards/kinesis/keymaps/programmer/readme.md b/keyboards/kinesis/keymaps/programmer/readme.md deleted file mode 100644 index 76356a687..000000000 --- a/keyboards/kinesis/keymaps/programmer/readme.md +++ /dev/null @@ -1,2 +0,0 @@ -# a programmer friendly keymap for the kinesis-advantage -# not really baked yet. -- cgit v1.2.3 From cf0650e3f0f1f78bea48f9a5c0d9b218a6b662f7 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Mon, 9 Jan 2017 19:35:01 +0700 Subject: Implement greek layers on my Promethium layout --- .../handwired/promethium/keymaps/priyadi/keymap.c | 187 ++++++++++++++++++++- 1 file changed, 182 insertions(+), 5 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 7ae269563..02ff57384 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -29,6 +29,8 @@ enum layers { _NUM, _FUNC, _EMOJI, + _GREEKU, + _GREEKL, _GUI, }; @@ -44,6 +46,7 @@ enum planck_keycodes { FUNC, EMOJI, GUI, + GREEK, // os switchers LINUX, @@ -106,6 +109,59 @@ enum unicode_name { SUN, // sun MOON, // moon SKULL, // skull + + // greek letters + UALPH, + UBETA, + UGAMM, + UDELT, + UEPSI, + UZETA, + UETA, + UTHET, + UIOTA, + UKAPP, + ULAMB, + UMU, + UNU, + UXI, + UOMIC, + UPI, + URHO, + USIGM, + UTAU, + UUPSI, + UPHI, + UCHI, + UPSI, + UOMEG, + + LALPH, + LBETA, + LGAMM, + LDELT, + LEPSI, + LZETA, + LETA, + LTHET, + LIOTA, + LKAPP, + LLAMB, + LMU, + LNU, + LXI, + LOMIC, + LPI, + LRHO, + LSIGM, + LTAU, + LUPSI, + LPHI, + LCHI, + LPSI, + LOMEG, + + FSIGM, }; const uint32_t PROGMEM unicode_map[] = { @@ -156,6 +212,57 @@ const uint32_t PROGMEM unicode_map[] = { [SUN] = 0x2600, [MOON] = 0x1F314, [SKULL] = 0x1F480, + + // greek letters + [UALPH] = 0x0391, + [UBETA] = 0x0392, + [UGAMM] = 0x0393, + [UDELT] = 0x0394, + [UEPSI] = 0x0395, + [UZETA] = 0x0396, + [UETA] = 0x0397, + [UTHET] = 0x0398, + [UIOTA] = 0x0399, + [UKAPP] = 0x039A, + [ULAMB] = 0x039B, + [UMU] = 0x039C, + [UNU] = 0x039D, + [UXI] = 0x039E, + [UOMIC] = 0x039F, + [UPI] = 0x03A0, + [URHO] = 0x03A1, + [USIGM] = 0x03A3, + [UTAU] = 0x03A4, + [UUPSI] = 0x03A5, + [UPHI] = 0x03A6, + [UCHI] = 0x03A7, + [UPSI] = 0x03A8, + [UOMEG] = 0x03A9, + [LALPH] = 0x03B1, + [LBETA] = 0x03B2, + [LGAMM] = 0x03B3, + [LDELT] = 0x03B4, + [LEPSI] = 0x03B5, + [LZETA] = 0x03B6, + [LETA] = 0x03B7, + [LTHET] = 0x03B8, + [LIOTA] = 0x03B9, + [LKAPP] = 0x03BA, + [LLAMB] = 0x03BB, + [LMU] = 0x03BC, + [LNU] = 0x03BD, + [LXI] = 0x03BE, + [LOMIC] = 0x03BF, + [LPI] = 0x03C0, + [LRHO] = 0x03C1, + [LSIGM] = 0x03C3, + [LTAU] = 0x03C4, + [LUPSI] = 0x03C5, + [LPHI] = 0x03C6, + [LCHI] = 0x03C7, + [LPSI] = 0x03C8, + [LOMEG] = 0x03C9, + [FSIGM] = 0x03C2, }; @@ -165,7 +272,6 @@ const uint32_t PROGMEM unicode_map[] = { // #undef KC_RSFT // #define KC_RSFT MT(MOD_LSFT, KC_EQL) - // hybrid right-gui & scroll lock (mapped to Compose in OS) #undef KC_RCTL #define KC_RCTL MT(MOD_LCTL, KC_SLCK) @@ -420,14 +526,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| Z | X | C | V | B | N | M | , | . | / |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | GUI | Alt | Punc | Num | Space | Func |Emoji |AltGr | GUI | Ctrl | + * | Ctrl | Alt | GUI | Punc | Num | Space | Func |Emoji |Greek |AltGr | Ctrl | * `-----------------------------------------------------------------------------------' */ [_QWERTY] = KEYMAP( 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, - KC_LCTL, KC_LGUI, KC_LALT, PUNC, NUM, KC_SPC, KC_SPC, FUNC, EMOJI, KC_RALT, KC_RGUI, KC_RCTL + KC_LCTL, KC_LALT, KC_LGUI, PUNC, NUM, KC_SPC, KC_SPC, FUNC, EMOJI, GREEK, KC_RALT, KC_RCTL ), /* Colemak @@ -466,6 +572,42 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), +/* Uppercase Greek + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_GREEKU] = { + _______, _______, _______,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), _______, _______, + _______,X(UZETA), X(UCHI), X(UPSI),X(UOMEG),X(UBETA), X(UNU), X(UMU), _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +}, + +/* Lowercase Greek + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_GREEKL] = { + _______, _______,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), _______, _______, + _______,X(LZETA), X(LCHI), X(LPSI),X(LOMEG),X(LBETA), X(LNU), X(LMU), _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +}, + /* Punc * ,-----------------------------------------------------------------------------------. * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | ` | @@ -581,12 +723,47 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) PLAY_NOTE_ARRAY(tone_click, false, 0); #endif + bool lshifted = keyboard_report->mods & MOD_BIT(KC_LSFT); + bool rshifted = keyboard_report->mods & MOD_BIT(KC_RSFT); + switch (keycode) { + case GREEK: + if (record->event.pressed) { + if (lshifted || rshifted) { + layer_on(_GREEKU); + layer_off(_GREEKL); + } else { + layer_on(_GREEKL); + layer_off(_GREEKU); + } + } else { + layer_off(_GREEKU); + layer_off(_GREEKL); + } + return false; + break; + + case KC_LSFT: + case KC_RSFT: + ; + uint8_t layer = biton32(layer_state); + if (layer == _GREEKU || layer == _GREEKL) { + if (record->event.pressed) { + layer_on(_GREEKU); + layer_off(_GREEKL); + } else { + if (lshifted ^ rshifted) { // if only one shift is pressed + layer_on(_GREEKL); + layer_off(_GREEKU); + } + } + } + return true; + break; + // QWERTZ style comma and dot: semicolon and colon when shifted case KC_COMM: if (record->event.pressed) { - bool lshifted = keyboard_report->mods & MOD_BIT(KC_LSFT); - bool rshifted = keyboard_report->mods & MOD_BIT(KC_RSFT); if (lshifted || rshifted) { if (lshifted) unregister_code(KC_LSFT); if (rshifted) unregister_code(KC_RSFT); -- cgit v1.2.3 From 8c2cc30b0e6705b9fb44305ed9d20fae2bf3a03d Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Mon, 9 Jan 2017 21:24:26 +0700 Subject: fix greek layers --- keyboards/handwired/promethium/keymaps/priyadi/keymap.c | 8 ++++---- keyboards/handwired/promethium/promethium.h | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 02ff57384..4665e32af 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -583,12 +583,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_GREEKU] = { +[_GREEKU] = KEYMAP( _______, _______, _______,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), _______, _______, _______,X(UZETA), X(UCHI), X(UPSI),X(UOMEG),X(UBETA), X(UNU), X(UMU), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -}, +), /* Lowercase Greek * ,-----------------------------------------------------------------------------------. @@ -601,12 +601,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_GREEKL] = { +[_GREEKL] = KEYMAP( _______, _______,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), _______, _______, _______,X(LZETA), X(LCHI), X(LPSI),X(LOMEG),X(LBETA), X(LNU), X(LMU), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -}, +), /* Punc * ,-----------------------------------------------------------------------------------. diff --git a/keyboards/handwired/promethium/promethium.h b/keyboards/handwired/promethium/promethium.h index 662eeab99..a2572db2a 100644 --- a/keyboards/handwired/promethium/promethium.h +++ b/keyboards/handwired/promethium/promethium.h @@ -4,6 +4,7 @@ #include "quantum.h" #define PS2_INIT_DELAY 2000 +#define UNICODE_TYPE_DELAY 0 #define KEYMAP( \ k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ -- cgit v1.2.3 From 87b675241a1cf535feaa7ae3454cab13bb6dba1e Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Mon, 9 Jan 2017 23:19:34 +0700 Subject: minimize LEDs --- .../handwired/promethium/keymaps/priyadi/keymap.c | 148 ++++++++++----------- 1 file changed, 74 insertions(+), 74 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 4665e32af..99948967b 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -352,15 +352,15 @@ const uint8_t PROGMEM LED_TRACKPOINT[] = { void led_reset(void) { for(uint8_t i = 0; i < COUNT(LED_ALNUM); i++) { - rgbsps_set(pgm_read_byte(&LED_ALNUM[i]), 15, 6, 0); + rgbsps_set(pgm_read_byte(&LED_ALNUM[i]), 0, 0, 0); } for(uint8_t i = 0; i < COUNT(LED_MODS); i++) { - rgbsps_set(pgm_read_byte(&LED_MODS[i]), 15, 0, 0); + rgbsps_set(pgm_read_byte(&LED_MODS[i]), 0, 0, 0); } for(uint8_t i = 0; i < COUNT(LED_FN); i++) { - rgbsps_set(pgm_read_byte(&LED_FN[i]), 15, 15, 15); + rgbsps_set(pgm_read_byte(&LED_FN[i]), 0, 0, 0); } } @@ -385,30 +385,30 @@ void led_layer_func(void) { rgbsps_set(pgm_read_byte(&LED_ALNUM[i]), 0, 0, 0); } - rgbsps_set(LED_I, 15, 0, 15); - rgbsps_set(LED_J, 15, 0, 15); - rgbsps_set(LED_K, 15, 0, 15); - rgbsps_set(LED_L, 15, 0, 15); - - rgbsps_set(LED_U, 15, 0, 0); - rgbsps_set(LED_O, 15, 0, 0); - rgbsps_set(LED_COMM, 15, 0, 0); - rgbsps_set(LED_DOT, 15, 0, 0); - rgbsps_set(LED_SCLN, 15, 0, 0); - rgbsps_set(LED_P, 15, 0, 0); - - rgbsps_set(LED_Q, 0, 15, 0); - rgbsps_set(LED_W, 0, 15, 0); - rgbsps_set(LED_E, 0, 15, 0); - rgbsps_set(LED_R, 0, 15, 0); - rgbsps_set(LED_A, 0, 15, 0); - rgbsps_set(LED_S, 0, 15, 0); - rgbsps_set(LED_D, 0, 15, 0); - rgbsps_set(LED_F, 0, 15, 0); - rgbsps_set(LED_Z, 0, 15, 0); - rgbsps_set(LED_X, 0, 15, 0); - rgbsps_set(LED_C, 0, 15, 0); - rgbsps_set(LED_V, 0, 15, 0); + // rgbsps_set(LED_I, 15, 0, 15); + // rgbsps_set(LED_J, 15, 0, 15); + // rgbsps_set(LED_K, 15, 0, 15); + // rgbsps_set(LED_L, 15, 0, 15); + + // rgbsps_set(LED_U, 15, 0, 0); + // rgbsps_set(LED_O, 15, 0, 0); + // rgbsps_set(LED_COMM, 15, 0, 0); + // rgbsps_set(LED_DOT, 15, 0, 0); + // rgbsps_set(LED_SCLN, 15, 0, 0); + // rgbsps_set(LED_P, 15, 0, 0); + + // rgbsps_set(LED_Q, 0, 15, 0); + // rgbsps_set(LED_W, 0, 15, 0); + // rgbsps_set(LED_E, 0, 15, 0); + // rgbsps_set(LED_R, 0, 15, 0); + // rgbsps_set(LED_A, 0, 15, 0); + // rgbsps_set(LED_S, 0, 15, 0); + // rgbsps_set(LED_D, 0, 15, 0); + // rgbsps_set(LED_F, 0, 15, 0); + // rgbsps_set(LED_Z, 0, 15, 0); + // rgbsps_set(LED_X, 0, 15, 0); + // rgbsps_set(LED_C, 0, 15, 0); + // rgbsps_set(LED_V, 0, 15, 0); rgbsps_send(); } @@ -430,54 +430,54 @@ void led_layer_num(void) { led_reset(); - for(uint8_t i = 0; i < COUNT(LED_ALNUM); i++) { - rgbsps_set(pgm_read_byte(&LED_ALNUM[i]), 0, 0, 0); - } - - rgbsps_set(LED_U, 0, 5, 15); - rgbsps_set(LED_I, 0, 5, 15); - rgbsps_set(LED_O, 0, 5, 15); - rgbsps_set(LED_J, 0, 5, 15); - rgbsps_set(LED_K, 0, 5, 15); - rgbsps_set(LED_L, 0, 5, 15); - rgbsps_set(LED_M, 0, 5, 15); - rgbsps_set(LED_COMM, 0, 5, 15); - rgbsps_set(LED_DOT, 0, 5, 15); - rgbsps_set(LED_FUNC, 0, 5, 15); - - rgbsps_set(LED_EMOJI, 0, 10, 15); - rgbsps_set(LED_RALT, 0, 10, 15); - - rgbsps_set(LED_Q, 0, 10, 15); - rgbsps_set(LED_W, 0, 10, 15); - rgbsps_set(LED_E, 0, 10, 15); - rgbsps_set(LED_R, 0, 10, 15); - rgbsps_set(LED_T, 0, 10, 15); - rgbsps_set(LED_Y, 0, 10, 15); - rgbsps_set(LED_P, 0, 10, 15); - - rgbsps_set(LED_A, 0, 15, 15); - rgbsps_set(LED_S, 0, 15, 15); - rgbsps_set(LED_D, 0, 15, 15); - rgbsps_set(LED_F, 0, 15, 15); - rgbsps_set(LED_Z, 0, 15, 15); - rgbsps_set(LED_X, 0, 15, 15); - rgbsps_set(LED_C, 0, 15, 15); - rgbsps_set(LED_V, 0, 15, 15); + // for(uint8_t i = 0; i < COUNT(LED_ALNUM); i++) { + // rgbsps_set(pgm_read_byte(&LED_ALNUM[i]), 0, 0, 0); + // } + + // rgbsps_set(LED_U, 0, 5, 15); + // rgbsps_set(LED_I, 0, 5, 15); + // rgbsps_set(LED_O, 0, 5, 15); + // rgbsps_set(LED_J, 0, 5, 15); + // rgbsps_set(LED_K, 0, 5, 15); + // rgbsps_set(LED_L, 0, 5, 15); + // rgbsps_set(LED_M, 0, 5, 15); + // rgbsps_set(LED_COMM, 0, 5, 15); + // rgbsps_set(LED_DOT, 0, 5, 15); + // rgbsps_set(LED_FUNC, 0, 5, 15); + + // rgbsps_set(LED_EMOJI, 0, 10, 15); + // rgbsps_set(LED_RALT, 0, 10, 15); + + // rgbsps_set(LED_Q, 0, 10, 15); + // rgbsps_set(LED_W, 0, 10, 15); + // rgbsps_set(LED_E, 0, 10, 15); + // rgbsps_set(LED_R, 0, 10, 15); + // rgbsps_set(LED_T, 0, 10, 15); + // rgbsps_set(LED_Y, 0, 10, 15); + // rgbsps_set(LED_P, 0, 10, 15); + + // rgbsps_set(LED_A, 0, 15, 15); + // rgbsps_set(LED_S, 0, 15, 15); + // rgbsps_set(LED_D, 0, 15, 15); + // rgbsps_set(LED_F, 0, 15, 15); + // rgbsps_set(LED_Z, 0, 15, 15); + // rgbsps_set(LED_X, 0, 15, 15); + // rgbsps_set(LED_C, 0, 15, 15); + // rgbsps_set(LED_V, 0, 15, 15); rgbsps_send(); } void led_layer_emoji(void) { - for(uint8_t i = 0; i < COUNT(LED_ALNUM); i++) { - rgbsps_set(pgm_read_byte(&LED_ALNUM[i]), 15, 15, 0); - } - for(uint8_t i = 0; i < COUNT(LED_MODS); i++) { - rgbsps_set(pgm_read_byte(&LED_MODS[i]), 15, 15, 0); - } - for(uint8_t i = 0; i < COUNT(LED_FN); i++) { - rgbsps_set(pgm_read_byte(&LED_FN[i]), 15, 15, 0); - } + // for(uint8_t i = 0; i < COUNT(LED_ALNUM); i++) { + // rgbsps_set(pgm_read_byte(&LED_ALNUM[i]), 15, 15, 0); + // } + // for(uint8_t i = 0; i < COUNT(LED_MODS); i++) { + // rgbsps_set(pgm_read_byte(&LED_MODS[i]), 15, 15, 0); + // } + // for(uint8_t i = 0; i < COUNT(LED_FN); i++) { + // rgbsps_set(pgm_read_byte(&LED_FN[i]), 15, 15, 0); + // } rgbsps_set(LED_IND_FUNC, 0, 0, 0); rgbsps_set(LED_IND_NUM, 0, 0, 0); @@ -612,17 +612,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | ` | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | \ | - | = | < | > | ( | ) | ' | | | + * | | | \ | - | = | | | ( | ) | < | > | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | _ | + | { | } | [ | ] | " | | | + * | | | | | _ | + | | | [ | ] | { | } | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ [_PUNC] = KEYMAP( KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_GRV , - XXXXXXX, XXXXXXX, KC_BSLS, KC_MINS, KC_EQL, KC_LABK, KC_RABK, KC_LPRN, KC_RPRN, KC_QUOT, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, KC_DQUO, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, KC_BSLS, KC_MINS, KC_EQL, XXXXXXX, XXXXXXX, KC_LPRN, KC_RPRN, KC_LABK, KC_RABK, XXXXXXX, + XXXXXXX, XXXXXXX, KC_PIPE, KC_UNDS, KC_PLUS, XXXXXXX, XXXXXXX, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), -- cgit v1.2.3 From ef2ebeb3cace7f2555ccf655f3a7bb7c9bb77b76 Mon Sep 17 00:00:00 2001 From: Kaleb Elwert Date: Mon, 9 Jan 2017 10:45:23 -0800 Subject: Remove KC_ prefix from KEYMAP macro to match other keyboards --- keyboards/whitefox/keymaps/default/keymap.c | 20 +++++++++---------- keyboards/whitefox/keymaps/matt3o/keymap.c | 30 ++++++++++++++--------------- keyboards/whitefox/whitefox.h | 20 +++++++++---------- 3 files changed, 35 insertions(+), 35 deletions(-) diff --git a/keyboards/whitefox/keymaps/default/keymap.c b/keyboards/whitefox/keymaps/default/keymap.c index 426b226a0..714f90659 100644 --- a/keyboards/whitefox/keymaps/default/keymap.c +++ b/keyboards/whitefox/keymaps/default/keymap.c @@ -31,18 +31,18 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `---------------------------------------------------------------' */ [0] = KEYMAP( \ - ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSLS,GRV, INS, \ - TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSPC, DEL, \ - CAPS,A, S, D, F, G, H, J, K, L, SCLN,QUOT,NUHS,ENT, PGUP,\ - LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH,RSFT, UP, PGDN,\ - LCTL,LGUI,LALT, SPC, RALT,FN0, RCTL, LEFT,DOWN,RGHT \ + KC_ESC, 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, \ + 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_NUHS,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_SPC, KC_RALT,KC_FN0, KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT \ ), [1] = KEYMAP( \ - TRNS,F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS,TRNS,MUTE,\ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PSCR,SLCK,PAUS,TRNS, TRNS,\ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, VOLU,\ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, PGUP,VOLD,\ - TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS, HOME,PGDN,END \ + KC_TRNS,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_MUTE,\ + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PSCR,KC_SLCK,KC_PAUS,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,KC_TRNS, KC_VOLU,\ + 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_PGUP,KC_VOLD,\ + KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, KC_HOME,KC_PGDN,KC_END \ ), }; diff --git a/keyboards/whitefox/keymaps/matt3o/keymap.c b/keyboards/whitefox/keymaps/matt3o/keymap.c index ecadcd284..9321553bf 100644 --- a/keyboards/whitefox/keymaps/matt3o/keymap.c +++ b/keyboards/whitefox/keymaps/matt3o/keymap.c @@ -31,25 +31,25 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `---------------------------------------------------------------' */ [0] = KEYMAP( \ - ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSLS,GRV, MUTE,\ - TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSPC, DEL, \ - FN0, A, S, D, F, G, H, J, K, L, SCLN,QUOT,NUHS,ENT, PGUP,\ - LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH,RSFT, UP, PGDN,\ - LCTL,LGUI,LALT, SPC, RALT,FN1, RCTL, LEFT,DOWN,RGHT \ + KC_ESC, 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_MUTE,\ + 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, \ + KC_FN0, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_NUHS,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_SPC, KC_RALT,KC_FN1, KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT \ ), [1] = KEYMAP( \ - TRNS,F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS,TRNS,TRNS,\ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,DEL , INS ,\ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, VOLU,\ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, PGUP,VOLD,\ - TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS, HOME,PGDN,END \ + KC_TRNS,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_TRNS,KC_TRNS,KC_DEL , KC_INS ,\ + 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_VOLU,\ + 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_PGUP,KC_VOLD,\ + KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, KC_HOME,KC_PGDN,KC_END \ ), [2] = KEYMAP( \ - SLEP,P1, P2, P3, P4, P5, P6, P7, P8, P9, P0, TRNS,TRNS,TRNS,TRNS,FN2, \ - TRNS,TRNS,FN5 ,FN6 ,TRNS,FN7 ,TRNS,TRNS,TRNS,TRNS,PSCR,TRNS,TRNS,TRNS, FN3, \ - CAPS,TRNS,TRNS,TRNS,FN4 ,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,\ - TRNS,TRNS,TRNS,TRNS,CALC,TRNS,TRNS,TRNS,MAIL,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,\ - TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS, TRNS,TRNS,TRNS \ + KC_SLEP,KC_P1, KC_P2, KC_P3, KC_P4, KC_P5, KC_P6, KC_P7, KC_P8, KC_P9, KC_P0, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_FN2, \ + KC_TRNS,KC_TRNS,KC_FN5 ,KC_FN6 ,KC_TRNS,KC_FN7 ,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PSCR,KC_TRNS,KC_TRNS,KC_TRNS, KC_FN3, \ + KC_CAPS,KC_TRNS,KC_TRNS,KC_TRNS,KC_FN4 ,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_CALC,KC_TRNS,KC_TRNS,KC_TRNS,KC_MAIL,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,KC_TRNS \ ), }; diff --git a/keyboards/whitefox/whitefox.h b/keyboards/whitefox/whitefox.h index 0ffcdca01..3b3c6bd21 100644 --- a/keyboards/whitefox/whitefox.h +++ b/keyboards/whitefox/whitefox.h @@ -19,7 +19,7 @@ along with this program. If not, see . #include "quantum.h" -/* WhiteFox +/* WhiteFox * ,---------------------------------------------------------------. * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `|Ins| * |---------------------------------------------------------------| @@ -40,15 +40,15 @@ along with this program. If not, see . K15, K25, K35, K45, K55, K65, K75, K85, K06, K16, K26, K36, K46, K56, K66, \ K76, K86, K07, K17, K27, K37, K47, K57, K67, K77 \ ) { \ - { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07 }, \ - { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17 }, \ - { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27 }, \ - { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37 }, \ - { KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47 }, \ - { KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57 }, \ - { KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_##K66, KC_##K67 }, \ - { KC_##K70, KC_##K71, KC_##K72, KC_##K73, KC_##K74, KC_##K75, KC_##K76, KC_##K77 }, \ - { KC_##K80, KC_##K81, KC_##K82, KC_##K83, KC_##K84, KC_##K85, KC_##K86, KC_NO } \ + { K00, K01, K02, K03, K04, K05, K06, K07 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27 }, \ + { K30, K31, K32, K33, K34, K35, K36, K37 }, \ + { K40, K41, K42, K43, K44, K45, K46, K47 }, \ + { K50, K51, K52, K53, K54, K55, K56, K57 }, \ + { K60, K61, K62, K63, K64, K65, K66, K67 }, \ + { K70, K71, K72, K73, K74, K75, K76, K77 }, \ + { K80, K81, K82, K83, K84, K85, K86, KC_NO } \ } #endif -- cgit v1.2.3 From a702f4631ebfb8f2ae92c8da0cc9a49d899bd920 Mon Sep 17 00:00:00 2001 From: Kaleb Elwert Date: Mon, 9 Jan 2017 10:54:36 -0800 Subject: Increase tick frequency for responsiveness Based off of PR #866 which did the same thing for the infinity60 --- keyboards/whitefox/chconf.h | 2 +- keyboards/whitefox/matrix.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/whitefox/chconf.h b/keyboards/whitefox/chconf.h index 43c845739..d9114ec85 100644 --- a/keyboards/whitefox/chconf.h +++ b/keyboards/whitefox/chconf.h @@ -48,7 +48,7 @@ * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ -#define CH_CFG_ST_FREQUENCY 1000 +#define CH_CFG_ST_FREQUENCY 100000 /** * @brief Time delta constant for the tick-less mode. diff --git a/keyboards/whitefox/matrix.c b/keyboards/whitefox/matrix.c index ce35bca28..d69b82d61 100644 --- a/keyboards/whitefox/matrix.c +++ b/keyboards/whitefox/matrix.c @@ -69,7 +69,7 @@ uint8_t matrix_scan(void) case 8: palSetPad(GPIOC, 11); break; } - wait_us(1); // need wait to settle pin state + wait_us(10); // need wait to settle pin state // read col data: { PTD0, PTD1, PTD4, PTD5, PTD6, PTD7, PTC1, PTC2 } data = ((palReadPort(GPIOC) & 0x06UL) << 5) | -- cgit v1.2.3 From 49a00a535f6106f37e5ebd272238e018832803a0 Mon Sep 17 00:00:00 2001 From: Kaleb Elwert Date: Mon, 9 Jan 2017 11:15:10 -0800 Subject: Update clock frequencies to match the infinity ergodox --- keyboards/whitefox/mcuconf.h | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/keyboards/whitefox/mcuconf.h b/keyboards/whitefox/mcuconf.h index 68c29cf68..28f3c6cda 100644 --- a/keyboards/whitefox/mcuconf.h +++ b/keyboards/whitefox/mcuconf.h @@ -29,21 +29,10 @@ /* PEE mode - 48MHz system clock driven by external crystal. */ #define KINETIS_MCG_MODE KINETIS_MCG_MODE_PEE -#define KINETIS_PLLCLK_FREQUENCY 96000000UL -#define KINETIS_SYSCLK_FREQUENCY 48000000UL - -#if 0 -/* FEI mode - 48 MHz with internal 32.768 kHz crystal */ -#define KINETIS_MCG_MODE KINETIS_MCG_MODE_FEI -#define KINETIS_MCG_FLL_DMX32 1 /* Fine-tune for 32.768 kHz */ -#define KINETIS_MCG_FLL_DRS 1 /* 1464x FLL factor */ -#define KINETIS_SYSCLK_FREQUENCY 47972352UL /* 32.768 kHz * 1464 (~48 MHz) */ -#define KINETIS_CLKDIV1_OUTDIV1 1 -#define KINETIS_CLKDIV1_OUTDIV2 1 -#define KINETIS_CLKDIV1_OUTDIV4 2 -#define KINETIS_BUSCLK_FREQUENCY KINETIS_SYSCLK_FREQUENCY -#define KINETIS_FLASHCLK_FREQUENCY KINETIS_SYSCLK_FREQUENCY/2 -#endif +#define KINETIS_PLLCLK_FREQUENCY 72000000UL +#define KINETIS_SYSCLK_FREQUENCY 72000000UL +#define KINETIS_BUSCLK_FREQUENCY 36000000UL +#define KINETIS_FLASHCLK_FREQUENCY 24000000UL /* * SERIAL driver system settings. -- cgit v1.2.3 From 0b38204e62446a7ce2eaf60709cbf7e426a200be Mon Sep 17 00:00:00 2001 From: Kaleb Elwert Date: Mon, 9 Jan 2017 11:57:44 -0800 Subject: Fix mismatched indentation --- keyboards/whitefox/keymaps/matt3o/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/whitefox/keymaps/matt3o/keymap.c b/keyboards/whitefox/keymaps/matt3o/keymap.c index 9321553bf..4455886a5 100644 --- a/keyboards/whitefox/keymaps/matt3o/keymap.c +++ b/keyboards/whitefox/keymaps/matt3o/keymap.c @@ -72,7 +72,7 @@ const uint16_t fn_actions[] = { /* custom action function */ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - /* + /* (void)opt; switch(id) { case ACTION_LEDS_ALL: -- cgit v1.2.3 From a55c5e3ea353e3d1a73550bcc898bbc4f023c42e Mon Sep 17 00:00:00 2001 From: Kaleb Elwert Date: Tue, 10 Jan 2017 03:00:36 -0800 Subject: Wait for two ticks rather than 1 --- keyboards/whitefox/matrix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/whitefox/matrix.c b/keyboards/whitefox/matrix.c index d69b82d61..9202ab023 100644 --- a/keyboards/whitefox/matrix.c +++ b/keyboards/whitefox/matrix.c @@ -69,7 +69,7 @@ uint8_t matrix_scan(void) case 8: palSetPad(GPIOC, 11); break; } - wait_us(10); // need wait to settle pin state + wait_us(20); // need wait to settle pin state // read col data: { PTD0, PTD1, PTD4, PTD5, PTD6, PTD7, PTC1, PTC2 } data = ((palReadPort(GPIOC) & 0x06UL) << 5) | -- cgit v1.2.3 From db1aec159d37748de7413816a377dc5b63111c71 Mon Sep 17 00:00:00 2001 From: Brendan Johan Lee Date: Tue, 10 Jan 2017 19:20:25 +0100 Subject: Added layer images to deadcyclo layout readme --- .../deadcyclo/images/deadcyclo-base-layout.png | Bin 0 -> 79741 bytes .../deadcyclo/images/deadcyclo-layer-1-symbols.png | Bin 0 -> 55349 bytes .../images/deadcyclo-layer-2-media-and-mouse.png | Bin 0 -> 50926 bytes .../images/deadcyclo-layer-3-navigation.png | Bin 0 -> 43551 bytes keyboards/ergodox/keymaps/deadcyclo/readme.md | 26 +++++++++++++++++++++ 5 files changed, 26 insertions(+) create mode 100644 keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-base-layout.png create mode 100644 keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-1-symbols.png create mode 100644 keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-2-media-and-mouse.png create mode 100644 keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png diff --git a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-base-layout.png b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-base-layout.png new file mode 100644 index 000000000..4208c5189 Binary files /dev/null and b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-base-layout.png differ diff --git a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-1-symbols.png b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-1-symbols.png new file mode 100644 index 000000000..ccda70e39 Binary files /dev/null and b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-1-symbols.png differ diff --git a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-2-media-and-mouse.png b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-2-media-and-mouse.png new file mode 100644 index 000000000..481e63e32 Binary files /dev/null and b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-2-media-and-mouse.png differ diff --git a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png new file mode 100644 index 000000000..9ebba6734 Binary files /dev/null and b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png differ diff --git a/keyboards/ergodox/keymaps/deadcyclo/readme.md b/keyboards/ergodox/keymaps/deadcyclo/readme.md index 915507440..07e8e62a3 100644 --- a/keyboards/ergodox/keymaps/deadcyclo/readme.md +++ b/keyboards/ergodox/keymaps/deadcyclo/readme.md @@ -5,6 +5,32 @@ some common keys might be missing, as this layout is intented to be used on *nix with their system. The layout is geared towards avoiding using the rat (mouse for those of you who are unfamiliar with tiling window managers) as much as possibly. +# Layouts + +All layer images created using [keyboard-layout-editor](http://www.keyboard-layout-editor.com/) + +## Base layer + +[![Base layer](images/deadcyclo-base-layout.png)](http://www.keyboard-layout-editor.com/#/gists/0321b18620180a3e46c498206eb65366) + +## Layer 1 - Symbols + +[![Layer 1 - Symbols](images/deadcyclo-layer-1-symbols.png)](http://www.keyboard-layout-editor.com/#/gists/96714e198054c9115bafb5267cc6bc73) + +## Layer 2 - Media and Mouse + +[![Layer 2 - Media and Mouse](images/deadcyclo-layer-2-media-and-mouse.png)](http://www.keyboard-layout-editor.com/#/gists/824759486e378bcec30784309a7e5731) + +## Layer 3 - Navigation + +[![Layer 3 - Navigation](images/deadcyclo-layer-2-media-and-mouse.png)](http://www.keyboard-layout-editor.com/#/gists/67d9613dcd873c68693d11863d0fd289) + # Changelog - 02.01.2017 Added delete key on second layer +- 10.01.2017 Added layer images to readme + +# TODO + +- Add unicode support (direct input and indirect? see algernon layout for examples) +- Add descriptions below each layer image of any special functions/keys -- cgit v1.2.3 From c4fca8b6bc06178ad578dbc4be67d579a3f4d59a Mon Sep 17 00:00:00 2001 From: Brendan Johan Lee Date: Tue, 10 Jan 2017 19:23:59 +0100 Subject: Fixed incorrect layer image in deadcyclo readme --- keyboards/ergodox/keymaps/deadcyclo/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/ergodox/keymaps/deadcyclo/readme.md b/keyboards/ergodox/keymaps/deadcyclo/readme.md index 07e8e62a3..809dd6eb5 100644 --- a/keyboards/ergodox/keymaps/deadcyclo/readme.md +++ b/keyboards/ergodox/keymaps/deadcyclo/readme.md @@ -23,7 +23,7 @@ All layer images created using [keyboard-layout-editor](http://www.keyboard-layo ## Layer 3 - Navigation -[![Layer 3 - Navigation](images/deadcyclo-layer-2-media-and-mouse.png)](http://www.keyboard-layout-editor.com/#/gists/67d9613dcd873c68693d11863d0fd289) +[![Layer 3 - Navigation](images/deadcyclo-layer-3-navigation.png)](http://www.keyboard-layout-editor.com/#/gists/67d9613dcd873c68693d11863d0fd289) # Changelog -- cgit v1.2.3 From 3a453a03ed5f029bb9cf23955e87789245d39a22 Mon Sep 17 00:00:00 2001 From: David Olsson Date: Wed, 11 Jan 2017 23:00:34 +0100 Subject: Atreus62 first semi-final draft --- keyboards/atreus62/keymaps/mneme/Makefile | 6 + keyboards/atreus62/keymaps/mneme/README.md | 2 + keyboards/atreus62/keymaps/mneme/config.h | 7 + keyboards/atreus62/keymaps/mneme/keymap.c | 316 +++++++++++++++++++++++++++++ keyboards/atreus62/keymaps/mneme/unicode | 114 +++++++++++ 5 files changed, 445 insertions(+) create mode 100644 keyboards/atreus62/keymaps/mneme/Makefile create mode 100644 keyboards/atreus62/keymaps/mneme/README.md create mode 100644 keyboards/atreus62/keymaps/mneme/config.h create mode 100644 keyboards/atreus62/keymaps/mneme/keymap.c create mode 100644 keyboards/atreus62/keymaps/mneme/unicode diff --git a/keyboards/atreus62/keymaps/mneme/Makefile b/keyboards/atreus62/keymaps/mneme/Makefile new file mode 100644 index 000000000..f20750dbc --- /dev/null +++ b/keyboards/atreus62/keymaps/mneme/Makefile @@ -0,0 +1,6 @@ +TAP_DANCE_ENABLE = yes +BOOTMAGIC_ENABLE = no +COMMAND_ENABLE = no +SLEEP_LED_ENABLE = no +UNICODE_ENABLE = yes +NKRO_ENABLE = true diff --git a/keyboards/atreus62/keymaps/mneme/README.md b/keyboards/atreus62/keymaps/mneme/README.md new file mode 100644 index 000000000..54f5e21ab --- /dev/null +++ b/keyboards/atreus62/keymaps/mneme/README.md @@ -0,0 +1,2 @@ +Keymap that owes just about everything to Algernon. +Check out his keymap for the Ergodox. It's pretty damned amazing. diff --git a/keyboards/atreus62/keymaps/mneme/config.h b/keyboards/atreus62/keymaps/mneme/config.h new file mode 100644 index 000000000..2c2a08c05 --- /dev/null +++ b/keyboards/atreus62/keymaps/mneme/config.h @@ -0,0 +1,7 @@ +#define ONESHOT_TIMEOUT 3000 +#define TAPPING_TERM 200 +#define PREVENT_STUCK_MODIFIERS + +#define LEADER_TIMEOUT 1000 + +#include "../../config.h" diff --git a/keyboards/atreus62/keymaps/mneme/keymap.c b/keyboards/atreus62/keymaps/mneme/keymap.c new file mode 100644 index 000000000..8c3f8aa43 --- /dev/null +++ b/keyboards/atreus62/keymaps/mneme/keymap.c @@ -0,0 +1,316 @@ +#include +#include "atreus62.h" +#include "led.h" +#include "action_layer.h" +#include "action_util.h" + +//avrdude -p atmega32u4 -P /dev/tty.usbmodem1411 -c avr109 -U flash:w:atreus63_default.hex +/* + *WINDOWS SWEDISH + */ +#define KN_HALF KC_GRV // 1/2 +#define KN_PLUS KC_MINS // + +#define KN_ACUT KC_EQL // ´ +#define KN_AO KC_LBRC // Å +#define KN_UMLA KC_RBRC // ¨ +#define KN_OE KC_SCLN // Ö +#define KN_AE KC_QUOT // Ä +#define KN_QUOT KC_NUHS // ' +#define KN_LABK KC_NUBS // < +#define KN_MINS KC_SLSH // - +#define KN_EXLM LSFT(KC_1) // ! +#define KN_DQT LSFT(KC_2) // " +#define KN_AT RALT(KC_2) // @ +#define KN_HASH LSFT(KC_3) // # +#define KN_DLR RALT(KC_4) // $ +#define KN_PERC LSFT(KC_5) // % +#define KN_AMPR LSFT(KC_6) // & +#define KN_SLSH LSFT(KC_7) // / +#define KN_LPRN LSFT(KC_8) // ( +#define KN_RPRN LSFT(KC_9) // ) +#define KN_EQL LSFT(KC_0) // = +#define KN_UNDS LSFT(KN_MINS) // _ +#define KN_QUES LSFT(KN_PLUS) // ? +#define KN_GRAV LSFT(KN_ACUT) // ` +#define KN_LCBR RALT(KC_7) // { +#define KN_RCBR RALT(KC_0) // } +#define KN_LBRC RALT(KC_8) // [ +#define KN_RBRC RALT(KC_9) // ] +#define KN_RABK LSFT(KN_LABK) // < +#define KN_COLN LSFT(KC_DOT) // : +#define KN_SCLN LSFT(KC_COMM) // : +#define KN_PIPE RALT(KN_LABK) // | +#define KN_QUES LSFT(KN_PLUS) // ? +#define KN_CIRC LSFT(KN_UMLA) // ^ +#define KN_ASTR LSFT(KN_QUOT) // * +#define KN_TILD RALT(KN_UMLA) // ~ +#define KN_BSLS RALT(KN_PLUS) // + +#define OSM_LCTL OSM(MOD_LCTL) +#define OSM_LALT OSM(MOD_LALT) +#define OSM_LSFT OSM(MOD_LSFT) + +#define KC_HYP LSFT(LALT(LCTL(KC_LGUI))) + +#define KC_COPY LCTL(KC_C) +#define KC_PASTE LCTL(KC_V) +#define KC_UNDO LCTL(KC_Z) +#define KC_REDO LCTL(LSFT(KC_Z)) + +// Layers +enum { + BASE = 0, + NAV, + SYM +}; + +//Macros +enum { + KF_1 = 0, // 1, F1 + KF_2, // ... + KF_3, + KF_4, + KF_5, + KF_6, + KF_7, + KF_8, + KF_9, + KF_10, + KF_11, + KF_12 +}; + +// Tapdance +enum { + TD_FUN = 0, + TD_EQ +}; + +//Custom keycodes +enum { + PLACEHOLDER = SAFE_RANGE +}; + +//State and timers +uint16_t kf_timers[12]; + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [BASE] = { + + { M(KF_11) ,M(KF_1) ,M(KF_2) ,M(KF_3) ,M(KF_4) ,M(KF_5) ,KC_NO ,M(KF_6) ,M(KF_7) ,M(KF_8) ,M(KF_9) ,M(KF_10) ,M(KF_12) }, + { KC_HYP ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_NO ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KN_AO }, + { OSM_LCTL ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_NO ,KC_H ,KC_J ,KC_K ,KC_L ,KN_OE ,KN_AE }, + { OSM_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_DELT ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KN_MINS ,OSM_LSFT }, + { MO(NAV) ,OSM_LCTL ,OSM_LALT ,KC_LGUI ,KC_SPC ,LT(SYM,KC_BSPC) ,KC_TAB ,LT(SYM,KC_ENT) ,KC_SPC ,KC_LEAD ,KC_LALT ,KC_LCTRL ,MO(NAV) } + + }, + [NAV] = { + + { 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 ,KC_HOME ,KC_UP ,KC_END ,KC_PGUP ,KC_NO ,KC_PGUP ,KC_HOME ,KC_UP ,KC_END ,KC_TRNS ,KC_TRNS }, + { KC_TRNS ,KC_TRNS ,KC_LEFT ,KC_DOWN ,KC_RIGHT ,KC_PGDN ,KC_NO ,KC_PGDN ,KC_LEFT ,KC_DOWN ,KC_RIGHT ,KC_TRNS ,KC_TRNS }, + { KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_F11 ,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_F12 ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_VOLD ,KC_VOLU } + + }, + [SYM] = { + + { KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,TD(TD_EQ) ,KC_NO ,TD(TD_FUN) ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS }, + { KC_TRNS ,KN_LABK ,KN_RABK ,KN_LCBR ,KN_RCBR ,KN_PLUS ,KC_NO ,KN_AT ,KN_DQT ,KN_QUOT ,KN_GRAV ,KN_SLSH ,KC_TRNS }, + { KC_TRNS ,KN_EXLM ,KN_EQL ,KN_LPRN ,KN_RPRN ,KN_MINS ,KC_NO ,KN_UNDS ,KN_SCLN ,KN_COLN ,KN_AMPR ,KN_PIPE ,KC_TRNS }, + { KC_TRNS ,KN_DLR ,KN_PERC ,KN_LBRC ,KN_RBRC ,KN_ASTR ,KC_TRNS ,KN_HASH ,KC_COMM ,KC_DOT ,KN_QUES ,KN_BSLS ,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 } + + } +}; + +#define TAP_ONCE(code) \ + register_code (code); \ + unregister_code (code) + +static void m_tapn (uint8_t code, ...) { + uint8_t kc = code; + va_list ap; + + va_start(ap, code); + do { + register_code(kc); + unregister_code(kc); + wait_ms(50); + kc = va_arg(ap, int); + } while (kc != 0); + va_end(ap); +} + +static void m_handle_kf (keyrecord_t *record, uint8_t id) { + uint8_t code = id - KF_1; + + if (record->event.pressed) { + kf_timers[code] = timer_read (); + } else { + uint8_t kc_base; + uint8_t long_press = (kf_timers[code] && timer_elapsed (kf_timers[code]) > TAPPING_TERM); + + kf_timers[code] = 0; + + switch(id){ + case KF_1 ... KF_10: + if (long_press) { + // Long press + kc_base = KC_F1; + } else { + kc_base = KC_1; + } + code += kc_base; + break; + case KF_11: + code = long_press ? KC_F11 : KC_ESC; + break; + case KF_12: + code = long_press ? KC_F12 : KC_PLUS; + break; + } + register_code (code); + unregister_code (code); + } +} + +const uint16_t PROGMEM fn_actions[] = { + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + switch (id) { + case KF_1 ... KF_12: + m_handle_kf(record, id); + break; + } + return MACRO_NONE; +}; + +// Custom keycodes +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + bool queue = true; + + //Cancle one-shot mods. + switch (keycode) { + case KC_ESC: + if (record->event.pressed && get_oneshot_mods() && !has_oneshot_mods_timed_out()) { + clear_oneshot_mods(); + queue = false; + } + break; + } + return queue; +} + +// TAP DANCE SETTINGS +void dance_eq (qk_tap_dance_state_t *state, void *user_data) { + switch (state->count) { + case 1: // === + register_code(KC_LSHIFT); + m_tapn(KC_0, KC_0, KC_0, 0); + unregister_code(KC_LSHIFT); + break; + case 2: + register_code(KC_LSHIFT); + m_tapn(KC_1, KC_0, KC_0, 0); + unregister_code(KC_LSHIFT); + break; + default: + reset_tap_dance(state); + } +} + +void dance_fun (qk_tap_dance_state_t *state, void *user_data) { + switch (state->count) { + case 1: // => + register_code(KC_LSHIFT); + m_tapn(KC_0, KN_LABK, 0); + unregister_code(KC_LSHIFT); + break; + case 2: // () => {} + register_code(KC_LSHIFT); + m_tapn(KC_8, KC_9, KC_SPC, KC_0, KN_LABK, KC_SPC, 0); + unregister_code(KC_LSHIFT); + register_code(KC_RALT); + m_tapn(KC_7, 0); + unregister_code(KC_RALT); + TAP_ONCE(KC_ENT); + break; + default: + reset_tap_dance(state); + } +} + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_FUN] = ACTION_TAP_DANCE_FN (dance_fun) + ,[TD_EQ] = ACTION_TAP_DANCE_FN (dance_eq) +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + set_unicode_input_mode(UC_WINC); +}; + +LEADER_EXTERNS(); +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + LEADER_DICTIONARY() { + leading = false; + leader_end(); + SEQ_ONE_KEY(KC_L){ + register_code(KC_RGUI); + TAP_ONCE(KC_L); + unregister_code(KC_RGUI); + }; // Todo + + SEQ_TWO_KEYS(KC_F, KC_S){ + register_code(KC_LCTRL); + TAP_ONCE(KC_S); + unregister_code(KC_LCTRL); + }; // Todo + + SEQ_TWO_KEYS(KC_B, KC_D){ + register_code(KC_LCTRL); + TAP_ONCE(KC_W); + unregister_code(KC_LCTRL); + }; // Todo + + SEQ_ONE_KEY(KC_SLSH){ + register_code(KC_LCTRL); + TAP_ONCE(KC_F); + unregister_code(KC_LCTRL); + } + + SEQ_TWO_KEYS (KC_S, KC_S) { + // ¯\_(ツ)_/¯ + unicode_input_start(); register_hex(0xaf); unicode_input_finish(); + register_code (KC_RALT); TAP_ONCE (KN_PLUS); unregister_code (KC_RALT); + register_code (KC_RSFT); TAP_ONCE (KC_8); unregister_code (KC_RSFT); + unicode_input_start (); register_hex(0x30c4); unicode_input_finish(); + register_code (KC_RSFT); TAP_ONCE (KC_9); TAP_ONCE(KC_7); unregister_code (KC_RSFT); + unicode_input_start (); register_hex(0xaf); unicode_input_finish(); + } + + SEQ_TWO_KEYS (KC_S, KC_F) { + // 凸(ツ)凸 + unicode_input_start(); register_hex(0x51F8); unicode_input_finish(); + register_code (KC_RSFT); TAP_ONCE (KC_8); unregister_code (KC_RSFT); + unicode_input_start (); register_hex(0x30c4); unicode_input_finish(); + register_code (KC_RSFT); TAP_ONCE (KC_9); unregister_code (KC_RSFT); + unicode_input_start (); register_hex(0x51F8); unicode_input_finish(); + } + + SEQ_TWO_KEYS (KC_S, KC_L) { + // λ + unicode_input_start(); + register_hex(0x03bb); + unicode_input_finish(); + } + }; +}; diff --git a/keyboards/atreus62/keymaps/mneme/unicode b/keyboards/atreus62/keymaps/mneme/unicode new file mode 100644 index 000000000..b3f62b6d3 --- /dev/null +++ b/keyboards/atreus62/keymaps/mneme/unicode @@ -0,0 +1,114 @@ +Todo +☐ 2610 Todo +☑ 2611 Done +☒ 2612 Failed + +Operator +× 00D7 Multiplication +÷ 00F7 Division +≤ 2264 LessEqual +≥ 2265 MoreEqual +± 00B1 Plusminus + +Math +∏ 220F Product +∑ 2211 Sum +≈ 2248 Almost +≡ 2261 Equivalent +∞ 221E Infinity +‰ 2030 Mille + +Set +⊂ 2282 Subset +⊃ 2283 sUperset +∩ 2229 Intersextion +∪ 222A Union +∈ 2208 Element +∉ 2209 Notelement +∍ 220D Contains +∌ 220C doesNotcontain + +Logic +¬ 00AC Not +∧ 2227 And +∨ 2228 Or +∃ 2203 Exists +∄ 2204 Notexists + +Greek +µ 00B5 Micro +λ 03BB Lamda +Ω 2126 Omega +α 03B1 Alpha +β 03B2 Beta +γ 03B3 Gamma +π 03C0 Pi +δ 03B4 Delta + +Other +☁ 2601 Cloud +☼ 263C Sun +☂ 2602 Rain +☠ 2620 Skull +♺ 267A Recycle +👍1F44D thumbsUp +👎1F44E thumbsDown +💩 1F4A9 Poo + + +//Todo +SEQ_THREE_KEYS(KC_U, KC_G, KC_T){m_unicode(0x2610);}; // Todo +SEQ_THREE_KEYS(KC_U, KC_G, KC_D){m_unicode(0x2611);}; // Done +SEQ_THREE_KEYS(KC_U, KC_G, KC_F){m_unicode(0x2612);}; // Failed + +//Operator +SEQ_THREE_KEYS(KC_U, KC_O, KC_M){m_unicode(0x00D7);}; // Multiplication +SEQ_THREE_KEYS(KC_U, KC_O, KC_D){m_unicode(0x00F7);}; // Division +SEQ_THREE_KEYS(KC_U, KC_O, KC_L){m_unicode(0x2264);}; // LessEqual +SEQ_THREE_KEYS(KC_U, KC_O, KC_M){m_unicode(0x2265);}; // MoreEqual +SEQ_THREE_KEYS(KC_U, KC_O, KC_P){m_unicode(0x00B1);}; // Plusminus + +//Math +SEQ_THREE_KEYS(KC_U, KC_M, KC_P){m_unicode(0x220F);}; // Product +SEQ_THREE_KEYS(KC_U, KC_M, KC_S){m_unicode(0x2211);}; // Sum +SEQ_THREE_KEYS(KC_U, KC_M, KC_A){m_unicode(0x2248);}; // Almost +SEQ_THREE_KEYS(KC_U, KC_M, KC_E){m_unicode(0x2261);}; // Equivalent +SEQ_THREE_KEYS(KC_U, KC_M, KC_I){m_unicode(0x221E);}; // Infinity +SEQ_THREE_KEYS(KC_U, KC_M, KC_M){m_unicode(0x2030);}; // Mille + +//Set +SEQ_THREE_KEYS(KC_U, KC_S, KC_S){m_unicode(0x2282);}; Subset +SEQ_THREE_KEYS(KC_U, KC_S, KC_P){m_unicode(0x2283);}; suPerset +SEQ_THREE_KEYS(KC_U, KC_S, KC_I){m_unicode(0x2229);}; Intersection +SEQ_THREE_KEYS(KC_U, KC_S, KC_U){m_unicode(0x222A);}; Union +SEQ_THREE_KEYS(KC_U, KC_S, KC_E){m_unicode(0x2208);}; Element +SEQ_THREE_KEYS(KC_U, KC_S, KC_N){m_unicode(0x2209);}; Notelement +SEQ_THREE_KEYS(KC_U, KC_S, KC_C){m_unicode(0x220D);}; Contains +SEQ_THREE_KEYS(KC_U, KC_S, KC_D){m_unicode(0x220C);}; doesNotcontain + +//Logic +SEQ_THREE_KEYS(KC_U, KC_L, KC_N){m_unicode(0x00AC);}; // Not +SEQ_THREE_KEYS(KC_U, KC_L, KC_A){m_unicode(0x2227);}; // And +SEQ_THREE_KEYS(KC_U, KC_L, KC_O){m_unicode(0x2228);}; // Or +SEQ_THREE_KEYS(KC_U, KC_L, KC_E){m_unicode(0x2203);}; // Exists +SEQ_THREE_KEYS(KC_U, KC_L, KC_N){m_unicode(0x2204);}; // Notexists + +//Greek +SEQ_THREE_KEYS(KC_U, KC_G, KC_M){m_unicode(0x00B5);}; // Micro +SEQ_THREE_KEYS(KC_U, KC_G, KC_L){m_unicode(0x03BB);}; // Lamda +SEQ_THREE_KEYS(KC_U, KC_G, KC_O){m_unicode(0x2126);}; // Omega +SEQ_THREE_KEYS(KC_U, KC_G, KC_A){m_unicode(0x03B1);}; // Alpha +SEQ_THREE_KEYS(KC_U, KC_G, KC_B){m_unicode(0x03B2);}; // Beta +SEQ_THREE_KEYS(KC_U, KC_G, KC_G){m_unicode(0x03B3);}; // Gamma +SEQ_THREE_KEYS(KC_U, KC_G, KC_P){m_unicode(0x03C0);}; // Pi +SEQ_THREE_KEYS(KC_U, KC_G, KC_D){m_unicode(0x03B4);}; // Delta + +//Zother +SEQ_THREE_KEYS(KC_U, KC_Z, KC_C){m_unicode(0x2601);}; // Cloud +SEQ_THREE_KEYS(KC_U, KC_Z, KC_S){m_unicode(0x263C);}; // Sun +SEQ_THREE_KEYS(KC_U, KC_Z, KC_R){m_unicode(0x2602);}; // Rain +SEQ_THREE_KEYS(KC_U, KC_Z, KC_K){m_unicode(0x2620);}; // sKull +SEQ_THREE_KEYS(KC_U, KC_Z, KC_R){m_unicode(0x267A);}; // rEcycle +SEQ_THREE_KEYS(KC_U, KC_Z, KC_U){m_unicode(0x1F44D);}; // thumbsUp +SEQ_THREE_KEYS(KC_U, KC_Z, KC_D){m_unicode(0x1F44E);}; // thumbsDown +SEQ_THREE_KEYS(KC_U, KC_Z, KC_P){m_unicode(0x1F4A9);}; // Poo -- cgit v1.2.3 From e491f5a4d0465c1499e14183358730cf73d0ceaf Mon Sep 17 00:00:00 2001 From: David Olsson Date: Wed, 11 Jan 2017 23:41:07 +0100 Subject: Readme + minor change to make it match reality. --- keyboards/atreus62/keymaps/mneme/README.md | 56 +++++++++++++++++++++++++- keyboards/atreus62/keymaps/mneme/img/base.png | Bin 0 -> 458762 bytes keyboards/atreus62/keymaps/mneme/img/fun.png | Bin 0 -> 268634 bytes keyboards/atreus62/keymaps/mneme/img/sym.png | Bin 0 -> 433342 bytes keyboards/atreus62/keymaps/mneme/keymap.c | 18 +++------ 5 files changed, 60 insertions(+), 14 deletions(-) create mode 100644 keyboards/atreus62/keymaps/mneme/img/base.png create mode 100644 keyboards/atreus62/keymaps/mneme/img/fun.png create mode 100644 keyboards/atreus62/keymaps/mneme/img/sym.png diff --git a/keyboards/atreus62/keymaps/mneme/README.md b/keyboards/atreus62/keymaps/mneme/README.md index 54f5e21ab..b4dc89625 100644 --- a/keyboards/atreus62/keymaps/mneme/README.md +++ b/keyboards/atreus62/keymaps/mneme/README.md @@ -1,2 +1,54 @@ -Keymap that owes just about everything to Algernon. -Check out his keymap for the Ergodox. It's pretty damned amazing. + + +Mnemes Swedish Bonaza +======================= + +My Layout in process, most of the code is shamelessly stolen from [algernons][algernon] excellent layout + + [algernon]: https://github.com/algernon/ergodox-layout + +It's for Windows (current work forces me to) and Swedish (matter of birth) so ymmw. + +## Table of Contents + +* [Layouts](#layouts) + - [Base layer](#base-layer) + - [Fun layer](#fun-layer) + - [Nav layer](#nav-layer) + - [LED states](#led-states) + +# Layouts + +## Base layer + +![Base layer](img/base.png) + + +* The number row doubles as a function row. Short presses produces numbers, long presses produces Fxx +* The `Shift`, `Alt`, and `Control` modifiers are one-shot. +* `Backspace` and `Enter` doubles as switches to the `sym` layer when held +* The `ESC` key also doubles as a one-shot cancel key. +* The **Lead** key is followed by a sequence of keys. + - `LEAD l` : `lgui+l`. + - `LEAD s l` : `λ`. + - `LEAD s s` : `¯\_(ツ)_/¯` + - `LEAD s f` : `凸(ツ)凸` + - `LEAD f s` : `ctrl+s` + - `LEAD b d` : `ctrl+w` + + +## Nav layer + +![Fun layer](img/fun.png) + +Basic navigation on the right hand and modifiers close +by for the left. The latter because I tend to use `ctrl+arrows` quite a lot. + +## Sym layer + +![Sym layer](img/sym.png) + +Easy access to most symbols I use on a daily basis. Most common are on the home row, the rest are grouped as best as I could. + +# License + GPL-3+ diff --git a/keyboards/atreus62/keymaps/mneme/img/base.png b/keyboards/atreus62/keymaps/mneme/img/base.png new file mode 100644 index 000000000..86907d544 Binary files /dev/null and b/keyboards/atreus62/keymaps/mneme/img/base.png differ diff --git a/keyboards/atreus62/keymaps/mneme/img/fun.png b/keyboards/atreus62/keymaps/mneme/img/fun.png new file mode 100644 index 000000000..a58933d96 Binary files /dev/null and b/keyboards/atreus62/keymaps/mneme/img/fun.png differ diff --git a/keyboards/atreus62/keymaps/mneme/img/sym.png b/keyboards/atreus62/keymaps/mneme/img/sym.png new file mode 100644 index 000000000..11b5bd4b0 Binary files /dev/null and b/keyboards/atreus62/keymaps/mneme/img/sym.png differ diff --git a/keyboards/atreus62/keymaps/mneme/keymap.c b/keyboards/atreus62/keymaps/mneme/keymap.c index 8c3f8aa43..56d637120 100644 --- a/keyboards/atreus62/keymaps/mneme/keymap.c +++ b/keyboards/atreus62/keymaps/mneme/keymap.c @@ -44,7 +44,7 @@ #define KN_CIRC LSFT(KN_UMLA) // ^ #define KN_ASTR LSFT(KN_QUOT) // * #define KN_TILD RALT(KN_UMLA) // ~ -#define KN_BSLS RALT(KN_PLUS) // +#define KN_BSLS RALT(KN_PLUS) // #define OSM_LCTL OSM(MOD_LCTL) #define OSM_LALT OSM(MOD_LALT) @@ -110,8 +110,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [NAV] = { { 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 ,KC_HOME ,KC_UP ,KC_END ,KC_PGUP ,KC_NO ,KC_PGUP ,KC_HOME ,KC_UP ,KC_END ,KC_TRNS ,KC_TRNS }, - { KC_TRNS ,KC_TRNS ,KC_LEFT ,KC_DOWN ,KC_RIGHT ,KC_PGDN ,KC_NO ,KC_PGDN ,KC_LEFT ,KC_DOWN ,KC_RIGHT ,KC_TRNS ,KC_TRNS }, + { KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_NO ,KC_PGUP ,KC_HOME ,KC_UP ,KC_END ,KC_TRNS ,KC_TRNS }, + { KC_TRNS ,KC_TRNS ,KC_LSFT ,KC_LCTL ,KC_LALT ,KC_TRNS ,KC_NO ,KC_PGDN ,KC_LEFT ,KC_DOWN ,KC_RIGHT ,KC_TRNS ,KC_TRNS }, { KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_F11 ,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_F12 ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_VOLD ,KC_VOLU } @@ -281,19 +281,13 @@ void matrix_scan_user(void) { unregister_code(KC_LCTRL); }; // Todo - SEQ_ONE_KEY(KC_SLSH){ - register_code(KC_LCTRL); - TAP_ONCE(KC_F); - unregister_code(KC_LCTRL); - } - SEQ_TWO_KEYS (KC_S, KC_S) { // ¯\_(ツ)_/¯ unicode_input_start(); register_hex(0xaf); unicode_input_finish(); - register_code (KC_RALT); TAP_ONCE (KN_PLUS); unregister_code (KC_RALT); + register_code (KC_RALT); TAP_ONCE (KN_PLUS); unregister_code (KC_RALT); register_code (KC_RSFT); TAP_ONCE (KC_8); unregister_code (KC_RSFT); unicode_input_start (); register_hex(0x30c4); unicode_input_finish(); - register_code (KC_RSFT); TAP_ONCE (KC_9); TAP_ONCE(KC_7); unregister_code (KC_RSFT); + register_code (KC_RSFT); TAP_ONCE (KC_9); TAP_ONCE(KC_7); unregister_code (KC_RSFT); unicode_input_start (); register_hex(0xaf); unicode_input_finish(); } @@ -302,7 +296,7 @@ void matrix_scan_user(void) { unicode_input_start(); register_hex(0x51F8); unicode_input_finish(); register_code (KC_RSFT); TAP_ONCE (KC_8); unregister_code (KC_RSFT); unicode_input_start (); register_hex(0x30c4); unicode_input_finish(); - register_code (KC_RSFT); TAP_ONCE (KC_9); unregister_code (KC_RSFT); + register_code (KC_RSFT); TAP_ONCE (KC_9); unregister_code (KC_RSFT); unicode_input_start (); register_hex(0x51F8); unicode_input_finish(); } -- cgit v1.2.3 From 1bef7bf45a2b05e755b17267aa08a66d1588134f Mon Sep 17 00:00:00 2001 From: David Olsson Date: Wed, 11 Jan 2017 23:43:13 +0100 Subject: Link fix in readme. --- keyboards/atreus62/keymaps/mneme/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/atreus62/keymaps/mneme/README.md b/keyboards/atreus62/keymaps/mneme/README.md index b4dc89625..1461f6c52 100644 --- a/keyboards/atreus62/keymaps/mneme/README.md +++ b/keyboards/atreus62/keymaps/mneme/README.md @@ -13,8 +13,8 @@ It's for Windows (current work forces me to) and Swedish (matter of birth) so ym * [Layouts](#layouts) - [Base layer](#base-layer) - - [Fun layer](#fun-layer) - [Nav layer](#nav-layer) + - [Sym layer](#sym-layer) - [LED states](#led-states) # Layouts @@ -39,7 +39,7 @@ It's for Windows (current work forces me to) and Swedish (matter of birth) so ym ## Nav layer -![Fun layer](img/fun.png) +![Nav layer](img/fun.png) Basic navigation on the right hand and modifiers close by for the left. The latter because I tend to use `ctrl+arrows` quite a lot. -- cgit v1.2.3 From ed975f2454692fec28539a7014116beeb21b4c9e Mon Sep 17 00:00:00 2001 From: David Olsson Date: Thu, 12 Jan 2017 00:14:42 +0100 Subject: Remove comments and change to correct KN_PLUS instead of KC_PLUS. --- keyboards/atreus62/keymaps/mneme/keymap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/atreus62/keymaps/mneme/keymap.c b/keyboards/atreus62/keymaps/mneme/keymap.c index 56d637120..eca452b77 100644 --- a/keyboards/atreus62/keymaps/mneme/keymap.c +++ b/keyboards/atreus62/keymaps/mneme/keymap.c @@ -170,7 +170,7 @@ static void m_handle_kf (keyrecord_t *record, uint8_t id) { code = long_press ? KC_F11 : KC_ESC; break; case KF_12: - code = long_press ? KC_F12 : KC_PLUS; + code = long_press ? KC_F12 : KN_PLUS; break; } register_code (code); @@ -267,19 +267,19 @@ void matrix_scan_user(void) { register_code(KC_RGUI); TAP_ONCE(KC_L); unregister_code(KC_RGUI); - }; // Todo + }; SEQ_TWO_KEYS(KC_F, KC_S){ register_code(KC_LCTRL); TAP_ONCE(KC_S); unregister_code(KC_LCTRL); - }; // Todo + }; SEQ_TWO_KEYS(KC_B, KC_D){ register_code(KC_LCTRL); TAP_ONCE(KC_W); unregister_code(KC_LCTRL); - }; // Todo + }; SEQ_TWO_KEYS (KC_S, KC_S) { // ¯\_(ツ)_/¯ -- cgit v1.2.3 From 8459bb97c1e8bcb9ccce55a1ed849d373bd7706c Mon Sep 17 00:00:00 2001 From: Erez Zukerman Date: Wed, 11 Jan 2017 21:57:41 -0500 Subject: Adds SCMD and SCMD_T --- quantum/quantum_keycodes.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 5cd3c8e78..7466e185c 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -159,6 +159,7 @@ enum quantum_keycodes { #define MEH(kc) (kc | QK_LCTL | QK_LSFT | QK_LALT) #define LCAG(kc) (kc | QK_LCTL | QK_LALT | QK_LGUI) #define ALTG(kc) (kc | QK_RCTL | QK_RALT) +#define SCMD(kc) (kc | QK_LGUI | QK_LSFT) #define MOD_HYPR 0xf #define MOD_MEH 0x7 @@ -293,6 +294,7 @@ enum quantum_keycodes { #define MEH_T(kc) MT((MOD_LCTL | MOD_LSFT | MOD_LALT), kc) // Meh is a less hyper version of the Hyper key -- doesn't include Win or Cmd, so just alt+shift+ctrl #define LCAG_T(kc) MT((MOD_LCTL | MOD_LALT | MOD_LGUI), kc) // Left control alt and gui #define ALL_T(kc) MT((MOD_LCTL | MOD_LSFT | MOD_LALT | MOD_LGUI), kc) // see http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/ +#define SCMD_T(kc) MT((MOD_LGUI | MOD_LSFT), kc) // Dedicated keycode versions for Hyper and Meh, if you want to use them as standalone keys rather than mod-tap #define KC_HYPR HYPR(KC_NO) -- cgit v1.2.3 From 3717cf5864d6505e406b5eb75f315e6dc2392912 Mon Sep 17 00:00:00 2001 From: Erez Zukerman Date: Thu, 12 Jan 2017 07:38:07 -0500 Subject: A shot at aliasing --- quantum/quantum_keycodes.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 7466e185c..80cd1d41d 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -160,6 +160,7 @@ enum quantum_keycodes { #define LCAG(kc) (kc | QK_LCTL | QK_LALT | QK_LGUI) #define ALTG(kc) (kc | QK_RCTL | QK_RALT) #define SCMD(kc) (kc | QK_LGUI | QK_LSFT) +#define SWIN SCMD #define MOD_HYPR 0xf #define MOD_MEH 0x7 @@ -295,6 +296,7 @@ enum quantum_keycodes { #define LCAG_T(kc) MT((MOD_LCTL | MOD_LALT | MOD_LGUI), kc) // Left control alt and gui #define ALL_T(kc) MT((MOD_LCTL | MOD_LSFT | MOD_LALT | MOD_LGUI), kc) // see http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/ #define SCMD_T(kc) MT((MOD_LGUI | MOD_LSFT), kc) +#define SWIN_T SCMD_T // Dedicated keycode versions for Hyper and Meh, if you want to use them as standalone keys rather than mod-tap #define KC_HYPR HYPR(KC_NO) -- cgit v1.2.3 From b2419b31d3d4198192a1b5fb78b1c2e8ade0ce87 Mon Sep 17 00:00:00 2001 From: David Olsson Date: Thu, 12 Jan 2017 15:36:14 +0100 Subject: - Change docs to match keymap. - Switched around modifiers on the function layer to match muscle memory. - Added support for application switching. --- keyboards/atreus62/keymaps/mneme/README.md | 8 ++-- keyboards/atreus62/keymaps/mneme/img/fun.png | Bin 268634 -> 430634 bytes keyboards/atreus62/keymaps/mneme/keymap.c | 63 +++++++++++++++++++-------- 3 files changed, 50 insertions(+), 21 deletions(-) diff --git a/keyboards/atreus62/keymaps/mneme/README.md b/keyboards/atreus62/keymaps/mneme/README.md index 1461f6c52..5bac545fc 100644 --- a/keyboards/atreus62/keymaps/mneme/README.md +++ b/keyboards/atreus62/keymaps/mneme/README.md @@ -33,8 +33,7 @@ It's for Windows (current work forces me to) and Swedish (matter of birth) so ym - `LEAD s l` : `λ`. - `LEAD s s` : `¯\_(ツ)_/¯` - `LEAD s f` : `凸(ツ)凸` - - `LEAD f s` : `ctrl+s` - - `LEAD b d` : `ctrl+w` + - `LEAD a *` : Application switching based on position in start menu. Very specific to my computer. ## Nav layer @@ -48,7 +47,10 @@ by for the left. The latter because I tend to use `ctrl+arrows` quite a lot. ![Sym layer](img/sym.png) -Easy access to most symbols I use on a daily basis. Most common are on the home row, the rest are grouped as best as I could. +* Easy access to most symbols I use on a daily basis. Most common are on the home row, the rest are grouped as best as I could. + +- `eq` : Tapdance, produces `===` and `!==` +- `fun`: Tapdance, produces `=>` and `() => {\n` # License GPL-3+ diff --git a/keyboards/atreus62/keymaps/mneme/img/fun.png b/keyboards/atreus62/keymaps/mneme/img/fun.png index a58933d96..ec5a478c6 100644 Binary files a/keyboards/atreus62/keymaps/mneme/img/fun.png and b/keyboards/atreus62/keymaps/mneme/img/fun.png differ diff --git a/keyboards/atreus62/keymaps/mneme/keymap.c b/keyboards/atreus62/keymaps/mneme/keymap.c index eca452b77..7c1879982 100644 --- a/keyboards/atreus62/keymaps/mneme/keymap.c +++ b/keyboards/atreus62/keymaps/mneme/keymap.c @@ -4,7 +4,6 @@ #include "action_layer.h" #include "action_util.h" -//avrdude -p atmega32u4 -P /dev/tty.usbmodem1411 -c avr109 -U flash:w:atreus63_default.hex /* *WINDOWS SWEDISH */ @@ -101,19 +100,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = { { M(KF_11) ,M(KF_1) ,M(KF_2) ,M(KF_3) ,M(KF_4) ,M(KF_5) ,KC_NO ,M(KF_6) ,M(KF_7) ,M(KF_8) ,M(KF_9) ,M(KF_10) ,M(KF_12) }, - { KC_HYP ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_NO ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KN_AO }, + { KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_NO ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KN_AO }, { OSM_LCTL ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_NO ,KC_H ,KC_J ,KC_K ,KC_L ,KN_OE ,KN_AE }, { OSM_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_DELT ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KN_MINS ,OSM_LSFT }, - { MO(NAV) ,OSM_LCTL ,OSM_LALT ,KC_LGUI ,KC_SPC ,LT(SYM,KC_BSPC) ,KC_TAB ,LT(SYM,KC_ENT) ,KC_SPC ,KC_LEAD ,KC_LALT ,KC_LCTRL ,MO(NAV) } + { MO(NAV) ,OSM_LCTL ,OSM_LALT ,KC_LGUI ,KC_SPC ,LT(SYM,KC_BSPC) ,KC_HYP ,LT(SYM,KC_ENT) ,KC_SPC ,KC_LEAD ,KC_LALT ,KC_LCTRL ,MO(NAV) } }, [NAV] = { { 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 ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_NO ,KC_PGUP ,KC_HOME ,KC_UP ,KC_END ,KC_TRNS ,KC_TRNS }, - { KC_TRNS ,KC_TRNS ,KC_LSFT ,KC_LCTL ,KC_LALT ,KC_TRNS ,KC_NO ,KC_PGDN ,KC_LEFT ,KC_DOWN ,KC_RIGHT ,KC_TRNS ,KC_TRNS }, - { KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_F11 ,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_F12 ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_VOLD ,KC_VOLU } + { KC_TRNS ,KC_LSFT ,KC_LCTL ,KC_LALT ,KC_L ,KC_TRNS ,KC_NO ,KC_PGDN ,KC_LEFT ,KC_DOWN ,KC_RIGHT ,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 }, + { KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_VOLD ,KC_VOLU } }, [SYM] = { @@ -179,7 +178,6 @@ static void m_handle_kf (keyrecord_t *record, uint8_t id) { } const uint16_t PROGMEM fn_actions[] = { - }; const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) @@ -269,22 +267,51 @@ void matrix_scan_user(void) { unregister_code(KC_RGUI); }; - SEQ_TWO_KEYS(KC_F, KC_S){ - register_code(KC_LCTRL); - TAP_ONCE(KC_S); - unregister_code(KC_LCTRL); - }; - SEQ_TWO_KEYS(KC_B, KC_D){ - register_code(KC_LCTRL); - TAP_ONCE(KC_W); - unregister_code(KC_LCTRL); - }; + SEQ_TWO_KEYS (KC_A, KC_W) { + //Web - chrome + register_code (KC_LGUI); TAP_ONCE (KC_1); unregister_code (KC_LGUI); + } + SEQ_TWO_KEYS (KC_A, KC_P) { + //sPotify + register_code (KC_LGUI); TAP_ONCE (KC_2); unregister_code (KC_LGUI); + + } + SEQ_TWO_KEYS (KC_A, KC_T) { + //Total Commander + register_code (KC_LGUI); TAP_ONCE (KC_3); unregister_code (KC_LGUI); + + } + SEQ_TWO_KEYS (KC_A, KC_A) { + //Atom + register_code (KC_LGUI); TAP_ONCE (KC_4); unregister_code (KC_LGUI); + + } + SEQ_TWO_KEYS (KC_A, KC_E) { + //Emacs + register_code (KC_LGUI); TAP_ONCE (KC_5); unregister_code (KC_LGUI); + + } + SEQ_TWO_KEYS (KC_A, KC_C) { + //Cmdr + register_code (KC_LGUI); TAP_ONCE (KC_6); unregister_code (KC_LGUI); + + } + SEQ_TWO_KEYS (KC_A, KC_S) { + //Slack + register_code (KC_LGUI); TAP_ONCE (KC_7); unregister_code (KC_LGUI); + } + SEQ_TWO_KEYS (KC_S, KC_S) { // ¯\_(ツ)_/¯ unicode_input_start(); register_hex(0xaf); unicode_input_finish(); - register_code (KC_RALT); TAP_ONCE (KN_PLUS); unregister_code (KC_RALT); + register_code (KC_LALT); + register_code (KC_LCTL); + TAP_ONCE (KN_PLUS); + unregister_code (KC_LCTL); + unregister_code (KC_LALT); + register_code (KC_RSFT); TAP_ONCE (KC_8); unregister_code (KC_RSFT); unicode_input_start (); register_hex(0x30c4); unicode_input_finish(); register_code (KC_RSFT); TAP_ONCE (KC_9); TAP_ONCE(KC_7); unregister_code (KC_RSFT); -- cgit v1.2.3 From 236a0b0b6012d311a3ec048498dacdb1851327a0 Mon Sep 17 00:00:00 2001 From: David Olsson Date: Thu, 12 Jan 2017 16:00:09 +0100 Subject: Update makefile. Readme. --- keyboards/atreus62/keymaps/mneme/Makefile | 7 +++---- keyboards/atreus62/keymaps/mneme/README.md | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/keyboards/atreus62/keymaps/mneme/Makefile b/keyboards/atreus62/keymaps/mneme/Makefile index f20750dbc..046aec273 100644 --- a/keyboards/atreus62/keymaps/mneme/Makefile +++ b/keyboards/atreus62/keymaps/mneme/Makefile @@ -1,6 +1,5 @@ TAP_DANCE_ENABLE = yes -BOOTMAGIC_ENABLE = no -COMMAND_ENABLE = no -SLEEP_LED_ENABLE = no -UNICODE_ENABLE = yes NKRO_ENABLE = true +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = no diff --git a/keyboards/atreus62/keymaps/mneme/README.md b/keyboards/atreus62/keymaps/mneme/README.md index 5bac545fc..04ab070be 100644 --- a/keyboards/atreus62/keymaps/mneme/README.md +++ b/keyboards/atreus62/keymaps/mneme/README.md @@ -42,7 +42,7 @@ It's for Windows (current work forces me to) and Swedish (matter of birth) so ym Basic navigation on the right hand and modifiers close by for the left. The latter because I tend to use `ctrl+arrows` quite a lot. - + ## Sym layer ![Sym layer](img/sym.png) -- cgit v1.2.3 From c660d5f8140f7ebc9a4c8302992438026a85b61d Mon Sep 17 00:00:00 2001 From: kd0kkv Date: Fri, 13 Jan 2017 08:30:46 -0600 Subject: Update keymap.c Fixed the default querty layout to have a B button and just one F --- keyboards/tv44/keymaps/default/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/tv44/keymaps/default/keymap.c b/keyboards/tv44/keymaps/default/keymap.c index f3f989f2d..b9fe33a7c 100644 --- a/keyboards/tv44/keymaps/default/keymap.c +++ b/keyboards/tv44/keymaps/default/keymap.c @@ -30,7 +30,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QW] = { /* Qwerty */ {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC }, {MO(_L1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, MO(_L1) }, - {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_F, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(_L2) }, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(_L2) }, {KC_LCTL, MO(_L2), KC_LGUI, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, KC_RALT, KC_ESC, XXXXXXX, TG(_L3) } }, [_DV] = { /* Dvorak */ -- cgit v1.2.3 From c6299a785916d021dbfc2f533d059d7b0a51f121 Mon Sep 17 00:00:00 2001 From: Wojciech Siewierski Date: Sun, 18 Dec 2016 01:39:41 +0100 Subject: Update the vifon keymap --- keyboards/planck/keymaps/vifon/Makefile | 5 +---- keyboards/planck/keymaps/vifon/config.h | 5 +++++ keyboards/planck/keymaps/vifon/keymap.c | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/keyboards/planck/keymaps/vifon/Makefile b/keyboards/planck/keymaps/vifon/Makefile index 53660a2e7..15a7b736f 100644 --- a/keyboards/planck/keymaps/vifon/Makefile +++ b/keyboards/planck/keymaps/vifon/Makefile @@ -1,6 +1,3 @@ -# Please remove if no longer applicable -$(warning THIS FILE MAY BE TOO LARGE FOR YOUR KEYBOARD) -$(warning Please disable some options in the Makefile to resolve) # Build Options @@ -10,7 +7,7 @@ $(warning Please disable some options in the Makefile to resolve) BOOTMAGIC_ENABLE = yes # 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) +CONSOLE_ENABLE = no # 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 = yes # Enable keyboard backlight functionality diff --git a/keyboards/planck/keymaps/vifon/config.h b/keyboards/planck/keymaps/vifon/config.h index 9cb0634fb..a08b37cbe 100644 --- a/keyboards/planck/keymaps/vifon/config.h +++ b/keyboards/planck/keymaps/vifon/config.h @@ -81,6 +81,11 @@ along with this program. If not, see . /* prevent the modifiers from being stuck, sacrificing some memory */ #define PREVENT_STUCK_MODIFIERS +/* A larger buffer for the dynamic macros as this keymap is not taking + * up that much memory. + */ +#define DYNAMIC_MACRO_SIZE 256 + #ifdef SUBPROJECT_rev3 #include "rev3/config.h" #endif diff --git a/keyboards/planck/keymaps/vifon/keymap.c b/keyboards/planck/keymaps/vifon/keymap.c index 80c4a516c..ee0c0ac36 100644 --- a/keyboards/planck/keymaps/vifon/keymap.c +++ b/keyboards/planck/keymaps/vifon/keymap.c @@ -62,7 +62,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_PPG] = { /* Pure Pro: Gaming */ {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, DF(_RS), _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, {_______, _______, XXXXXXX, _______, KM_RS , _______, _______, KM_LW , _______, _______, _______, _______}, }, [_NM] = { /* Numeric */ @@ -90,7 +90,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {_______, _______, KC_LGUI, KC_LALT, _______, _______, _______, _______, _______, _______, _______, _______} }, [_DYN]= { /* special */ - {_______, DYN_REC_START1, DYN_MACRO_PLAY1, _______, _______, _______, _______, _______, KC_INS, _______, KC_PSCR, KC_PAUS}, + {_______, DYN_REC_START1, DYN_MACRO_PLAY1, _______, _______, _______, _______, KC_APP, KC_INS, _______, KC_PSCR, KC_PAUS}, {_______, DYN_REC_START2, DYN_MACRO_PLAY2, _______, _______, _______, _______, _______, _______, KC_CAPS, KC_SLCK, KC_NLCK}, {KM_SHLK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -- cgit v1.2.3 From 7288e5ab9c005a7b035d91e68358aa2b6a12420c Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Fri, 13 Jan 2017 14:04:51 -0500 Subject: Update quantum_keycodes.h --- quantum/quantum_keycodes.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 80cd1d41d..4853655f9 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -160,7 +160,7 @@ enum quantum_keycodes { #define LCAG(kc) (kc | QK_LCTL | QK_LALT | QK_LGUI) #define ALTG(kc) (kc | QK_RCTL | QK_RALT) #define SCMD(kc) (kc | QK_LGUI | QK_LSFT) -#define SWIN SCMD +#define SWIN(kc) SCMD(kc) #define MOD_HYPR 0xf #define MOD_MEH 0x7 @@ -296,7 +296,7 @@ enum quantum_keycodes { #define LCAG_T(kc) MT((MOD_LCTL | MOD_LALT | MOD_LGUI), kc) // Left control alt and gui #define ALL_T(kc) MT((MOD_LCTL | MOD_LSFT | MOD_LALT | MOD_LGUI), kc) // see http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/ #define SCMD_T(kc) MT((MOD_LGUI | MOD_LSFT), kc) -#define SWIN_T SCMD_T +#define SWIN_T(kc) SCMD_T(kc) // Dedicated keycode versions for Hyper and Meh, if you want to use them as standalone keys rather than mod-tap #define KC_HYPR HYPR(KC_NO) -- cgit v1.2.3 From aa0939b5ef410e3003cc52383046a5d2dd0744f5 Mon Sep 17 00:00:00 2001 From: Bryan Hernandez Date: Fri, 13 Jan 2017 21:35:09 -0600 Subject: Added Bryan's keymap --- keyboards/ergodox/keymaps/bryan/keymap.c | 226 +++++++++++++++++++++++++++++++ 1 file changed, 226 insertions(+) create mode 100644 keyboards/ergodox/keymaps/bryan/keymap.c diff --git a/keyboards/ergodox/keymaps/bryan/keymap.c b/keyboards/ergodox/keymaps/bryan/keymap.c new file mode 100644 index 000000000..572cea8cd --- /dev/null +++ b/keyboards/ergodox/keymaps/bryan/keymap.c @@ -0,0 +1,226 @@ +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" +#include "version.h" + +#define BASE 0 // default layer +#define SYMB 1 // symbols +#define MDIA 2 // media keys + +enum custom_keycodes { + PLACEHOLDER = SAFE_RANGE, // can always be here + EPRM, + VRSN, + RGB_SLD +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * ,--------------------------------------------------------. ,--------------------------------------------------------. + * | = | 1 | 2 | 3 | 4 | 5 | Cmd,Shft,[ | | Cmd,Shft,] | 6 | 7 | 8 | 9 | 0 | - | + * |--------+------+------+------+------+-------------------| |------------+------+------+------+------+------+--------| + * | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * |BkSp/Cmd| A | S | D | F | G |------------| |------------| H | J | K | L |; / L2|' / Cmd | + * |--------+------+------+------+------+------| Hyper | | Meh |------+------+------+------+------+--------| + * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | + * `--------+------+------+------+------+-------------------' `-------------+------+------+------+------+--------' + * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * |Ctrl/Esc|PgUp| | App | LGui | + * ,------|------|------| |------+--------+------. + * | | | PgDn | | Home | | | + * | Space|Backsp|------| |------| Tab |Enter | + * | |ace | Esc | | Alt | | | + * `--------------------' `----------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[BASE] = KEYMAP( // layer 0 : default + // left hand + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, M(2), + KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), + GUI_T(KC_BSPC), KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), + LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, + CTL_T(KC_ESC),KC_PGUP, + KC_PGDN, + KC_SPC,KC_BSPC, KC_ESC, + // right hand + M(3), 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, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), + MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + + ALT_T(KC_APP), KC_LGUI, + KC_HOME, + KC_LALT,KC_TAB, KC_ENT + ), +/* Keymap 1: Symbol Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | % | ^ | [ | ] | ~ | | | | <- | 1 | 2 | 3 | \ | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | . | 0 | = | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[SYMB] = KEYMAP( + // left hand + KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, + KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV, + KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + // right hand + KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, + KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS, + KC_TRNS, M(1), KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, + KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +// KC_COMM, KC_MINS + +/* Keymap 2: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | MsUp | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | Prev | Next | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | |Brwser| + * | | |------| |------| |Back | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// MEDIA AND MOUSE +[MDIA] = KEYMAP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_WBAK +), +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + break; + case 1: + if (record->event.pressed) { // For resetting EEPROM + eeconfig_init(); + } + break; + } + return MACRO_NONE; +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + // dynamically generate these. + case EPRM: + if (record->event.pressed) { + eeconfig_init(); + } + return false; + break; + case VRSN: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + break; + case RGB_SLD: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + rgblight_mode(1); + #endif + } + return false; + break; + } + return true; +} + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + // TODO: Make this relevant to the ErgoDox EZ. + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + default: + // none + break; + } + +}; -- cgit v1.2.3 From b56ec38d5ccc10e6e0b2ff6e7e859bbae3cb9610 Mon Sep 17 00:00:00 2001 From: Jason Milkins Date: Sun, 15 Jan 2017 14:08:17 +0800 Subject: Typo fix --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 90584cabc..d33c3ad01 100644 --- a/readme.md +++ b/readme.md @@ -31,7 +31,7 @@ The OLKB product firmwares are maintained by [Jack Humbert](https://github.com/j This is not a tiny project. While this is the main readme, there are many other files you might want to consult. Here are some points of interest: -* [**The Wiki**](https://github.com/jackhumbert/qmk_firmware/wiki) - the entirity of the readme has been moved here +* [**The Wiki**](https://github.com/jackhumbert/qmk_firmware/wiki) - the entirety of the readme has been moved here * The readme for your own keyboard: This is found under `keyboards//`. So for the ErgoDox EZ, it's [here](keyboards/ergodox/ez/); for the Planck, it's [here](keyboards/planck/) and so on. * The list of possible keycodes you can use in your keymap is actually spread out in a few different places: * [doc/keycode.txt](doc/keycode.txt) - an explanation of those same keycodes. -- cgit v1.2.3 From 6f44ca7a59d60e20c1d35e8edc916571f5fe40ef Mon Sep 17 00:00:00 2001 From: SjB Date: Sun, 15 Jan 2017 23:12:42 -0500 Subject: oneshot timeout would only timeout after an event. After setting a ONESHOT_TIMEOUT value, the oneshot layer state would not expire without an event being triggered (key pressed). The reason was that in the process_record function we would return priort to execute the process_action function if it detected a NOEVENT cycle. The process_action contained the codes to timeout the oneshot layer state. The codes to clear the oneshot layer state have been move just in front of where we check for the NOEVENT cycle in the process_record function. --- tmk_core/common/action.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index d485b46c7..a77177240 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c @@ -102,6 +102,13 @@ bool process_record_quantum(keyrecord_t *record) { void process_record(keyrecord_t *record) { +#if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) + if (has_oneshot_layer_timed_out()) { + dprintf("Oneshot layer: timeout\n"); + clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); + } +#endif + if (IS_NOEVENT(record->event)) { return; } if(!process_record_quantum(record)) @@ -126,13 +133,6 @@ void process_action(keyrecord_t *record, action_t action) uint8_t tap_count = record->tap.count; #endif -#if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) - if (has_oneshot_layer_timed_out()) { - dprintf("Oneshot layer: timeout\n"); - clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); - } -#endif - if (event.pressed) { // clear the potential weak mods left by previously pressed keys clear_weak_mods(); -- cgit v1.2.3 From a37e924e368d9c151a0ee307c982ae5a820a441c Mon Sep 17 00:00:00 2001 From: David Olsson Date: Mon, 16 Jan 2017 21:10:25 +0100 Subject: vi style arrow keys. Live unicode switch support --- keyboards/atreus62/keymaps/mneme/keymap.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/keyboards/atreus62/keymaps/mneme/keymap.c b/keyboards/atreus62/keymaps/mneme/keymap.c index 7c1879982..263e01f0e 100644 --- a/keyboards/atreus62/keymaps/mneme/keymap.c +++ b/keyboards/atreus62/keymaps/mneme/keymap.c @@ -85,16 +85,10 @@ enum { TD_EQ }; -//Custom keycodes -enum { - PLACEHOLDER = SAFE_RANGE -}; - //State and timers uint16_t kf_timers[12]; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = { @@ -109,8 +103,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [NAV] = { { 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 ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_NO ,KC_PGUP ,KC_HOME ,KC_UP ,KC_END ,KC_TRNS ,KC_TRNS }, - { KC_TRNS ,KC_LSFT ,KC_LCTL ,KC_LALT ,KC_L ,KC_TRNS ,KC_NO ,KC_PGDN ,KC_LEFT ,KC_DOWN ,KC_RIGHT ,KC_TRNS ,KC_TRNS }, + { KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_NO ,KC_HOME ,KC_PGDN ,KC_PGUP ,KC_END ,KC_TRNS ,KC_TRNS }, + { KC_TRNS ,KC_LSFT ,KC_LCTL ,KC_LALT ,KC_L ,KC_TRNS ,KC_NO ,KC_LEFT ,KC_DOWN ,KC_UP ,KC_RIGHT ,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 }, { KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_VOLD ,KC_VOLU } @@ -302,6 +296,15 @@ void matrix_scan_user(void) { register_code (KC_LGUI); TAP_ONCE (KC_7); unregister_code (KC_LGUI); } + SEQ_TWO_KEYS (KC_U, KC_L) { + set_unicode_input_mode(UC_LNX); + } + + + SEQ_TWO_KEYS (KC_U, KC_W) { + set_unicode_input_mode(UC_WINC); + } + SEQ_TWO_KEYS (KC_S, KC_S) { // ¯\_(ツ)_/¯ -- cgit v1.2.3 From 53382d9564a74ac6babfc4445e575c3de6d2bf98 Mon Sep 17 00:00:00 2001 From: David Olsson Date: Mon, 16 Jan 2017 21:31:44 +0100 Subject: whitespace fixes --- keyboards/atreus62/keymaps/mneme/keymap.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/keyboards/atreus62/keymaps/mneme/keymap.c b/keyboards/atreus62/keymaps/mneme/keymap.c index 263e01f0e..41075f9c2 100644 --- a/keyboards/atreus62/keymaps/mneme/keymap.c +++ b/keyboards/atreus62/keymaps/mneme/keymap.c @@ -21,7 +21,9 @@ #define KN_DQT LSFT(KC_2) // " #define KN_AT RALT(KC_2) // @ #define KN_HASH LSFT(KC_3) // # -#define KN_DLR RALT(KC_4) // $ +#define KN_DLR LALT(KC_4) // $ +#define KN_EUR LSFT(KC_4) // $ + #define KN_PERC LSFT(KC_5) // % #define KN_AMPR LSFT(KC_6) // & #define KN_SLSH LSFT(KC_7) // / @@ -31,19 +33,19 @@ #define KN_UNDS LSFT(KN_MINS) // _ #define KN_QUES LSFT(KN_PLUS) // ? #define KN_GRAV LSFT(KN_ACUT) // ` -#define KN_LCBR RALT(KC_7) // { -#define KN_RCBR RALT(KC_0) // } -#define KN_LBRC RALT(KC_8) // [ -#define KN_RBRC RALT(KC_9) // ] +#define KN_LCBR LALT(KC_7) // { +#define KN_RCBR LALT(KC_0) // } +#define KN_LBRC LALT(KC_8) // [ +#define KN_RBRC LALT(KC_9) // ] #define KN_RABK LSFT(KN_LABK) // < #define KN_COLN LSFT(KC_DOT) // : #define KN_SCLN LSFT(KC_COMM) // : -#define KN_PIPE RALT(KN_LABK) // | +#define KN_PIPE LALT(KN_LABK) // | #define KN_QUES LSFT(KN_PLUS) // ? #define KN_CIRC LSFT(KN_UMLA) // ^ #define KN_ASTR LSFT(KN_QUOT) // * -#define KN_TILD RALT(KN_UMLA) // ~ -#define KN_BSLS RALT(KN_PLUS) // +#define KN_TILD LALT(KN_UMLA) // ~ +#define KN_BSLS LALT(KN_PLUS) // #define OSM_LCTL OSM(MOD_LCTL) #define OSM_LALT OSM(MOD_LALT) @@ -113,8 +115,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { { KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,TD(TD_EQ) ,KC_NO ,TD(TD_FUN) ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS }, { KC_TRNS ,KN_LABK ,KN_RABK ,KN_LCBR ,KN_RCBR ,KN_PLUS ,KC_NO ,KN_AT ,KN_DQT ,KN_QUOT ,KN_GRAV ,KN_SLSH ,KC_TRNS }, - { KC_TRNS ,KN_EXLM ,KN_EQL ,KN_LPRN ,KN_RPRN ,KN_MINS ,KC_NO ,KN_UNDS ,KN_SCLN ,KN_COLN ,KN_AMPR ,KN_PIPE ,KC_TRNS }, - { KC_TRNS ,KN_DLR ,KN_PERC ,KN_LBRC ,KN_RBRC ,KN_ASTR ,KC_TRNS ,KN_HASH ,KC_COMM ,KC_DOT ,KN_QUES ,KN_BSLS ,KC_TRNS }, + { KC_TRNS ,KN_EXLM ,KN_EQL ,KN_LPRN ,KN_RPRN ,KN_MINS ,KC_NO ,KN_UNDS ,KN_CIRC ,KN_DLR ,KN_AMPR ,KN_PIPE ,KC_TRNS }, + { KC_TRNS ,KN_EUR ,KN_PERC ,KN_LBRC ,KN_RBRC ,KN_ASTR ,KC_TRNS ,KN_HASH ,KN_SCLN ,KN_COLN ,KN_QUES ,KN_BSLS ,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 } } -- cgit v1.2.3 From 1ac15e6b3a6c43669d5b107e4ca550d2aa7c284c Mon Sep 17 00:00:00 2001 From: lucwastiaux Date: Tue, 17 Jan 2017 20:34:05 +0800 Subject: put shell nav under tab, introduce an OSL for the brackets layer --- keyboards/ergodox/keymaps/dvorak_programmer/keymap.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c index 3d7e1893c..2a64331db 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c +++ b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c @@ -58,18 +58,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = KEYMAP( // layer 0 : default // left hand KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, - LT(MOUSE,KC_TAB), KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, MO(KEY_SEL), - MO(SHELL_NAV), KC_A, KC_O, KC_E, KC_U, KC_I, + LT(SHELL_NAV,KC_TAB), KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, MO(KEY_SEL), + OSL(BRACKETS), KC_A, KC_O, KC_E, KC_U, KC_I, KC_FN3, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, MO(KEY_NAV), OSL(SHORTCUTS),KC_FN4, KC_FN5,OSL(SYMBOL),MO(NUMBER), // thumb cluster - MO(BRACKETS), RCTL(KC_S), + MO(MOUSE), RCTL(KC_S), RCTL(KC_DEL), KC_BSPC,RCTL(KC_BSPC),KC_DEL, // right hand KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSLS, KC_PGUP, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, - KC_D, KC_H, KC_T, KC_N, KC_S, LT(BRACKETS,KC_MINS), + KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_PGDN, KC_B, KC_M, KC_W, KC_V, KC_Z, TD(TD_SHIFT_CAPSLOCK), // lower keys - browser tab control RSFT(RCTL(KC_TAB)), RCTL(KC_TAB), RCTL(KC_T), LALT(KC_LEFT), RCTL(KC_W), @@ -406,6 +406,7 @@ void matrix_scan_user(void) { switch (layer) { case NUMBER: case SYMBOL: + case BRACKETS: ergodox_right_led_2_on(); break; case KEY_NAV: -- cgit v1.2.3 From d910b94a3c9101dbe89a877236346ede1751c0da Mon Sep 17 00:00:00 2001 From: David Olsson Date: Tue, 17 Jan 2017 19:33:09 +0100 Subject: Don't change ralt to lalt, it's really not the same thing on windows. --- keyboards/atreus62/keymaps/mneme/keymap.c | 80 ++++++++++++++++--------------- 1 file changed, 41 insertions(+), 39 deletions(-) diff --git a/keyboards/atreus62/keymaps/mneme/keymap.c b/keyboards/atreus62/keymaps/mneme/keymap.c index 41075f9c2..46edd2e08 100644 --- a/keyboards/atreus62/keymaps/mneme/keymap.c +++ b/keyboards/atreus62/keymaps/mneme/keymap.c @@ -7,45 +7,47 @@ /* *WINDOWS SWEDISH */ -#define KN_HALF KC_GRV // 1/2 -#define KN_PLUS KC_MINS // + -#define KN_ACUT KC_EQL // ´ -#define KN_AO KC_LBRC // Å -#define KN_UMLA KC_RBRC // ¨ -#define KN_OE KC_SCLN // Ö -#define KN_AE KC_QUOT // Ä -#define KN_QUOT KC_NUHS // ' -#define KN_LABK KC_NUBS // < -#define KN_MINS KC_SLSH // - -#define KN_EXLM LSFT(KC_1) // ! -#define KN_DQT LSFT(KC_2) // " -#define KN_AT RALT(KC_2) // @ -#define KN_HASH LSFT(KC_3) // # -#define KN_DLR LALT(KC_4) // $ -#define KN_EUR LSFT(KC_4) // $ - -#define KN_PERC LSFT(KC_5) // % -#define KN_AMPR LSFT(KC_6) // & -#define KN_SLSH LSFT(KC_7) // / -#define KN_LPRN LSFT(KC_8) // ( -#define KN_RPRN LSFT(KC_9) // ) -#define KN_EQL LSFT(KC_0) // = -#define KN_UNDS LSFT(KN_MINS) // _ -#define KN_QUES LSFT(KN_PLUS) // ? -#define KN_GRAV LSFT(KN_ACUT) // ` -#define KN_LCBR LALT(KC_7) // { -#define KN_RCBR LALT(KC_0) // } -#define KN_LBRC LALT(KC_8) // [ -#define KN_RBRC LALT(KC_9) // ] -#define KN_RABK LSFT(KN_LABK) // < -#define KN_COLN LSFT(KC_DOT) // : -#define KN_SCLN LSFT(KC_COMM) // : -#define KN_PIPE LALT(KN_LABK) // | -#define KN_QUES LSFT(KN_PLUS) // ? -#define KN_CIRC LSFT(KN_UMLA) // ^ -#define KN_ASTR LSFT(KN_QUOT) // * -#define KN_TILD LALT(KN_UMLA) // ~ -#define KN_BSLS LALT(KN_PLUS) // + /* + *WINDOWS SWEDISH + */ + #define KN_HALF KC_GRV // 1/2 + #define KN_PLUS KC_MINS // + + #define KN_ACUT KC_EQL // ´ + #define KN_AO KC_LBRC // Å + #define KN_UMLA KC_RBRC // ¨ + #define KN_OE KC_SCLN // Ö + #define KN_AE KC_QUOT // Ä + #define KN_QUOT KC_NUHS // ' + #define KN_LABK KC_NUBS // < + #define KN_MINS KC_SLSH // - + #define KN_EXLM LSFT(KC_1) // ! + #define KN_DQT LSFT(KC_2) // " + #define KN_AT RALT(KC_2) // @ + #define KN_HASH LSFT(KC_3) // # + #define KN_EUR LSFT(KC_4) // € + #define KN_DLR RALT(KC_4) // $ + #define KN_PERC LSFT(KC_5) // % + #define KN_AMPR LSFT(KC_6) // & + #define KN_SLSH LSFT(KC_7) // / + #define KN_LPRN LSFT(KC_8) // ( + #define KN_RPRN LSFT(KC_9) // ) + #define KN_EQL LSFT(KC_0) // = + #define KN_UNDS LSFT(KN_MINS) // _ + #define KN_QUES LSFT(KN_PLUS) // ? + #define KN_GRAV LSFT(KN_ACUT) // ` + #define KN_LCBR RALT(KC_7) // { + #define KN_RCBR RALT(KC_0) // } + #define KN_LBRC RALT(KC_8) // [ + #define KN_RBRC RALT(KC_9) // ] + #define KN_RABK LSFT(KN_LABK) // < + #define KN_COLN LSFT(KC_DOT) // : + #define KN_SCLN LSFT(KC_COMM) // : + #define KN_PIPE RALT(KN_LABK) // | + #define KN_QUES LSFT(KN_PLUS) // ? + #define KN_CIRC LSFT(KN_UMLA) // ^ + #define KN_ASTR LSFT(KN_QUOT) // * + #define KN_TILD RALT(KN_UMLA) // ~ + #define KN_BSLS RALT(KN_PLUS) // #define OSM_LCTL OSM(MOD_LCTL) #define OSM_LALT OSM(MOD_LALT) -- cgit v1.2.3 From 0815c7ae17cc19007c2074d178cb27476c5c6b83 Mon Sep 17 00:00:00 2001 From: Mitch Lloyd Date: Tue, 17 Jan 2017 12:48:58 -0800 Subject: Update mitch layout for new keymaps --- keyboards/planck/keymaps/mitch/Makefile | 5 ++ keyboards/planck/keymaps/mitch/config.h | 2 + keyboards/planck/keymaps/mitch/keymap.c | 70 ++++++++++++++++++++++ keyboards/planck/keymaps/mitch/readme.md | 26 ++++++++ .../old_keymap_files/common_keymaps/keymap_mitch.c | 49 --------------- 5 files changed, 103 insertions(+), 49 deletions(-) create mode 100644 keyboards/planck/keymaps/mitch/Makefile create mode 100644 keyboards/planck/keymaps/mitch/config.h create mode 100644 keyboards/planck/keymaps/mitch/keymap.c create mode 100644 keyboards/planck/keymaps/mitch/readme.md delete mode 100644 keyboards/planck/old_keymap_files/common_keymaps/keymap_mitch.c diff --git a/keyboards/planck/keymaps/mitch/Makefile b/keyboards/planck/keymaps/mitch/Makefile new file mode 100644 index 000000000..7955003d4 --- /dev/null +++ b/keyboards/planck/keymaps/mitch/Makefile @@ -0,0 +1,5 @@ +SUBPROJECT = rev3 + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/planck/keymaps/mitch/config.h b/keyboards/planck/keymaps/mitch/config.h new file mode 100644 index 000000000..73bc50bc2 --- /dev/null +++ b/keyboards/planck/keymaps/mitch/config.h @@ -0,0 +1,2 @@ +#include "../../config.h" +#define PREVENT_STUCK_MODIFIERS diff --git a/keyboards/planck/keymaps/mitch/keymap.c b/keyboards/planck/keymaps/mitch/keymap.c new file mode 100644 index 000000000..79b5204f0 --- /dev/null +++ b/keyboards/planck/keymaps/mitch/keymap.c @@ -0,0 +1,70 @@ +#include "keymap.h" +#include "quantum.h" + +#define QWERTY 0 +#define LOWER 1 +#define RAISE 2 + +// Alias to make layering more clear +#define _______ KC_TRNS + +// In MacOS, switch between windows within an application +#define GUI_GRV LGUI(KC_GRV) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Ctl | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | Del | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[QWERTY] = { + {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, + {KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_RSFT, KC_ENT) }, + {KC_ESC, KC_DEL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | GUIGR| | | | | | | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Caps | | Mute | Vol- | Vol+ | | Bksp | $ | % | ^ | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | ! | @ | # | \ |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | Enter | | | PgUp | PgUn | | + * `-----------------------------------------------------------------------------------' + */ +[LOWER] = { + {GUI_GRV, _______, _______, _______, _______, _______, _______, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, + {KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, KC_BSPC, KC_DLR, KC_PERC, KC_CIRC, KC_PIPE, KC_PIPE}, + {_______, _______, _______, _______, _______, _______, _______, KC_EXLM, KC_AT, KC_HASH, KC_BSLS, KC_ENT}, + {_______, _______, _______, _______, _______, KC_ENT, KC_ENT, _______, _______, KC_PGDN, KC_PGUP, _______} +}, + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | ` | ~ | ( | ) | | | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | [ | ] | { | } | | | 4 | 5 | 6 | | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | - | _ | = | + | | | 1 | 2 | 3 | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | Enter | | | | | | + * `-----------------------------------------------------------------------------------' + */ + +[RAISE] = { + {KC_GRV, KC_GRV, KC_TILD, KC_LPRN, KC_RPRN, _______, _______, KC_7, KC_8, KC_9, KC_0, _______}, + {_______, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, _______, _______, KC_4, KC_5, KC_6, _______, KC_BSLS}, + {_______, KC_MINS, KC_UNDS, KC_EQL, KC_PLUS, _______, _______, KC_1, KC_2, KC_3, _______, KC_ENT}, + {_______, _______, _______, _______, _______, KC_ENT, KC_ENT, _______, _______, KC_PGDN, KC_PGUP, _______} +} +}; diff --git a/keyboards/planck/keymaps/mitch/readme.md b/keyboards/planck/keymaps/mitch/readme.md new file mode 100644 index 000000000..3869304f4 --- /dev/null +++ b/keyboards/planck/keymaps/mitch/readme.md @@ -0,0 +1,26 @@ +## Flashing Keyboard + +1. Install `dfu` tools: + + brew tap osx-cross/avr + brew install avr-libc + brew install dfu-programmer + +2. Move to this directory. +3. Hit the reset button on the keyboard. +4. run `make dfu`. + +## The Keymap + +This keymap is designed for a rev3 Planck Keyboard. + +The default layer is QWERTY. The raise layer has a ten key on the right +and common programming punctuation on the left. The lower layer provides the +rest of the symbols, mostly mapped with the ten key numbers. + +The normal right shift key uses the `MT` macro to trigger Enter on tap and right +shift when held. + +This keymap sets the `PREVENT_STUCK_MODIFIERS` flag to avoid the occasional WTF +moments when using a modifier keys and accidentally releasing them after moving +to a new layer. diff --git a/keyboards/planck/old_keymap_files/common_keymaps/keymap_mitch.c b/keyboards/planck/old_keymap_files/common_keymaps/keymap_mitch.c deleted file mode 100644 index e5a86b402..000000000 --- a/keyboards/planck/old_keymap_files/common_keymaps/keymap_mitch.c +++ /dev/null @@ -1,49 +0,0 @@ -#include "keymap.h" - -const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = KEYMAP( - TAB, Q, W, E, R, T, Y, U, I, O, P, BSPC, - LCTL, A, S, D, F, G, H, J, K, L, SCLN, QUOT, - LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, FN3, - ESC, DEL, LALT, LGUI, FN2, SPC, FN1, LEFT, DOWN, UP, RGHT), -[1] = KEYMAP( - GRV, GRV, FN22, FN19, FN10, TRNS, TRNS, 7, 8, 9, 0, BSPC, - TRNS, LBRC, RBRC, FN23, FN24, TRNS, TRNS, 4, 5, 6, TRNS, BSLS, - TRNS, MINS, FN20, EQL, FN21, TRNS, TRNS, 1, 2, 3, TRNS, ENT, - TRNS, TRNS, TRNS, TRNS, TRNS, SPC, FN1, TRNS, PGDN, PGUP, TRNS), -[2] = KEYMAP( - FN26, FN10, FN11, FN12, FN13, FN14, FN15, FN17, FN18, FN19, FN10, DEL, - TRNS, TRNS, MUTE, VOLD, VOLU, TRNS, BSPC, FN14, FN15, FN16, TRNS, FN25, - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, FN11, FN12, FN13, TRNS, ENT, - TRNS, TRNS, TRNS, TRNS, FN2, ENT, TRNS, TRNS, PGDN, PGUP, TRNS), -}; - -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_MOMENTARY(1), // Switch layer raise - [2] = ACTION_LAYER_MOMENTARY(2), // Switch layer lower - - [3] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), // Right shift serves as Enter on tap - - // Numeric shift modifiers - [10] = ACTION_MODS_KEY(MOD_LSFT, KC_0), - [11] = ACTION_MODS_KEY(MOD_LSFT, KC_1), - [12] = ACTION_MODS_KEY(MOD_LSFT, KC_2), - [13] = ACTION_MODS_KEY(MOD_LSFT, KC_3), - [14] = ACTION_MODS_KEY(MOD_LSFT, KC_4), - [15] = ACTION_MODS_KEY(MOD_LSFT, KC_5), - [16] = ACTION_MODS_KEY(MOD_LSFT, KC_6), - [17] = ACTION_MODS_KEY(MOD_LSFT, KC_7), - [18] = ACTION_MODS_KEY(MOD_LSFT, KC_8), - [19] = ACTION_MODS_KEY(MOD_LSFT, KC_9), - - // Other shift modifiers - [20] = ACTION_MODS_KEY(MOD_LSFT, KC_MINS), // _ - [21] = ACTION_MODS_KEY(MOD_LSFT, KC_EQL), // + - [22] = ACTION_MODS_KEY(MOD_LSFT, KC_GRV), // ~ - [23] = ACTION_MODS_KEY(MOD_LSFT, KC_LBRC), // { - [24] = ACTION_MODS_KEY(MOD_LSFT, KC_RBRC), // } - [25] = ACTION_MODS_KEY(MOD_LSFT, KC_BSLS), // | - - // Switch windows in app - [26] = ACTION_MODS_KEY(MOD_LGUI, KC_GRV), -}; -- cgit v1.2.3 From 9eb8d05246fba4f46c04b8fa1884b8f2d2ee0664 Mon Sep 17 00:00:00 2001 From: SjB Date: Tue, 17 Jan 2017 21:47:07 -0500 Subject: added mods status bit to visualizer. Since we can't read the real_mods and oneshot_mods static variable directly within the update_user_visualizer_state function (Threading and serial link). We are know storing the mods states in the visualizer_keyboard_status_t structure. We can now display the status of the modifier keys on the LCD display. --- quantum/visualizer/visualizer.c | 58 ++++++++++++++++++++++++++++++++++++++++- quantum/visualizer/visualizer.h | 9 ++++++- tmk_core/common/keyboard.c | 2 +- 3 files changed, 66 insertions(+), 3 deletions(-) diff --git a/quantum/visualizer/visualizer.c b/quantum/visualizer/visualizer.c index 54f6faaa4..5826d909e 100644 --- a/quantum/visualizer/visualizer.c +++ b/quantum/visualizer/visualizer.c @@ -53,10 +53,13 @@ SOFTWARE. #define "Visualizer thread priority not defined" #endif +// mods status +#include "action_util.h" static visualizer_keyboard_status_t current_status = { .layer = 0xFFFFFFFF, .default_layer = 0xFFFFFFFF, + .mods = 0xFF, .leds = 0xFFFFFFFF, .suspended = false, }; @@ -64,6 +67,7 @@ static visualizer_keyboard_status_t current_status = { static bool same_status(visualizer_keyboard_status_t* status1, visualizer_keyboard_status_t* status2) { return status1->layer == status2->layer && status1->default_layer == status2->default_layer && + status1->mods == status2->mods && status1->leds == status2->leds && status1->suspended == status2->suspended; } @@ -307,6 +311,45 @@ bool keyframe_display_layer_bitmap(keyframe_animation_t* animation, visualizer_s gdispFlush(); return false; } + +static void format_mods_bitmap_string(uint8_t mods, char* buffer) { + *buffer = ' '; + ++buffer; + + for (int i = 0; i<8; i++) + { + uint32_t mask = (1u << i); + if (mods & mask) { + *buffer = '1'; + } else { + *buffer = '0'; + } + ++buffer; + + if (i==3) { + *buffer = ' '; + ++buffer; + } + } + *buffer = 0; +} + +bool keyframe_display_mods_bitmap(keyframe_animation_t* animation, visualizer_state_t* state) { + (void)animation; + + const char* title = "Modifier states"; + const char* mods_header = " CSAG CSAG "; + char status_buffer[12]; + + gdispClear(White); + gdispDrawString(0, 0, title, state->font_fixed5x8, Black); + gdispDrawString(0, 10, mods_header, state->font_fixed5x8, Black); + format_mods_bitmap_string(state->status.mods, status_buffer); + gdispDrawString(0, 20, status_buffer, state->font_fixed5x8, Black); + + gdispFlush(); + return false; +} #endif // LCD_ENABLE bool keyframe_disable_lcd_and_backlight(keyframe_animation_t* animation, visualizer_state_t* state) { @@ -350,6 +393,7 @@ static DECLARE_THREAD_FUNCTION(visualizerThread, arg) { visualizer_keyboard_status_t initial_status = { .default_layer = 0xFFFFFFFF, .layer = 0xFFFFFFFF, + .mods = 0xFF, .leds = 0xFFFFFFFF, .suspended = false, }; @@ -499,7 +543,18 @@ void update_status(bool changed) { #endif } -void visualizer_update(uint32_t default_state, uint32_t state, uint32_t leds) { +uint8_t visualizer_get_mods() { + uint8_t mods = get_mods(); + +#ifndef NO_ACTION_ONESHOT + if (!has_oneshot_mods_timed_out()) { + mods |= get_oneshot_mods(); + } +#endif + return mods; +} + +void visualizer_update(uint32_t default_state, uint32_t state, uint8_t mods, uint32_t leds) { // Note that there's a small race condition here, the thread could read // a state where one of these are set but not the other. But this should // not really matter as it will be fixed during the next loop step. @@ -523,6 +578,7 @@ void visualizer_update(uint32_t default_state, uint32_t state, uint32_t leds) { visualizer_keyboard_status_t new_status = { .layer = state, .default_layer = default_state, + .mods = mods, .leds = leds, .suspended = current_status.suspended, }; diff --git a/quantum/visualizer/visualizer.h b/quantum/visualizer/visualizer.h index 53e250725..315af5022 100644 --- a/quantum/visualizer/visualizer.h +++ b/quantum/visualizer/visualizer.h @@ -34,10 +34,14 @@ SOFTWARE. #include "lcd_backlight.h" #endif +// use this function to merget both real_mods and oneshot_mods in a uint16_t +uint8_t visualizer_get_mods(void); + // This need to be called once at the start void visualizer_init(void); // This should be called at every matrix scan -void visualizer_update(uint32_t default_state, uint32_t state, uint32_t leds); +void visualizer_update(uint32_t default_state, uint32_t state, uint8_t mods, uint32_t leds); + // This should be called when the keyboard goes to suspend state void visualizer_suspend(void); // This should be called when the keyboard wakes up from suspend state @@ -61,6 +65,7 @@ struct keyframe_animation_t; typedef struct { uint32_t layer; uint32_t default_layer; + uint8_t mods; uint32_t leds; // See led.h for available statuses bool suspended; } visualizer_keyboard_status_t; @@ -129,6 +134,8 @@ bool keyframe_set_backlight_color(keyframe_animation_t* animation, visualizer_st bool keyframe_display_layer_text(keyframe_animation_t* animation, visualizer_state_t* state); // Displays a bitmap (0/1) of all the currently active layers bool keyframe_display_layer_bitmap(keyframe_animation_t* animation, visualizer_state_t* state); +// Displays a bitmap (0/1) of all the currently active mods +bool keyframe_display_mods_bitmap(keyframe_animation_t* animation, visualizer_state_t* state); bool keyframe_disable_lcd_and_backlight(keyframe_animation_t* animation, visualizer_state_t* state); bool keyframe_enable_lcd_and_backlight(keyframe_animation_t* animation, visualizer_state_t* state); diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c index 371d93f3e..765350792 100644 --- a/tmk_core/common/keyboard.c +++ b/tmk_core/common/keyboard.c @@ -188,7 +188,7 @@ MATRIX_LOOP_END: #endif #ifdef VISUALIZER_ENABLE - visualizer_update(default_layer_state, layer_state, host_keyboard_leds()); + visualizer_update(default_layer_state, layer_state, visualizer_get_mods(), host_keyboard_leds()); #endif // update LED -- cgit v1.2.3 From 489d0ab5818555b8f8ff6e9e7d9a9ea717902ab0 Mon Sep 17 00:00:00 2001 From: Arthur Nogueira Neves Date: Wed, 18 Jan 2017 21:12:02 -0500 Subject: this is the atreus doc --- keyboards/atreus/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/atreus/readme.md b/keyboards/atreus/readme.md index a4077668e..8baa581f0 100644 --- a/keyboards/atreus/readme.md +++ b/keyboards/atreus/readme.md @@ -169,7 +169,7 @@ This requires [some hardware changes](https://www.reddit.com/r/MechanicalKeyboar ## Building -Download or clone the whole firmware and navigate to the keyboards/planck folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use `make dfu` to program your PCB once you hit the reset button. +Download or clone the whole firmware and navigate to the keyboards/atreus folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use `make dfu` to program your PCB once you hit the reset button. Depending on which keymap you would like to use, you will have to compile slightly differently. -- cgit v1.2.3 From 072237bce814fd49765be7f5a6fcb57821c1e31d Mon Sep 17 00:00:00 2001 From: lucwastiaux Date: Thu, 19 Jan 2017 22:45:30 +0800 Subject: introduce shell_layer --- .../ergodox/keymaps/dvorak_programmer/keymap.c | 34 ++++++++++++++++++++-- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c index 2a64331db..c4b99d55a 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c +++ b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c @@ -6,7 +6,8 @@ #include "action_code.h" #define BASE 0 // default layer -#define SHELL_NAV 1 +#define SHELL_LAYER 1 +#define SHELL_NAV 2 #define KEY_NAV 3 // key navigation layer #define KEY_SEL 4 // key selection layer #define NUMBER 5 // number layer @@ -58,7 +59,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = KEYMAP( // layer 0 : default // left hand KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, - LT(SHELL_NAV,KC_TAB), KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, MO(KEY_SEL), + LT(SHELL_NAV,KC_TAB), KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, MO(KEY_SEL), OSL(BRACKETS), KC_A, KC_O, KC_E, KC_U, KC_I, KC_FN3, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, MO(KEY_NAV), OSL(SHORTCUTS),KC_FN4, KC_FN5,OSL(SYMBOL),MO(NUMBER), @@ -80,6 +81,32 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), +// permanent shell layer - meant to be used while in a terminal +[SHELL_LAYER] = KEYMAP( + // left hand + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,M(SCREEN_COPY_MODE), M(SCREEN_PASTE),M(SHELL_RECALL_LAST_ARG_REMOVE_FIRST_COMMAND), + KC_TAB, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,RCTL(KC_R), + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,LALT(KC_DOT), + // bottom row + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + // thumb cluster + LALT(KC_B),LALT(KC_F), + LALT(KC_D), + KC_TRNS,RCTL(KC_W),KC_TRNS, + // right hand + RCTL(KC_C), KC_LEFT, KC_RIGHT, RCTL(KC_U), RCTL(KC_K), KC_TRNS, KC_TRNS, + KC_UP, 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_DOWN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + // bottom row + M(SCREEN_TAB_LEFT), M(SCREEN_TAB_RIGHT), M(SCREEN_NEW_TAB), KC_TRNS, KC_TRNS, + // thumb cluster + KC_TRNS, KC_TRNS, + KC_TRNS, + MEH(KC_V), KC_TRNS, KC_TRNS +), + // shell navigation layer [SHELL_NAV] = KEYMAP( // left hand @@ -246,7 +273,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { MEH(KC_S), MEH(KC_T), MEH(KC_U), MEH(KC_V), MEH(KC_X), MEH(KC_6), MEH(KC_7), MEH(KC_8), - MEH(KC_9), MEH(KC_Y), MEH(KC_Z) + MEH(KC_9), TO(BASE), TO(SHELL_LAYER) ), @@ -407,6 +434,7 @@ void matrix_scan_user(void) { case NUMBER: case SYMBOL: case BRACKETS: + //case SHELL_LAYER: ergodox_right_led_2_on(); break; case KEY_NAV: -- cgit v1.2.3 From dc3937d485bf2325d1ed26c3456475b1b09617f1 Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Fri, 20 Jan 2017 21:22:18 +0000 Subject: simplify --- keyboards/planck/keymaps/callum/keymap.c | 51 ++++++++----------------------- keyboards/planck/keymaps/callum/readme.md | 12 ++++---- 2 files changed, 19 insertions(+), 44 deletions(-) diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index 4d0151710..a1254d975 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -7,22 +7,21 @@ 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 _BASE 0 #define _MOVE 1 #define _SYMB 2 #define _MOUSE 3 #define _FUNC 4 +#define CMDLEFT LGUI(KC_LEFT) +#define CMDRGHT LGUI(KC_RGHT) +#define ENDASH LALT(KC_MINS) +#define POUND LALT(KC_3) + enum planck_keycodes { MOVE = SAFE_RANGE, SYMB, - FUNC, - BELOW, - ABOVE + FUNC }; // Fillers to make layering more clear @@ -55,16 +54,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+------+------+------+------+------| * | Del | Caps | Left | Down | Right| | | Left | Down | Right| Caps | Del | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | Pg Up| Pg Dn| Above| | Pg Dn| Pg Up| | | | + * | | | | Pg Up| Pg Dn| | | Pg Dn| Pg Up| | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | Below| | | | | | | + * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ [_MOVE] = { - {KC_ESC, XXXXXXX, LGUI(KC_LEFT), KC_UP, LGUI(KC_RGHT), XXXXXXX, XXXXXXX, LGUI(KC_LEFT), KC_UP, LGUI(KC_RGHT), XXXXXXX, KC_ESC }, + {KC_ESC, XXXXXXX, CMDLEFT, KC_UP, CMDRGHT, XXXXXXX, XXXXXXX, CMDLEFT, KC_UP, CMDRGHT, XXXXXXX, KC_ESC }, {KC_DEL, KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_CAPS, KC_DEL }, - {_______, XXXXXXX, XXXXXXX, KC_PGUP, KC_PGDN, ABOVE, XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, XXXXXXX, _______}, - {_______, _______, _______, _______, _______, BELOW, _______, _______, _______, _______, _______, _______} + {_______, XXXXXXX, XXXXXXX, KC_PGUP, KC_PGDN, XXXXXXX, XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, XXXXXXX, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} }, /* SYMB @@ -79,8 +78,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_SYMB] = { - {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, LALT(KC_MINS)}, - {KC_DEL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, LALT(KC_3)}, + {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, ENDASH }, + {KC_DEL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, POUND }, {_______, KC_TILD, KC_GRV, KC_PLUS, KC_EQL, KC_PIPE, KC_BSLS, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} }, @@ -153,30 +152,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; - case BELOW: - if (record->event.pressed) { - register_code(KC_LGUI); - register_code(KC_RGHT); - unregister_code(KC_RGHT); - unregister_code(KC_LGUI); - register_code(KC_ENT); - unregister_code(KC_ENT); - } - return false; - break; - case ABOVE: - if (record->event.pressed) { - register_code(KC_LGUI); - register_code(KC_LEFT); - unregister_code(KC_LEFT); - unregister_code(KC_LGUI); - register_code(KC_ENT); - unregister_code(KC_ENT); - register_code(KC_UP); - unregister_code(KC_UP); - } - return false; - break; } return true; } diff --git a/keyboards/planck/keymaps/callum/readme.md b/keyboards/planck/keymaps/callum/readme.md index 0baeba46d..f970cd974 100644 --- a/keyboards/planck/keymaps/callum/readme.md +++ b/keyboards/planck/keymaps/callum/readme.md @@ -2,11 +2,11 @@ This is a layout for the grid planck, built with a few ideals in mind: -- Minimal response times should be maintained. Keys that react differently depending on whether they are tapped or held, keys that react differently if they are double tapped, etc. should be avoided – they inevitably send their keycode later than a normal key – interrupting the immediate feedback from the screen. Therefore we restrict ourselves to chording as our only means of getting more than one symbol out of a single physical key. +- Consistent and minimal response times should be maintained. Keys that react differently depending on whether they are tapped or held, keys that react differently if they are double tapped, etc. should be avoided – they inevitably send their keycode later than a normal key – interrupting the immediate feedback from the screen. Therefore we restrict ourselves to chording as our only means of getting more than one symbol out of a single physical key. - The hands should never need to leave the home position. The usual culprit for this is the arrow cluster, so the arrow cluster should be as close to home as possible. - There should be two of every modifier (one on each side), otherwise certain long key combinations become hard to make. -We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow cluster and other movement keys; a `SYMB` layer, with numbers and symbols; a `FUNC` layer, with function keys and media keys; and a `MOUSE` layer, with mouse emulation. +We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow cluster and other movement keys; a `SYMB` layer, with numbers and symbols; a `FUNC` layer, with function keys and media keys; and a `MOUSE` layer, with mouse emulation. The `MOUSE` layer is activated by holding the Move and Symb keys simultaniously. ``` /* BASE @@ -27,9 +27,9 @@ We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow c * |------+------+------+------+------+------+------+------+------+------+------+------| * | Del | Caps | Left | Down | Right| | | Left | Down | Right| Caps | Del | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | Pg Up| Pg Dn| Above| | Pg Dn| Pg Up| | | | + * | | | | Pg Up| Pg Dn| | | Pg Dn| Pg Up| | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | Below| | | | | | | + * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ @@ -63,9 +63,9 @@ We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow c * |------+------+------+------+------+------+------+------+------+------+------+------| * | | F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | Vol- | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | F21 | F22 | F23 | F24 | | | Lock | | | | | + * | | F21 | F22 | F23 | F24 | | | Power| | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | Prev | Mute | Play | Next | | | | | * `-----------------------------------------------------------------------------------' */ -``` + ``` -- cgit v1.2.3 From 01e750a37230fd7df9ef57a9d1564bde4bee6da6 Mon Sep 17 00:00:00 2001 From: lucwastiaux Date: Sat, 21 Jan 2017 23:15:37 +0800 Subject: couple of changes to the shell layer --- keyboards/ergodox/keymaps/dvorak_programmer/keymap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c index c4b99d55a..2bb5bcd12 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c +++ b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c @@ -100,11 +100,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DOWN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, // bottom row - M(SCREEN_TAB_LEFT), M(SCREEN_TAB_RIGHT), M(SCREEN_NEW_TAB), KC_TRNS, KC_TRNS, + M(SCREEN_TAB_LEFT), M(SCREEN_TAB_RIGHT), M(SCREEN_NEW_TAB), KC_TRNS, MEH(KC_V), // thumb cluster - KC_TRNS, KC_TRNS, - KC_TRNS, - MEH(KC_V), KC_TRNS, KC_TRNS + KC_LEFT, KC_RIGHT, + KC_HOME, + KC_END, KC_TRNS, KC_TRNS ), // shell navigation layer -- cgit v1.2.3 From cbb1927d6f7511d7778239e02d834f392b83dd25 Mon Sep 17 00:00:00 2001 From: Andreas Schmidt Date: Sat, 21 Jan 2017 16:22:40 +0100 Subject: Add Swiss German layout for Ergodox EZ - Add Swiss German layout for Ergodox EZ based on default layout for Ergodox EZ. - Minor changes in the event loop to prevent flashing of leds. --- .../keymaps/swissgerman_ez/keyboard-layout.json | 417 ++++++++++++++++++++ .../keymaps/swissgerman_ez/keyboard-layout.png | Bin 0 -> 75633 bytes .../keymaps/swissgerman_ez/keyboard-layout_1_2.png | Bin 0 -> 54604 bytes .../swissgerman_ez/keyboard-layout_2_3.json | 429 +++++++++++++++++++++ keyboards/ergodox/keymaps/swissgerman_ez/keymap.c | 260 +++++++++++++ keyboards/ergodox/keymaps/swissgerman_ez/readme.md | 15 + 6 files changed, 1121 insertions(+) create mode 100644 keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout.json create mode 100644 keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout.png create mode 100644 keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout_1_2.png create mode 100644 keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout_2_3.json create mode 100644 keyboards/ergodox/keymaps/swissgerman_ez/keymap.c create mode 100644 keyboards/ergodox/keymaps/swissgerman_ez/readme.md diff --git a/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout.json b/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout.json new file mode 100644 index 000000000..7a0397f72 --- /dev/null +++ b/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout.json @@ -0,0 +1,417 @@ +[ + { + "backcolor": "#ffffff" + }, + [ + { + "x": 3.5 + }, + "#\n3", + { + "x": 10.5 + }, + "*\n8" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "@\n2", + { + "x": 1 + }, + "$\n4", + { + "x": 8.5 + }, + "&\n7", + { + "x": 1 + }, + "(\n9" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "%\n5", + { + "a": 7 + }, + "", + { + "x": 4.5 + }, + "", + { + "a": 4 + }, + "^\n6" + ], + [ + { + "y": -0.875, + "w": 1.5 + }, + "°\n§", + "!\n1", + { + "x": 14.5 + }, + ")\n0", + { + "w": 1.5 + }, + "?\n'\n\n'" + ], + [ + { + "y": -0.375, + "x": 3.5 + }, + "E", + { + "x": 10.5 + }, + "I" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "W", + { + "x": 1 + }, + "R", + { + "x": 8.5 + }, + "U", + { + "x": 1 + }, + "O" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "T", + { + "c": "#b56b6b", + "a": 6, + "h": 1.5 + }, + "Toggle Code Layer", + { + "x": 4.5, + "h": 1.5 + }, + "Toggle Code Layer", + { + "c": "#cccccc", + "a": 4 + }, + "Y" + ], + [ + { + "y": -0.875, + "a": 6, + "w": 1.5 + }, + "Delete", + { + "a": 4 + }, + "Q", + { + "x": 14.5 + }, + "P", + { + "w": 1.5 + }, + "è\nü\n\n[" + ], + [ + { + "y": -0.375, + "x": 3.5 + }, + "D", + { + "x": 10.5 + }, + "K" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "S", + { + "x": 1 + }, + "F", + { + "x": 8.5 + }, + "J", + { + "x": 1 + }, + "L" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "G", + { + "x": 6.5 + }, + "H" + ], + [ + { + "y": -0.875, + "a": 6, + "w": 1.5 + }, + "Backspace", + { + "c": "#79c777", + "a": 4 + }, + "A\n\nLyr3", + { + "x": 14.5 + }, + "é\nö\nLyr3", + { + "c": "#748adb", + "w": 1.5 + }, + "à\nä\nCmd\n{" + ], + [ + { + "y": -0.625, + "x": 6.5, + "c": "#cccccc", + "a": 6, + "h": 1.5 + }, + "Hyper", + { + "x": 4.5, + "h": 1.5 + }, + "Meh" + ], + [ + { + "y": -0.75, + "x": 3.5, + "a": 4 + }, + "C", + { + "x": 10.5 + }, + ";\n," + ], + [ + { + "y": -0.875, + "x": 2.5, + "c": "#748adb" + }, + "X\n\nAlt", + { + "x": 1, + "c": "#cccccc" + }, + "V", + { + "x": 8.5 + }, + "M", + { + "x": 1, + "c": "#748adb" + }, + ":\n.\nAlt" + ], + [ + { + "y": -0.875, + "x": 5.5, + "c": "#cccccc" + }, + "B", + { + "x": 6.5 + }, + "N" + ], + [ + { + "y": -0.875, + "a": 6, + "w": 1.5 + }, + "Shift", + { + "c": "#748adb", + "a": 4 + }, + "Z\n\nCtrl", + { + "x": 14.5 + }, + "_\n-\nCtrl", + { + "c": "#cccccc", + "a": 6, + "w": 1.5 + }, + "Shift" + ], + [ + { + "y": -0.375, + "x": 3.5, + "a": 7 + }, + "", + { + "x": 10.5 + }, + "" + ], + [ + { + "y": -0.875, + "x": 2.5, + "a": 4 + }, + "£\n$\n\n}", + { + "x": 1, + "a": 7 + }, + "", + { + "x": 10.5, + "a": 6 + }, + "AltGr" + ], + [ + { + "y": -0.9950000000000001, + "x": 14, + "a": 7 + }, + "" + ], + [ + { + "y": -0.7549999999999999, + "x": 0.5, + "c": "#b56b6b", + "a": 4 + }, + ">\n<\nCode Layer\n\\", + { + "c": "#cccccc" + }, + "`\n^\n\n~", + { + "x": 14.5 + }, + "!\n¨\n\n]", + { + "c": "#b56b6b" + }, + "\n\nCode Layer" + ], + [ + { + "r": 30, + "rx": 6.5, + "ry": 4.25, + "y": -1, + "x": 1, + "c": "#748adb" + }, + "Apps\nAlt", + { + "c": "#cccccc", + "a": 6 + }, + "Win / Cmd" + ], + [ + { + "h": 2 + }, + "Space", + { + "h": 2 + }, + "Back Space", + "Home" + ], + [ + { + "x": 2 + }, + "End" + ], + [ + { + "r": -30, + "rx": 13, + "y": -1, + "x": -3 + }, + "Alt", + { + "c": "#748adb", + "a": 4 + }, + "Esc\nCtrl" + ], + [ + { + "x": -3, + "c": "#cccccc", + "a": 6 + }, + "Pg Up", + { + "h": 2 + }, + "Tab", + { + "h": 2 + }, + "Enter" + ], + [ + { + "x": -3 + }, + "Pg Dn" + ] +] diff --git a/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout.png b/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout.png new file mode 100644 index 000000000..aff6af851 Binary files /dev/null and b/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout.png differ diff --git a/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout_1_2.png b/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout_1_2.png new file mode 100644 index 000000000..835816b53 Binary files /dev/null and b/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout_1_2.png differ diff --git a/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout_2_3.json b/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout_2_3.json new file mode 100644 index 000000000..e3d366057 --- /dev/null +++ b/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout_2_3.json @@ -0,0 +1,429 @@ +[ + { + "backcolor": "#ffffff" + }, + [ + { + "x": 3.5, + "t": "#b81c1c" + }, + "F3", + { + "x": 10.5 + }, + "F8" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "F2", + { + "x": 1 + }, + "F4", + { + "x": 8.5 + }, + "F7", + { + "x": 1 + }, + "F9" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "F5", + { + "t": "#000000", + "a": 7 + }, + "", + { + "x": 4.5 + }, + "", + { + "t": "#b81c1c", + "a": 4 + }, + "F6" + ], + [ + { + "y": -0.875, + "t": "#000000\n\n\n#529151", + "w": 1.5 + }, + "\n\n\nFlash", + { + "t": "#b81c1c" + }, + "F1", + { + "x": 14.5 + }, + "F10", + { + "t": "#b81c1c\n\n\n#529151", + "w": 1.5 + }, + "F11\n\n\nFlash" + ], + [ + { + "y": -0.375, + "x": 3.5 + }, + "{\n\n\n", + { + "x": 10.5, + "t": "#b81c1c" + }, + "8" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "@", + { + "x": 1 + }, + "}", + { + "x": 8.5 + }, + "7", + { + "x": 1 + }, + "9" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "|", + { + "t": "#000000", + "a": 7, + "h": 1.5 + }, + "", + { + "x": 4.5, + "h": 1.5 + }, + "", + { + "t": "#b81c1c", + "a": 4 + }, + "" + ], + [ + { + "y": -0.875, + "t": "#000000", + "a": 7, + "w": 1.5 + }, + "", + { + "t": "#b81c1c", + "a": 4 + }, + "!", + { + "x": 14.5 + }, + "*", + { + "w": 1.5 + }, + "F12" + ], + [ + { + "y": -0.375, + "x": 3.5, + "t": "#b81c1c\n\n\n#529151" + }, + "(\n\n\n", + { + "x": 10.5, + "t": "#b81c1c" + }, + "5" + ], + [ + { + "y": -0.875, + "x": 2.5, + "t": "#b81c1c\n\n\n#529151" + }, + "$\n\n\n", + { + "x": 1 + }, + ")\n\n\n", + { + "x": 8.5, + "t": "#b81c1c" + }, + "4", + { + "x": 1 + }, + "6" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "`", + { + "x": 6.5 + }, + "" + ], + [ + { + "y": -0.875, + "t": "#000000", + "a": 7, + "w": 1.5 + }, + "", + { + "t": "#b81c1c", + "a": 4 + }, + "#", + { + "x": 14.5 + }, + "+", + { + "t": "#000000\n\n\n#529151", + "w": 1.5 + }, + "\n\n\n" + ], + [ + { + "y": -0.625, + "x": 6.5, + "t": "#000000", + "a": 7, + "h": 1.5 + }, + "", + { + "x": 4.5, + "h": 1.5 + }, + "" + ], + [ + { + "y": -0.75, + "x": 3.5, + "t": "#b81c1c", + "a": 4 + }, + "[", + { + "x": 10.5, + "t": "#b81c1c\n\n\n#529151" + }, + "2\n\n\n" + ], + [ + { + "y": -0.875, + "x": 2.5, + "t": "#b81c1c" + }, + "^", + { + "x": 1 + }, + "]", + { + "x": 8.5 + }, + "1", + { + "x": 1, + "t": "#b81c1c\n\n\n#529151" + }, + "3\n\n\n" + ], + [ + { + "y": -0.875, + "x": 5.5, + "t": "#b81c1c" + }, + "~", + { + "x": 6.5 + }, + "&" + ], + [ + { + "y": -0.875, + "t": "#000000", + "a": 7, + "w": 1.5 + }, + "", + { + "t": "#b81c1c", + "a": 4 + }, + "%", + { + "x": 14.5 + }, + "\\", + { + "t": "#000000", + "a": 7, + "w": 1.5 + }, + "" + ], + [ + { + "y": -0.375, + "x": 3.5, + "t": "#000000\n\n\n#529151", + "a": 4 + }, + "\n\n\nleft click", + { + "x": 10.5, + "t": "#b81c1c\n\n\n#529151" + }, + ".\n\n\n" + ], + [ + { + "y": -0.875, + "x": 2.5, + "t": "#000000", + "a": 7 + }, + "", + { + "x": 1, + "t": "#000000\n\n\n#529151", + "a": 4 + }, + "\n\n\nright click", + { + "x": 8.5, + "t": "#b81c1c\n\n\n#529151" + }, + "?\n\n\n", + { + "x": 1, + "t": "#b81c1c" + }, + "0" + ], + [ + { + "y": -0.75, + "x": 0.5, + "t": "#000000", + "a": 7 + }, + "", + { + "t": "#b81c1c", + "a": 4 + }, + "EPRM RST", + { + "x": 14.5, + "t": "#000000", + "a": 7 + }, + "", + "" + ], + [ + { + "r": 30, + "rx": 6.5, + "ry": 4.25, + "y": -1, + "x": 1 + }, + "", + "" + ], + [ + { + "h": 2 + }, + "", + { + "h": 2 + }, + "", + "" + ], + [ + { + "x": 2 + }, + "" + ], + [ + { + "r": -30, + "rx": 13, + "y": -1, + "x": -3 + }, + "", + "" + ], + [ + { + "x": -3 + }, + "", + { + "h": 2 + }, + "", + { + "t": "#000000\n\n\n#529151", + "a": 4, + "h": 2 + }, + "\n\n\nWeb back" + ], + [ + { + "x": -3, + "t": "#000000", + "a": 7 + }, + "" + ] +] diff --git a/keyboards/ergodox/keymaps/swissgerman_ez/keymap.c b/keyboards/ergodox/keymaps/swissgerman_ez/keymap.c new file mode 100644 index 000000000..c6717abff --- /dev/null +++ b/keyboards/ergodox/keymaps/swissgerman_ez/keymap.c @@ -0,0 +1,260 @@ +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" +#include "version.h" + +#define BASE 0 // default layer +#define SYMB 1 // symbols +#define MDIA 2 // media keys + +#define EPRM M(1) // Macro 1: Reset EEPROM +#define HTML_LI M(10) +#define HTML_UL M(11) +#define HTML_OL M(12) +#define HTML_CODE M(13) + +#define SEND_TAG(TAG) do {\ + send_key(KC_NONUS_BSLASH); \ + SEND_STRING(TAG); \ + send_larger_than(); \ + send_key(KC_NONUS_BSLASH); \ + SEND_STRING("&"); \ + SEND_STRING(TAG); \ + send_larger_than(); \ + go_back_based_on_tag(TAG); \ + } while (0) + +void send_key(uint16_t keycode); +void go_back_based_on_tag(char* tag); +void send_larger_than(void); + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | ' | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Del | Q | W | E | R | T | L1 | | L1 | Z | U | I | O | P | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | BkSp | A /L2| S | D | F | G |------| |------| H | J | K | L | / L2| / Cmd | + * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| + * | LShift |Y/Ctrl|X/Alt | C | V | B | | | | N | M | , |./Alt |-/Ctrl| RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |< / L1| ^ | $ | Left | Right| | Up | Down |AltGr | | ~L1 | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | App | LGui | | Alt |Ctrl/Esc| + * ,------|------|------| |------+--------+------. + * | | | Home | | PgUp | | | + * | Space|Backsp|------| |------| Tab |Enter | + * | |ace | End | | PgDn | | | + * `--------------------' `----------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[BASE] = KEYMAP( // layer 0 : default + // left hand + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, + KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), + KC_BSPC, LT(MDIA, KC_A),KC_S, KC_D, KC_F, KC_G, + KC_LSFT, CTL_T(KC_Z), ALT_T(KC_X), KC_C, KC_V, KC_B, ALL_T(KC_NO), + LT(SYMB,KC_NONUS_BSLASH), KC_EQL, KC_BSLS, KC_LEFT,KC_RGHT, + ALT_T(KC_APP), KC_LGUI, + KC_HOME, + KC_SPC,KC_BSPC,KC_END, + // right hand + KC_RGHT, 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_LBRC, + KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), + MEH_T(KC_NO),KC_N, KC_M, KC_COMM,ALT_T(KC_DOT), CTL_T(KC_SLSH), KC_RSFT, + KC_UP, KC_DOWN,KC_RALT,KC_RBRC, KC_FN1, + KC_LALT,CTL_T(KC_ESC), + KC_PGUP, + KC_PGDN,KC_TAB, KC_ENT + ), +/* Keymap 1: Symbol Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | EPRM | | | | | ? | . | 0 | = | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[SYMB] = KEYMAP( + // left hand + M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + KC_TRNS,ACTION_MODS_KEY(MOD_LSFT, KC_RBRC), ACTION_MODS_KEY(MOD_RALT, KC_2), ACTION_MODS_KEY(MOD_RALT, KC_QUOT), ACTION_MODS_KEY(MOD_RALT, KC_BSLS),ACTION_MODS_KEY(MOD_RALT,KC_7),KC_TRNS, + KC_TRNS,ACTION_MODS_KEY(MOD_RALT,KC_3),KC_BSLS, ACTION_MODS_KEY(MOD_LSFT, KC_8), ACTION_MODS_KEY(MOD_RSFT, KC_9),ACTION_MODS_KEY(MOD_LSFT,KC_EQL), + KC_TRNS,ACTION_MODS_KEY(MOD_LSFT,KC_5),KC_EQL, ACTION_MODS_KEY(MOD_RALT, KC_LBRC), ACTION_MODS_KEY(MOD_RALT, KC_RBRC),ACTION_MODS_KEY(MOD_RALT,KC_EQL),KC_TRNS, + KC_TRNS,EPRM,KC_TRNS,KC_NONUS_BSLASH, ACTION_MODS_KEY(MOD_LSFT, KC_NONUS_BSLASH)/*KC_TRNS,KC_TRNS*/, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + // right hand + KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_TRNS, KC_UP, KC_7, KC_8, KC_9, ACTION_MODS_KEY(MOD_RSFT,KC_3), KC_F12, + KC_DOWN, KC_4, KC_5, KC_6, ACTION_MODS_KEY(MOD_RSFT,KC_1), KC_TRNS, + KC_TRNS, ACTION_MODS_KEY(MOD_RSFT,KC_6), KC_1, KC_2, KC_3, ACTION_MODS_KEY(MOD_RALT,KC_NONUS_BSLASH), KC_TRNS, + ACTION_MODS_KEY(MOD_RSFT,KC_MINS),KC_DOT, KC_0, KC_EQL, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +/* Keymap 2: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | RESET | | | | | | | | | | | | | | RESET | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | MsUp | | | | | | |H_UL | |H_OL | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| |------| |------| | | |H_LI | | Play | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |H_CODE| | | | | | | | | Prev | Next | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | |Brwser| + * | | |------| |------| |Back | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// MEDIA AND MOUSE +[MDIA] = KEYMAP( + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, HTML_CODE, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, + KC_TRNS, KC_TRNS, HTML_UL, KC_TRNS, HTML_OL, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, HTML_LI, KC_TRNS, KC_MPLY, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_WBAK +), +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + break; + case 1: + if (record->event.pressed) { // For resetting EEPROM + eeconfig_init(); + } + break; + case 10: + if (record->event.pressed) { + SEND_TAG("li"); + } + break; + case 11: + if (record->event.pressed) { + SEND_TAG( "ul" ); + } + break; + case 12: + if (record->event.pressed) { + SEND_TAG("ol"); + } + break; + case 13: + if (record->event.pressed) { + SEND_TAG("code"); + } + break; + } + return MACRO_NONE; +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + uint8_t layer = biton32(layer_state); + + switch (layer) { + // TODO: Make this relevant to the ErgoDox EZ. + case 0: + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + break; + case 1: + ergodox_right_led_1_on(); + + ergodox_board_led_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + break; + case 2: + ergodox_right_led_2_on(); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_3_off(); + break; + default: + // none + break; + } + +}; + +void send_key(uint16_t keycode) { + register_code(keycode); + unregister_code(keycode); +} + +void go_back_based_on_tag(char* tag) { + const int BRACKETS_AND_SLASH_LENGTH = 3; + + for (int i=0; i < strlen(tag) + BRACKETS_AND_SLASH_LENGTH; i++) { + send_key(KC_LEFT); + } +} + +void send_larger_than() { + register_code(KC_LSFT); + send_key(KC_NONUS_BSLASH); + unregister_code(KC_LSFT); + +} diff --git a/keyboards/ergodox/keymaps/swissgerman_ez/readme.md b/keyboards/ergodox/keymaps/swissgerman_ez/readme.md new file mode 100644 index 000000000..039a08588 --- /dev/null +++ b/keyboards/ergodox/keymaps/swissgerman_ez/readme.md @@ -0,0 +1,15 @@ +# ErgoDox EZ Swiss German Configuration + +Swiss German keyboard layout based on the Ergodox EZ default layout. + +Keyboard diagrams created with the [keyboard layout editor](http://www.keyboard-layout-editor.com). + +Diagram sources: [default layer](keyboard-layout.json), [layer 2 & 3](keyboard-layout_2_3.json) + +![Layout Layer 0](keyboard-layout.png) +![Layout Layer 1&2](keyboard-layout_1_2.png) + +## Changelog +* Jan 21, 2017: + * Initial version based on default layout. + -- cgit v1.2.3 From bf0b355bc820a017544860a5b90e405f45e66592 Mon Sep 17 00:00:00 2001 From: Andreas Schmidt Date: Sat, 21 Jan 2017 16:24:41 +0100 Subject: Add Swiss German layout for Ergodox Infinity - Add Swiss German layout for Ergodox Infinity based on default layout for Ergodox EZ. - Minor changes in the event loop to prevent flashing display background lights. --- .../swissgerman_infinity/keyboard-layout.json | 417 ++++++++++++++++++++ .../swissgerman_infinity/keyboard-layout.png | Bin 0 -> 75633 bytes .../swissgerman_infinity/keyboard-layout_1_2.png | Bin 0 -> 54604 bytes .../swissgerman_infinity/keyboard-layout_2_3.json | 429 +++++++++++++++++++++ .../ergodox/keymaps/swissgerman_infinity/keymap.c | 252 ++++++++++++ .../ergodox/keymaps/swissgerman_infinity/readme.md | 14 + 6 files changed, 1112 insertions(+) create mode 100644 keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout.json create mode 100644 keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout.png create mode 100644 keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout_1_2.png create mode 100644 keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout_2_3.json create mode 100644 keyboards/ergodox/keymaps/swissgerman_infinity/keymap.c create mode 100644 keyboards/ergodox/keymaps/swissgerman_infinity/readme.md diff --git a/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout.json b/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout.json new file mode 100644 index 000000000..7a0397f72 --- /dev/null +++ b/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout.json @@ -0,0 +1,417 @@ +[ + { + "backcolor": "#ffffff" + }, + [ + { + "x": 3.5 + }, + "#\n3", + { + "x": 10.5 + }, + "*\n8" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "@\n2", + { + "x": 1 + }, + "$\n4", + { + "x": 8.5 + }, + "&\n7", + { + "x": 1 + }, + "(\n9" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "%\n5", + { + "a": 7 + }, + "", + { + "x": 4.5 + }, + "", + { + "a": 4 + }, + "^\n6" + ], + [ + { + "y": -0.875, + "w": 1.5 + }, + "°\n§", + "!\n1", + { + "x": 14.5 + }, + ")\n0", + { + "w": 1.5 + }, + "?\n'\n\n'" + ], + [ + { + "y": -0.375, + "x": 3.5 + }, + "E", + { + "x": 10.5 + }, + "I" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "W", + { + "x": 1 + }, + "R", + { + "x": 8.5 + }, + "U", + { + "x": 1 + }, + "O" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "T", + { + "c": "#b56b6b", + "a": 6, + "h": 1.5 + }, + "Toggle Code Layer", + { + "x": 4.5, + "h": 1.5 + }, + "Toggle Code Layer", + { + "c": "#cccccc", + "a": 4 + }, + "Y" + ], + [ + { + "y": -0.875, + "a": 6, + "w": 1.5 + }, + "Delete", + { + "a": 4 + }, + "Q", + { + "x": 14.5 + }, + "P", + { + "w": 1.5 + }, + "è\nü\n\n[" + ], + [ + { + "y": -0.375, + "x": 3.5 + }, + "D", + { + "x": 10.5 + }, + "K" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "S", + { + "x": 1 + }, + "F", + { + "x": 8.5 + }, + "J", + { + "x": 1 + }, + "L" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "G", + { + "x": 6.5 + }, + "H" + ], + [ + { + "y": -0.875, + "a": 6, + "w": 1.5 + }, + "Backspace", + { + "c": "#79c777", + "a": 4 + }, + "A\n\nLyr3", + { + "x": 14.5 + }, + "é\nö\nLyr3", + { + "c": "#748adb", + "w": 1.5 + }, + "à\nä\nCmd\n{" + ], + [ + { + "y": -0.625, + "x": 6.5, + "c": "#cccccc", + "a": 6, + "h": 1.5 + }, + "Hyper", + { + "x": 4.5, + "h": 1.5 + }, + "Meh" + ], + [ + { + "y": -0.75, + "x": 3.5, + "a": 4 + }, + "C", + { + "x": 10.5 + }, + ";\n," + ], + [ + { + "y": -0.875, + "x": 2.5, + "c": "#748adb" + }, + "X\n\nAlt", + { + "x": 1, + "c": "#cccccc" + }, + "V", + { + "x": 8.5 + }, + "M", + { + "x": 1, + "c": "#748adb" + }, + ":\n.\nAlt" + ], + [ + { + "y": -0.875, + "x": 5.5, + "c": "#cccccc" + }, + "B", + { + "x": 6.5 + }, + "N" + ], + [ + { + "y": -0.875, + "a": 6, + "w": 1.5 + }, + "Shift", + { + "c": "#748adb", + "a": 4 + }, + "Z\n\nCtrl", + { + "x": 14.5 + }, + "_\n-\nCtrl", + { + "c": "#cccccc", + "a": 6, + "w": 1.5 + }, + "Shift" + ], + [ + { + "y": -0.375, + "x": 3.5, + "a": 7 + }, + "", + { + "x": 10.5 + }, + "" + ], + [ + { + "y": -0.875, + "x": 2.5, + "a": 4 + }, + "£\n$\n\n}", + { + "x": 1, + "a": 7 + }, + "", + { + "x": 10.5, + "a": 6 + }, + "AltGr" + ], + [ + { + "y": -0.9950000000000001, + "x": 14, + "a": 7 + }, + "" + ], + [ + { + "y": -0.7549999999999999, + "x": 0.5, + "c": "#b56b6b", + "a": 4 + }, + ">\n<\nCode Layer\n\\", + { + "c": "#cccccc" + }, + "`\n^\n\n~", + { + "x": 14.5 + }, + "!\n¨\n\n]", + { + "c": "#b56b6b" + }, + "\n\nCode Layer" + ], + [ + { + "r": 30, + "rx": 6.5, + "ry": 4.25, + "y": -1, + "x": 1, + "c": "#748adb" + }, + "Apps\nAlt", + { + "c": "#cccccc", + "a": 6 + }, + "Win / Cmd" + ], + [ + { + "h": 2 + }, + "Space", + { + "h": 2 + }, + "Back Space", + "Home" + ], + [ + { + "x": 2 + }, + "End" + ], + [ + { + "r": -30, + "rx": 13, + "y": -1, + "x": -3 + }, + "Alt", + { + "c": "#748adb", + "a": 4 + }, + "Esc\nCtrl" + ], + [ + { + "x": -3, + "c": "#cccccc", + "a": 6 + }, + "Pg Up", + { + "h": 2 + }, + "Tab", + { + "h": 2 + }, + "Enter" + ], + [ + { + "x": -3 + }, + "Pg Dn" + ] +] diff --git a/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout.png b/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout.png new file mode 100644 index 000000000..aff6af851 Binary files /dev/null and b/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout.png differ diff --git a/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout_1_2.png b/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout_1_2.png new file mode 100644 index 000000000..835816b53 Binary files /dev/null and b/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout_1_2.png differ diff --git a/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout_2_3.json b/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout_2_3.json new file mode 100644 index 000000000..e3d366057 --- /dev/null +++ b/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout_2_3.json @@ -0,0 +1,429 @@ +[ + { + "backcolor": "#ffffff" + }, + [ + { + "x": 3.5, + "t": "#b81c1c" + }, + "F3", + { + "x": 10.5 + }, + "F8" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "F2", + { + "x": 1 + }, + "F4", + { + "x": 8.5 + }, + "F7", + { + "x": 1 + }, + "F9" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "F5", + { + "t": "#000000", + "a": 7 + }, + "", + { + "x": 4.5 + }, + "", + { + "t": "#b81c1c", + "a": 4 + }, + "F6" + ], + [ + { + "y": -0.875, + "t": "#000000\n\n\n#529151", + "w": 1.5 + }, + "\n\n\nFlash", + { + "t": "#b81c1c" + }, + "F1", + { + "x": 14.5 + }, + "F10", + { + "t": "#b81c1c\n\n\n#529151", + "w": 1.5 + }, + "F11\n\n\nFlash" + ], + [ + { + "y": -0.375, + "x": 3.5 + }, + "{\n\n\n", + { + "x": 10.5, + "t": "#b81c1c" + }, + "8" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "@", + { + "x": 1 + }, + "}", + { + "x": 8.5 + }, + "7", + { + "x": 1 + }, + "9" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "|", + { + "t": "#000000", + "a": 7, + "h": 1.5 + }, + "", + { + "x": 4.5, + "h": 1.5 + }, + "", + { + "t": "#b81c1c", + "a": 4 + }, + "" + ], + [ + { + "y": -0.875, + "t": "#000000", + "a": 7, + "w": 1.5 + }, + "", + { + "t": "#b81c1c", + "a": 4 + }, + "!", + { + "x": 14.5 + }, + "*", + { + "w": 1.5 + }, + "F12" + ], + [ + { + "y": -0.375, + "x": 3.5, + "t": "#b81c1c\n\n\n#529151" + }, + "(\n\n\n", + { + "x": 10.5, + "t": "#b81c1c" + }, + "5" + ], + [ + { + "y": -0.875, + "x": 2.5, + "t": "#b81c1c\n\n\n#529151" + }, + "$\n\n\n", + { + "x": 1 + }, + ")\n\n\n", + { + "x": 8.5, + "t": "#b81c1c" + }, + "4", + { + "x": 1 + }, + "6" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "`", + { + "x": 6.5 + }, + "" + ], + [ + { + "y": -0.875, + "t": "#000000", + "a": 7, + "w": 1.5 + }, + "", + { + "t": "#b81c1c", + "a": 4 + }, + "#", + { + "x": 14.5 + }, + "+", + { + "t": "#000000\n\n\n#529151", + "w": 1.5 + }, + "\n\n\n" + ], + [ + { + "y": -0.625, + "x": 6.5, + "t": "#000000", + "a": 7, + "h": 1.5 + }, + "", + { + "x": 4.5, + "h": 1.5 + }, + "" + ], + [ + { + "y": -0.75, + "x": 3.5, + "t": "#b81c1c", + "a": 4 + }, + "[", + { + "x": 10.5, + "t": "#b81c1c\n\n\n#529151" + }, + "2\n\n\n" + ], + [ + { + "y": -0.875, + "x": 2.5, + "t": "#b81c1c" + }, + "^", + { + "x": 1 + }, + "]", + { + "x": 8.5 + }, + "1", + { + "x": 1, + "t": "#b81c1c\n\n\n#529151" + }, + "3\n\n\n" + ], + [ + { + "y": -0.875, + "x": 5.5, + "t": "#b81c1c" + }, + "~", + { + "x": 6.5 + }, + "&" + ], + [ + { + "y": -0.875, + "t": "#000000", + "a": 7, + "w": 1.5 + }, + "", + { + "t": "#b81c1c", + "a": 4 + }, + "%", + { + "x": 14.5 + }, + "\\", + { + "t": "#000000", + "a": 7, + "w": 1.5 + }, + "" + ], + [ + { + "y": -0.375, + "x": 3.5, + "t": "#000000\n\n\n#529151", + "a": 4 + }, + "\n\n\nleft click", + { + "x": 10.5, + "t": "#b81c1c\n\n\n#529151" + }, + ".\n\n\n" + ], + [ + { + "y": -0.875, + "x": 2.5, + "t": "#000000", + "a": 7 + }, + "", + { + "x": 1, + "t": "#000000\n\n\n#529151", + "a": 4 + }, + "\n\n\nright click", + { + "x": 8.5, + "t": "#b81c1c\n\n\n#529151" + }, + "?\n\n\n", + { + "x": 1, + "t": "#b81c1c" + }, + "0" + ], + [ + { + "y": -0.75, + "x": 0.5, + "t": "#000000", + "a": 7 + }, + "", + { + "t": "#b81c1c", + "a": 4 + }, + "EPRM RST", + { + "x": 14.5, + "t": "#000000", + "a": 7 + }, + "", + "" + ], + [ + { + "r": 30, + "rx": 6.5, + "ry": 4.25, + "y": -1, + "x": 1 + }, + "", + "" + ], + [ + { + "h": 2 + }, + "", + { + "h": 2 + }, + "", + "" + ], + [ + { + "x": 2 + }, + "" + ], + [ + { + "r": -30, + "rx": 13, + "y": -1, + "x": -3 + }, + "", + "" + ], + [ + { + "x": -3 + }, + "", + { + "h": 2 + }, + "", + { + "t": "#000000\n\n\n#529151", + "a": 4, + "h": 2 + }, + "\n\n\nWeb back" + ], + [ + { + "x": -3, + "t": "#000000", + "a": 7 + }, + "" + ] +] diff --git a/keyboards/ergodox/keymaps/swissgerman_infinity/keymap.c b/keyboards/ergodox/keymaps/swissgerman_infinity/keymap.c new file mode 100644 index 000000000..0ccb7f47e --- /dev/null +++ b/keyboards/ergodox/keymaps/swissgerman_infinity/keymap.c @@ -0,0 +1,252 @@ +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" +#include "version.h" +#include "visualizer/lcd_backlight.h" +#include "string.h" + +#define BASE 0 // default layer +#define SYMB 1 // symbols +#define MDIA 2 // media keys + +#define EPRM M(1) // Macro 1: Reset EEPROM +#define HTML_LI M(10) +#define HTML_UL M(11) +#define HTML_OL M(12) +#define HTML_CODE M(13) + +#define SEND_TAG(TAG) do {\ + send_key(KC_NONUS_BSLASH); \ + SEND_STRING(TAG); \ + send_larger_than(); \ + send_key(KC_NONUS_BSLASH); \ + SEND_STRING("&"); \ + SEND_STRING(TAG); \ + send_larger_than(); \ + go_back_based_on_tag(TAG); \ + } while (0) + +void send_key(uint16_t keycode); +void go_back_based_on_tag(char* tag); +void send_larger_than(void); + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | ' | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Del | Q | W | E | R | T | L1 | | L1 | Z | U | I | O | P | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | BkSp | A /L2| S | D | F | G |------| |------| H | J | K | L | / L2| / Cmd | + * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| + * | LShift |Y/Ctrl|X/Alt | C | V | B | | | | N | M | , |./Alt |-/Ctrl| RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |< / L1| ^ | $ | Left | Right| | Up | Down |AltGr | | ~L1 | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | App | LGui | | Alt |Ctrl/Esc| + * ,------|------|------| |------+--------+------. + * | | | Home | | PgUp | | | + * | Space|Backsp|------| |------| Tab |Enter | + * | |ace | End | | PgDn | | | + * `--------------------' `----------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[BASE] = KEYMAP( // layer 0 : default + // left hand + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, + KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), + KC_BSPC, LT(MDIA, KC_A),KC_S, KC_D, KC_F, KC_G, + KC_LSFT, CTL_T(KC_Z), ALT_T(KC_X), KC_C, KC_V, KC_B, ALL_T(KC_NO), + LT(SYMB,KC_NONUS_BSLASH), KC_EQL, KC_BSLS, KC_LEFT,KC_RGHT, + ALT_T(KC_APP), KC_LGUI, + KC_HOME, + KC_SPC,KC_BSPC,KC_END, + // right hand + KC_RGHT, 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_LBRC, + KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), + MEH_T(KC_NO),KC_N, KC_M, KC_COMM,ALT_T(KC_DOT), CTL_T(KC_SLSH), KC_RSFT, + KC_UP, KC_DOWN,KC_RALT,KC_RBRC, KC_FN1, + KC_LALT,CTL_T(KC_ESC), + KC_PGUP, + KC_PGDN,KC_TAB, KC_ENT + ), +/* Keymap 1: Symbol Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | EPRM | | | | | ? | . | 0 | = | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[SYMB] = KEYMAP( + // left hand + M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + KC_TRNS,ACTION_MODS_KEY(MOD_LSFT, KC_RBRC), ACTION_MODS_KEY(MOD_RALT, KC_2), ACTION_MODS_KEY(MOD_RALT, KC_QUOT), ACTION_MODS_KEY(MOD_RALT, KC_BSLS),ACTION_MODS_KEY(MOD_RALT,KC_7),KC_TRNS, + KC_TRNS,ACTION_MODS_KEY(MOD_RALT,KC_3),KC_BSLS, ACTION_MODS_KEY(MOD_LSFT, KC_8), ACTION_MODS_KEY(MOD_RSFT, KC_9),ACTION_MODS_KEY(MOD_LSFT,KC_EQL), + KC_TRNS,ACTION_MODS_KEY(MOD_LSFT,KC_5),KC_EQL, ACTION_MODS_KEY(MOD_RALT, KC_LBRC), ACTION_MODS_KEY(MOD_RALT, KC_RBRC),ACTION_MODS_KEY(MOD_RALT,KC_EQL),KC_TRNS, + KC_TRNS,EPRM,KC_TRNS,KC_NONUS_BSLASH, ACTION_MODS_KEY(MOD_LSFT, KC_NONUS_BSLASH)/*KC_TRNS,KC_TRNS*/, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + // right hand + KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_TRNS, KC_UP, KC_7, KC_8, KC_9, ACTION_MODS_KEY(MOD_RSFT,KC_3), KC_F12, + KC_DOWN, KC_4, KC_5, KC_6, ACTION_MODS_KEY(MOD_RSFT,KC_1), KC_TRNS, + KC_TRNS, ACTION_MODS_KEY(MOD_RSFT,KC_6), KC_1, KC_2, KC_3, ACTION_MODS_KEY(MOD_RALT,KC_NONUS_BSLASH), KC_TRNS, + ACTION_MODS_KEY(MOD_RSFT,KC_MINS),KC_DOT, KC_0, KC_EQL, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +/* Keymap 2: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | RESET | | | | | | | | | | | | | | RESET | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | MsUp | | | | | | |H_UL | |H_OL | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| |------| |------| | | |H_LI | | Play | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |H_CODE| | | | | | | | | Prev | Next | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | |Brwser| + * | | |------| |------| |Back | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// MEDIA AND MOUSE +[MDIA] = KEYMAP( + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, HTML_CODE, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, + KC_TRNS, KC_TRNS, HTML_UL, KC_TRNS, HTML_OL, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, HTML_LI, KC_TRNS, KC_MPLY, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_WBAK +), +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + break; + case 1: + if (record->event.pressed) { // For resetting EEPROM + eeconfig_init(); + } + break; + case 10: + if (record->event.pressed) { + SEND_TAG("li"); + } + break; + case 11: + if (record->event.pressed) { + SEND_TAG("ul"); + } + break; + case 12: + if (record->event.pressed) { + SEND_TAG("ol"); + } + break; + case 13: + if (record->event.pressed) { + SEND_TAG("code"); + } + break; + } + return MACRO_NONE; +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + uint8_t layer = biton32(layer_state); + + switch (layer) { + // TODO: Make this relevant to the ErgoDox EZ. + case 0: + ergodox_board_led_off(); + lcd_backlight_hal_color(0, 0, 0); + break; + case 1: + lcd_backlight_hal_color(5000, 0, 0); + break; + case 2: + lcd_backlight_hal_color(0, 5000, 0); + break; + default: + // none + break; + } + +}; + +void send_key(uint16_t keycode) { + register_code(keycode); + unregister_code(keycode); +} + +void go_back_based_on_tag(char* tag) { + const int BRACKETS_AND_SLASH_LENGTH = 3; + + for (int i=0; i < strlen(tag) + BRACKETS_AND_SLASH_LENGTH; i++) { + send_key(KC_LEFT); + } +} + +void send_larger_than() { + register_code(KC_LSFT); + send_key(KC_NONUS_BSLASH); + unregister_code(KC_LSFT); + +} diff --git a/keyboards/ergodox/keymaps/swissgerman_infinity/readme.md b/keyboards/ergodox/keymaps/swissgerman_infinity/readme.md new file mode 100644 index 000000000..1c35f7473 --- /dev/null +++ b/keyboards/ergodox/keymaps/swissgerman_infinity/readme.md @@ -0,0 +1,14 @@ +# ErgoDox Infinity Swiss German Configuration + +Swiss German keyboard layout based on the Ergodox EZ default layout. + +Keyboard diagrams created with the [keyboard layout editor](http://www.keyboard-layout-editor.com). + +Diagram sources: [default layer](keyboard-layout.json), [layer 2 & 3](keyboard-layout_2_3.json) + +![Layout Layer 0](keyboard-layout.png) +![Layout Layer 1&2](keyboard-layout_1_2.png) + +## Changelog +* Jan 21, 2017: + * Initial version. -- cgit v1.2.3 From 4cf0f7dd16d60aef363e91977597334017e60924 Mon Sep 17 00:00:00 2001 From: lucwastiaux Date: Sat, 21 Jan 2017 23:42:23 +0800 Subject: make shell layer more compatible with default layer --- .../ergodox/keymaps/dvorak_programmer/keymap.c | 31 +++++++++++----------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c index 2bb5bcd12..7ed0c7f12 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c +++ b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c @@ -61,7 +61,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, LT(SHELL_NAV,KC_TAB), KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, MO(KEY_SEL), OSL(BRACKETS), KC_A, KC_O, KC_E, KC_U, KC_I, - KC_FN3, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, MO(KEY_NAV), + OSM(MOD_LSFT), KC_SCLN, KC_Q, KC_J, KC_K, KC_X, MO(KEY_NAV), OSL(SHORTCUTS),KC_FN4, KC_FN5,OSL(SYMBOL),MO(NUMBER), // thumb cluster MO(MOUSE), RCTL(KC_S), @@ -81,30 +81,31 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), -// permanent shell layer - meant to be used while in a terminal + +// permanent shell layer - meant to be used while in a terminal. only the top keys are overriden [SHELL_LAYER] = KEYMAP( // left hand - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,M(SCREEN_COPY_MODE), M(SCREEN_PASTE),M(SHELL_RECALL_LAST_ARG_REMOVE_FIRST_COMMAND), - KC_TAB, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,RCTL(KC_R), + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,LALT(KC_DOT),RCTL(KC_R),RCTL(KC_C), + 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,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,LALT(KC_DOT), + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, // bottom row KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, // thumb cluster - LALT(KC_B),LALT(KC_F), - LALT(KC_D), - KC_TRNS,RCTL(KC_W),KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, // right hand - RCTL(KC_C), KC_LEFT, KC_RIGHT, RCTL(KC_U), RCTL(KC_K), KC_TRNS, KC_TRNS, - KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + RCTL(KC_W), LALT(KC_B),LALT(KC_F), KC_LEFT, KC_RIGHT, LALT(KC_D), 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_DOWN, 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, // bottom row - M(SCREEN_TAB_LEFT), M(SCREEN_TAB_RIGHT), M(SCREEN_NEW_TAB), KC_TRNS, MEH(KC_V), + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, // thumb cluster - KC_LEFT, KC_RIGHT, - KC_HOME, - KC_END, KC_TRNS, KC_TRNS + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS ), // shell navigation layer -- cgit v1.2.3 From f7462aaa613a08ba4b86dbb912ce26722cfccaff Mon Sep 17 00:00:00 2001 From: Luiz Ribeiro Date: Sat, 21 Jan 2017 12:30:06 -0500 Subject: Got ps2avrGB to work with the V-USB protocol --- build_keyboard.mk | 4 + keyboards/ps2avrGB/Makefile | 3 + keyboards/ps2avrGB/README.md | 61 +++++ keyboards/ps2avrGB/config.h | 44 ++++ keyboards/ps2avrGB/keymaps/default/keymap.c | 34 +++ keyboards/ps2avrGB/matrix.c | 105 ++++++++ keyboards/ps2avrGB/program | 74 ++++++ keyboards/ps2avrGB/ps2avrGB.c | 0 keyboards/ps2avrGB/ps2avrGB.h | 54 ++++ keyboards/ps2avrGB/rules.mk | 38 +++ keyboards/ps2avrGB/usbconfig.h | 396 ++++++++++++++++++++++++++++ tmk_core/common.mk | 8 + tmk_core/common/avr/bootloader.c | 10 + tmk_core/common/avr/suspend.c | 2 + tmk_core/common/avr/timer.c | 33 ++- tmk_core/common/command.c | 2 + tmk_core/protocol/vusb.mk | 7 +- tmk_core/protocol/vusb/main.c | 6 +- tmk_core/protocol/vusb/vusb.c | 22 +- 19 files changed, 886 insertions(+), 17 deletions(-) create mode 100644 keyboards/ps2avrGB/Makefile create mode 100644 keyboards/ps2avrGB/README.md create mode 100644 keyboards/ps2avrGB/config.h create mode 100644 keyboards/ps2avrGB/keymaps/default/keymap.c create mode 100644 keyboards/ps2avrGB/matrix.c create mode 100755 keyboards/ps2avrGB/program create mode 100644 keyboards/ps2avrGB/ps2avrGB.c create mode 100644 keyboards/ps2avrGB/ps2avrGB.h create mode 100644 keyboards/ps2avrGB/rules.mk create mode 100644 keyboards/ps2avrGB/usbconfig.h diff --git a/build_keyboard.mk b/build_keyboard.mk index ce505de12..b85557d4a 100644 --- a/build_keyboard.mk +++ b/build_keyboard.mk @@ -221,7 +221,11 @@ OPT_DEFS += $(TMK_COMMON_DEFS) EXTRALDFLAGS += $(TMK_COMMON_LDFLAGS) ifeq ($(PLATFORM),AVR) +ifeq ($(strip $(PROTOCOL)), VUSB) + include $(TMK_PATH)/protocol/vusb.mk +else include $(TMK_PATH)/protocol/lufa.mk +endif include $(TMK_PATH)/avr.mk endif diff --git a/keyboards/ps2avrGB/Makefile b/keyboards/ps2avrGB/Makefile new file mode 100644 index 000000000..57b2ef62e --- /dev/null +++ b/keyboards/ps2avrGB/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif diff --git a/keyboards/ps2avrGB/README.md b/keyboards/ps2avrGB/README.md new file mode 100644 index 000000000..f8360aec0 --- /dev/null +++ b/keyboards/ps2avrGB/README.md @@ -0,0 +1,61 @@ +ps2avrGB keyboard firmware +========================== + +This is a port of the QMK firmware for boards that are based on the +ps2avrGB firmware, like the [ps2avrGB +keyboard](https://www.keyclack.com/product/gb-ps2avrgb/) or the ones sold +by [Winkeyless](http://winkeyless.kr/product/ps2avrgb-parts/). + +Note that this is a complete replacement for the firmware, so you won't be +using Bootmapper Client to change any keyboard settings, since not all the +USB report options are supported. + +## Supported Boards + +Only the [B.mini X2](http://winkeyless.kr/product/b-mini-x2-pcb/) has been +tested so far (since it's the only one I own). But other boards that use +the ps2avrGB firmware should work as well. + +## Installing + +First, install the requirements. These commands are for OSX, but all you +need is the AVR toolchain and `bootloadHID` for flashing: + +``` +$ brew cask install crosspack-avr +$ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb +``` + +In order to use the `./program` script, which can reboot the board into +the bootloader, you'll need Python 2 with PyUSB installed: + +``` +$ pip install pyusb +``` + +Then, with the keyboard plugged in, simply run this command from the +`qmk_firmware` directory: + +``` +$ make ps2avrGB-program +``` + +If you prefer, you can just build it and flash the firmware directly with +`bootloadHID` if you boot the board while holding down `L_Ctrl` to keep it +in the bootloader: + +``` +$ make ps2avrGB +$ bootloadHID -r ps2avrGB_default.hex +``` + +## Troubleshooting + +From my experience, it's really hard to brick these boards. But these +tricks have been useful when it got stuck in a weird scenario. + +1. Try plugging the board in while pressing `L_Ctrl`. This will force it + to boot only the bootloader without loading the firmware. Once this is + done, just reflash the board with the original firmware. +2. Sometimes USB hubs can act weird, so try connecting the board directly + to your computer or plugging/unplugging the USB hub. diff --git a/keyboards/ps2avrGB/config.h b/keyboards/ps2avrGB/config.h new file mode 100644 index 000000000..cd5d1ab5a --- /dev/null +++ b/keyboards/ps2avrGB/config.h @@ -0,0 +1,44 @@ +/* +Copyright 2017 Luiz Ribeiro + +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" + +#define VENDOR_ID 0x20A0 +#define PRODUCT_ID 0x422D +// TODO: share these strings with usbconfig.h +// Edit usbconfig.h to change these. +#define MANUFACTURER winkeyless.kr +#define PRODUCT ps2avrGB + +/* matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 15 + +/* only support one hard-coded backlight color for now */ +#define BACKLIGHT_LEVELS 0 +#define BACKLIGHT_COLOR 0x110000 + +#define NO_UART 1 +#define EEPROM_BOOTLOADER_START 1 + +/* key combination for command */ +#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +#endif diff --git a/keyboards/ps2avrGB/keymaps/default/keymap.c b/keyboards/ps2avrGB/keymaps/default/keymap.c new file mode 100644 index 000000000..43cc6bce3 --- /dev/null +++ b/keyboards/ps2avrGB/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +#include "ps2avrGB.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + KEYMAP( \ + ESC, NO, NO, NO, NO, NO, NO, MPRV,MPLY,MNXT,MUTE,VOLD,VOLU,PSCR,HOME,END, \ + GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, DEL, \ + TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, FN1, \ + FN2, A, S, D, F, G, H, J, K, L, SCLN,QUOT,ENT, PGUP,\ + LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH,RSFT, UP, PGDN,\ + FN0, LALT,LGUI, SPC, RGUI,RALT,RCTL,LEFT,DOWN,RGHT \ + ), + KEYMAP( \ + NO, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, NO, NO, NO, \ + NO, NO, NO, NO, NO, NO, NO, MPRV,MPLY,MNXT,MUTE,VOLD,VOLU,DEL, NO, \ + NO, NO, NO, NO, NO, NO, NO, PGUP,NO, NO, NO, NO, NO, NO, TRNS,\ + FN2, NO, NO, PGDN,NO, NO, LEFT,DOWN,UP, RGHT,NO, NO, NO, NO, \ + TRNS,NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, TRNS, NO, NO, \ + TRNS,TRNS,TRNS, NO, TRNS,TRNS,TRNS,NO, NO, NO \ + ), + KEYMAP( \ + NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \ + NO, NO, NO, NO, END, NO, NO, NO, NO, NO, HOME,NO, NO, NO, NO, \ + NO, BTN1,MS_U,BTN2,NO, NO, NO, PGUP,FN1, NO, NO, NO, NO, NO, TRNS,\ + FN2, MS_L,MS_D,MS_R,NO, NO, LEFT,DOWN,UP, RGHT,NO, NO, NO, NO, \ + TRNS,NO, DEL, NO, NO, NO, NO, NO, NO, NO, NO, TRNS, NO, NO, \ + TRNS,TRNS,TRNS, NO, TRNS,TRNS,TRNS,NO, NO, NO \ + ), +}; + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_MOMENTARY(1), + [1] = ACTION_LAYER_TOGGLE(2), + [2] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_ESC), +}; diff --git a/keyboards/ps2avrGB/matrix.c b/keyboards/ps2avrGB/matrix.c new file mode 100644 index 000000000..e487ca182 --- /dev/null +++ b/keyboards/ps2avrGB/matrix.c @@ -0,0 +1,105 @@ +/* +Copyright 2017 Luiz Ribeiro + +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 +#include + +#include "matrix.h" + +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif + +static uint8_t debouncing = DEBOUNCE; + +static matrix_row_t matrix[MATRIX_ROWS]; +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + +void matrix_init(void) { + // all outputs for rows high + DDRB = 0xFF; + PORTB = 0xFF; + // all inputs for columns + DDRA = 0x00; + DDRC &= ~(0x111111<<2); + DDRD &= ~(1<> 1) & 0x55) | ((x << 1) & 0xaa); + x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); + x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); + return x; +} + +uint8_t matrix_scan(void) { + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + matrix_set_row_status(row); + _delay_us(5); + + matrix_row_t cols = ( + // cols 0..7, PORTA 0 -> 7 + (~PINA) & 0xFF + ) | ( + // cols 8..13, PORTC 7 -> 0 + bit_reverse((~PINC) & 0xFF) << 8 + ) | ( + // col 14, PORTD 7 + ((~PIND) & (1 << PIND7)) << 7 + ); + + if (matrix_debouncing[row] != cols) { + matrix_debouncing[row] = cols; + debouncing = DEBOUNCE; + } + } + + if (debouncing) { + if (--debouncing) { + _delay_ms(1); + } else { + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + matrix[i] = matrix_debouncing[i]; + } + } + } + + return 1; +} + +inline matrix_row_t matrix_get_row(uint8_t row) { + return matrix[row]; +} + +void matrix_print(void) +{ +} diff --git a/keyboards/ps2avrGB/program b/keyboards/ps2avrGB/program new file mode 100755 index 000000000..a88d9cd9b --- /dev/null +++ b/keyboards/ps2avrGB/program @@ -0,0 +1,74 @@ +#!/usr/bin/env python +# Copyright 2017 Luiz Ribeiro +# +# 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 . + +from __future__ import print_function + +import os +import sys +import time +import usb + +if len(sys.argv) < 2: + print('Usage: %s ' % sys.argv[0]) + sys.exit(1) + +print('Searching for ps2avrGB... ', end='') + +dev = usb.core.find(idVendor=0x20A0, idProduct=0x422D) +if dev is None: + raise ValueError('Device not found') + +print('Found', end='\n\n') + +print('Device Information:') +print(' idVendor: %d (0x%04x)' % (dev.idVendor, dev.idVendor)) +print(' idProduct: %d (0x%04x)' % (dev.idProduct, dev.idProduct)) +print('Manufacturer: %s' % (dev.iManufacturer)) +print('Serial: %s' % (dev.iSerialNumber)) +print('Product: %s' % (dev.iProduct), end='\n\n') + +print('Transferring control to bootloader... ', end='') + +dev.set_configuration() + +request_type = usb.util.build_request_type( + usb.util.CTRL_OUT, + usb.util.CTRL_TYPE_CLASS, + usb.util.CTRL_RECIPIENT_DEVICE) + +USBRQ_HID_SET_REPORT = 0x09 +HID_REPORT_OPTION = 0x0301 + + +try: + dev.ctrl_transfer( + request_type, + USBRQ_HID_SET_REPORT, + HID_REPORT_OPTION, + 0, + [0, 0, 0xFF] + [0] * 5 + ) +except usb.core.USBError: + # for some reason I keep getting USBError, but it works! + pass + +# wait a bit until bootloader starts up +time.sleep(2) + +print('OK') +print('Programming...') +if os.system('bootloadHID -r "%s"' % sys.argv[1]) == 0: + print('\nDone!') diff --git a/keyboards/ps2avrGB/ps2avrGB.c b/keyboards/ps2avrGB/ps2avrGB.c new file mode 100644 index 000000000..e69de29bb diff --git a/keyboards/ps2avrGB/ps2avrGB.h b/keyboards/ps2avrGB/ps2avrGB.h new file mode 100644 index 000000000..1da26adb2 --- /dev/null +++ b/keyboards/ps2avrGB/ps2avrGB.h @@ -0,0 +1,54 @@ +/* +Copyright 2017 Luiz Ribeiro + +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 KEYMAP_COMMON_H +#define KEYMAP_COMMON_H + +#include +#include +#include "keycode.h" +#include "action.h" +#include "action_code.h" +#include "action_layer.h" +#include "action_macro.h" +#include "action_util.h" +#include "report.h" +#include "host.h" +#include "print.h" +#include "debug.h" +#include "keymap.h" + + +#define KEYMAP( \ + K05, K25, K35, K45, K55, K06, KA6, KA7, K07, KB5, KC5, KD5, KE5, KD1, KE1, KE2, \ + K04, K14, K24, K34, K44, K54, K16, KB6, KB7, K17, KA4, KB4, KC4, KE4, KD0, \ + K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3, KC3, KD3, K67, \ + K02, K12, K22, K32, K42, K52, K36, KD6, KD7, K37, KA2, KB2, KD2, KE0, \ + K01, K11, K21, K31, K41, K51, K46, KE6, KE7, K47, KA1, KB1, K86, K77, \ + K00, K10, K20, K56, K57, KB0, KC0, K66, K76, K96 \ +) \ +{ \ + { KC_##K00, KC_##K10, KC_##K20, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KB0, KC_##KC0, KC_##KD0, KC_##KE0 }, \ + { KC_##K01, KC_##K11, KC_##K21, KC_##K31, KC_##K41, KC_##K51, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA1, KC_##KB1, KC_NO, KC_##KD1, KC_##KE1 }, \ + { KC_##K02, KC_##K12, KC_##K22, KC_##K32, KC_##K42, KC_##K52, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA2, KC_##KB2, KC_NO, KC_##KD2, KC_##KE2 }, \ + { KC_##K03, KC_##K13, KC_##K23, KC_##K33, KC_##K43, KC_##K53, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA3, KC_##KB3, KC_##KC3, KC_##KD3, KC_NO }, \ + { KC_##K04, KC_##K14, KC_##K24, KC_##K34, KC_##K44, KC_##K54, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA4, KC_##KB4, KC_##KC4, KC_NO, KC_##KE4 }, \ + { KC_##K05, KC_NO, KC_##K25, KC_##K35, KC_##K45, KC_##K55, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KB5, KC_##KC5, KC_##KD5, KC_##KE5 }, \ + { KC_##K06, KC_##K16, KC_##K26, KC_##K36, KC_##K46, KC_##K56, KC_##K66, KC_##K76, KC_##K86, KC_##K96, KC_##KA6, KC_##KB6, KC_##KC6, KC_##KD6, KC_##KE6 }, \ + { KC_##K07, KC_##K17, KC_##K27, KC_##K37, KC_##K47, KC_##K57, KC_##K67, KC_##K77, KC_NO, KC_NO, KC_##KA7, KC_##KB7, KC_##KC7, KC_##KD7, KC_##KE7 } \ +} + +#endif diff --git a/keyboards/ps2avrGB/rules.mk b/keyboards/ps2avrGB/rules.mk new file mode 100644 index 000000000..d747e8929 --- /dev/null +++ b/keyboards/ps2avrGB/rules.mk @@ -0,0 +1,38 @@ +# MCU name +MCU = atmega32a + +PROTOCOL = VUSB + +# disable UART since atmega32a apparently doesn't have it +NO_UART = yes +# this simplifies things for now +NO_SUSPEND_POWER_DOWN = yes + +# Processor frequency. +# Normally the first thing your program should do is set the clock prescaler, +# so your program will run at the correct speed. You should also set this +# variable to same clock speed. The _delay_ms() macro uses this, and many +# examples use this variable to calculate timings. Do not add a "UL" here. +F_CPU = 12000000 + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +#BACKLIGHT_ENABLE = yes + +# V-USB debug level: To use ps2_usart.c level must be 0 +# ps2_usart.c requires USART to receive PS/2 signal. +OPT_DEFS = -DDEBUG_LEVEL=0 +OPS_DEFS += -DPROTOCOL_VUSB +OPT_DEFS += -DBOOTLOADER_SIZE=2048 + +CUSTOM_MATRIX = yes +SRC = matrix.c + +#---------------- Programming Options -------------------------- +PROGRAM_CMD = ./keyboards/ps2avrGB/program $(TARGET).hex diff --git a/keyboards/ps2avrGB/usbconfig.h b/keyboards/ps2avrGB/usbconfig.h new file mode 100644 index 000000000..d2d848fcd --- /dev/null +++ b/keyboards/ps2avrGB/usbconfig.h @@ -0,0 +1,396 @@ +/* Name: usbconfig.h + * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers + * Author: Christian Starkjohann + * Creation Date: 2005-04-01 + * Tabsize: 4 + * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH + * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) + * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ + */ + +#ifndef __usbconfig_h_included__ +#define __usbconfig_h_included__ + +#include "config.h" + +/* +General Description: +This file is an example configuration (with inline documentation) for the USB +driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is +also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may +wire the lines to any other port, as long as D+ is also wired to INT0 (or any +other hardware interrupt, as long as it is the highest level interrupt, see +section at the end of this file). +*/ + +/* ---------------------------- Hardware Config ---------------------------- */ + +#define USB_CFG_IOPORTNAME D +/* This is the port where the USB bus is connected. When you configure it to + * "B", the registers PORTB, PINB and DDRB will be used. + */ +#define USB_CFG_DMINUS_BIT 3 +/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. + * This may be any bit in the port. + */ +#define USB_CFG_DPLUS_BIT 2 +/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. + * This may be any bit in the port. Please note that D+ must also be connected + * to interrupt pin INT0! [You can also use other interrupts, see section + * "Optional MCU Description" below, or you can connect D- to the interrupt, as + * it is required if you use the USB_COUNT_SOF feature. If you use D- for the + * interrupt, the USB interrupt will also be triggered at Start-Of-Frame + * markers every millisecond.] + */ +#define USB_CFG_CLOCK_KHZ (F_CPU/1000) +/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000, + * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code + * require no crystal, they tolerate +/- 1% deviation from the nominal + * frequency. All other rates require a precision of 2000 ppm and thus a + * crystal! + * Since F_CPU should be defined to your actual clock rate anyway, you should + * not need to modify this setting. + */ +#define USB_CFG_CHECK_CRC 0 +/* Define this to 1 if you want that the driver checks integrity of incoming + * data packets (CRC checks). CRC checks cost quite a bit of code size and are + * currently only available for 18 MHz crystal clock. You must choose + * USB_CFG_CLOCK_KHZ = 18000 if you enable this option. + */ + +/* ----------------------- Optional Hardware Config ------------------------ */ + +/* #define USB_CFG_PULLUP_IOPORTNAME D */ +/* If you connect the 1.5k pullup resistor from D- to a port pin instead of + * V+, you can connect and disconnect the device from firmware by calling + * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h). + * This constant defines the port on which the pullup resistor is connected. + */ +/* #define USB_CFG_PULLUP_BIT 4 */ +/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined + * above) where the 1.5k pullup resistor is connected. See description + * above for details. + */ + +/* --------------------------- Functional Range ---------------------------- */ + +#define USB_CFG_HAVE_INTRIN_ENDPOINT 1 +/* Define this to 1 if you want to compile a version with two endpoints: The + * default control endpoint 0 and an interrupt-in endpoint (any other endpoint + * number). + */ +#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1 +/* Define this to 1 if you want to compile a version with three endpoints: The + * default control endpoint 0, an interrupt-in endpoint 3 (or the number + * configured below) and a catch-all default interrupt-in endpoint as above. + * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. + */ +#define USB_CFG_EP3_NUMBER 3 +/* If the so-called endpoint 3 is used, it can now be configured to any other + * endpoint number (except 0) with this macro. Default if undefined is 3. + */ +/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ +/* The above macro defines the startup condition for data toggling on the + * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. + * Since the token is toggled BEFORE sending any data, the first packet is + * sent with the oposite value of this configuration! + */ +#define USB_CFG_IMPLEMENT_HALT 0 +/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature + * for endpoint 1 (interrupt endpoint). Although you may not need this feature, + * it is required by the standard. We have made it a config option because it + * bloats the code considerably. + */ +#define USB_CFG_SUPPRESS_INTR_CODE 0 +/* Define this to 1 if you want to declare interrupt-in endpoints, but don't + * want to send any data over them. If this macro is defined to 1, functions + * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if + * you need the interrupt-in endpoints in order to comply to an interface + * (e.g. HID), but never want to send any data. This option saves a couple + * of bytes in flash memory and the transmit buffers in RAM. + */ +#define USB_CFG_INTR_POLL_INTERVAL 1 +/* If you compile a version with endpoint 1 (interrupt-in), this is the poll + * interval. The value is in milliseconds and must not be less than 10 ms for + * low speed devices. + */ +#define USB_CFG_IS_SELF_POWERED 0 +/* Define this to 1 if the device has its own power supply. Set it to 0 if the + * device is powered from the USB bus. + */ +#define USB_CFG_MAX_BUS_POWER 500 +/* Set this variable to the maximum USB bus power consumption of your device. + * The value is in milliamperes. [It will be divided by two since USB + * communicates power requirements in units of 2 mA.] + */ +#define USB_CFG_IMPLEMENT_FN_WRITE 1 +/* Set this to 1 if you want usbFunctionWrite() to be called for control-out + * transfers. Set it to 0 if you don't need it and want to save a couple of + * bytes. + */ +#define USB_CFG_IMPLEMENT_FN_READ 0 +/* Set this to 1 if you need to send control replies which are generated + * "on the fly" when usbFunctionRead() is called. If you only want to send + * data from a static buffer, set it to 0 and return the data from + * usbFunctionSetup(). This saves a couple of bytes. + */ +#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0 +/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints. + * You must implement the function usbFunctionWriteOut() which receives all + * interrupt/bulk data sent to any endpoint other than 0. The endpoint number + * can be found in 'usbRxToken'. + */ +#define USB_CFG_HAVE_FLOWCONTROL 0 +/* Define this to 1 if you want flowcontrol over USB data. See the definition + * of the macros usbDisableAllRequests() and usbEnableAllRequests() in + * usbdrv.h. + */ +#define USB_CFG_DRIVER_FLASH_PAGE 0 +/* If the device has more than 64 kBytes of flash, define this to the 64 k page + * where the driver's constants (descriptors) are located. Or in other words: + * Define this to 1 for boot loaders on the ATMega128. + */ +#define USB_CFG_LONG_TRANSFERS 0 +/* Define this to 1 if you want to send/receive blocks of more than 254 bytes + * in a single control-in or control-out transfer. Note that the capability + * for long transfers increases the driver size. + */ +/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */ +/* This macro is a hook if you want to do unconventional things. If it is + * defined, it's inserted at the beginning of received message processing. + * If you eat the received message and don't want default processing to + * proceed, do a return after doing your things. One possible application + * (besides debugging) is to flash a status LED on each packet. + */ +/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */ +/* This macro is a hook if you need to know when an USB RESET occurs. It has + * one parameter which distinguishes between the start of RESET state and its + * end. + */ +/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */ +/* This macro (if defined) is executed when a USB SET_ADDRESS request was + * received. + */ +#define USB_COUNT_SOF 1 +/* define this macro to 1 if you need the global variable "usbSofCount" which + * counts SOF packets. This feature requires that the hardware interrupt is + * connected to D- instead of D+. + */ +/* #ifdef __ASSEMBLER__ + * macro myAssemblerMacro + * in YL, TCNT0 + * sts timer0Snapshot, YL + * endm + * #endif + * #define USB_SOF_HOOK myAssemblerMacro + * This macro (if defined) is executed in the assembler module when a + * Start Of Frame condition is detected. It is recommended to define it to + * the name of an assembler macro which is defined here as well so that more + * than one assembler instruction can be used. The macro may use the register + * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages + * immediately after an SOF pulse may be lost and must be retried by the host. + * What can you do with this hook? Since the SOF signal occurs exactly every + * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in + * designs running on the internal RC oscillator. + * Please note that Start Of Frame detection works only if D- is wired to the + * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES! + */ +#define USB_CFG_CHECK_DATA_TOGGLING 0 +/* define this macro to 1 if you want to filter out duplicate data packets + * sent by the host. Duplicates occur only as a consequence of communication + * errors, when the host does not receive an ACK. Please note that you need to + * implement the filtering yourself in usbFunctionWriteOut() and + * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable + * for each control- and out-endpoint to check for duplicate packets. + */ +#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0 +/* define this macro to 1 if you want the function usbMeasureFrameLength() + * compiled in. This function can be used to calibrate the AVR's RC oscillator. + */ +#define USB_USE_FAST_CRC 0 +/* The assembler module has two implementations for the CRC algorithm. One is + * faster, the other is smaller. This CRC routine is only used for transmitted + * messages where timing is not critical. The faster routine needs 31 cycles + * per byte while the smaller one needs 61 to 69 cycles. The faster routine + * may be worth the 32 bytes bigger code size if you transmit lots of data and + * run the AVR close to its limit. + */ + +/* -------------------------- Device Description --------------------------- */ + +#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF) +/* USB vendor ID for the device, low byte first. If you have registered your + * own Vendor ID, define it here. Otherwise you may use one of obdev's free + * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF) +/* This is the ID of the product, low byte first. It is interpreted in the + * scope of the vendor ID. If you have registered your own VID with usb.org + * or if you have licensed a PID from somebody else, define it here. Otherwise + * you may use one of obdev's free shared VID/PID pairs. See the file + * USB-IDs-for-free.txt for details! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_VERSION 0x00, 0x02 +/* Version number of the device: Minor number first, then major number. + */ +#define USB_CFG_VENDOR_NAME 'w', 'i', 'n', 'k', 'e', 'y', 'l', 'e', 's', 's', '.', 'k', 'r' +#define USB_CFG_VENDOR_NAME_LEN 13 +/* These two values define the vendor name returned by the USB device. The name + * must be given as a list of characters under single quotes. The characters + * are interpreted as Unicode (UTF-16) entities. + * If you don't want a vendor name string, undefine these macros. + * ALWAYS define a vendor name containing your Internet domain name if you use + * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for + * details. + */ +#define USB_CFG_DEVICE_NAME 'p', 's', '2', 'a', 'v', 'r', 'G', 'B' +#define USB_CFG_DEVICE_NAME_LEN 8 +/* Same as above for the device name. If you don't want a device name, undefine + * the macros. See the file USB-IDs-for-free.txt before you assign a name if + * you use a shared VID/PID. + */ +/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */ +/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */ +/* Same as above for the serial number. If you don't want a serial number, + * undefine the macros. + * It may be useful to provide the serial number through other means than at + * compile time. See the section about descriptor properties below for how + * to fine tune control over USB descriptors such as the string descriptor + * for the serial number. + */ +#define USB_CFG_DEVICE_CLASS 0 +#define USB_CFG_DEVICE_SUBCLASS 0 +/* See USB specification if you want to conform to an existing device class. + * Class 0xff is "vendor specific". + */ +#define USB_CFG_INTERFACE_CLASS 3 /* HID */ +#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */ +#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */ +/* See USB specification if you want to conform to an existing device class or + * protocol. The following classes must be set at interface level: + * HID class is 3, no subclass and protocol required (but may be useful!) + * CDC class is 2, use subclass 2 and protocol 1 for ACM + */ +#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0 +/* Define this to the length of the HID report descriptor, if you implement + * an HID device. Otherwise don't define it or define it to 0. + * If you use this define, you must add a PROGMEM character array named + * "usbHidReportDescriptor" to your code which contains the report descriptor. + * Don't forget to keep the array and this define in sync! + */ + +/* #define USB_PUBLIC static */ +/* Use the define above if you #include usbdrv.c instead of linking against it. + * This technique saves a couple of bytes in flash memory. + */ + +/* ------------------- Fine Control over USB Descriptors ------------------- */ +/* If you don't want to use the driver's default USB descriptors, you can + * provide our own. These can be provided as (1) fixed length static data in + * flash memory, (2) fixed length static data in RAM or (3) dynamically at + * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more + * information about this function. + * Descriptor handling is configured through the descriptor's properties. If + * no properties are defined or if they are 0, the default descriptor is used. + * Possible properties are: + * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched + * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is + * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if + * you want RAM pointers. + * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found + * in static memory is in RAM, not in flash memory. + * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash), + * the driver must know the descriptor's length. The descriptor itself is + * found at the address of a well known identifier (see below). + * List of static descriptor names (must be declared PROGMEM if in flash): + * char usbDescriptorDevice[]; + * char usbDescriptorConfiguration[]; + * char usbDescriptorHidReport[]; + * char usbDescriptorString0[]; + * int usbDescriptorStringVendor[]; + * int usbDescriptorStringDevice[]; + * int usbDescriptorStringSerialNumber[]; + * Other descriptors can't be provided statically, they must be provided + * dynamically at runtime. + * + * Descriptor properties are or-ed or added together, e.g.: + * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18)) + * + * The following descriptors are defined: + * USB_CFG_DESCR_PROPS_DEVICE + * USB_CFG_DESCR_PROPS_CONFIGURATION + * USB_CFG_DESCR_PROPS_STRINGS + * USB_CFG_DESCR_PROPS_STRING_0 + * USB_CFG_DESCR_PROPS_STRING_VENDOR + * USB_CFG_DESCR_PROPS_STRING_PRODUCT + * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER + * USB_CFG_DESCR_PROPS_HID + * USB_CFG_DESCR_PROPS_HID_REPORT + * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver) + * + * Note about string descriptors: String descriptors are not just strings, they + * are Unicode strings prefixed with a 2 byte header. Example: + * int serialNumberDescriptor[] = { + * USB_STRING_DESCRIPTOR_HEADER(6), + * 'S', 'e', 'r', 'i', 'a', 'l' + * }; + */ + +#define USB_CFG_DESCR_PROPS_DEVICE 0 +#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0 +#define USB_CFG_DESCR_PROPS_STRINGS 0 +#define USB_CFG_DESCR_PROPS_STRING_0 0 +#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0 +#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0 +#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 +#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID 0 +#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID_REPORT 0 +#define USB_CFG_DESCR_PROPS_UNKNOWN 0 + +#define usbMsgPtr_t unsigned short +/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to + * a scalar type here because gcc generates slightly shorter code for scalar + * arithmetics than for pointer arithmetics. Remove this define for backward + * type compatibility or define it to an 8 bit type if you use data in RAM only + * and all RAM is below 256 bytes (tiny memory model in IAR CC). + */ + +/* ----------------------- Optional MCU Description ------------------------ */ + +/* The following configurations have working defaults in usbdrv.h. You + * usually don't need to set them explicitly. Only if you want to run + * the driver on a device which is not yet supported or with a compiler + * which is not fully supported (such as IAR C) or if you use a differnt + * interrupt than INT0, you may have to define some of these. + */ +/* #define USB_INTR_CFG MCUCR */ +/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */ +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE GIMSK */ +/* #define USB_INTR_ENABLE_BIT INT0 */ +/* #define USB_INTR_PENDING GIFR */ +/* #define USB_INTR_PENDING_BIT INTF0 */ +/* #define USB_INTR_VECTOR INT0_vect */ + +/* Set INT1 for D- falling edge to count SOF */ +/* #define USB_INTR_CFG EICRA */ +#define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10)) +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE EIMSK */ +#define USB_INTR_ENABLE_BIT INT1 +/* #define USB_INTR_PENDING EIFR */ +#define USB_INTR_PENDING_BIT INTF1 +#define USB_INTR_VECTOR INT1_vect + +#endif /* __usbconfig_h_included__ */ diff --git a/tmk_core/common.mk b/tmk_core/common.mk index 3c1373c08..a86dccc61 100644 --- a/tmk_core/common.mk +++ b/tmk_core/common.mk @@ -80,6 +80,14 @@ ifeq ($(strip $(SLEEP_LED_ENABLE)), yes) TMK_COMMON_DEFS += -DNO_SUSPEND_POWER_DOWN endif +ifeq ($(strip $(NO_UART)), yes) + TMK_COMMON_DEFS += -DNO_UART +endif + +ifeq ($(strip $(NO_SUSPEND_POWER_DOWN)), yes) + TMK_COMMON_DEFS += -DNO_SUSPEND_POWER_DOWN +endif + ifeq ($(strip $(BACKLIGHT_ENABLE)), yes) TMK_COMMON_SRC += $(COMMON_DIR)/backlight.c TMK_COMMON_DEFS += -DBACKLIGHT_ENABLE diff --git a/tmk_core/common/avr/bootloader.c b/tmk_core/common/avr/bootloader.c index ad547b985..98a24d178 100644 --- a/tmk_core/common/avr/bootloader.c +++ b/tmk_core/common/avr/bootloader.c @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include @@ -89,6 +90,10 @@ void bootloader_jump(void) { _delay_ms(5); #endif + #ifdef EEPROM_BOOTLOADER_START + eeprom_write_byte((uint8_t *)EEPROM_BOOTLOADER_START, 0x00); + #endif + // watchdog reset reset_key = BOOTLOADER_RESET_KEY; wdt_enable(WDTO_250MS); @@ -114,6 +119,11 @@ void bootloader_jump(void) { #endif } +#ifdef __AVR_ATmega32A__ +// MCUSR is actually called MCUCSR in ATmega32A +#define MCUSR MCUCSR +#endif + /* this runs before main() */ void bootloader_jump_after_watchdog_reset(void) __attribute__ ((used, naked, section (".init3"))); void bootloader_jump_after_watchdog_reset(void) diff --git a/tmk_core/common/avr/suspend.c b/tmk_core/common/avr/suspend.c index 0c81e8361..0e97892d9 100644 --- a/tmk_core/common/avr/suspend.c +++ b/tmk_core/common/avr/suspend.c @@ -65,6 +65,7 @@ static uint8_t wdt_timeout = 0; static void power_down(uint8_t wdto) { +#ifndef __AVR_ATmega32A__ #ifdef PROTOCOL_LUFA if (USB_DeviceState == DEVICE_STATE_Configured) return; #endif @@ -99,6 +100,7 @@ static void power_down(uint8_t wdto) // Disable watchdog after sleep wdt_disable(); +#endif } #endif diff --git a/tmk_core/common/avr/timer.c b/tmk_core/common/avr/timer.c index 84af44488..369015200 100644 --- a/tmk_core/common/avr/timer.c +++ b/tmk_core/common/avr/timer.c @@ -29,25 +29,35 @@ volatile uint32_t timer_count; void timer_init(void) { - // Timer0 CTC mode - TCCR0A = 0x02; - #if TIMER_PRESCALER == 1 - TCCR0B = 0x01; + uint8_t prescaler = 0x01; #elif TIMER_PRESCALER == 8 - TCCR0B = 0x02; + uint8_t prescaler = 0x02; #elif TIMER_PRESCALER == 64 - TCCR0B = 0x03; + uint8_t prescaler = 0x03; #elif TIMER_PRESCALER == 256 - TCCR0B = 0x04; + uint8_t prescaler = 0x04; #elif TIMER_PRESCALER == 1024 - TCCR0B = 0x05; + uint8_t prescaler = 0x05; #else # error "Timer prescaler value is NOT vaild." #endif +#ifndef __AVR_ATmega32A__ + // Timer0 CTC mode + TCCR0A = 0x02; + + TCCR0B = prescaler; + OCR0A = TIMER_RAW_TOP; TIMSK0 = (1<. */ +#include +#include #include #include "usbdrv.h" #include "usbconfig.h" @@ -24,6 +26,7 @@ along with this program. If not, see . #include "debug.h" #include "host_driver.h" #include "vusb.h" +#include "bootloader.h" static uint8_t vusb_keyboard_leds = 0; @@ -163,6 +166,7 @@ static struct { uint16_t len; enum { NONE, + BOOTLOADER, SET_LED } kind; } last_req; @@ -193,6 +197,11 @@ usbRequest_t *rq = (void *)data; debug("SET_LED: "); last_req.kind = SET_LED; last_req.len = rq->wLength.word; +#ifdef BOOTLOADER_SIZE + } else if(rq->wValue.word == 0x0301) { + last_req.kind = BOOTLOADER; + last_req.len = rq->wLength.word; +#endif } return USB_NO_MSG; // to get data in usbFunctionWrite } else { @@ -220,6 +229,11 @@ uchar usbFunctionWrite(uchar *data, uchar len) last_req.len = 0; return 1; break; + case BOOTLOADER: + usbDeviceDisconnect(); + bootloader_jump(); + return 1; + break; case NONE: default: return -1; @@ -266,7 +280,7 @@ const PROGMEM uchar keyboard_hid_report[] = { 0x95, 0x06, // Report Count (6), 0x75, 0x08, // Report Size (8), 0x15, 0x00, // Logical Minimum (0), - 0x25, 0xFF, 0x00 // Logical Maximum(255), + 0x25, 0xFF, 0x00, // Logical Maximum(255), 0x05, 0x07, // Usage Page (Key Codes), 0x19, 0x00, // Usage Minimum (0), 0x29, 0xFF, // Usage Maximum (255), @@ -336,7 +350,7 @@ const PROGMEM uchar mouse_hid_report[] = { 0xa1, 0x01, // COLLECTION (Application) 0x85, REPORT_ID_SYSTEM, // REPORT_ID (2) 0x15, 0x01, // LOGICAL_MINIMUM (0x1) - 0x25, 0xb7, 0x00 // LOGICAL_MAXIMUM (0xb7) + 0x25, 0xb7, 0x00, // LOGICAL_MAXIMUM (0xb7) 0x19, 0x01, // USAGE_MINIMUM (0x1) 0x29, 0xb7, // USAGE_MAXIMUM (0xb7) 0x75, 0x10, // REPORT_SIZE (16) @@ -481,11 +495,11 @@ USB_PUBLIC usbMsgLen_t usbFunctionDescriptor(struct usbRequest *rq) /* interface index */ switch (rq->wIndex.word) { case 0: - usbMsgPtr = keyboard_hid_report; + usbMsgPtr = (unsigned char *)keyboard_hid_report; len = sizeof(keyboard_hid_report); break; case 1: - usbMsgPtr = mouse_hid_report; + usbMsgPtr = (unsigned char *)mouse_hid_report; len = sizeof(mouse_hid_report); break; } -- cgit v1.2.3 From 461dfd44621ef31cabc08136d4714ca24ed651fa Mon Sep 17 00:00:00 2001 From: Luiz Ribeiro Date: Sat, 21 Jan 2017 13:44:36 -0500 Subject: Simplification and code polish on ps2avrGB directory --- keyboards/ps2avrGB/config.h | 2 -- keyboards/ps2avrGB/matrix.c | 3 +-- keyboards/ps2avrGB/ps2avrGB.h | 12 ----------- keyboards/ps2avrGB/rules.mk | 47 ++++++++++++++++++++++++------------------- 4 files changed, 27 insertions(+), 37 deletions(-) diff --git a/keyboards/ps2avrGB/config.h b/keyboards/ps2avrGB/config.h index cd5d1ab5a..dfaea5979 100644 --- a/keyboards/ps2avrGB/config.h +++ b/keyboards/ps2avrGB/config.h @@ -18,8 +18,6 @@ along with this program. If not, see . #ifndef CONFIG_H #define CONFIG_H -#include "config_common.h" - #define VENDOR_ID 0x20A0 #define PRODUCT_ID 0x422D // TODO: share these strings with usbconfig.h diff --git a/keyboards/ps2avrGB/matrix.c b/keyboards/ps2avrGB/matrix.c index e487ca182..beaa54c40 100644 --- a/keyboards/ps2avrGB/matrix.c +++ b/keyboards/ps2avrGB/matrix.c @@ -100,6 +100,5 @@ inline matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; } -void matrix_print(void) -{ +void matrix_print(void) { } diff --git a/keyboards/ps2avrGB/ps2avrGB.h b/keyboards/ps2avrGB/ps2avrGB.h index 1da26adb2..1527c604e 100644 --- a/keyboards/ps2avrGB/ps2avrGB.h +++ b/keyboards/ps2avrGB/ps2avrGB.h @@ -17,20 +17,8 @@ along with this program. If not, see . #ifndef KEYMAP_COMMON_H #define KEYMAP_COMMON_H -#include -#include #include "keycode.h" #include "action.h" -#include "action_code.h" -#include "action_layer.h" -#include "action_macro.h" -#include "action_util.h" -#include "report.h" -#include "host.h" -#include "print.h" -#include "debug.h" -#include "keymap.h" - #define KEYMAP( \ K05, K25, K35, K45, K55, K06, KA6, KA7, K07, KB5, KC5, KD5, KE5, KD1, KE1, KE2, \ diff --git a/keyboards/ps2avrGB/rules.mk b/keyboards/ps2avrGB/rules.mk index d747e8929..e2b5922ea 100644 --- a/keyboards/ps2avrGB/rules.mk +++ b/keyboards/ps2avrGB/rules.mk @@ -1,38 +1,43 @@ +# Copyright 2017 Luiz Ribeiro +# +# 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 . + # MCU name MCU = atmega32a - PROTOCOL = VUSB -# disable UART since atmega32a apparently doesn't have it +# unsupported features for now NO_UART = yes -# this simplifies things for now NO_SUSPEND_POWER_DOWN = yes +BACKLIGHT_ENABLE = no -# Processor frequency. -# Normally the first thing your program should do is set the clock prescaler, -# so your program will run at the correct speed. You should also set this -# variable to same clock speed. The _delay_ms() macro uses this, and many -# examples use this variable to calculate timings. Do not add a "UL" here. +# processor frequency F_CPU = 12000000 -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration -#BACKLIGHT_ENABLE = yes +# build options +BOOTMAGIC_ENABLE = yes +MOUSEKEY_ENABLE = yes +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = yes +COMMAND_ENABLE = yes -# V-USB debug level: To use ps2_usart.c level must be 0 -# ps2_usart.c requires USART to receive PS/2 signal. OPT_DEFS = -DDEBUG_LEVEL=0 -OPS_DEFS += -DPROTOCOL_VUSB OPT_DEFS += -DBOOTLOADER_SIZE=2048 +# custom matrix setup CUSTOM_MATRIX = yes SRC = matrix.c -#---------------- Programming Options -------------------------- +# programming options PROGRAM_CMD = ./keyboards/ps2avrGB/program $(TARGET).hex -- cgit v1.2.3 From c26c81c7f3973b2b4e085b53d37ef6fbddd66c9e Mon Sep 17 00:00:00 2001 From: Andreas Schmidt Date: Sat, 21 Jan 2017 20:20:47 +0100 Subject: Merged keymap for Ergodox EZ & Infinity - Merged keymap for Ergodox EZ & Infinity into one single keymap using pre-processor macros. --- .../keymaps/swissgerman/keyboard-layout.json | 417 ++++++++++++++++++++ .../keymaps/swissgerman/keyboard-layout.png | Bin 0 -> 75633 bytes .../keymaps/swissgerman/keyboard-layout_1_2.png | Bin 0 -> 54604 bytes .../keymaps/swissgerman/keyboard-layout_2_3.json | 429 +++++++++++++++++++++ keyboards/ergodox/keymaps/swissgerman/keymap.c | 275 +++++++++++++ keyboards/ergodox/keymaps/swissgerman/readme.md | 15 + 6 files changed, 1136 insertions(+) create mode 100644 keyboards/ergodox/keymaps/swissgerman/keyboard-layout.json create mode 100644 keyboards/ergodox/keymaps/swissgerman/keyboard-layout.png create mode 100644 keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.png create mode 100644 keyboards/ergodox/keymaps/swissgerman/keyboard-layout_2_3.json create mode 100644 keyboards/ergodox/keymaps/swissgerman/keymap.c create mode 100644 keyboards/ergodox/keymaps/swissgerman/readme.md diff --git a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout.json b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout.json new file mode 100644 index 000000000..7a0397f72 --- /dev/null +++ b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout.json @@ -0,0 +1,417 @@ +[ + { + "backcolor": "#ffffff" + }, + [ + { + "x": 3.5 + }, + "#\n3", + { + "x": 10.5 + }, + "*\n8" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "@\n2", + { + "x": 1 + }, + "$\n4", + { + "x": 8.5 + }, + "&\n7", + { + "x": 1 + }, + "(\n9" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "%\n5", + { + "a": 7 + }, + "", + { + "x": 4.5 + }, + "", + { + "a": 4 + }, + "^\n6" + ], + [ + { + "y": -0.875, + "w": 1.5 + }, + "°\n§", + "!\n1", + { + "x": 14.5 + }, + ")\n0", + { + "w": 1.5 + }, + "?\n'\n\n'" + ], + [ + { + "y": -0.375, + "x": 3.5 + }, + "E", + { + "x": 10.5 + }, + "I" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "W", + { + "x": 1 + }, + "R", + { + "x": 8.5 + }, + "U", + { + "x": 1 + }, + "O" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "T", + { + "c": "#b56b6b", + "a": 6, + "h": 1.5 + }, + "Toggle Code Layer", + { + "x": 4.5, + "h": 1.5 + }, + "Toggle Code Layer", + { + "c": "#cccccc", + "a": 4 + }, + "Y" + ], + [ + { + "y": -0.875, + "a": 6, + "w": 1.5 + }, + "Delete", + { + "a": 4 + }, + "Q", + { + "x": 14.5 + }, + "P", + { + "w": 1.5 + }, + "è\nü\n\n[" + ], + [ + { + "y": -0.375, + "x": 3.5 + }, + "D", + { + "x": 10.5 + }, + "K" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "S", + { + "x": 1 + }, + "F", + { + "x": 8.5 + }, + "J", + { + "x": 1 + }, + "L" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "G", + { + "x": 6.5 + }, + "H" + ], + [ + { + "y": -0.875, + "a": 6, + "w": 1.5 + }, + "Backspace", + { + "c": "#79c777", + "a": 4 + }, + "A\n\nLyr3", + { + "x": 14.5 + }, + "é\nö\nLyr3", + { + "c": "#748adb", + "w": 1.5 + }, + "à\nä\nCmd\n{" + ], + [ + { + "y": -0.625, + "x": 6.5, + "c": "#cccccc", + "a": 6, + "h": 1.5 + }, + "Hyper", + { + "x": 4.5, + "h": 1.5 + }, + "Meh" + ], + [ + { + "y": -0.75, + "x": 3.5, + "a": 4 + }, + "C", + { + "x": 10.5 + }, + ";\n," + ], + [ + { + "y": -0.875, + "x": 2.5, + "c": "#748adb" + }, + "X\n\nAlt", + { + "x": 1, + "c": "#cccccc" + }, + "V", + { + "x": 8.5 + }, + "M", + { + "x": 1, + "c": "#748adb" + }, + ":\n.\nAlt" + ], + [ + { + "y": -0.875, + "x": 5.5, + "c": "#cccccc" + }, + "B", + { + "x": 6.5 + }, + "N" + ], + [ + { + "y": -0.875, + "a": 6, + "w": 1.5 + }, + "Shift", + { + "c": "#748adb", + "a": 4 + }, + "Z\n\nCtrl", + { + "x": 14.5 + }, + "_\n-\nCtrl", + { + "c": "#cccccc", + "a": 6, + "w": 1.5 + }, + "Shift" + ], + [ + { + "y": -0.375, + "x": 3.5, + "a": 7 + }, + "", + { + "x": 10.5 + }, + "" + ], + [ + { + "y": -0.875, + "x": 2.5, + "a": 4 + }, + "£\n$\n\n}", + { + "x": 1, + "a": 7 + }, + "", + { + "x": 10.5, + "a": 6 + }, + "AltGr" + ], + [ + { + "y": -0.9950000000000001, + "x": 14, + "a": 7 + }, + "" + ], + [ + { + "y": -0.7549999999999999, + "x": 0.5, + "c": "#b56b6b", + "a": 4 + }, + ">\n<\nCode Layer\n\\", + { + "c": "#cccccc" + }, + "`\n^\n\n~", + { + "x": 14.5 + }, + "!\n¨\n\n]", + { + "c": "#b56b6b" + }, + "\n\nCode Layer" + ], + [ + { + "r": 30, + "rx": 6.5, + "ry": 4.25, + "y": -1, + "x": 1, + "c": "#748adb" + }, + "Apps\nAlt", + { + "c": "#cccccc", + "a": 6 + }, + "Win / Cmd" + ], + [ + { + "h": 2 + }, + "Space", + { + "h": 2 + }, + "Back Space", + "Home" + ], + [ + { + "x": 2 + }, + "End" + ], + [ + { + "r": -30, + "rx": 13, + "y": -1, + "x": -3 + }, + "Alt", + { + "c": "#748adb", + "a": 4 + }, + "Esc\nCtrl" + ], + [ + { + "x": -3, + "c": "#cccccc", + "a": 6 + }, + "Pg Up", + { + "h": 2 + }, + "Tab", + { + "h": 2 + }, + "Enter" + ], + [ + { + "x": -3 + }, + "Pg Dn" + ] +] diff --git a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout.png b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout.png new file mode 100644 index 000000000..aff6af851 Binary files /dev/null and b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout.png differ diff --git a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.png b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.png new file mode 100644 index 000000000..835816b53 Binary files /dev/null and b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.png differ diff --git a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_2_3.json b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_2_3.json new file mode 100644 index 000000000..e3d366057 --- /dev/null +++ b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_2_3.json @@ -0,0 +1,429 @@ +[ + { + "backcolor": "#ffffff" + }, + [ + { + "x": 3.5, + "t": "#b81c1c" + }, + "F3", + { + "x": 10.5 + }, + "F8" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "F2", + { + "x": 1 + }, + "F4", + { + "x": 8.5 + }, + "F7", + { + "x": 1 + }, + "F9" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "F5", + { + "t": "#000000", + "a": 7 + }, + "", + { + "x": 4.5 + }, + "", + { + "t": "#b81c1c", + "a": 4 + }, + "F6" + ], + [ + { + "y": -0.875, + "t": "#000000\n\n\n#529151", + "w": 1.5 + }, + "\n\n\nFlash", + { + "t": "#b81c1c" + }, + "F1", + { + "x": 14.5 + }, + "F10", + { + "t": "#b81c1c\n\n\n#529151", + "w": 1.5 + }, + "F11\n\n\nFlash" + ], + [ + { + "y": -0.375, + "x": 3.5 + }, + "{\n\n\n", + { + "x": 10.5, + "t": "#b81c1c" + }, + "8" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "@", + { + "x": 1 + }, + "}", + { + "x": 8.5 + }, + "7", + { + "x": 1 + }, + "9" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "|", + { + "t": "#000000", + "a": 7, + "h": 1.5 + }, + "", + { + "x": 4.5, + "h": 1.5 + }, + "", + { + "t": "#b81c1c", + "a": 4 + }, + "" + ], + [ + { + "y": -0.875, + "t": "#000000", + "a": 7, + "w": 1.5 + }, + "", + { + "t": "#b81c1c", + "a": 4 + }, + "!", + { + "x": 14.5 + }, + "*", + { + "w": 1.5 + }, + "F12" + ], + [ + { + "y": -0.375, + "x": 3.5, + "t": "#b81c1c\n\n\n#529151" + }, + "(\n\n\n", + { + "x": 10.5, + "t": "#b81c1c" + }, + "5" + ], + [ + { + "y": -0.875, + "x": 2.5, + "t": "#b81c1c\n\n\n#529151" + }, + "$\n\n\n", + { + "x": 1 + }, + ")\n\n\n", + { + "x": 8.5, + "t": "#b81c1c" + }, + "4", + { + "x": 1 + }, + "6" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "`", + { + "x": 6.5 + }, + "" + ], + [ + { + "y": -0.875, + "t": "#000000", + "a": 7, + "w": 1.5 + }, + "", + { + "t": "#b81c1c", + "a": 4 + }, + "#", + { + "x": 14.5 + }, + "+", + { + "t": "#000000\n\n\n#529151", + "w": 1.5 + }, + "\n\n\n" + ], + [ + { + "y": -0.625, + "x": 6.5, + "t": "#000000", + "a": 7, + "h": 1.5 + }, + "", + { + "x": 4.5, + "h": 1.5 + }, + "" + ], + [ + { + "y": -0.75, + "x": 3.5, + "t": "#b81c1c", + "a": 4 + }, + "[", + { + "x": 10.5, + "t": "#b81c1c\n\n\n#529151" + }, + "2\n\n\n" + ], + [ + { + "y": -0.875, + "x": 2.5, + "t": "#b81c1c" + }, + "^", + { + "x": 1 + }, + "]", + { + "x": 8.5 + }, + "1", + { + "x": 1, + "t": "#b81c1c\n\n\n#529151" + }, + "3\n\n\n" + ], + [ + { + "y": -0.875, + "x": 5.5, + "t": "#b81c1c" + }, + "~", + { + "x": 6.5 + }, + "&" + ], + [ + { + "y": -0.875, + "t": "#000000", + "a": 7, + "w": 1.5 + }, + "", + { + "t": "#b81c1c", + "a": 4 + }, + "%", + { + "x": 14.5 + }, + "\\", + { + "t": "#000000", + "a": 7, + "w": 1.5 + }, + "" + ], + [ + { + "y": -0.375, + "x": 3.5, + "t": "#000000\n\n\n#529151", + "a": 4 + }, + "\n\n\nleft click", + { + "x": 10.5, + "t": "#b81c1c\n\n\n#529151" + }, + ".\n\n\n" + ], + [ + { + "y": -0.875, + "x": 2.5, + "t": "#000000", + "a": 7 + }, + "", + { + "x": 1, + "t": "#000000\n\n\n#529151", + "a": 4 + }, + "\n\n\nright click", + { + "x": 8.5, + "t": "#b81c1c\n\n\n#529151" + }, + "?\n\n\n", + { + "x": 1, + "t": "#b81c1c" + }, + "0" + ], + [ + { + "y": -0.75, + "x": 0.5, + "t": "#000000", + "a": 7 + }, + "", + { + "t": "#b81c1c", + "a": 4 + }, + "EPRM RST", + { + "x": 14.5, + "t": "#000000", + "a": 7 + }, + "", + "" + ], + [ + { + "r": 30, + "rx": 6.5, + "ry": 4.25, + "y": -1, + "x": 1 + }, + "", + "" + ], + [ + { + "h": 2 + }, + "", + { + "h": 2 + }, + "", + "" + ], + [ + { + "x": 2 + }, + "" + ], + [ + { + "r": -30, + "rx": 13, + "y": -1, + "x": -3 + }, + "", + "" + ], + [ + { + "x": -3 + }, + "", + { + "h": 2 + }, + "", + { + "t": "#000000\n\n\n#529151", + "a": 4, + "h": 2 + }, + "\n\n\nWeb back" + ], + [ + { + "x": -3, + "t": "#000000", + "a": 7 + }, + "" + ] +] diff --git a/keyboards/ergodox/keymaps/swissgerman/keymap.c b/keyboards/ergodox/keymaps/swissgerman/keymap.c new file mode 100644 index 000000000..a969393bb --- /dev/null +++ b/keyboards/ergodox/keymaps/swissgerman/keymap.c @@ -0,0 +1,275 @@ +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" +#include "version.h" +#include "string.h" + +#ifdef SUBPROJECT_infinity +#include "visualizer/lcd_backlight.h" +#endif + + +#define BASE 0 // default layer +#define SYMB 1 // symbols +#define MDIA 2 // media keys + +#define EPRM M(1) // Macro 1: Reset EEPROM +#define HTML_LI M(10) +#define HTML_UL M(11) +#define HTML_OL M(12) +#define HTML_CODE M(13) + +#define SEND_TAG(TAG) do {\ + send_key(KC_NONUS_BSLASH); \ + SEND_STRING(TAG); \ + send_larger_than(); \ + send_key(KC_NONUS_BSLASH); \ + SEND_STRING("&"); \ + SEND_STRING(TAG); \ + send_larger_than(); \ + go_back_based_on_tag(TAG); \ + } while (0) + +void send_key(uint16_t keycode); +void go_back_based_on_tag(char* tag); +void send_larger_than(void); + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | ' | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Del | Q | W | E | R | T | L1 | | L1 | Z | U | I | O | P | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | BkSp | A /L2| S | D | F | G |------| |------| H | J | K | L | / L2| / Cmd | + * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| + * | LShift |Y/Ctrl|X/Alt | C | V | B | | | | N | M | , |./Alt |-/Ctrl| RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |< / L1| ^ | $ | Left | Right| | Up | Down |AltGr | | ~L1 | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | App | LGui | | Alt |Ctrl/Esc| + * ,------|------|------| |------+--------+------. + * | | | Home | | PgUp | | | + * | Space|Backsp|------| |------| Tab |Enter | + * | |ace | End | | PgDn | | | + * `--------------------' `----------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[BASE] = KEYMAP( // layer 0 : default + // left hand + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, + KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), + KC_BSPC, LT(MDIA, KC_A),KC_S, KC_D, KC_F, KC_G, + KC_LSFT, CTL_T(KC_Z), ALT_T(KC_X), KC_C, KC_V, KC_B, ALL_T(KC_NO), + LT(SYMB,KC_NONUS_BSLASH), KC_EQL, KC_BSLS, KC_LEFT,KC_RGHT, + ALT_T(KC_APP), KC_LGUI, + KC_HOME, + KC_SPC,KC_BSPC,KC_END, + // right hand + KC_RGHT, 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_LBRC, + KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), + MEH_T(KC_NO),KC_N, KC_M, KC_COMM,ALT_T(KC_DOT), CTL_T(KC_SLSH), KC_RSFT, + KC_UP, KC_DOWN,KC_RALT,KC_RBRC, KC_FN1, + KC_LALT,CTL_T(KC_ESC), + KC_PGUP, + KC_PGDN,KC_TAB, KC_ENT + ), +/* Keymap 1: Symbol Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | EPRM | | | | | ? | . | 0 | = | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[SYMB] = KEYMAP( + // left hand + M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + KC_TRNS,ACTION_MODS_KEY(MOD_LSFT, KC_RBRC), ACTION_MODS_KEY(MOD_RALT, KC_2), ACTION_MODS_KEY(MOD_RALT, KC_QUOT), ACTION_MODS_KEY(MOD_RALT, KC_BSLS),ACTION_MODS_KEY(MOD_RALT,KC_7),KC_TRNS, + KC_TRNS,ACTION_MODS_KEY(MOD_RALT,KC_3),KC_BSLS, ACTION_MODS_KEY(MOD_LSFT, KC_8), ACTION_MODS_KEY(MOD_RSFT, KC_9),ACTION_MODS_KEY(MOD_LSFT,KC_EQL), + KC_TRNS,ACTION_MODS_KEY(MOD_LSFT,KC_5),KC_EQL, ACTION_MODS_KEY(MOD_RALT, KC_LBRC), ACTION_MODS_KEY(MOD_RALT, KC_RBRC),ACTION_MODS_KEY(MOD_RALT,KC_EQL),KC_TRNS, + KC_TRNS,EPRM,KC_TRNS,KC_NONUS_BSLASH, ACTION_MODS_KEY(MOD_LSFT, KC_NONUS_BSLASH)/*KC_TRNS,KC_TRNS*/, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + // right hand + KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_TRNS, KC_UP, KC_7, KC_8, KC_9, ACTION_MODS_KEY(MOD_RSFT,KC_3), KC_F12, + KC_DOWN, KC_4, KC_5, KC_6, ACTION_MODS_KEY(MOD_RSFT,KC_1), KC_TRNS, + KC_TRNS, ACTION_MODS_KEY(MOD_RSFT,KC_6), KC_1, KC_2, KC_3, ACTION_MODS_KEY(MOD_RALT,KC_NONUS_BSLASH), KC_TRNS, + ACTION_MODS_KEY(MOD_RSFT,KC_MINS),KC_DOT, KC_0, KC_EQL, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +/* Keymap 2: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | RESET | | | | | | | | | | | | | | RESET | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | MsUp | | | | | | |H_UL | |H_OL | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| |------| |------| | | |H_LI | | Play | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |H_CODE| | | | | | | | | Prev | Next | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | |Brwser| + * | | |------| |------| |Back | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// MEDIA AND MOUSE +[MDIA] = KEYMAP( + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, HTML_CODE, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, + KC_TRNS, KC_TRNS, HTML_UL, KC_TRNS, HTML_OL, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, HTML_LI, KC_TRNS, KC_MPLY, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_WBAK +), +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + break; + case 1: + if (record->event.pressed) { // For resetting EEPROM + eeconfig_init(); + } + break; + case 10: + if (record->event.pressed) { + SEND_TAG("li"); + } + break; + case 11: + if (record->event.pressed) { + SEND_TAG( "ul" ); + } + break; + case 12: + if (record->event.pressed) { + SEND_TAG("ol"); + } + break; + case 13: + if (record->event.pressed) { + SEND_TAG("code"); + } + break; + } + return MACRO_NONE; +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + uint8_t layer = biton32(layer_state); + + switch (layer) { + // TODO: Make this relevant to the ErgoDox EZ. + case 0: + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + + #ifdef SUBPROJECT_infinity + lcd_backlight_hal_color(0, 0, 0); + #endif + break; + case 1: + ergodox_right_led_1_on(); + + ergodox_board_led_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + #ifdef SUBPROJECT_infinity + lcd_backlight_hal_color(5000, 0, 0); + #endif + break; + case 2: + ergodox_right_led_2_on(); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_3_off(); + #ifdef SUBPROJECT_infinity + lcd_backlight_hal_color(0, 5000, 0); + #endif + break; + default: + // none + break; + } + +}; + +void send_key(uint16_t keycode) { + register_code(keycode); + unregister_code(keycode); +} + +void go_back_based_on_tag(char* tag) { + const int BRACKETS_AND_SLASH_LENGTH = 3; + + for (int i=0; i < strlen(tag) + BRACKETS_AND_SLASH_LENGTH; i++) { + send_key(KC_LEFT); + } +} + +void send_larger_than() { + register_code(KC_LSFT); + send_key(KC_NONUS_BSLASH); + unregister_code(KC_LSFT); +} diff --git a/keyboards/ergodox/keymaps/swissgerman/readme.md b/keyboards/ergodox/keymaps/swissgerman/readme.md new file mode 100644 index 000000000..49889cd65 --- /dev/null +++ b/keyboards/ergodox/keymaps/swissgerman/readme.md @@ -0,0 +1,15 @@ +# ErgoDox Swiss German Configuration + +Swiss German keyboard layout based on the Ergodox EZ default layout. + +Keyboard diagrams created with the [keyboard layout editor](http://www.keyboard-layout-editor.com). + +Diagram sources: [default layer](keyboard-layout.json), [layer 2 & 3](keyboard-layout_2_3.json) + +![Layout Layer 0](keyboard-layout.png) +![Layout Layer 1&2](keyboard-layout_1_2.png) + +## Changelog +* Jan 21, 2017: + * Initial version based on default layout. + -- cgit v1.2.3 From 250628de04aabd65d6465c5a6afe48332e8d7f53 Mon Sep 17 00:00:00 2001 From: Andreas Schmidt Date: Sat, 21 Jan 2017 20:22:24 +0100 Subject: Removed Ergodox EZ & Infinity specific keymaps - Removed the keymaps for Swiss German spefic for Ergodox EZ and Infinity after previously merging them. --- .../keymaps/swissgerman_ez/keyboard-layout.json | 417 -------------------- .../keymaps/swissgerman_ez/keyboard-layout.png | Bin 75633 -> 0 bytes .../keymaps/swissgerman_ez/keyboard-layout_1_2.png | Bin 54604 -> 0 bytes .../swissgerman_ez/keyboard-layout_2_3.json | 429 --------------------- keyboards/ergodox/keymaps/swissgerman_ez/keymap.c | 260 ------------- keyboards/ergodox/keymaps/swissgerman_ez/readme.md | 15 - .../swissgerman_infinity/keyboard-layout.json | 417 -------------------- .../swissgerman_infinity/keyboard-layout.png | Bin 75633 -> 0 bytes .../swissgerman_infinity/keyboard-layout_1_2.png | Bin 54604 -> 0 bytes .../swissgerman_infinity/keyboard-layout_2_3.json | 429 --------------------- .../ergodox/keymaps/swissgerman_infinity/keymap.c | 252 ------------ .../ergodox/keymaps/swissgerman_infinity/readme.md | 14 - 12 files changed, 2233 deletions(-) delete mode 100644 keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout.json delete mode 100644 keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout.png delete mode 100644 keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout_1_2.png delete mode 100644 keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout_2_3.json delete mode 100644 keyboards/ergodox/keymaps/swissgerman_ez/keymap.c delete mode 100644 keyboards/ergodox/keymaps/swissgerman_ez/readme.md delete mode 100644 keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout.json delete mode 100644 keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout.png delete mode 100644 keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout_1_2.png delete mode 100644 keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout_2_3.json delete mode 100644 keyboards/ergodox/keymaps/swissgerman_infinity/keymap.c delete mode 100644 keyboards/ergodox/keymaps/swissgerman_infinity/readme.md diff --git a/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout.json b/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout.json deleted file mode 100644 index 7a0397f72..000000000 --- a/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout.json +++ /dev/null @@ -1,417 +0,0 @@ -[ - { - "backcolor": "#ffffff" - }, - [ - { - "x": 3.5 - }, - "#\n3", - { - "x": 10.5 - }, - "*\n8" - ], - [ - { - "y": -0.875, - "x": 2.5 - }, - "@\n2", - { - "x": 1 - }, - "$\n4", - { - "x": 8.5 - }, - "&\n7", - { - "x": 1 - }, - "(\n9" - ], - [ - { - "y": -0.875, - "x": 5.5 - }, - "%\n5", - { - "a": 7 - }, - "", - { - "x": 4.5 - }, - "", - { - "a": 4 - }, - "^\n6" - ], - [ - { - "y": -0.875, - "w": 1.5 - }, - "°\n§", - "!\n1", - { - "x": 14.5 - }, - ")\n0", - { - "w": 1.5 - }, - "?\n'\n\n'" - ], - [ - { - "y": -0.375, - "x": 3.5 - }, - "E", - { - "x": 10.5 - }, - "I" - ], - [ - { - "y": -0.875, - "x": 2.5 - }, - "W", - { - "x": 1 - }, - "R", - { - "x": 8.5 - }, - "U", - { - "x": 1 - }, - "O" - ], - [ - { - "y": -0.875, - "x": 5.5 - }, - "T", - { - "c": "#b56b6b", - "a": 6, - "h": 1.5 - }, - "Toggle Code Layer", - { - "x": 4.5, - "h": 1.5 - }, - "Toggle Code Layer", - { - "c": "#cccccc", - "a": 4 - }, - "Y" - ], - [ - { - "y": -0.875, - "a": 6, - "w": 1.5 - }, - "Delete", - { - "a": 4 - }, - "Q", - { - "x": 14.5 - }, - "P", - { - "w": 1.5 - }, - "è\nü\n\n[" - ], - [ - { - "y": -0.375, - "x": 3.5 - }, - "D", - { - "x": 10.5 - }, - "K" - ], - [ - { - "y": -0.875, - "x": 2.5 - }, - "S", - { - "x": 1 - }, - "F", - { - "x": 8.5 - }, - "J", - { - "x": 1 - }, - "L" - ], - [ - { - "y": -0.875, - "x": 5.5 - }, - "G", - { - "x": 6.5 - }, - "H" - ], - [ - { - "y": -0.875, - "a": 6, - "w": 1.5 - }, - "Backspace", - { - "c": "#79c777", - "a": 4 - }, - "A\n\nLyr3", - { - "x": 14.5 - }, - "é\nö\nLyr3", - { - "c": "#748adb", - "w": 1.5 - }, - "à\nä\nCmd\n{" - ], - [ - { - "y": -0.625, - "x": 6.5, - "c": "#cccccc", - "a": 6, - "h": 1.5 - }, - "Hyper", - { - "x": 4.5, - "h": 1.5 - }, - "Meh" - ], - [ - { - "y": -0.75, - "x": 3.5, - "a": 4 - }, - "C", - { - "x": 10.5 - }, - ";\n," - ], - [ - { - "y": -0.875, - "x": 2.5, - "c": "#748adb" - }, - "X\n\nAlt", - { - "x": 1, - "c": "#cccccc" - }, - "V", - { - "x": 8.5 - }, - "M", - { - "x": 1, - "c": "#748adb" - }, - ":\n.\nAlt" - ], - [ - { - "y": -0.875, - "x": 5.5, - "c": "#cccccc" - }, - "B", - { - "x": 6.5 - }, - "N" - ], - [ - { - "y": -0.875, - "a": 6, - "w": 1.5 - }, - "Shift", - { - "c": "#748adb", - "a": 4 - }, - "Z\n\nCtrl", - { - "x": 14.5 - }, - "_\n-\nCtrl", - { - "c": "#cccccc", - "a": 6, - "w": 1.5 - }, - "Shift" - ], - [ - { - "y": -0.375, - "x": 3.5, - "a": 7 - }, - "", - { - "x": 10.5 - }, - "" - ], - [ - { - "y": -0.875, - "x": 2.5, - "a": 4 - }, - "£\n$\n\n}", - { - "x": 1, - "a": 7 - }, - "", - { - "x": 10.5, - "a": 6 - }, - "AltGr" - ], - [ - { - "y": -0.9950000000000001, - "x": 14, - "a": 7 - }, - "" - ], - [ - { - "y": -0.7549999999999999, - "x": 0.5, - "c": "#b56b6b", - "a": 4 - }, - ">\n<\nCode Layer\n\\", - { - "c": "#cccccc" - }, - "`\n^\n\n~", - { - "x": 14.5 - }, - "!\n¨\n\n]", - { - "c": "#b56b6b" - }, - "\n\nCode Layer" - ], - [ - { - "r": 30, - "rx": 6.5, - "ry": 4.25, - "y": -1, - "x": 1, - "c": "#748adb" - }, - "Apps\nAlt", - { - "c": "#cccccc", - "a": 6 - }, - "Win / Cmd" - ], - [ - { - "h": 2 - }, - "Space", - { - "h": 2 - }, - "Back Space", - "Home" - ], - [ - { - "x": 2 - }, - "End" - ], - [ - { - "r": -30, - "rx": 13, - "y": -1, - "x": -3 - }, - "Alt", - { - "c": "#748adb", - "a": 4 - }, - "Esc\nCtrl" - ], - [ - { - "x": -3, - "c": "#cccccc", - "a": 6 - }, - "Pg Up", - { - "h": 2 - }, - "Tab", - { - "h": 2 - }, - "Enter" - ], - [ - { - "x": -3 - }, - "Pg Dn" - ] -] diff --git a/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout.png b/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout.png deleted file mode 100644 index aff6af851..000000000 Binary files a/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout.png and /dev/null differ diff --git a/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout_1_2.png b/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout_1_2.png deleted file mode 100644 index 835816b53..000000000 Binary files a/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout_1_2.png and /dev/null differ diff --git a/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout_2_3.json b/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout_2_3.json deleted file mode 100644 index e3d366057..000000000 --- a/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout_2_3.json +++ /dev/null @@ -1,429 +0,0 @@ -[ - { - "backcolor": "#ffffff" - }, - [ - { - "x": 3.5, - "t": "#b81c1c" - }, - "F3", - { - "x": 10.5 - }, - "F8" - ], - [ - { - "y": -0.875, - "x": 2.5 - }, - "F2", - { - "x": 1 - }, - "F4", - { - "x": 8.5 - }, - "F7", - { - "x": 1 - }, - "F9" - ], - [ - { - "y": -0.875, - "x": 5.5 - }, - "F5", - { - "t": "#000000", - "a": 7 - }, - "", - { - "x": 4.5 - }, - "", - { - "t": "#b81c1c", - "a": 4 - }, - "F6" - ], - [ - { - "y": -0.875, - "t": "#000000\n\n\n#529151", - "w": 1.5 - }, - "\n\n\nFlash", - { - "t": "#b81c1c" - }, - "F1", - { - "x": 14.5 - }, - "F10", - { - "t": "#b81c1c\n\n\n#529151", - "w": 1.5 - }, - "F11\n\n\nFlash" - ], - [ - { - "y": -0.375, - "x": 3.5 - }, - "{\n\n\n", - { - "x": 10.5, - "t": "#b81c1c" - }, - "8" - ], - [ - { - "y": -0.875, - "x": 2.5 - }, - "@", - { - "x": 1 - }, - "}", - { - "x": 8.5 - }, - "7", - { - "x": 1 - }, - "9" - ], - [ - { - "y": -0.875, - "x": 5.5 - }, - "|", - { - "t": "#000000", - "a": 7, - "h": 1.5 - }, - "", - { - "x": 4.5, - "h": 1.5 - }, - "", - { - "t": "#b81c1c", - "a": 4 - }, - "" - ], - [ - { - "y": -0.875, - "t": "#000000", - "a": 7, - "w": 1.5 - }, - "", - { - "t": "#b81c1c", - "a": 4 - }, - "!", - { - "x": 14.5 - }, - "*", - { - "w": 1.5 - }, - "F12" - ], - [ - { - "y": -0.375, - "x": 3.5, - "t": "#b81c1c\n\n\n#529151" - }, - "(\n\n\n", - { - "x": 10.5, - "t": "#b81c1c" - }, - "5" - ], - [ - { - "y": -0.875, - "x": 2.5, - "t": "#b81c1c\n\n\n#529151" - }, - "$\n\n\n", - { - "x": 1 - }, - ")\n\n\n", - { - "x": 8.5, - "t": "#b81c1c" - }, - "4", - { - "x": 1 - }, - "6" - ], - [ - { - "y": -0.875, - "x": 5.5 - }, - "`", - { - "x": 6.5 - }, - "" - ], - [ - { - "y": -0.875, - "t": "#000000", - "a": 7, - "w": 1.5 - }, - "", - { - "t": "#b81c1c", - "a": 4 - }, - "#", - { - "x": 14.5 - }, - "+", - { - "t": "#000000\n\n\n#529151", - "w": 1.5 - }, - "\n\n\n" - ], - [ - { - "y": -0.625, - "x": 6.5, - "t": "#000000", - "a": 7, - "h": 1.5 - }, - "", - { - "x": 4.5, - "h": 1.5 - }, - "" - ], - [ - { - "y": -0.75, - "x": 3.5, - "t": "#b81c1c", - "a": 4 - }, - "[", - { - "x": 10.5, - "t": "#b81c1c\n\n\n#529151" - }, - "2\n\n\n" - ], - [ - { - "y": -0.875, - "x": 2.5, - "t": "#b81c1c" - }, - "^", - { - "x": 1 - }, - "]", - { - "x": 8.5 - }, - "1", - { - "x": 1, - "t": "#b81c1c\n\n\n#529151" - }, - "3\n\n\n" - ], - [ - { - "y": -0.875, - "x": 5.5, - "t": "#b81c1c" - }, - "~", - { - "x": 6.5 - }, - "&" - ], - [ - { - "y": -0.875, - "t": "#000000", - "a": 7, - "w": 1.5 - }, - "", - { - "t": "#b81c1c", - "a": 4 - }, - "%", - { - "x": 14.5 - }, - "\\", - { - "t": "#000000", - "a": 7, - "w": 1.5 - }, - "" - ], - [ - { - "y": -0.375, - "x": 3.5, - "t": "#000000\n\n\n#529151", - "a": 4 - }, - "\n\n\nleft click", - { - "x": 10.5, - "t": "#b81c1c\n\n\n#529151" - }, - ".\n\n\n" - ], - [ - { - "y": -0.875, - "x": 2.5, - "t": "#000000", - "a": 7 - }, - "", - { - "x": 1, - "t": "#000000\n\n\n#529151", - "a": 4 - }, - "\n\n\nright click", - { - "x": 8.5, - "t": "#b81c1c\n\n\n#529151" - }, - "?\n\n\n", - { - "x": 1, - "t": "#b81c1c" - }, - "0" - ], - [ - { - "y": -0.75, - "x": 0.5, - "t": "#000000", - "a": 7 - }, - "", - { - "t": "#b81c1c", - "a": 4 - }, - "EPRM RST", - { - "x": 14.5, - "t": "#000000", - "a": 7 - }, - "", - "" - ], - [ - { - "r": 30, - "rx": 6.5, - "ry": 4.25, - "y": -1, - "x": 1 - }, - "", - "" - ], - [ - { - "h": 2 - }, - "", - { - "h": 2 - }, - "", - "" - ], - [ - { - "x": 2 - }, - "" - ], - [ - { - "r": -30, - "rx": 13, - "y": -1, - "x": -3 - }, - "", - "" - ], - [ - { - "x": -3 - }, - "", - { - "h": 2 - }, - "", - { - "t": "#000000\n\n\n#529151", - "a": 4, - "h": 2 - }, - "\n\n\nWeb back" - ], - [ - { - "x": -3, - "t": "#000000", - "a": 7 - }, - "" - ] -] diff --git a/keyboards/ergodox/keymaps/swissgerman_ez/keymap.c b/keyboards/ergodox/keymaps/swissgerman_ez/keymap.c deleted file mode 100644 index c6717abff..000000000 --- a/keyboards/ergodox/keymaps/swissgerman_ez/keymap.c +++ /dev/null @@ -1,260 +0,0 @@ -#include "ergodox.h" -#include "debug.h" -#include "action_layer.h" -#include "version.h" - -#define BASE 0 // default layer -#define SYMB 1 // symbols -#define MDIA 2 // media keys - -#define EPRM M(1) // Macro 1: Reset EEPROM -#define HTML_LI M(10) -#define HTML_UL M(11) -#define HTML_OL M(12) -#define HTML_CODE M(13) - -#define SEND_TAG(TAG) do {\ - send_key(KC_NONUS_BSLASH); \ - SEND_STRING(TAG); \ - send_larger_than(); \ - send_key(KC_NONUS_BSLASH); \ - SEND_STRING("&"); \ - SEND_STRING(TAG); \ - send_larger_than(); \ - go_back_based_on_tag(TAG); \ - } while (0) - -void send_key(uint16_t keycode); -void go_back_based_on_tag(char* tag); -void send_larger_than(void); - - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Keymap 0: Basic layer - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | ' | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Del | Q | W | E | R | T | L1 | | L1 | Z | U | I | O | P | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | BkSp | A /L2| S | D | F | G |------| |------| H | J | K | L | / L2| / Cmd | - * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| - * | LShift |Y/Ctrl|X/Alt | C | V | B | | | | N | M | , |./Alt |-/Ctrl| RShift | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * |< / L1| ^ | $ | Left | Right| | Up | Down |AltGr | | ~L1 | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | App | LGui | | Alt |Ctrl/Esc| - * ,------|------|------| |------+--------+------. - * | | | Home | | PgUp | | | - * | Space|Backsp|------| |------| Tab |Enter | - * | |ace | End | | PgDn | | | - * `--------------------' `----------------------' - */ -// If it accepts an argument (i.e, is a function), it doesn't need KC_. -// Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default - // left hand - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, - KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), - KC_BSPC, LT(MDIA, KC_A),KC_S, KC_D, KC_F, KC_G, - KC_LSFT, CTL_T(KC_Z), ALT_T(KC_X), KC_C, KC_V, KC_B, ALL_T(KC_NO), - LT(SYMB,KC_NONUS_BSLASH), KC_EQL, KC_BSLS, KC_LEFT,KC_RGHT, - ALT_T(KC_APP), KC_LGUI, - KC_HOME, - KC_SPC,KC_BSPC,KC_END, - // right hand - KC_RGHT, 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_LBRC, - KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), - MEH_T(KC_NO),KC_N, KC_M, KC_COMM,ALT_T(KC_DOT), CTL_T(KC_SLSH), KC_RSFT, - KC_UP, KC_DOWN,KC_RALT,KC_RBRC, KC_FN1, - KC_LALT,CTL_T(KC_ESC), - KC_PGUP, - KC_PGDN,KC_TAB, KC_ENT - ), -/* Keymap 1: Symbol Layer - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | EPRM | | | | | ? | . | 0 | = | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | | | - * | | |------| |------| | | - * | | | | | | | | - * `--------------------' `--------------------' - */ -// SYMBOLS -[SYMB] = KEYMAP( - // left hand - M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, - KC_TRNS,ACTION_MODS_KEY(MOD_LSFT, KC_RBRC), ACTION_MODS_KEY(MOD_RALT, KC_2), ACTION_MODS_KEY(MOD_RALT, KC_QUOT), ACTION_MODS_KEY(MOD_RALT, KC_BSLS),ACTION_MODS_KEY(MOD_RALT,KC_7),KC_TRNS, - KC_TRNS,ACTION_MODS_KEY(MOD_RALT,KC_3),KC_BSLS, ACTION_MODS_KEY(MOD_LSFT, KC_8), ACTION_MODS_KEY(MOD_RSFT, KC_9),ACTION_MODS_KEY(MOD_LSFT,KC_EQL), - KC_TRNS,ACTION_MODS_KEY(MOD_LSFT,KC_5),KC_EQL, ACTION_MODS_KEY(MOD_RALT, KC_LBRC), ACTION_MODS_KEY(MOD_RALT, KC_RBRC),ACTION_MODS_KEY(MOD_RALT,KC_EQL),KC_TRNS, - KC_TRNS,EPRM,KC_TRNS,KC_NONUS_BSLASH, ACTION_MODS_KEY(MOD_LSFT, KC_NONUS_BSLASH)/*KC_TRNS,KC_TRNS*/, - KC_TRNS,KC_TRNS, - KC_TRNS, - KC_TRNS,KC_TRNS,KC_TRNS, - // right hand - KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - KC_TRNS, KC_UP, KC_7, KC_8, KC_9, ACTION_MODS_KEY(MOD_RSFT,KC_3), KC_F12, - KC_DOWN, KC_4, KC_5, KC_6, ACTION_MODS_KEY(MOD_RSFT,KC_1), KC_TRNS, - KC_TRNS, ACTION_MODS_KEY(MOD_RSFT,KC_6), KC_1, KC_2, KC_3, ACTION_MODS_KEY(MOD_RALT,KC_NONUS_BSLASH), KC_TRNS, - ACTION_MODS_KEY(MOD_RSFT,KC_MINS),KC_DOT, KC_0, KC_EQL, KC_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS -), -/* Keymap 2: Media and mouse keys - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | RESET | | | | | | | | | | | | | | RESET | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | MsUp | | | | | | |H_UL | |H_OL | | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | |MsLeft|MsDown|MsRght| |------| |------| | | |H_LI | | Play | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | |H_CODE| | | | | | | | | Prev | Next | | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | |Brwser| - * | | |------| |------| |Back | - * | | | | | | | | - * `--------------------' `--------------------' - */ -// MEDIA AND MOUSE -[MDIA] = KEYMAP( - RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, HTML_CODE, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, - // right hand - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, - KC_TRNS, KC_TRNS, HTML_UL, KC_TRNS, HTML_OL, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, HTML_LI, KC_TRNS, KC_MPLY, - KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, - KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_WBAK -), -}; - -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); - } - break; - case 1: - if (record->event.pressed) { // For resetting EEPROM - eeconfig_init(); - } - break; - case 10: - if (record->event.pressed) { - SEND_TAG("li"); - } - break; - case 11: - if (record->event.pressed) { - SEND_TAG( "ul" ); - } - break; - case 12: - if (record->event.pressed) { - SEND_TAG("ol"); - } - break; - case 13: - if (record->event.pressed) { - SEND_TAG("code"); - } - break; - } - return MACRO_NONE; -}; - -// Runs just one time when the keyboard initializes. -void matrix_init_user(void) { - -}; - -// Runs constantly in the background, in a loop. -void matrix_scan_user(void) { - - uint8_t layer = biton32(layer_state); - - switch (layer) { - // TODO: Make this relevant to the ErgoDox EZ. - case 0: - ergodox_board_led_off(); - ergodox_right_led_1_off(); - ergodox_right_led_2_off(); - ergodox_right_led_3_off(); - break; - case 1: - ergodox_right_led_1_on(); - - ergodox_board_led_off(); - ergodox_right_led_2_off(); - ergodox_right_led_3_off(); - break; - case 2: - ergodox_right_led_2_on(); - - ergodox_board_led_off(); - ergodox_right_led_1_off(); - ergodox_right_led_3_off(); - break; - default: - // none - break; - } - -}; - -void send_key(uint16_t keycode) { - register_code(keycode); - unregister_code(keycode); -} - -void go_back_based_on_tag(char* tag) { - const int BRACKETS_AND_SLASH_LENGTH = 3; - - for (int i=0; i < strlen(tag) + BRACKETS_AND_SLASH_LENGTH; i++) { - send_key(KC_LEFT); - } -} - -void send_larger_than() { - register_code(KC_LSFT); - send_key(KC_NONUS_BSLASH); - unregister_code(KC_LSFT); - -} diff --git a/keyboards/ergodox/keymaps/swissgerman_ez/readme.md b/keyboards/ergodox/keymaps/swissgerman_ez/readme.md deleted file mode 100644 index 039a08588..000000000 --- a/keyboards/ergodox/keymaps/swissgerman_ez/readme.md +++ /dev/null @@ -1,15 +0,0 @@ -# ErgoDox EZ Swiss German Configuration - -Swiss German keyboard layout based on the Ergodox EZ default layout. - -Keyboard diagrams created with the [keyboard layout editor](http://www.keyboard-layout-editor.com). - -Diagram sources: [default layer](keyboard-layout.json), [layer 2 & 3](keyboard-layout_2_3.json) - -![Layout Layer 0](keyboard-layout.png) -![Layout Layer 1&2](keyboard-layout_1_2.png) - -## Changelog -* Jan 21, 2017: - * Initial version based on default layout. - diff --git a/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout.json b/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout.json deleted file mode 100644 index 7a0397f72..000000000 --- a/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout.json +++ /dev/null @@ -1,417 +0,0 @@ -[ - { - "backcolor": "#ffffff" - }, - [ - { - "x": 3.5 - }, - "#\n3", - { - "x": 10.5 - }, - "*\n8" - ], - [ - { - "y": -0.875, - "x": 2.5 - }, - "@\n2", - { - "x": 1 - }, - "$\n4", - { - "x": 8.5 - }, - "&\n7", - { - "x": 1 - }, - "(\n9" - ], - [ - { - "y": -0.875, - "x": 5.5 - }, - "%\n5", - { - "a": 7 - }, - "", - { - "x": 4.5 - }, - "", - { - "a": 4 - }, - "^\n6" - ], - [ - { - "y": -0.875, - "w": 1.5 - }, - "°\n§", - "!\n1", - { - "x": 14.5 - }, - ")\n0", - { - "w": 1.5 - }, - "?\n'\n\n'" - ], - [ - { - "y": -0.375, - "x": 3.5 - }, - "E", - { - "x": 10.5 - }, - "I" - ], - [ - { - "y": -0.875, - "x": 2.5 - }, - "W", - { - "x": 1 - }, - "R", - { - "x": 8.5 - }, - "U", - { - "x": 1 - }, - "O" - ], - [ - { - "y": -0.875, - "x": 5.5 - }, - "T", - { - "c": "#b56b6b", - "a": 6, - "h": 1.5 - }, - "Toggle Code Layer", - { - "x": 4.5, - "h": 1.5 - }, - "Toggle Code Layer", - { - "c": "#cccccc", - "a": 4 - }, - "Y" - ], - [ - { - "y": -0.875, - "a": 6, - "w": 1.5 - }, - "Delete", - { - "a": 4 - }, - "Q", - { - "x": 14.5 - }, - "P", - { - "w": 1.5 - }, - "è\nü\n\n[" - ], - [ - { - "y": -0.375, - "x": 3.5 - }, - "D", - { - "x": 10.5 - }, - "K" - ], - [ - { - "y": -0.875, - "x": 2.5 - }, - "S", - { - "x": 1 - }, - "F", - { - "x": 8.5 - }, - "J", - { - "x": 1 - }, - "L" - ], - [ - { - "y": -0.875, - "x": 5.5 - }, - "G", - { - "x": 6.5 - }, - "H" - ], - [ - { - "y": -0.875, - "a": 6, - "w": 1.5 - }, - "Backspace", - { - "c": "#79c777", - "a": 4 - }, - "A\n\nLyr3", - { - "x": 14.5 - }, - "é\nö\nLyr3", - { - "c": "#748adb", - "w": 1.5 - }, - "à\nä\nCmd\n{" - ], - [ - { - "y": -0.625, - "x": 6.5, - "c": "#cccccc", - "a": 6, - "h": 1.5 - }, - "Hyper", - { - "x": 4.5, - "h": 1.5 - }, - "Meh" - ], - [ - { - "y": -0.75, - "x": 3.5, - "a": 4 - }, - "C", - { - "x": 10.5 - }, - ";\n," - ], - [ - { - "y": -0.875, - "x": 2.5, - "c": "#748adb" - }, - "X\n\nAlt", - { - "x": 1, - "c": "#cccccc" - }, - "V", - { - "x": 8.5 - }, - "M", - { - "x": 1, - "c": "#748adb" - }, - ":\n.\nAlt" - ], - [ - { - "y": -0.875, - "x": 5.5, - "c": "#cccccc" - }, - "B", - { - "x": 6.5 - }, - "N" - ], - [ - { - "y": -0.875, - "a": 6, - "w": 1.5 - }, - "Shift", - { - "c": "#748adb", - "a": 4 - }, - "Z\n\nCtrl", - { - "x": 14.5 - }, - "_\n-\nCtrl", - { - "c": "#cccccc", - "a": 6, - "w": 1.5 - }, - "Shift" - ], - [ - { - "y": -0.375, - "x": 3.5, - "a": 7 - }, - "", - { - "x": 10.5 - }, - "" - ], - [ - { - "y": -0.875, - "x": 2.5, - "a": 4 - }, - "£\n$\n\n}", - { - "x": 1, - "a": 7 - }, - "", - { - "x": 10.5, - "a": 6 - }, - "AltGr" - ], - [ - { - "y": -0.9950000000000001, - "x": 14, - "a": 7 - }, - "" - ], - [ - { - "y": -0.7549999999999999, - "x": 0.5, - "c": "#b56b6b", - "a": 4 - }, - ">\n<\nCode Layer\n\\", - { - "c": "#cccccc" - }, - "`\n^\n\n~", - { - "x": 14.5 - }, - "!\n¨\n\n]", - { - "c": "#b56b6b" - }, - "\n\nCode Layer" - ], - [ - { - "r": 30, - "rx": 6.5, - "ry": 4.25, - "y": -1, - "x": 1, - "c": "#748adb" - }, - "Apps\nAlt", - { - "c": "#cccccc", - "a": 6 - }, - "Win / Cmd" - ], - [ - { - "h": 2 - }, - "Space", - { - "h": 2 - }, - "Back Space", - "Home" - ], - [ - { - "x": 2 - }, - "End" - ], - [ - { - "r": -30, - "rx": 13, - "y": -1, - "x": -3 - }, - "Alt", - { - "c": "#748adb", - "a": 4 - }, - "Esc\nCtrl" - ], - [ - { - "x": -3, - "c": "#cccccc", - "a": 6 - }, - "Pg Up", - { - "h": 2 - }, - "Tab", - { - "h": 2 - }, - "Enter" - ], - [ - { - "x": -3 - }, - "Pg Dn" - ] -] diff --git a/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout.png b/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout.png deleted file mode 100644 index aff6af851..000000000 Binary files a/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout.png and /dev/null differ diff --git a/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout_1_2.png b/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout_1_2.png deleted file mode 100644 index 835816b53..000000000 Binary files a/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout_1_2.png and /dev/null differ diff --git a/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout_2_3.json b/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout_2_3.json deleted file mode 100644 index e3d366057..000000000 --- a/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout_2_3.json +++ /dev/null @@ -1,429 +0,0 @@ -[ - { - "backcolor": "#ffffff" - }, - [ - { - "x": 3.5, - "t": "#b81c1c" - }, - "F3", - { - "x": 10.5 - }, - "F8" - ], - [ - { - "y": -0.875, - "x": 2.5 - }, - "F2", - { - "x": 1 - }, - "F4", - { - "x": 8.5 - }, - "F7", - { - "x": 1 - }, - "F9" - ], - [ - { - "y": -0.875, - "x": 5.5 - }, - "F5", - { - "t": "#000000", - "a": 7 - }, - "", - { - "x": 4.5 - }, - "", - { - "t": "#b81c1c", - "a": 4 - }, - "F6" - ], - [ - { - "y": -0.875, - "t": "#000000\n\n\n#529151", - "w": 1.5 - }, - "\n\n\nFlash", - { - "t": "#b81c1c" - }, - "F1", - { - "x": 14.5 - }, - "F10", - { - "t": "#b81c1c\n\n\n#529151", - "w": 1.5 - }, - "F11\n\n\nFlash" - ], - [ - { - "y": -0.375, - "x": 3.5 - }, - "{\n\n\n", - { - "x": 10.5, - "t": "#b81c1c" - }, - "8" - ], - [ - { - "y": -0.875, - "x": 2.5 - }, - "@", - { - "x": 1 - }, - "}", - { - "x": 8.5 - }, - "7", - { - "x": 1 - }, - "9" - ], - [ - { - "y": -0.875, - "x": 5.5 - }, - "|", - { - "t": "#000000", - "a": 7, - "h": 1.5 - }, - "", - { - "x": 4.5, - "h": 1.5 - }, - "", - { - "t": "#b81c1c", - "a": 4 - }, - "" - ], - [ - { - "y": -0.875, - "t": "#000000", - "a": 7, - "w": 1.5 - }, - "", - { - "t": "#b81c1c", - "a": 4 - }, - "!", - { - "x": 14.5 - }, - "*", - { - "w": 1.5 - }, - "F12" - ], - [ - { - "y": -0.375, - "x": 3.5, - "t": "#b81c1c\n\n\n#529151" - }, - "(\n\n\n", - { - "x": 10.5, - "t": "#b81c1c" - }, - "5" - ], - [ - { - "y": -0.875, - "x": 2.5, - "t": "#b81c1c\n\n\n#529151" - }, - "$\n\n\n", - { - "x": 1 - }, - ")\n\n\n", - { - "x": 8.5, - "t": "#b81c1c" - }, - "4", - { - "x": 1 - }, - "6" - ], - [ - { - "y": -0.875, - "x": 5.5 - }, - "`", - { - "x": 6.5 - }, - "" - ], - [ - { - "y": -0.875, - "t": "#000000", - "a": 7, - "w": 1.5 - }, - "", - { - "t": "#b81c1c", - "a": 4 - }, - "#", - { - "x": 14.5 - }, - "+", - { - "t": "#000000\n\n\n#529151", - "w": 1.5 - }, - "\n\n\n" - ], - [ - { - "y": -0.625, - "x": 6.5, - "t": "#000000", - "a": 7, - "h": 1.5 - }, - "", - { - "x": 4.5, - "h": 1.5 - }, - "" - ], - [ - { - "y": -0.75, - "x": 3.5, - "t": "#b81c1c", - "a": 4 - }, - "[", - { - "x": 10.5, - "t": "#b81c1c\n\n\n#529151" - }, - "2\n\n\n" - ], - [ - { - "y": -0.875, - "x": 2.5, - "t": "#b81c1c" - }, - "^", - { - "x": 1 - }, - "]", - { - "x": 8.5 - }, - "1", - { - "x": 1, - "t": "#b81c1c\n\n\n#529151" - }, - "3\n\n\n" - ], - [ - { - "y": -0.875, - "x": 5.5, - "t": "#b81c1c" - }, - "~", - { - "x": 6.5 - }, - "&" - ], - [ - { - "y": -0.875, - "t": "#000000", - "a": 7, - "w": 1.5 - }, - "", - { - "t": "#b81c1c", - "a": 4 - }, - "%", - { - "x": 14.5 - }, - "\\", - { - "t": "#000000", - "a": 7, - "w": 1.5 - }, - "" - ], - [ - { - "y": -0.375, - "x": 3.5, - "t": "#000000\n\n\n#529151", - "a": 4 - }, - "\n\n\nleft click", - { - "x": 10.5, - "t": "#b81c1c\n\n\n#529151" - }, - ".\n\n\n" - ], - [ - { - "y": -0.875, - "x": 2.5, - "t": "#000000", - "a": 7 - }, - "", - { - "x": 1, - "t": "#000000\n\n\n#529151", - "a": 4 - }, - "\n\n\nright click", - { - "x": 8.5, - "t": "#b81c1c\n\n\n#529151" - }, - "?\n\n\n", - { - "x": 1, - "t": "#b81c1c" - }, - "0" - ], - [ - { - "y": -0.75, - "x": 0.5, - "t": "#000000", - "a": 7 - }, - "", - { - "t": "#b81c1c", - "a": 4 - }, - "EPRM RST", - { - "x": 14.5, - "t": "#000000", - "a": 7 - }, - "", - "" - ], - [ - { - "r": 30, - "rx": 6.5, - "ry": 4.25, - "y": -1, - "x": 1 - }, - "", - "" - ], - [ - { - "h": 2 - }, - "", - { - "h": 2 - }, - "", - "" - ], - [ - { - "x": 2 - }, - "" - ], - [ - { - "r": -30, - "rx": 13, - "y": -1, - "x": -3 - }, - "", - "" - ], - [ - { - "x": -3 - }, - "", - { - "h": 2 - }, - "", - { - "t": "#000000\n\n\n#529151", - "a": 4, - "h": 2 - }, - "\n\n\nWeb back" - ], - [ - { - "x": -3, - "t": "#000000", - "a": 7 - }, - "" - ] -] diff --git a/keyboards/ergodox/keymaps/swissgerman_infinity/keymap.c b/keyboards/ergodox/keymaps/swissgerman_infinity/keymap.c deleted file mode 100644 index 0ccb7f47e..000000000 --- a/keyboards/ergodox/keymaps/swissgerman_infinity/keymap.c +++ /dev/null @@ -1,252 +0,0 @@ -#include "ergodox.h" -#include "debug.h" -#include "action_layer.h" -#include "version.h" -#include "visualizer/lcd_backlight.h" -#include "string.h" - -#define BASE 0 // default layer -#define SYMB 1 // symbols -#define MDIA 2 // media keys - -#define EPRM M(1) // Macro 1: Reset EEPROM -#define HTML_LI M(10) -#define HTML_UL M(11) -#define HTML_OL M(12) -#define HTML_CODE M(13) - -#define SEND_TAG(TAG) do {\ - send_key(KC_NONUS_BSLASH); \ - SEND_STRING(TAG); \ - send_larger_than(); \ - send_key(KC_NONUS_BSLASH); \ - SEND_STRING("&"); \ - SEND_STRING(TAG); \ - send_larger_than(); \ - go_back_based_on_tag(TAG); \ - } while (0) - -void send_key(uint16_t keycode); -void go_back_based_on_tag(char* tag); -void send_larger_than(void); - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Keymap 0: Basic layer - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | ' | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Del | Q | W | E | R | T | L1 | | L1 | Z | U | I | O | P | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | BkSp | A /L2| S | D | F | G |------| |------| H | J | K | L | / L2| / Cmd | - * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| - * | LShift |Y/Ctrl|X/Alt | C | V | B | | | | N | M | , |./Alt |-/Ctrl| RShift | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * |< / L1| ^ | $ | Left | Right| | Up | Down |AltGr | | ~L1 | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | App | LGui | | Alt |Ctrl/Esc| - * ,------|------|------| |------+--------+------. - * | | | Home | | PgUp | | | - * | Space|Backsp|------| |------| Tab |Enter | - * | |ace | End | | PgDn | | | - * `--------------------' `----------------------' - */ -// If it accepts an argument (i.e, is a function), it doesn't need KC_. -// Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default - // left hand - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, - KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), - KC_BSPC, LT(MDIA, KC_A),KC_S, KC_D, KC_F, KC_G, - KC_LSFT, CTL_T(KC_Z), ALT_T(KC_X), KC_C, KC_V, KC_B, ALL_T(KC_NO), - LT(SYMB,KC_NONUS_BSLASH), KC_EQL, KC_BSLS, KC_LEFT,KC_RGHT, - ALT_T(KC_APP), KC_LGUI, - KC_HOME, - KC_SPC,KC_BSPC,KC_END, - // right hand - KC_RGHT, 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_LBRC, - KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), - MEH_T(KC_NO),KC_N, KC_M, KC_COMM,ALT_T(KC_DOT), CTL_T(KC_SLSH), KC_RSFT, - KC_UP, KC_DOWN,KC_RALT,KC_RBRC, KC_FN1, - KC_LALT,CTL_T(KC_ESC), - KC_PGUP, - KC_PGDN,KC_TAB, KC_ENT - ), -/* Keymap 1: Symbol Layer - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | EPRM | | | | | ? | . | 0 | = | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | | | - * | | |------| |------| | | - * | | | | | | | | - * `--------------------' `--------------------' - */ -// SYMBOLS -[SYMB] = KEYMAP( - // left hand - M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, - KC_TRNS,ACTION_MODS_KEY(MOD_LSFT, KC_RBRC), ACTION_MODS_KEY(MOD_RALT, KC_2), ACTION_MODS_KEY(MOD_RALT, KC_QUOT), ACTION_MODS_KEY(MOD_RALT, KC_BSLS),ACTION_MODS_KEY(MOD_RALT,KC_7),KC_TRNS, - KC_TRNS,ACTION_MODS_KEY(MOD_RALT,KC_3),KC_BSLS, ACTION_MODS_KEY(MOD_LSFT, KC_8), ACTION_MODS_KEY(MOD_RSFT, KC_9),ACTION_MODS_KEY(MOD_LSFT,KC_EQL), - KC_TRNS,ACTION_MODS_KEY(MOD_LSFT,KC_5),KC_EQL, ACTION_MODS_KEY(MOD_RALT, KC_LBRC), ACTION_MODS_KEY(MOD_RALT, KC_RBRC),ACTION_MODS_KEY(MOD_RALT,KC_EQL),KC_TRNS, - KC_TRNS,EPRM,KC_TRNS,KC_NONUS_BSLASH, ACTION_MODS_KEY(MOD_LSFT, KC_NONUS_BSLASH)/*KC_TRNS,KC_TRNS*/, - KC_TRNS,KC_TRNS, - KC_TRNS, - KC_TRNS,KC_TRNS,KC_TRNS, - // right hand - KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - KC_TRNS, KC_UP, KC_7, KC_8, KC_9, ACTION_MODS_KEY(MOD_RSFT,KC_3), KC_F12, - KC_DOWN, KC_4, KC_5, KC_6, ACTION_MODS_KEY(MOD_RSFT,KC_1), KC_TRNS, - KC_TRNS, ACTION_MODS_KEY(MOD_RSFT,KC_6), KC_1, KC_2, KC_3, ACTION_MODS_KEY(MOD_RALT,KC_NONUS_BSLASH), KC_TRNS, - ACTION_MODS_KEY(MOD_RSFT,KC_MINS),KC_DOT, KC_0, KC_EQL, KC_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS -), -/* Keymap 2: Media and mouse keys - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | RESET | | | | | | | | | | | | | | RESET | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | MsUp | | | | | | |H_UL | |H_OL | | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | |MsLeft|MsDown|MsRght| |------| |------| | | |H_LI | | Play | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | |H_CODE| | | | | | | | | Prev | Next | | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | |Brwser| - * | | |------| |------| |Back | - * | | | | | | | | - * `--------------------' `--------------------' - */ -// MEDIA AND MOUSE -[MDIA] = KEYMAP( - RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, HTML_CODE, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, - // right hand - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, - KC_TRNS, KC_TRNS, HTML_UL, KC_TRNS, HTML_OL, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, HTML_LI, KC_TRNS, KC_MPLY, - KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, - KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_WBAK -), -}; - -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); - } - break; - case 1: - if (record->event.pressed) { // For resetting EEPROM - eeconfig_init(); - } - break; - case 10: - if (record->event.pressed) { - SEND_TAG("li"); - } - break; - case 11: - if (record->event.pressed) { - SEND_TAG("ul"); - } - break; - case 12: - if (record->event.pressed) { - SEND_TAG("ol"); - } - break; - case 13: - if (record->event.pressed) { - SEND_TAG("code"); - } - break; - } - return MACRO_NONE; -}; - -// Runs just one time when the keyboard initializes. -void matrix_init_user(void) { - -}; - - -// Runs constantly in the background, in a loop. -void matrix_scan_user(void) { - - uint8_t layer = biton32(layer_state); - - switch (layer) { - // TODO: Make this relevant to the ErgoDox EZ. - case 0: - ergodox_board_led_off(); - lcd_backlight_hal_color(0, 0, 0); - break; - case 1: - lcd_backlight_hal_color(5000, 0, 0); - break; - case 2: - lcd_backlight_hal_color(0, 5000, 0); - break; - default: - // none - break; - } - -}; - -void send_key(uint16_t keycode) { - register_code(keycode); - unregister_code(keycode); -} - -void go_back_based_on_tag(char* tag) { - const int BRACKETS_AND_SLASH_LENGTH = 3; - - for (int i=0; i < strlen(tag) + BRACKETS_AND_SLASH_LENGTH; i++) { - send_key(KC_LEFT); - } -} - -void send_larger_than() { - register_code(KC_LSFT); - send_key(KC_NONUS_BSLASH); - unregister_code(KC_LSFT); - -} diff --git a/keyboards/ergodox/keymaps/swissgerman_infinity/readme.md b/keyboards/ergodox/keymaps/swissgerman_infinity/readme.md deleted file mode 100644 index 1c35f7473..000000000 --- a/keyboards/ergodox/keymaps/swissgerman_infinity/readme.md +++ /dev/null @@ -1,14 +0,0 @@ -# ErgoDox Infinity Swiss German Configuration - -Swiss German keyboard layout based on the Ergodox EZ default layout. - -Keyboard diagrams created with the [keyboard layout editor](http://www.keyboard-layout-editor.com). - -Diagram sources: [default layer](keyboard-layout.json), [layer 2 & 3](keyboard-layout_2_3.json) - -![Layout Layer 0](keyboard-layout.png) -![Layout Layer 1&2](keyboard-layout_1_2.png) - -## Changelog -* Jan 21, 2017: - * Initial version. -- cgit v1.2.3 From 6b5cd656fd32033d1b5d117381208cd6708721ed Mon Sep 17 00:00:00 2001 From: Andreas Schmidt Date: Sat, 21 Jan 2017 20:55:18 +0100 Subject: Correct layout description of ergodox swissgerman - Added missing HTML macros to media layer. --- .../keymaps/swissgerman/keyboard-layout_1_2.png | Bin 54604 -> 56347 bytes .../keymaps/swissgerman/keyboard-layout_2_3.json | 31 +++++++++++---------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.png b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.png index 835816b53..e0a455369 100644 Binary files a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.png and b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.png differ diff --git a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_2_3.json b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_2_3.json index e3d366057..332f8f3b5 100644 --- a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_2_3.json +++ b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_2_3.json @@ -97,18 +97,20 @@ }, "}", { - "x": 8.5 + "x": 8.5, + "t": "#b81c1c\n\n\n#529151" }, - "7", + "7\n\n\nHTML ul", { "x": 1 }, - "9" + "9\n\n\nHTML ol" ], [ { "y": -0.875, - "x": 5.5 + "x": 5.5, + "t": "#b81c1c" }, "|", { @@ -158,16 +160,14 @@ }, "(\n\n\n", { - "x": 10.5, - "t": "#b81c1c" + "x": 10.5 }, - "5" + "5\n\n\nHTML li" ], [ { "y": -0.875, - "x": 2.5, - "t": "#b81c1c\n\n\n#529151" + "x": 2.5 }, "$\n\n\n", { @@ -237,13 +237,12 @@ { "y": -0.75, "x": 3.5, - "t": "#b81c1c", + "t": "#b81c1c\n\n\n#529151", "a": 4 }, - "[", + "[\n\n\nHTML code", { - "x": 10.5, - "t": "#b81c1c\n\n\n#529151" + "x": 10.5 }, "2\n\n\n" ], @@ -255,11 +254,13 @@ }, "^", { - "x": 1 + "x": 1, + "t": "#b81c1c\n\n\n#529151" }, "]", { - "x": 8.5 + "x": 8.5, + "t": "#b81c1c" }, "1", { -- cgit v1.2.3 From eb6abb6305d66033b67a9860b57b21765b5b46bb Mon Sep 17 00:00:00 2001 From: Andreas Schmidt Date: Sat, 21 Jan 2017 20:58:28 +0100 Subject: Renamed JSON source of Ergodox Swiss German - Renamed the JSON source files for the layout description of the Ergodox Swiss German keymap --- .../keymaps/swissgerman/keyboard-layout_1_2.json | 430 +++++++++++++++++++++ .../keymaps/swissgerman/keyboard-layout_2_3.json | 430 --------------------- keyboards/ergodox/keymaps/swissgerman/readme.md | 2 +- 3 files changed, 431 insertions(+), 431 deletions(-) create mode 100644 keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.json delete mode 100644 keyboards/ergodox/keymaps/swissgerman/keyboard-layout_2_3.json diff --git a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.json b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.json new file mode 100644 index 000000000..332f8f3b5 --- /dev/null +++ b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.json @@ -0,0 +1,430 @@ +[ + { + "backcolor": "#ffffff" + }, + [ + { + "x": 3.5, + "t": "#b81c1c" + }, + "F3", + { + "x": 10.5 + }, + "F8" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "F2", + { + "x": 1 + }, + "F4", + { + "x": 8.5 + }, + "F7", + { + "x": 1 + }, + "F9" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "F5", + { + "t": "#000000", + "a": 7 + }, + "", + { + "x": 4.5 + }, + "", + { + "t": "#b81c1c", + "a": 4 + }, + "F6" + ], + [ + { + "y": -0.875, + "t": "#000000\n\n\n#529151", + "w": 1.5 + }, + "\n\n\nFlash", + { + "t": "#b81c1c" + }, + "F1", + { + "x": 14.5 + }, + "F10", + { + "t": "#b81c1c\n\n\n#529151", + "w": 1.5 + }, + "F11\n\n\nFlash" + ], + [ + { + "y": -0.375, + "x": 3.5 + }, + "{\n\n\n", + { + "x": 10.5, + "t": "#b81c1c" + }, + "8" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "@", + { + "x": 1 + }, + "}", + { + "x": 8.5, + "t": "#b81c1c\n\n\n#529151" + }, + "7\n\n\nHTML ul", + { + "x": 1 + }, + "9\n\n\nHTML ol" + ], + [ + { + "y": -0.875, + "x": 5.5, + "t": "#b81c1c" + }, + "|", + { + "t": "#000000", + "a": 7, + "h": 1.5 + }, + "", + { + "x": 4.5, + "h": 1.5 + }, + "", + { + "t": "#b81c1c", + "a": 4 + }, + "" + ], + [ + { + "y": -0.875, + "t": "#000000", + "a": 7, + "w": 1.5 + }, + "", + { + "t": "#b81c1c", + "a": 4 + }, + "!", + { + "x": 14.5 + }, + "*", + { + "w": 1.5 + }, + "F12" + ], + [ + { + "y": -0.375, + "x": 3.5, + "t": "#b81c1c\n\n\n#529151" + }, + "(\n\n\n", + { + "x": 10.5 + }, + "5\n\n\nHTML li" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "$\n\n\n", + { + "x": 1 + }, + ")\n\n\n", + { + "x": 8.5, + "t": "#b81c1c" + }, + "4", + { + "x": 1 + }, + "6" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "`", + { + "x": 6.5 + }, + "" + ], + [ + { + "y": -0.875, + "t": "#000000", + "a": 7, + "w": 1.5 + }, + "", + { + "t": "#b81c1c", + "a": 4 + }, + "#", + { + "x": 14.5 + }, + "+", + { + "t": "#000000\n\n\n#529151", + "w": 1.5 + }, + "\n\n\n" + ], + [ + { + "y": -0.625, + "x": 6.5, + "t": "#000000", + "a": 7, + "h": 1.5 + }, + "", + { + "x": 4.5, + "h": 1.5 + }, + "" + ], + [ + { + "y": -0.75, + "x": 3.5, + "t": "#b81c1c\n\n\n#529151", + "a": 4 + }, + "[\n\n\nHTML code", + { + "x": 10.5 + }, + "2\n\n\n" + ], + [ + { + "y": -0.875, + "x": 2.5, + "t": "#b81c1c" + }, + "^", + { + "x": 1, + "t": "#b81c1c\n\n\n#529151" + }, + "]", + { + "x": 8.5, + "t": "#b81c1c" + }, + "1", + { + "x": 1, + "t": "#b81c1c\n\n\n#529151" + }, + "3\n\n\n" + ], + [ + { + "y": -0.875, + "x": 5.5, + "t": "#b81c1c" + }, + "~", + { + "x": 6.5 + }, + "&" + ], + [ + { + "y": -0.875, + "t": "#000000", + "a": 7, + "w": 1.5 + }, + "", + { + "t": "#b81c1c", + "a": 4 + }, + "%", + { + "x": 14.5 + }, + "\\", + { + "t": "#000000", + "a": 7, + "w": 1.5 + }, + "" + ], + [ + { + "y": -0.375, + "x": 3.5, + "t": "#000000\n\n\n#529151", + "a": 4 + }, + "\n\n\nleft click", + { + "x": 10.5, + "t": "#b81c1c\n\n\n#529151" + }, + ".\n\n\n" + ], + [ + { + "y": -0.875, + "x": 2.5, + "t": "#000000", + "a": 7 + }, + "", + { + "x": 1, + "t": "#000000\n\n\n#529151", + "a": 4 + }, + "\n\n\nright click", + { + "x": 8.5, + "t": "#b81c1c\n\n\n#529151" + }, + "?\n\n\n", + { + "x": 1, + "t": "#b81c1c" + }, + "0" + ], + [ + { + "y": -0.75, + "x": 0.5, + "t": "#000000", + "a": 7 + }, + "", + { + "t": "#b81c1c", + "a": 4 + }, + "EPRM RST", + { + "x": 14.5, + "t": "#000000", + "a": 7 + }, + "", + "" + ], + [ + { + "r": 30, + "rx": 6.5, + "ry": 4.25, + "y": -1, + "x": 1 + }, + "", + "" + ], + [ + { + "h": 2 + }, + "", + { + "h": 2 + }, + "", + "" + ], + [ + { + "x": 2 + }, + "" + ], + [ + { + "r": -30, + "rx": 13, + "y": -1, + "x": -3 + }, + "", + "" + ], + [ + { + "x": -3 + }, + "", + { + "h": 2 + }, + "", + { + "t": "#000000\n\n\n#529151", + "a": 4, + "h": 2 + }, + "\n\n\nWeb back" + ], + [ + { + "x": -3, + "t": "#000000", + "a": 7 + }, + "" + ] +] diff --git a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_2_3.json b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_2_3.json deleted file mode 100644 index 332f8f3b5..000000000 --- a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_2_3.json +++ /dev/null @@ -1,430 +0,0 @@ -[ - { - "backcolor": "#ffffff" - }, - [ - { - "x": 3.5, - "t": "#b81c1c" - }, - "F3", - { - "x": 10.5 - }, - "F8" - ], - [ - { - "y": -0.875, - "x": 2.5 - }, - "F2", - { - "x": 1 - }, - "F4", - { - "x": 8.5 - }, - "F7", - { - "x": 1 - }, - "F9" - ], - [ - { - "y": -0.875, - "x": 5.5 - }, - "F5", - { - "t": "#000000", - "a": 7 - }, - "", - { - "x": 4.5 - }, - "", - { - "t": "#b81c1c", - "a": 4 - }, - "F6" - ], - [ - { - "y": -0.875, - "t": "#000000\n\n\n#529151", - "w": 1.5 - }, - "\n\n\nFlash", - { - "t": "#b81c1c" - }, - "F1", - { - "x": 14.5 - }, - "F10", - { - "t": "#b81c1c\n\n\n#529151", - "w": 1.5 - }, - "F11\n\n\nFlash" - ], - [ - { - "y": -0.375, - "x": 3.5 - }, - "{\n\n\n", - { - "x": 10.5, - "t": "#b81c1c" - }, - "8" - ], - [ - { - "y": -0.875, - "x": 2.5 - }, - "@", - { - "x": 1 - }, - "}", - { - "x": 8.5, - "t": "#b81c1c\n\n\n#529151" - }, - "7\n\n\nHTML ul", - { - "x": 1 - }, - "9\n\n\nHTML ol" - ], - [ - { - "y": -0.875, - "x": 5.5, - "t": "#b81c1c" - }, - "|", - { - "t": "#000000", - "a": 7, - "h": 1.5 - }, - "", - { - "x": 4.5, - "h": 1.5 - }, - "", - { - "t": "#b81c1c", - "a": 4 - }, - "" - ], - [ - { - "y": -0.875, - "t": "#000000", - "a": 7, - "w": 1.5 - }, - "", - { - "t": "#b81c1c", - "a": 4 - }, - "!", - { - "x": 14.5 - }, - "*", - { - "w": 1.5 - }, - "F12" - ], - [ - { - "y": -0.375, - "x": 3.5, - "t": "#b81c1c\n\n\n#529151" - }, - "(\n\n\n", - { - "x": 10.5 - }, - "5\n\n\nHTML li" - ], - [ - { - "y": -0.875, - "x": 2.5 - }, - "$\n\n\n", - { - "x": 1 - }, - ")\n\n\n", - { - "x": 8.5, - "t": "#b81c1c" - }, - "4", - { - "x": 1 - }, - "6" - ], - [ - { - "y": -0.875, - "x": 5.5 - }, - "`", - { - "x": 6.5 - }, - "" - ], - [ - { - "y": -0.875, - "t": "#000000", - "a": 7, - "w": 1.5 - }, - "", - { - "t": "#b81c1c", - "a": 4 - }, - "#", - { - "x": 14.5 - }, - "+", - { - "t": "#000000\n\n\n#529151", - "w": 1.5 - }, - "\n\n\n" - ], - [ - { - "y": -0.625, - "x": 6.5, - "t": "#000000", - "a": 7, - "h": 1.5 - }, - "", - { - "x": 4.5, - "h": 1.5 - }, - "" - ], - [ - { - "y": -0.75, - "x": 3.5, - "t": "#b81c1c\n\n\n#529151", - "a": 4 - }, - "[\n\n\nHTML code", - { - "x": 10.5 - }, - "2\n\n\n" - ], - [ - { - "y": -0.875, - "x": 2.5, - "t": "#b81c1c" - }, - "^", - { - "x": 1, - "t": "#b81c1c\n\n\n#529151" - }, - "]", - { - "x": 8.5, - "t": "#b81c1c" - }, - "1", - { - "x": 1, - "t": "#b81c1c\n\n\n#529151" - }, - "3\n\n\n" - ], - [ - { - "y": -0.875, - "x": 5.5, - "t": "#b81c1c" - }, - "~", - { - "x": 6.5 - }, - "&" - ], - [ - { - "y": -0.875, - "t": "#000000", - "a": 7, - "w": 1.5 - }, - "", - { - "t": "#b81c1c", - "a": 4 - }, - "%", - { - "x": 14.5 - }, - "\\", - { - "t": "#000000", - "a": 7, - "w": 1.5 - }, - "" - ], - [ - { - "y": -0.375, - "x": 3.5, - "t": "#000000\n\n\n#529151", - "a": 4 - }, - "\n\n\nleft click", - { - "x": 10.5, - "t": "#b81c1c\n\n\n#529151" - }, - ".\n\n\n" - ], - [ - { - "y": -0.875, - "x": 2.5, - "t": "#000000", - "a": 7 - }, - "", - { - "x": 1, - "t": "#000000\n\n\n#529151", - "a": 4 - }, - "\n\n\nright click", - { - "x": 8.5, - "t": "#b81c1c\n\n\n#529151" - }, - "?\n\n\n", - { - "x": 1, - "t": "#b81c1c" - }, - "0" - ], - [ - { - "y": -0.75, - "x": 0.5, - "t": "#000000", - "a": 7 - }, - "", - { - "t": "#b81c1c", - "a": 4 - }, - "EPRM RST", - { - "x": 14.5, - "t": "#000000", - "a": 7 - }, - "", - "" - ], - [ - { - "r": 30, - "rx": 6.5, - "ry": 4.25, - "y": -1, - "x": 1 - }, - "", - "" - ], - [ - { - "h": 2 - }, - "", - { - "h": 2 - }, - "", - "" - ], - [ - { - "x": 2 - }, - "" - ], - [ - { - "r": -30, - "rx": 13, - "y": -1, - "x": -3 - }, - "", - "" - ], - [ - { - "x": -3 - }, - "", - { - "h": 2 - }, - "", - { - "t": "#000000\n\n\n#529151", - "a": 4, - "h": 2 - }, - "\n\n\nWeb back" - ], - [ - { - "x": -3, - "t": "#000000", - "a": 7 - }, - "" - ] -] diff --git a/keyboards/ergodox/keymaps/swissgerman/readme.md b/keyboards/ergodox/keymaps/swissgerman/readme.md index 49889cd65..b1061c1dd 100644 --- a/keyboards/ergodox/keymaps/swissgerman/readme.md +++ b/keyboards/ergodox/keymaps/swissgerman/readme.md @@ -4,7 +4,7 @@ Swiss German keyboard layout based on the Ergodox EZ default layout. Keyboard diagrams created with the [keyboard layout editor](http://www.keyboard-layout-editor.com). -Diagram sources: [default layer](keyboard-layout.json), [layer 2 & 3](keyboard-layout_2_3.json) +Diagram sources: [default layer](keyboard-layout.json), [layer 1 & 2](keyboard-layout_1_2.json) ![Layout Layer 0](keyboard-layout.png) ![Layout Layer 1&2](keyboard-layout_1_2.png) -- cgit v1.2.3 From 9ce38cbccf073fccea6f7ee6492bf472a48852b8 Mon Sep 17 00:00:00 2001 From: Luiz Ribeiro Date: Sat, 21 Jan 2017 17:09:17 -0500 Subject: Simplified and polished a bit the code changes on tmk_core --- keyboards/ps2avrGB/config.h | 2 +- tmk_core/common/avr/bootloader.c | 6 ++++-- tmk_core/common/avr/suspend.c | 2 -- tmk_core/common/command.c | 1 + tmk_core/protocol/vusb.mk | 4 ++-- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/keyboards/ps2avrGB/config.h b/keyboards/ps2avrGB/config.h index dfaea5979..f0bef2464 100644 --- a/keyboards/ps2avrGB/config.h +++ b/keyboards/ps2avrGB/config.h @@ -34,7 +34,7 @@ along with this program. If not, see . #define BACKLIGHT_COLOR 0x110000 #define NO_UART 1 -#define EEPROM_BOOTLOADER_START 1 +#define BOOTLOADHID_BOOTLOADER 1 /* key combination for command */ #define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) diff --git a/tmk_core/common/avr/bootloader.c b/tmk_core/common/avr/bootloader.c index 98a24d178..34db8d0b0 100644 --- a/tmk_core/common/avr/bootloader.c +++ b/tmk_core/common/avr/bootloader.c @@ -90,8 +90,10 @@ void bootloader_jump(void) { _delay_ms(5); #endif - #ifdef EEPROM_BOOTLOADER_START - eeprom_write_byte((uint8_t *)EEPROM_BOOTLOADER_START, 0x00); + #ifdef BOOTLOADHID_BOOTLOADER + // force bootloadHID to stay in bootloader mode, so that it waits + // for a new firmware to be flashed + eeprom_write_byte((uint8_t *)1, 0x00); #endif // watchdog reset diff --git a/tmk_core/common/avr/suspend.c b/tmk_core/common/avr/suspend.c index 0e97892d9..0c81e8361 100644 --- a/tmk_core/common/avr/suspend.c +++ b/tmk_core/common/avr/suspend.c @@ -65,7 +65,6 @@ static uint8_t wdt_timeout = 0; static void power_down(uint8_t wdto) { -#ifndef __AVR_ATmega32A__ #ifdef PROTOCOL_LUFA if (USB_DeviceState == DEVICE_STATE_Configured) return; #endif @@ -100,7 +99,6 @@ static void power_down(uint8_t wdto) // Disable watchdog after sleep wdt_disable(); -#endif } #endif diff --git a/tmk_core/common/command.c b/tmk_core/common/command.c index beba768ec..f79d5a257 100644 --- a/tmk_core/common/command.c +++ b/tmk_core/common/command.c @@ -236,6 +236,7 @@ static void print_status(void) print_val_hex8(host_keyboard_leds()); #ifndef PROTOCOL_VUSB + // these aren't set on the V-USB protocol, so we just ignore them for now print_val_hex8(keyboard_protocol); print_val_hex8(keyboard_idle); #endif diff --git a/tmk_core/protocol/vusb.mk b/tmk_core/protocol/vusb.mk index 4d90510af..897b833e1 100644 --- a/tmk_core/protocol/vusb.mk +++ b/tmk_core/protocol/vusb.mk @@ -2,7 +2,7 @@ VUSB_DIR = protocol/vusb OPT_DEFS += -DPROTOCOL_VUSB -SRC += $(VUSB_DIR)/main.c \ +SRC += $(VUSB_DIR)/main.c \ $(VUSB_DIR)/vusb.c \ $(VUSB_DIR)/usbdrv/usbdrv.c \ $(VUSB_DIR)/usbdrv/usbdrvasm.S \ @@ -16,7 +16,7 @@ SRC += $(COMMON_DIR)/sendchar_uart.c \ $(COMMON_DIR)/uart.c endif + # Search Path -#VPATH += $(TMK_PATH)/$(VUSB_DIR) VPATH += $(TMK_PATH)/$(VUSB_DIR) VPATH += $(TMK_PATH)/$(VUSB_DIR)/usbdrv -- cgit v1.2.3 From bfbab75292a3e1fa9fea501fc3c37698c16dedd5 Mon Sep 17 00:00:00 2001 From: Luiz Ribeiro Date: Sat, 21 Jan 2017 18:15:39 -0500 Subject: Slightly saner default keymap for ps2avrGB and removed some unused code --- keyboards/ps2avrGB/config.h | 4 ---- keyboards/ps2avrGB/keymaps/default/keymap.c | 27 ++++----------------------- 2 files changed, 4 insertions(+), 27 deletions(-) diff --git a/keyboards/ps2avrGB/config.h b/keyboards/ps2avrGB/config.h index f0bef2464..b5c696f3f 100644 --- a/keyboards/ps2avrGB/config.h +++ b/keyboards/ps2avrGB/config.h @@ -29,10 +29,6 @@ along with this program. If not, see . #define MATRIX_ROWS 8 #define MATRIX_COLS 15 -/* only support one hard-coded backlight color for now */ -#define BACKLIGHT_LEVELS 0 -#define BACKLIGHT_COLOR 0x110000 - #define NO_UART 1 #define BOOTLOADHID_BOOTLOADER 1 diff --git a/keyboards/ps2avrGB/keymaps/default/keymap.c b/keyboards/ps2avrGB/keymaps/default/keymap.c index 43cc6bce3..bd1ce775c 100644 --- a/keyboards/ps2avrGB/keymaps/default/keymap.c +++ b/keyboards/ps2avrGB/keymaps/default/keymap.c @@ -2,33 +2,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KEYMAP( \ - ESC, NO, NO, NO, NO, NO, NO, MPRV,MPLY,MNXT,MUTE,VOLD,VOLU,PSCR,HOME,END, \ + ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,HOME,END, \ GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, DEL, \ - TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, FN1, \ - FN2, A, S, D, F, G, H, J, K, L, SCLN,QUOT,ENT, PGUP,\ + TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, INS, \ + CAPS,A, S, D, F, G, H, J, K, L, SCLN,QUOT,ENT, PGUP,\ LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH,RSFT, UP, PGDN,\ - FN0, LALT,LGUI, SPC, RGUI,RALT,RCTL,LEFT,DOWN,RGHT \ - ), - KEYMAP( \ - NO, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, NO, NO, NO, \ - NO, NO, NO, NO, NO, NO, NO, MPRV,MPLY,MNXT,MUTE,VOLD,VOLU,DEL, NO, \ - NO, NO, NO, NO, NO, NO, NO, PGUP,NO, NO, NO, NO, NO, NO, TRNS,\ - FN2, NO, NO, PGDN,NO, NO, LEFT,DOWN,UP, RGHT,NO, NO, NO, NO, \ - TRNS,NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, TRNS, NO, NO, \ - TRNS,TRNS,TRNS, NO, TRNS,TRNS,TRNS,NO, NO, NO \ - ), - KEYMAP( \ - NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \ - NO, NO, NO, NO, END, NO, NO, NO, NO, NO, HOME,NO, NO, NO, NO, \ - NO, BTN1,MS_U,BTN2,NO, NO, NO, PGUP,FN1, NO, NO, NO, NO, NO, TRNS,\ - FN2, MS_L,MS_D,MS_R,NO, NO, LEFT,DOWN,UP, RGHT,NO, NO, NO, NO, \ - TRNS,NO, DEL, NO, NO, NO, NO, NO, NO, NO, NO, TRNS, NO, NO, \ - TRNS,TRNS,TRNS, NO, TRNS,TRNS,TRNS,NO, NO, NO \ + LCTL,LALT,LGUI, SPC, RGUI,RALT,RCTL,LEFT,DOWN,RGHT \ ), }; const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), - [1] = ACTION_LAYER_TOGGLE(2), - [2] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_ESC), }; -- cgit v1.2.3 From 642d0acef547c8276ed82a319d2e16c5a977d1a4 Mon Sep 17 00:00:00 2001 From: Luiz Ribeiro Date: Sat, 21 Jan 2017 18:23:44 -0500 Subject: =?UTF-8?q?Added=20a=20copyright=20header=20to=20the=20default=20k?= =?UTF-8?q?eymap...=20=C2=AF\=5F(=E3=83=84)=5F/=C2=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- keyboards/ps2avrGB/keymaps/default/keymap.c | 17 +++++++++++++++++ keyboards/ps2avrGB/ps2avrGB.h | 1 + 2 files changed, 18 insertions(+) diff --git a/keyboards/ps2avrGB/keymaps/default/keymap.c b/keyboards/ps2avrGB/keymaps/default/keymap.c index bd1ce775c..5c66cde59 100644 --- a/keyboards/ps2avrGB/keymaps/default/keymap.c +++ b/keyboards/ps2avrGB/keymaps/default/keymap.c @@ -1,3 +1,20 @@ +/* +Copyright 2017 Luiz Ribeiro + +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 "ps2avrGB.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/ps2avrGB/ps2avrGB.h b/keyboards/ps2avrGB/ps2avrGB.h index 1527c604e..6432e3be9 100644 --- a/keyboards/ps2avrGB/ps2avrGB.h +++ b/keyboards/ps2avrGB/ps2avrGB.h @@ -14,6 +14,7 @@ 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 KEYMAP_COMMON_H #define KEYMAP_COMMON_H -- cgit v1.2.3 From 803a861b4e5cce8da2f1260273ee5d918b0f58a7 Mon Sep 17 00:00:00 2001 From: lucwastiaux Date: Sun, 22 Jan 2017 10:32:17 +0800 Subject: document BRACKETS and SHELL_LAYER --- keyboards/ergodox/keymaps/dvorak_programmer/README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/README.md b/keyboards/ergodox/keymaps/dvorak_programmer/README.md index 3e4a2545b..54da74f7f 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/README.md +++ b/keyboards/ergodox/keymaps/dvorak_programmer/README.md @@ -7,18 +7,23 @@ Layers ------ * BASE: this is where you type. +* SHELL_LAYER: this is a permanent layer which I use when I don't need the F keys and gives me bash shortcuts on the top row. * SHELL_NAV: hold down the Tab key to access shell/terminal navigation shorcuts such as forward/backward word, history, Ctrl+C, screen tab movement. * KEY_NAV: arrow key movement with backward/forward word support, and copy/paste. * KEY_SEL: same as above, but every movement shift-selects. * NUMBER: keypad layer. * SYMBOL: all the symbols. -* BRACKET: special brackets-only layer for programming +* BRACKET: special brackets-only layer for programming. Activated by pressing left capslock (OSL) * SHORTCUTS: sends Hyper keys for Autohotkey to interpret. I use this to switch between specific apps. * MOUSE: use mouse keys Updates ------- +2017/01/22: +* Made brackets toggle an OSL on the left capslock +* Added SHELL_LAYER + 2016/12/10: * toggle for brackets layer is now on left thumb cluster. -- cgit v1.2.3 From 3fd9aa3660331b05144f9cf7cebb60bef32a352f Mon Sep 17 00:00:00 2001 From: Andreas Schmidt Date: Sun, 22 Jan 2017 12:30:18 +0100 Subject: SG Ergodox layout: Add
macro to media layer - Added
macro to media layer of Swiss German layout for Ergodox --- keyboards/ergodox/keymaps/swissgerman/keymap.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/keyboards/ergodox/keymaps/swissgerman/keymap.c b/keyboards/ergodox/keymaps/swissgerman/keymap.c index a969393bb..54a8299cb 100644 --- a/keyboards/ergodox/keymaps/swissgerman/keymap.c +++ b/keyboards/ergodox/keymaps/swissgerman/keymap.c @@ -18,6 +18,7 @@ #define HTML_UL M(11) #define HTML_OL M(12) #define HTML_CODE M(13) +#define HTML_BR M(14) #define SEND_TAG(TAG) do {\ send_key(KC_NONUS_BSLASH); \ @@ -30,6 +31,13 @@ go_back_based_on_tag(TAG); \ } while (0) +#define SEND_SHORT_TAG(TAG) do {\ + send_key(KC_NONUS_BSLASH); \ + SEND_STRING(TAG); \ + SEND_STRING("&"); \ + send_larger_than(); \ + } while (0) + void send_key(uint16_t keycode); void go_back_based_on_tag(char* tag); void send_larger_than(void); @@ -130,7 +138,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | | |MsLeft|MsDown|MsRght| |------| |------| | | |H_LI | | Play | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | |H_CODE| | | | | | | | | Prev | Next | | | + * | | |H_CODE| |H_BR | | | | | | | Prev | Next | | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | * `----------------------------------' `----------------------------------' @@ -147,7 +155,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, HTML_CODE, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, HTML_CODE, KC_TRNS, HTML_BR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, @@ -202,6 +210,10 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) SEND_TAG("code"); } break; + case 14: + if (record->event.pressed) { + SEND_SHORT_TAG("br"); + } } return MACRO_NONE; }; -- cgit v1.2.3 From 5c4a73d788470a3fc53b8dd06b808cc662d37795 Mon Sep 17 00:00:00 2001 From: Andreas Schmidt Date: Sun, 22 Jan 2017 12:32:40 +0100 Subject: SG Ergodox layout: Add ENTER to left keyboard - Swiss German Ergodox layout: Added ENTER key to left keyboard half on media layer such that the enter key is available on both halves to be able to flash both halves without an additional keyboard. --- keyboards/ergodox/keymaps/swissgerman/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/ergodox/keymaps/swissgerman/keymap.c b/keyboards/ergodox/keymaps/swissgerman/keymap.c index 54a8299cb..93e36d032 100644 --- a/keyboards/ergodox/keymaps/swissgerman/keymap.c +++ b/keyboards/ergodox/keymaps/swissgerman/keymap.c @@ -125,7 +125,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_DOWN, KC_4, KC_5, KC_6, ACTION_MODS_KEY(MOD_RSFT,KC_1), KC_TRNS, KC_TRNS, ACTION_MODS_KEY(MOD_RSFT,KC_6), KC_1, KC_2, KC_3, ACTION_MODS_KEY(MOD_RALT,KC_NONUS_BSLASH), KC_TRNS, ACTION_MODS_KEY(MOD_RSFT,KC_MINS),KC_DOT, KC_0, KC_EQL, KC_TRNS, - KC_TRNS, KC_TRNS, + KC_ENT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), @@ -145,7 +145,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-------------. ,-------------. * | | | | | | * ,------|------|------| |------+------+------. - * | | | | | | |Brwser| + * |Enter | | | | | |Brwser| * | | |------| |------| |Back | * | | | | | | | | * `--------------------' `--------------------' -- cgit v1.2.3 From c2c8a120228fe8b8bfc15f05f4a39f35f6372b08 Mon Sep 17 00:00:00 2001 From: Andreas Schmidt Date: Sun, 22 Jan 2017 12:35:24 +0100 Subject: SG Ergodox layout: Minor code formatting changes - Swiss German Ergodox layout: Removed unnecessary spaces. --- keyboards/ergodox/keymaps/swissgerman/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/ergodox/keymaps/swissgerman/keymap.c b/keyboards/ergodox/keymaps/swissgerman/keymap.c index 93e36d032..3f90c4e63 100644 --- a/keyboards/ergodox/keymaps/swissgerman/keymap.c +++ b/keyboards/ergodox/keymaps/swissgerman/keymap.c @@ -197,7 +197,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) break; case 11: if (record->event.pressed) { - SEND_TAG( "ul" ); + SEND_TAG("ul"); } break; case 12: -- cgit v1.2.3 From afd2c2ee9eac95869b8f9366f8861baf64444509 Mon Sep 17 00:00:00 2001 From: Andreas Schmidt Date: Sun, 22 Jan 2017 12:43:46 +0100 Subject: SG Ergodox layout: Fixed ENTER key mapping - Swiss German Ergodox layout: Additional ENTER key was mapped to wrong layer and keyboard half. --- keyboards/ergodox/keymaps/swissgerman/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/ergodox/keymaps/swissgerman/keymap.c b/keyboards/ergodox/keymaps/swissgerman/keymap.c index 3f90c4e63..2291fb651 100644 --- a/keyboards/ergodox/keymaps/swissgerman/keymap.c +++ b/keyboards/ergodox/keymaps/swissgerman/keymap.c @@ -125,7 +125,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_DOWN, KC_4, KC_5, KC_6, ACTION_MODS_KEY(MOD_RSFT,KC_1), KC_TRNS, KC_TRNS, ACTION_MODS_KEY(MOD_RSFT,KC_6), KC_1, KC_2, KC_3, ACTION_MODS_KEY(MOD_RALT,KC_NONUS_BSLASH), KC_TRNS, ACTION_MODS_KEY(MOD_RSFT,KC_MINS),KC_DOT, KC_0, KC_EQL, KC_TRNS, - KC_ENT, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), @@ -159,7 +159,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, + KC_ENT, KC_TRNS, KC_TRNS, // right hand KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, HTML_UL, KC_TRNS, HTML_OL, KC_TRNS, KC_TRNS, -- cgit v1.2.3 From 08c192caea1d0c1815b86461705f23d96f010e76 Mon Sep 17 00:00:00 2001 From: Andreas Schmidt Date: Sun, 22 Jan 2017 12:57:58 +0100 Subject: SG Ergodox layout: Updated layout documentation - Swiss German Ergodox layout: Updated layout documentation based on previous layout changes. --- .../keymaps/swissgerman/keyboard-layout.json | 4 +++- .../keymaps/swissgerman/keyboard-layout_1_2.json | 12 +++++++++--- .../keymaps/swissgerman/keyboard-layout_1_2.png | Bin 56347 -> 58099 bytes 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout.json b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout.json index 7a0397f72..6958952b4 100644 --- a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout.json +++ b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout.json @@ -1,6 +1,8 @@ [ { - "backcolor": "#ffffff" + "backcolor": "#ffffff", + "name": "Ergodox Swiss German Layout - Base Layer", + "author": "Andreas Schmidt (https://github.com/remigius42)" }, [ { diff --git a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.json b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.json index 332f8f3b5..38a728514 100644 --- a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.json +++ b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.json @@ -1,6 +1,8 @@ [ { - "backcolor": "#ffffff" + "backcolor": "#ffffff", + "name": "Ergodox Swiss German Layout - Symbol & Media Layer", + "author": "Andreas Schmidt (https://github.com/remigius42)" }, [ { @@ -257,7 +259,7 @@ "x": 1, "t": "#b81c1c\n\n\n#529151" }, - "]", + "]\n\n\nHTML br", { "x": 8.5, "t": "#b81c1c" @@ -378,10 +380,14 @@ ], [ { + "t": "#000000\n\n\n#529151", + "a": 4, "h": 2 }, - "", + "\n\n\nEnter", { + "t": "#000000", + "a": 7, "h": 2 }, "", diff --git a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.png b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.png index e0a455369..54c4a7587 100644 Binary files a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.png and b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.png differ -- cgit v1.2.3 From 84661ac44b15bd5e60cc223779fea05784672011 Mon Sep 17 00:00:00 2001 From: Luiz Ribeiro Date: Sun, 22 Jan 2017 12:06:14 -0500 Subject: Upgrade AVR 8-bit Toolchain to 3.5.4 on Travis --- .travis.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index e74744a96..b206d1451 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,6 @@ os: linux dist: trusty sudo: required language: c -compiler: avr-gcc branches: except: - /^.*-automated-build$/ @@ -12,13 +11,18 @@ env: matrix: - TARGET=all-keyboards AUTOGEN=true - TARGET=test AUTOGEN=false +before_install: + - wget http://www.atmel.com/images/avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz +install: + - tar -zxf avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz + - export PATH="$PATH:$TRAVIS_BUILD_DIR/avr8-gnu-toolchain-linux_x86_64/bin" +before_script: + - avr-gcc --version script: - make $TARGET AUTOGEN=$AUTOGEN addons: apt: packages: - - avr-libc - - gcc-avr - dfu-programmer - pandoc - gcc-arm-none-eabi -- cgit v1.2.3 From 9d24943ec1285c2d5d5853390abd5eb4e0cd7a2c Mon Sep 17 00:00:00 2001 From: TerryMathews Date: Sun, 22 Jan 2017 15:37:48 -0500 Subject: Refactor code to eliminate duplicate defines * Moved duplicated defines out of inappropriate source files (matrix pins in keymap subdirectory) * Eliminated default keymap directory * Hardcoded serial keymap to use serial defines and EE_CONFIG * Hardcoded i2c keymap to use i2c defines --- keyboards/lets_split/config.h | 43 ------ keyboards/lets_split/keymaps/default/keymap.c | 188 -------------------------- keyboards/lets_split/keymaps/i2c/config.h | 85 +----------- keyboards/lets_split/keymaps/serial/config.h | 87 +----------- keyboards/lets_split/rev1/config.h | 5 +- keyboards/lets_split/rev2/config.h | 4 +- 6 files changed, 16 insertions(+), 396 deletions(-) delete mode 100644 keyboards/lets_split/keymaps/default/keymap.c diff --git a/keyboards/lets_split/config.h b/keyboards/lets_split/config.h index 4db45ab0b..7df0c5752 100644 --- a/keyboards/lets_split/config.h +++ b/keyboards/lets_split/config.h @@ -20,49 +20,6 @@ along with this program. If not, see . #include "config_common.h" -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x3060 -#define DEVICE_VER 0x0001 -#define MANUFACTURER Wootpatoot -#define PRODUCT Lets Split -#define DESCRIPTION A split keyboard for the cheap makers - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ -// #define BACKLIGHT_LEVELS 3 - -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 - -/* 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 command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION - #ifdef SUBPROJECT_rev1 #include "rev1/config.h" #endif diff --git a/keyboards/lets_split/keymaps/default/keymap.c b/keyboards/lets_split/keymaps/default/keymap.c deleted file mode 100644 index 6f1f71f5f..000000000 --- a/keyboards/lets_split/keymaps/default/keymap.c +++ /dev/null @@ -1,188 +0,0 @@ -#include "lets_split.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 _ADJUST 16 - -enum custom_keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - DVORAK, - LOWER, - RAISE, - ADJUST, -}; - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* Qwerty - * ,-----------------------------------------------------------------------------------. - * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | S | D | F | G | H | J | K | L | ; | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_QWERTY] = KEYMAP( \ - KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ - KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ - KC_LCTL, ADJUST, KC_LALT, KC_LGUI, LOWER, KC_SPC, MT(MOD_LSFT, KC_SPC), RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ -), - -/* Colemak - * ,-----------------------------------------------------------------------------------. - * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | R | S | T | D | H | N | E | I | O | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_COLEMAK] = KEYMAP( \ - KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ - KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ - ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ -), - -/* Dvorak - * ,-----------------------------------------------------------------------------------. - * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | O | E | U | I | D | H | T | N | S | / | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_DVORAK] = KEYMAP( \ - KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ - KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ - KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \ - ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ -), -[3] = KEYMAP( \ - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \ - KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \ - _______, _______, _______, _______, _______, KC_BSPC, MT(MOD_LSFT, KC_BSPC), _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ -), -[4] = KEYMAP( \ - 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_F1, KC_F2, KC_F3, KC_F4, 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_ENT, MT(MOD_LSFT, KC_ENT), _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ -), - -/* Adjust (Lower + Raise) - * ,-----------------------------------------------------------------------------------. - * | | Reset| | | | | | | | | | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ -[_ADJUST] = KEYMAP( \ - _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ - _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ - _______, RGB_TOG,RGB_MOD,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ -) -}; - -#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 persistant_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 - persistant_default_layer_set(1UL<<_QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); - #endif - persistant_default_layer_set(1UL<<_COLEMAK); - } - return false; - break; - case DVORAK: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); - #endif - persistant_default_layer_set(1UL<<_DVORAK); - } - 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; -} \ No newline at end of file diff --git a/keyboards/lets_split/keymaps/i2c/config.h b/keyboards/lets_split/keymaps/i2c/config.h index 72e5ae66b..efe8bb0f2 100644 --- a/keyboards/lets_split/keymaps/i2c/config.h +++ b/keyboards/lets_split/keymaps/i2c/config.h @@ -14,89 +14,14 @@ 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 0x3060 -#define DEVICE_VER 0x0001 -#define MANUFACTURER Wootpatoot -#define PRODUCT Lets Split -#define DESCRIPTION A split keyboard for the cheap makers - -/* key matrix size */ -// Rows are doubled-up -#define MATRIX_ROWS 8 -#define MATRIX_COLS 6 - -// wiring of each half -#define MATRIX_ROW_PINS { B5, B4, E6, D7 } -#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } - -#define CATERINA_BOOTLOADER - #define USE_I2C -// Use serial if not using I2C -#ifndef USE_I2C -# define USE_SERIAL -#endif - -// #define EE_HANDS - #define I2C_MASTER_LEFT // #define I2C_MASTER_RIGHT -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ -// #define BACKLIGHT_LEVELS 3 - -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 - -/* 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 command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - -/* ws2812 RGB LED */ -#define RGB_DI_PIN D4 -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 8 // Number of LEDs -#define RGBLIGHT_HUE_STEP 10 -#define RGBLIGHT_SAT_STEP 17 -#define RGBLIGHT_VAL_STEP 17 - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -// #define NO_DEBUG - -/* disable print */ -// #define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION - +#ifdef SUBPROJECT_rev1 + #include "../../rev1/config.h" #endif +#ifdef SUBPROJECT_rev2 + #include "../../rev2/config.h" +#endif \ No newline at end of file diff --git a/keyboards/lets_split/keymaps/serial/config.h b/keyboards/lets_split/keymaps/serial/config.h index b0ad522fc..cd766cc4f 100644 --- a/keyboards/lets_split/keymaps/serial/config.h +++ b/keyboards/lets_split/keymaps/serial/config.h @@ -15,88 +15,15 @@ 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" +#define USE_SERIAL -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x3060 -#define DEVICE_VER 0x0001 -#define MANUFACTURER Wootpatoot -#define PRODUCT Lets Split -#define DESCRIPTION A split keyboard for the cheap makers +#define EE_HANDS -/* key matrix size */ -// Rows are doubled-up -#define MATRIX_ROWS 8 -#define MATRIX_COLS 6 - -// wiring of each half -#define MATRIX_ROW_PINS { B5, B4, E6, D7 } -#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } - -#define CATERINA_BOOTLOADER - -// #define USE_I2C - -// Use serial if not using I2C -#ifndef USE_I2C -# define USE_SERIAL -#endif - -// #define EE_HANDS - -#define I2C_MASTER_LEFT -// #define I2C_MASTER_RIGHT - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ -// #define BACKLIGHT_LEVELS 3 - -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 - -/* 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 command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - -/* ws2812 RGB LED */ -#define RGB_DI_PIN D4 -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 8 // Number of LEDs -#define RGBLIGHT_HUE_STEP 10 -#define RGBLIGHT_SAT_STEP 17 -#define RGBLIGHT_VAL_STEP 17 - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -// #define NO_DEBUG - -/* disable print */ -// #define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION +#ifdef SUBPROJECT_rev1 + #include "../../rev1/config.h" #endif +#ifdef SUBPROJECT_rev2 + #include "../../rev2/config.h" +#endif \ No newline at end of file diff --git a/keyboards/lets_split/rev1/config.h b/keyboards/lets_split/rev1/config.h index 825e5ec24..4d3d382a4 100644 --- a/keyboards/lets_split/rev1/config.h +++ b/keyboards/lets_split/rev1/config.h @@ -25,7 +25,6 @@ along with this program. If not, see . #define PRODUCT_ID 0x3060 #define DEVICE_VER 0x0001 #define MANUFACTURER Wootpatoot -#define PRODUCT Lets Split #define PRODUCT Lets Split v1 #define DESCRIPTION A split keyboard for the cheap makers @@ -42,13 +41,13 @@ along with this program. If not, see . // #define USE_I2C // Use serial if not using I2C -#ifndef USE_I2C +/*#ifndef USE_I2C # define USE_SERIAL #endif // #define EE_HANDS -#define I2C_MASTER_LEFT +#define I2C_MASTER_LEFT*/ // #define I2C_MASTER_RIGHT /* COL2ROW or ROW2COL */ diff --git a/keyboards/lets_split/rev2/config.h b/keyboards/lets_split/rev2/config.h index e9689d773..ed9e106db 100644 --- a/keyboards/lets_split/rev2/config.h +++ b/keyboards/lets_split/rev2/config.h @@ -42,13 +42,13 @@ along with this program. If not, see . // #define USE_I2C // Use serial if not using I2C -#ifndef USE_I2C +/*#ifndef USE_I2C # define USE_SERIAL #endif // #define EE_HANDS -#define I2C_MASTER_LEFT +#define I2C_MASTER_LEFT*/ // #define I2C_MASTER_RIGHT /* COL2ROW or ROW2COL */ -- cgit v1.2.3 From efa526f57016f691fbdd75b1088f7e47240615ea Mon Sep 17 00:00:00 2001 From: TerryMathews Date: Sun, 22 Jan 2017 15:46:43 -0500 Subject: Created lines to uncomment keyboards built upside down * Reverses column order to fix left-to-right key order that occurs if PCB assembled upside down. --- keyboards/lets_split/rev1/config.h | 2 ++ keyboards/lets_split/rev2/config.h | 1 + 2 files changed, 3 insertions(+) diff --git a/keyboards/lets_split/rev1/config.h b/keyboards/lets_split/rev1/config.h index 4d3d382a4..b73a7fb34 100644 --- a/keyboards/lets_split/rev1/config.h +++ b/keyboards/lets_split/rev1/config.h @@ -36,6 +36,8 @@ along with this program. If not, see . // wiring of each half #define MATRIX_ROW_PINS { B5, B4, E6, D7 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } +// #define MATRIX_COL_PINS { B3, B1, F7, F6, F5, F4 } uncomment this line and comment line above if you need to reverse left-to-right key order + #define CATERINA_BOOTLOADER diff --git a/keyboards/lets_split/rev2/config.h b/keyboards/lets_split/rev2/config.h index ed9e106db..86f6ad1be 100644 --- a/keyboards/lets_split/rev2/config.h +++ b/keyboards/lets_split/rev2/config.h @@ -36,6 +36,7 @@ along with this program. If not, see . // wiring of each half #define MATRIX_ROW_PINS { D7, E6, B4, B5 } #define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 } +// #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6 } uncomment this line and comment line above if you need to reverse left-to-right key order #define CATERINA_BOOTLOADER -- cgit v1.2.3 From a00957abca4a7c67d25450246fbe73fda09b0e72 Mon Sep 17 00:00:00 2001 From: TerryMathews Date: Sun, 22 Jan 2017 15:50:08 -0500 Subject: Fixed keymap matrix on rev2 * Fixed keymap matrix in rev2 so that left half and right half match when in same orientation. --- keyboards/lets_split/rev2/rev2.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/lets_split/rev2/rev2.h b/keyboards/lets_split/rev2/rev2.h index 990976de2..7c397912f 100644 --- a/keyboards/lets_split/rev2/rev2.h +++ b/keyboards/lets_split/rev2/rev2.h @@ -9,10 +9,10 @@ //void promicro_bootloader_jmp(bool program); #define KEYMAP( \ - k00, k01, k02, k03, k04, k05, k45, k44, k43, k42, k41, k40, \ - k10, k11, k12, k13, k14, k15, k55, k54, k53, k52, k51, k50, \ - k20, k21, k22, k23, k24, k25, k65, k64, k63, k62, k61, k60, \ - k30, k31, k32, k33, k34, k35, k75, k74, k73, k72, k71, k70 \ + k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \ + k10, k11, k12, k13, k14, k15, k50, k51, k52, k53, k54, k55, \ + k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \ + k30, k31, k32, k33, k34, k35, k70, k71, k72, k73, k74, k75 \ ) \ { \ { k00, k01, k02, k03, k04, k05 }, \ -- cgit v1.2.3 From 99d548c4fbf207a0d38077d655bcf86a92db562f Mon Sep 17 00:00:00 2001 From: TerryMathews Date: Sun, 22 Jan 2017 15:57:30 -0500 Subject: Missed commenting out notes at end of line --- keyboards/lets_split/rev1/config.h | 2 +- keyboards/lets_split/rev2/config.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/lets_split/rev1/config.h b/keyboards/lets_split/rev1/config.h index b73a7fb34..e5e9a1c82 100644 --- a/keyboards/lets_split/rev1/config.h +++ b/keyboards/lets_split/rev1/config.h @@ -36,7 +36,7 @@ along with this program. If not, see . // wiring of each half #define MATRIX_ROW_PINS { B5, B4, E6, D7 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } -// #define MATRIX_COL_PINS { B3, B1, F7, F6, F5, F4 } uncomment this line and comment line above if you need to reverse left-to-right key order +// #define MATRIX_COL_PINS { B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order #define CATERINA_BOOTLOADER diff --git a/keyboards/lets_split/rev2/config.h b/keyboards/lets_split/rev2/config.h index 86f6ad1be..07d3aa506 100644 --- a/keyboards/lets_split/rev2/config.h +++ b/keyboards/lets_split/rev2/config.h @@ -36,7 +36,7 @@ along with this program. If not, see . // wiring of each half #define MATRIX_ROW_PINS { D7, E6, B4, B5 } #define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 } -// #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6 } uncomment this line and comment line above if you need to reverse left-to-right key order +// #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6 } //uncomment this line and comment line above if you need to reverse left-to-right key order #define CATERINA_BOOTLOADER -- cgit v1.2.3 From 89461e743efbe49092c30cbd71c51ccecbfdd8a9 Mon Sep 17 00:00:00 2001 From: Christopher Browne Date: Sun, 22 Jan 2017 19:01:07 -0500 Subject: More keyboard map tweaking (#1019) * Add HOME/END keys as upper/lower on arrow-up/down * Reduce .hex file size by turning off unneeded options * Put digit keypad onto left hand upon RAISE; this will sometimes be preferable to double-hits of right hand --- keyboards/planck/keymaps/cbbrowne/Makefile | 4 ++-- keyboards/planck/keymaps/cbbrowne/keymap.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/keyboards/planck/keymaps/cbbrowne/Makefile b/keyboards/planck/keymaps/cbbrowne/Makefile index b1c70ace7..19e5c2a84 100644 --- a/keyboards/planck/keymaps/cbbrowne/Makefile +++ b/keyboards/planck/keymaps/cbbrowne/Makefile @@ -12,11 +12,11 @@ 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 = yes # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = yes # Audio output on port C6 +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. -API_SYSEX_ENABLE = yes # Enable SYSEX API (+5390) +API_SYSEX_ENABLE = no # Enable SYSEX API (+5390) # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/planck/keymaps/cbbrowne/keymap.c b/keyboards/planck/keymaps/cbbrowne/keymap.c index 2be4dab4b..0448a8d11 100644 --- a/keyboards/planck/keymaps/cbbrowne/keymap.c +++ b/keyboards/planck/keymaps/cbbrowne/keymap.c @@ -110,15 +110,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }, [_RAISE] = { /* RAISE */ {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_F1, KC_F2, KC_F3, KC_F4, 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, QWERTY, KEYPAD, KEYPAD, ALTSLASH,_______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_VOLD, KC_VOLU, KC_PGUP} + {_______, KC_4, KC_5, KC_6, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, + {_______, KC_7, KC_8, KC_9, _______, _______, _______, QWERTY, KEYPAD, KEYPAD, ALTSLASH,_______}, + {_______, KC_0, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_HOME, KC_END, KC_PGUP} }, [_LOWER] = { /* LOWER */ {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC}, {_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, QWERTY, KEYPAD, KEYPAD, ALTSLASH, _______}, - {_______, KEYPAD, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_VOLD, KC_VOLU, KC_PGUP} + {_______, KEYPAD, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_HOME, KC_END, KC_PGUP} }, [_KEYPAD] = { /* Key Pad */ {KC_ESC, USERNAME, MVERSION, KC_F10, KC_F11, KC_F12, KC_PGUP, KC_KP_ENTER, KC_7, KC_8, KC_9, KC_BSPC}, -- cgit v1.2.3 From 372af5e3f6dc2bc362dee1ea8615769d6df7f9a9 Mon Sep 17 00:00:00 2001 From: TerryMathews Date: Sun, 22 Jan 2017 22:06:53 -0500 Subject: More code cleanup Missed a few commented out vestigal defines in revx/config.h that had been moved to keymap/serial and i2c. --- keyboards/lets_split/rev1/config.h | 11 ----------- keyboards/lets_split/rev2/config.h | 12 ------------ 2 files changed, 23 deletions(-) diff --git a/keyboards/lets_split/rev1/config.h b/keyboards/lets_split/rev1/config.h index e5e9a1c82..2f5bde953 100644 --- a/keyboards/lets_split/rev1/config.h +++ b/keyboards/lets_split/rev1/config.h @@ -41,17 +41,6 @@ along with this program. If not, see . #define CATERINA_BOOTLOADER -// #define USE_I2C -// Use serial if not using I2C -/*#ifndef USE_I2C -# define USE_SERIAL -#endif - -// #define EE_HANDS - -#define I2C_MASTER_LEFT*/ -// #define I2C_MASTER_RIGHT - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/lets_split/rev2/config.h b/keyboards/lets_split/rev2/config.h index 07d3aa506..b34d7c004 100644 --- a/keyboards/lets_split/rev2/config.h +++ b/keyboards/lets_split/rev2/config.h @@ -40,18 +40,6 @@ along with this program. If not, see . #define CATERINA_BOOTLOADER -// #define USE_I2C - -// Use serial if not using I2C -/*#ifndef USE_I2C -# define USE_SERIAL -#endif - -// #define EE_HANDS - -#define I2C_MASTER_LEFT*/ -// #define I2C_MASTER_RIGHT - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW -- cgit v1.2.3 From 841d7e6a1d74b1fc45575ed551132ec27353ebf3 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Mon, 23 Jan 2017 13:55:24 -0500 Subject: turn off rgb_midi in ez --- keyboards/ergodox/ez/config.h | 2 +- keyboards/ergodox/ez/ez.c | 8 ++++---- quantum/process_keycode/process_music.c | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/keyboards/ergodox/ez/config.h b/keyboards/ergodox/ez/config.h index 6a8c66d7d..e4f95c302 100644 --- a/keyboards/ergodox/ez/config.h +++ b/keyboards/ergodox/ez/config.h @@ -49,7 +49,7 @@ along with this program. If not, see . #define RGBLIGHT_SAT_STEP 255 #define RGBLIGHT_VAL_STEP 12 -#define RGB_MIDI +// #define RGB_MIDI #define RGBW_BB_TWI #define RGBW 1 diff --git a/keyboards/ergodox/ez/ez.c b/keyboards/ergodox/ez/ez.c index 039e4c6bb..3e19f2302 100644 --- a/keyboards/ergodox/ez/ez.c +++ b/keyboards/ergodox/ez/ez.c @@ -52,9 +52,9 @@ uint8_t init_mcp23018(void) { // I2C subsystem - uint8_t sreg_prev; - sreg_prev=SREG; - cli(); + // uint8_t sreg_prev; + // sreg_prev=SREG; + // cli(); if (i2c_initialized == 0) { i2c_init(); // on pins D(1,0) i2c_initialized++; @@ -83,7 +83,7 @@ uint8_t init_mcp23018(void) { out: i2c_stop(); - SREG=sreg_prev; + // SREG=sreg_prev; return mcp23018_status; } diff --git a/quantum/process_keycode/process_music.c b/quantum/process_keycode/process_music.c index ca68bef6c..1e2648bff 100644 --- a/quantum/process_keycode/process_music.c +++ b/quantum/process_keycode/process_music.c @@ -114,6 +114,7 @@ bool process_music(uint16_t keycode, keyrecord_t *record) { music_sequence_interval+=10; return false; } + #define MUSIC_MODE_GUITAR #ifdef MUSIC_MODE_CHROMATIC float freq = ((float)220.0)*pow(2.0, -5.0)*pow(2.0,(music_starting_note + record->event.key.col + music_offset)/12.0+(MATRIX_ROWS - record->event.key.row)); -- cgit v1.2.3 From 245f77b863b1dbea9d87381b5f5cff2516553d1d Mon Sep 17 00:00:00 2001 From: Dylan Scott Date: Wed, 9 Nov 2016 07:45:20 +1100 Subject: Compare Makefile with itself instead of using `--help` --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 66c0ff30f..636eae3e5 100644 --- a/Makefile +++ b/Makefile @@ -487,7 +487,7 @@ $(SUBPROJECTS): %: %-allkm .PHONY: % %: # Check if we have the CMP tool installed - cmp --version >/dev/null 2>&1; if [ $$? -gt 0 ]; then printf "$(MSG_NO_CMP)"; exit 1; fi; + cmp $(ROOT_DIR)/Makefile $(ROOT_DIR)/Makefile >/dev/null 2>&1; if [ $$? -gt 0 ]; then printf "$(MSG_NO_CMP)"; exit 1; fi; # Check if the submodules are dirty, and display a warning if they are git submodule status --recursive 2>/dev/null | \ while IFS= read -r x; do \ @@ -531,4 +531,4 @@ BUILD_DATE := $(shell date +"%Y-%m-%d-%H:%M:%S") $(shell echo '#define QMK_VERSION "$(GIT_VERSION)"' > $(ROOT_DIR)/quantum/version.h) $(shell echo '#define QMK_BUILDDATE "$(BUILD_DATE)"' >> $(ROOT_DIR)/quantum/version.h) -include $(ROOT_DIR)/testlist.mk \ No newline at end of file +include $(ROOT_DIR)/testlist.mk -- cgit v1.2.3 From a777495683128fc56aa2d0081f27ff4c5c86d219 Mon Sep 17 00:00:00 2001 From: SjB Date: Mon, 23 Jan 2017 22:01:33 -0500 Subject: fix: infinity60 keyboard was not using quantum features. the quantum matrix codes where not being initialized or/and called so no feature of the quantum firmware could be used. These codes have been added and now we can enjoy the quantum firmware goodness. --- keyboards/infinity60/infinity60.c | 15 +++++++++++++++ keyboards/infinity60/matrix.c | 3 +++ 2 files changed, 18 insertions(+) diff --git a/keyboards/infinity60/infinity60.c b/keyboards/infinity60/infinity60.c index e471250fe..fdeed5124 100644 --- a/keyboards/infinity60/infinity60.c +++ b/keyboards/infinity60/infinity60.c @@ -15,3 +15,18 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ #include "infinity60.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(); +} + diff --git a/keyboards/infinity60/matrix.c b/keyboards/infinity60/matrix.c index d2f185288..b6ccf86c3 100644 --- a/keyboards/infinity60/matrix.c +++ b/keyboards/infinity60/matrix.c @@ -62,6 +62,8 @@ void matrix_init(void) #endif memset(matrix, 0, MATRIX_ROWS); memset(matrix_debouncing, 0, MATRIX_ROWS); + + matrix_init_quantum(); } uint8_t matrix_scan(void) @@ -146,6 +148,7 @@ uint8_t matrix_scan(void) } debouncing = false; } + matrix_scan_quantum(); return 1; } -- cgit v1.2.3 From 2b3859937b1e7f96b684408d31ff12a4e682f7ee Mon Sep 17 00:00:00 2001 From: SjB Date: Sat, 21 Jan 2017 02:01:55 -0500 Subject: speeding up (un)register_code16 In register_code16 and unregister_code16 we call register_code and unregister_code twice, once for the mods and once for the keycode. The (un)register_code have many check to see that keycode we have sent however because we know that we are sending it a mods key, why not just skip all of it and call (un)register_mods instead. This will skip alot of checks and should speedup the loop a little. --- quantum/quantum.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/quantum/quantum.c b/quantum/quantum.c index 63ffe2074..1767faed4 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -33,14 +33,22 @@ static void do_code16 (uint16_t code, void (*f) (uint8_t)) { f(KC_RGUI); } +static inline void qk_register_mods(uint8_t kc) { + register_mods(MOD_BIT(kc)); +} + +static inline void qk_unregister_mods(uint8_t kc) { + unregister_mods(MOD_BIT(kc)); +} + void register_code16 (uint16_t code) { - do_code16 (code, register_code); + do_code16 (code, qk_register_mods); register_code (code); } void unregister_code16 (uint16_t code) { unregister_code (code); - do_code16 (code, unregister_code); + do_code16 (code, qk_unregister_mods); } __attribute__ ((weak)) -- cgit v1.2.3 From 9111cc00f587188c68d3ed0379aae6675ad8d377 Mon Sep 17 00:00:00 2001 From: SjB Date: Tue, 24 Jan 2017 00:24:01 -0500 Subject: updated all the other keymaps to support the new changes. qmk firmware requires the matrix_init_user and matrix_scan_user function to be implementated. Added these function to all the existing keymaps. --- keyboards/infinity60/keymaps/default/keymap.c | 9 +++++++++ keyboards/infinity60/keymaps/depariel/keymap.c | 9 +++++++++ keyboards/infinity60/keymaps/hasu/keymap.c | 10 ++++++++++ 3 files changed, 28 insertions(+) diff --git a/keyboards/infinity60/keymaps/default/keymap.c b/keyboards/infinity60/keymaps/default/keymap.c index 443412857..8347c94b4 100644 --- a/keyboards/infinity60/keymaps/default/keymap.c +++ b/keyboards/infinity60/keymaps/default/keymap.c @@ -46,3 +46,12 @@ const uint16_t fn_actions[] = { }; +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + +}; diff --git a/keyboards/infinity60/keymaps/depariel/keymap.c b/keyboards/infinity60/keymaps/depariel/keymap.c index 7412b9b9d..57f9487f2 100755 --- a/keyboards/infinity60/keymaps/depariel/keymap.c +++ b/keyboards/infinity60/keymaps/depariel/keymap.c @@ -80,3 +80,12 @@ const uint16_t PROGMEM fn_actions[] = { }; +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + +}; diff --git a/keyboards/infinity60/keymaps/hasu/keymap.c b/keyboards/infinity60/keymaps/hasu/keymap.c index d3728869a..9982078c1 100644 --- a/keyboards/infinity60/keymaps/hasu/keymap.c +++ b/keyboards/infinity60/keymaps/hasu/keymap.c @@ -111,3 +111,13 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t fn_actions[] = { }; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + +}; -- cgit v1.2.3 From 18cc05e2f7d09f9faac37ee504bd111e70a52764 Mon Sep 17 00:00:00 2001 From: Rovanion Luckey Date: Tue, 24 Jan 2017 10:02:56 +0100 Subject: Added instructions for how to build and flash the firmware with teensy_cli. --- keyboards/ergodox/readme.md | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/keyboards/ergodox/readme.md b/keyboards/ergodox/readme.md index ca3eeba59..d7eed8f43 100644 --- a/keyboards/ergodox/readme.md +++ b/keyboards/ergodox/readme.md @@ -1,6 +1,6 @@ # The Easy Way -If you have an ErgoDox EZ, the absolute easiest way for you to customize your firmware is using the [graphical configurator](http://configure.ergodox-ez.com), which uses QMK under the hood. +If you have an ErgoDox EZ, the absolute easiest way for you to customize your firmware is using the [graphical configurator](http://configure.ergodox-ez.com), which uses QMK under the hood. If you can find firmware someone else has made that does what you want, that is the easiest way to customize your ErgoDox. It requires no programming @@ -69,12 +69,13 @@ files. Check them out with: The Ez uses the [Teensy Loader](https://www.pjrc.com/teensy/loader.html). -Linux users need to modify udev rules as described on the Teensy Linux page. -Some distributions provide a binary, maybe called `teensy-loader-cli`). +Linux users need to modify udev rules as described on the Teensy Linux page (which page?). +Some distributions provide a binary, maybe called `teensy-loader-cli`. To flash the firmware: - - Build the firmware with `make keymapname`, for example `make default` + - Build the firmware with `make keymapname`, for example `make default` + - This will result in a hex file called `ergodox_ez_keymapname.hex`, e.g. `ergodox_ez_default.hex` @@ -87,6 +88,15 @@ To flash the firmware: - Click the button in the Teensy app to download the firmware. +To flash with ´teensy-loader-cli´: + + - Build the firmware with `make keymapname`, for example `make default` + + - Run ´teensy_loader_cli --mcu=atmega32u4 -w ergodox_ez_.hex´ + + - Press the Reset button by inserting a paperclip gently into the reset hole + in the top right corder. + ## ErgoDox Infinity The Infinity is two completely independent keyboards, and needs to be flashed -- cgit v1.2.3 From 3c32e38036fda17be4ff86235565fe4ac88cba33 Mon Sep 17 00:00:00 2001 From: Brendan Johan Lee Date: Tue, 24 Jan 2017 19:10:35 +0100 Subject: [deadcyclo layout] Added support for ergodox ez shine --- .../deadcyclo/images/deadcyclo-base-layout.png | Bin 79741 -> 96046 bytes .../deadcyclo/images/deadcyclo-layer-1-symbols.png | Bin 55349 -> 79904 bytes keyboards/ergodox/keymaps/deadcyclo/keymap.c | 29 ++++++++++++++------- keyboards/ergodox/keymaps/deadcyclo/readme.md | 25 +++++++++++++++--- 4 files changed, 40 insertions(+), 14 deletions(-) diff --git a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-base-layout.png b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-base-layout.png index 4208c5189..a70e37559 100644 Binary files a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-base-layout.png and b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-base-layout.png differ diff --git a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-1-symbols.png b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-1-symbols.png index ccda70e39..5adb7ac77 100644 Binary files a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-1-symbols.png and b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-1-symbols.png differ diff --git a/keyboards/ergodox/keymaps/deadcyclo/keymap.c b/keyboards/ergodox/keymaps/deadcyclo/keymap.c index d75c805bf..208f67162 100644 --- a/keyboards/ergodox/keymaps/deadcyclo/keymap.c +++ b/keyboards/ergodox/keymaps/deadcyclo/keymap.c @@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // left hand LT(NAVG,KC_ESC), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, LT(SYMB,KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LCTL, LT(MDIA, KC_A), KC_S, KC_D, KC_F, KC_G, KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_RALT,KC_LALT, ALT_T(KC_APP), KC_HOME, @@ -75,11 +75,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | . | 0 | = | | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. - * | | | | | | + * |Toggle|Animat| | Hue+ | Hue- | * ,------|------|------| |------+------+------. - * | | | | | | | | - * | | |------| |------| DEL | | - * | | | | | | | | + * |Bright|Bright|Solid | | | | | + * |ness- |ness+ |------| |------| DEL | | + * | | | | | EPRM | | | * `--------------------' `--------------------' */ // SYMBOLS @@ -90,18 +90,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV, KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, - KC_TRNS,KC_TRNS, - KC_TRNS, - KC_TRNS,KC_TRNS,KC_TRNS, + RGB_TOG,RGB_MOD, + RGB_SLD, + RGB_VAD,RGB_VAI,KC_TRNS, // right hand KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_TRNS, KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS, KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS, - KC_TRNS, KC_TRNS, + RGB_HUD, RGB_HUI, KC_TRNS, - KC_TRNS, KC_DEL, KC_TRNS + EPRM, KC_DEL, KC_TRNS ), /* Keymap 2: Media and mouse keys * @@ -254,12 +254,21 @@ void matrix_scan_user(void) { switch (layer) { case 1: ergodox_right_led_1_on(); + #ifdef RGBLIGHT_ENABLE + rgblight_setrgb(0xff,0x00,0x00); + #endif break; case 2: ergodox_right_led_2_on(); + #ifdef RGBLIGHT_ENABLE + rgblight_setrgb(0x00,0xff,0x00); + #endif break; case 3: ergodox_right_led_3_on(); + #ifdef RGBLIGHT_ENABLE + rgblight_setrgb(0x00,0x00,0xff); + #endif break; case 4: ergodox_right_led_1_on(); // TODO: Make a fourth layer diff --git a/keyboards/ergodox/keymaps/deadcyclo/readme.md b/keyboards/ergodox/keymaps/deadcyclo/readme.md index 809dd6eb5..a937cfceb 100644 --- a/keyboards/ergodox/keymaps/deadcyclo/readme.md +++ b/keyboards/ergodox/keymaps/deadcyclo/readme.md @@ -1,9 +1,11 @@ # ErgoDox EZ 1337 configuration -Custom layout based on the default layout. Intended for interational users of us intl-altgr layout. Note that -some common keys might be missing, as this layout is intented to be used on *nix systems by users familiar -with their system. The layout is geared towards avoiding using the rat (mouse for those of you who are -unfamiliar with tiling window managers) as much as possibly. +Custom layout based on the default layout. Intended for interational +users of us intl-altgr layout. Note that some common keys might be +missing, as this layout is intented to be used on *nix systems by +users familiar with their system. The layout is geared towards +avoiding using the rat (mouse for those of you who are unfamiliar with +tiling window managers) as much as possibly. # Layouts @@ -13,6 +15,19 @@ All layer images created using [keyboard-layout-editor](http://www.keyboard-layo [![Base layer](images/deadcyclo-base-layout.png)](http://www.keyboard-layout-editor.com/#/gists/0321b18620180a3e46c498206eb65366) +The base layer here is marked with the us international alt-gr layout, +including characters bound to what on an iso keyboard would be alt-gr +and on an ansi keyboard right alt. + +Regular (and irregular) modifier keys are marked with a yellowish +gray. Layer moderators are marked with blue, red and green, which are +the same colors each layer displays on the LEDs when active. + +All of the layer switch keys, except for the two center keys marked L1 +TOG, are dual purpose. Hence for example the top left key produces ESC +if tapped, and temporarilly toggles L3 when hold down. The two center +L1 TOG keys toggle L1 on and off for more permanent layer toggling. + ## Layer 1 - Symbols [![Layer 1 - Symbols](images/deadcyclo-layer-1-symbols.png)](http://www.keyboard-layout-editor.com/#/gists/96714e198054c9115bafb5267cc6bc73) @@ -29,8 +44,10 @@ All layer images created using [keyboard-layout-editor](http://www.keyboard-layo - 02.01.2017 Added delete key on second layer - 10.01.2017 Added layer images to readme +- 24.01.2017 Added support for Ergodox Shine. Added secondary L2 switch key on left hand # TODO - Add unicode support (direct input and indirect? see algernon layout for examples) - Add descriptions below each layer image of any special functions/keys +- Move Navigation keys to Layer 2 on right side, add a layer switch to L2 on left side as well, and use L3 for unicode stuff -- cgit v1.2.3 From 37ed3d13a4d99c9880f713de497f84efbe937bdf Mon Sep 17 00:00:00 2001 From: Brendan Johan Lee Date: Tue, 24 Jan 2017 21:54:34 +0100 Subject: [deadcyclo layout] Added unicode layer --- keyboards/ergodox/keymaps/deadcyclo/Makefile | 1 + .../images/deadcyclo-layer-2-media-and-mouse.png | Bin 50926 -> 62258 bytes .../images/deadcyclo-layer-3-navigation.png | Bin 43551 -> 58407 bytes keyboards/ergodox/keymaps/deadcyclo/keymap.c | 91 +++++++++++++++++---- keyboards/ergodox/keymaps/deadcyclo/readme.md | 33 ++++++-- 5 files changed, 98 insertions(+), 27 deletions(-) create mode 100644 keyboards/ergodox/keymaps/deadcyclo/Makefile diff --git a/keyboards/ergodox/keymaps/deadcyclo/Makefile b/keyboards/ergodox/keymaps/deadcyclo/Makefile new file mode 100644 index 000000000..039f07c8e --- /dev/null +++ b/keyboards/ergodox/keymaps/deadcyclo/Makefile @@ -0,0 +1 @@ +UNICODE_ENABLE = yes diff --git a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-2-media-and-mouse.png b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-2-media-and-mouse.png index 481e63e32..a267ff23d 100644 Binary files a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-2-media-and-mouse.png and b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-2-media-and-mouse.png differ diff --git a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png index 9ebba6734..6d73495c1 100644 Binary files a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png and b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png differ diff --git a/keyboards/ergodox/keymaps/deadcyclo/keymap.c b/keyboards/ergodox/keymaps/deadcyclo/keymap.c index 208f67162..c14ca6959 100644 --- a/keyboards/ergodox/keymaps/deadcyclo/keymap.c +++ b/keyboards/ergodox/keymaps/deadcyclo/keymap.c @@ -12,7 +12,10 @@ enum custom_keycodes { PLACEHOLDER = SAFE_RANGE, // can always be here EPRM, VRSN, - RGB_SLD + RGB_SLD, + SHRUG, + YAY, + HUG }; // TODO: Get rid of of keys I don't want. Make others that I do. Set up lots of makros (Using hyper (and meh)) keys (where to put them?) @@ -103,14 +106,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, EPRM, KC_DEL, KC_TRNS ), -/* Keymap 2: Media and mouse keys +/* Keymap 2: Media, mouse and navigation * * ,--------------------------------------------------. ,--------------------------------------------------. * | | | | | | | | | | | | | | | | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | MsUp | | | | | | | | | | | | + * | | | | MsUp | | | | | | | | Up | | | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | + * | | |MsLeft|MsDown|MsRght| |------| |------| | Left | Down | Right| | Play | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | | | | | | | | | | | | Prev | Next | | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' @@ -124,7 +127,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * `--------------------' `--------------------' */ -// MEDIA AND MOUSE +// MEDIA , MOUSE and NAVIGATION [MDIA] = KEYMAP( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, @@ -135,24 +138,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, // right hand - 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, - KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, - KC_VOLU, KC_VOLD, KC_MUTE, 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_UP, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_MPLY, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_WBAK ), -/* Keymap 3: Navigation TODO: Printscreen, pg up down, home, end, others? Insert for example +/* Keymap 3: Unicode * * ,--------------------------------------------------. ,--------------------------------------------------. * | | VER | | | | | | | | | | | | | | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | up | | | | | | | | | | | | + * | | Shrug| yay | hug | | | | | | ■ | λ | → | ➙ | ▻ | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | left | down | right| |------| |------| | | | | | | + * | | | | | | |------| |------| | | | | | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | | | | | | | | | | | | | | | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' @@ -166,11 +169,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * `--------------------' `--------------------' */ -// NAVIGATION +// Unicode [NAVG] = KEYMAP( KC_TRNS, VRSN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, + KC_TRNS, SHRUG, YAY, HUG, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -178,7 +181,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, // right hand 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, UC(0x25a0), UC(0x03bb), UC(0x2192), UC(0x2799), UC(0x25bb), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -192,6 +195,25 @@ const uint16_t PROGMEM fn_actions[] = { [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) }; +static void ang_tap (uint16_t code, ...) { + uint16_t kc = code; + va_list ap; + + va_start(ap, code); + + do { + register_code16(kc); + unregister_code16(kc); + wait_ms(50); + kc = va_arg(ap, int); + } while (kc != 0); + va_end(ap); +} + +#define TAP_ONCE(code) \ + register_code (code); \ + unregister_code (code) + const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function @@ -233,13 +255,46 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; + case SHRUG: + if (record->event.pressed) { + unicode_input_start(); register_hex(0xaf); unicode_input_finish(); + TAP_ONCE (KC_BSLS); + register_code (KC_RSFT); TAP_ONCE (KC_MINS); TAP_ONCE (KC_9); unregister_code (KC_RSFT); + unicode_input_start (); register_hex(0x30c4); unicode_input_finish(); + register_code (KC_RSFT); TAP_ONCE (KC_0); TAP_ONCE (KC_MINS); unregister_code (KC_RSFT); + TAP_ONCE (KC_SLSH); + unicode_input_start (); register_hex(0xaf); unicode_input_finish(); + } + return false; + break; + case YAY: + if (record->event.pressed) { + ang_tap (KC_BSLS, KC_O, KC_SLSH, 0); + } + return false; + break; + case HUG: + if (record->event.pressed) { + unicode_input_start(); register_hex(0x0f3c); unicode_input_finish(); + TAP_ONCE (KC_SPC); + unicode_input_start(); register_hex(0x3064); unicode_input_finish(); + TAP_ONCE (KC_SPC); + unicode_input_start(); register_hex(0x25d5); unicode_input_finish(); + unicode_input_start(); register_hex(0x005f); unicode_input_finish(); + unicode_input_start(); register_hex(0x25d5); unicode_input_finish(); + TAP_ONCE (KC_SPC); + unicode_input_start(); register_hex(0x0f3d); unicode_input_finish(); + unicode_input_start(); register_hex(0x3064); unicode_input_finish(); + } + return false; + break; } return true; } // Runs just one time when the keyboard initializes. void matrix_init_user(void) { - + set_unicode_input_mode(UC_LNX); }; // Runs constantly in the background, in a loop. diff --git a/keyboards/ergodox/keymaps/deadcyclo/readme.md b/keyboards/ergodox/keymaps/deadcyclo/readme.md index a937cfceb..5426057e9 100644 --- a/keyboards/ergodox/keymaps/deadcyclo/readme.md +++ b/keyboards/ergodox/keymaps/deadcyclo/readme.md @@ -28,26 +28,41 @@ TOG, are dual purpose. Hence for example the top left key produces ESC if tapped, and temporarilly toggles L3 when hold down. The two center L1 TOG keys toggle L1 on and off for more permanent layer toggling. -## Layer 1 - Symbols +## Layer 1 - Symbols and RGB -[![Layer 1 - Symbols](images/deadcyclo-layer-1-symbols.png)](http://www.keyboard-layout-editor.com/#/gists/96714e198054c9115bafb5267cc6bc73) +[![Layer 1 - Symbols and RGB](images/deadcyclo-layer-1-symbols.png)](http://www.keyboard-layout-editor.com/#/gists/96714e198054c9115bafb5267cc6bc73) -## Layer 2 - Media and Mouse +The Symbols and RGB layer contains function keys, commonly used +symbols, a numpad and if you have the new Ergodox Ez shine keys for +controlling various RGB-led functions. In addition, it provides an up +and a down key for easy scrolling. RGB controller keys are yellow. -[![Layer 2 - Media and Mouse](images/deadcyclo-layer-2-media-and-mouse.png)](http://www.keyboard-layout-editor.com/#/gists/824759486e378bcec30784309a7e5731) +## Layer 2 - Media, Mouse and Navigation -## Layer 3 - Navigation +[![Layer 2 - Media, Mouse and Navigation](images/deadcyclo-layer-2-media-and-mouse.png)](http://www.keyboard-layout-editor.com/#/gists/824759486e378bcec30784309a7e5731) -[![Layer 3 - Navigation](images/deadcyclo-layer-3-navigation.png)](http://www.keyboard-layout-editor.com/#/gists/67d9613dcd873c68693d11863d0fd289) +The Media, Mouse and unicode layer contains special keys for moving +the mouse and clicking on it with the keyboard. In addition it +provides standard media control keys, and default arrow keys. + +## Layer 3 - Unicode + +[![Layer 3 - Unicode](images/deadcyclo-layer-3-navigation.png)](http://www.keyboard-layout-editor.com/#/gists/67d9613dcd873c68693d11863d0fd289) + +The unicode layer provides keys for directly typing unicode (utf-8) # Changelog - 02.01.2017 Added delete key on second layer - 10.01.2017 Added layer images to readme - 24.01.2017 Added support for Ergodox Shine. Added secondary L2 switch key on left hand +- 24.01.2017 Added unicode keys. Added shrug hug and yay. Moved Navigation to layer 2 # TODO -- Add unicode support (direct input and indirect? see algernon layout for examples) -- Add descriptions below each layer image of any special functions/keys -- Move Navigation keys to Layer 2 on right side, add a layer switch to L2 on left side as well, and use L3 for unicode stuff +- Add support for unicode by name? (See algernon layout for example) +- Add macros for lots of stuff. (Lastpass cli, pushbullet cli, other push service cli, linode cli, more?) +- Make macros for gnu screen and i3wm +- Look into the app launch macros in algernon keymap +- Make other smileys like shrug and yay ¯\_(ツ)_/¯ and \o/ and others (see amon others [http://dongerlist.com](http://dongerlist.com) + -- cgit v1.2.3 From b3cf96ec2e0fee322ac6314730fa6e3e43d76cb2 Mon Sep 17 00:00:00 2001 From: Stephen Tudor Date: Wed, 25 Jan 2017 00:25:17 -0500 Subject: Add smt keymap for Preonic --- keyboards/preonic/keymaps/smt/Makefile | 3 + keyboards/preonic/keymaps/smt/keymap.c | 248 ++++++++++++++++++++++++++++++++ keyboards/preonic/keymaps/smt/readme.md | 1 + 3 files changed, 252 insertions(+) create mode 100644 keyboards/preonic/keymaps/smt/Makefile create mode 100644 keyboards/preonic/keymaps/smt/keymap.c create mode 100644 keyboards/preonic/keymaps/smt/readme.md diff --git a/keyboards/preonic/keymaps/smt/Makefile b/keyboards/preonic/keymaps/smt/Makefile new file mode 100644 index 000000000..3d4659ceb --- /dev/null +++ b/keyboards/preonic/keymaps/smt/Makefile @@ -0,0 +1,3 @@ +ifndef QUANTUM_DIR + include ../../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/preonic/keymaps/smt/keymap.c b/keyboards/preonic/keymaps/smt/keymap.c new file mode 100644 index 000000000..4ef22bb97 --- /dev/null +++ b/keyboards/preonic/keymaps/smt/keymap.c @@ -0,0 +1,248 @@ +#include "preonic.h" +#include "action_layer.h" +#include "eeconfig.h" +#ifdef AUDIO_ENABLE + #include "audio.h" +#endif + +// 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 _DVORAK 0 +#define _QWERTY 1 +#define _LOWER 2 +#define _RAISE 3 +#define _ADJUST 16 + +enum preonic_keycodes { + DVORAK = SAFE_RANGE, + QWERTY, + COLEMAK, + LOWER, + RAISE, + BACKLIT +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | " | , | . | P | Y | F | G | C | R | L | / | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | - | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = { + {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_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH}, + {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS}, + {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_T(KC_ENT)}, + {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = { + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL}, + {_______, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {_______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +}, + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | Home |PageUp| + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | End |PageDn| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = { + {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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL}, + {_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_4, KC_5, KC_6, KC_HOME, KC_PGUP}, + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, KC_END, KC_PGDN}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} +}, + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | - | = | [ | ] | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = { + {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, + {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, + {_______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, + {_______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, 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|Dvorak|Qwerty| | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = { + {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, DVORAK, QWERTY, _______, _______, _______}, + {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +} + + +}; + +#ifdef AUDIO_ENABLE +float tone_startup[][2] = { + {NOTE_B5, 20}, + {NOTE_B6, 8}, + {NOTE_DS6, 20}, + {NOTE_B6, 8} +}; + +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_qwerty[][2] = SONG(QWERTY_SOUND); + +float tone_goodbye[][2] = SONG(GOODBYE_SOUND); + +float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); +#endif + +void persistant_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 DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + #endif + persistant_default_layer_set(1UL<<_DVORAK); + } + return false; + break; + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + #endif + persistant_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 BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + return false; + break; + } + return true; +}; + +void matrix_init_user(void) { + #ifdef AUDIO_ENABLE + startup_user(); + #endif +} + +#ifdef AUDIO_ENABLE + +void startup_user() +{ + _delay_ms(20); // gets rid of tick + PLAY_NOTE_ARRAY(tone_startup, false, 0); +} + +void shutdown_user() +{ + PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + _delay_ms(150); + stop_all_notes(); +} + +void music_on_user(void) +{ + music_scale_user(); +} + +void music_scale_user(void) +{ + PLAY_NOTE_ARRAY(music_scale, false, 0); +} + +#endif diff --git a/keyboards/preonic/keymaps/smt/readme.md b/keyboards/preonic/keymaps/smt/readme.md new file mode 100644 index 000000000..e911968dd --- /dev/null +++ b/keyboards/preonic/keymaps/smt/readme.md @@ -0,0 +1 @@ +# The default Preonic layout - largely based on the Planck's \ No newline at end of file -- cgit v1.2.3 From 51fe4f0d3429387ee512c22c5c1daffe63e2db9a Mon Sep 17 00:00:00 2001 From: Stephen Tudor Date: Wed, 25 Jan 2017 00:55:40 -0500 Subject: Update readme for smt Preonic keymap --- keyboards/preonic/keymaps/smt/readme.md | 86 ++++++++++++++++++++++++++++++++- 1 file changed, 85 insertions(+), 1 deletion(-) diff --git a/keyboards/preonic/keymaps/smt/readme.md b/keyboards/preonic/keymaps/smt/readme.md index e911968dd..b2052b37c 100644 --- a/keyboards/preonic/keymaps/smt/readme.md +++ b/keyboards/preonic/keymaps/smt/readme.md @@ -1 +1,85 @@ -# The default Preonic layout - largely based on the Planck's \ No newline at end of file +# smt's Preonic keymap + +This keymap is primarily based on the default Preonic keymap, which in turn is derived from Planck's default. + +Notable differences from the default are: + +1. **Dvorak by default** + + I happen to type in Dvorak, and prefer that layer to be the default on my keyboard. This is easy enough to switch around with Qwerty, Colemak, or whatever. + +2. **Right Shift** + + I use both the left and right shift keys when I type. When I want to modify a key with shift, I hold shift with the hand opposite the one typing the key. In the default keymap, Enter is where shift would be on a standard keyboard layout. Oh, muscle memory. + + Thankfully, QMK supports [mod-tap](https://github.com/jackhumbert/qmk_firmware/wiki#fun-with-modifier-keys) keys, and this allows me to set the Enter key to send a modifier (MOD_LSFT) when held, and KC_ENT when tapped. Awesome! + +## Dvorak (default) + +``` +,-----------------------------------------------------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Tab | " | , | . | P | Y | F | G | C | R | L | / | +|------+------+------+------+------+-------------+------+------+------+------+------| +| Esc | A | O | E | U | I | D | H | T | N | S | - | +|------+------+------+------+------+------|------+------+------+------+------+------| +| Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | +`-----------------------------------------------------------------------------------' +``` + +## Qwerty (same as default) + +``` +,-----------------------------------------------------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Tab | Q | W | E | R | T | Y | U | I | O | P | Del | +|------+------+------+------+------+-------------+------+------+------+------+------| +| Esc | A | S | D | F | G | H | J | K | L | ; | " | +|------+------+------+------+------+------|------+------+------+------+------+------| +| Shift| Z | X | C | V | B | N | M | , | . | / |Enter | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | +`-----------------------------------------------------------------------------------' +``` + +## Lower + +This is where I put the number row, a numpad cluster, function keys, and some light navigation via Home/End/PageUp/PageDn. Like the "Raise" layer, the top row is redundant to help with Planck compatibility. + +``` +,-----------------------------------------------------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | +|------+------+------+------+------+------+------+------+------+------+------+------| +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | +|------+------+------+------+------+-------------+------+------+------+------+------| +| | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | Home |PageUp| +|------+------+------+------+------+------|------+------+------+------+------+------| +| | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | End |PageDn| +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | Next | Vol- | Vol+ | Play | +`-----------------------------------------------------------------------------------' +``` + +## Raise + +As a developer, it makes the most sense for me to group all the commonly-used symbols that don't fit on the main layer. In particular, having the dual-column of parens-braces-brackets really helps a lot. + +I haven't completely filled this layer, which leaves room for future mappings and macros. + +``` +,-----------------------------------------------------------------------------------. +| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | +|------+------+------+------+------+-------------+------+------+------+------+------| +| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | +|------+------+------+------+------+-------------+------+------+------+------+------| +| | | | | | | | _ | + | { | } | | | +|------+------+------+------+------+------|------+------+------+------+------+------| +| | | | | | | | - | = | [ | ] | \ | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | Next | Vol- | Vol+ | Play | +`-----------------------------------------------------------------------------------' +``` -- cgit v1.2.3 From 8af48194f211ed30910e5fc4f7abc3195a5fb16f Mon Sep 17 00:00:00 2001 From: Brendan Johan Lee Date: Wed, 25 Jan 2017 15:16:38 +0100 Subject: [deadcyclo layout] Added lotsof new emojis and some new unicode keys --- .../images/deadcyclo-layer-3-navigation.png | Bin 58407 -> 55517 bytes keyboards/ergodox/keymaps/deadcyclo/keymap.c | 188 +++++++++++++++++++-- keyboards/ergodox/keymaps/deadcyclo/readme.md | 1 + 3 files changed, 178 insertions(+), 11 deletions(-) diff --git a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png index 6d73495c1..e60c3e59e 100644 Binary files a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png and b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png differ diff --git a/keyboards/ergodox/keymaps/deadcyclo/keymap.c b/keyboards/ergodox/keymaps/deadcyclo/keymap.c index c14ca6959..7578c723d 100644 --- a/keyboards/ergodox/keymaps/deadcyclo/keymap.c +++ b/keyboards/ergodox/keymaps/deadcyclo/keymap.c @@ -15,7 +15,22 @@ enum custom_keycodes { RGB_SLD, SHRUG, YAY, - HUG + HUG, + SMILE, + SMILE2, + HMM1, + HMM2, + BEAR1, + BEAR2, + FUU, + EGGY1, + EGGY2, + FACE1, + FACE2, + UHU, + SMRK1, + SMRK2, + LOVE }; // TODO: Get rid of of keys I don't want. Make others that I do. Set up lots of makros (Using hyper (and meh)) keys (where to put them?) @@ -153,13 +168,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,--------------------------------------------------. ,--------------------------------------------------. * | | VER | | | | | | | | | | | | | | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | Shrug| yay | hug | | | | | | ■ | λ | → | ➙ | ▻ | | + * | | shrug| yay | hug | smile|smile2| | | | ■ | λ | → | ➙ | ▻ | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | |------| |------| | | | | | | + * | | hmm1 | hmm2 | bear1| bear2| fuu |------| |------| ☺ | ☻ | ☹ | ♡ | ♥ | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | | | | | | | | | | | + * | | eggy1| eggy2| face1| face2| uhu | | | | ❤ | | | | | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | | | | | | + * | | smrk1| smrk2| love | | | | | | | | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | | | | | | @@ -172,18 +187,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Unicode [NAVG] = KEYMAP( KC_TRNS, VRSN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, SHRUG, YAY, HUG, 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, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, SHRUG, YAY, HUG, SMILE, SMILE2, KC_TRNS, + KC_TRNS, HMM1, HMM2, BEAR1, BEAR2, FUU, + KC_TRNS, EGGY1, EGGY2, FACE1, FACE2, UHU, KC_TRNS, + KC_TRNS, SMRK1, SMRK2, LOVE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, // right hand KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, UC(0x25a0), UC(0x03bb), UC(0x2192), UC(0x2799), UC(0x25bb), KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_TRNS, KC_TRNS, KC_TRNS, + UC(0x263a), UC(0x263b), UC(0x2639), UC(0x2661), UC(0x2665), KC_TRNS, + KC_TRNS, UC(0x2764), KC_TRNS, KC_MPRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -288,6 +303,157 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; + case SMILE: + if (record->event.pressed) { + unicode_input_start(); register_hex(0x0298); unicode_input_finish(); + unicode_input_start(); register_hex(0x203f); unicode_input_finish(); + unicode_input_start(); register_hex(0x0298); unicode_input_finish(); + } + return false; + break; + case SMILE2: + if (record->event.pressed) { + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x0298); unicode_input_finish(); + unicode_input_start(); register_hex(0x203f); unicode_input_finish(); + unicode_input_start(); register_hex(0x0298); unicode_input_finish(); + unicode_input_start(); register_hex(0x0029); unicode_input_finish(); + } + return false; + break; + case HMM1: + if (record->event.pressed) { + unicode_input_start(); register_hex(0x0ca0); unicode_input_finish(); + unicode_input_start(); register_hex(0x005f); unicode_input_finish(); + unicode_input_start(); register_hex(0x0ca0); unicode_input_finish(); + } + return false; + break; + case HMM2: + if (record->event.pressed) { + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x0ca0); unicode_input_finish(); + unicode_input_start(); register_hex(0x005f); unicode_input_finish(); + unicode_input_start(); register_hex(0x0ca0); unicode_input_finish(); + unicode_input_start(); register_hex(0x0029); unicode_input_finish(); + } + return false; + break; + case BEAR1: + if (record->event.pressed) { + unicode_input_start(); register_hex(0x0295); unicode_input_finish(); + unicode_input_start(); register_hex(0x2022); unicode_input_finish(); + unicode_input_start(); register_hex(0x1d25); unicode_input_finish(); + unicode_input_start(); register_hex(0x2022); unicode_input_finish(); + unicode_input_start(); register_hex(0x0294); unicode_input_finish(); + } + return false; + break; + case BEAR2: + if (record->event.pressed) { + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x1d54); unicode_input_finish(); + unicode_input_start(); register_hex(0x1d25); unicode_input_finish(); + unicode_input_start(); register_hex(0x1d54); unicode_input_finish(); + unicode_input_start(); register_hex(0x0029); unicode_input_finish(); + } + return false; + break; + case FUU: + if (record->event.pressed) { + unicode_input_start(); register_hex(0x256d); unicode_input_finish(); + unicode_input_start(); register_hex(0x2229); unicode_input_finish(); + unicode_input_start(); register_hex(0x256e); unicode_input_finish(); + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x002d); unicode_input_finish(); + unicode_input_start(); register_hex(0x005f); unicode_input_finish(); + unicode_input_start(); register_hex(0x002d); unicode_input_finish(); + unicode_input_start(); register_hex(0x0029); unicode_input_finish(); + unicode_input_start(); register_hex(0x256d); unicode_input_finish(); + unicode_input_start(); register_hex(0x2229); unicode_input_finish(); + unicode_input_start(); register_hex(0x256e); unicode_input_finish(); + } + return false; + break; + case EGGY1: + if (record->event.pressed) { + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x256f); unicode_input_finish(); + unicode_input_start(); register_hex(0x00b0); unicode_input_finish(); + unicode_input_start(); register_hex(0x25a1); unicode_input_finish(); + unicode_input_start(); register_hex(0x00b0); unicode_input_finish(); + unicode_input_start(); register_hex(0xff09); unicode_input_finish(); + unicode_input_start(); register_hex(0x256f); unicode_input_finish(); + } + return false; + break; + case EGGY2: + if (record->event.pressed) { + unicode_input_start(); register_hex(0x30ce); unicode_input_finish(); + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x0020); unicode_input_finish(); + unicode_input_start(); register_hex(0x309c); unicode_input_finish(); + unicode_input_start(); register_hex(0x002d); unicode_input_finish(); + unicode_input_start(); register_hex(0x309c); unicode_input_finish(); + unicode_input_start(); register_hex(0x30ce); unicode_input_finish(); + unicode_input_start(); register_hex(0x0029); unicode_input_finish(); + } + return false; + break; + case FACE1: + if (record->event.pressed) { + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x002d); unicode_input_finish(); + unicode_input_start(); register_hex(0x005f); unicode_input_finish(); + unicode_input_start(); register_hex(0x002d); unicode_input_finish(); + unicode_input_start(); register_hex(0x0029); unicode_input_finish(); + } + return false; + break; + case FACE2: + if (record->event.pressed) { + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x2022); unicode_input_finish(); + unicode_input_start(); register_hex(0x005f); unicode_input_finish(); + unicode_input_start(); register_hex(0x2022); unicode_input_finish(); + unicode_input_start(); register_hex(0x0029); unicode_input_finish(); + } + return false; + break; + case UHU: + if (record->event.pressed) { + unicode_input_start(); register_hex(0x2299); unicode_input_finish(); + unicode_input_start(); register_hex(0xfe4f); unicode_input_finish(); + unicode_input_start(); register_hex(0x2299); unicode_input_finish(); + } + return false; + break; + case SMRK1: + if (record->event.pressed) { + unicode_input_start(); register_hex(0x005e); unicode_input_finish(); + unicode_input_start(); register_hex(0x032e); unicode_input_finish(); + unicode_input_start(); register_hex(0x005e); unicode_input_finish(); + } + return false; + break; + case SMRK2: + if (record->event.pressed) { + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x005e); unicode_input_finish(); + unicode_input_start(); register_hex(0x032e); unicode_input_finish(); + unicode_input_start(); register_hex(0x005e); unicode_input_finish(); + unicode_input_start(); register_hex(0x0029); unicode_input_finish(); + } + return false; + break; + case LOVE: + if (record->event.pressed) { + unicode_input_start(); register_hex(0x2665); unicode_input_finish(); + unicode_input_start(); register_hex(0x203f); unicode_input_finish(); + unicode_input_start(); register_hex(0x2665); unicode_input_finish(); + } + return false; + break; } return true; } diff --git a/keyboards/ergodox/keymaps/deadcyclo/readme.md b/keyboards/ergodox/keymaps/deadcyclo/readme.md index 5426057e9..2ca5e822c 100644 --- a/keyboards/ergodox/keymaps/deadcyclo/readme.md +++ b/keyboards/ergodox/keymaps/deadcyclo/readme.md @@ -57,6 +57,7 @@ The unicode layer provides keys for directly typing unicode (utf-8) - 10.01.2017 Added layer images to readme - 24.01.2017 Added support for Ergodox Shine. Added secondary L2 switch key on left hand - 24.01.2017 Added unicode keys. Added shrug hug and yay. Moved Navigation to layer 2 +- 25.01.2017 Added lots of new emojis and some unicode keys # TODO -- cgit v1.2.3 From 938422ce9901b7e15c738d6abaa78e0076ebdc84 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Wed, 25 Jan 2017 10:02:01 -0500 Subject: layer defines to enum --- keyboards/planck/keymaps/default/keymap.c | 17 ++++++++++------- keyboards/preonic/keymaps/default/keymap.c | 15 +++++++++------ 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/keyboards/planck/keymaps/default/keymap.c b/keyboards/planck/keymaps/default/keymap.c index ddbe4d7b2..1b1b998b2 100644 --- a/keyboards/planck/keymaps/default/keymap.c +++ b/keyboards/planck/keymaps/default/keymap.c @@ -14,13 +14,16 @@ extern keymap_config_t keymap_config; // 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 _PLOVER 5 -#define _ADJUST 16 + +enum planck_layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _PLOVER, + _ADJUST +}; enum planck_keycodes { QWERTY = SAFE_RANGE, diff --git a/keyboards/preonic/keymaps/default/keymap.c b/keyboards/preonic/keymaps/default/keymap.c index 78b4997a8..3313af945 100644 --- a/keyboards/preonic/keymaps/default/keymap.c +++ b/keyboards/preonic/keymaps/default/keymap.c @@ -9,12 +9,15 @@ // 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 _ADJUST 16 + +enum preonic_layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _ADJUST +}; enum preonic_keycodes { QWERTY = SAFE_RANGE, -- cgit v1.2.3 From 6546dddddb883b76243fd4088a5c7b38bd050c0d Mon Sep 17 00:00:00 2001 From: Stephen Tudor Date: Wed, 25 Jan 2017 10:57:42 -0500 Subject: Remove COLEMAK from preonic_keycodes enum --- keyboards/preonic/keymaps/smt/keymap.c | 1 - 1 file changed, 1 deletion(-) diff --git a/keyboards/preonic/keymaps/smt/keymap.c b/keyboards/preonic/keymaps/smt/keymap.c index 4ef22bb97..5465d543a 100644 --- a/keyboards/preonic/keymaps/smt/keymap.c +++ b/keyboards/preonic/keymaps/smt/keymap.c @@ -18,7 +18,6 @@ enum preonic_keycodes { DVORAK = SAFE_RANGE, QWERTY, - COLEMAK, LOWER, RAISE, BACKLIT -- cgit v1.2.3 From 63e406eca4da805617889f7ab769a781c0046742 Mon Sep 17 00:00:00 2001 From: Stephen Tudor Date: Thu, 26 Jan 2017 00:24:51 -0500 Subject: Add smt keymap for Planck --- keyboards/planck/keymaps/smt/Makefile | 3 + keyboards/planck/keymaps/smt/keymap.c | 232 +++++++++++++++++++++++++++++++++ keyboards/planck/keymaps/smt/readme.md | 78 +++++++++++ 3 files changed, 313 insertions(+) create mode 100644 keyboards/planck/keymaps/smt/Makefile create mode 100644 keyboards/planck/keymaps/smt/keymap.c create mode 100644 keyboards/planck/keymaps/smt/readme.md diff --git a/keyboards/planck/keymaps/smt/Makefile b/keyboards/planck/keymaps/smt/Makefile new file mode 100644 index 000000000..457a3d01d --- /dev/null +++ b/keyboards/planck/keymaps/smt/Makefile @@ -0,0 +1,3 @@ +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/planck/keymaps/smt/keymap.c b/keyboards/planck/keymaps/smt/keymap.c new file mode 100644 index 000000000..47e9d8c70 --- /dev/null +++ b/keyboards/planck/keymaps/smt/keymap.c @@ -0,0 +1,232 @@ +// This is the canonical layout file for the Quantum project. If you want to add another keyboard, +// this is the style you want to emulate. + +#include "planck.h" +#include "action_layer.h" +#ifdef AUDIO_ENABLE + #include "audio.h" +#endif +#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 _DVORAK 0 +#define _QWERTY 1 +#define _LOWER 2 +#define _RAISE 3 +#define _ADJUST 16 + +enum planck_keycodes { + DVORAK = SAFE_RANGE, + QWERTY, + LOWER, + RAISE, + BACKLIT +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | - | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = { + {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC}, + {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS}, + {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_T(KC_ENT)}, + {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = { + {_______, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, + {_______, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {_______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +}, + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | Home |PageUp| + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | End |PageDn| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = { + {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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_4, KC_5, KC_6, KC_HOME, KC_PGUP}, + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, KC_END, KC_PGDN}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} +}, + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | _ | ? | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | - | / | = | [ | ] | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = { + {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, + {_______, _______, _______, _______, _______, _______, KC_UNDS, KC_QUES, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, + {_______, _______, _______, _______, _______, _______, KC_MINS, KC_SLSH, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} +}, + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Dvorak|Qwerty| | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = { + {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, + {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, DVORAK, QWERTY, _______, _______, _______}, + {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +} + + +}; + +#ifdef AUDIO_ENABLE + +float tone_startup[][2] = SONG(STARTUP_SOUND); +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); + +float tone_goodbye[][2] = SONG(GOODBYE_SOUND); +#endif + + +void persistant_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 DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + #endif + persistant_default_layer_set(1UL<<_DVORAK); + } + return false; + break; + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + #endif + persistant_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 BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + return false; + break; + } + return true; +} + +void matrix_init_user(void) { + #ifdef AUDIO_ENABLE + startup_user(); + #endif +} + +#ifdef AUDIO_ENABLE + +void startup_user() +{ + _delay_ms(20); // gets rid of tick + PLAY_NOTE_ARRAY(tone_startup, false, 0); +} + +void shutdown_user() +{ + PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + _delay_ms(150); + stop_all_notes(); +} + +void music_on_user(void) +{ + music_scale_user(); +} + +void music_scale_user(void) +{ + PLAY_NOTE_ARRAY(music_scale, false, 0); +} + +#endif diff --git a/keyboards/planck/keymaps/smt/readme.md b/keyboards/planck/keymaps/smt/readme.md new file mode 100644 index 000000000..52d702df0 --- /dev/null +++ b/keyboards/planck/keymaps/smt/readme.md @@ -0,0 +1,78 @@ +# smt's Planck keymap + +This keymap is primarily based on the default Planck keymap. + +Notable differences from the default are: + +1. **Dvorak by default** + + I happen to type in Dvorak, and prefer that layer to be the default on my keyboard. This is easy enough to switch around with Qwerty, Colemak, or whatever. + +2. **Right Shift** + + I use both the left and right shift keys when I type. When I want to modify a key with shift, I hold shift with the hand opposite the one typing the key. In the default keymap, Enter is where shift would be on a standard keyboard layout. Oh, muscle memory. + + Thankfully, QMK supports [mod-tap](https://github.com/jackhumbert/qmk_firmware/wiki#fun-with-modifier-keys) keys, and this allows me to set the Enter key to send a modifier (MOD_LSFT) when held, and KC_ENT when tapped. Awesome! + +## Dvorak (default) + +``` +,-----------------------------------------------------------------------------------. +| Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | +|------+------+------+------+------+-------------+------+------+------+------+------| +| Esc | A | O | E | U | I | D | H | T | N | S | - | +|------+------+------+------+------+------|------+------+------+------+------+------| +| Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | +`-----------------------------------------------------------------------------------' +``` + +## Qwerty (same as default) + +``` +,-----------------------------------------------------------------------------------. +| Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | +|------+------+------+------+------+-------------+------+------+------+------+------| +| Esc | A | S | D | F | G | H | J | K | L | ; | " | +|------+------+------+------+------+------|------+------+------+------+------+------| +| Shift| Z | X | C | V | B | N | M | , | . | / |Enter | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | +`-----------------------------------------------------------------------------------' +``` + +## Lower + +This is where I put the number row, a numpad cluster, function keys, and some light navigation via Home/End/PageUp/PageDn. Like the "Raise" layer, the top row is redundant to help with Planck compatibility. + +``` +,-----------------------------------------------------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | +|------+------+------+------+------+-------------+------+------+------+------+------| +| | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | Home |PageUp| +|------+------+------+------+------+------|------+------+------+------+------+------| +| | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | End |PageDn| +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | Next | Vol- | Vol+ | Play | +`-----------------------------------------------------------------------------------' +``` + +## Raise + +As a developer, it makes the most sense for me to group all the commonly-used symbols that don't fit on the main layer. In particular, having the dual-column of parens-braces-brackets really helps a lot. + +I haven't completely filled this layer, which leaves room for future mappings and macros. + +``` +,-----------------------------------------------------------------------------------. +| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | +|------+------+------+------+------+-------------+------+------+------+------+------| +| | | | | | | _ | ? | + | { | } | | | +|------+------+------+------+------+------|------+------+------+------+------+------| +| | | | | | | - | / | = | [ | ] | \ | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | Next | Vol- | Vol+ | Play | +`-----------------------------------------------------------------------------------' +``` + -- cgit v1.2.3 From 1b20243092002637d0020b341801e5e26a61fd2f Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Thu, 26 Jan 2017 01:26:17 -0500 Subject: Add gitter image, start update to qmk org --- readme.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/readme.md b/readme.md index d33c3ad01..71f756667 100644 --- a/readme.md +++ b/readme.md @@ -1,6 +1,6 @@ # Quantum Mechanical Keyboard Firmware -[![Build Status](https://travis-ci.org/jackhumbert/qmk_firmware.svg?branch=master)](https://travis-ci.org/jackhumbert/qmk_firmware) +[![Build Status](https://travis-ci.org/jackhumbert/qmk_firmware.svg?branch=master)](https://travis-ci.org/jackhumbert/qmk_firmware) [![Gitter](https://badges.gitter.im/qmk/qmk_firmware.svg)](https://gitter.im/qmk/qmk_firmware?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) This is a keyboard firmware based on the [tmk_keyboard firmware](http://github.com/tmk/tmk_keyboard) with some useful features for Atmel AVR controllers, and more specifically, the [OLKB product line](http://olkb.com), the [ErgoDox EZ](http://www.ergodox-ez.com) keyboard, and the [Clueboard product line](http://clueboard.co/). @@ -23,7 +23,7 @@ The project also includes community support for [lots of other keyboards](/keybo QMK is developed and maintained by Jack Humbert of OLKB with contributions from the community, and of course, [Hasu](https://github.com/tmk). This repo used to be a fork of [TMK](https://github.com/tmk/tmk_keyboard), and we are incredibly grateful for his founding contributions to the firmware. We've had to break the fork due to purely technical reasons - it simply became too different over time, and we've had to start refactoring some of the basic bits and pieces. We are huge fans of TMK and Hasu :) -This documentation is edited and maintained by Erez Zukerman of ErgoDox EZ. If you spot any typos or inaccuracies, please [open an issue](https://github.com/jackhumbert/qmk_firmware/issues/new). +This documentation is edited and maintained by Erez Zukerman of ErgoDox EZ. If you spot any typos or inaccuracies, please [open an issue](https://github.com/qmk/qmk_firmware/issues/new). The OLKB product firmwares are maintained by [Jack Humbert](https://github.com/jackhumbert), the Ergodox EZ by [Erez Zukerman](https://github.com/ezuk), and the Clueboard by [Zach White](https://github.com/skullydazed). @@ -31,7 +31,7 @@ The OLKB product firmwares are maintained by [Jack Humbert](https://github.com/j This is not a tiny project. While this is the main readme, there are many other files you might want to consult. Here are some points of interest: -* [**The Wiki**](https://github.com/jackhumbert/qmk_firmware/wiki) - the entirety of the readme has been moved here +* [**The Wiki**](https://github.com/qmk/qmk_firmware/wiki) - the entirety of the readme has been moved here * The readme for your own keyboard: This is found under `keyboards//`. So for the ErgoDox EZ, it's [here](keyboards/ergodox/ez/); for the Planck, it's [here](keyboards/planck/) and so on. * The list of possible keycodes you can use in your keymap is actually spread out in a few different places: * [doc/keycode.txt](doc/keycode.txt) - an explanation of those same keycodes. -- cgit v1.2.3 From c9ca36800884f63cf67d55565824bad0cb6d9be3 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Thu, 26 Jan 2017 01:52:43 -0500 Subject: replace jackhumbert with qmk --- doc/BUILD_GUIDE.md | 4 ++-- doc/CYGWIN_GUIDE.md | 2 +- doc/HAND_WIRE.md | 6 +++--- doc/PCB_GUIDE.md | 6 +++--- keyboards/atreus/readme.md | 2 +- keyboards/ergodox/keymaps/ab/readme.md | 2 +- keyboards/ergodox/keymaps/algernon/readme.md | 4 ++-- keyboards/ergodox/keymaps/german-kinergo/readme.md | 2 +- keyboards/ergodox/keymaps/mclennon_osx/README.md | 2 +- keyboards/ergodox/keymaps/pvinis/Readme.md | 2 +- keyboards/ergodox/keymaps/supercoder/readme.md | 2 +- keyboards/ergodox/keymaps/win10_writers-block/readme.md | 2 +- keyboards/ergodox/readme.md | 2 +- keyboards/hhkb/readme.md | 2 +- keyboards/preonic/keymaps/smt/readme.md | 2 +- keyboards/s60-x/readme.md | 2 +- 16 files changed, 22 insertions(+), 22 deletions(-) diff --git a/doc/BUILD_GUIDE.md b/doc/BUILD_GUIDE.md index 70a4e10fa..175019183 100644 --- a/doc/BUILD_GUIDE.md +++ b/doc/BUILD_GUIDE.md @@ -6,7 +6,7 @@ 1. If you have ever installed WinAVR, uninstall it. 2. Install [MHV AVR Tools](https://infernoembedded.com/sites/default/files/project/MHV_AVR_Tools_20131101.exe). Disable smatch, but **be sure to leave the option to add the tools to the PATH checked**. 3. Install [MinGW](https://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download). During installation, uncheck the option to install a graphical user interface. **DO NOT change the default installation folder.** The scripts depend on the default location. -4. Clone this repository. [This link will download it as a zip file, which you'll need to extract.](https://github.com/jackhumbert/qmk_firmware/archive/master.zip) Open the extracted folder in Windows Explorer. +4. Clone this repository. [This link will download it as a zip file, which you'll need to extract.](https://github.com/qmk/qmk_firmware/archive/master.zip) Open the extracted folder in Windows Explorer. 5. Double-click on the 1-setup-path-win batch script to run it. You'll need to accept a User Account Control prompt. Press the spacebar to dismiss the success message in the command prompt that pops up. 6. Right-click on the 2-setup-environment-win batch script, select "Run as administrator", and accept the User Account Control prompt. This part may take a couple of minutes, and you'll need to approve a driver installation, but once it finishes, your environment is complete! 7. Future build commands should be run from the standard Windows command prompt, which you can find by searching for "command prompt" from the start menu or start screen. Ignore the "MHV AVR Shell". @@ -38,7 +38,7 @@ Debian/Ubuntu example: If you have any problems building the firmware, you can try using a tool called Vagrant. It will set up a virtual computer with a known configuration that's ready-to-go for firmware building. OLKB does NOT host the files for this virtual computer. Details on how to set up Vagrant are in the [VAGRANT_GUIDE file](VAGRANT_GUIDE.md). ## Verify Your Installation -1. If you haven't already, obtain this repository ([https://github.com/jackhumbert/qmk_firmware](https://github.com/jackhumbert/qmk_firmware)). You can either download it as a zip file and extract it, or clone it using the command line tool git or the Github Desktop application. +1. If you haven't already, obtain this repository ([https://github.com/qmk/qmk_firmware](https://github.com/qmk/qmk_firmware)). You can either download it as a zip file and extract it, or clone it using the command line tool git or the Github Desktop application. 2. Open up a terminal or command prompt and navigate to the `qmk_firmware` folder using the `cd` command. The command prompt will typically open to your home directory. If, for example, you cloned the repository to your Documents folder, then you would type `cd Documents/qmk_firmware`. If you extracted the file from a zip, then it may be named `qmk_firmware-master` instead. 3. To confirm that you're in the correct location, you can display the contents of your current folder using the `dir` command on Windows, or the `ls` command on Linux or Mac. You should see several files, including `readme.md` and a `quantum` folder. From here, you need to navigate to the appropriate folder under `keyboards/`. For example, if you're building for a Planck, run `cd keyboards/planck`. 4. Once you're in the correct keyboard-specific folder, run the `make` command. This should output a lot of information about the build process. More information about the `make` command can be found below. diff --git a/doc/CYGWIN_GUIDE.md b/doc/CYGWIN_GUIDE.md index 05e7a55f7..05d71961a 100755 --- a/doc/CYGWIN_GUIDE.md +++ b/doc/CYGWIN_GUIDE.md @@ -234,7 +234,7 @@ If you did everything else right. This part should be a snap! Grab the latest so ###Build Planck and Load the Firmware ``` $ cd ~/src -$ git clone https://github.com/jackhumbert/qmk_firmware.git +$ git clone https://github.com/qmk/qmk_firmware.git $ cd qmk_firmware/keyboards/planck $ make ``` diff --git a/doc/HAND_WIRE.md b/doc/HAND_WIRE.md index 18cb7011f..17ef3116f 100644 --- a/doc/HAND_WIRE.md +++ b/doc/HAND_WIRE.md @@ -183,7 +183,7 @@ As you move along, be sure that the Teensy is staying in place - recutting and s From here, you should have a working keyboard with the correct firmware. Before we attach the Teensy permanently to the keyboard, let's quickly get some firmware loaded onto the Teensy so we can test each keyswitch. -To start out, download [the firmware](https://github.com/jackhumbert/qmk_firmware/) - we'll be using my (Jack's) fork of TMK called QMK/Quantum. We'll be doing a lot from the Terminal/command prompt, so get that open, along with a decent text editor like [Sublime Text](http://www.sublimetext.com/). +To start out, download [the firmware](https://github.com/qmk/qmk_firmware/) - we'll be using my (Jack's) fork of TMK called QMK/Quantum. We'll be doing a lot from the Terminal/command prompt, so get that open, along with a decent text editor like [Sublime Text](http://www.sublimetext.com/). The first thing we're going to do is create a new project using the script in the root directory of the firmware. In your terminal, run this command with `` replaced by the name of your project - it'll need to be different from any other project in the `keyboards/` folder: @@ -276,7 +276,7 @@ This can be accomplished by using the following `keymaps` definition: ), }; -Note that the layout of the keycodes is similar to the physical layout of our keyboard - this make it much easier to see what's going on. A lot of the keycodes should be fairly obvious, but for a full list of them, check out [tmk_code/doc/keycode.txt](https://github.com/jackhumbert/qmk_firmware/blob/master/tmk_core/doc/keycode.txt) - there are also a lot of aliases to condense your keymap file. +Note that the layout of the keycodes is similar to the physical layout of our keyboard - this make it much easier to see what's going on. A lot of the keycodes should be fairly obvious, but for a full list of them, check out [tmk_code/doc/keycode.txt](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/doc/keycode.txt) - there are also a lot of aliases to condense your keymap file. It's also important to use the `KEYMAP` function we defined earlier - this is what allows the firmware to associate our intended readable keymap with the actual wiring. @@ -306,7 +306,7 @@ If you've done all of these things, keep in mind that sometimes you might have h Now that you have a working board, it's time to get things in their permanent positions. I've often used liberal amounts of hot glue to secure and insulate things, so if that's your style, start spreading that stuff like butter. Otherwise, double-sided tape is always an elegant solution, and electrical tape is a distant second. Due to the nature of these builds, a lot of this part is up to you and how you planned (or didn't plan) things out. -There are a lot of possibilities inside the firmware - check out the [readme](https://github.com/jackhumbert/qmk_firmware/blob/master/readme.md) for a full feature list, and dive into the different project (Planck, Ergodox EZ, etc) to see how people use all of them. You can always stop by [the OLKB subreddit for help!](http://reddit.com/r/olkb) +There are a lot of possibilities inside the firmware - check out the [readme](https://github.com/qmk/qmk_firmware/blob/master/readme.md) for a full feature list, and dive into the different project (Planck, Ergodox EZ, etc) to see how people use all of them. You can always stop by [the OLKB subreddit for help!](http://reddit.com/r/olkb) ## Trouble-shooting compiling diff --git a/doc/PCB_GUIDE.md b/doc/PCB_GUIDE.md index 3fad41dfb..16de71114 100644 --- a/doc/PCB_GUIDE.md +++ b/doc/PCB_GUIDE.md @@ -5,7 +5,7 @@ ### Windows 1. Install [MHV AVR Tools](https://infernoembedded.com/sites/default/files/project/MHV_AVR_Tools_20131101.exe). Disable smatch, but **be sure to leave the option to add the tools to the PATH checked**. 2. Install [MinGW](https://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download). During installation, uncheck the option to install a graphical user interface. **DO NOT change the default installation folder.** The scripts depend on the default location. -3. Clone this repository. [This link will download it as a zip file, which you'll need to extract.](https://github.com/jackhumbert/qmk_firmware/archive/master.zip) Open the extracted folder in Windows Explorer. +3. Clone this repository. [This link will download it as a zip file, which you'll need to extract.](https://github.com/qmk/qmk_firmware/archive/master.zip) Open the extracted folder in Windows Explorer. 4. Right-click on the 1-setup-path-win batch script, select "Run as administrator", and accept the User Account Control prompt. Press the spacebar to dismiss the success message in the command prompt that pops up. 5. Right-click on the 2-setup-environment-win batch script, select "Run as administrator", and accept the User Account Control prompt. This part may take a couple of minutes, and you'll need to approve a driver installation, but once it finishes, your environment is complete! @@ -32,7 +32,7 @@ Note that, since it will be directly accessing USB hardware, the `dfu-programmer` program needs to be run as root. ## Verify Your Installation -1. Clone the following repository: https://github.com/jackhumbert/qmk_firmware +1. Clone the following repository: https://github.com/qmk/qmk_firmware 2. Open a Terminal and `cd` into `qmk_firmware/keyboards/planck` 3. Run `make`. This should output a lot of information about the build process. @@ -80,7 +80,7 @@ when trying to 'make dfu' on Windows you need to copy the dfu-programmer.exe to ### Keymap -Unlike the other keymaps, prefixing the keycodes with `KC_` is required. A full list of the keycodes is available [here](https://github.com/jackhumbert/qmk_firmware/blob/master/tmk_core/doc/keycode.txt). For the keycodes available only in the extended keymap, see this [header file](https://github.com/jackhumbert/qmk_firmware/blob/master/quantum/keymap_common.h). +Unlike the other keymaps, prefixing the keycodes with `KC_` is required. A full list of the keycodes is available [here](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/doc/keycode.txt). For the keycodes available only in the extended keymap, see this [header file](https://github.com/qmk/qmk_firmware/blob/master/quantum/keymap_common.h). You can use modifiers with keycodes like this: diff --git a/keyboards/atreus/readme.md b/keyboards/atreus/readme.md index 8baa581f0..476d1bce3 100644 --- a/keyboards/atreus/readme.md +++ b/keyboards/atreus/readme.md @@ -88,7 +88,7 @@ We've added shortcuts to make common modifier/tap (mod-tap) mappings more compac ### Remember: These are just aliases -These functions work the same way that their `ACTION_*` functions do - they're just quick aliases. To dig into all of the tmk ACTION_* functions, please see the [TMK documentation](https://github.com/jackhumbert/qmk_firmware/blob/master/tmk_core/doc/keymap.md#2-action). +These functions work the same way that their `ACTION_*` functions do - they're just quick aliases. To dig into all of the tmk ACTION_* functions, please see the [TMK documentation](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/doc/keymap.md#2-action). Instead of using `FNx` when defining `ACTION_*` functions, you can use `F(x)` - the benefit here is being able to use more than 32 function actions (up to 4096), if you happen to need them. diff --git a/keyboards/ergodox/keymaps/ab/readme.md b/keyboards/ergodox/keymaps/ab/readme.md index 6b1ac2be3..62e08e162 100644 --- a/keyboards/ergodox/keymaps/ab/readme.md +++ b/keyboards/ergodox/keymaps/ab/readme.md @@ -8,7 +8,7 @@ Beginner's keymap emulates standard QWERTY keyboard for beginners. Once you get * Easy on beginners. It has everything you need for your day to day usage. #### Cons -* Keys are not ergonomically placed to take full advantage of Ergodox-EZ. Take a look at this [Default Keymap](https://github.com/jackhumbert/qmk_firmware/blob/master/keyboards/ergodox_ez/keymaps/default/readme.md) +* Keys are not ergonomically placed to take full advantage of Ergodox-EZ. Take a look at this [Default Keymap](https://github.com/qmk/qmk_firmware/blob/master/keyboards/ergodox_ez/keymaps/default/readme.md) * While multiple layers are possible, beginner's keymap only uses one additional layer for mouse, function and volume keys. #### Notes diff --git a/keyboards/ergodox/keymaps/algernon/readme.md b/keyboards/ergodox/keymaps/algernon/readme.md index 015bd7cd3..3783eadf1 100644 --- a/keyboards/ergodox/keymaps/algernon/readme.md +++ b/keyboards/ergodox/keymaps/algernon/readme.md @@ -121,10 +121,10 @@ There is a very small tool in `tools/layer-notify`, that listens to the HID cons To make my workflow easier, this layout is maintained in [its own repository][algernon:ez-layout]. To build it, you will need the [QMK][qmk] firmware checked out, and this repo either checked out to something like `keyboards/ergodox_ez/algernon-master`. One way to achieve that is this: [algernon:ez-layout]: https://github.com/algernon/ergodox-layout - [qmk]: https://github.com/jackhumbert/qmk_firmware + [qmk]: https://github.com/qmk/qmk_firmware ``` -$ git clone https://github.com/jackhumbert/qmk_firmware.git +$ git clone https://github.com/qmk/qmk_firmware.git $ cd qmk_firmware $ git clone https://github.com/algernon/ergodox-layout.git \ keyboards/ergodox/keymaps/algernon-master diff --git a/keyboards/ergodox/keymaps/german-kinergo/readme.md b/keyboards/ergodox/keymaps/german-kinergo/readme.md index 557d85a8a..beb74cf75 100644 --- a/keyboards/ergodox/keymaps/german-kinergo/readme.md +++ b/keyboards/ergodox/keymaps/german-kinergo/readme.md @@ -2,7 +2,7 @@ This layout is inspired by the "kinesis-qwerty-mod" from benblazak's [ergodox-firmware](https://github.com/benblazak/ergodox-firmware), as well as by the "german" layout from the -[qmk_firmware](https://github.com/jackhumbert/qmk_firmware). +[qmk_firmware](https://github.com/qmk/qmk_firmware). The goal was to have a layout that is pretty close to an ordinary German keyboard, so I don't have to make adjustments on the operating system level and I keep some of the muscle memory to use a regular keyboard. diff --git a/keyboards/ergodox/keymaps/mclennon_osx/README.md b/keyboards/ergodox/keymaps/mclennon_osx/README.md index 60980d043..28cdb7c10 100644 --- a/keyboards/ergodox/keymaps/mclennon_osx/README.md +++ b/keyboards/ergodox/keymaps/mclennon_osx/README.md @@ -2,4 +2,4 @@ This keymapping is designed to be reasonably familiar to an ordinary Mac keyboard while taking advantage of the Ergodox EZ's features. Caps lock instead enables a layer which allows a user to use HJKL as arrow keys and to control media. Shift and control have additional mappings on S and D to provide easier access while holding down caps lock. -If you choose to compile this yourself, be sure to compile with `#define PREVENT_STUCK_MODIFIERS` in your `config.h`. Firmware built using [qmk_firmware](https://github.com/jackhumbert/qmk_firmware/). +If you choose to compile this yourself, be sure to compile with `#define PREVENT_STUCK_MODIFIERS` in your `config.h`. Firmware built using [qmk_firmware](https://github.com/qmk/qmk_firmware/). diff --git a/keyboards/ergodox/keymaps/pvinis/Readme.md b/keyboards/ergodox/keymaps/pvinis/Readme.md index 2a4a0c8f3..af2721054 100644 --- a/keyboards/ergodox/keymaps/pvinis/Readme.md +++ b/keyboards/ergodox/keymaps/pvinis/Readme.md @@ -59,7 +59,7 @@ I have two commented out layers that are just templates, so I can easily create # Building ``` -$ git clone https://github.com/jackhumbert/qmk_firmware.git +$ git clone https://github.com/qmk/qmk_firmware.git $ cd qmk_firmware/keyboards/ergodox/keymaps/pvinis $ make ``` diff --git a/keyboards/ergodox/keymaps/supercoder/readme.md b/keyboards/ergodox/keymaps/supercoder/readme.md index 8ef96eddf..df39ac7a9 100644 --- a/keyboards/ergodox/keymaps/supercoder/readme.md +++ b/keyboards/ergodox/keymaps/supercoder/readme.md @@ -22,7 +22,7 @@ your own: [hex]: https://raw.githubusercontent.com/algernon/ergodox-supercoder/master/supercoder.hex ``` -$ git clone https://github.com/jackhumbert/qmk_firmware.git +$ git clone https://github.com/qmk/qmk_firmware.git $ cd qmk_firmware/keyboards/ergodox $ git clone https://github.com/algernon/ergodox-supercoder.git keymaps/supercoder $ make KEYMAP=supercoder diff --git a/keyboards/ergodox/keymaps/win10_writers-block/readme.md b/keyboards/ergodox/keymaps/win10_writers-block/readme.md index e51e3c48f..83f91bce2 100644 --- a/keyboards/ergodox/keymaps/win10_writers-block/readme.md +++ b/keyboards/ergodox/keymaps/win10_writers-block/readme.md @@ -90,7 +90,7 @@ Your LEDs will change to indicate your layer. You'll know you are in the base la To build, you will need the [QMK][qmk] firmware checked out. from there, dive into `keyboards/ergodox/keymaps/win10_writers-block/` -[qmk]: https://github.com/jackhumbert/qmk_firmware +[qmk]: https://github.com/qmk/qmk_firmware ``` $ make keyboard=ergodox keymap=win10_writers-block diff --git a/keyboards/ergodox/readme.md b/keyboards/ergodox/readme.md index ca3eeba59..45b3354c1 100644 --- a/keyboards/ergodox/readme.md +++ b/keyboards/ergodox/readme.md @@ -25,7 +25,7 @@ If none of the existing keymaps suit you, you can create your own custom keymap. This will require some experience with coding. Follow these steps to customize a keymap: - - Read the [qmk firmware README](https://github.com/jackhumbert/qmk_firmware) from top to bottom. Then come back here. :) + - Read the [qmk firmware README](https://github.com/qmk/qmk_firmware) from top to bottom. Then come back here. :) - Clone the qmk_firmware repository diff --git a/keyboards/hhkb/readme.md b/keyboards/hhkb/readme.md index 367c0a08f..ee7d11121 100644 --- a/keyboards/hhkb/readme.md +++ b/keyboards/hhkb/readme.md @@ -82,7 +82,7 @@ We've added shortcuts to make common modifier/tap (mod-tap) mappings more compac ### Remember: These are just aliases -These functions work the same way that their `ACTION_*` functions do - they're just quick aliases. To dig into all of the tmk ACTION_* functions, please see the [TMK documentation](https://github.com/jackhumbert/qmk_firmware/blob/master/tmk_core/doc/keymap.md#2-action). +These functions work the same way that their `ACTION_*` functions do - they're just quick aliases. To dig into all of the tmk ACTION_* functions, please see the [TMK documentation](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/doc/keymap.md#2-action). Instead of using `FNx` when defining `ACTION_*` functions, you can use `F(x)` - the benefit here is being able to use more than 32 function actions (up to 4096), if you happen to need them. diff --git a/keyboards/preonic/keymaps/smt/readme.md b/keyboards/preonic/keymaps/smt/readme.md index b2052b37c..2dcc1927f 100644 --- a/keyboards/preonic/keymaps/smt/readme.md +++ b/keyboards/preonic/keymaps/smt/readme.md @@ -12,7 +12,7 @@ Notable differences from the default are: I use both the left and right shift keys when I type. When I want to modify a key with shift, I hold shift with the hand opposite the one typing the key. In the default keymap, Enter is where shift would be on a standard keyboard layout. Oh, muscle memory. - Thankfully, QMK supports [mod-tap](https://github.com/jackhumbert/qmk_firmware/wiki#fun-with-modifier-keys) keys, and this allows me to set the Enter key to send a modifier (MOD_LSFT) when held, and KC_ENT when tapped. Awesome! + Thankfully, QMK supports [mod-tap](https://github.com/qmk/qmk_firmware/wiki#fun-with-modifier-keys) keys, and this allows me to set the Enter key to send a modifier (MOD_LSFT) when held, and KC_ENT when tapped. Awesome! ## Dvorak (default) diff --git a/keyboards/s60-x/readme.md b/keyboards/s60-x/readme.md index 94ce82922..408ad13ac 100644 --- a/keyboards/s60-x/readme.md +++ b/keyboards/s60-x/readme.md @@ -13,7 +13,7 @@ You only need to flash them onto your keyboard, which is explained below, there' ## Flashing your keyboard The recommended programs for flashing your keyboard are [Atmel FLIP](http://www.atmel.com/tools/FLIP.aspx) (Windows) and [dfu-programmer](http://dfu-programmer.sourceforge.net/) (Linux/Windows). -[QMK Firmware Flasher](https://github.com/jackhumbert/qmk_firmware_flasher/releases) may work, as the S60-X keyboard uses the ATMega32U4 microcontroller, but it is untested. Use at your own risk. +[QMK Firmware Flasher](https://github.com/qmk/qmk_firmware_flasher/releases) may work, as the S60-X keyboard uses the ATMega32U4 microcontroller, but it is untested. Use at your own risk. [Easy AVR USB Keyboard Firmware](https://deskthority.net/wiki/Easy_AVR_USB_Keyboard_Firmware) also supports S60-X, but it is completely unrelated to TMK firmware. Use at your own risk. -- cgit v1.2.3 From 87bc36253dd915c51571e1972b771f49db9673d3 Mon Sep 17 00:00:00 2001 From: Luke Silva Date: Thu, 26 Jan 2017 22:44:22 +1100 Subject: Fix documentation for TMK actions --- tmk_core/common/action_code.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tmk_core/common/action_code.h b/tmk_core/common/action_code.h index 33da35f35..b15aaa0eb 100644 --- a/tmk_core/common/action_code.h +++ b/tmk_core/common/action_code.h @@ -47,10 +47,15 @@ along with this program. If not, see . * 0100|10| usage(10) (reserved) * 0100|11| usage(10) (reserved) * - * ACT_MOUSEKEY(0110): TODO: Not needed? + * + * ACT_MOUSEKEY(0101): TODO: Merge these two actions to conserve space? * 0101|xxxx| keycode Mouse key * - * 011x|xxxx xxxx xxxx (reseved) + * ACT_SWAP_HANDS(0110): + * 0110|xxxx| keycode Swap hands (keycode on tap, or options) + * + * + * 0111|xxxx xxxx xxxx (reserved) * * * Layer Actions(10xx) @@ -67,7 +72,6 @@ along with this program. If not, see . * ee: on event(01:press, 10:release, 11:both) * * 1001|xxxx|xxxx xxxx (reserved) - * 1001|oopp|BBBB BBBB 8-bit Bitwise Operation??? * * ACT_LAYER_TAP(101x): * 101E|LLLL| keycode On/Off with tap key (0x00-DF)[TAP] -- cgit v1.2.3 From 3131d655638927fb1802c6526f7b9b7afff03a5e Mon Sep 17 00:00:00 2001 From: Nic Aitch Date: Thu, 26 Jan 2017 09:31:27 -0600 Subject: Add avrdude target --- keyboards/lets_split/rules.mk | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/keyboards/lets_split/rules.mk b/keyboards/lets_split/rules.mk index 1aee5313c..0dc549130 100644 --- a/keyboards/lets_split/rules.mk +++ b/keyboards/lets_split/rules.mk @@ -73,3 +73,13 @@ USE_I2C ?= yes SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes + +avrdude: build + ls /dev/tty* > /tmp/1; \ + echo "Reset your Pro Micro then hit any key to continue..."; \ + read -n 1 -s; \ + ls /dev/tty* > /tmp/2; \ + USB=`diff /tmp/1 /tmp/2 | grep '>' | sed -e 's/> //'`; \ + avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex + +.PHONY: avrdude -- cgit v1.2.3 From 890ecf6a2ae1e782cdcd7750572c339c1ad7bb3a Mon Sep 17 00:00:00 2001 From: Nic Aitch Date: Thu, 26 Jan 2017 09:31:40 -0600 Subject: Update readme --- keyboards/lets_split/readme.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/keyboards/lets_split/readme.md b/keyboards/lets_split/readme.md index 6e296737a..a63ce5907 100644 --- a/keyboards/lets_split/readme.md +++ b/keyboards/lets_split/readme.md @@ -74,6 +74,10 @@ not be very difficult to adapt it to support more if required. Flashing -------- +From the keymap directory run `make SUBPROJECT-KEYMAP-avrdude` for automatic serial port resolution and flashing. + +Example: `make rev2-serial-avrdude` + If you define `EE_HANDS` in your `config.h`, you will need to set the EEPROM for the left and right halves. The EEPROM is used to store whether the half is left handed or right handed. This makes it so that the same firmware -- cgit v1.2.3 From fffe76a7b7e3a1da58fb8e948b33df1fd9cdbf63 Mon Sep 17 00:00:00 2001 From: Albert Pretorius Date: Thu, 26 Jan 2017 20:07:47 +0000 Subject: albert ergodox keymap --- keyboards/ergodox/keymaps/albert/Makefile | 5 + keyboards/ergodox/keymaps/albert/config.h | 12 + keyboards/ergodox/keymaps/albert/keymap.c | 661 +++++++++++++++++++++++++++++ keyboards/ergodox/keymaps/albert/readme.md | 188 ++++++++ 4 files changed, 866 insertions(+) create mode 100644 keyboards/ergodox/keymaps/albert/Makefile create mode 100644 keyboards/ergodox/keymaps/albert/config.h create mode 100644 keyboards/ergodox/keymaps/albert/keymap.c create mode 100644 keyboards/ergodox/keymaps/albert/readme.md diff --git a/keyboards/ergodox/keymaps/albert/Makefile b/keyboards/ergodox/keymaps/albert/Makefile new file mode 100644 index 000000000..eb8544afe --- /dev/null +++ b/keyboards/ergodox/keymaps/albert/Makefile @@ -0,0 +1,5 @@ +COMMAND_ENABLE = no # Commands for debug and configuration + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/ergodox/keymaps/albert/config.h b/keyboards/ergodox/keymaps/albert/config.h new file mode 100644 index 000000000..e6d363117 --- /dev/null +++ b/keyboards/ergodox/keymaps/albert/config.h @@ -0,0 +1,12 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* using UK layout for space-cadet-shift */ +#define LSPO_KEY KC_9 +#define RSPC_KEY KC_0 + +#define LEADER_TIMEOUT 800 // leader key sequence timeout in millis + +#endif diff --git a/keyboards/ergodox/keymaps/albert/keymap.c b/keyboards/ergodox/keymaps/albert/keymap.c new file mode 100644 index 000000000..dfbb311bd --- /dev/null +++ b/keyboards/ergodox/keymaps/albert/keymap.c @@ -0,0 +1,661 @@ +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" +#include "version.h" + +#include + +/* use UK keymap */ + +#define UK_HASH KC_NONUS_HASH +#define UK_BSLS KC_NONUS_BSLASH +#define UK_PIPE LSFT(UK_BSLS) + +#define BASE 0 // default layer +#define SYMB 1 // symbols +#define NUMB 2 // numbers and hex +#define CRSR 3 // cursor keys +#define MOUS 4 // mouse keys +#define KEYW 5 // keyword macros +#define EMAC 6 // emacs + +// my macros +#define UM_ECET M(0) // { } +#define UM_0x M(1) +#define UM_PUB M(2) +#define UM_PRO M(3) +#define UM_PRV M(4) +#define UM_CLS M(5) +#define UM_STR M(6) +#define UM_RET M(7) +#define UM_INC M(8) +#define UM_OBJ M(9) +#define UM_GITLOG M(10) +#define UM_GOODM M(11) +#define UM_NAMESP M(12) +#define UM_EMTR M(14) // emacs toggle read-only +#define UM_EMWR M(15) // emacs write buffer (save) +#define UM_EMUN M(16) // emacs undo +#define UM_EMRE M(17) // emacs redo +#define UM_EMPB M(18) // emacs previous buffer +#define UM_EMNB M(19) // emacs next buffer +#define UM_GOODN M(20) +#define UM_ECETS M(22) // { }; +#define UM_TMPL M(23) +#define UM_TYPN M(24) +#define UM_CONT M(25) +#define UM_BREAK M(26) +#define UM_CONST M(27) +#define UM_SMILY M(28) +#define UM_SADF M(29) +#define UM_SCARF M(30) +#define UM_DECAF M(31) +#define UM_OPER M(32) +#define UM_NULP M(33) +#define UM_EXTR M(34) +#define UM_VIRT M(35) +#define UM_EMFB M(36) // emacs font bigger +#define UM_EMFS M(37) // emacs font smaller +#define UM_VOLAT M(38) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Base layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | SfLt | | SfRt | 6 | 7 | 8 | 9 | 0 | BkSp | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | Del | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Caps/L2| A | S | D | F | G |------| |------| H | J | K | L | ; |Enter/L2| + * |--------+------+------+------+------+------| L6 | | L6 |------+------+------+------+------+--------| + * | LSft/( | Z | X | C | V/L3 | B/L4 | | | | N/L4 | M/L3 | , | . | / | RSft/) | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |Ctrl/[| Alt/]| # | Left |Right | | Up | Down | - | Alt/[|Ctrl/]| + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | L2 | lead | | lead | Ins | + * ,------|------|------| |------+------+------. + * | Space| BkSp | Home | | PgUp | Enter|Space | + * | / | / |------| |------| / | / | + * | Ctrl | Alt |End/L5| |PDn/L5| Alt | Ctrl | + * `--------------------' `--------------------' + */ +[BASE] = KEYMAP( // layer 0 : default + // left hand + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, LSFT(KC_LEFT), + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, MO(SYMB), + LT(NUMB, KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSPO, KC_Z, KC_X, KC_C, LT(CRSR, KC_V), LT(MOUS, KC_B), MO(EMAC), + CTL_T(KC_LBRC), ALT_T(KC_RBRC), UK_HASH, KC_LEFT, KC_RGHT, + TG(NUMB), KC_LEAD, + KC_HOME, + CTL_T(KC_SPC), ALT_T(KC_BSPC), LT(KEYW, KC_END), + // right hand + LSFT(KC_RGHT), KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + MO(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DELT, + KC_H, KC_J, KC_K, KC_L, KC_SCLN, LT(NUMB, KC_ENT), + MO(EMAC), LT(MOUS, KC_N), LT(CRSR, KC_M), KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + KC_UP, KC_DOWN, KC_MINS, ALT_T(KC_LBRC), CTL_T(KC_RBRC), + KC_LEAD, KC_INS, + KC_PGUP, + LT(KEYW, KC_PGDN), ALT_T(KC_ENT), CTL_T(KC_SPC) + ), +/* Keymap 1: Symbol Layer with F keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ## | F1 | F2 | F3 | F4 | F5 | ## | | ## | F6 | F7 | F8 | F9 | F10 | F11 | + * |--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| + * | ## | ! | " | £ | $ | % | ## | | ## | - | + | = | @ | ~ | F12 | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | ## | ^ | & | * | _ | # |------| |------| { | } | ; | ' | # | ## | + * |--------+------+------+------+------+------| ## | | ## |------+------+------+------+------+--------| + * | ## | \ | | | ` | - | / | | | | [ | ] | < | > | ? | ## | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | ## | ## | ## | ## | ## | | ## | ## | ## | ## | ## | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | ## | ## | | ## | ## | + * ,------|------|------| |------+------+------. + * | | | ## | | ## | | | + * | ## | ## |------| |------| ## | ## | + * | | | ## | | ## | | | + * `--------------------' `--------------------' + */ +[SYMB] = KEYMAP( + // left hand + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + KC_TRNS, KC_EXLM, LSFT(KC_2), LSFT(KC_3), LSFT(KC_4), LSFT(KC_5), KC_TRNS, + KC_TRNS, LSFT(KC_6), LSFT(KC_7), LSFT(KC_8), LSFT(KC_MINS), UK_HASH, + KC_TRNS, UK_BSLS, UK_PIPE, KC_GRV, KC_MINS, KC_SLSH, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_TRNS, KC_MINS, KC_PLUS, KC_EQL, LSFT(KC_QUOT), LSFT(UK_HASH), KC_F12, + KC_LCBR, KC_RCBR, KC_SCLN, KC_QUOT, UK_HASH, KC_TRNS, + KC_TRNS, KC_LBRC, KC_RBRC, LSFT(KC_COMM), LSFT(KC_DOT), LSFT(KC_SLSH), KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), +/* Keymap 2: Numerics and hex + * + * ,---------------------------------------------------. ,--------------------------------------------------. + * | ## | A | B | C | D | E | F | | A | B | C | D | E | F | ## | + * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| + * | ## | * | 7 | 8 | 9 | * | 0x | | 0x | * | 7 | 8 | 9 | * | ## | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | ## | / | 4 | 5 | 6 | / |------| |------| / | 4 | 5 | 6 | / | ## | + * |---------+------+------+------+------+------| ## | | ## |------+------+------+------+------+--------| + * | ## | - | 1 | 2 | 3 | - | | | | - | 1 | 2 | 3 | - | ## | + * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | = | + | 0 | , | . | | 0 | , | . | + | = | + * `-----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | ## | ## | | ## | ## | + * ,------|------|------| |------+------+------. + * | | | ## | | ## | | | + * | ## | ## |------| |------| ## | ## | + * | | | ## | | ## | | | + * `--------------------' `--------------------' + */ +[NUMB] = KEYMAP( + // left hand + KC_TRNS, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, + KC_TRNS, KC_ASTR, KC_7, KC_8, KC_9, KC_ASTR, UM_0x, + KC_TRNS, KC_SLSH, KC_4, KC_5, KC_6, KC_SLSH, + KC_TRNS, KC_MINS, KC_1, KC_2, KC_3, KC_MINS, KC_TRNS, + KC_EQL, KC_PLUS, KC_0, KC_COMM, KC_DOT, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_TRNS, + UM_0x, KC_ASTR, KC_7, KC_8, KC_9, KC_ASTR, KC_TRNS, + KC_SLSH, KC_4, KC_5, KC_6, KC_SLSH, KC_TRNS, + KC_TRNS, KC_MINS, KC_1, KC_2, KC_3, KC_MINS, KC_TRNS, + KC_0, KC_COMM, KC_DOT, KC_PLUS, KC_EQL, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), +/* Keymap 3: Cursor movement + * + * ,---------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| + * | | Home | | Up | | PgUp | | | | PgUp | | Up | | Home | | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | End | Left | Down | Right| PgDn |------| |------| PgDn | Left | Down | Right| End | | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | ## | Up | | Down | ## | | | | | | ## | Down | | Up | ## | + * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | Left | Down | Right| | | | | | Left | Down | Right| + * `-----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | ## | ## |------| |------| ## | ## | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[CRSR] = KEYMAP( + // left hand + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_HOME, KC_NO, KC_UP, KC_NO, KC_PGUP, KC_NO, + KC_NO, KC_END, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, + KC_TRNS, KC_UP, KC_NO, KC_DOWN, KC_TRNS, KC_NO, KC_NO, + KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, + KC_NO, KC_NO, + KC_NO, + KC_TRNS, KC_TRNS, KC_NO, + // right hand + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_PGUP, KC_NO, KC_UP, KC_NO, KC_HOME, KC_NO, + KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_NO, + KC_NO, KC_NO, KC_TRNS, KC_DOWN, KC_NO, KC_UP, KC_TRNS, + KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, + KC_NO, KC_NO, + KC_NO, + KC_NO, KC_TRNS, KC_TRNS + ), +/* Keymap 4: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | Lclk | MsUp | Rclk | | | | | | Lclk | MsUp | Rclk | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| |------| |------| |MsLeft|MsDown|MsRght| | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Lclk | MsUp | Rclk |MsDown| | ## | | | | ## | |MsDown| Lclk | MsUp | Rclk | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |MsLeft|MsDown|MsRight | | | | |MsLeft|MsDown|MsRght| + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[MOUS] = KEYMAP( + // left hand + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_BTN1, KC_MS_U, KC_BTN2, KC_NO, KC_NO, + KC_NO, KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, + KC_BTN1, KC_MS_U, KC_BTN2, KC_MS_D, KC_NO, KC_TRNS, 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, + // right hand + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_BTN1, KC_MS_U, KC_BTN2, KC_NO, KC_NO, + KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, KC_NO, + KC_NO, KC_TRNS, KC_NO, KC_MS_D, KC_BTN1, KC_MS_U, KC_BTN2, + 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 + ), +/* Keymap 5: Keywords + * + * ,---------------------------------------------------. ,--------------------------------------------------. + * | | | | scarf| sadf | smily| | | | decaf| | | | | | + * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| + * | | const| volat| oper | ret | tmpl | | | | typen| cont | prv | pro | pub | | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | str | obj | | gitl |------| |------| | | | nulp | | | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | extr | cls | virt | break| | | |namesp| goodm| goodn| | | | + * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | inc | | | | | | | | | + * `-----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | ecet | ecets| + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | ## | | ## | | | + * `--------------------' `--------------------' + */ +[KEYW] = KEYMAP( + // left hand + KC_NO, KC_NO, KC_NO, UM_SCARF, UM_SADF, UM_SMILY, KC_NO, + KC_NO, UM_CONST, UM_VOLAT, UM_OPER, UM_RET, UM_TMPL, KC_NO, + KC_NO, KC_NO, UM_STR, UM_OBJ, KC_NO, UM_GITLOG, + KC_NO, KC_NO, UM_EXTR, UM_CLS, UM_VIRT, UM_BREAK, KC_NO, + KC_NO, KC_NO, UM_INC, KC_NO, KC_NO, + KC_NO, KC_NO, + KC_NO, + KC_NO, KC_NO, KC_TRNS, + // right hand + KC_NO, UM_DECAF, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, UM_TYPN, UM_CONT, UM_PRV, UM_PRO, UM_PUB, KC_NO, + KC_NO, KC_NO, KC_NO, UM_NULP, KC_NO, KC_NO, + KC_NO, UM_NAMESP, UM_GOODM, UM_GOODN, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + UM_ECET, UM_ECETS, + KC_NO, + KC_TRNS, KC_NO, KC_NO + ), +/* Keymap 6: emacs + * + * ,---------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | empb | | emnb | emfs | emfb | | | | | + * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| + * | | emtr | | | | | | | | emun | emre | w-up | | | | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | emwr | | | |------| |------| |w-left|w-down|w-rght| | | + * |---------+------+------+------+------+------| ## | | ## |------+------+------+------+------+--------| + * | | | | | | | | | | | |w-down| | | | + * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `-----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[EMAC] = KEYMAP( + // left hand + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, UM_EMPB, + KC_NO, UM_EMTR, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, UM_EMWR, 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, + // right hand + UM_EMNB, UM_EMFS, UM_EMFB, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, UM_EMUN, UM_EMRE, LSFT(KC_UP), KC_NO, KC_NO, KC_NO, + KC_NO, LSFT(KC_LEFT), LSFT(KC_DOWN), LSFT(KC_RGHT), KC_NO, KC_NO, + KC_TRNS, KC_NO, KC_NO, LSFT(KC_DOWN), 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 + ), +}; + +enum next_key_down_up { + NK_DOWN_UP, + NK_DOWN, + NK_UP // a bit of a hack, this works as long as NK_UP < KC_A +}; + +void send_keystrokes(uint8_t key, ...) +{ + va_list vl; + va_start(vl, key); + enum next_key_down_up nkdu = NK_DOWN_UP; + while (key != KC_NO) { + if (key < KC_A) { + nkdu = key; + } else { + switch (nkdu) { + case NK_DOWN_UP: + register_code(key); + case NK_UP: + unregister_code(key); + break; + case NK_DOWN: + register_code(key); + } + nkdu = NK_DOWN_UP; + } + key = va_arg(vl, int); + } + va_end(vl); +} + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: // { } + if (record->event.pressed) { + return MACRO(T(ENT), D(LSFT), T(LBRC), U(LSFT), T(ENT), + D(LSFT), T(RBRC), U(LSFT), T(UP), + T(TAB), END); + } + break; + case 1: + if (record->event.pressed) { + return MACRO(T(0), T(X), END); + } + break; + case 2: + if (record->event.pressed) { + SEND_STRING("public"); + } + break; + case 3: + if (record->event.pressed) { + SEND_STRING("protected"); + } + break; + case 4: + if (record->event.pressed) { + SEND_STRING("private"); + } + break; + case 5: // class + if (record->event.pressed) { + return MACRO(T(C), T(L), T(A), T(S), T(S), T(ENT), + D(LSFT), T(LBRC), U(LSFT), T(ENT), + T(P), T(U), T(B), T(L), T(I), T(C), + D(LSFT), T(SCLN), U(LSFT), T(ENT), T(ENT), + T(P), T(R), T(I), T(V), T(A), T(T), T(E), + D(LSFT), T(SCLN), U(LSFT), T(ENT), + D(LSFT), T(RBRC), U(LSFT), T(SCLN), T(ENT), + T(UP), T(UP), T(UP), T(UP), T(UP), T(UP), T(UP), + T(END), T(SPC), END); + } + break; + case 6: // struct + if (record->event.pressed) { + return MACRO(T(S), T(T), T(R), T(U), T(C), T(T), T(ENT), + D(LSFT), T(LBRC), U(LSFT), T(ENT), + D(LSFT), T(RBRC), U(LSFT), T(SCLN), T(ENT), + T(UP), T(UP), T(UP), T(UP), + T(END), T(SPC), END); + } + break; + case 7: + if (record->event.pressed) { + SEND_STRING("return"); + } + break; + case 8: // #include + if (record->event.pressed) { + return MACRO(T(NONUS_HASH), T(I), T(N), T(C), T(L), T(U), T(D), T(E), END); + } + break; + case 9: + if (record->event.pressed) { + SEND_STRING("objdump -CT -x -d"); + } + break; + case 10: + if (record->event.pressed) { + SEND_STRING("git log --oneline --graph --decorate=short"); + } + break; + case 11: + if (record->event.pressed) { + SEND_STRING("good morning"); + } + break; + case 12: + if (record->event.pressed) { + SEND_STRING("namespace"); + } + break; + case 14: // emacs toggle read-only + if (record->event.pressed) { + return MACRO(D(LCTL), T(X), T(Q), U(LCTL), END); + } + break; + case 15: // emacs write buffer + if (record->event.pressed) { + return MACRO(D(LCTL), T(X), T(S), U(LCTL), END); + } + break; + case 16: // emacs undo + if (record->event.pressed) { + return MACRO(D(LCTL), D(LSFT), T(MINS), U(LSFT), U(LCTL), END); + } + break; + case 17: // emacs redo + if (record->event.pressed) { + return MACRO(D(LALT), D(LSFT), T(MINS), U(LSFT), U(LALT), END); + } + break; + case 18: // emacs previous buffer + if (record->event.pressed) { + return MACRO(D(LCTL), T(X), U(LCTL), T(LEFT), END); + } + break; + case 19: // emacs next buffer + if (record->event.pressed) { + return MACRO(D(LCTL), T(X), U(LCTL), T(RGHT), END); + } + break; + case 20: + if (record->event.pressed) { + SEND_STRING("good night"); + } + break; + case 22: // { }; + if (record->event.pressed) { + return MACRO(T(ENT), D(LSFT), T(LBRC), U(LSFT), T(ENT), + D(LSFT), T(RBRC), U(LSFT), T(SCLN), T(UP), + T(TAB), END); + } + break; + case 23: + if (record->event.pressed) { + SEND_STRING("template"); + } + break; + case 24: + if (record->event.pressed) { + SEND_STRING("typename"); + } + break; + case 25: + if (record->event.pressed) { + SEND_STRING("continue"); + return MACRO(T(SCLN), END); + } + break; + case 26: + if (record->event.pressed) { + SEND_STRING("break"); + return MACRO(T(SCLN), END); + } + break; + case 27: + if (record->event.pressed) { + SEND_STRING("const"); + } + break; + case 28: + if (record->event.pressed) { + SEND_STRING(":-)"); + } + break; + case 29: + if (record->event.pressed) { + SEND_STRING(":-("); + } + break; + case 30: // dazed + if (record->event.pressed) { + send_keystrokes(NK_DOWN, KC_LSFT, KC_8, KC_MINS, KC_8, NK_UP, KC_LSFT, KC_NO); + } + break; + case 31: // decaf + if (record->event.pressed) { + send_keystrokes(NK_DOWN, KC_LSFT, KC_C, KC_9, KC_MINS, KC_0, NK_UP, KC_LSFT, KC_NO); + } + break; + case 32: + if (record->event.pressed) { + SEND_STRING("operator"); + } + break; + case 33: + if (record->event.pressed) { + SEND_STRING("nullptr"); + } + break; + case 34: + if (record->event.pressed) { + SEND_STRING("extern"); + } + break; + case 35: + if (record->event.pressed) { + SEND_STRING("virtual"); + } + break; + case 36: // emacs font smaller + if (record->event.pressed) { + return MACRO(D(LCTL), T(X), T(EQL), U(LCTL), END); + } + break; + case 37: // emacs font bigger + if (record->event.pressed) { + return MACRO(D(LCTL), T(X), T(MINS), U(LCTL), END); + } + break; + case 38: + if (record->event.pressed) { + SEND_STRING("volatile"); + } + break; + } + return MACRO_NONE; +} + +LEADER_EXTERNS(); + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + LEADER_DICTIONARY() { + leading = false; + leader_end(); + + SEQ_TWO_KEYS(KC_G, KC_A) { + SEND_STRING("git add ."); + } + SEQ_TWO_KEYS(KC_G, KC_D) { + SEND_STRING("git diff"); + } + SEQ_THREE_KEYS(KC_G, KC_D, KC_S) { + SEND_STRING("git diff --staged"); + } + SEQ_TWO_KEYS(KC_G, KC_L) { + SEND_STRING("git log"); + } + SEQ_THREE_KEYS(KC_G, KC_L, KC_O) { + SEND_STRING("git log --oneline"); + } + SEQ_TWO_KEYS(KC_G, KC_F) { + SEND_STRING("git fetch"); + } + SEQ_TWO_KEYS(KC_G, KC_O) { + SEND_STRING("git checkout"); + } + SEQ_TWO_KEYS(KC_G, KC_P) { + SEND_STRING("git pull"); + } + SEQ_TWO_KEYS(KC_G, KC_S) { + SEND_STRING("git status"); + } + SEQ_TWO_KEYS(KC_G, KC_C) { + SEND_STRING("git commit -m ''"); + send_keystrokes(KC_LEFT, KC_NO); + } + SEQ_THREE_KEYS(KC_G, KC_C, KC_A) { + SEND_STRING("git commit --amend"); + } + + SEQ_TWO_KEYS(KC_C, KC_C) { + SEND_STRING("const_cast<>"); + send_keystrokes(KC_LEFT, KC_NO); + } + SEQ_TWO_KEYS(KC_C, KC_D) { + SEND_STRING("dynamic_cast<>"); + send_keystrokes(KC_LEFT, KC_NO); + } + SEQ_TWO_KEYS(KC_C, KC_R) { + SEND_STRING("reinterpret_cast<>"); + send_keystrokes(KC_LEFT, KC_NO); + } + SEQ_TWO_KEYS(KC_C, KC_S) { + SEND_STRING("static_cast<>"); + send_keystrokes(KC_LEFT, KC_NO); + } + + SEQ_ONE_KEY(KC_SLSH) { + send_keystrokes(KC_SLSH, NK_DOWN, KC_LSFT, KC_8, KC_8, NK_UP, KC_LSFT, KC_ENT, + NK_DOWN, KC_LSFT, KC_8, NK_UP, KC_LSFT, KC_ENT, + NK_DOWN, KC_LSFT, KC_8, NK_UP, KC_LSFT, KC_SLSH, KC_UP, KC_END, KC_SPC, + KC_NO); + } + } +} diff --git a/keyboards/ergodox/keymaps/albert/readme.md b/keyboards/ergodox/keymaps/albert/readme.md new file mode 100644 index 000000000..e20e047ac --- /dev/null +++ b/keyboards/ergodox/keymaps/albert/readme.md @@ -0,0 +1,188 @@ +# ErgoDox EZ Configuration for typing like a boss. + +This layout has 7 layers: +0. Base layers +1. Symbols and F-keys +2. Number pad (with hexadecimal) +3. Cursor keys +4. Mouse movement and clicks +5. Keyword macros +6. Emacs + +There are also some leader keys defined for frequently used commands (git etc). + +## The layers + +Double hashes (`##`) indicate transparent keys (`KC_TRNS`) and blanks indicate no key (`KC_NO`). + +### 0. Base layer + +``` +,--------------------------------------------------. ,--------------------------------------------------. +| ESC | 1 | 2 | 3 | 4 | 5 | SfLt | | SfRt | 6 | 7 | 8 | 9 | 0 | BkSp | +|--------|------|------|------|------|-------------| |------|------|------|------|------|------|--------| +| Tab | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | Del | +|--------|------|------|------|------|------| | | |------|------|------|------|------|--------| +| Caps/L2| A | S | D | F | G |------| |------| H | J | K | L | ; |Enter/L2| +|--------|------|------|------|------|------| L6 | | L6 |------|------|------|------|------|--------| +| LSft/( | Z | X | C | V/L3 | B/L4 | | | | N/L4 | M/L3 | , | . | / | RSft/) | +`--------|------|------|------|------|-------------' `-------------|------|------|------|------|--------' + |Ctrl/[| Alt/]| # | Left |Right | | Up | Down | - | Alt/[|Ctrl/]| + `----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | L2 | lead | | lead | Ins | + ,------|------|------| |------|------|------. + | Space| BkSp | Home | | PgUp | Enter|Space | + | / | / |------| |------| / | / | + | Ctrl | Alt |End/L5| |PDn/L5| Alt | Ctrl | + `--------------------' `--------------------' +``` + +Space Cadet shift is enabled. Ctrl and Alt doubles up as normal keys when tapped. +SfLt and SfRt sends Shift + left and Shift + Right respectively - for use with emacs with `windmove-default-keybindings`. +Caps and Enter may be held down to activate layer 2 (hexadecimal number pad). +Please see `matrix_scan_user` function in `keymap.c` for list of commands available via `lead` key. + +### 1. Symbols and F-keys + +``` +,--------------------------------------------------. ,--------------------------------------------------. +| ## | F1 | F2 | F3 | F4 | F5 | ## | | ## | F6 | F7 | F8 | F9 | F10 | F11 | +|--------|------|------|------|------|------|------| |------|------|------|------|------|------|--------| +| ## | ! | " | £ | $ | % | ## | | ## | - | + | = | @ | ~ | F12 | +|--------|------|------|------|------|------| | | |------|------|------|------|------|--------| +| ## | ^ | & | * | _ | # |------| |------| { | } | ; | ' | # | ## | +|--------|------|------|------|------|------| ## | | ## |------|------|------|------|------|--------| +| ## | \ | | | ` | - | / | | | | [ | ] | < | > | ? | ## | +`--------|------|------|------|------|-------------' `-------------|------|------|------|------|--------' + | ## | ## | ## | ## | ## | | ## | ## | ## | ## | ## | + `----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | ## | ## | | ## | ## | + ,------|------|------| |------|------|------. + | | | ## | | ## | | | + | ## | ## |------| |------| ## | ## | + | | | ## | | ## | | | + `--------------------' `--------------------' +``` + +### 2. Number pad (with hexadecimal) + +``` +,---------------------------------------------------. ,--------------------------------------------------. +| ## | A | B | C | D | E | F | | A | B | C | D | E | F | ## | +|---------|------|------|------|------|------|------| |------|------|------|------|------|------|--------| +| ## | * | 7 | 8 | 9 | * | 0x | | 0x | * | 7 | 8 | 9 | * | ## | +|---------|------|------|------|------|------| | | |------|------|------|------|------|--------| +| ## | / | 4 | 5 | 6 | / |------| |------| / | 4 | 5 | 6 | / | ## | +|---------|------|------|------|------|------| ## | | ## |------|------|------|------|------|--------| +| ## | - | 1 | 2 | 3 | - | | | | - | 1 | 2 | 3 | - | ## | +`---------|------|------|------|------|-------------' `-------------|------|------|------|------|--------' + | = | + | 0 | , | . | | 0 | , | . | + | = | + `-----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | ## | ## | | ## | ## | + ,------|------|------| |------|------|------. + | | | ## | | ## | | | + | ## | ## |------| |------| ## | ## | + | | | ## | | ## | | | + `--------------------' `--------------------' +``` + +### 3. Cursor keys + +``` +,---------------------------------------------------. ,--------------------------------------------------. +| | | | | | | | | | | | | | | | +|---------|------|------|------|------|------|------| |------|------|------|------|------|------|--------| +| | Home | | Up | | PgUp | | | | PgUp | | Up | | Home | | +|---------|------|------|------|------|------| | | |------|------|------|------|------|--------| +| | End | Left | Down | Right| PgDn |------| |------| PgDn | Left | Down | Right| End | | +|---------|------|------|------|------|------| | | |------|------|------|------|------|--------| +| ## | Up | | Down | ## | | | | | | ## | Down | | Up | ## | +`---------|------|------|------|------|-------------' `-------------|------|------|------|------|--------' + | Left | Down | Right| | | | | | Left | Down | Right| + `-----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | | | | | | + ,------|------|------| |------|------|------. + | | | | | | | | + | ## | ## |------| |------| ## | ## | + | | | | | | | | + `--------------------' `--------------------' +``` + +### 4. Mouse movement and clicks + +``` +,--------------------------------------------------. ,--------------------------------------------------. +| | | | | | | | | | | | | | | | +|--------|------|------|------|------|-------------| |------|------|------|------|------|------|--------| +| | | Lclk | MsUp | Rclk | | | | | | Lclk | MsUp | Rclk | | | +|--------|------|------|------|------|------| | | |------|------|------|------|------|--------| +| | |MsLeft|MsDown|MsRght| |------| |------| |MsLeft|MsDown|MsRght| | | +|--------|------|------|------|------|------| | | |------|------|------|------|------|--------| +| Lclk | MsUp | Rclk |MsDown| | ## | | | | ## | |MsDown| Lclk | MsUp | Rclk | +`--------|------|------|------|------|-------------' `-------------|------|------|------|------|--------' + |MsLeft|MsDown|MsRight | | | | |MsLeft|MsDown|MsRght| + `----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | | | | | | + ,------|------|------| |------|------|------. + | | | | | | | | + | | |------| |------| | | + | | | | | | | | + `--------------------' `--------------------' +``` + +### 5. Keyword macros + +``` +,---------------------------------------------------. ,--------------------------------------------------. +| | | | scarf| sadf | smily| | | | decaf| | | | | | +|---------|------|------|------|------|------|------| |------|------|------|------|------|------|--------| +| | const| volat| oper | ret | tmpl | | | | typen| cont | prv | pro | pub | | +|---------|------|------|------|------|------| | | |------|------|------|------|------|--------| +| | | str | obj | | gitl |------| |------| | | | nulp | | | +|---------|------|------|------|------|------| | | |------|------|------|------|------|--------| +| | | extr | cls | virt | break| | | |namesp| goodm| goodn| | | | +`---------|------|------|------|------|-------------' `-------------|------|------|------|------|--------' + | | | inc | | | | | | | | | + `-----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | | | | ecet | ecets| + ,------|------|------| |------|------|------. + | | | | | | | | + | | |------| |------| | | + | | | ## | | ## | | | + `--------------------' `--------------------' +``` +Please see `keymap.c` for the keywords/commands. +Some are const, volatile, operator, return, template, typename, continue, private, +protected, public, struct, class, extern, virtual, break, namespace. +Also a git log command I use a lot (`git log --oneline --graph --decorate=short` (I know git can be configured but that is boring)). + +### 6. Emacs + +``` +,---------------------------------------------------. ,--------------------------------------------------. +| | | | | | | empb | | emnb | emfs | emfb | | | | | +|---------|------|------|------|------|------|------| |------|------|------|------|------|------|--------| +| | emtr | | | | | | | | emun | emre | w-up | | | | +|---------|------|------|------|------|------| | | |------|------|------|------|------|--------| +| | | emwr | | | |------| |------| |w-left|w-down|w-rght| | | +|---------|------|------|------|------|------| ## | | ## |------|------|------|------|------|--------| +| | | | | | | | | | | |w-down| | | | +`---------|------|------|------|------|-------------' `-------------|------|------|------|------|--------' + | | | | | | | | | | | | + `-----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | | | | | | + ,------|------|------| |------|------|------. + | | | | | | | | + | | |------| |------| | | + | | | | | | | | + `--------------------' `--------------------' +``` +Some emacs shortcuts like toggle read/write mode (emtr), write file (emwr), previous-buffer (empb), +next-buffer (emnb), smaller font(emfs), larger font (emfb), undo (emun), redo (emre) and switching between windows in a frame. -- cgit v1.2.3 From cfc4149712217625fcb75e50348094fd9df432f5 Mon Sep 17 00:00:00 2001 From: Luke Silva Date: Fri, 27 Jan 2017 10:28:42 +1100 Subject: Add ability to use tap macros without using functions --- quantum/keymap_common.c | 5 ++++- quantum/quantum_keycodes.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index eced3d2bb..5190f24e8 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c @@ -80,7 +80,10 @@ action_t action_for_key(uint8_t layer, keypos_t key) action.code = keymap_function_id_to_action( (int)keycode & 0xFFF ); break; case QK_MACRO ... QK_MACRO_MAX: - action.code = ACTION_MACRO(keycode & 0xFF); + if (keycode & 0x800) // tap macros have upper bit set + action.code = ACTION_MACRO_TAP(keycode & 0xFF); + else + action.code = ACTION_MACRO(keycode & 0xFF); break; case QK_LAYER_TAP ... QK_LAYER_TAP_MAX: action.code = ACTION_LAYER_TAP_KEY((keycode >> 0x8) & 0xF, keycode & 0xFF); diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 4853655f9..4566395fd 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -246,6 +246,7 @@ enum quantum_keycodes { #define M(kc) (kc | QK_MACRO) +#define MACROTAP(kc) (kc | QK_MACRO | FUNC_TAP<<8) #define MACRODOWN(...) (record->event.pressed ? MACRO(__VA_ARGS__) : MACRO_NONE) // L-ayer, T-ap - 256 keycode max, 16 layer max -- cgit v1.2.3 From 13fa63b19223fea024fc6a395041ecc2419caa1d Mon Sep 17 00:00:00 2001 From: Brendan Johan Lee Date: Fri, 27 Jan 2017 13:53:02 +0100 Subject: [deadcyclo layout] Added more unicode keys and ibus unicode compose trigger keys --- .../deadcyclo/images/deadcyclo-base-layout.png | Bin 96046 -> 79488 bytes .../images/deadcyclo-layer-3-navigation.png | Bin 55517 -> 58886 bytes keyboards/ergodox/keymaps/deadcyclo/keymap.c | 42 ++++++++++----------- keyboards/ergodox/keymaps/deadcyclo/readme.md | 7 +++- 4 files changed, 26 insertions(+), 23 deletions(-) diff --git a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-base-layout.png b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-base-layout.png index a70e37559..2c03af581 100644 Binary files a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-base-layout.png and b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-base-layout.png differ diff --git a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png index e60c3e59e..c8c90cf5c 100644 Binary files a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png and b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png differ diff --git a/keyboards/ergodox/keymaps/deadcyclo/keymap.c b/keyboards/ergodox/keymaps/deadcyclo/keymap.c index 7578c723d..bfbf17be1 100644 --- a/keyboards/ergodox/keymaps/deadcyclo/keymap.c +++ b/keyboards/ergodox/keymaps/deadcyclo/keymap.c @@ -47,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * |Grv/L1| '" |AltShf| Lalt | Ralt | | Lalt | Ralt | [ | ] | ~/L1 | + * |Grv/L1| UNI |AltShf| Lalt | Ralt | | Lalt | Ralt | [ | UNI | ~/L1 | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | App | Home | | PgUp | Ins | @@ -65,7 +65,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LT(SYMB,KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), KC_LCTL, LT(MDIA, KC_A), KC_S, KC_D, KC_F, KC_G, KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), - LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_RALT,KC_LALT, + LT(SYMB,KC_GRV),LCTL(LSFT(KC_U)), LALT(KC_LSFT), KC_RALT,KC_LALT, ALT_T(KC_APP), KC_HOME, KC_END, KC_SPC,KC_TAB,KC_LBRC, @@ -74,12 +74,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, LT(SYMB, KC_BSLS), KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),CTL_T(KC_QUOT), MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_LALT, KC_RALT,KC_LBRC,KC_RBRC, LT(SYMB,KC_TILD), + KC_LALT, KC_RALT,KC_LBRC,LCTL(LSFT(KC_U)), LT(SYMB,KC_TILD), KC_PGUP, KC_INS, KC_PGDN, KC_RBRC,KC_BSPC, KC_ENT ), -/* Keymap 1: Symbol Layer +/* Keymap 1: Symbol Layer LCTL(LSFT(KC_U)) * * ,--------------------------------------------------. ,--------------------------------------------------. * | | F1 | F2 | F3 | F4 | F5 | F6 | | F6 | F7 | F8 | F9 | F10 | F11 | F12 | @@ -166,18 +166,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 3: Unicode * * ,--------------------------------------------------. ,--------------------------------------------------. - * | | VER | | | | | | | | | | | | | | + * | | ┌ | ┐ | └ | ┘ | │ | ─ | | ╔ | ╗ | ╚ | ╝ | ║ | ═ | | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | shrug| yay | hug | smile|smile2| | | | ■ | λ | → | ➙ | ▻ | | + * | | shrug| yay | hug | smile|smile2| | | | ■ | λ | → | ➙ | ▻ | █ | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | hmm1 | hmm2 | bear1| bear2| fuu |------| |------| ☺ | ☻ | ☹ | ♡ | ♥ | | + * | | hmm1 | hmm2 | bear1| bear2| fuu |------| |------| ☺ | ☻ | ☹ | ♡ | ♥ | ░ | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | eggy1| eggy2| face1| face2| uhu | | | | ❤ | | | | | | + * | | eggy1| eggy2| face1| face2| uhu | | | | ❤ | ☐ | ☑ | ☒ | ✓ | ▄ | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | smrk1| smrk2| love | | | | | | | | + * | | smrk1| smrk2| love | VER | | ✔ | ✗ | ✘ | ● | ▀ | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. - * | | | | | | + * | | | | ▒ | ▓ | * ,------|------|------| |------+------+------. * | | | | | | | | * | | |------| |------| | | @@ -186,23 +186,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // Unicode [NAVG] = KEYMAP( - KC_TRNS, VRSN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, UC(0x250c), UC(0x2510), UC(0x2514), UC(0x2518), UC(0x2502), UC(0x2500), KC_TRNS, SHRUG, YAY, HUG, SMILE, SMILE2, KC_TRNS, KC_TRNS, HMM1, HMM2, BEAR1, BEAR2, FUU, KC_TRNS, EGGY1, EGGY2, FACE1, FACE2, UHU, KC_TRNS, - KC_TRNS, SMRK1, SMRK2, LOVE, KC_TRNS, - KC_TRNS, KC_TRNS, + KC_TRNS, SMRK1, SMRK2, LOVE, VRSN, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, // right hand - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, UC(0x25a0), UC(0x03bb), UC(0x2192), UC(0x2799), UC(0x25bb), KC_TRNS, - UC(0x263a), UC(0x263b), UC(0x2639), UC(0x2661), UC(0x2665), KC_TRNS, - KC_TRNS, UC(0x2764), KC_TRNS, KC_MPRV, 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 + UC(0x2554), UC(0x2557), UC(0x255a), UC(0x255d), UC(0x2551), UC(0x2550), KC_TRNS, + KC_TRNS, UC(0x25a0), UC(0x03bb), UC(0x2192), UC(0x2799), UC(0x25bb), UC(0x2588), + UC(0x263a), UC(0x263b), UC(0x2639), UC(0x2661), UC(0x2665), UC(0x2591), + KC_TRNS, UC(0x2764), UC(0x2610), UC(0x2611), UC(0x2612), UC(0x2713), UC(0x2584), + UC(0x2714), UC(0x2717), UC(0x2718), UC(0x25cf), UC(0x2580), + UC(0x2592), UC(0x2593), + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS ), }; diff --git a/keyboards/ergodox/keymaps/deadcyclo/readme.md b/keyboards/ergodox/keymaps/deadcyclo/readme.md index 2ca5e822c..fa41f0ec1 100644 --- a/keyboards/ergodox/keymaps/deadcyclo/readme.md +++ b/keyboards/ergodox/keymaps/deadcyclo/readme.md @@ -28,6 +28,10 @@ TOG, are dual purpose. Hence for example the top left key produces ESC if tapped, and temporarilly toggles L3 when hold down. The two center L1 TOG keys toggle L1 on and off for more permanent layer toggling. +The UNI keys enter the linux ibus unicode composer mode +(ie. Ctrl+Shift+u). Use this to enter unicode characters. Hit the key, +type in the unicode hex value, and hit enter. + ## Layer 1 - Symbols and RGB [![Layer 1 - Symbols and RGB](images/deadcyclo-layer-1-symbols.png)](http://www.keyboard-layout-editor.com/#/gists/96714e198054c9115bafb5267cc6bc73) @@ -58,12 +62,11 @@ The unicode layer provides keys for directly typing unicode (utf-8) - 24.01.2017 Added support for Ergodox Shine. Added secondary L2 switch key on left hand - 24.01.2017 Added unicode keys. Added shrug hug and yay. Moved Navigation to layer 2 - 25.01.2017 Added lots of new emojis and some unicode keys +- 27.01.2017 Added new unicode keys and shortcut for ibus unicode composer key (CTRL+SHIFT+U) # TODO -- Add support for unicode by name? (See algernon layout for example) - Add macros for lots of stuff. (Lastpass cli, pushbullet cli, other push service cli, linode cli, more?) - Make macros for gnu screen and i3wm - Look into the app launch macros in algernon keymap -- Make other smileys like shrug and yay ¯\_(ツ)_/¯ and \o/ and others (see amon others [http://dongerlist.com](http://dongerlist.com) -- cgit v1.2.3 From 93c1bfa646bd4d53c065df1a1a7e457d49df7e31 Mon Sep 17 00:00:00 2001 From: lucwastiaux Date: Fri, 27 Jan 2017 23:55:33 +0800 Subject: dual capslock functionality, activating shell nav or brackets --- .../ergodox/keymaps/dvorak_programmer/keymap.c | 23 +++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c index 7ed0c7f12..6757355c8 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c +++ b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c @@ -35,7 +35,9 @@ #define SHELL_RECALL_LAST_ARG_REMOVE_FIRST_COMMAND 15 #define SEMICOLON_NEWLINE 16 #define END_NEWLINE 17 +#define DUAL_CAPSLOCK 18 +static uint16_t capslock_timer; const uint16_t PROGMEM fn_actions[] = { [1] = ACTION_LAYER_TAP_TOGGLE(KEY_NAV), // FN1 - keynav layer @@ -59,8 +61,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = KEYMAP( // layer 0 : default // left hand KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, - LT(SHELL_NAV,KC_TAB), KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, MO(KEY_SEL), - OSL(BRACKETS), KC_A, KC_O, KC_E, KC_U, KC_I, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, MO(KEY_SEL), + M(DUAL_CAPSLOCK), KC_A, KC_O, KC_E, KC_U, KC_I, OSM(MOD_LSFT), KC_SCLN, KC_Q, KC_J, KC_K, KC_X, MO(KEY_NAV), OSL(SHORTCUTS),KC_FN4, KC_FN5,OSL(SYMBOL),MO(NUMBER), // thumb cluster @@ -395,7 +397,22 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) if (record->event.pressed) { return MACRO( T(END), T(ENTER), END); } - break; + break; + case DUAL_CAPSLOCK: + if (record->event.pressed) { + if(timer_elapsed(capslock_timer) < 100) { + // activate SHELL_NAV + layer_on(SHELL_NAV); + } else { + layer_on(BRACKETS); + } + } else { + layer_off(SHELL_NAV); + layer_off(BRACKETS); + capslock_timer = timer_read(); + } + break; + } return MACRO_NONE; -- cgit v1.2.3 From 8c794d73fa75fa2f3f985617a2b566974f3b29bf Mon Sep 17 00:00:00 2001 From: folkert4 Date: Fri, 27 Jan 2017 13:51:39 -0500 Subject: Added Espynn's keymap --- keyboards/planck/keymaps/espynn/Makefile | 63 +++++ .../planck/keymaps/espynn/keyboard-layout.jpg | Bin 0 -> 52908 bytes keyboards/planck/keymaps/espynn/keymap.c | 151 ++++++++++++ keyboards/planck/keymaps/espynn/layout.json | 271 +++++++++++++++++++++ keyboards/planck/keymaps/espynn/readme.md | 18 ++ 5 files changed, 503 insertions(+) create mode 100644 keyboards/planck/keymaps/espynn/Makefile create mode 100644 keyboards/planck/keymaps/espynn/keyboard-layout.jpg create mode 100644 keyboards/planck/keymaps/espynn/keymap.c create mode 100644 keyboards/planck/keymaps/espynn/layout.json create mode 100644 keyboards/planck/keymaps/espynn/readme.md diff --git a/keyboards/planck/keymaps/espynn/Makefile b/keyboards/planck/keymaps/espynn/Makefile new file mode 100644 index 000000000..44a030ba3 --- /dev/null +++ b/keyboards/planck/keymaps/espynn/Makefile @@ -0,0 +1,63 @@ +#---------------------------------------------------------------------------- +# On command line: +# +# make all = Make software. +# +# make clean = Clean out built project files. +# +# make coff = Convert ELF to AVR COFF. +# +# make extcoff = Convert ELF to AVR Extended COFF. +# +# make program = Download the hex file to the device. +# Please customize your programmer settings(PROGRAM_CMD) +# +# make teensy = Download the hex file to the device, using teensy_loader_cli. +# (must have teensy_loader_cli installed). +# +# make dfu = Download the hex file to the device, using dfu-programmer (must +# have dfu-programmer installed). +# +# make flip = Download the hex file to the device, using Atmel FLIP (must +# have Atmel FLIP installed). +# +# make dfu-ee = Download the eeprom file to the device, using dfu-programmer +# (must have dfu-programmer installed). +# +# make flip-ee = Download the eeprom file to the device, using Atmel FLIP +# (must have Atmel FLIP installed). +# +# make debug = Start either simulavr or avarice as specified for debugging, +# with avr-gdb or avr-insight as the front end for debugging. +# +# make filename.s = Just compile filename.c into the assembler code only. +# +# make filename.i = Create a preprocessed source file for use in submitting +# bug reports to the GCC project. +# +# To rebuild project do "make clean" then "make all". +#---------------------------------------------------------------------------- + +# Build Options +# change to "no" to disable the options, or define them in the makefile.mk 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 = no # 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 = yes # 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. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/planck/keymaps/espynn/keyboard-layout.jpg b/keyboards/planck/keymaps/espynn/keyboard-layout.jpg new file mode 100644 index 000000000..55e5396bf Binary files /dev/null and b/keyboards/planck/keymaps/espynn/keyboard-layout.jpg differ diff --git a/keyboards/planck/keymaps/espynn/keymap.c b/keyboards/planck/keymaps/espynn/keymap.c new file mode 100644 index 000000000..4a3fe32b8 --- /dev/null +++ b/keyboards/planck/keymaps/espynn/keymap.c @@ -0,0 +1,151 @@ +#include "planck.h" +#include "action_layer.h" +#include "eeconfig.h" +#ifdef BACKLIGHT_ENABLE + #include "backlight.h" +#endif +#define PREVENT_STUCK_MODIFIERS +extern keymap_config_t keymap_config; + +// Symbolic names for macro IDs. +#define _QWERTY 0 // QUERTY layer +#define _LOWER 1 // Lower layer +#define _RAISE 2 // Raise layer +#define _CUSTOM 3 // Custom layer (LOWER + RAISE) +#define _BL 4 // Backlight +#define _CUS0 5 // Mobile# +#define _CUS1 6 // signature +#define _CUS2 7 // macro 2 +#define _CUS3 8 // macro 3 +#define _CUS4 9 // macro 4 +#define _CUS5 10 // email +#define _COPY 11 // copy +#define _PASTE 12 // paste +#define _CUT 13 // cut + +// Macro shortcuts. +#define QWERTY M(_LOWER) +#define LOWER M(_LOWER) +#define RAISE M(_RAISE) +#define CUSTOM M(_CUSTOM) +#define BL M(_BL) +#define CUS0 M(_CUS0) +#define CUS1 M(_CUS1) +#define CUS2 M(_CUS2) +#define CUS3 M(_CUS3) +#define CUS4 M(_CUS4) +#define CUS5 M(_CUS5) +#define COPY M(_COPY) +#define PASTE M(_PASTE) +#define CUT M(_CUT) + +// Func macro definitions. +#define LWR_PGDN FUNC(0) // Tap for PgDn, hold for LOWER +#define RSE_PGUP FUNC(1) // Tap for PgUp, hold for RAISE +#define CTL_CAPS FUNC(2) // Tap for Caps, hold for Ctrl (DOESN'T SEEM TO WORK) +#define SFT_ENT FUNC(3) // Tap for Enter, hold for Shift +#define ZM_NRM FUNC(4) // Zoom normal +#define ZM_IN FUNC(5) // Zoom out +#define ZM_OUT FUNC(6) // Zoom in + +// Enable these functions using FUNC(n) macro. +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_TAP_KEY(_LOWER, KC_PGDN), + [1] = ACTION_LAYER_TAP_KEY(_RAISE, KC_PGUP), + [2] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_CAPS), + [3] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), + [4] = ACTION_MODS_KEY(MOD_LCTL, KC_0), + [5] = ACTION_MODS_KEY(MOD_LCTL, KC_MINS), + [6] = ACTION_MODS_KEY(MOD_LCTL, KC_PLUS), + [7] = ACTION_MODS_KEY(MOD_LCTL, KC_UNDS), + }; + +// This config can be found at Keyboard layout editor site: http://goo.gl/zjXL2l +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_QWERTY] = { /* QWERTY */ + {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, + {KC_DEL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT}, + {KC_LCTL, KC_ESC, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, +[_LOWER] = { /* LOWER */ + {KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LPRN, KC_RPRN, KC_LCBR, KC_RCBR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_QUOT, KC_DQT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, + {KC_TRNS, ZM_NRM, ZM_IN, ZM_OUT, KC_TRNS, KC_PGDN, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} +}, +[_RAISE] = { /* RAISE */ + {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LCBR, KC_LCBR, KC_BSLS, KC_TRNS}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_PIPE, KC_GRV, KC_TILD, KC_LBRC, KC_LBRC, KC_TRNS, KC_TRNS}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGUP, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} +}, +[_CUSTOM] = { /* CUSTOM */ + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, CUS4, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, CUS0, CUS3, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, + {KC_TRNS, KC_TRNS, CUT, COPY, PASTE, CUS1, CUS5, CUS2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, + {BL, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} +} +}; + +// Set a layer persistantly. +void persistant_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +// Macro actions for each corresponding ID. +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + switch(id) { + case _RAISE: // Raised layer. + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _CUSTOM); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _CUSTOM); + } + break; + case _LOWER: // Lowered layer. + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _CUSTOM); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _CUSTOM); + } + break; + case _BL: // Backlight + if (record->event.pressed) { + register_code(KC_RSFT); +#ifdef BACKLIGHT_ENABLE + backlight_step(); +#endif + } else { + unregister_code(KC_RSFT); + } + break; + case _CUS0: // enter your mobile# here + return MACRODOWN(T(9), T(9), T(9), T(MINS),T(9), T(9), T(9), T(MINS),T(9), T(9), T(9), T(9),END); + case _CUS1: // signature line for email + return MACRODOWN(T(ENT), T(ENT), T(MINS), T(J), T(W), END); + case _CUS2: // Custom macro 2 + return MACRODOWN( DOWN(KC_LSFT), TYPE(KC_L), UP(KC_LSFT), END ); + case _CUS3: // custom macro 3 + return MACRODOWN( DOWN(KC_LSFT), TYPE(KC_F), UP(KC_LSFT), END ); + case _CUS4: // custom macro 4 + return MACRODOWN( DOWN(KC_LSFT), TYPE(KC_I), UP(KC_LSFT), END ); + case _CUS5: // Enter your email here + return MACRODOWN( TYPE(KC_F), + DOWN(KC_LSFT), TYPE(KC_2), UP(KC_LSFT), + TYPE(KC_G), TYPE(KC_M), TYPE(KC_A), TYPE(KC_I), TYPE(KC_L), TYPE(KC_DOT), TYPE(KC_C), TYPE(KC_O), TYPE(KC_M), END ); + case _CUT: //cut macro + return MACRODOWN( DOWN(KC_LCTL), TYPE(KC_X), UP(KC_LCTL), END ); + case _COPY: // copy macro + return MACRODOWN( DOWN(KC_LCTL), TYPE(KC_C), UP(KC_LCTL), END ); + case _PASTE: // paste macro + return MACRODOWN( DOWN(KC_LCTL), TYPE(KC_V), UP(KC_LCTL), END ); + }; + return MACRO_NONE; +} \ No newline at end of file diff --git a/keyboards/planck/keymaps/espynn/layout.json b/keyboards/planck/keymaps/espynn/layout.json new file mode 100644 index 000000000..38ccc3452 --- /dev/null +++ b/keyboards/planck/keymaps/espynn/layout.json @@ -0,0 +1,271 @@ +[ + { + "backcolor": "#858585", + "name": "Planck 40%", + "author": "James Folkert", + "background": { + "name": "Aluminium brushed", + "style": "background-image: url('/bg/metal/aluminum_texture1642.jpg');" + }, + "switchMount": "cherry", + "switchBrand": "cherry", + "switchType": "MX1A-A1xx", + "pcb": true, + "plate": true + }, + [ + { + "fa": [ + 2, + 2, + 0, + 2 + ] + }, + "F1\n1\n\n!\n\n\n\n\n\n", + "F2\n2\n\n@\n\n\n\n\n\nQ", + "F3\n3\n\n#\n\n\n\n\n\nW", + "F4\n4\n\n$\n\n\n\n\n\nE", + "F5\n5\n\n%\n\n\n\n\n\nR", + "F6\n6\n\n^\n\n\n\n\n\nT", + "F7\n6\n\n&\n\n\n\n\n\nY", + "F8\n8\n\n*\nMacro4\n\n\n\n\nU", + "F9\n9\n\n(\n\n\n\n\n\nI", + { + "fa": [ + 0, + 0, + 0, + 2 + ] + }, + "F10\n0\n\n)\n\n\n\n\n\nO", + { + "fa": [ + 2, + 2, + 0, + 2 + ] + }, + "F11\n-\n\n_\n\n\n\n\n\nP", + "F12\n=\n\n+\n\n\n\n\n\n" + ], + [ + { + "a": 7, + "f": 3 + }, + "", + { + "f": 3 + }, + "A", + { + "f": 3 + }, + "S", + { + "f": 3 + }, + "D", + { + "t": "#ff0000", + "a": 4, + "f": 3 + }, + "\n(\n\n\n\n\n\n\n\nF", + { + "t": "#000000", + "f": 3 + }, + "\n)\n\n\n\n\n\n\n\nG", + { + "f": 3 + }, + "\n{\n\n\nMacro0\n\n\n\n\nH", + { + "t": "#ff0000", + "f": 3 + }, + "\n}\n\n\nMacro3\n\n\n\n\nJ", + { + "t": "#000000", + "f": 3 + }, + "{\n\n\n\n\n\n\n\n\nK", + { + "f": 3 + }, + "{\n\n\n\n\n\n\n\n\nL", + { + "fa": [ + 2, + 2, + 2, + 2, + 0, + 0, + 0, + 2 + ] + }, + "\\\n\n|\n\n\n\n\n:\n\n;", + { + "a": 7, + "fa": [ + 9 + ] + }, + "" + ], + [ + { + "f": 3 + }, + "Shift", + { + "f": 3 + }, + "Z", + { + "f": 3 + }, + "X\n\n\n\nCut", + { + "f": 3 + }, + "C\n\n\n\nCopy", + { + "a": 4, + "fa": [ + 2, + 2, + 2, + 2 + ] + }, + "\\\n[\n|\n{\nPaste\n\n\n\n\nV", + "|\n]\n\n}\nMacro1\n\n\n\n\nB", + "`\n'\n~\n\"\nMacro5\n\n\n\n\nN", + "~\n\"\n\n\nMacro2\n\n\n\n\nM", + { + "fa": [ + 2, + 2, + 2, + 2, + 0, + 0, + 0, + 1 + ] + }, + "[\n\n{\n\n\n\n\n<\n\n,", + "[\n\n{\n\n\n\n\n\n\n.", + { + "a": 6 + }, + "\n\n?\n\n\n\n\n\n/", + { + "a": 4, + "fa": [ + 2, + 2, + 2, + 0, + 0, + 0, + 0, + 1, + 9, + 0 + ] + }, + "\n\n\nShift\n\n\n\n\n\n\nShift" + ], + [ + { + "a": 7, + "f": 3 + }, + "Ctrl\n\n\n\nBLight", + { + "a": 4, + "fa": [ + 2, + 1, + 2, + 0, + 0, + 0, + 0, + 1, + 9, + 9 + ] + }, + "\nZNorm\n\n\nRESET\n\n\n\n\n", + { + "fa": [ + 2, + 1, + 2, + 0, + 0, + 0, + 0, + 1, + 9, + 6 + ] + }, + "\nZIn\n\n\n\n\n\n\n\n", + { + "fa": [ + 2, + 1, + 2, + 0, + 0, + 0, + 0, + 1, + 9, + 9 + ] + }, + "\nZOut\n\n\n\n\n\n\n\n", + { + "a": 7, + "fa": [ + 9 + ] + }, + "⇓", + { + "a": 4, + "fa": [ + 9, + 5, + 5 + ], + "w": 2 + }, + "\n\n", + { + "a": 7 + }, + "⇑", + { + "a": 4, + "fa": [ + 2 + ] + }, + "\n\n\n\n\n\n\n\n\n←", + "\n\n\n\n\n\n\n\n\n↓", + "\n\n\n\n\n\n\n\n\n↑", + "\n\n\n\n\n\n\n\n\n→" + ] +] \ No newline at end of file diff --git a/keyboards/planck/keymaps/espynn/readme.md b/keyboards/planck/keymaps/espynn/readme.md new file mode 100644 index 000000000..8882f4601 --- /dev/null +++ b/keyboards/planck/keymaps/espynn/readme.md @@ -0,0 +1,18 @@ +# Espynn's keymap for Planck Ortholinear 40% Mechanical Keyboard +Created by James Folkert: https://twitter.com/trekloFsemaJ +Added several custom functions to the keymap from the "ab" map. Special thanks to "mollat" for demonstration of macros in their keymap.c + + +![Layout](keyboard-layout.png "Practical Keymap") + + +* Online keyboard layout editor: http://www.keyboard-layout-editor.com/ +* [JSON of raw layout] (layout.json "JSON of raw layout") + +# Notes +* Simultaneous RAISE+LOWER enters CUSTOM layer. Several custom keymaps are here +* I disregarded the advice of Jack and used macros for passwords. I accept my fate. These have been abstracted to macros 2, 3, and 4 +* add your mobile and email to the keymap before make +* RAISE and LOWER also acts as PgUp and PgDn when tapped. +* [CapsLock] also acts as [Ctrl] key when you press and hold. It is convenient for GNU Emacs users. (not sure if this works) +* Bracket/ paran/ brace keys are placed in the center of the keyboard for programmer's convenience. \ No newline at end of file -- cgit v1.2.3 From 2fe18a50ecddd5b8a8783f7185ad48b2e80d6bc0 Mon Sep 17 00:00:00 2001 From: Potiguar Faga Date: Fri, 27 Jan 2017 18:22:44 -0200 Subject: Clarify license on abnt2 keymap (#1038) --- quantum/keymap_extras/keymap_br_abnt2.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/quantum/keymap_extras/keymap_br_abnt2.h b/quantum/keymap_extras/keymap_br_abnt2.h index 0df177721..b001139dd 100644 --- a/quantum/keymap_extras/keymap_br_abnt2.h +++ b/quantum/keymap_extras/keymap_br_abnt2.h @@ -1,3 +1,19 @@ +/* Copyright 2017 Potiguar Faga + * + * 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 KEYMAP_BR_ABNT2_H #define KEYMAP_BR_ABNT2_H -- cgit v1.2.3 From cb2d4fb80b54f4d0f47e581cb2023b70478dccc4 Mon Sep 17 00:00:00 2001 From: milestogo Date: Fri, 27 Jan 2017 16:45:18 -0800 Subject: split kinesis layout into ergodox and planck style symbol layers --- keyboards/kinesis/keymaps/milestogo/keymap.c | 205 +++++++++++++++++---------- 1 file changed, 129 insertions(+), 76 deletions(-) diff --git a/keyboards/kinesis/keymaps/milestogo/keymap.c b/keyboards/kinesis/keymaps/milestogo/keymap.c index c2635eefe..bf1f9c591 100644 --- a/keyboards/kinesis/keymaps/milestogo/keymap.c +++ b/keyboards/kinesis/keymaps/milestogo/keymap.c @@ -6,8 +6,11 @@ #define _SYMB 1// Symbol layer #define _MOUSE 2// #define _TRANS 3// +#define _SYMB2 4// old symbol level, more ergodox like - +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO /* Macros */ enum { @@ -20,44 +23,44 @@ enum { }; -// Why so many gui keys, why not just map all the OS X stuff to buttons? Good question. +// Train out of using uncomfortable esc and GUI keys. /**************************************************************************************************** * * Keymap: Default Layer in Qwerty * * ,-------------------------------------------------------------------------------------------------------------------. -* | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F8 | F9 | F10 | F12 | FN0 | FN1 | FN2 | | bOOT | +* | no | F1 | F2 | F3 | F4 | F5 | F6 | F8 | F9 | F10 | F12 | FN0 | FN1 | FN2 | | bOOT | * |--------+------+------+------+------+------+---------------------------+------+------+------+------+------+--------| -* | =+ | 1! | 2@ | 3# | 4$ | 5% | | 6^ | 7& | 8* | 9( | 0) | -_ | +* | `~ | 1! | 2@ | 3# | 4$ | 5% | | 6^ | 7& | 8* | 9( | 0) | -_ | * |--------+------+------+------+------+------| +------+------+------+------+------+--------| * | Tab | Q | W | E | R | T | | Y | U | I | O | P | \| | * |--------+------+------+------+------+------| |------+------+------+------+------+--------| * |MouseFN0| A | S | D | F | G | | H | J | K | L | ;: | '" | * |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | Shift | Z | X | C | V | B | | N | M | ,. | .> | /? | Shift | +* | Shift | Z | X | C | V | B | | N | M | ,< | .> | /? | Shift | * `--------+------+------+------+------+------- `------+------+------+------+------+--------' * | ~` | ESC |GUI/L |L1/RT | | L1/UP|GUI/DN| [{ | ]} | * `---------------------------' `---------------------------' * ,-------------. ,-------------. -* | CTRL | GUI | | ALT | GUI | +* | CTRL | ALT | | ALT | GUI | * ,------|------|------| |------+------+------. -* | | | Home | | PgUp | | | -* | BkSp | Del |------| |------|Return| Space| -* | | | End | | PgDn | | | +* | | | Del | | PgUp | | | +* | BkSp | BkSp |------| |------|Return| Space| +* | | | FN0 | | PgDn | | | * `--------------------' `--------------------' */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = KEYMAP( - KC_ESC, KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_F6 ,KC_F7 ,KC_F8, - KC_EQL, KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , + XXXXXXX, KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_F6 ,KC_F7 ,KC_F8, + KC_GRAVE, KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_TAB, KC_Q ,KC_W ,KC_E ,KC_R ,KC_T , KC_FN0 ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G , KC_LSFT,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B , KC_GRAVE, KC_ESC, KC_FN4, KC_FN5, - KC_LCTL,KC_LGUI, - KC_HOME, - KC_BSPC,KC_DEL ,KC_FN0 , + KC_LCTL,KC_LALT, + KC_DEL, + KC_BSPC, KC_DEL ,KC_FN0 , KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 ,KC_FN0 ,KC_FN1 ,KC_FN2, KC_NO, RESET, KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_MINS, KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_BSLS, @@ -68,52 +71,102 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_PGUP, KC_PGDN,KC_ENTER ,KC_SPC ), + + +/* _SYMB level, more planck like. Much work to make sequences into multi-finger rolls. eg ([1,0]), !=0 +* Also sorted by frequency / strength of finger. +* +* ,-------------------------------------------------------------------------------------------------------------------. +* | | | | | | | | | | | | | | | | | +* |--------+------+------+------+------+------+---------------------------+------+------+------+------+------+--------| +* | | | | | | | | | | | | | | +* |--------+------+------+------+------+------| +------+------+------+------+------+--------| +* | | ^ | { | } | @ | % | | & | [ | ( | ) | _ | \ | +* |--------+------+------+------+------+------| +------+------+------+------+------+--------| +* | | ! | # | 0 | = | ~ | | * | + | 1 | - | ] | ` | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | | 6 | 7 | 8 | 9 | pipe | | $ | 2 | 3 | 4 | 5 | | +* `--------+------+------+------+------+------- `------+------+------+------+------+--------' +* | | : |GUI/L |L1/RT | | L1/UP|GUI/DN| \ | | +* `---------------------------' `---------------------------' +* ,-------------. ,-------------. +* | CTRL | | | ALT | GUI | +* ,------|------|------| |------+------+------. +* | | | | | | | | +* | Cut | Paste|------| |------| | | +* | | |Reset | | | | | +* `--------------------' `--------------------' +*/ + -/* _SYMBol level + +[_SYMB] = KEYMAP( + _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, KC_CIRC, KC_LCBR, KC_RCBR, KC_AT, KC_PERC, + _______, KC_EXLM, KC_HASH, KC_0, KC_EQL, KC_TILD, + _______, KC_6, KC_7, KC_8, KC_9, KC_PIPE, + _______, KC_COLON, KC_FN4, KC_FN5, + _______, _______, + _______, + _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, KC_FN0, KC_2, + _______, _______, _______, _______, _______, _______, + KC_AMPR, KC_LBRC, KC_LPRN, KC_RPRN, KC_UNDS, _______, + KC_ASTR, KC_PLUS, KC_1, KC_MINS, KC_RBRC, KC_GRV, + KC_DLR, KC_2, KC_3, KC_4, KC_5, XXXXXXX, + KC_FN6, KC_FN7, KC_BSLS, XXXXXXX, + _______, _______, + _______, + _______, _______, _______ + ), + + +/* _SYMB2ol level, more ergodox like * * ,-------------------------------------------------------------------------------------------------------------------. -* | | | | | | | | | | | | | | | | bOOT | +* | | | | | | | | | | | | | | | | | * |--------+------+------+------+------+------+---------------------------+------+------+------+------+------+--------| * | | | * | # | | | | | | | | | | * |--------+------+------+------+------+------| +------+------+------+------+------+--------| -* | | / | [ | ] | | | | | | | | | | +* | | / | < | > | | | | | | + | * | | | * |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | | | { | } | | | | | | | | | | +* | | | { | } | | | | | | = | - | | | * |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | | = | ( | ) | | | | | | | | | | +* | | = | ( | ) | | | | | | | | | | | * `--------+------+------+------+------+------- `------+------+------+------+------+--------' -* | | |GUI/L |L1/RT | | L1/UP|GUI/DN| { | } | +* | | |GUI/L |L1/RT | | L1/UP|GUI/DN| { | } | * `---------------------------' `---------------------------' * ,-------------. ,-------------. -* | CTRL | GUI | | ALT | GUI | +* | CTRL | | | ALT | GUI | * ,------|------|------| |------+------+------. -* | | | Home | | PgUp | | | +* | | | | | | | | * | BkSp | Del |------| |------|Mouse1|Mouse2| -* | | | End | | PgDn |LClick|Rclick| +* | | |Reset | | |LClick|Rclick| * `--------------------' `--------------------' */ -[_SYMB] = KEYMAP( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_ASTR, KC_HASH, KC_TRNS, KC_TRNS, - KC_TRNS, KC_SLSH, KC_LBRC, KC_RBRC, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, RSFT(KC_LBRC), RSFT(KC_RBRC), KC_TRNS, KC_TRNS, - KC_TRNS, KC_EQL, RSFT(KC_9), RSFT(KC_0), KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_FN4, KC_FN5, - 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_FN0, KC_2, - 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, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_FN6, KC_FN7, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS +[_SYMB2] = KEYMAP( + _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_ASTR, KC_HASH, _______, _______, + _______, KC_SLSH, RSFT(KC_COMM), RSFT(KC_DOT), _______, _______, + _______, _______, RSFT(KC_LBRC), RSFT(KC_RBRC), _______, _______, + _______, KC_EQL, RSFT(KC_9), RSFT(KC_0), _______, _______, + _______, _______, KC_FN4, KC_FN5, + _______, _______, + _______, + _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, KC_FN0, KC_2, + _______, _______, _______, KC_ASTR, _______, _______, + _______, _______, KC_PLUS, KC_MINS, _______, _______, + _______, _______, KC_EQL, KC_PIPE, _______, _______, + _______, _______, _______, _______, _______, _______, + KC_FN6, KC_FN7, _______, _______, + _______, _______, + _______, + _______, _______, _______ ), /* Keymap: Movement and function layer * @@ -122,11 +175,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------+---------------------------+------+------+------+------+------+--------| * | =+ | ! | @ | # | $ | % | | ^ | & | * | ( | ) |MS Fast | * |--------+------+------+------+------+------| +------+------+------+------+------+--------| -* | Tab | | | Up | |PgUp | | MwU |MS_UL | MS_U |MS_UR | | Ms Norm| +* | Tab | | | | |PgUp | | MwU |MS_UL | MS_U |MS_UR | | Ms Norm| * |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* |MouseFN1| C^A | Left | Down |Right | C^E | | | MS_L |Mouse1| MS_R | |MS Slow | +* |MouseFN1|GUI_V |GUI X |GUI C |GUI_V | | | | MS_L |Mouse1| MS_R | |MS Slow | * |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | | GuiZ | GUI X| GUI C| GUI_V|PgDown| | MWD | MDown|MS Dwn|MS_DR | ? | | +* | | | | | |PgDown| | MWD | MDown|MS Dwn|MS_DR | ? | | * `--------+------+------+------+------+------- `------+------+------+------+------+--------' * | `~ | ESC | | | | | | { | } | * `---------------------------' `---------------------------' @@ -141,24 +194,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_MOUSE] = KEYMAP( - KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_EXLM ,KC_AT, KC_HASH, KC_DLR ,KC_PERC , - KC_TRNS, KC_NO, KC_NO, KC_UP, KC_NO, KC_PGUP, - KC_FN1, LCTL(KC_A),KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_E), - KC_TRNS, LGUI(KC_Z),LGUI(KC_X),LGUI(KC_C),LGUI(KC_V),KC_PGDN, - KC_TRNS, KC_TRNS, KC_NO, KC_NO, - 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_FN0,RESET, + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_EXLM ,KC_AT, KC_HASH, KC_DLR ,KC_PERC , + _______, KC_NO, KC_NO, KC_UP, KC_NO, KC_PGUP, + KC_FN1, LGUI(KC_Z),LGUI(KC_X),LGUI(KC_C),LGUI(KC_V), KC_NO, + _______, KC_NO, KC_NO, KC_UP, KC_NO, KC_PGDN, + _______, _______, KC_NO, KC_NO, + _______, _______, + _______, + _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_FN0,RESET, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_ACL2, KC_WH_U, M(A_MUL), KC_MS_U, M(A_MUR), KC_NO, KC_ACL1, KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, KC_ACL0, KC_WH_D, M(A_MDL), KC_MS_D, M(A_MDR), RSFT(KC_LBRC), RSFT(KC_RBRC), KC_LCBR, KC_RCBR, KC_NO, KC_NO, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_BTN1, KC_BTN2 + _______, _______, + _______, + _______, KC_BTN1, KC_BTN2 ), @@ -190,24 +243,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_TRANS] = 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, - 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_FN10, KC_FN11, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_FN0, KC_2, - 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, 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, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS + _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_FN0, KC_2, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______ ), -- cgit v1.2.3 From a1c53d0f9356fa711ed0ffaaf61b564c8521a761 Mon Sep 17 00:00:00 2001 From: lucwastiaux Date: Sat, 28 Jan 2017 09:42:55 +0800 Subject: documented dual mode capslock --- .../ergodox/keymaps/dvorak_programmer/README.md | 4 +++- .../ergodox/keymaps/dvorak_programmer/keymap.c | 26 ---------------------- 2 files changed, 3 insertions(+), 27 deletions(-) diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/README.md b/keyboards/ergodox/keymaps/dvorak_programmer/README.md index 54da74f7f..09f30c04f 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/README.md +++ b/keyboards/ergodox/keymaps/dvorak_programmer/README.md @@ -7,7 +7,6 @@ Layers ------ * BASE: this is where you type. -* SHELL_LAYER: this is a permanent layer which I use when I don't need the F keys and gives me bash shortcuts on the top row. * SHELL_NAV: hold down the Tab key to access shell/terminal navigation shorcuts such as forward/backward word, history, Ctrl+C, screen tab movement. * KEY_NAV: arrow key movement with backward/forward word support, and copy/paste. * KEY_SEL: same as above, but every movement shift-selects. @@ -20,6 +19,9 @@ Layers Updates ------- +2017/01/28: +* Made the capslock key a dual momentary layer activation for BRACKETS and SHELL_NAV. One keypress held down for BRACKETS, one keypress, released and then held down for SHELL_NAV + 2017/01/22: * Made brackets toggle an OSL on the left capslock * Added SHELL_LAYER diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c index 6757355c8..dd87bcb2c 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c +++ b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c @@ -6,7 +6,6 @@ #include "action_code.h" #define BASE 0 // default layer -#define SHELL_LAYER 1 #define SHELL_NAV 2 #define KEY_NAV 3 // key navigation layer #define KEY_SEL 4 // key selection layer @@ -84,31 +83,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -// permanent shell layer - meant to be used while in a terminal. only the top keys are overriden -[SHELL_LAYER] = KEYMAP( - // left hand - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,LALT(KC_DOT),RCTL(KC_R),RCTL(KC_C), - 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,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, - // bottom row - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, - // thumb cluster - KC_TRNS,KC_TRNS, - KC_TRNS, - KC_TRNS,KC_TRNS,KC_TRNS, - // right hand - RCTL(KC_W), LALT(KC_B),LALT(KC_F), KC_LEFT, KC_RIGHT, LALT(KC_D), 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - // bottom row - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, - // thumb cluster - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS -), // shell navigation layer [SHELL_NAV] = KEYMAP( -- cgit v1.2.3 From f6feee8167bcffdeed7e816effd1c095b056965e Mon Sep 17 00:00:00 2001 From: lucwastiaux Date: Sat, 28 Jan 2017 09:45:13 +0800 Subject: eliminate references to shell_layer --- keyboards/ergodox/keymaps/dvorak_programmer/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c index dd87bcb2c..4a2ffcce4 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c +++ b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c @@ -250,7 +250,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { MEH(KC_S), MEH(KC_T), MEH(KC_U), MEH(KC_V), MEH(KC_X), MEH(KC_6), MEH(KC_7), MEH(KC_8), - MEH(KC_9), TO(BASE), TO(SHELL_LAYER) + MEH(KC_9), MEH(KC_Y), MEH(KC_Z) ), -- cgit v1.2.3 From 321904b8e38e35e7db8a19488ee96456f6393672 Mon Sep 17 00:00:00 2001 From: Stephen Tudor Date: Sat, 28 Jan 2017 01:37:59 -0500 Subject: Improve Planck keymap - added escape+shift mod-tap key - replaced BRITE with backtick --- keyboards/planck/keymaps/smt/keymap.c | 15 ++++++--------- keyboards/planck/keymaps/smt/readme.md | 29 +++++++++++++++++++++++++++-- 2 files changed, 33 insertions(+), 11 deletions(-) diff --git a/keyboards/planck/keymaps/smt/keymap.c b/keyboards/planck/keymaps/smt/keymap.c index 47e9d8c70..51e5a40bf 100644 --- a/keyboards/planck/keymaps/smt/keymap.c +++ b/keyboards/planck/keymaps/smt/keymap.c @@ -1,6 +1,3 @@ -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, -// this is the style you want to emulate. - #include "planck.h" #include "action_layer.h" #ifdef AUDIO_ENABLE @@ -42,14 +39,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * | ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ [_DVORAK] = { - {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC}, - {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS}, - {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_T(KC_ENT)}, - {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} + {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC}, + {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS}, + {SFT_T(KC_ESC), KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_T(KC_ENT)}, + {ALL_T(KC_GRV), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} }, /* Qwerty @@ -60,7 +57,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * | ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ [_QWERTY] = { diff --git a/keyboards/planck/keymaps/smt/readme.md b/keyboards/planck/keymaps/smt/readme.md index 52d702df0..0e955a574 100644 --- a/keyboards/planck/keymaps/smt/readme.md +++ b/keyboards/planck/keymaps/smt/readme.md @@ -14,6 +14,16 @@ Notable differences from the default are: Thankfully, QMK supports [mod-tap](https://github.com/jackhumbert/qmk_firmware/wiki#fun-with-modifier-keys) keys, and this allows me to set the Enter key to send a modifier (MOD_LSFT) when held, and KC_ENT when tapped. Awesome! +3. Escape + + I am experimenting with using Left Shift as a mod-tap key for Escape, similar to how I use the Enter key. It's set up like this on my Minivan, so in the interest of consistency... + +4. Backtick + + I don't currently have LEDs on any of my keyboards, and even if I did, I don't think I would want their controls on a base layer. + + So, why use backtick in the lower left corner? I use it as my tmux prefix key, so I need to type it more frequently than most people. Putting it on the base layer works well for me. + ## Dvorak (default) ``` @@ -24,7 +34,7 @@ Notable differences from the default are: |------+------+------+------+------+------|------+------+------+------+------+------| | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | |------+------+------+------+------+------+------+------+------+------+------+------| -| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | +| ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | `-----------------------------------------------------------------------------------' ``` @@ -38,7 +48,7 @@ Notable differences from the default are: |------+------+------+------+------+------|------+------+------+------+------+------| | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | |------+------+------+------+------+------+------+------+------+------+------+------| -| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | +| ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | `-----------------------------------------------------------------------------------' ``` @@ -76,3 +86,18 @@ I haven't completely filled this layer, which leaves room for future mappings an `-----------------------------------------------------------------------------------' ``` +## Adjust (Lower + Raise) + +Utility layer. This is where I'd switch to Qwerty, or ~~fool around with~~ adjust the audio/music settings. + +``` +,-----------------------------------------------------------------------------------. +| | Reset| | | | | | | | | | Del | +|------+------+------+------+------+-------------+------+------+------+------+------| +| | | |Aud on|AudOff|AGnorm|AGswap|Dvorak|Qwerty| | | | +|------+------+------+------+------+------|------+------+------+------+------+------| +| |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | | | +`-----------------------------------------------------------------------------------' +``` -- cgit v1.2.3 From 7c24ecf580471f7b0d360dd115d6730adf6e59d8 Mon Sep 17 00:00:00 2001 From: Stephen Tudor Date: Sat, 28 Jan 2017 01:38:58 -0500 Subject: Carry over Planck updates to my Preonic keymap --- keyboards/preonic/keymaps/smt/keymap.c | 30 +++++++++++------------ keyboards/preonic/keymaps/smt/readme.md | 42 +++++++++++++++++++++++++++------ 2 files changed, 50 insertions(+), 22 deletions(-) diff --git a/keyboards/preonic/keymaps/smt/keymap.c b/keyboards/preonic/keymaps/smt/keymap.c index 5465d543a..ba05d9ad5 100644 --- a/keyboards/preonic/keymaps/smt/keymap.c +++ b/keyboards/preonic/keymaps/smt/keymap.c @@ -1,9 +1,9 @@ #include "preonic.h" #include "action_layer.h" -#include "eeconfig.h" #ifdef AUDIO_ENABLE #include "audio.h" #endif +#include "eeconfig.h" // 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. @@ -33,39 +33,39 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Tab | " | , | . | P | Y | F | G | C | R | L | / | + * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| * | Esc | A | O | E | U | I | D | H | T | N | S | - | * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * | ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ [_DVORAK] = { - {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_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH}, - {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS}, - {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_T(KC_ENT)}, - {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} + {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_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC}, + {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS}, + {SFT_T(KC_ESC), KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_T(KC_ENT)}, + {ALL_T(KC_GRV), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} }, /* Qwerty * ,-----------------------------------------------------------------------------------. * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| * | Esc | A | S | D | F | G | H | J | K | L | ; | " | * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * | ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ [_QWERTY] = { {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL}, + {_______, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, _______}, {_______, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, {_______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} @@ -98,9 +98,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+-------------+------+------+------+------+------| * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | | | | | | _ | + | { | } | | | + * | | | | | | | _ | ? | + | { | } | | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | | | - | = | [ | ] | \ | + * | | | | | | | - | / | = | [ | ] | \ | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' @@ -108,8 +108,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_RAISE] = { {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, - {_______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, - {_______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, + {_______, _______, _______, _______, _______, _______, KC_UNDS, KC_QUES, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, + {_______, _______, _______, _______, _______, _______, KC_MINS, KC_SLSH, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} }, diff --git a/keyboards/preonic/keymaps/smt/readme.md b/keyboards/preonic/keymaps/smt/readme.md index 2dcc1927f..393d9d3e3 100644 --- a/keyboards/preonic/keymaps/smt/readme.md +++ b/keyboards/preonic/keymaps/smt/readme.md @@ -12,7 +12,17 @@ Notable differences from the default are: I use both the left and right shift keys when I type. When I want to modify a key with shift, I hold shift with the hand opposite the one typing the key. In the default keymap, Enter is where shift would be on a standard keyboard layout. Oh, muscle memory. - Thankfully, QMK supports [mod-tap](https://github.com/qmk/qmk_firmware/wiki#fun-with-modifier-keys) keys, and this allows me to set the Enter key to send a modifier (MOD_LSFT) when held, and KC_ENT when tapped. Awesome! + Thankfully, QMK supports [mod-tap](https://github.com/jackhumbert/qmk_firmware/wiki#fun-with-modifier-keys) keys, and this allows me to set the Enter key to send a modifier (MOD_LSFT) when held, and KC_ENT when tapped. Awesome! + +3. Escape + + I am experimenting with using Left Shift as a mod-tap key for Escape, similar to how I use the Enter key. It's set up like this on my Minivan, so in the interest of consistency... + +4. Backtick + + I don't currently have LEDs on any of my keyboards, and even if I did, I don't think I would want their controls on a base layer. + + So, why use backtick in the lower left corner? I use it as my tmux prefix key, so I need to type it more frequently than most people. Putting it on the base layer works well for me. ## Dvorak (default) @@ -20,13 +30,13 @@ Notable differences from the default are: ,-----------------------------------------------------------------------------------. | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | |------+------+------+------+------+------+------+------+------+------+------+------| -| Tab | " | , | . | P | Y | F | G | C | R | L | / | +| Tab | " | , | . | P | Y | F | G | C | R | L | Bkps | |------+------+------+------+------+-------------+------+------+------+------+------| | Esc | A | O | E | U | I | D | H | T | N | S | - | |------+------+------+------+------+------|------+------+------+------+------+------| | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | |------+------+------+------+------+------+------+------+------+------+------+------| -| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | +| ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | `-----------------------------------------------------------------------------------' ``` @@ -36,13 +46,13 @@ Notable differences from the default are: ,-----------------------------------------------------------------------------------. | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | |------+------+------+------+------+------+------+------+------+------+------+------| -| Tab | Q | W | E | R | T | Y | U | I | O | P | Del | +| Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | |------+------+------+------+------+-------------+------+------+------+------+------| | Esc | A | S | D | F | G | H | J | K | L | ; | " | |------+------+------+------+------+------|------+------+------+------+------+------| | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | |------+------+------+------+------+------+------+------+------+------+------+------| -| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | +| ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | `-----------------------------------------------------------------------------------' ``` @@ -76,10 +86,28 @@ I haven't completely filled this layer, which leaves room for future mappings an |------+------+------+------+------+-------------+------+------+------+------+------| | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | |------+------+------+------+------+-------------+------+------+------+------+------| -| | | | | | | | _ | + | { | } | | | +| | | | | | | _ | ? | + | { | } | | | |------+------+------+------+------+------|------+------+------+------+------+------| -| | | | | | | | - | = | [ | ] | \ | +| | | | | | | - | / | = | [ | ] | \ | |------+------+------+------+------+------+------+------+------+------+------+------| | | | | | | | | Next | Vol- | Vol+ | Play | `-----------------------------------------------------------------------------------' ``` + +## Adjust (Lower + Raise) + +Utility layer. This is where I'd switch to Qwerty, or ~~fool around with~~ adjust the audio/music settings. + +``` +,-----------------------------------------------------------------------------------. +| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | Reset| | | | | | | | | | Del | +|------+------+------+------+------+-------------+------+------+------+------+------| +| | | |Aud on|AudOff|AGnorm|AGswap|Dvorak|Qwerty| | | | +|------+------+------+------+------+------|------+------+------+------+------+------| +| |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | | | +`-----------------------------------------------------------------------------------' +``` -- cgit v1.2.3 From a3357d078ee80123040679a357f63e93ff24c4c6 Mon Sep 17 00:00:00 2001 From: Luke Silva Date: Sat, 28 Jan 2017 18:42:35 +1100 Subject: Add support for various tapping macros A macro key can now be easily set to act as a modifier on hold, and press a shifted key when tapped. Or to switch layers when held, and again press a shifted key when tapped. Various other helper defines have been created which send macros when the key is pressed, released and tapped, cleaning up the action_get_macro function inside keymap definitions. The layer switching macros require a GCC extension - 'compound statements enclosed within parentheses'. The use of this extension is already present within the macro subsystem of this project, so its use in this commit should not cause any additional issues. MACRO_NONE had to be cast to a (macro_t*) to suppress compiler warnings within some tapping macros. --- quantum/quantum_keycodes.h | 1 + tmk_core/common/action_macro.h | 26 ++++++++++++++++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 4566395fd..e0d469561 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -249,6 +249,7 @@ enum quantum_keycodes { #define MACROTAP(kc) (kc | QK_MACRO | FUNC_TAP<<8) #define MACRODOWN(...) (record->event.pressed ? MACRO(__VA_ARGS__) : MACRO_NONE) + // L-ayer, T-ap - 256 keycode max, 16 layer max #define LT(layer, kc) (kc | QK_LAYER_TAP | ((layer & 0xF) << 8)) diff --git a/tmk_core/common/action_macro.h b/tmk_core/common/action_macro.h index aedc32ec6..f373f5068 100644 --- a/tmk_core/common/action_macro.h +++ b/tmk_core/common/action_macro.h @@ -20,11 +20,33 @@ along with this program. If not, see . #include "progmem.h" -#define MACRO_NONE 0 + +typedef uint8_t macro_t; + +#define MACRO_NONE (macro_t*)0 #define MACRO(...) ({ static const macro_t __m[] PROGMEM = { __VA_ARGS__ }; &__m[0]; }) #define MACRO_GET(p) pgm_read_byte(p) -typedef uint8_t macro_t; +// Sends press when the macro key is pressed, release when release, or tap_macro when the key has been tapped +#define MACRO_TAP_HOLD(record, press, release, tap_macro) ( ((record)->event.pressed) ? \ + ( ((record)->tap.count <= 0 || (record)->tap.interrupted) ? (press) : MACRO_NONE ) : \ + ( ((record)->tap.count > 0 && !((record)->tap.interrupted)) ? (tap_macro) : (release) ) ) + +// Holds down the modifier mod when the macro key is held, or sends macro instead when tapped +#define MACRO_TAP_HOLD_MOD(record, macro, mod) MACRO_TAP_HOLD(record, (MACRO(D(mod), END)), MACRO(U(mod), END), macro) + +// Holds down the modifier mod when the macro key is held, or pressed a shifted key when tapped (eg: shift+3 for #) +#define MACRO_TAP_SHFT_KEY_HOLD_MOD(record, key, mod) MACRO_TAP_HOLD_MOD(record, (MACRO(I(10), D(LSFT), T(key), U(LSFT), END)), mod) + + +// Momentary switch layer when held, sends macro if tapped +#define MACRO_TAP_HOLD_LAYER(record, macro, layer) ( ((record)->event.pressed) ? \ + ( ((record)->tap.count <= 0 || (record)->tap.interrupted) ? ({layer_on((layer)); MACRO_NONE; }) : MACRO_NONE ) : \ + ( ((record)->tap.count > 0 && !((record)->tap.interrupted)) ? (macro) : ({layer_off((layer)); MACRO_NONE; }) ) ) + +// Momentary switch layer when held, presses a shifted key when tapped (eg: shift+3 for #) +#define MACRO_TAP_SHFT_KEY_HOLD_LAYER(record, key, layer) MACRO_TAP_HOLD_LAYER(record, MACRO(I(10), D(LSFT), T(key), U(LSFT), END), layer) + #ifndef NO_ACTION_MACRO -- cgit v1.2.3 From 77e54e34e129a03e58c128171a7188978ec908b4 Mon Sep 17 00:00:00 2001 From: Luke Silva Date: Sat, 28 Jan 2017 18:43:41 +1100 Subject: Add luke keymap, as an example of the tapping macros --- keyboards/planck/keymaps/luke/Makefile | 25 +++ keyboards/planck/keymaps/luke/keymap.c | 355 ++++++++++++++++++++++++++++++++ keyboards/planck/keymaps/luke/readme.md | 2 + 3 files changed, 382 insertions(+) create mode 100644 keyboards/planck/keymaps/luke/Makefile create mode 100644 keyboards/planck/keymaps/luke/keymap.c create mode 100644 keyboards/planck/keymaps/luke/readme.md diff --git a/keyboards/planck/keymaps/luke/Makefile b/keyboards/planck/keymaps/luke/Makefile new file mode 100644 index 000000000..847686873 --- /dev/null +++ b/keyboards/planck/keymaps/luke/Makefile @@ -0,0 +1,25 @@ + + +# 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 = no # Console for debug(+400) +COMMAND_ENABLE = no # 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 = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = yes # 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. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/planck/keymaps/luke/keymap.c b/keyboards/planck/keymaps/luke/keymap.c new file mode 100644 index 000000000..26dcb451b --- /dev/null +++ b/keyboards/planck/keymaps/luke/keymap.c @@ -0,0 +1,355 @@ +/* + * A keyboard layout for the gridded planck. + * + * Copyright (C) 2017 Luke Silva + * + * 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + * + * This layout uses colemak by default, and is designed for programming, with easy access to symbols + * through either double purpose modifiers or colemak style rolling for commonly used symbol clusters + * Eg: compare colemak 'this' to '(){\n}' on the symbol layer. + * + * The layout also supports a range of multilingual characters, covering those + * needed for French, German, Swedish and likely some other European Languages. + * In the future full support for Colemak's multilingual deadkeys may be introduced. + * + * The multilingual characters are inputted through QMK's unicode engine, using + * the Linux input method by default, however this can be changed at runtime. + * + */ + + +#include "planck.h" + +#define _______ KC_TRNS +#define XXXXXXX KC_NO + + +// Layers +#define _COLEMAK 0 +#define _QWERTY 1 +#define _SYM 2 +#define _NUM 3 +#define _GR 4 +#define _GR_S 5 +#define _ADJ 6 +#define _NAV 7 +#define _PLOVER 8 + +// Macro ID numbers +#define M_ALT_HASH 1 +#define M_GR_DASH 2 +#define M_SYM_LPRN 3 +#define M_NAV_UNDS 4 +#define M_NUM_RPRN 5 +#define M_CTRL_DLR 6 +#define M_LCBR_ENT 7 +#define M_PLOVER 8 +#define M_EXT_PLV 9 +#define M_WINDOWS 10 +#define M_LINUX 11 +#define M_OSX 12 +#define M_FUNCTION 13 +#define M_THEN 14 +#define M_CATCH 15 + +// Macro keys +#define ALT_HASH MACROTAP(M_ALT_HASH) // tap for #, hold for Alt +#define GR_DASH MACROTAP(M_GR_DASH) // tap for -, hold for GR layer a-class-name +#define SYM_LPRN MACROTAP(M_SYM_LPRN) // tap for (, hold for symbols layer if() +#define NAV_UNDS MACROTAP(M_NAV_UNDS) // tap for _, hold for navigation layer snake_case_variable +#define NUM_RPRN MACROTAP(M_NUM_RPRN) // tap for ), hold for numbers layer else if() +#define CTRL_DLR MACROTAP(M_CTRL_DLR) // tap for $, hold for ctrl $php_is_really_weird +#define LCBR_ENT M(M_LCBR_ENT) // {\n easier code formatting +#define PLOVER M(M_PLOVER) // PHROPB (plover) or ERFVIK(qwerty) starts plover +#define EXT_PLV M(M_EXT_PLV) // PHRO*F (plover) or ERFVYU(qwerty) stops plover +#define WINDOWS M(M_WINDOWS) // Sets Unicode handler to windows +#define LINUX M(M_LINUX) // Sets Unicode handler to linux +#define OSX M(M_OSX) // Sets Unicode handler to OSX +#define FUNCTION M(M_FUNCTION) +#define THEN M(M_THEN) +#define CATCH M(M_CATCH) + + +// Renames of QMK keys... (would have otherwise been a macro) +#define QWERTY DF(_QWERTY) +#define COLEMAK DF(_COLEMAK) + + + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ;: | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Bksp | A | R | S | T | D | H | N | E | I | O | '" | + * |------+------+------+------+------+------+------+------+------+------+------+------`---. + * |Shift=| Z | X | C | V | B | K | M | ,< | .> | /? |Shift/Ent | + * |------+------+------+------+------+------+------+------+------+------+------+----------| + * |CtCaps|GUIF4 | Alt# | Gr- | Sym( | Nav_ |Space | Num) |Ctrl$ | F11 | F12 |Nav toggle| + * `---------------------------------------------------------------------------------------' + */ + +[_COLEMAK] = { + {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, + {KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, + {SFT_T(KC_EQL), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT) }, + {CTL_T(KC_CAPS), KC_LGUI, ALT_HASH, GR_DASH, SYM_LPRN, NAV_UNDS, KC_SPC, NUM_RPRN, CTRL_DLR, KC_F11, KC_F12, TG(_NAV)} +}, + + + +/* QWERTY + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Bksp | A | S | D | F | G | H | J | K | L | ;: | '" | + * |------+------+------+------+------+------+------+------+------+------+------+------`---. + * |Shift=| Z | X | C | V | B | N | M | ,< | .> | /? |Shift/Ent | + * |------+------+------+------+------+------+------+------+------+------+------+----------| + * |CtCaps|GUIF4 | Alt# | Gr- | Sym( | Nav_ |Space | Num) |Ctrl$ | F11 | F12 |Nav toggle| + * `---------------------------------------------------------------------------------------' + */ + +[_QWERTY] = { + {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, + {KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT) }, + {CTL_T(KC_CAPS), KC_LGUI, KC_LALT, GR_DASH, SYM_LPRN,KC_SPC, KC_SPC, NUM_RPRN, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT} +}, + + +/* Symbols + * ,-----------------------------------------------------------------------------------. + * | Tab | ` | @ | / | * | ^ | % | : | + | - | Del | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | [ | ; | } | ( | " | ' | ) | {\n | ! | ] | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Shift | . | { | < | > | ~ | X2 | = | & | | | ? |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | Sym | _ |Space | NUM | X2 | | | | + * `-----------------------------------------------------------------------------------' + */ + +[_SYM] = { + {KC_TAB, KC_GRV, KC_AT, KC_SLSH, KC_ASTR, KC_CIRC, KC_PERC, KC_COLN, KC_PLUS, KC_MINS, KC_DEL, KC_BSPC}, + {FUNCTION,KC_LBRC, KC_SCLN, KC_RCBR, KC_LPRN, KC_DQT, KC_QUOT, KC_RPRN, LCBR_ENT,KC_EXLM, KC_RBRC, KC_BSLS}, + {KC_LSFT, KC_DOT, KC_LCBR, KC_LABK, KC_RABK, KC_TILD, _______, KC_EQL, KC_AMPR, KC_PIPE, KC_QUES, KC_ENT }, + {THEN, CATCH, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, _______} +}, + + +/* Numbers + * ,-----------------------------------------------------------------------------------. + * | Tab | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Bksp | x | D | E | F | + | - | 4 | 5 | 6 | 0 |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Shift | ( | A | B | C | * | / | 1 | 2 | 3 | ) |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | GR | SYM | _ |Space | NUM | 0 | . | f | | + * `-----------------------------------------------------------------------------------' + */ + +[_NUM] = { + {KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, + {KC_BSPC, KC_X, S(KC_D), S(KC_E), S(KC_F), KC_PLUS, KC_MINS, KC_4, KC_5, KC_6, KC_0, KC_ENT }, + {KC_LSFT, KC_LPRN, S(KC_A), S(KC_B), S(KC_C), KC_ASTR, KC_SLSH, KC_1, KC_2, KC_3, KC_RPRN, KC_ENT }, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_0, KC_DOT, KC_F, _______} +}, + + +/* Gr layer / international keys + * ,-----------------------------------------------------------------------------------. + * | | ä | å | | ¢£ | €¥ | | ë | ê | ü | ù | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | â | à | ß | | | | è | é | ï | ö | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | æ | ô | ç | œ | | | û | « | » | î | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + +[_GR] = { + {_______, UC(0xE4),UC(0xE5), _______,UC(0xA2), UC(0x20AC),_______,UC(0xEB),UC(0xEA),UC(0xFC),UC(0xF9), _______}, + {_______, UC(0xE2),UC(0xE0),UC(0xDF), _______, _______, _______,UC(0xE8),UC(0xE9),UC(0xEF),UC(0xF6), _______}, + {MO(_GR_S),UC(0xE6),UC(0xF4),UC(0xE7),UC(0x153),_______, _______,UC(0xFB),UC(0xAB),UC(0xBB),UC(0xEE), MO(_GR_S)}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +}, + +// Shifted layer of the above +[_GR_S] = { + {_______, UC(0xC4),UC(0xC5), _______, UC(0xA3), UC(0xA5),_______, UC(0xCB),UC(0xCA),UC(0xDC),UC(0xD9),_______}, + {_______, UC(0xC2),UC(0xC0), UC(0xDF),_______, _______, _______, UC(0xC8),UC(0xC9),UC(0xCF),UC(0xD6),_______}, + {MO(_GR_S),UC(0xC6),UC(0xD4), UC(0xC7),UC(0x152),_______, _______, UC(0xDB),UC(0xAB),UC(0xBB),UC(0xCE),MO(_GR_S)}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +}, + + +/* Adjust Layer (Gr + Num) + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+-------------+------+------+------+------+------+------+------+------+------| + * | | |Prntscr| ESC |VOLUP | PLAY | PREV |QWERTY|COLEMAK|PLOVER| | | + * |------+-------------+------+------+------+------+------+------+------+------+------| + * | | |BACKLIT| INS |VOLDWN| MUTE | NEXT | WIND |LINUX | OSX | | | + * |------+-------------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + +[_ADJ] = { + {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 }, + {XXXXXXX, XXXXXXX, KC_PSCR, KC_ESC, KC_VOLU, KC_MPLY, KC_MPRV, QWERTY, COLEMAK, PLOVER, XXXXXXX, XXXXXXX}, + {XXXXXXX, XXXXXXX, BL_STEP, KC_INS, KC_VOLD, KC_MUTE, KC_MNXT, WINDOWS, LINUX, OSX, XXXXXXX, XXXXXXX}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +}, + + +/* Navigation + * ,-----------------------------------------------------------------------------------. + * | | | BTN3 | BTN2 | BTN1 | | ACL0 | HOME | PGDN | PGUP | END | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | |MSLEFT| MSDN | MSUP |MSRGHT| | ACL1 | LEFT | DOWN | UP | RGHT |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | |WHLEFT| WHDN | WHUP |WHRGHT| | ACL2 |C-LEFT|C-PGDN|C-PGUP|C-RGHT|Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | _ |Space | ACL0 | ACL1 | ACL2 | |TGLNAV| + * `-----------------------------------------------------------------------------------' + */ + +[_NAV] = { + {XXXXXXX, XXXXXXX, KC_BTN3, KC_BTN2, KC_BTN1, XXXXXXX, KC_ACL0, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_BSPC}, + {XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, KC_ACL1, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,KC_ENT }, + {XXXXXXX, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, XXXXXXX, KC_ACL2, LCTL(KC_LEFT), LCTL(KC_PGDN), LCTL(KC_PGUP), LCTL(KC_RIGHT), KC_ENT }, + {_______, _______, _______, _______, _______, _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______} +}, + +/* Plover Layer + * ,-----------------------------------------------------------------------------------. + * | | S | T | P | H | * | * | F | P | L | T | D | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |TogOut| S | K | W | R | * | * | R | B | G | S | Z | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | # | # | # | # | # | # | # | # | # | # | # | # | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Exit | | | # | A | O | E | U | | | | | + * `-----------------------------------------------------------------------------------' + */ + +[_PLOVER] = { + {XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC}, + {XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 }, + {EXT_PLV, XXXXXXX, XXXXXXX, KC_1, KC_C, KC_V, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX} +} + + +}; + +const uint16_t PROGMEM fn_actions[] = { +}; + + +void matrix_init_user(){ + set_unicode_input_mode(UC_LNX); +} + + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + switch(id) { + case M_ALT_HASH: + return MACRO_TAP_SHFT_KEY_HOLD_MOD(record, 3, LALT); + case M_GR_DASH: + { + const macro_t* macro = MACRO_TAP_HOLD_LAYER(record, MACRO(T(MINS)), _GR); + update_tri_layer(_NUM, _GR, _ADJ); + return macro; + } + case M_SYM_LPRN: + return MACRO_TAP_SHFT_KEY_HOLD_LAYER(record, 9, _SYM); + case M_NAV_UNDS: + return MACRO_TAP_SHFT_KEY_HOLD_LAYER(record, MINS, _NAV); + case M_NUM_RPRN: + { + const macro_t* macro = MACRO_TAP_SHFT_KEY_HOLD_LAYER(record, 0, _NUM); + update_tri_layer(_NUM, _GR, _ADJ); + return macro; + } + case M_CTRL_DLR: + return MACRO_TAP_SHFT_KEY_HOLD_MOD(record, 4, LCTL); + case M_LCBR_ENT: + return MACRODOWN(I(10), D(LSFT), T(LBRC), U(LSFT), T(ENT), END); + case M_PLOVER: + if (record->event.pressed) { + layer_and(0); + layer_on(_PLOVER); + default_layer_set(_PLOVER); + + // Starts plover + return MACRO(I(10), D(E), D(R), D(F), D(V), D(I), D(K), U(E), U(R), U(F), U(V), U(I), U(K), END); + } + break; + case M_EXT_PLV: + if (!record->event.pressed) { + layer_off(_PLOVER); + default_layer_set(_COLEMAK); + + //Pauses plover + return MACRO(I(10), D(E), D(R), D(F), D(V), D(Y), D(U), U(E), U(R), U(F), U(V), U(Y), U(U), END); + } + break; + case M_WINDOWS: + set_unicode_input_mode(UC_WIN); + break; + case M_LINUX: + set_unicode_input_mode(UC_LNX); + break; + case M_OSX: + set_unicode_input_mode(UC_OSX); + break; + case M_FUNCTION: + if (record->event.pressed) { + SEND_STRING("function"); + } + break; + case M_THEN: + if (record->event.pressed) { + SEND_STRING("then"); + } + break; + case M_CATCH: + if (record->event.pressed) { + SEND_STRING("catch"); + } + break; + } + return MACRO_NONE; +}; diff --git a/keyboards/planck/keymaps/luke/readme.md b/keyboards/planck/keymaps/luke/readme.md new file mode 100644 index 000000000..3a4824b5b --- /dev/null +++ b/keyboards/planck/keymaps/luke/readme.md @@ -0,0 +1,2 @@ +# A more basic Planck Layout for copying + -- cgit v1.2.3 From 1d9e0b0120d0467b6f7ff146911f01b7c701fb93 Mon Sep 17 00:00:00 2001 From: Stephen Tudor Date: Sat, 28 Jan 2017 20:54:34 -0500 Subject: s/Bkps/Bksp --- keyboards/preonic/keymaps/smt/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/preonic/keymaps/smt/readme.md b/keyboards/preonic/keymaps/smt/readme.md index 393d9d3e3..016da7b01 100644 --- a/keyboards/preonic/keymaps/smt/readme.md +++ b/keyboards/preonic/keymaps/smt/readme.md @@ -30,7 +30,7 @@ Notable differences from the default are: ,-----------------------------------------------------------------------------------. | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | |------+------+------+------+------+------+------+------+------+------+------+------| -| Tab | " | , | . | P | Y | F | G | C | R | L | Bkps | +| Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | |------+------+------+------+------+-------------+------+------+------+------+------| | Esc | A | O | E | U | I | D | H | T | N | S | - | |------+------+------+------+------+------|------+------+------+------+------+------| -- cgit v1.2.3 From 4eafa8656468a444f1371ceca7baa5db7f239e55 Mon Sep 17 00:00:00 2001 From: Yale Thomas Date: Tue, 23 Aug 2016 14:43:21 -0700 Subject: new 'yale' keymap --- keyboards/planck/keymaps/yale/Makefile | 25 +++++++++ keyboards/planck/keymaps/yale/config.h | 11 ++++ keyboards/planck/keymaps/yale/keymap.c | 94 ++++++++++++++++++++++++++++++++++ 3 files changed, 130 insertions(+) create mode 100644 keyboards/planck/keymaps/yale/Makefile create mode 100644 keyboards/planck/keymaps/yale/config.h create mode 100644 keyboards/planck/keymaps/yale/keymap.c diff --git a/keyboards/planck/keymaps/yale/Makefile b/keyboards/planck/keymaps/yale/Makefile new file mode 100644 index 000000000..581e08cd0 --- /dev/null +++ b/keyboards/planck/keymaps/yale/Makefile @@ -0,0 +1,25 @@ + + +# 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 = no # 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 = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = yes # 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. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/yale/config.h b/keyboards/planck/keymaps/yale/config.h new file mode 100644 index 000000000..8a916bbd0 --- /dev/null +++ b/keyboards/planck/keymaps/yale/config.h @@ -0,0 +1,11 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#define PREVENT_STUCK_MODIFIERS + +#endif + + + diff --git a/keyboards/planck/keymaps/yale/keymap.c b/keyboards/planck/keymaps/yale/keymap.c new file mode 100644 index 000000000..24f5025d0 --- /dev/null +++ b/keyboards/planck/keymaps/yale/keymap.c @@ -0,0 +1,94 @@ +// This is the canonical layout file for the Quantum project. If you want to add another keyboard, +// this is the style you want to emulate. +// +//Dropped the Dvorak layer and added two my layer buttons. Both Raise and lower can be accessed from either side now. + +#include "planck.h" +#ifdef BACKLIGHT_ENABLE + #include "backlight.h" +#endif + +// 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 _QW 0 +#define _NM 1 +#define _FN 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |Ctrl/Tab| A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Shift | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Alt | GUI | GUI | Num | Space | FN | GUI | Alt | Ctrl | Enter| + * `-----------------------------------------------------------------------------------' + */ +[_QW] = { + {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, + {CTL_T(KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, + {KC_LCTL, KC_LALT, KC_LGUI, KC_LGUI, MO(_NM), KC_SPC, KC_SPC, MO(_FN), KC_RGUI, KC_RALT, KC_RCTL, KC_ENT} +}, +/* Number + * ,-----------------------------------------------------------------------------------. + * | ___ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ____ | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Ctrl | ` | [ | { | ( | / | \ | ) | } | ] | - | = | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | ____ | ! | @ | # | $ | % | ^ | & | * | _ | + | ____ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ____ | ___ | ___ | ___ | XXXX | ______ | ____ | ____ | ____ | __ | ____ | + * `-----------------------------------------------------------------------------------' + */ +[_NM] = { + {KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS}, + {KC_LCTL, KC_GRV, KC_LBRC, KC_LCBR, KC_LPRN, KC_SLSH, KC_BSLS, KC_RPRN, KC_RCBR, KC_RBRC, KC_MINS, KC_EQL}, + {KC_TRNS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_UNDS, KC_PLUS, KC_TRNS}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} +}, +/* Function + * ,-----------------------------------------------------------------------------------. + * | ____ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ____ | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ____ |Shift | Ctrl | Alt | GUI | ____ | Left | Down | Up |Right | Del | ____ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | ____ | ____ | ____ | Vol- | Prev | Play | Mute | Next | Vol+ | ____ | ____ | ____ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ____ | ____ | ____ | ____ | ____ | _____ | XXXX | ____ | ____ | ____ | ____ | + * `-----------------------------------------------------------------------------------' + */ +[_FN] = { + {KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS}, + {KC_TRNS, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_DEL, KC_TRNS}, + {KC_TRNS, M(0), KC_TRNS, KC_VOLD, KC_MPRV, KC_MPLY, KC_MUTE, KC_MNXT, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} +} +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; -- cgit v1.2.3 From d549002d229b9ed626aae9ed9560a07e764debf0 Mon Sep 17 00:00:00 2001 From: Yale Thomas Date: Wed, 28 Sep 2016 18:29:54 -0700 Subject: mouse keys added --- keyboards/planck/keymaps/yale/keymap.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/keyboards/planck/keymaps/yale/keymap.c b/keyboards/planck/keymaps/yale/keymap.c index 24f5025d0..7bb27f62a 100644 --- a/keyboards/planck/keymaps/yale/keymap.c +++ b/keyboards/planck/keymaps/yale/keymap.c @@ -15,10 +15,11 @@ #define _QW 0 #define _NM 1 #define _FN 2 +#define _SU 3 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Qwerty +/* QW * ,-----------------------------------------------------------------------------------. * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| @@ -35,7 +36,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, {KC_LCTL, KC_LALT, KC_LGUI, KC_LGUI, MO(_NM), KC_SPC, KC_SPC, MO(_FN), KC_RGUI, KC_RALT, KC_RCTL, KC_ENT} }, -/* Number +/* NM * ,-----------------------------------------------------------------------------------. * | ___ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ____ | * |------+------+------+------+------+-------------+------+------+------+------+------| @@ -50,9 +51,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS}, {KC_LCTL, KC_GRV, KC_LBRC, KC_LCBR, KC_LPRN, KC_SLSH, KC_BSLS, KC_RPRN, KC_RCBR, KC_RBRC, KC_MINS, KC_EQL}, {KC_TRNS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_UNDS, KC_PLUS, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_SU), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} }, -/* Function +/* FN * ,-----------------------------------------------------------------------------------. * | ____ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ____ | * |------+------+------+------+------+-------------+------+------+------+------+------| @@ -67,8 +68,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS}, {KC_TRNS, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_DEL, KC_TRNS}, {KC_TRNS, M(0), KC_TRNS, KC_VOLD, KC_MPRV, KC_MPLY, KC_MUTE, KC_MNXT, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} -} + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_SU), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} +}, + +[_SU] = { + {KC_MS_ACCEL2, KC_FN1, KC_FN2, KC_FN3, KC_FN4, KC_NO, KC_NO, KC_WH_D, KC_WH_U, KC_NO, KC_NO, KC_NO}, + {KC_MS_ACCEL1, KC_MS_BTN4, KC_MS_BTN3, KC_MS_BTN2, KC_MS_BTN1, KC_NO, KC_MS_LEFT, KC_MS_DOWN, KC_MS_UP, KC_MS_RIGHT, KC_NO, KC_NO}, + {KC_MS_ACCEL0, KC_FN9, KC_FN10, KC_FN11, KC_FN12, 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} +}, + }; const uint16_t PROGMEM fn_actions[] = { -- cgit v1.2.3 From ad0ce40db07f6c2bfdcd560d983d25d8cd14fa11 Mon Sep 17 00:00:00 2001 From: Yale Thomas Date: Sat, 28 Jan 2017 18:35:06 -0800 Subject: usability tweaks --- keyboards/planck/keymaps/yale/keymap.c | 93 ++++++++++++++++++---------------- 1 file changed, 49 insertions(+), 44 deletions(-) diff --git a/keyboards/planck/keymaps/yale/keymap.c b/keyboards/planck/keymaps/yale/keymap.c index 7bb27f62a..a0910860a 100644 --- a/keyboards/planck/keymaps/yale/keymap.c +++ b/keyboards/planck/keymaps/yale/keymap.c @@ -1,25 +1,28 @@ // This is the canonical layout file for the Quantum project. If you want to add another keyboard, // this is the style you want to emulate. // -//Dropped the Dvorak layer and added two my layer buttons. Both Raise and lower can be accessed from either side now. #include "planck.h" #ifdef BACKLIGHT_ENABLE - #include "backlight.h" + #include "backlight.h" #endif // 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 _QW 0 -#define _NM 1 -#define _FN 2 -#define _SU 3 +#define _QWERTY 0 +#define _NUM 5 +#define _FUNC 6 +#define _NAV 7 + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* QW +/* _QWERTY * ,-----------------------------------------------------------------------------------. * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| @@ -30,13 +33,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Alt | GUI | GUI | Num | Space | FN | GUI | Alt | Ctrl | Enter| * `-----------------------------------------------------------------------------------' */ -[_QW] = { - {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, - {CTL_T(KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, - {KC_LCTL, KC_LALT, KC_LGUI, KC_LGUI, MO(_NM), KC_SPC, KC_SPC, MO(_FN), KC_RGUI, KC_RALT, KC_RCTL, KC_ENT} +[_QWERTY] = { + {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, + {CTL_T(KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, + {KC_LCTL, KC_LALT, KC_LGUI, KC_LGUI, MO(_NUM), KC_SPC, KC_SPC, MO(_FUNC), KC_RGUI, KC_RALT, KC_RCTL, KC_ENT} }, -/* NM + +/* _NUM * ,-----------------------------------------------------------------------------------. * | ___ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ____ | * |------+------+------+------+------+-------------+------+------+------+------+------| @@ -47,35 +51,36 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | ____ | ___ | ___ | ___ | XXXX | ______ | ____ | ____ | ____ | __ | ____ | * `-----------------------------------------------------------------------------------' */ -[_NM] = { - {KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS}, - {KC_LCTL, KC_GRV, KC_LBRC, KC_LCBR, KC_LPRN, KC_SLSH, KC_BSLS, KC_RPRN, KC_RCBR, KC_RBRC, KC_MINS, KC_EQL}, - {KC_TRNS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_UNDS, KC_PLUS, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_SU), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} +[_NUM] = { + {_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______}, + {KC_LCTL, KC_GRV, KC_LBRC, KC_LCBR, KC_LPRN, KC_SLSH, KC_BSLS, KC_RPRN, KC_RCBR, KC_RBRC, KC_MINS, KC_EQL}, + {_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC KC_CIRC, KC_AMPR, KC_ASTR, KC_UNDS, KC_PLUS, _______}, + {_______, _______, _______, _______, _______, _______, _______, MO(_NAV), _______, _______, _______, _______} }, -/* FN + +/* _FUNC * ,-----------------------------------------------------------------------------------. * | ____ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ____ | * |------+------+------+------+------+-------------+------+------+------+------+------| * | ____ |Shift | Ctrl | Alt | GUI | ____ | Left | Down | Up |Right | Del | ____ | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | ____ | ____ | ____ | Vol- | Prev | Play | Mute | Next | Vol+ | ____ | ____ | ____ | + * | ____ |Light | ____ | Vol- | Prev | Play | Mute | Next | Vol+ | ____ | ____ | ____ | * |------+------+------+------+------+------+------+------+------+------+------+------| * | ____ | ____ | ____ | ____ | ____ | _____ | XXXX | ____ | ____ | ____ | ____ | * `-----------------------------------------------------------------------------------' */ -[_FN] = { - {KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS}, - {KC_TRNS, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_DEL, KC_TRNS}, - {KC_TRNS, M(0), KC_TRNS, KC_VOLD, KC_MPRV, KC_MPLY, KC_MUTE, KC_MNXT, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_SU), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} +[_FUNC] = { + {_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______}, + {_______, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_DEL, _______}, + {_______, M(0), _______, KC_VOLD, KC_MPRV, KC_MPLY, KC_MUTE, KC_MNXT, KC_VOLU, _______, _______, _______}, + {_______, _______, _______, _______, MO(_NAV), _______, _______, _______, _______, _______, _______, _______} }, -[_SU] = { - {KC_MS_ACCEL2, KC_FN1, KC_FN2, KC_FN3, KC_FN4, KC_NO, KC_NO, KC_WH_D, KC_WH_U, KC_NO, KC_NO, KC_NO}, - {KC_MS_ACCEL1, KC_MS_BTN4, KC_MS_BTN3, KC_MS_BTN2, KC_MS_BTN1, KC_NO, KC_MS_LEFT, KC_MS_DOWN, KC_MS_UP, KC_MS_RIGHT, KC_NO, KC_NO}, - {KC_MS_ACCEL0, KC_FN9, KC_FN10, KC_FN11, KC_FN12, 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} +[_NAV] = { + {KC_MS_ACCEL2, KC_FN1, KC_FN2, KC_FN3, KC_FN4, XXXXXXX, XXXXXXX, KC_WH_D, KC_WH_U, XXXXXXX, XXXXXXX, XXXXXXX}, + {KC_MS_ACCEL1, KC_MS_BTN4, KC_MS_BTN3, KC_MS_BTN2, KC_MS_BTN1, XXXXXXX, KC_MS_LEFT, KC_MS_DOWN, KC_MS_UP, KC_MS_RIGHT, XXXXXXX, XXXXXXX}, + {KC_MS_ACCEL0, KC_FN9, KC_FN10, KC_FN11, KC_FN12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, + {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX} }, }; @@ -86,18 +91,18 @@ const uint16_t PROGMEM fn_actions[] = { const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - #ifdef BACKLIGHT_ENABLE - backlight_step(); - #endif - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; }; -- cgit v1.2.3 From 8df30c1c5689bad1331f4010eb80f2a7bd1a199a Mon Sep 17 00:00:00 2001 From: Yale Thomas Date: Sat, 28 Jan 2017 18:39:08 -0800 Subject: added picture of layout --- keyboards/planck/keymaps/yale/yale_layout_picture.jpg | Bin 0 -> 58141 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 keyboards/planck/keymaps/yale/yale_layout_picture.jpg diff --git a/keyboards/planck/keymaps/yale/yale_layout_picture.jpg b/keyboards/planck/keymaps/yale/yale_layout_picture.jpg new file mode 100644 index 000000000..ab9c6b4eb Binary files /dev/null and b/keyboards/planck/keymaps/yale/yale_layout_picture.jpg differ -- cgit v1.2.3 From c5ab0b2b61ca673b4bd8e03a767fcd91c3dee995 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Mon, 9 Jan 2017 19:35:01 +0700 Subject: Implement greek layers on my Promethium layout --- .../handwired/promethium/keymaps/priyadi/keymap.c | 187 ++++++++++++++++++++- 1 file changed, 182 insertions(+), 5 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 7ae269563..02ff57384 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -29,6 +29,8 @@ enum layers { _NUM, _FUNC, _EMOJI, + _GREEKU, + _GREEKL, _GUI, }; @@ -44,6 +46,7 @@ enum planck_keycodes { FUNC, EMOJI, GUI, + GREEK, // os switchers LINUX, @@ -106,6 +109,59 @@ enum unicode_name { SUN, // sun MOON, // moon SKULL, // skull + + // greek letters + UALPH, + UBETA, + UGAMM, + UDELT, + UEPSI, + UZETA, + UETA, + UTHET, + UIOTA, + UKAPP, + ULAMB, + UMU, + UNU, + UXI, + UOMIC, + UPI, + URHO, + USIGM, + UTAU, + UUPSI, + UPHI, + UCHI, + UPSI, + UOMEG, + + LALPH, + LBETA, + LGAMM, + LDELT, + LEPSI, + LZETA, + LETA, + LTHET, + LIOTA, + LKAPP, + LLAMB, + LMU, + LNU, + LXI, + LOMIC, + LPI, + LRHO, + LSIGM, + LTAU, + LUPSI, + LPHI, + LCHI, + LPSI, + LOMEG, + + FSIGM, }; const uint32_t PROGMEM unicode_map[] = { @@ -156,6 +212,57 @@ const uint32_t PROGMEM unicode_map[] = { [SUN] = 0x2600, [MOON] = 0x1F314, [SKULL] = 0x1F480, + + // greek letters + [UALPH] = 0x0391, + [UBETA] = 0x0392, + [UGAMM] = 0x0393, + [UDELT] = 0x0394, + [UEPSI] = 0x0395, + [UZETA] = 0x0396, + [UETA] = 0x0397, + [UTHET] = 0x0398, + [UIOTA] = 0x0399, + [UKAPP] = 0x039A, + [ULAMB] = 0x039B, + [UMU] = 0x039C, + [UNU] = 0x039D, + [UXI] = 0x039E, + [UOMIC] = 0x039F, + [UPI] = 0x03A0, + [URHO] = 0x03A1, + [USIGM] = 0x03A3, + [UTAU] = 0x03A4, + [UUPSI] = 0x03A5, + [UPHI] = 0x03A6, + [UCHI] = 0x03A7, + [UPSI] = 0x03A8, + [UOMEG] = 0x03A9, + [LALPH] = 0x03B1, + [LBETA] = 0x03B2, + [LGAMM] = 0x03B3, + [LDELT] = 0x03B4, + [LEPSI] = 0x03B5, + [LZETA] = 0x03B6, + [LETA] = 0x03B7, + [LTHET] = 0x03B8, + [LIOTA] = 0x03B9, + [LKAPP] = 0x03BA, + [LLAMB] = 0x03BB, + [LMU] = 0x03BC, + [LNU] = 0x03BD, + [LXI] = 0x03BE, + [LOMIC] = 0x03BF, + [LPI] = 0x03C0, + [LRHO] = 0x03C1, + [LSIGM] = 0x03C3, + [LTAU] = 0x03C4, + [LUPSI] = 0x03C5, + [LPHI] = 0x03C6, + [LCHI] = 0x03C7, + [LPSI] = 0x03C8, + [LOMEG] = 0x03C9, + [FSIGM] = 0x03C2, }; @@ -165,7 +272,6 @@ const uint32_t PROGMEM unicode_map[] = { // #undef KC_RSFT // #define KC_RSFT MT(MOD_LSFT, KC_EQL) - // hybrid right-gui & scroll lock (mapped to Compose in OS) #undef KC_RCTL #define KC_RCTL MT(MOD_LCTL, KC_SLCK) @@ -420,14 +526,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| Z | X | C | V | B | N | M | , | . | / |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | GUI | Alt | Punc | Num | Space | Func |Emoji |AltGr | GUI | Ctrl | + * | Ctrl | Alt | GUI | Punc | Num | Space | Func |Emoji |Greek |AltGr | Ctrl | * `-----------------------------------------------------------------------------------' */ [_QWERTY] = KEYMAP( 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, - KC_LCTL, KC_LGUI, KC_LALT, PUNC, NUM, KC_SPC, KC_SPC, FUNC, EMOJI, KC_RALT, KC_RGUI, KC_RCTL + KC_LCTL, KC_LALT, KC_LGUI, PUNC, NUM, KC_SPC, KC_SPC, FUNC, EMOJI, GREEK, KC_RALT, KC_RCTL ), /* Colemak @@ -466,6 +572,42 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), +/* Uppercase Greek + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_GREEKU] = { + _______, _______, _______,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), _______, _______, + _______,X(UZETA), X(UCHI), X(UPSI),X(UOMEG),X(UBETA), X(UNU), X(UMU), _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +}, + +/* Lowercase Greek + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_GREEKL] = { + _______, _______,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), _______, _______, + _______,X(LZETA), X(LCHI), X(LPSI),X(LOMEG),X(LBETA), X(LNU), X(LMU), _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +}, + /* Punc * ,-----------------------------------------------------------------------------------. * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | ` | @@ -581,12 +723,47 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) PLAY_NOTE_ARRAY(tone_click, false, 0); #endif + bool lshifted = keyboard_report->mods & MOD_BIT(KC_LSFT); + bool rshifted = keyboard_report->mods & MOD_BIT(KC_RSFT); + switch (keycode) { + case GREEK: + if (record->event.pressed) { + if (lshifted || rshifted) { + layer_on(_GREEKU); + layer_off(_GREEKL); + } else { + layer_on(_GREEKL); + layer_off(_GREEKU); + } + } else { + layer_off(_GREEKU); + layer_off(_GREEKL); + } + return false; + break; + + case KC_LSFT: + case KC_RSFT: + ; + uint8_t layer = biton32(layer_state); + if (layer == _GREEKU || layer == _GREEKL) { + if (record->event.pressed) { + layer_on(_GREEKU); + layer_off(_GREEKL); + } else { + if (lshifted ^ rshifted) { // if only one shift is pressed + layer_on(_GREEKL); + layer_off(_GREEKU); + } + } + } + return true; + break; + // QWERTZ style comma and dot: semicolon and colon when shifted case KC_COMM: if (record->event.pressed) { - bool lshifted = keyboard_report->mods & MOD_BIT(KC_LSFT); - bool rshifted = keyboard_report->mods & MOD_BIT(KC_RSFT); if (lshifted || rshifted) { if (lshifted) unregister_code(KC_LSFT); if (rshifted) unregister_code(KC_RSFT); -- cgit v1.2.3 From 306f43e5eedb5b0a48cc9a83cd7ee8902dbc30d5 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Mon, 9 Jan 2017 21:24:26 +0700 Subject: fix greek layers --- keyboards/handwired/promethium/keymaps/priyadi/keymap.c | 8 ++++---- keyboards/handwired/promethium/promethium.h | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 02ff57384..4665e32af 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -583,12 +583,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_GREEKU] = { +[_GREEKU] = KEYMAP( _______, _______, _______,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), _______, _______, _______,X(UZETA), X(UCHI), X(UPSI),X(UOMEG),X(UBETA), X(UNU), X(UMU), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -}, +), /* Lowercase Greek * ,-----------------------------------------------------------------------------------. @@ -601,12 +601,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_GREEKL] = { +[_GREEKL] = KEYMAP( _______, _______,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), _______, _______, _______,X(LZETA), X(LCHI), X(LPSI),X(LOMEG),X(LBETA), X(LNU), X(LMU), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -}, +), /* Punc * ,-----------------------------------------------------------------------------------. diff --git a/keyboards/handwired/promethium/promethium.h b/keyboards/handwired/promethium/promethium.h index 662eeab99..a2572db2a 100644 --- a/keyboards/handwired/promethium/promethium.h +++ b/keyboards/handwired/promethium/promethium.h @@ -4,6 +4,7 @@ #include "quantum.h" #define PS2_INIT_DELAY 2000 +#define UNICODE_TYPE_DELAY 0 #define KEYMAP( \ k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ -- cgit v1.2.3 From 011811af68baa6d0103ab289ed4737991c24f9c4 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Mon, 9 Jan 2017 23:19:34 +0700 Subject: minimize LEDs --- .../handwired/promethium/keymaps/priyadi/keymap.c | 148 ++++++++++----------- 1 file changed, 74 insertions(+), 74 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 4665e32af..99948967b 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -352,15 +352,15 @@ const uint8_t PROGMEM LED_TRACKPOINT[] = { void led_reset(void) { for(uint8_t i = 0; i < COUNT(LED_ALNUM); i++) { - rgbsps_set(pgm_read_byte(&LED_ALNUM[i]), 15, 6, 0); + rgbsps_set(pgm_read_byte(&LED_ALNUM[i]), 0, 0, 0); } for(uint8_t i = 0; i < COUNT(LED_MODS); i++) { - rgbsps_set(pgm_read_byte(&LED_MODS[i]), 15, 0, 0); + rgbsps_set(pgm_read_byte(&LED_MODS[i]), 0, 0, 0); } for(uint8_t i = 0; i < COUNT(LED_FN); i++) { - rgbsps_set(pgm_read_byte(&LED_FN[i]), 15, 15, 15); + rgbsps_set(pgm_read_byte(&LED_FN[i]), 0, 0, 0); } } @@ -385,30 +385,30 @@ void led_layer_func(void) { rgbsps_set(pgm_read_byte(&LED_ALNUM[i]), 0, 0, 0); } - rgbsps_set(LED_I, 15, 0, 15); - rgbsps_set(LED_J, 15, 0, 15); - rgbsps_set(LED_K, 15, 0, 15); - rgbsps_set(LED_L, 15, 0, 15); - - rgbsps_set(LED_U, 15, 0, 0); - rgbsps_set(LED_O, 15, 0, 0); - rgbsps_set(LED_COMM, 15, 0, 0); - rgbsps_set(LED_DOT, 15, 0, 0); - rgbsps_set(LED_SCLN, 15, 0, 0); - rgbsps_set(LED_P, 15, 0, 0); - - rgbsps_set(LED_Q, 0, 15, 0); - rgbsps_set(LED_W, 0, 15, 0); - rgbsps_set(LED_E, 0, 15, 0); - rgbsps_set(LED_R, 0, 15, 0); - rgbsps_set(LED_A, 0, 15, 0); - rgbsps_set(LED_S, 0, 15, 0); - rgbsps_set(LED_D, 0, 15, 0); - rgbsps_set(LED_F, 0, 15, 0); - rgbsps_set(LED_Z, 0, 15, 0); - rgbsps_set(LED_X, 0, 15, 0); - rgbsps_set(LED_C, 0, 15, 0); - rgbsps_set(LED_V, 0, 15, 0); + // rgbsps_set(LED_I, 15, 0, 15); + // rgbsps_set(LED_J, 15, 0, 15); + // rgbsps_set(LED_K, 15, 0, 15); + // rgbsps_set(LED_L, 15, 0, 15); + + // rgbsps_set(LED_U, 15, 0, 0); + // rgbsps_set(LED_O, 15, 0, 0); + // rgbsps_set(LED_COMM, 15, 0, 0); + // rgbsps_set(LED_DOT, 15, 0, 0); + // rgbsps_set(LED_SCLN, 15, 0, 0); + // rgbsps_set(LED_P, 15, 0, 0); + + // rgbsps_set(LED_Q, 0, 15, 0); + // rgbsps_set(LED_W, 0, 15, 0); + // rgbsps_set(LED_E, 0, 15, 0); + // rgbsps_set(LED_R, 0, 15, 0); + // rgbsps_set(LED_A, 0, 15, 0); + // rgbsps_set(LED_S, 0, 15, 0); + // rgbsps_set(LED_D, 0, 15, 0); + // rgbsps_set(LED_F, 0, 15, 0); + // rgbsps_set(LED_Z, 0, 15, 0); + // rgbsps_set(LED_X, 0, 15, 0); + // rgbsps_set(LED_C, 0, 15, 0); + // rgbsps_set(LED_V, 0, 15, 0); rgbsps_send(); } @@ -430,54 +430,54 @@ void led_layer_num(void) { led_reset(); - for(uint8_t i = 0; i < COUNT(LED_ALNUM); i++) { - rgbsps_set(pgm_read_byte(&LED_ALNUM[i]), 0, 0, 0); - } - - rgbsps_set(LED_U, 0, 5, 15); - rgbsps_set(LED_I, 0, 5, 15); - rgbsps_set(LED_O, 0, 5, 15); - rgbsps_set(LED_J, 0, 5, 15); - rgbsps_set(LED_K, 0, 5, 15); - rgbsps_set(LED_L, 0, 5, 15); - rgbsps_set(LED_M, 0, 5, 15); - rgbsps_set(LED_COMM, 0, 5, 15); - rgbsps_set(LED_DOT, 0, 5, 15); - rgbsps_set(LED_FUNC, 0, 5, 15); - - rgbsps_set(LED_EMOJI, 0, 10, 15); - rgbsps_set(LED_RALT, 0, 10, 15); - - rgbsps_set(LED_Q, 0, 10, 15); - rgbsps_set(LED_W, 0, 10, 15); - rgbsps_set(LED_E, 0, 10, 15); - rgbsps_set(LED_R, 0, 10, 15); - rgbsps_set(LED_T, 0, 10, 15); - rgbsps_set(LED_Y, 0, 10, 15); - rgbsps_set(LED_P, 0, 10, 15); - - rgbsps_set(LED_A, 0, 15, 15); - rgbsps_set(LED_S, 0, 15, 15); - rgbsps_set(LED_D, 0, 15, 15); - rgbsps_set(LED_F, 0, 15, 15); - rgbsps_set(LED_Z, 0, 15, 15); - rgbsps_set(LED_X, 0, 15, 15); - rgbsps_set(LED_C, 0, 15, 15); - rgbsps_set(LED_V, 0, 15, 15); + // for(uint8_t i = 0; i < COUNT(LED_ALNUM); i++) { + // rgbsps_set(pgm_read_byte(&LED_ALNUM[i]), 0, 0, 0); + // } + + // rgbsps_set(LED_U, 0, 5, 15); + // rgbsps_set(LED_I, 0, 5, 15); + // rgbsps_set(LED_O, 0, 5, 15); + // rgbsps_set(LED_J, 0, 5, 15); + // rgbsps_set(LED_K, 0, 5, 15); + // rgbsps_set(LED_L, 0, 5, 15); + // rgbsps_set(LED_M, 0, 5, 15); + // rgbsps_set(LED_COMM, 0, 5, 15); + // rgbsps_set(LED_DOT, 0, 5, 15); + // rgbsps_set(LED_FUNC, 0, 5, 15); + + // rgbsps_set(LED_EMOJI, 0, 10, 15); + // rgbsps_set(LED_RALT, 0, 10, 15); + + // rgbsps_set(LED_Q, 0, 10, 15); + // rgbsps_set(LED_W, 0, 10, 15); + // rgbsps_set(LED_E, 0, 10, 15); + // rgbsps_set(LED_R, 0, 10, 15); + // rgbsps_set(LED_T, 0, 10, 15); + // rgbsps_set(LED_Y, 0, 10, 15); + // rgbsps_set(LED_P, 0, 10, 15); + + // rgbsps_set(LED_A, 0, 15, 15); + // rgbsps_set(LED_S, 0, 15, 15); + // rgbsps_set(LED_D, 0, 15, 15); + // rgbsps_set(LED_F, 0, 15, 15); + // rgbsps_set(LED_Z, 0, 15, 15); + // rgbsps_set(LED_X, 0, 15, 15); + // rgbsps_set(LED_C, 0, 15, 15); + // rgbsps_set(LED_V, 0, 15, 15); rgbsps_send(); } void led_layer_emoji(void) { - for(uint8_t i = 0; i < COUNT(LED_ALNUM); i++) { - rgbsps_set(pgm_read_byte(&LED_ALNUM[i]), 15, 15, 0); - } - for(uint8_t i = 0; i < COUNT(LED_MODS); i++) { - rgbsps_set(pgm_read_byte(&LED_MODS[i]), 15, 15, 0); - } - for(uint8_t i = 0; i < COUNT(LED_FN); i++) { - rgbsps_set(pgm_read_byte(&LED_FN[i]), 15, 15, 0); - } + // for(uint8_t i = 0; i < COUNT(LED_ALNUM); i++) { + // rgbsps_set(pgm_read_byte(&LED_ALNUM[i]), 15, 15, 0); + // } + // for(uint8_t i = 0; i < COUNT(LED_MODS); i++) { + // rgbsps_set(pgm_read_byte(&LED_MODS[i]), 15, 15, 0); + // } + // for(uint8_t i = 0; i < COUNT(LED_FN); i++) { + // rgbsps_set(pgm_read_byte(&LED_FN[i]), 15, 15, 0); + // } rgbsps_set(LED_IND_FUNC, 0, 0, 0); rgbsps_set(LED_IND_NUM, 0, 0, 0); @@ -612,17 +612,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | ` | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | \ | - | = | < | > | ( | ) | ' | | | + * | | | \ | - | = | | | ( | ) | < | > | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | _ | + | { | } | [ | ] | " | | | + * | | | | | _ | + | | | [ | ] | { | } | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ [_PUNC] = KEYMAP( KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_GRV , - XXXXXXX, XXXXXXX, KC_BSLS, KC_MINS, KC_EQL, KC_LABK, KC_RABK, KC_LPRN, KC_RPRN, KC_QUOT, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, KC_DQUO, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, KC_BSLS, KC_MINS, KC_EQL, XXXXXXX, XXXXXXX, KC_LPRN, KC_RPRN, KC_LABK, KC_RABK, XXXXXXX, + XXXXXXX, XXXXXXX, KC_PIPE, KC_UNDS, KC_PLUS, XXXXXXX, XXXXXXX, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), -- cgit v1.2.3 From f644b9a07a34ae19a6014b08db656a4eeca1dcda Mon Sep 17 00:00:00 2001 From: SjB Date: Sun, 29 Jan 2017 12:06:24 -0500 Subject: registering a weak_mods when using register_code16 Scenario: Locking the KC_LSHIFT, and then using a tap dance key that registers a S(KC_9) will unregister the KC_LSHIFT. The tap dance or any keycode that is registered should not have the side effect of cancelling a locked moditifier. We should be using a similar logic as the TMK codes in tmk_core/comman/action.c:158. --- quantum/quantum.c | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/quantum/quantum.c b/quantum/quantum.c index 1767faed4..0aecd238e 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -33,22 +33,42 @@ static void do_code16 (uint16_t code, void (*f) (uint8_t)) { f(KC_RGUI); } +static inline void qk_register_weak_mods(uint8_t kc) { + add_weak_mods(MOD_BIT(kc)); + send_keyboard_report(); +} + +static inline void qk_unregister_weak_mods(uint8_t kc) { + del_weak_mods(MOD_BIT(kc)); + send_keyboard_report(); +} + static inline void qk_register_mods(uint8_t kc) { - register_mods(MOD_BIT(kc)); + add_weak_mods(MOD_BIT(kc)); + send_keyboard_report(); } static inline void qk_unregister_mods(uint8_t kc) { - unregister_mods(MOD_BIT(kc)); + del_weak_mods(MOD_BIT(kc)); + send_keyboard_report(); } void register_code16 (uint16_t code) { - do_code16 (code, qk_register_mods); + if (IS_MOD(code) || code == KC_NO) { + do_code16 (code, qk_register_mods); + } else { + do_code16 (code, qk_register_weak_mods); + } register_code (code); } void unregister_code16 (uint16_t code) { unregister_code (code); - do_code16 (code, qk_unregister_mods); + if (IS_MOD(code) || code == KC_NO) { + do_code16 (code, qk_unregister_mods); + } else { + do_code16 (code, qk_unregister_weak_mods); + } } __attribute__ ((weak)) -- cgit v1.2.3 From 45e0d09414c09c626d2349b6a5036a29fe03b1c6 Mon Sep 17 00:00:00 2001 From: SjB Date: Sun, 29 Jan 2017 12:56:20 -0500 Subject: moved oneshot cancellation code outside of process_record. The oneshot cancellation code do not depend on the action_tapping_process and since process_record get called via the action_tapping_process logic moved the oneshot cancellation code into the action_exec function just before the action_tapping_process call --- tmk_core/common/action.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index a77177240..f03670a7f 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c @@ -49,6 +49,13 @@ void action_exec(keyevent_t event) keyrecord_t record = { .event = event }; +#if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) + if (has_oneshot_layer_timed_out()) { + dprintf("Oneshot layer: timeout\n"); + clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); + } +#endif + #ifndef NO_ACTION_TAPPING action_tapping_process(record); #else @@ -100,15 +107,8 @@ bool process_record_quantum(keyrecord_t *record) { return true; } -void process_record(keyrecord_t *record) +void process_record(keyrecord_t *record) { -#if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) - if (has_oneshot_layer_timed_out()) { - dprintf("Oneshot layer: timeout\n"); - clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); - } -#endif - if (IS_NOEVENT(record->event)) { return; } if(!process_record_quantum(record)) -- cgit v1.2.3 From 5a860b71a1943358d0722ace9d2c13bd5c77c971 Mon Sep 17 00:00:00 2001 From: SjB Date: Sun, 29 Jan 2017 13:04:43 -0500 Subject: race condition between oneshot_mods and tap_dance since the keycode for a tap dance process gets process only after the TAPPING_TERM timeout, you really only have ONESHOT_TIMEOUT - TAPPING_TERM time to tap or double tap on the key. This fix save the oneshot_mods into the action.state structure and applies the mods with the keycode when it's registered. It also unregisters the mod when the the tap dance process gets reset. --- quantum/process_keycode/process_tap_dance.c | 7 ++++++- quantum/process_keycode/process_tap_dance.h | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/quantum/process_keycode/process_tap_dance.c b/quantum/process_keycode/process_tap_dance.c index 6ae362c4c..403dca538 100644 --- a/quantum/process_keycode/process_tap_dance.c +++ b/quantum/process_keycode/process_tap_dance.c @@ -43,12 +43,16 @@ static inline void process_tap_dance_action_on_dance_finished (qk_tap_dance_acti if (action->state.finished) return; action->state.finished = true; + add_mods(action->state.oneshot_mods); + send_keyboard_report(); _process_tap_dance_action_fn (&action->state, action->user_data, action->fn.on_dance_finished); } static inline void process_tap_dance_action_on_reset (qk_tap_dance_action_t *action) { _process_tap_dance_action_fn (&action->state, action->user_data, action->fn.on_reset); + del_mods(action->state.oneshot_mods); + send_keyboard_report(); } bool process_tap_dance(uint16_t keycode, keyrecord_t *record) { @@ -70,6 +74,7 @@ bool process_tap_dance(uint16_t keycode, keyrecord_t *record) { action->state.keycode = keycode; action->state.count++; action->state.timer = timer_read(); + action->state.oneshot_mods = get_oneshot_mods(); process_tap_dance_action_on_each_tap (action); if (last_td && last_td != keycode) { @@ -109,7 +114,7 @@ void matrix_scan_tap_dance () { if (highest_td == -1) return; - for (int i = 0; i <= highest_td; i++) { +for (int i = 0; i <= highest_td; i++) { qk_tap_dance_action_t *action = &tap_dance_actions[i]; if (action->state.count && timer_elapsed (action->state.timer) > TAPPING_TERM) { diff --git a/quantum/process_keycode/process_tap_dance.h b/quantum/process_keycode/process_tap_dance.h index f753cbba6..726752ecc 100644 --- a/quantum/process_keycode/process_tap_dance.h +++ b/quantum/process_keycode/process_tap_dance.h @@ -9,6 +9,7 @@ typedef struct { uint8_t count; + uint8_t oneshot_mods; uint16_t keycode; uint16_t timer; bool interrupted; -- cgit v1.2.3 From ef9e544a7eb8551748dcf96729fde8d66ac6cc57 Mon Sep 17 00:00:00 2001 From: TerryMathews Date: Sun, 29 Jan 2017 22:22:32 -0500 Subject: Let's Split: establish rev2fliphalf subproject Subproject to accomodate second half pad built in opposite orientation (places TRRS jacks on opposing edges for shorter cable runs) --- keyboards/lets_split/config.h | 3 + keyboards/lets_split/keymaps/i2c/config.h | 3 + keyboards/lets_split/keymaps/serial/config.h | 3 + keyboards/lets_split/lets_split.h | 3 + keyboards/lets_split/rev2fliphalf/Makefile | 3 + keyboards/lets_split/rev2fliphalf/config.h | 91 ++++++++++++++++++++++++ keyboards/lets_split/rev2fliphalf/rev2fliphalf.c | 32 +++++++++ keyboards/lets_split/rev2fliphalf/rev2fliphalf.h | 28 ++++++++ keyboards/lets_split/rev2fliphalf/rules.mk | 5 ++ 9 files changed, 171 insertions(+) create mode 100644 keyboards/lets_split/rev2fliphalf/Makefile create mode 100644 keyboards/lets_split/rev2fliphalf/config.h create mode 100644 keyboards/lets_split/rev2fliphalf/rev2fliphalf.c create mode 100644 keyboards/lets_split/rev2fliphalf/rev2fliphalf.h create mode 100644 keyboards/lets_split/rev2fliphalf/rules.mk diff --git a/keyboards/lets_split/config.h b/keyboards/lets_split/config.h index 7df0c5752..008fb0978 100644 --- a/keyboards/lets_split/config.h +++ b/keyboards/lets_split/config.h @@ -26,4 +26,7 @@ along with this program. If not, see . #ifdef SUBPROJECT_rev2 #include "rev2/config.h" #endif +#ifdef SUBPROJECT_rev2fliphalf + #include "../../rev2fliphalf/config.h" +#endif #endif diff --git a/keyboards/lets_split/keymaps/i2c/config.h b/keyboards/lets_split/keymaps/i2c/config.h index efe8bb0f2..332c990fc 100644 --- a/keyboards/lets_split/keymaps/i2c/config.h +++ b/keyboards/lets_split/keymaps/i2c/config.h @@ -24,4 +24,7 @@ along with this program. If not, see . #endif #ifdef SUBPROJECT_rev2 #include "../../rev2/config.h" +#endif +#ifdef SUBPROJECT_rev2fliphalf + #include "../../rev2fliphalf/config.h" #endif \ No newline at end of file diff --git a/keyboards/lets_split/keymaps/serial/config.h b/keyboards/lets_split/keymaps/serial/config.h index cd766cc4f..0e59b191b 100644 --- a/keyboards/lets_split/keymaps/serial/config.h +++ b/keyboards/lets_split/keymaps/serial/config.h @@ -26,4 +26,7 @@ along with this program. If not, see . #endif #ifdef SUBPROJECT_rev2 #include "../../rev2/config.h" +#endif +#ifdef SUBPROJECT_rev2fliphalf + #include "../../rev2fliphalf/config.h" #endif \ No newline at end of file diff --git a/keyboards/lets_split/lets_split.h b/keyboards/lets_split/lets_split.h index 2cdfb061f..0de308c7a 100644 --- a/keyboards/lets_split/lets_split.h +++ b/keyboards/lets_split/lets_split.h @@ -7,6 +7,9 @@ #ifdef SUBPROJECT_rev2 #include "rev2.h" #endif +#ifdef SUBPROJECT_rev2fliphalf + #include "rev2fliphalf.h" +#endif #include "quantum.h" diff --git a/keyboards/lets_split/rev2fliphalf/Makefile b/keyboards/lets_split/rev2fliphalf/Makefile new file mode 100644 index 000000000..4e2a6f00f --- /dev/null +++ b/keyboards/lets_split/rev2fliphalf/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif \ No newline at end of file diff --git a/keyboards/lets_split/rev2fliphalf/config.h b/keyboards/lets_split/rev2fliphalf/config.h new file mode 100644 index 000000000..1c45cf136 --- /dev/null +++ b/keyboards/lets_split/rev2fliphalf/config.h @@ -0,0 +1,91 @@ +/* +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 0x3060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Wootpatoot +#define PRODUCT Lets Split v2 +#define DESCRIPTION A split keyboard for the cheap makers + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 8 +#define MATRIX_COLS 6 + +// wiring of each half +#define MATRIX_ROW_PINS { D7, E6, B4, B5 } +//#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 } +#define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6 } //uncomment this line and comment line above if you need to reverse left-to-right key order + +//#define CATERINA_BOOTLOADER + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +// #define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* 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 command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 +#define RGBLIGHT_TIMER +#define RGBLED_NUM 12 // Number of LEDs +#define ws2812_PORTREG PORTD +#define ws2812_DDRREG DDRD + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + + +#endif \ No newline at end of file diff --git a/keyboards/lets_split/rev2fliphalf/rev2fliphalf.c b/keyboards/lets_split/rev2fliphalf/rev2fliphalf.c new file mode 100644 index 000000000..c505d3a6e --- /dev/null +++ b/keyboards/lets_split/rev2fliphalf/rev2fliphalf.c @@ -0,0 +1,32 @@ +#include "lets_split.h" + +#ifdef AUDIO_ENABLE + float tone_startup[][2] = SONG(STARTUP_SOUND); + float tone_goodbye[][2] = SONG(GOODBYE_SOUND); +#endif + +void matrix_init_kb(void) { + + #ifdef AUDIO_ENABLE + _delay_ms(20); // gets rid of tick + PLAY_NOTE_ARRAY(tone_startup, false, 0); + #endif + + // // green led on + // DDRD |= (1<<5); + // PORTD &= ~(1<<5); + + // // orange led on + // DDRB |= (1<<0); + // PORTB &= ~(1<<0); + + matrix_init_user(); +}; + +void shutdown_user(void) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + _delay_ms(150); + stop_all_notes(); + #endif +} diff --git a/keyboards/lets_split/rev2fliphalf/rev2fliphalf.h b/keyboards/lets_split/rev2fliphalf/rev2fliphalf.h new file mode 100644 index 000000000..993e149dd --- /dev/null +++ b/keyboards/lets_split/rev2fliphalf/rev2fliphalf.h @@ -0,0 +1,28 @@ +#ifndef REV2FLIPHALF_H +#define REV2FLIPHALF_H + +#include "../lets_split.h" + +//void promicro_bootloader_jmp(bool program); +#include "quantum.h" + +//void promicro_bootloader_jmp(bool program); + +#define KEYMAP( \ + k00, k01, k02, k03, k04, k05, k45, k44, k43, k42, k41, k40, \ + k10, k11, k12, k13, k14, k15, k55, k54, k53, k52, k51, k50, \ + k20, k21, k22, k23, k24, k25, k65, k64, k63, k62, k61, k60, \ + k30, k31, k32, k33, k34, k35, k75, k74, k73, k72, k71, k70 \ + ) \ + { \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k33, k34, k35 }, \ + { k40, k41, k42, k43, k44, k45 }, \ + { k50, k51, k52, k53, k54, k55 }, \ + { k60, k61, k62, k63, k64, k65 }, \ + { k70, k71, k72, k73, k74, k75 } \ + } + +#endif \ No newline at end of file diff --git a/keyboards/lets_split/rev2fliphalf/rules.mk b/keyboards/lets_split/rev2fliphalf/rules.mk new file mode 100644 index 000000000..80a942d06 --- /dev/null +++ b/keyboards/lets_split/rev2fliphalf/rules.mk @@ -0,0 +1,5 @@ +BACKLIGHT_ENABLE = no + +ifndef QUANTUM_DIR + include ../../../Makefile +endif -- cgit v1.2.3 From f400ac1d7d8ee968016fc1a3e84a053612fe07cc Mon Sep 17 00:00:00 2001 From: Brendan Johan Lee Date: Mon, 30 Jan 2017 15:45:16 +0100 Subject: [deadcyclo layout] fixed failing tests --- keyboards/ergodox/keymaps/deadcyclo/keymap.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/keyboards/ergodox/keymaps/deadcyclo/keymap.c b/keyboards/ergodox/keymaps/deadcyclo/keymap.c index bfbf17be1..610dd7ffb 100644 --- a/keyboards/ergodox/keymaps/deadcyclo/keymap.c +++ b/keyboards/ergodox/keymaps/deadcyclo/keymap.c @@ -210,21 +210,6 @@ const uint16_t PROGMEM fn_actions[] = { [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) }; -static void ang_tap (uint16_t code, ...) { - uint16_t kc = code; - va_list ap; - - va_start(ap, code); - - do { - register_code16(kc); - unregister_code16(kc); - wait_ms(50); - kc = va_arg(ap, int); - } while (kc != 0); - va_end(ap); -} - #define TAP_ONCE(code) \ register_code (code); \ unregister_code (code) @@ -284,7 +269,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; case YAY: if (record->event.pressed) { - ang_tap (KC_BSLS, KC_O, KC_SLSH, 0); + SEND_STRING ("\\o/"); } return false; break; -- cgit v1.2.3 From f70758622bc8be92987deac7163303cfe9b4f8b3 Mon Sep 17 00:00:00 2001 From: Brendan Johan Lee Date: Mon, 30 Jan 2017 19:42:27 +0100 Subject: [deadcyclo layout] Refactoring. Use custom functions and macros --- keyboards/ergodox/keymaps/deadcyclo/keymap.c | 503 ++++++++++++++------------- 1 file changed, 266 insertions(+), 237 deletions(-) diff --git a/keyboards/ergodox/keymaps/deadcyclo/keymap.c b/keyboards/ergodox/keymaps/deadcyclo/keymap.c index 610dd7ffb..5774511cc 100644 --- a/keyboards/ergodox/keymaps/deadcyclo/keymap.c +++ b/keyboards/ergodox/keymaps/deadcyclo/keymap.c @@ -8,11 +8,21 @@ #define MDIA 2 // media keys #define NAVG 3 // navigation -enum custom_keycodes { - PLACEHOLDER = SAFE_RANGE, // can always be here +enum macros { + RUN +}; + +enum function_ids { + EMOJI, + EMOJI2, EPRM, VRSN, RGB_SLD, + GO_GROUP +}; + +/* opt can only be 0-15 */ +enum emojis { SHRUG, YAY, HUG, @@ -28,13 +38,56 @@ enum custom_keycodes { FACE1, FACE2, UHU, - SMRK1, + SMRK1 +}; + +enum emojis2 { SMRK2, LOVE }; -// TODO: Get rid of of keys I don't want. Make others that I do. Set up lots of makros (Using hyper (and meh)) keys (where to put them?) +enum progmem_ids { + EMOJI_SHRUG, + EMOJI_YAY, + EMOJI_HUG, + EMOJI_SMILE, + EMOJI_SMILE2, + EMOJI_HMM1, + EMOJI_HMM2, + EMOJI_BEAR1, + EMOJI_BEAR2, + EMOJI_FUU, + EMOJI_EGGY1, + EMOJI_EGGY2, + EMOJI_FACE1, + EMOJI_FACE2, + EMOJI_UHU, + EMOJI_SMRK1, + EMOJI_SMRK2, + EMOJI_LOVE, + F_EPRM, + F_VRSN, + F_RGB_SLD, + I3_GO_GROUP_10, + I3_GO_GROUP_1, + I3_GO_GROUP_2, + I3_GO_GROUP_3, + I3_GO_GROUP_4, + I3_GO_GROUP_5, + I3_GO_GROUP_6, + I3_GO_GROUP_7, + I3_GO_GROUP_8, + I3_GO_GROUP_9, +}; + +// TODO: Finish the macros for i3 (Macros should potentially be own function instead to make things easier? some of them at least, f. ex. the ones that use 1-0 keys so we can have a single switch) + +// TODO: Do stuff with hyper and meh keys +// TODO: Add macros for lots of stuff. (Lastpass cli, pushbullet cli, other push service cli, linode cli, more?) +// TODO: Make macros for gnu screen and i3wm // TODO: Need to change hotkeys for lastpass, and potentially make my own keys for them on one of my layers +// TODO: Look into using tap dance +// TODO: Use leader key for stuff. See https://github.com/qmk/qmk_firmware/wiki const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 0: Basic layer * @@ -47,7 +100,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * |Grv/L1| UNI |AltShf| Lalt | Ralt | | Lalt | Ralt | [ | UNI | ~/L1 | + * |Grv/L1| UNI |AltShf| Lalt | Ralt | | Lalt | Ralt | LEAD | UNI | ~/L1 | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | App | Home | | PgUp | Ins | @@ -61,7 +114,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Otherwise, it needs KC_* [BASE] = KEYMAP( // layer 0 : default // left hand - LT(NAVG,KC_ESC), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, + LT(NAVG,KC_ESC), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, LT(SYMB,KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), KC_LCTL, LT(MDIA, KC_A), KC_S, KC_D, KC_F, KC_G, KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), @@ -74,7 +127,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, LT(SYMB, KC_BSLS), KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),CTL_T(KC_QUOT), MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_LALT, KC_RALT,KC_LBRC,LCTL(LSFT(KC_U)), LT(SYMB,KC_TILD), + KC_LALT, KC_RALT,KC_LEAD,LCTL(LSFT(KC_U)), LT(SYMB,KC_TILD), KC_PGUP, KC_INS, KC_PGDN, KC_RBRC,KC_BSPC, KC_ENT @@ -109,7 +162,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, RGB_TOG,RGB_MOD, - RGB_SLD, + F(F_RGB_SLD), RGB_VAD,RGB_VAI,KC_TRNS, // right hand KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, @@ -119,14 +172,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS, RGB_HUD, RGB_HUI, KC_TRNS, - EPRM, KC_DEL, KC_TRNS + F(F_EPRM), KC_DEL, KC_TRNS ), /* Keymap 2: Media, mouse and navigation * * ,--------------------------------------------------. ,--------------------------------------------------. - * | | | | | | | | | | | | | | | | + * | | gg(1)| | | | | | | | | | | | | | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | MsUp | | | | | | | | Up | | | | + * | | | | MsUp | RUN | | | | | | | Up | | | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | | |MsLeft|MsDown|MsRght| |------| |------| | Left | Down | Right| | Play | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| @@ -144,8 +197,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // MEDIA , MOUSE and NAVIGATION [MDIA] = KEYMAP( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, F(I3_GO_GROUP_1), F(I3_GO_GROUP_2), F(I3_GO_GROUP_3), F(I3_GO_GROUP_4), F(I3_GO_GROUP_5), F(I3_GO_GROUP_6), +KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, M(RUN), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, @@ -153,7 +206,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, // right hand - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + F(I3_GO_GROUP_6), F(I3_GO_GROUP_7), F(I3_GO_GROUP_8), F(I3_GO_GROUP_9), F(I3_GO_GROUP_10), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_MPLY, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, @@ -179,7 +232,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-------------. ,-------------. * | | | | ▒ | ▓ | * ,------|------|------| |------+------+------. - * | | | | | | | | + * | | | | | | | | * | | |------| |------| | | * | | | | | | | | * `--------------------' `--------------------' @@ -187,10 +240,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Unicode [NAVG] = KEYMAP( KC_TRNS, UC(0x250c), UC(0x2510), UC(0x2514), UC(0x2518), UC(0x2502), UC(0x2500), - KC_TRNS, SHRUG, YAY, HUG, SMILE, SMILE2, KC_TRNS, - KC_TRNS, HMM1, HMM2, BEAR1, BEAR2, FUU, - KC_TRNS, EGGY1, EGGY2, FACE1, FACE2, UHU, KC_TRNS, - KC_TRNS, SMRK1, SMRK2, LOVE, VRSN, + KC_TRNS, F(EMOJI_SHRUG), F(EMOJI_YAY), F(EMOJI_HUG), F(EMOJI_SMILE), F(EMOJI_SMILE2), KC_TRNS, + KC_TRNS, F(EMOJI_HMM1), F(EMOJI_HMM2), F(EMOJI_BEAR1), F(EMOJI_BEAR2), F(EMOJI_FUU), + KC_TRNS, F(EMOJI_EGGY1), F(EMOJI_EGGY2), F(EMOJI_FACE1), F(EMOJI_FACE2), F(EMOJI_UHU), KC_TRNS, + KC_TRNS, F(EMOJI_SMRK1), F(EMOJI_SMRK2), F(EMOJI_LOVE), F(F_VRSN), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -207,242 +260,219 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) + [EMOJI_SHRUG] = ACTION_FUNCTION_OPT(EMOJI, SHRUG), + [EMOJI_YAY] = ACTION_FUNCTION_OPT(EMOJI, YAY), + [EMOJI_HUG] = ACTION_FUNCTION_OPT(EMOJI,HUG), + [EMOJI_SMILE] = ACTION_FUNCTION_OPT(EMOJI,SMILE), + [EMOJI_SMILE2] = ACTION_FUNCTION_OPT(EMOJI,SMILE2), + [EMOJI_HMM1] = ACTION_FUNCTION_OPT(EMOJI,HMM1), + [EMOJI_HMM2] = ACTION_FUNCTION_OPT(EMOJI,HMM2), + [EMOJI_BEAR1] = ACTION_FUNCTION_OPT(EMOJI,BEAR1), + [EMOJI_BEAR2] = ACTION_FUNCTION_OPT(EMOJI,BEAR2), + [EMOJI_FUU] = ACTION_FUNCTION_OPT(EMOJI,FUU), + [EMOJI_EGGY1] = ACTION_FUNCTION_OPT(EMOJI,EGGY1), + [EMOJI_EGGY2] = ACTION_FUNCTION_OPT(EMOJI,EGGY2), + [EMOJI_FACE1] = ACTION_FUNCTION_OPT(EMOJI,FACE1), + [EMOJI_FACE2] = ACTION_FUNCTION_OPT(EMOJI,FACE2), + [EMOJI_UHU] = ACTION_FUNCTION_OPT(EMOJI,UHU), + [EMOJI_SMRK1] = ACTION_FUNCTION_OPT(EMOJI,SMRK1), + [EMOJI_SMRK2] = ACTION_FUNCTION_OPT(EMOJI2,SMRK2), + [EMOJI_LOVE] = ACTION_FUNCTION_OPT(EMOJI2,LOVE), + [F_EPRM] = ACTION_FUNCTION(EPRM), + [F_VRSN] = ACTION_FUNCTION(VRSN), + [F_RGB_SLD] = ACTION_FUNCTION(RGB_SLD), + [I3_GO_GROUP_10]= ACTION_FUNCTION_OPT(GO_GROUP,0), + [I3_GO_GROUP_1] = ACTION_FUNCTION_OPT(GO_GROUP,1), + [I3_GO_GROUP_2] = ACTION_FUNCTION_OPT(GO_GROUP,2), + [I3_GO_GROUP_3] = ACTION_FUNCTION_OPT(GO_GROUP,3), + [I3_GO_GROUP_4] = ACTION_FUNCTION_OPT(GO_GROUP,4), + [I3_GO_GROUP_5] = ACTION_FUNCTION_OPT(GO_GROUP,5), + [I3_GO_GROUP_6] = ACTION_FUNCTION_OPT(GO_GROUP,6), + [I3_GO_GROUP_7] = ACTION_FUNCTION_OPT(GO_GROUP,7), + [I3_GO_GROUP_8] = ACTION_FUNCTION_OPT(GO_GROUP,8), + [I3_GO_GROUP_9] = ACTION_FUNCTION_OPT(GO_GROUP,9), }; #define TAP_ONCE(code) \ register_code (code); \ unregister_code (code) -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); - } - break; - case 1: - if (record->event.pressed) { // For resetting EEPROM - eeconfig_init(); - } - break; - } - return MACRO_NONE; -}; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - // dynamically generate these. +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { + if (record->event.pressed) { + switch(id) { case EPRM: - if (record->event.pressed) { - eeconfig_init(); - } - return false; + eeconfig_init(); break; case VRSN: - if (record->event.pressed) { - SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); - } - return false; + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); break; case RGB_SLD: - if (record->event.pressed) { - #ifdef RGBLIGHT_ENABLE - rgblight_mode(1); - #endif - } - return false; +#ifdef RGBLIGHT_ENABLE + rgblight_mode(1); +#endif break; - case SHRUG: - if (record->event.pressed) { - unicode_input_start(); register_hex(0xaf); unicode_input_finish(); - TAP_ONCE (KC_BSLS); - register_code (KC_RSFT); TAP_ONCE (KC_MINS); TAP_ONCE (KC_9); unregister_code (KC_RSFT); - unicode_input_start (); register_hex(0x30c4); unicode_input_finish(); - register_code (KC_RSFT); TAP_ONCE (KC_0); TAP_ONCE (KC_MINS); unregister_code (KC_RSFT); - TAP_ONCE (KC_SLSH); - unicode_input_start (); register_hex(0xaf); unicode_input_finish(); + case GO_GROUP: + register_code(KC_LCTL); TAP_ONCE(KC_I); unregister_code(KC_LCTL); + TAP_ONCE(KC_G); + if (opt == 0) { + TAP_ONCE(39); + } else { + TAP_ONCE(29+opt); } - return false; break; - case YAY: - if (record->event.pressed) { - SEND_STRING ("\\o/"); + case EMOJI: + switch(opt) { + case SHRUG: + unicode_input_start(); register_hex(0xaf); unicode_input_finish(); + TAP_ONCE (KC_BSLS); + register_code (KC_RSFT); TAP_ONCE (KC_MINS); TAP_ONCE (KC_9); unregister_code (KC_RSFT); + unicode_input_start (); register_hex(0x30c4); unicode_input_finish(); + register_code (KC_RSFT); TAP_ONCE (KC_0); TAP_ONCE (KC_MINS); unregister_code (KC_RSFT); + TAP_ONCE (KC_SLSH); + unicode_input_start (); register_hex(0xaf); unicode_input_finish(); + break; + case YAY: + SEND_STRING ("\\o/"); + break; + case HUG: + unicode_input_start(); register_hex(0x0f3c); unicode_input_finish(); + TAP_ONCE (KC_SPC); + unicode_input_start(); register_hex(0x3064); unicode_input_finish(); + TAP_ONCE (KC_SPC); + unicode_input_start(); register_hex(0x25d5); unicode_input_finish(); + unicode_input_start(); register_hex(0x005f); unicode_input_finish(); + unicode_input_start(); register_hex(0x25d5); unicode_input_finish(); + TAP_ONCE (KC_SPC); + unicode_input_start(); register_hex(0x0f3d); unicode_input_finish(); + unicode_input_start(); register_hex(0x3064); unicode_input_finish(); + break; + case SMILE: + unicode_input_start(); register_hex(0x0298); unicode_input_finish(); + unicode_input_start(); register_hex(0x203f); unicode_input_finish(); + unicode_input_start(); register_hex(0x0298); unicode_input_finish(); + break; + case SMILE2: + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x0298); unicode_input_finish(); + unicode_input_start(); register_hex(0x203f); unicode_input_finish(); + unicode_input_start(); register_hex(0x0298); unicode_input_finish(); + unicode_input_start(); register_hex(0x0029); unicode_input_finish(); + break; + case HMM1: + unicode_input_start(); register_hex(0x0ca0); unicode_input_finish(); + unicode_input_start(); register_hex(0x005f); unicode_input_finish(); + unicode_input_start(); register_hex(0x0ca0); unicode_input_finish(); + break; + case HMM2: + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x0ca0); unicode_input_finish(); + unicode_input_start(); register_hex(0x005f); unicode_input_finish(); + unicode_input_start(); register_hex(0x0ca0); unicode_input_finish(); + unicode_input_start(); register_hex(0x0029); unicode_input_finish(); + break; + case BEAR1: + unicode_input_start(); register_hex(0x0295); unicode_input_finish(); + unicode_input_start(); register_hex(0x2022); unicode_input_finish(); + unicode_input_start(); register_hex(0x1d25); unicode_input_finish(); + unicode_input_start(); register_hex(0x2022); unicode_input_finish(); + unicode_input_start(); register_hex(0x0294); unicode_input_finish(); + break; + case BEAR2: + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x1d54); unicode_input_finish(); + unicode_input_start(); register_hex(0x1d25); unicode_input_finish(); + unicode_input_start(); register_hex(0x1d54); unicode_input_finish(); + unicode_input_start(); register_hex(0x0029); unicode_input_finish(); + break; + case FUU: + unicode_input_start(); register_hex(0x256d); unicode_input_finish(); + unicode_input_start(); register_hex(0x2229); unicode_input_finish(); + unicode_input_start(); register_hex(0x256e); unicode_input_finish(); + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x002d); unicode_input_finish(); + unicode_input_start(); register_hex(0x005f); unicode_input_finish(); + unicode_input_start(); register_hex(0x002d); unicode_input_finish(); + unicode_input_start(); register_hex(0x0029); unicode_input_finish(); + unicode_input_start(); register_hex(0x256d); unicode_input_finish(); + unicode_input_start(); register_hex(0x2229); unicode_input_finish(); + unicode_input_start(); register_hex(0x256e); unicode_input_finish(); + break; + case EGGY1: + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x256f); unicode_input_finish(); + unicode_input_start(); register_hex(0x00b0); unicode_input_finish(); + unicode_input_start(); register_hex(0x25a1); unicode_input_finish(); + unicode_input_start(); register_hex(0x00b0); unicode_input_finish(); + unicode_input_start(); register_hex(0xff09); unicode_input_finish(); + unicode_input_start(); register_hex(0x256f); unicode_input_finish(); + break; + case EGGY2: + unicode_input_start(); register_hex(0x30ce); unicode_input_finish(); + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x0020); unicode_input_finish(); + unicode_input_start(); register_hex(0x309c); unicode_input_finish(); + unicode_input_start(); register_hex(0x002d); unicode_input_finish(); + unicode_input_start(); register_hex(0x309c); unicode_input_finish(); + unicode_input_start(); register_hex(0x30ce); unicode_input_finish(); + unicode_input_start(); register_hex(0x0029); unicode_input_finish(); + break; + case FACE1: + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x002d); unicode_input_finish(); + unicode_input_start(); register_hex(0x005f); unicode_input_finish(); + unicode_input_start(); register_hex(0x002d); unicode_input_finish(); + unicode_input_start(); register_hex(0x0029); unicode_input_finish(); + break; + case FACE2: + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x2022); unicode_input_finish(); + unicode_input_start(); register_hex(0x005f); unicode_input_finish(); + unicode_input_start(); register_hex(0x2022); unicode_input_finish(); + unicode_input_start(); register_hex(0x0029); unicode_input_finish(); + break; + case UHU: + unicode_input_start(); register_hex(0x2299); unicode_input_finish(); + unicode_input_start(); register_hex(0xfe4f); unicode_input_finish(); + unicode_input_start(); register_hex(0x2299); unicode_input_finish(); + break; + case SMRK1: + unicode_input_start(); register_hex(0x005e); unicode_input_finish(); + unicode_input_start(); register_hex(0x032e); unicode_input_finish(); + unicode_input_start(); register_hex(0x005e); unicode_input_finish(); + break; } - return false; - break; - case HUG: - if (record->event.pressed) { - unicode_input_start(); register_hex(0x0f3c); unicode_input_finish(); - TAP_ONCE (KC_SPC); - unicode_input_start(); register_hex(0x3064); unicode_input_finish(); - TAP_ONCE (KC_SPC); - unicode_input_start(); register_hex(0x25d5); unicode_input_finish(); - unicode_input_start(); register_hex(0x005f); unicode_input_finish(); - unicode_input_start(); register_hex(0x25d5); unicode_input_finish(); - TAP_ONCE (KC_SPC); - unicode_input_start(); register_hex(0x0f3d); unicode_input_finish(); - unicode_input_start(); register_hex(0x3064); unicode_input_finish(); - } - return false; - break; - case SMILE: - if (record->event.pressed) { - unicode_input_start(); register_hex(0x0298); unicode_input_finish(); - unicode_input_start(); register_hex(0x203f); unicode_input_finish(); - unicode_input_start(); register_hex(0x0298); unicode_input_finish(); - } - return false; - break; - case SMILE2: - if (record->event.pressed) { - unicode_input_start(); register_hex(0x0028); unicode_input_finish(); - unicode_input_start(); register_hex(0x0298); unicode_input_finish(); - unicode_input_start(); register_hex(0x203f); unicode_input_finish(); - unicode_input_start(); register_hex(0x0298); unicode_input_finish(); - unicode_input_start(); register_hex(0x0029); unicode_input_finish(); - } - return false; - break; - case HMM1: - if (record->event.pressed) { - unicode_input_start(); register_hex(0x0ca0); unicode_input_finish(); - unicode_input_start(); register_hex(0x005f); unicode_input_finish(); - unicode_input_start(); register_hex(0x0ca0); unicode_input_finish(); - } - return false; - break; - case HMM2: - if (record->event.pressed) { - unicode_input_start(); register_hex(0x0028); unicode_input_finish(); - unicode_input_start(); register_hex(0x0ca0); unicode_input_finish(); - unicode_input_start(); register_hex(0x005f); unicode_input_finish(); - unicode_input_start(); register_hex(0x0ca0); unicode_input_finish(); - unicode_input_start(); register_hex(0x0029); unicode_input_finish(); - } - return false; - break; - case BEAR1: - if (record->event.pressed) { - unicode_input_start(); register_hex(0x0295); unicode_input_finish(); - unicode_input_start(); register_hex(0x2022); unicode_input_finish(); - unicode_input_start(); register_hex(0x1d25); unicode_input_finish(); - unicode_input_start(); register_hex(0x2022); unicode_input_finish(); - unicode_input_start(); register_hex(0x0294); unicode_input_finish(); - } - return false; - break; - case BEAR2: - if (record->event.pressed) { - unicode_input_start(); register_hex(0x0028); unicode_input_finish(); - unicode_input_start(); register_hex(0x1d54); unicode_input_finish(); - unicode_input_start(); register_hex(0x1d25); unicode_input_finish(); - unicode_input_start(); register_hex(0x1d54); unicode_input_finish(); - unicode_input_start(); register_hex(0x0029); unicode_input_finish(); - } - return false; - break; - case FUU: - if (record->event.pressed) { - unicode_input_start(); register_hex(0x256d); unicode_input_finish(); - unicode_input_start(); register_hex(0x2229); unicode_input_finish(); - unicode_input_start(); register_hex(0x256e); unicode_input_finish(); - unicode_input_start(); register_hex(0x0028); unicode_input_finish(); - unicode_input_start(); register_hex(0x002d); unicode_input_finish(); - unicode_input_start(); register_hex(0x005f); unicode_input_finish(); - unicode_input_start(); register_hex(0x002d); unicode_input_finish(); - unicode_input_start(); register_hex(0x0029); unicode_input_finish(); - unicode_input_start(); register_hex(0x256d); unicode_input_finish(); - unicode_input_start(); register_hex(0x2229); unicode_input_finish(); - unicode_input_start(); register_hex(0x256e); unicode_input_finish(); - } - return false; - break; - case EGGY1: - if (record->event.pressed) { - unicode_input_start(); register_hex(0x0028); unicode_input_finish(); - unicode_input_start(); register_hex(0x256f); unicode_input_finish(); - unicode_input_start(); register_hex(0x00b0); unicode_input_finish(); - unicode_input_start(); register_hex(0x25a1); unicode_input_finish(); - unicode_input_start(); register_hex(0x00b0); unicode_input_finish(); - unicode_input_start(); register_hex(0xff09); unicode_input_finish(); - unicode_input_start(); register_hex(0x256f); unicode_input_finish(); - } - return false; - break; - case EGGY2: - if (record->event.pressed) { - unicode_input_start(); register_hex(0x30ce); unicode_input_finish(); - unicode_input_start(); register_hex(0x0028); unicode_input_finish(); - unicode_input_start(); register_hex(0x0020); unicode_input_finish(); - unicode_input_start(); register_hex(0x309c); unicode_input_finish(); - unicode_input_start(); register_hex(0x002d); unicode_input_finish(); - unicode_input_start(); register_hex(0x309c); unicode_input_finish(); - unicode_input_start(); register_hex(0x30ce); unicode_input_finish(); - unicode_input_start(); register_hex(0x0029); unicode_input_finish(); - } - return false; - break; - case FACE1: - if (record->event.pressed) { - unicode_input_start(); register_hex(0x0028); unicode_input_finish(); - unicode_input_start(); register_hex(0x002d); unicode_input_finish(); - unicode_input_start(); register_hex(0x005f); unicode_input_finish(); - unicode_input_start(); register_hex(0x002d); unicode_input_finish(); - unicode_input_start(); register_hex(0x0029); unicode_input_finish(); - } - return false; - break; - case FACE2: - if (record->event.pressed) { - unicode_input_start(); register_hex(0x0028); unicode_input_finish(); - unicode_input_start(); register_hex(0x2022); unicode_input_finish(); - unicode_input_start(); register_hex(0x005f); unicode_input_finish(); - unicode_input_start(); register_hex(0x2022); unicode_input_finish(); - unicode_input_start(); register_hex(0x0029); unicode_input_finish(); - } - return false; - break; - case UHU: - if (record->event.pressed) { - unicode_input_start(); register_hex(0x2299); unicode_input_finish(); - unicode_input_start(); register_hex(0xfe4f); unicode_input_finish(); - unicode_input_start(); register_hex(0x2299); unicode_input_finish(); - } - return false; - break; - case SMRK1: - if (record->event.pressed) { - unicode_input_start(); register_hex(0x005e); unicode_input_finish(); - unicode_input_start(); register_hex(0x032e); unicode_input_finish(); - unicode_input_start(); register_hex(0x005e); unicode_input_finish(); - } - return false; - break; - case SMRK2: - if (record->event.pressed) { - unicode_input_start(); register_hex(0x0028); unicode_input_finish(); - unicode_input_start(); register_hex(0x005e); unicode_input_finish(); - unicode_input_start(); register_hex(0x032e); unicode_input_finish(); - unicode_input_start(); register_hex(0x005e); unicode_input_finish(); - unicode_input_start(); register_hex(0x0029); unicode_input_finish(); - } - return false; - break; - case LOVE: - if (record->event.pressed) { - unicode_input_start(); register_hex(0x2665); unicode_input_finish(); - unicode_input_start(); register_hex(0x203f); unicode_input_finish(); - unicode_input_start(); register_hex(0x2665); unicode_input_finish(); - } - return false; break; + case EMOJI2: + switch(opt) { + case SMRK2: + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x005e); unicode_input_finish(); + unicode_input_start(); register_hex(0x032e); unicode_input_finish(); + unicode_input_start(); register_hex(0x005e); unicode_input_finish(); + unicode_input_start(); register_hex(0x0029); unicode_input_finish(); + break; + case LOVE: + unicode_input_start(); register_hex(0x2665); unicode_input_finish(); + unicode_input_start(); register_hex(0x203f); unicode_input_finish(); + unicode_input_start(); register_hex(0x2665); unicode_input_finish(); + break; + } + break; + } } - return true; } +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + if (record->event.pressed) { + switch(id) { + case RUN: + return MACRO( D(LCTL), T(I), U(LCTL), T(R), END ); + break; + } + } + return MACRO_NONE; +}; + // Runs just one time when the keyboard initializes. void matrix_init_user(void) { set_unicode_input_mode(UC_LNX); @@ -450,7 +480,6 @@ void matrix_init_user(void) { // Runs constantly in the background, in a loop. void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); ergodox_board_led_off(); -- cgit v1.2.3 From 4c3630dc1778129438440986f14731dcb7244262 Mon Sep 17 00:00:00 2001 From: Matthias Schmitt Date: Mon, 30 Jan 2017 23:10:28 +0100 Subject: update my neo2 keymap --- keyboards/ergodox/keymaps/software_neo2/keymap.c | 64 +++++++++++++----------- 1 file changed, 34 insertions(+), 30 deletions(-) diff --git a/keyboards/ergodox/keymaps/software_neo2/keymap.c b/keyboards/ergodox/keymaps/software_neo2/keymap.c index 41ace403d..571ca062c 100644 --- a/keyboards/ergodox/keymaps/software_neo2/keymap.c +++ b/keyboards/ergodox/keymaps/software_neo2/keymap.c @@ -1,7 +1,8 @@ #include "ergodox.h" #include "debug.h" +#include "led.h" #include "action_layer.h" -#include "keymap_neo2.h" +#include "keymap_extras/keymap_neo2.h" // Layer names #define BASE 0 // default layer @@ -11,45 +12,45 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 0: Basic layer * * ,--------------------------------------------------. ,--------------------------------------------------. - * | ^ | 1 | 2 | 3 | 4 | 5 | Play | | Next | 6 | 7 | 8 | 9 | 0 |BackSpce| + * | Del | 1 | 2 | 3 | 4 | 5 | Play | | Next | 6 | 7 | 8 | 9 | 0 | ß | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Del | X | V | L | C | W | L1 | | L1 | K | H | G | F | Q | ß | + * | Tab | X | V | L | C | W | Esc | | Esc | K | H | G | F | Q | Y | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | Caps | U | I | A | E | O |------| |------| S | N | R | T | D | Y | - * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| - * | LShift |Ü/Ctrl| Ö/C-S| Ä/Alt| P | Z | | | | B | M | , | . | J | RShift | + * | NeoL1 | U | I | A | E | O |------| |------| S | N | R | T | D | NeoR1 | + * |--------+------+------+------+------+------| L1 | | L1 |------+------+------+------+------+--------| + * | LShift |Ü/Ctrl| Ö/Win| Ä/Alt| P | Z | | | | B | M | , | . | J | RShift | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | L1 | Home | PgDn | PgUp | End | | Right| Down | Up | Left | Esc | + * |NeoL2 | Home | PgDn | PgUp | End | | Right| Down | Up | Left | NeoR2| * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. + * ,-------------. ,---------------. * | App | LGui | | Alt |Ctrl/Esc| * ,------+------+------| |------+--------+------. - * | | |NeoL2 | |NeoL2 | | | - * | Tab |Backsp|------| |------| Space |Enter | - * | |ace |NeoL1 | |NeoL1 | | | + * | | | Enter| |Delete| | | + * | Space|Backsp|------| |------| Enter |Space | + * | |ace | Tab | | Esc | | | * `--------------------' `----------------------' */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* [BASE] = KEYMAP( // layer 0 : default // left hand - KC_CIRC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MPLY, - KC_DELT, NEO_X, NEO_V, NEO_L, NEO_C, NEO_W, TG(1), - KC_CAPS, NEO_U, NEO_I, NEO_A, NEO_E, NEO_O, - KC_LSFT, CTL_T(NEO_UE), C_S_T(NEO_OE), ALT_T(NEO_AE), NEO_P, NEO_Z, ALL_T(KC_NO), - DE_LESS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, - ALT_T(KC_APP),KC_LGUI, - NEO_L2_L, - KC_TAB,KC_BSPC,NEO_L1_L, + KC_DELT, NEO_1, NEO_2, NEO_3, NEO_4, NEO_5, KC_MPLY, + KC_TAB, NEO_X, NEO_V, NEO_L, NEO_C, NEO_W, KC_ESC, + NEO_L1_L, NEO_U, NEO_I, NEO_A, NEO_E, NEO_O, + KC_LSFT, CTL_T(NEO_UE), GUI_T(NEO_OE), ALT_T(NEO_AE), NEO_P, NEO_Z, TG(1), + NEO_L2_L, KC_HOME, KC_PGDN, KC_PGUP, KC_END, + C_S_T(KC_ESC),KC_LGUI, + KC_ENT, + KC_SPC,KC_BSPC,KC_TAB, // right hand - KC_MNXT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - TG(1), NEO_K, NEO_H, NEO_G, NEO_F, NEO_Q, NEO_SS, - NEO_S, NEO_N, NEO_R, NEO_T, NEO_D, NEO_Y, - MEH_T(KC_NO),NEO_B, NEO_M, KC_COMM, KC_DOT, NEO_J, KC_RSFT, - KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_ESC, - KC_LALT,CTL_T(KC_ESC), - NEO_L2_R, - NEO_L1_R,KC_SPC, KC_ENT + KC_MNXT, NEO_6, NEO_7, NEO_8, NEO_9, NEO_0, NEO_SS, + KC_ESC, NEO_K, NEO_H, NEO_G, NEO_F, NEO_Q, NEO_Y, + NEO_S, NEO_N, NEO_R, NEO_T, NEO_D, NEO_L1_R, + TG(1), NEO_B, NEO_M, NEO_COMM, NEO_DOT, NEO_J, KC_RSFT, + KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, NEO_L2_R, + KC_LALT,KC_RGUI, + KC_DELT, + KC_ESC,KC_ENT, KC_SPC ), /* Keymap 1: Media and mouse keys * @@ -127,13 +128,16 @@ void matrix_scan_user(void) { ergodox_right_led_1_off(); ergodox_right_led_2_off(); ergodox_right_led_3_off(); + ergodox_board_led_off(); + + if (host_keyboard_leds() & (1< Date: Mon, 30 Jan 2017 19:39:23 -0800 Subject: fixing kinesis reboot --- keyboards/kinesis/rules.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/kinesis/rules.mk b/keyboards/kinesis/rules.mk index a4a2b7d15..956a64bdd 100644 --- a/keyboards/kinesis/rules.mk +++ b/keyboards/kinesis/rules.mk @@ -46,11 +46,11 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT # Boot Section Size in *bytes* # Teensy halfKay 512 -# Teensy++ halfKay 1024 +# Teensy++ halfKay 2048 # Atmel DFU loader 4096 # LUFA bootloader 4096 # USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=1024 +OPT_DEFS += -DBOOTLOADER_SIZE=2048 # Build Options -- cgit v1.2.3 From f36fc1d2e534b23bfd9794dab85859f6a9fbeb18 Mon Sep 17 00:00:00 2001 From: upils Date: Tue, 31 Jan 2017 22:37:03 +0100 Subject: Add reddot handwired keyboard. --- keyboards/handwired/reddot/Makefile | 3 + keyboards/handwired/reddot/config.h | 162 +++++++++++++++++++++ .../handwired/reddot/keymaps/default/keymap.c | 29 ++++ .../handwired/reddot/keymaps/default/readme.md | 1 + keyboards/handwired/reddot/readme.md | 24 +++ keyboards/handwired/reddot/reddot.c | 7 + keyboards/handwired/reddot/reddot.h | 20 +++ keyboards/handwired/reddot/rules.mk | 88 +++++++++++ 8 files changed, 334 insertions(+) create mode 100755 keyboards/handwired/reddot/Makefile create mode 100755 keyboards/handwired/reddot/config.h create mode 100755 keyboards/handwired/reddot/keymaps/default/keymap.c create mode 100755 keyboards/handwired/reddot/keymaps/default/readme.md create mode 100755 keyboards/handwired/reddot/readme.md create mode 100755 keyboards/handwired/reddot/reddot.c create mode 100755 keyboards/handwired/reddot/reddot.h create mode 100755 keyboards/handwired/reddot/rules.mk diff --git a/keyboards/handwired/reddot/Makefile b/keyboards/handwired/reddot/Makefile new file mode 100755 index 000000000..191c6bb66 --- /dev/null +++ b/keyboards/handwired/reddot/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/handwired/reddot/config.h b/keyboards/handwired/reddot/config.h new file mode 100755 index 000000000..15f114297 --- /dev/null +++ b/keyboards/handwired/reddot/config.h @@ -0,0 +1,162 @@ +/* +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 upils +#define PRODUCT reddot +#define DESCRIPTION A custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 19 + +/* + * 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 { B0, B1, B2, B3, E6 } +#define MATRIX_COL_PINS { B7, D0, D1, D2, D3, C6, C7, D5, D4, D7, B4, B5, B6, F7, F6, F5, F4, F1, F0 } +#define UNUSED_PINS + + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + + +/* 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 + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/handwired/reddot/keymaps/default/keymap.c b/keyboards/handwired/reddot/keymaps/default/keymap.c new file mode 100755 index 000000000..44ee2ce51 --- /dev/null +++ b/keyboards/handwired/reddot/keymaps/default/keymap.c @@ -0,0 +1,29 @@ +#include "reddot.h" +#include "../../../../../quantum/keymap_extras/keymap_french.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[0] = KEYMAP( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TAB, KC_CAPS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_FN0, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS,\ + KC_LALT, FR_AMP, FR_EACU, FR_QUOT, FR_APOS, FR_LPRN, KC_BSPACE, KC_DELETE, FR_MINS, FR_EGRV, FR_UNDS, FR_CCED, FR_AGRV, FR_RPRN, FR_EQL, KC_INSERT, KC_HOME, KC_PGUP,\ + KC_LGUI, FR_A, FR_Z, KC_E, KC_R, KC_T, KC_LSFT, KC_ENT, KC_Y, KC_U, KC_I, KC_O, KC_P, FR_CIRC, FR_DLR, KC_DELETE, KC_END, KC_PGDOWN, KC_KP_PLUS,\ + KC_LCTL, FR_Q, KC_S, KC_D, KC_F, KC_G, KC_ENT, KC_H, KC_J, KC_K, KC_L, FR_M, FR_UGRV, FR_ASTR, KC_KP_1, KC_UP, KC_KP_3,\ + FR_LESS, FR_W, KC_X, KC_C, KC_V, KC_B, KC_SPACE, KC_SPACE, KC_N, FR_COMM, FR_SCLN, FR_COLN, FR_EXLM, NO_ALGR, KC_LEFT, KC_DOWN, KC_RIGHT, KC_KP_ENTER), + + [1] = KEYMAP( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TAB, KC_CAPS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_FN0, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS,\ + KC_LALT, FR_AMP, FR_EACU, FR_QUOT, FR_APOS, FR_LPRN, KC_BSPACE, KC_DELETE, FR_MINS, FR_EGRV, FR_UNDS, FR_CCED, FR_AGRV, FR_RPRN, FR_EQL, KC_7, KC_8, KC_9,\ + KC_LGUI, FR_A, FR_Z, KC_E, KC_R, KC_T, KC_LSFT, KC_ENT, KC_Y, KC_U, KC_I, KC_O, KC_P, FR_CIRC, FR_DLR, KC_4, KC_5, KC_6, KC_KP_PLUS,\ + KC_LCTL, FR_Q, KC_S, KC_D, KC_F, KC_G, KC_ENT, KC_H, KC_J, KC_K, KC_L, FR_M, FR_UGRV, FR_ASTR, KC_1, KC_2, KC_3,\ + FR_LESS, FR_W, KC_X, KC_C, KC_V, KC_B, KC_SPACE, KC_SPACE, KC_N, FR_COMM, FR_SCLN, FR_COLN, FR_EXLM, NO_ALGR, KC_LEFT, KC_DOWN, KC_RIGHT, KC_KP_ENTER), +}; + + +const uint16_t PROGMEM fn_actions[] = { + ACTION_LAYER_TOGGLE(1), +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + return MACRO_NONE; +}; + diff --git a/keyboards/handwired/reddot/keymaps/default/readme.md b/keyboards/handwired/reddot/keymaps/default/readme.md new file mode 100755 index 000000000..f04833c3e --- /dev/null +++ b/keyboards/handwired/reddot/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for handwired/reddot diff --git a/keyboards/handwired/reddot/readme.md b/keyboards/handwired/reddot/readme.md new file mode 100755 index 000000000..11bcba54a --- /dev/null +++ b/keyboards/handwired/reddot/readme.md @@ -0,0 +1,24 @@ +## RedDot Specific Info ## + + +## Quantum MK Firmware + +For the full Quantum feature list, see [the parent README.md](/README.md). + +## Building + +Download or clone the whole firmware and navigate to the keyboard/reddot folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. + +Depending on which keymap you would like to use, you will have to compile slightly differently. + +### Default +To build with the default keymap, simply run `make`. + +### Other Keymaps +Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `.c` and see keymap document (you can find in top README.md) and existent keymap files. + +To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like: +``` +$ make KEYMAP=[default|jack|] +``` +Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. diff --git a/keyboards/handwired/reddot/reddot.c b/keyboards/handwired/reddot/reddot.c new file mode 100755 index 000000000..4e1efc06c --- /dev/null +++ b/keyboards/handwired/reddot/reddot.c @@ -0,0 +1,7 @@ +#include "reddot.h" + +void matrix_init_kb(void) { + + matrix_init_user(); +} + diff --git a/keyboards/handwired/reddot/reddot.h b/keyboards/handwired/reddot/reddot.h new file mode 100755 index 000000000..f0c4be557 --- /dev/null +++ b/keyboards/handwired/reddot/reddot.h @@ -0,0 +1,20 @@ +#ifndef REDDOT_H +#define REDDOT_H + +#include "quantum.h" + +#define KEYMAP( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k10, k11, k12, k13, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k30, k31, k32, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k50, k51, k52, k53, \ + k60, k61, k62, k63, k64, k65, k66, k68, k69, k6A, k6B, k6C, k6D, k6E, k70, k71, k72, \ + k80, k81, k82, k83, k84, k85, k86, k88, k89, k8A, k8B, k8C, k8D, k8E, k90, k91, k92, k93\ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k10, k11, k12, k13 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k30, k31, k32, KC_NO }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k50, k51, k52, k53 }, \ + { k60, k61, k62, k63, k64, k65, k66, KC_NO, k68, k69, k6A, k6B, k6C, k6D, k6E, k70, k71, k72, KC_NO }, \ + { k80, k81, k82, k83, k84, k85, k86, KC_NO, k88, k89, k8A, k8B, k8C, k8D, k8E, k90, k91, k92, k93 } \ +} + +#endif diff --git a/keyboards/handwired/reddot/rules.mk b/keyboards/handwired/reddot/rules.mk new file mode 100755 index 000000000..9a4409fe6 --- /dev/null +++ b/keyboards/handwired/reddot/rules.mk @@ -0,0 +1,88 @@ + +#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 + +# for avr upload +USB ?= /dev/cu.usbmodem1421 +# +# 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) + + +ifdef TEENSY2 + OPT_DEFS += -DATREUS_TEENSY2 + ATREUS_UPLOAD_COMMAND = teensy_loader_cli -w -mmcu=$(MCU) $(TARGET).hex +else + OPT_DEFS += -DATREUS_ASTAR + OPT_DEFS += -DCATERINA_BOOTLOADER + ATREUS_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \ + avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) +endif +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# MCU name + +# 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 ?= no # USB Nkey Rollover +BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default +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 + +ifndef QUANTUM_DIR + include ../../../Makefile +endif + +upload: build + $(ATREUS_UPLOAD_COMMAND) + -- cgit v1.2.3 From d8a9c63c265869822a77ad5c5cb7c8dfa4ff1f6c Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Wed, 1 Feb 2017 05:07:05 +0700 Subject: Implement runtime selectable output (USB or BT) --- tmk_core/protocol/lufa.mk | 1 + tmk_core/protocol/lufa/lufa.c | 116 ++++++++++++++-------------------- tmk_core/protocol/lufa/outputselect.c | 56 ++++++++++++++++ tmk_core/protocol/lufa/outputselect.h | 41 ++++++++++++ 4 files changed, 145 insertions(+), 69 deletions(-) create mode 100644 tmk_core/protocol/lufa/outputselect.c create mode 100644 tmk_core/protocol/lufa/outputselect.h diff --git a/tmk_core/protocol/lufa.mk b/tmk_core/protocol/lufa.mk index 151d26cbc..26337cb94 100644 --- a/tmk_core/protocol/lufa.mk +++ b/tmk_core/protocol/lufa.mk @@ -15,6 +15,7 @@ endif LUFA_SRC = lufa.c \ descriptor.c \ + outputselect.c \ $(LUFA_SRC_USB) ifeq ($(strip $(MIDI_ENABLE)), yes) diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index 6dd5959dc..ba49284c9 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -53,6 +53,7 @@ #include "lufa.h" #include "quantum.h" #include +#include "outputselect.h" #ifdef NKRO_ENABLE #include "keycode_config.h" @@ -589,59 +590,33 @@ void EVENT_USB_Device_ControlRequest(void) /******************************************************************************* * Host driver -p ******************************************************************************/ static uint8_t keyboard_leds(void) { return keyboard_led_stats; } -#define SendToUSB 1 -#define SendToBT 2 -#define SendToBLE 4 - -static inline uint8_t where_to_send(void) { -#ifdef ADAFRUIT_BLE_ENABLE -#if 0 - if (adafruit_ble_is_connected()) { - // For testing, send to BLE as a priority - return SendToBLE; - } -#endif - - // This is the real policy - if (USB_DeviceState != DEVICE_STATE_Configured) { - if (adafruit_ble_is_connected()) { - return SendToBLE; - } - } -#endif - return ((USB_DeviceState == DEVICE_STATE_Configured) ? SendToUSB : 0) -#ifdef BLUETOOTH_ENABLE - || SendToBT -#endif - ; -} - static void send_keyboard(report_keyboard_t *report) { + uint8_t timeout = 255; + uint8_t where = where_to_send(); + #ifdef BLUETOOTH_ENABLE - bluefruit_serial_send(0xFD); - for (uint8_t i = 0; i < KEYBOARD_EPSIZE; i++) { - bluefruit_serial_send(report->raw[i]); + if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) { + bluefruit_serial_send(0xFD); + for (uint8_t i = 0; i < KEYBOARD_EPSIZE; i++) { + bluefruit_serial_send(report->raw[i]); + } } #endif - uint8_t timeout = 255; - uint8_t where = where_to_send(); - #ifdef ADAFRUIT_BLE_ENABLE - if (where & SendToBLE) { + if (where == OUTPUT_ADAFRUIT_BLE) { adafruit_ble_send_keys(report->mods, report->keys, sizeof(report->keys)); } #endif - if (!(where & SendToUSB)) { + if (where != OUTPUT_USB && where != OUTPUT_USB_AND_BT) { return; } @@ -681,30 +656,31 @@ static void send_keyboard(report_keyboard_t *report) static void send_mouse(report_mouse_t *report) { #ifdef MOUSE_ENABLE + uint8_t timeout = 255; + uint8_t where = where_to_send(); #ifdef BLUETOOTH_ENABLE - bluefruit_serial_send(0xFD); - bluefruit_serial_send(0x00); - bluefruit_serial_send(0x03); - bluefruit_serial_send(report->buttons); - bluefruit_serial_send(report->x); - bluefruit_serial_send(report->y); - bluefruit_serial_send(report->v); // should try sending the wheel v here - bluefruit_serial_send(report->h); // should try sending the wheel h here - bluefruit_serial_send(0x00); + if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) { + bluefruit_serial_send(0xFD); + bluefruit_serial_send(0x00); + bluefruit_serial_send(0x03); + bluefruit_serial_send(report->buttons); + bluefruit_serial_send(report->x); + bluefruit_serial_send(report->y); + bluefruit_serial_send(report->v); // should try sending the wheel v here + bluefruit_serial_send(report->h); // should try sending the wheel h here + bluefruit_serial_send(0x00); + } #endif - uint8_t timeout = 255; - - uint8_t where = where_to_send(); - #ifdef ADAFRUIT_BLE_ENABLE - if (where & SendToBLE) { + if (where == OUTPUT_ADAFRUIT_BLE) { // FIXME: mouse buttons adafruit_ble_send_mouse_move(report->x, report->y, report->v, report->h); } #endif - if (!(where & SendToUSB)) { + + if (where != OUTPUT_USB && where != OUTPUT_USB_AND_BT) { return; } @@ -746,32 +722,34 @@ static void send_system(uint16_t data) static void send_consumer(uint16_t data) { + uint8_t timeout = 255; + uint8_t where = where_to_send(); #ifdef BLUETOOTH_ENABLE - static uint16_t last_data = 0; - if (data == last_data) return; - last_data = data; - uint16_t bitmap = CONSUMER2BLUEFRUIT(data); - bluefruit_serial_send(0xFD); - bluefruit_serial_send(0x00); - bluefruit_serial_send(0x02); - bluefruit_serial_send((bitmap>>8)&0xFF); - bluefruit_serial_send(bitmap&0xFF); - bluefruit_serial_send(0x00); - bluefruit_serial_send(0x00); - bluefruit_serial_send(0x00); - bluefruit_serial_send(0x00); + if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) { + static uint16_t last_data = 0; + if (data == last_data) return; + last_data = data; + uint16_t bitmap = CONSUMER2BLUEFRUIT(data); + bluefruit_serial_send(0xFD); + bluefruit_serial_send(0x00); + bluefruit_serial_send(0x02); + bluefruit_serial_send((bitmap>>8)&0xFF); + bluefruit_serial_send(bitmap&0xFF); + bluefruit_serial_send(0x00); + bluefruit_serial_send(0x00); + bluefruit_serial_send(0x00); + bluefruit_serial_send(0x00); + } #endif - uint8_t timeout = 255; - uint8_t where = where_to_send(); - #ifdef ADAFRUIT_BLE_ENABLE - if (where & SendToBLE) { + if (where == OUTPUT_ADAFRUIT_BLE) { adafruit_ble_send_consumer_key(data, 0); } #endif - if (!(where & SendToUSB)) { + + if (where != OUTPUT_USB && where != OUTPUT_USB_AND_BT) { return; } diff --git a/tmk_core/protocol/lufa/outputselect.c b/tmk_core/protocol/lufa/outputselect.c new file mode 100644 index 000000000..5d2457bff --- /dev/null +++ b/tmk_core/protocol/lufa/outputselect.c @@ -0,0 +1,56 @@ +/* +Copyright 2017 Priyadi Iman Nurcahyo +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 "lufa.h" +#include "outputselect.h" +#ifdef ADAFRUIT_BLE_ENABLE + #include "adafruit_ble.h" +#endif + +uint8_t desired_output = OUTPUT_DEFAULT; + +void set_output(uint8_t output) { + set_output_user(output); + desired_output = output; +} + +__attribute__((weak)) +void set_output_user(uint8_t output) { +} + +uint8_t auto_detect_output(void) { + if (USB_DeviceState == DEVICE_STATE_Configured) { + return OUTPUT_USB; + } + +#ifdef ADAFRUIT_BLE_ENABLE + if (adafruit_ble_is_connected()) { + return OUTPUT_ADAFRUIT_BLE; + } +#endif + +#ifdef BLUETOOTH_ENABLE + return OUTPUT_BLUETOOTH; // should check if BT is connected here +#endif + + return OUTPUT_NONE; +} + +uint8_t where_to_send(void) { + if (desired_output == OUTPUT_AUTO) { + return auto_detect_output(); + } + return desired_output; +} + diff --git a/tmk_core/protocol/lufa/outputselect.h b/tmk_core/protocol/lufa/outputselect.h new file mode 100644 index 000000000..79b4dd35d --- /dev/null +++ b/tmk_core/protocol/lufa/outputselect.h @@ -0,0 +1,41 @@ +/* +Copyright 2017 Priyadi Iman Nurcahyo +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 . +*/ + +enum outputs { + OUTPUT_AUTO, + + OUTPUT_NONE, + OUTPUT_USB, + OUTPUT_BLUETOOTH, + OUTPUT_ADAFRUIT_BLE, + + // backward compatibility + OUTPUT_USB_AND_BT +}; + +/** + * backward compatibility for BLUETOOTH_ENABLE, send to BT and USB by default + */ +#ifndef OUTPUT_DEFAULT + #ifdef BLUETOOTH_ENABLE + #define OUTPUT_DEFAULT OUTPUT_USB_AND_BT + #else + #define OUTPUT_DEFAULT OUTPUT_AUTO + #endif +#endif + +void set_output(uint8_t output); +void set_output_user(uint8_t output); +uint8_t auto_detect_output(void); +uint8_t where_to_send(void); \ No newline at end of file -- cgit v1.2.3 From 407f949e4b1f1fcee7470df1ff28260d24215f10 Mon Sep 17 00:00:00 2001 From: Erik Dasque Date: Tue, 31 Jan 2017 19:59:59 -0500 Subject: Reverted Dockerfile to put the CMD back --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c42bbeb32..744ded857 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,4 +25,5 @@ ENV subproject=ez ENV keymap=default VOLUME /qmk -WORKDIR /qmk \ No newline at end of file +WORKDIR /qmk +CMD make clean ; make keyboard=${keyboard} subproject=${subproject} keymap=${keymap} -- cgit v1.2.3 From f46c2b3ca07c83e13bea6fc33a3c95fed4a9ece2 Mon Sep 17 00:00:00 2001 From: Erez Zukerman Date: Tue, 31 Jan 2017 21:31:05 -0500 Subject: Introduces ALGR_T for dual-function AltGr --- quantum/quantum_keycodes.h | 1 + 1 file changed, 1 insertion(+) diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 4853655f9..91324be35 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -290,6 +290,7 @@ enum quantum_keycodes { #define CTL_T(kc) MT(MOD_LCTL, kc) #define SFT_T(kc) MT(MOD_LSFT, kc) #define ALT_T(kc) MT(MOD_LALT, kc) +#define ALGR_T(kc) MT(MOD_RALT, kc) // dual-function AltGR #define GUI_T(kc) MT(MOD_LGUI, kc) #define C_S_T(kc) MT((MOD_LCTL | MOD_LSFT), kc) // Control + Shift e.g. for gnome-terminal #define MEH_T(kc) MT((MOD_LCTL | MOD_LSFT | MOD_LALT), kc) // Meh is a less hyper version of the Hyper key -- doesn't include Win or Cmd, so just alt+shift+ctrl -- cgit v1.2.3 From 467e2841784b31d9d7b010a6c2c357e43dd4d47d Mon Sep 17 00:00:00 2001 From: lucwastiaux Date: Wed, 1 Feb 2017 13:46:00 +0800 Subject: increase timeout for dual mode caps key --- keyboards/ergodox/keymaps/dvorak_programmer/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c index 4a2ffcce4..4594a7698 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c +++ b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c @@ -374,7 +374,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) break; case DUAL_CAPSLOCK: if (record->event.pressed) { - if(timer_elapsed(capslock_timer) < 100) { + if(timer_elapsed(capslock_timer) < 300) { // activate SHELL_NAV layer_on(SHELL_NAV); } else { -- cgit v1.2.3 From c17070eca545f654f91cf3dcba6c6c611e0f8d03 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Wed, 1 Feb 2017 15:35:21 +0700 Subject: Add layer switcher keycodes: OUT_AUTO, OUT_USB, OUT_BT, OUT_BLE --- quantum/quantum.c | 29 +++++++++++++++++++++++++++++ quantum/quantum_keycodes.h | 10 ++++++++++ 2 files changed, 39 insertions(+) diff --git a/quantum/quantum.c b/quantum/quantum.c index 63ffe2074..1d1a691e2 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -1,4 +1,5 @@ #include "quantum.h" +#include "outputselect.h" #ifndef TAPPING_TERM #define TAPPING_TERM 200 @@ -212,6 +213,34 @@ bool process_record_quantum(keyrecord_t *record) { return false; break; #endif + case OUT_AUTO: + if (record->event.pressed) { + set_output(OUTPUT_AUTO); + } + return false; + break; + case OUT_USB: + if (record->event.pressed) { + set_output(OUTPUT_USB); + } + return false; + break; + #ifdef BLUETOOTH_ENABLE + case OUT_BT: + if (record->event.pressed) { + set_output(OUTPUT_BLUETOOTH); + } + return false; + break; + #endif + #ifdef ADAFRUIT_BLE_ENABLE + case OUT_BLE: + if (record->event.pressed) { + set_output(OUTPUT_ADAFRUIT_BLE); + } + return false; + break; + #endif case MAGIC_SWAP_CONTROL_CAPSLOCK ... MAGIC_TOGGLE_NKRO: if (record->event.pressed) { // MAGIC actions (BOOTMAGIC without the boot) diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 4853655f9..4f1345b49 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -141,6 +141,16 @@ enum quantum_keycodes { PRINT_ON, PRINT_OFF, + // output selection + OUT_AUTO, + OUT_USB, +#ifdef BLUETOOTH_ENABLE + OUT_BT, +#endif +#ifdef ADAFRUIT_BLE_ENABLE + OUT_BLE, +#endif + // always leave at the end SAFE_RANGE }; -- cgit v1.2.3 From 72e95809a1d3da869942441a2ad7107c7a55d688 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Wed, 1 Feb 2017 17:55:13 +0700 Subject: Move outputselect to parent dir to satisfy non LUFA keyboards --- tmk_core/protocol/lufa/outputselect.c | 56 ----------------------------------- tmk_core/protocol/lufa/outputselect.h | 41 ------------------------- tmk_core/protocol/outputselect.c | 56 +++++++++++++++++++++++++++++++++++ tmk_core/protocol/outputselect.h | 41 +++++++++++++++++++++++++ 4 files changed, 97 insertions(+), 97 deletions(-) delete mode 100644 tmk_core/protocol/lufa/outputselect.c delete mode 100644 tmk_core/protocol/lufa/outputselect.h create mode 100644 tmk_core/protocol/outputselect.c create mode 100644 tmk_core/protocol/outputselect.h diff --git a/tmk_core/protocol/lufa/outputselect.c b/tmk_core/protocol/lufa/outputselect.c deleted file mode 100644 index 5d2457bff..000000000 --- a/tmk_core/protocol/lufa/outputselect.c +++ /dev/null @@ -1,56 +0,0 @@ -/* -Copyright 2017 Priyadi Iman Nurcahyo -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 "lufa.h" -#include "outputselect.h" -#ifdef ADAFRUIT_BLE_ENABLE - #include "adafruit_ble.h" -#endif - -uint8_t desired_output = OUTPUT_DEFAULT; - -void set_output(uint8_t output) { - set_output_user(output); - desired_output = output; -} - -__attribute__((weak)) -void set_output_user(uint8_t output) { -} - -uint8_t auto_detect_output(void) { - if (USB_DeviceState == DEVICE_STATE_Configured) { - return OUTPUT_USB; - } - -#ifdef ADAFRUIT_BLE_ENABLE - if (adafruit_ble_is_connected()) { - return OUTPUT_ADAFRUIT_BLE; - } -#endif - -#ifdef BLUETOOTH_ENABLE - return OUTPUT_BLUETOOTH; // should check if BT is connected here -#endif - - return OUTPUT_NONE; -} - -uint8_t where_to_send(void) { - if (desired_output == OUTPUT_AUTO) { - return auto_detect_output(); - } - return desired_output; -} - diff --git a/tmk_core/protocol/lufa/outputselect.h b/tmk_core/protocol/lufa/outputselect.h deleted file mode 100644 index 79b4dd35d..000000000 --- a/tmk_core/protocol/lufa/outputselect.h +++ /dev/null @@ -1,41 +0,0 @@ -/* -Copyright 2017 Priyadi Iman Nurcahyo -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 . -*/ - -enum outputs { - OUTPUT_AUTO, - - OUTPUT_NONE, - OUTPUT_USB, - OUTPUT_BLUETOOTH, - OUTPUT_ADAFRUIT_BLE, - - // backward compatibility - OUTPUT_USB_AND_BT -}; - -/** - * backward compatibility for BLUETOOTH_ENABLE, send to BT and USB by default - */ -#ifndef OUTPUT_DEFAULT - #ifdef BLUETOOTH_ENABLE - #define OUTPUT_DEFAULT OUTPUT_USB_AND_BT - #else - #define OUTPUT_DEFAULT OUTPUT_AUTO - #endif -#endif - -void set_output(uint8_t output); -void set_output_user(uint8_t output); -uint8_t auto_detect_output(void); -uint8_t where_to_send(void); \ No newline at end of file diff --git a/tmk_core/protocol/outputselect.c b/tmk_core/protocol/outputselect.c new file mode 100644 index 000000000..5d2457bff --- /dev/null +++ b/tmk_core/protocol/outputselect.c @@ -0,0 +1,56 @@ +/* +Copyright 2017 Priyadi Iman Nurcahyo +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 "lufa.h" +#include "outputselect.h" +#ifdef ADAFRUIT_BLE_ENABLE + #include "adafruit_ble.h" +#endif + +uint8_t desired_output = OUTPUT_DEFAULT; + +void set_output(uint8_t output) { + set_output_user(output); + desired_output = output; +} + +__attribute__((weak)) +void set_output_user(uint8_t output) { +} + +uint8_t auto_detect_output(void) { + if (USB_DeviceState == DEVICE_STATE_Configured) { + return OUTPUT_USB; + } + +#ifdef ADAFRUIT_BLE_ENABLE + if (adafruit_ble_is_connected()) { + return OUTPUT_ADAFRUIT_BLE; + } +#endif + +#ifdef BLUETOOTH_ENABLE + return OUTPUT_BLUETOOTH; // should check if BT is connected here +#endif + + return OUTPUT_NONE; +} + +uint8_t where_to_send(void) { + if (desired_output == OUTPUT_AUTO) { + return auto_detect_output(); + } + return desired_output; +} + diff --git a/tmk_core/protocol/outputselect.h b/tmk_core/protocol/outputselect.h new file mode 100644 index 000000000..79b4dd35d --- /dev/null +++ b/tmk_core/protocol/outputselect.h @@ -0,0 +1,41 @@ +/* +Copyright 2017 Priyadi Iman Nurcahyo +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 . +*/ + +enum outputs { + OUTPUT_AUTO, + + OUTPUT_NONE, + OUTPUT_USB, + OUTPUT_BLUETOOTH, + OUTPUT_ADAFRUIT_BLE, + + // backward compatibility + OUTPUT_USB_AND_BT +}; + +/** + * backward compatibility for BLUETOOTH_ENABLE, send to BT and USB by default + */ +#ifndef OUTPUT_DEFAULT + #ifdef BLUETOOTH_ENABLE + #define OUTPUT_DEFAULT OUTPUT_USB_AND_BT + #else + #define OUTPUT_DEFAULT OUTPUT_AUTO + #endif +#endif + +void set_output(uint8_t output); +void set_output_user(uint8_t output); +uint8_t auto_detect_output(void); +uint8_t where_to_send(void); \ No newline at end of file -- cgit v1.2.3 From 2bef8b5b88547ce28fb056559b058e35109278b3 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Wed, 1 Feb 2017 19:37:52 +0700 Subject: Limit outputselect to AVR only for now --- quantum/quantum.c | 4 +++ quantum/quantum.h | 1 - tmk_core/protocol/lufa.mk | 2 +- tmk_core/protocol/lufa/outputselect.c | 56 +++++++++++++++++++++++++++++++++++ tmk_core/protocol/lufa/outputselect.h | 41 +++++++++++++++++++++++++ tmk_core/protocol/outputselect.c | 56 ----------------------------------- tmk_core/protocol/outputselect.h | 41 ------------------------- 7 files changed, 102 insertions(+), 99 deletions(-) create mode 100644 tmk_core/protocol/lufa/outputselect.c create mode 100644 tmk_core/protocol/lufa/outputselect.h delete mode 100644 tmk_core/protocol/outputselect.c delete mode 100644 tmk_core/protocol/outputselect.h diff --git a/quantum/quantum.c b/quantum/quantum.c index 1d1a691e2..585692d4a 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -1,5 +1,7 @@ #include "quantum.h" +#if defined(__AVR__) #include "outputselect.h" +#endif #ifndef TAPPING_TERM #define TAPPING_TERM 200 @@ -213,6 +215,7 @@ bool process_record_quantum(keyrecord_t *record) { return false; break; #endif + #if defined(__AVR__) case OUT_AUTO: if (record->event.pressed) { set_output(OUTPUT_AUTO); @@ -241,6 +244,7 @@ bool process_record_quantum(keyrecord_t *record) { return false; break; #endif + #endif case MAGIC_SWAP_CONTROL_CAPSLOCK ... MAGIC_TOGGLE_NKRO: if (record->event.pressed) { // MAGIC actions (BOOTMAGIC without the boot) diff --git a/quantum/quantum.h b/quantum/quantum.h index e6adf974a..810e9e4bb 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -15,7 +15,6 @@ #ifdef RGBLIGHT_ENABLE #include "rgblight.h" #endif - #include "action_layer.h" #include "eeconfig.h" #include diff --git a/tmk_core/protocol/lufa.mk b/tmk_core/protocol/lufa.mk index 26337cb94..de0cc795f 100644 --- a/tmk_core/protocol/lufa.mk +++ b/tmk_core/protocol/lufa.mk @@ -8,7 +8,7 @@ LUFA_PATH ?= $(LUFA_DIR)/LUFA-git ifneq (, $(wildcard $(TMK_PATH)/$(LUFA_PATH)/LUFA/Build/lufa_sources.mk)) # New build system from 20120730 LUFA_ROOT_PATH = $(LUFA_PATH)/LUFA - include $(TMK_PATH)/$(LUFA_PATH)/LUFA/Build/lufa_sources.mk + include $(TMK_PATH)/$(LUFA_PATH)/LUFA/Build/lufa_sources.mk else include $(TMK_PATH)/$(LUFA_PATH)/LUFA/makefile endif diff --git a/tmk_core/protocol/lufa/outputselect.c b/tmk_core/protocol/lufa/outputselect.c new file mode 100644 index 000000000..0110928de --- /dev/null +++ b/tmk_core/protocol/lufa/outputselect.c @@ -0,0 +1,56 @@ +/* +Copyright 2017 Priyadi Iman Nurcahyo +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 "quantum.h" +#include "outputselect.h" +#ifdef ADAFRUIT_BLE_ENABLE + #include "adafruit_ble.h" +#endif + +uint8_t desired_output = OUTPUT_DEFAULT; + +void set_output(uint8_t output) { + set_output_user(output); + desired_output = output; +} + +__attribute__((weak)) +void set_output_user(uint8_t output) { +} + +uint8_t auto_detect_output(void) { + if (USB_DeviceState == DEVICE_STATE_Configured) { + return OUTPUT_USB; + } + +#ifdef ADAFRUIT_BLE_ENABLE + if (adafruit_ble_is_connected()) { + return OUTPUT_ADAFRUIT_BLE; + } +#endif + +#ifdef BLUETOOTH_ENABLE + return OUTPUT_BLUETOOTH; // should check if BT is connected here +#endif + + return OUTPUT_NONE; +} + +uint8_t where_to_send(void) { + if (desired_output == OUTPUT_AUTO) { + return auto_detect_output(); + } + return desired_output; +} + diff --git a/tmk_core/protocol/lufa/outputselect.h b/tmk_core/protocol/lufa/outputselect.h new file mode 100644 index 000000000..79b4dd35d --- /dev/null +++ b/tmk_core/protocol/lufa/outputselect.h @@ -0,0 +1,41 @@ +/* +Copyright 2017 Priyadi Iman Nurcahyo +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 . +*/ + +enum outputs { + OUTPUT_AUTO, + + OUTPUT_NONE, + OUTPUT_USB, + OUTPUT_BLUETOOTH, + OUTPUT_ADAFRUIT_BLE, + + // backward compatibility + OUTPUT_USB_AND_BT +}; + +/** + * backward compatibility for BLUETOOTH_ENABLE, send to BT and USB by default + */ +#ifndef OUTPUT_DEFAULT + #ifdef BLUETOOTH_ENABLE + #define OUTPUT_DEFAULT OUTPUT_USB_AND_BT + #else + #define OUTPUT_DEFAULT OUTPUT_AUTO + #endif +#endif + +void set_output(uint8_t output); +void set_output_user(uint8_t output); +uint8_t auto_detect_output(void); +uint8_t where_to_send(void); \ No newline at end of file diff --git a/tmk_core/protocol/outputselect.c b/tmk_core/protocol/outputselect.c deleted file mode 100644 index 5d2457bff..000000000 --- a/tmk_core/protocol/outputselect.c +++ /dev/null @@ -1,56 +0,0 @@ -/* -Copyright 2017 Priyadi Iman Nurcahyo -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 "lufa.h" -#include "outputselect.h" -#ifdef ADAFRUIT_BLE_ENABLE - #include "adafruit_ble.h" -#endif - -uint8_t desired_output = OUTPUT_DEFAULT; - -void set_output(uint8_t output) { - set_output_user(output); - desired_output = output; -} - -__attribute__((weak)) -void set_output_user(uint8_t output) { -} - -uint8_t auto_detect_output(void) { - if (USB_DeviceState == DEVICE_STATE_Configured) { - return OUTPUT_USB; - } - -#ifdef ADAFRUIT_BLE_ENABLE - if (adafruit_ble_is_connected()) { - return OUTPUT_ADAFRUIT_BLE; - } -#endif - -#ifdef BLUETOOTH_ENABLE - return OUTPUT_BLUETOOTH; // should check if BT is connected here -#endif - - return OUTPUT_NONE; -} - -uint8_t where_to_send(void) { - if (desired_output == OUTPUT_AUTO) { - return auto_detect_output(); - } - return desired_output; -} - diff --git a/tmk_core/protocol/outputselect.h b/tmk_core/protocol/outputselect.h deleted file mode 100644 index 79b4dd35d..000000000 --- a/tmk_core/protocol/outputselect.h +++ /dev/null @@ -1,41 +0,0 @@ -/* -Copyright 2017 Priyadi Iman Nurcahyo -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 . -*/ - -enum outputs { - OUTPUT_AUTO, - - OUTPUT_NONE, - OUTPUT_USB, - OUTPUT_BLUETOOTH, - OUTPUT_ADAFRUIT_BLE, - - // backward compatibility - OUTPUT_USB_AND_BT -}; - -/** - * backward compatibility for BLUETOOTH_ENABLE, send to BT and USB by default - */ -#ifndef OUTPUT_DEFAULT - #ifdef BLUETOOTH_ENABLE - #define OUTPUT_DEFAULT OUTPUT_USB_AND_BT - #else - #define OUTPUT_DEFAULT OUTPUT_AUTO - #endif -#endif - -void set_output(uint8_t output); -void set_output_user(uint8_t output); -uint8_t auto_detect_output(void); -uint8_t where_to_send(void); \ No newline at end of file -- cgit v1.2.3 From 98f9a2e6dfe302ad12844a8ed140bb34ed2c592f Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Wed, 1 Feb 2017 20:18:52 +0700 Subject: Fix wrong include --- tmk_core/protocol/lufa/outputselect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmk_core/protocol/lufa/outputselect.c b/tmk_core/protocol/lufa/outputselect.c index 0110928de..5d2457bff 100644 --- a/tmk_core/protocol/lufa/outputselect.c +++ b/tmk_core/protocol/lufa/outputselect.c @@ -12,7 +12,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "quantum.h" +#include "lufa.h" #include "outputselect.h" #ifdef ADAFRUIT_BLE_ENABLE #include "adafruit_ble.h" -- cgit v1.2.3 From e7c4f621f14b60bde68c01ae076cac49cac9927e Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Wed, 1 Feb 2017 22:30:06 +0700 Subject: Restrict outputselect to LUFA only for now --- quantum/quantum.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quantum/quantum.c b/quantum/quantum.c index 585692d4a..ad957a1b1 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -1,5 +1,5 @@ #include "quantum.h" -#if defined(__AVR__) +#ifdef PROTOCOL_LUFA #include "outputselect.h" #endif @@ -215,7 +215,7 @@ bool process_record_quantum(keyrecord_t *record) { return false; break; #endif - #if defined(__AVR__) + #ifdef PROTOCOL_LUFA case OUT_AUTO: if (record->event.pressed) { set_output(OUTPUT_AUTO); -- cgit v1.2.3 From a3da586505034584c75f4407e9ee1edeba50e0f8 Mon Sep 17 00:00:00 2001 From: Luiz Ribeiro Date: Wed, 1 Feb 2017 21:57:44 -0500 Subject: Fix V-USB bug on Windows 10 --- tmk_core/protocol/vusb/vusb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tmk_core/protocol/vusb/vusb.c b/tmk_core/protocol/vusb/vusb.c index a8c13b928..022ac6f6b 100644 --- a/tmk_core/protocol/vusb/vusb.c +++ b/tmk_core/protocol/vusb/vusb.c @@ -280,7 +280,7 @@ const PROGMEM uchar keyboard_hid_report[] = { 0x95, 0x06, // Report Count (6), 0x75, 0x08, // Report Size (8), 0x15, 0x00, // Logical Minimum (0), - 0x25, 0xFF, 0x00, // Logical Maximum(255), + 0x26, 0xFF, 0x00, // Logical Maximum(255), 0x05, 0x07, // Usage Page (Key Codes), 0x19, 0x00, // Usage Minimum (0), 0x29, 0xFF, // Usage Maximum (255), @@ -350,7 +350,7 @@ const PROGMEM uchar mouse_hid_report[] = { 0xa1, 0x01, // COLLECTION (Application) 0x85, REPORT_ID_SYSTEM, // REPORT_ID (2) 0x15, 0x01, // LOGICAL_MINIMUM (0x1) - 0x25, 0xb7, 0x00, // LOGICAL_MAXIMUM (0xb7) + 0x26, 0xb7, 0x00, // LOGICAL_MAXIMUM (0xb7) 0x19, 0x01, // USAGE_MINIMUM (0x1) 0x29, 0xb7, // USAGE_MAXIMUM (0xb7) 0x75, 0x10, // REPORT_SIZE (16) -- cgit v1.2.3 From f787f4291a6e3a363343f80c1c81b13b065ae974 Mon Sep 17 00:00:00 2001 From: Osamu Aoki Date: Thu, 2 Feb 2017 23:15:08 +0900 Subject: Typo fixes --- Makefile | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/Makefile b/Makefile index 550be8195..9d9c9629d 100644 --- a/Makefile +++ b/Makefile @@ -16,10 +16,10 @@ ifdef SILENT endif # We need to make sure that silent is always turned off at the top level -# Otherwise the [OK], [ERROR] and [WARN] messags won't be displayed correctly +# Otherwise the [OK], [ERROR] and [WARN] messages won't be displayed correctly override SILENT := false -ON_ERROR := error_occured=1 +ON_ERROR := error_occurred=1 STARTING_MAKEFILE := $(firstword $(MAKEFILE_LIST)) ROOT_MAKEFILE := $(lastword $(MAKEFILE_LIST)) @@ -34,13 +34,13 @@ ABS_ROOT_DIR := $(dir $(ABS_ROOT_MAKEFILE)) STARTING_DIR := $(subst $(ABS_ROOT_DIR),,$(ABS_STARTING_DIR)) BUILD_DIR := $(ROOT_DIR)/.build TEST_DIR := $(BUILD_DIR)/test -ERROR_FILE := $(BUILD_DIR)/error_occured +ERROR_FILE := $(BUILD_DIR)/error_occurred MAKEFILE_INCLUDED=yes # Helper function to process the newt element of a space separated path # It works a bit like the traditional functional head tail -# so the CURRENT_PATH_ELEMENT will beome the new head +# so the CURRENT_PATH_ELEMENT will become the new head # and the PATH_ELEMENTS are the rest that are still unprocessed define NEXT_PATH_ELEMENT $$(eval CURRENT_PATH_ELEMENT := $$(firstword $$(PATH_ELEMENTS))) @@ -84,7 +84,7 @@ endif # Only consider folders with makefiles, to prevent errors in case there are extra folders KEYBOARDS := $(notdir $(patsubst %/Makefile,%,$(wildcard $(ROOT_DIR)/keyboards/*/Makefile))) -#Compability with the old make variables, anything you specify directly on the command line +#Compatibility with the old make variables, anything you specify directly on the command line # always overrides the detected folders ifdef keyboard KEYBOARD := $(keyboard) @@ -106,7 +106,7 @@ endif #$(info Keyboards: $(KEYBOARDS)) -# Set the default goal depening on where we are running make from +# Set the default goal depending on where we are running make from # this handles the case where you run make without any arguments .DEFAULT_GOAL := all ifneq ($(KEYMAP),) @@ -170,7 +170,7 @@ define TRY_TO_MATCH_RULE_FROM_LIST_HELPER3 endef # A recursive helper function for finding the longest match -# $1 The list to be checed +# $1 The list to be checked # It works by always removing the currently matched item from the list # and call itself recursively, until a match is found define TRY_TO_MATCH_RULE_FROM_LIST_HELPER2 @@ -180,7 +180,7 @@ define TRY_TO_MATCH_RULE_FROM_LIST_HELPER2 $$(eval $$(call TRY_TO_MATCH_RULE_FROM_LIST_HELPER3,$1)) # If a match is found in the current list, otherwise just return what we had before ifeq ($$(RULE_FOUND),true) - # Save the best match so far and call itself recursivel + # Save the best match so far and call itself recursively BEST_MATCH := $$(MATCHED_ITEM) BEST_MATCH_RULE := $$(RULE) RULE_FOUND := false @@ -337,7 +337,7 @@ define PARSE_SUBPROJECT $$(eval $$(call PARSE_ALL_KEYMAPS)) endif else - # As earlier mentione,d when allsb is specified, we call our self recursively + # As earlier mentioned when allsb is specified, we call our self recursively # for all of the subprojects $$(eval $$(call PARSE_ALL_IN_LIST,PARSE_SUBPROJECT,$(SUBPROJECTS))) endif @@ -403,11 +403,11 @@ define BUILD printf "$$(MAKE_MSG)\n\n"; \ $$(MAKE_CMD) $$(MAKE_VARS) SILENT=false; \ if [ $$$$? -gt 0 ]; \ - then error_occured=1; \ + then error_occurred=1; \ fi; endef -# Just parse all the keymaps for a specifc keyboard +# Just parse all the keymaps for a specific keyboard define PARSE_ALL_KEYMAPS $$(eval $$(call PARSE_ALL_IN_LIST,PARSE_KEYMAP,$$(KEYMAPS))) endef @@ -428,7 +428,7 @@ define BUILD_TEST printf "$$(TEST_MSG)\n"; \ $$(TEST_EXECUTABLE); \ if [ $$$$? -gt 0 ]; \ - then error_occured=1; \ + then error_occurred=1; \ fi; \ printf "\n"; endif @@ -448,7 +448,7 @@ endef # Set the silent mode depending on if we are trying to compile multiple keyboards or not -# By default it's on in that case, but it can be overriden by specifying silent=false +# By default it's on in that case, but it can be overridden by specifying silent=false # from the command line define SET_SILENT_MODE ifdef SUB_IS_SILENT @@ -465,16 +465,16 @@ include $(ROOT_DIR)/message.mk # The empty line is important here, as it will force a new shell to be created for each command # Otherwise the command line will become too long with a lot of keyboards and keymaps define RUN_COMMAND -+error_occured=0;\ ++error_occurred=0;\ $(COMMAND_$(SILENT_MODE)_$(COMMAND))\ -if [ $$error_occured -gt 0 ]; then echo $$error_occured > $(ERROR_FILE); fi; +if [ $$error_occurred -gt 0 ]; then echo $$error_occurred > $(ERROR_FILE); fi; endef define RUN_TEST -+error_occured=0;\ ++error_occurred=0;\ $($(TEST)_COMMAND)\ -if [ $$error_occured -gt 0 ]; then echo $$error_occured > $(ERROR_FILE); fi; +if [ $$error_occurred -gt 0 ]; then echo $$error_occurred > $(ERROR_FILE); fi; endef @@ -514,7 +514,7 @@ endif .PHONY: all all: all-keyboards test-all -# Define some shortcuts, mostly for compability with the old syntax +# Define some shortcuts, mostly for compatibility with the old syntax .PHONY: all-keyboards all-keyboards: allkb-allsp-allkm -- cgit v1.2.3 From e667e9f6da17c5551379b168cc97647b44972d10 Mon Sep 17 00:00:00 2001 From: Nikolaus Wittenstein Date: Fri, 3 Feb 2017 21:00:10 -0500 Subject: Fix compile warnings in light_ws2812.c Fixes the warning "function declaration isn't a prototype" by explicitly making the parameter list void. --- quantum/light_ws2812.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/quantum/light_ws2812.c b/quantum/light_ws2812.c index a883b1388..55bdd9cd8 100755 --- a/quantum/light_ws2812.c +++ b/quantum/light_ws2812.c @@ -70,7 +70,7 @@ void I2C_WriteBit(unsigned char c) // Inits bitbanging port, must be called before using the functions below // -void I2C_Init() +void I2C_Init(void) { I2C_PORT &= ~ ((1 << I2C_DAT) | (1 << I2C_CLK)); @@ -82,7 +82,7 @@ void I2C_Init() // Send a START Condition // -void I2C_Start() +void I2C_Start(void) { // set both to high at the same time I2C_DDR &= ~ ((1 << I2C_DAT) | (1 << I2C_CLK)); @@ -97,7 +97,7 @@ void I2C_Start() // Send a STOP Condition // -void I2C_Stop() +void I2C_Stop(void) { I2C_CLOCK_HI(); _delay_us(I2C_DELAY); -- cgit v1.2.3 From 3faf06c880ef5fedb4dfaaef2bc35d75c392a076 Mon Sep 17 00:00:00 2001 From: Nikolaus Wittenstein Date: Fri, 3 Feb 2017 21:06:43 -0500 Subject: Fix compile warnings in egodox robot_test_layout Fixes the warning "right shift count >= width of type" by adding UL to the end of constants. --- keyboards/ergodox/keymaps/robot_test_layout/keymap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/ergodox/keymaps/robot_test_layout/keymap.c b/keyboards/ergodox/keymaps/robot_test_layout/keymap.c index 480be177f..e9e2597d7 100644 --- a/keyboards/ergodox/keymaps/robot_test_layout/keymap.c +++ b/keyboards/ergodox/keymaps/robot_test_layout/keymap.c @@ -68,7 +68,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case RGB_FF0000: if (record->event.pressed) { #ifdef RGBLIGHT_ENABLE - EZ_RGB(0xff0000); + EZ_RGB(0xff0000UL); register_code(KC_1); unregister_code(KC_1); #endif } @@ -77,7 +77,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case RGB_00FF00: if (record->event.pressed) { #ifdef RGBLIGHT_ENABLE - EZ_RGB(0x00ff00); + EZ_RGB(0x00ff00UL); register_code(KC_2); unregister_code(KC_2); #endif } @@ -86,7 +86,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case RGB_0000FF: if (record->event.pressed) { #ifdef RGBLIGHT_ENABLE - EZ_RGB(0x0000ff); + EZ_RGB(0x0000ffUL); register_code(KC_3); unregister_code(KC_3); #endif } @@ -95,7 +95,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case RGB_FFFFFF: if (record->event.pressed) { #ifdef RGBLIGHT_ENABLE - EZ_RGB(0xffffff); + EZ_RGB(0xffffffUL); register_code(KC_4); unregister_code(KC_4); #endif } -- cgit v1.2.3 From 101465b6edf98ed1a09b2f4db28c6be66b3f52fb Mon Sep 17 00:00:00 2001 From: Nikolaus Wittenstein Date: Fri, 3 Feb 2017 21:09:50 -0500 Subject: Add missing header to ergodox ordinary keymap --- keyboards/ergodox/keymaps/ordinary/keymap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/keyboards/ergodox/keymaps/ordinary/keymap.c b/keyboards/ergodox/keymaps/ordinary/keymap.c index 302c41cc8..5c01d9678 100644 --- a/keyboards/ergodox/keymaps/ordinary/keymap.c +++ b/keyboards/ergodox/keymaps/ordinary/keymap.c @@ -1,5 +1,6 @@ #include "ergodox.h" #include "led.h" +#include "mousekey.h" #include "debug.h" #include "action_layer.h" #include "action_util.h" -- cgit v1.2.3 From d961c80df2391631f7b3f46afa595ce93f51f217 Mon Sep 17 00:00:00 2001 From: Nikolaus Wittenstein Date: Sun, 5 Feb 2017 19:41:08 -0500 Subject: Remove unused matrix_raw variable in matrix.c --- quantum/matrix.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/quantum/matrix.c b/quantum/matrix.c index 07eb87bc3..fd312bffb 100644 --- a/quantum/matrix.c +++ b/quantum/matrix.c @@ -66,7 +66,6 @@ static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; /* matrix state(1:on, 0:off) */ static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_raw[MATRIX_ROWS]; static matrix_row_t matrix_debouncing[MATRIX_ROWS]; @@ -166,7 +165,6 @@ void matrix_init(void) { // initialize matrix state: all keys off for (uint8_t i=0; i < MATRIX_ROWS; i++) { matrix[i] = 0; - matrix_raw[i] = 0; matrix_debouncing[i] = 0; } -- cgit v1.2.3 From 8cbf61c91923e5399b158f7f9258096cb0089ce2 Mon Sep 17 00:00:00 2001 From: Nikolaus Wittenstein Date: Sun, 5 Feb 2017 19:42:00 -0500 Subject: Add new DIODE_DIRECTION option The previous two options were COL2ROW, ROW2COL; this adds CUSTOM_MATRIX to disable the built-in matrix scanning code. Most notably, this obviates the need to set MATRIX_ROW_PINS or MATRIX_COL_PINS. --- quantum/config_common.h | 6 ++++-- quantum/matrix.c | 12 +++++++----- quantum/template/config.h | 2 +- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/quantum/config_common.h b/quantum/config_common.h index 4bdb2065d..28f68b9c7 100644 --- a/quantum/config_common.h +++ b/quantum/config_common.h @@ -2,8 +2,10 @@ #define CONFIG_DEFINITIONS_H /* diode directions */ -#define COL2ROW 0 -#define ROW2COL 1 +#define COL2ROW 0 +#define ROW2COL 1 +#define CUSTOM_MATRIX 2 /* Disables built-in matrix scanning code */ + /* I/O pins */ #ifndef F0 #define B0 0x30 diff --git a/quantum/matrix.c b/quantum/matrix.c index fd312bffb..ac523482a 100644 --- a/quantum/matrix.c +++ b/quantum/matrix.c @@ -60,8 +60,10 @@ along with this program. If not, see . extern const matrix_row_t matrix_mask[]; #endif +#if (DIODE_DIRECTION == ROW2COL) || (DIODE_DIRECTION == COL2ROW) static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; +#endif /* matrix state(1:on, 0:off) */ static matrix_row_t matrix[MATRIX_ROWS]; @@ -75,7 +77,7 @@ static matrix_row_t matrix_debouncing[MATRIX_ROWS]; static void unselect_rows(void); static void select_row(uint8_t row); static void unselect_row(uint8_t row); -#else // ROW2COL +#elif (DIODE_DIRECTION == ROW2COL) static void init_rows(void); static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col); static void unselect_cols(void); @@ -132,7 +134,7 @@ uint8_t matrix_cols(void) { // /* PORTxn */ // _SFR_IO8((col_pins[c] >> 4) + 2) |= _BV(col_pins[c] & 0xF); // } -// #else +// #elif (DIODE_DIRECTION == ROW2COL) // for (int8_t c = MATRIX_COLS - 1; c >= 0; --c) { // /* DDRxn */ // _SFR_IO8((col_pins[c] >> 4) + 1) |= _BV(col_pins[c] & 0xF); @@ -157,7 +159,7 @@ void matrix_init(void) { #if (DIODE_DIRECTION == COL2ROW) unselect_rows(); init_cols(); -#else // ROW2COL +#elif (DIODE_DIRECTION == ROW2COL) unselect_cols(); init_rows(); #endif @@ -192,7 +194,7 @@ uint8_t matrix_scan(void) } -#else // ROW2COL +#elif (DIODE_DIRECTION == ROW2COL) // Set col, read rows for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { @@ -334,7 +336,7 @@ static void unselect_rows(void) } } -#else // ROW2COL +#elif (DIODE_DIRECTION == ROW2COL) static void init_rows(void) { diff --git a/quantum/template/config.h b/quantum/template/config.h index b02f0c7eb..c61c4a618 100644 --- a/quantum/template/config.h +++ b/quantum/template/config.h @@ -46,7 +46,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F1, F0, B0 } #define UNUSED_PINS -/* COL2ROW or ROW2COL */ +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 -- cgit v1.2.3 From 06d21009b2198a2941f4c341807ad2290b5967f6 Mon Sep 17 00:00:00 2001 From: Nikolaus Wittenstein Date: Sun, 5 Feb 2017 19:55:08 -0500 Subject: Minor cleanup --- tmk_core/common/keyboard.c | 1 + tmk_core/common/matrix.h | 2 +- tmk_core/common/report.h | 7 ------- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c index 765350792..3aa82231b 100644 --- a/tmk_core/common/keyboard.c +++ b/tmk_core/common/keyboard.c @@ -14,6 +14,7 @@ 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 #include "keyboard.h" #include "matrix.h" diff --git a/tmk_core/common/matrix.h b/tmk_core/common/matrix.h index cee3593ee..2543f5abc 100644 --- a/tmk_core/common/matrix.h +++ b/tmk_core/common/matrix.h @@ -50,7 +50,7 @@ void matrix_init(void); uint8_t matrix_scan(void); /* whether modified from previous scan. used after matrix_scan. */ bool matrix_is_modified(void) __attribute__ ((deprecated)); -/* whether a swtich is on */ +/* whether a switch is on */ bool matrix_is_on(uint8_t row, uint8_t col); /* matrix state on row */ matrix_row_t matrix_get_row(uint8_t row); diff --git a/tmk_core/common/report.h b/tmk_core/common/report.h index 0c799eca3..8fb28b6ce 100644 --- a/tmk_core/common/report.h +++ b/tmk_core/common/report.h @@ -134,13 +134,6 @@ typedef union { } nkro; #endif } __attribute__ ((packed)) report_keyboard_t; -/* -typedef struct { - uint8_t mods; - uint8_t reserved; - uint8_t keys[REPORT_KEYS]; -} __attribute__ ((packed)) report_keyboard_t; -*/ typedef struct { uint8_t buttons; -- cgit v1.2.3 From d1fb51976aeef8eeea5975c5bf75b6b1aa649826 Mon Sep 17 00:00:00 2001 From: Ole Anders Date: Mon, 6 Feb 2017 11:53:48 +0100 Subject: Added new keymap to the Satan GH60 keyboard. Added new keymap `Admiral Strokers` to the Satan keyboard. This is an ISO based layout with tap for brackets/ curly on shft and ctl keys. Furthermore, there is added arrows and media/volume/special/f-keys layer on the TAB button when you hold. --- keyboards/satan/keymaps/admiralStrokers/Makefile | 26 +++ keyboards/satan/keymaps/admiralStrokers/config.h | 96 +++++++++++ keyboards/satan/keymaps/admiralStrokers/keymap.c | 189 ++++++++++++++++++++++ keyboards/satan/keymaps/admiralStrokers/readme.md | 13 ++ 4 files changed, 324 insertions(+) create mode 100644 keyboards/satan/keymaps/admiralStrokers/Makefile create mode 100644 keyboards/satan/keymaps/admiralStrokers/config.h create mode 100644 keyboards/satan/keymaps/admiralStrokers/keymap.c create mode 100644 keyboards/satan/keymaps/admiralStrokers/readme.md diff --git a/keyboards/satan/keymaps/admiralStrokers/Makefile b/keyboards/satan/keymaps/admiralStrokers/Makefile new file mode 100644 index 000000000..18d2280d6 --- /dev/null +++ b/keyboards/satan/keymaps/admiralStrokers/Makefile @@ -0,0 +1,26 @@ +# 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 = no # 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 +SLEEP_LED_ENABLE = no # Enables your LED to breathe while your computer is sleeping. +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 +UNICODEMAP_ENABLE = no # This allows sending unicode symbols using X() in your keymap. +UNICODE_ENABLE = no # Unicode +UCIS_ENABLE = no # Keep in mind that not all will work (See WinCompose for details on Windows). +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 + +VARIABLE_TRACE = no # Use this to debug changes to variable values +API_SYSEX_ENABLE = no # This enables using the Quantum SYSEX API to send strings +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/satan/keymaps/admiralStrokers/config.h b/keyboards/satan/keymaps/admiralStrokers/config.h new file mode 100644 index 000000000..d0338fb7e --- /dev/null +++ b/keyboards/satan/keymaps/admiralStrokers/config.h @@ -0,0 +1,96 @@ +/* +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_ADMSTROK +#define CONFIG_H_ADMSTROK + +#include "config_common.h" +#include "../../config.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0003 +#define MANUFACTURER SATAN +#define PRODUCT GH60 +#define DESCRIPTION QMK keyboard firmware for Satan GH60 with WS2812 support + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +// ROWS: Top to bottom, COLS: Left to right + +#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 } +#define UNUSED_PINS + +#define BACKLIGHT_PIN B6 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* 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 command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* Backlight configuration */ +#define BACKLIGHT_LEVELS 4 + +/* Underlight configuration */ +#define RGB_DI_PIN E2 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 8 // Number of LEDs +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +#define DISABLE_SPACE_CADET_ROLLOVER + + + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/satan/keymaps/admiralStrokers/keymap.c b/keyboards/satan/keymaps/admiralStrokers/keymap.c new file mode 100644 index 000000000..487deb086 --- /dev/null +++ b/keyboards/satan/keymaps/admiralStrokers/keymap.c @@ -0,0 +1,189 @@ +#include "satan.h" +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +// general keydefs + #define norm 0 // Default layer + #define elev 1 // Layer directional keys + #define supr 2 // F-keys and mediakeys + #define spac 3 + #define FNO1 4 // + #define FNO2 5 // + #define FNO3 6 // + #define MAC0 M(0) // + #define MAC1 M(1) // + #define MAC2 M(2) // + #define MAC3 M(3) // + #define MAC4 M(4) // + #define MAC5 M(5) // + #define MAC6 M(6) // + #define MAC7 M(7) // + #define MAC8 M(8) // + #define MAC9 M(9) // + #define GRAV KC_GRV // + #define MEDI F(FNO1)// + +// General shortenings + #define ESCA KC_ESC + #define MINS KC_MINS + #define EQUL KC_EQL + #define BSPC KC_BSPC + #define DELE KC_DEL + #define LBRC KC_LBRC + #define RBRC KC_RBRC + #define ALTR KC_RALT + #define SCLN KC_SCLN + #define QUOT KC_QUOT + #define NUHS KC_NUHS + #define ENTE KC_ENT + #define NUBS KC_NUBS // Less/ greater sign + #define COMM KC_COMM // Comma + #define FSTO KC_DOT // Full stop + #define SLSH KC_SLSH + #define ALTL KC_LALT + #define GUIL KC_LGUI + #define GUIR KC_RGUI + #define MENO KC_MENU +// The F-row/layer: + #define FK01 KC_F1 + #define FK02 KC_F2 + #define FK03 KC_F3 + #define FK04 KC_F4 + #define FK05 KC_F5 + #define FK06 KC_F6 + #define FK07 KC_F7 + #define FK08 KC_F8 + #define FK09 KC_F9 + #define FK10 KC_F10 + #define FK11 KC_F11 + #define FK12 KC_F12 + #define FK13 KC_F13 + #define FK14 KC_F14 +// Special Actions and Media Keys + #define INSE KC_INS // Insert here + #define HOME KC_HOME // Go to beginning of line + #define ENDI KC_END // go to end of line + #define PSCR KC_PSCR // Print Screen + #define SLCK KC_SLCK // go to end of line + #define PGDN KC_PGDN // go to end of line + #define PGUP KC_PGUP // go to end of line + #define PLPS KC_MPLY // Play/Pause + #define PAUS KC_PAUS // Pause button + #define MUTE KC_MUTE // Mute sound + #define VOLU KC_VOLU // Volume increase + #define VOLD KC_VOLD // Volume decrease + #define MNXT KC_MNXT // next track + #define MPRV KC_MPRV // prev track + #define MSTP KC_MSTP // stop playing + #define MSEL KC_MSEL // Select media (Start playing it) + #define MAIL KC_MAIL // Open default mail app + #define CALC KC_CALC // Open default calculator app + #define MYCM KC_MYCM // Open default file manager + //#define LILO KC_XXXXXX // Reserved for later + //#define LIHI KC_XXXXXX // Reserved for later + + +// dual-role shortcuts + #define DUTB LT(elev, KC_TAB) // `tabs` layer on hold and tab on tap + #define DUSP LT(spac, KC_SPACE) // `spce` layer on hold and space on tap + #define LOCK LGUI(KC_L) // lock computer (win) + +// Space Admiral Strokers + #define SADL MAC0 // Hold for lshift and { on tap + #define SADR MAC1 // Hold for rshift and } on tap + #define CADL MAC2 // Hold for lctrl and [ on tap + #define CADR MAC3 // Hold for rctrl and ] on tap + +// arrow cluster duality bottom right corner + #define ARLF ALT_T(KC_LEFT) // Left arrow + #define ARRT CTL_T(KC_RIGHT)// Right arrow + #define ARUP SFT_T(KC_UP) // Up arrow + #define ARDN GUI_T(KC_DOWN) // Down arrow + +// brackets + #define NOCL RALT(KC_7) // [ + #define NOCR RALT(KC_0) // ] + #define NOPL LSFT(KC_8) // ( + #define NOPR LSFT(KC_9) // ) + #define NOAL KC_NUBS // < + #define NOAR LSFT(KC_NUBS) // > + #define NOBL RALT(KC_8) // [ + #define NOBR RALT(KC_9) // ] + +// increase readability + #define XXXX KC_TRNS + #define DEAD KC_NO + #define SCAN KC_TRNS // Scandinavian keys, the Row 5 key 5 is actually Row 1 key 15 on the PCB + +[ norm ] = KEYMAP( // Normal scandinavian mapping (danish has QUOT and SCLN wapped) + GRAV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, MINS, EQUL, BSPC, DELE,\ + DUTB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, LBRC, RBRC, DEAD,\ + ALTR, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, SCLN, QUOT, NUHS, ENTE,\ + SADL, NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, COMM, FSTO, SLSH, SADR, DEAD,\ + CADL, ALTL, GUIL, DUSP, GUIR, MEDI, MENO, CADR), + +[ elev ] = KEYMAP( // The f-Row (with f13-14), Special keys and media keys + LOCK, FK01, FK02, FK03, FK04, FK05, FK06, FK07, FK08, FK09, FK10, FK11, FK12, FK13, FK14,\ + XXXX, XXXX, XXXX, XXXX, MAIL, XXXX, XXXX, HOME, INSE, PSCR, SLCK, PAUS, PGUP, XXXX,\ + XXXX, XXXX, XXXX, XXXX, MYCM, XXXX, XXXX, MPRV, PAUS, MNXT, XXXX, XXXX, PGDN, ENDI,\ + XXXX, XXXX, XXXX, XXXX, CALC, XXXX, XXXX, XXXX, MUTE, VOLD, VOLU, XXXX, ARUP, DEAD,\ + XXXX, XXXX, XXXX, PLPS, XXXX, ARLF, ARDN, ARRT), + +[ spac ] = KEYMAP( // The space controls (by pressing space) + XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX,\ + XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX,\ + XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX,\ + XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, DEAD,\ + XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX), + +[ supr ] = KEYMAP( // Additional layer for later use. + XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX,\ + XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX,\ + XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX,\ + XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, DEAD,\ + XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX), +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function + static uint16_t key_timer; + switch(id) { + case 0: //MAC0 - Hold for lshift and { on tap + if (record->event.pressed) { + key_timer = timer_read(); + return MACRO(D(LSFT), END ); + } else { + return (timer_elapsed(key_timer) < 150) ? MACRO(U(LSFT),D(RALT),T(7),U(RALT),END): MACRO(U(LSFT),END); + }; break; + case 1: //MAC1 - Hold for rshift and } on tap + if (record->event.pressed) { + key_timer = timer_read(); + return MACRO(D(RSFT), END ); + } else { + return (timer_elapsed(key_timer) < 150) ? MACRO(U(RSFT),D(RALT),T(0),U(RALT),END): MACRO(U(RSFT),END); + }; break; + case 2: //MAC2 - Hold for lctrl and [ on tap + if (record->event.pressed) { + key_timer = timer_read(); + return MACRO(D(LCTL), END ); + } else {return (timer_elapsed(key_timer) < 150) ? MACRO(U(LCTL),D(RALT),T(8),U(RALT),END):MACRO(U(LCTL),END); + }; break; + case 3: //MAC3 - Hold for rctrl and ] on tap + if (record->event.pressed) { + key_timer = timer_read(); + return MACRO(D(RCTL), END ); + } else { + return (timer_elapsed(key_timer) < 150) ? MACRO(U(RCTL),D(RALT),T(9),U(RALT),END):MACRO(U(RCTL),END); + }; break; + case 4: //MAC4 + if (record->event.pressed) { } else { }; break; + case 5: //MAC5 + if (record->event.pressed) { } else { }; break; + case 6: //MAC6 + if (record->event.pressed) { } else { }; break; + } return MACRO_NONE; +}; +/* + Later use: + void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { } + enum function_id { }; + const uint16_t PROGMEM fn_actions[] = { }; + +*/ diff --git a/keyboards/satan/keymaps/admiralStrokers/readme.md b/keyboards/satan/keymaps/admiralStrokers/readme.md new file mode 100644 index 000000000..9b30caf34 --- /dev/null +++ b/keyboards/satan/keymaps/admiralStrokers/readme.md @@ -0,0 +1,13 @@ +# Admiral Strokers keymap +## For the Satan GH60 PCB +The Admiral STN60 is a layout for users of the satan GH60, optimized with some nice features such as mod tap for brackets (Similar to Space Cadett), space mod for F-row/ layer with easy to access media and control keys. The layout below is just as an example and is ISO based, ANSI and JIS layouts will be included later. + +`````` +[ _tmp ] = KEYMAP( // Copy this to get started. SCAN is scandinavian layout specific. +XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX,\ +XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, DEAD,\ +XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, SCAN, XXXX,\ +XXXX, SCAN, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, DEAD,\ +XXXX, XXXX, XXXX, XXXX, SCAN, XXXX, XXXX, XXXX, XXXX),\ + +``` -- cgit v1.2.3 From 21015918b405d4ec5f8fc3517accff28f6ebdf17 Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Mon, 6 Feb 2017 12:40:32 +0000 Subject: change cmd-l and cmd-r for actual home and end --- keyboards/planck/keymaps/callum/keymap.c | 6 ++---- keyboards/planck/keymaps/callum/readme.md | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index a1254d975..2acd988ea 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -12,8 +12,6 @@ extern keymap_config_t keymap_config; #define _SYMB 2 #define _MOUSE 3 #define _FUNC 4 -#define CMDLEFT LGUI(KC_LEFT) -#define CMDRGHT LGUI(KC_RGHT) #define ENDASH LALT(KC_MINS) #define POUND LALT(KC_3) @@ -50,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* MOVE * ,-----------------------------------------------------------------------------------. - * | Esc | | Cmd-L| Up | Cmd-R| | | Cmd-L| Up | Cmd-R| | Esc | + * | Esc | | Home | Up | End | | | Home | Up | End | | Esc | * |------+------+------+------+------+------+------+------+------+------+------+------| * | Del | Caps | Left | Down | Right| | | Left | Down | Right| Caps | Del | * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -60,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_MOVE] = { - {KC_ESC, XXXXXXX, CMDLEFT, KC_UP, CMDRGHT, XXXXXXX, XXXXXXX, CMDLEFT, KC_UP, CMDRGHT, XXXXXXX, KC_ESC }, + {KC_ESC, XXXXXXX, KC_HOME, KC_UP, KC_END, XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_END, XXXXXXX, KC_ESC }, {KC_DEL, KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_CAPS, KC_DEL }, {_______, XXXXXXX, XXXXXXX, KC_PGUP, KC_PGDN, XXXXXXX, XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, XXXXXXX, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} diff --git a/keyboards/planck/keymaps/callum/readme.md b/keyboards/planck/keymaps/callum/readme.md index f970cd974..71e200b9d 100644 --- a/keyboards/planck/keymaps/callum/readme.md +++ b/keyboards/planck/keymaps/callum/readme.md @@ -23,7 +23,7 @@ We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow c /* MOVE * ,-----------------------------------------------------------------------------------. - * | Esc | | Cmd-L| Up | Cmd-R| | | Cmd-L| Up | Cmd-R| | Esc | + * | Esc | | Home | Up | End | | | Home | Up | End | | Esc | * |------+------+------+------+------+------+------+------+------+------+------+------| * | Del | Caps | Left | Down | Right| | | Left | Down | Right| Caps | Del | * |------+------+------+------+------+------+------+------+------+------+------+------| -- cgit v1.2.3 From 835cacb031faabadf2c09de51323506f8f41b4ef Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Mon, 6 Feb 2017 16:04:28 -0500 Subject: fixes qmk.fm linking, tests out auto version incrementing --- util/travis_compiled_push.sh | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index f432976d0..9f23db972 100644 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -7,6 +7,25 @@ rev=$(git rev-parse --short HEAD) git config --global user.name "Travis CI" git config --global user.email "jack.humb+travis.ci@gmail.com" +increment_version () +{ + declare -a part=( ${1//\./ } ) + part[2]=$((part[2] + 1)) + new="${part[*]}" + echo -e "${new// /.}" +} + +NEFM=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/)' | wc -l) +if [[ $NEFM -gt 0 ]] ; then + echo "Essential files modified." + lasttag=$(git tag | grep -Ev '\-' | head -1) + newtag=$(increment_version $lasttag) + git tag $newtag + git push --tags +else + echo "No essential files modified." +fi + make ergodox-ez AUTOGEN=true find . -name ".build" | xargs rm -rf @@ -23,5 +42,5 @@ cp ../qmk_firmware/readme.md qmk_readme.md ./generate.sh git add -A -git commit -m "generated from qmk_firmware/$TRAVIS_BRANCH@${rev}" +git commit -m "generated from qmk/qmk_firmware@${rev}" git push -- cgit v1.2.3 From 3a76f24cbdd0894af85fee79e371c5ca7cda0f71 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Mon, 6 Feb 2017 16:42:18 -0500 Subject: [skip build] testing travis script --- .travis.yml | 4 +++- util/travis_compiled_push.sh | 40 ++++++++++++++++++++++------------------ 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/.travis.yml b/.travis.yml index b206d1451..e904d8af8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,7 +19,9 @@ install: before_script: - avr-gcc --version script: -- make $TARGET AUTOGEN=$AUTOGEN +- 'if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then +make $TARGET AUTOGEN=$AUTOGEN +fi' addons: apt: packages: diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index 9f23db972..f12da913c 100644 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -26,21 +26,25 @@ else echo "No essential files modified." fi -make ergodox-ez AUTOGEN=true - -find . -name ".build" | xargs rm -rf -cd .. -git clone https://$GH_TOKEN@github.com/jackhumbert/qmk.fm.git -cd qmk.fm -git submodule update --init --recursive -rm -rf keyboard -rm -rf keyboards -cp -r ../qmk_firmware/keyboards . -mkdir keyboards/ergodox_ez/ -cp ../qmk_firmware/util/ergodox_ez.html keyboards/ergodox_ez/index.html -cp ../qmk_firmware/readme.md qmk_readme.md -./generate.sh - -git add -A -git commit -m "generated from qmk/qmk_firmware@${rev}" -git push +if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then + + make ergodox-ez AUTOGEN=true + + find . -name ".build" | xargs rm -rf + cd .. + git clone https://$GH_TOKEN@github.com/jackhumbert/qmk.fm.git + cd qmk.fm + git submodule update --init --recursive + rm -rf keyboard + rm -rf keyboards + cp -r ../qmk_firmware/keyboards . + mkdir keyboards/ergodox_ez/ + cp ../qmk_firmware/util/ergodox_ez.html keyboards/ergodox_ez/index.html + cp ../qmk_firmware/readme.md qmk_readme.md + ./generate.sh + + git add -A + git commit -m "generated from qmk/qmk_firmware@${rev}" + git push + +fi \ No newline at end of file -- cgit v1.2.3 From 470c8436c2428dba885dfa6e4b7d4f5e725a9d07 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Mon, 6 Feb 2017 16:46:44 -0500 Subject: [skip build] testing travis script --- .travis.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index e904d8af8..1a0a7bf15 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,9 +19,7 @@ install: before_script: - avr-gcc --version script: -- 'if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then -make $TARGET AUTOGEN=$AUTOGEN -fi' +- 'if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then make $TARGET AUTOGEN=$AUTOGEN; fi' addons: apt: packages: -- cgit v1.2.3 From 98adda34c9095658fcc6a294a13f1264752b4df6 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Mon, 6 Feb 2017 16:54:54 -0500 Subject: [skip build] testing travis script --- util/travis_compiled_push.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index f12da913c..f1b4b2ae5 100644 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -21,7 +21,7 @@ if [[ $NEFM -gt 0 ]] ; then lasttag=$(git tag | grep -Ev '\-' | head -1) newtag=$(increment_version $lasttag) git tag $newtag - git push --tags + git push --tags -q https://$GH_TOKEN@github.com/qmk/qmk_firmware-$TRAVIS_BRANCH else echo "No essential files modified." fi -- cgit v1.2.3 From cf8dac3538feffe4d52c0776456dd67d5787b059 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Mon, 6 Feb 2017 16:56:39 -0500 Subject: [skip build] testing travis script --- util/travis_compiled_push.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index f1b4b2ae5..d0bb0db55 100644 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -7,6 +7,8 @@ rev=$(git rev-parse --short HEAD) git config --global user.name "Travis CI" git config --global user.email "jack.humb+travis.ci@gmail.com" +if [[ "$TRAVIS_BRANCH" == "master" ]] ; then + increment_version () { declare -a part=( ${1//\./ } ) @@ -21,7 +23,7 @@ if [[ $NEFM -gt 0 ]] ; then lasttag=$(git tag | grep -Ev '\-' | head -1) newtag=$(increment_version $lasttag) git tag $newtag - git push --tags -q https://$GH_TOKEN@github.com/qmk/qmk_firmware-$TRAVIS_BRANCH + git push --tags -q https://$GH_TOKEN@github.com/qmk/qmk_firmware-master else echo "No essential files modified." fi @@ -47,4 +49,6 @@ if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then git commit -m "generated from qmk/qmk_firmware@${rev}" git push +fi + fi \ No newline at end of file -- cgit v1.2.3 From ee386a29d1a8b46f16c5c139db74624f829d9a53 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Mon, 6 Feb 2017 17:00:30 -0500 Subject: [skip build] testing travis script --- util/travis_compiled_push.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index d0bb0db55..b70999c72 100644 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -23,7 +23,7 @@ if [[ $NEFM -gt 0 ]] ; then lasttag=$(git tag | grep -Ev '\-' | head -1) newtag=$(increment_version $lasttag) git tag $newtag - git push --tags -q https://$GH_TOKEN@github.com/qmk/qmk_firmware-master + git push --tags -q https://$GH_TOKEN@github.com/qmk/qmk_firmware else echo "No essential files modified." fi -- cgit v1.2.3 From 0e548f8b5d6b89de877f098ea919eaea87511b6e Mon Sep 17 00:00:00 2001 From: dungdung Date: Mon, 6 Feb 2017 14:08:21 -0800 Subject: Christmas mode now works with even RGBED_NUM Added Christmas mode steps to reduce red and green colors blending into each other Added Christmas mode interval Increased green hue to 120 --- quantum/rgblight.c | 8 ++++---- quantum/rgblight.h | 8 ++++++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/quantum/rgblight.c b/quantum/rgblight.c index 52a09817a..f91f3caff 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -237,7 +237,7 @@ void rgblight_mode(uint8_t mode) { #ifdef RGBLIGHT_ANIMATIONS rgblight_timer_disable(); #endif - } else if (rgblight_config.mode >= 2 && rgblight_config.mode <= 23) { + } else if (rgblight_config.mode >= 2 && rgblight_config.mode <= 24) { // MODE 2-5, breathing // MODE 6-8, rainbow mood // MODE 9-14, rainbow swirl @@ -450,7 +450,7 @@ void rgblight_task(void) { } else if (rgblight_config.mode >= 21 && rgblight_config.mode <= 23) { // mode = 21 to 23, knight mode rgblight_effect_knight(rgblight_config.mode - 21); - } else { + } else if (rgblight_config.mode == 24) { // mode = 24, christmas mode rgblight_effect_christmas(); } @@ -604,13 +604,13 @@ void rgblight_effect_christmas(void) { static uint16_t last_timer = 0; uint16_t hue; uint8_t i; - if (timer_elapsed(last_timer) < 1000) { + if (timer_elapsed(last_timer) < RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL) { return; } last_timer = timer_read(); current_offset = (current_offset + 1) % 2; for (i = 0; i < RGBLED_NUM; i++) { - hue = 0 + ((RGBLED_NUM * (i + current_offset)) % 2) * 80; + hue = 0 + ((i/RGBLIGHT_EFFECT_CHRISTMAS_STEP + current_offset) % 2) * 120; sethsv(hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[i]); } rgblight_set(); diff --git a/quantum/rgblight.h b/quantum/rgblight.h index 726b8de72..12e858305 100644 --- a/quantum/rgblight.h +++ b/quantum/rgblight.h @@ -22,6 +22,14 @@ #define RGBLIGHT_EFFECT_DUALKNIGHT_LENGTH 4 #endif +#ifndef RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL +#define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 1000 +#endif + +#ifndef RGBLIGHT_EFFECT_CHRISTMAS_STEP +#define RGBLIGHT_EFFECT_CHRISTMAS_STEP 2 +#endif + #ifndef RGBLIGHT_HUE_STEP #define RGBLIGHT_HUE_STEP 10 #endif -- cgit v1.2.3 From 5a1b68d562036ff26820069baafe40654eef70a3 Mon Sep 17 00:00:00 2001 From: dungdung Date: Mon, 6 Feb 2017 14:09:29 -0800 Subject: Added mode reverse step function --- quantum/rgblight.c | 8 ++++++++ quantum/rgblight.h | 1 + 2 files changed, 9 insertions(+) diff --git a/quantum/rgblight.c b/quantum/rgblight.c index f91f3caff..7e057b63e 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -219,6 +219,14 @@ void rgblight_step(void) { } rgblight_mode(mode); } +void rgblight_step_reverse(void) { + uint8_t mode = 0; + mode = rgblight_config.mode - 1; + if (mode < 1) { + mode = RGBLIGHT_MODES; + } + rgblight_mode(mode); +} void rgblight_mode(uint8_t mode) { if (!rgblight_config.enable) { diff --git a/quantum/rgblight.h b/quantum/rgblight.h index 12e858305..a63b24604 100644 --- a/quantum/rgblight.h +++ b/quantum/rgblight.h @@ -73,6 +73,7 @@ void rgblight_decrease(void); void rgblight_toggle(void); void rgblight_enable(void); void rgblight_step(void); +void rgblight_step_reverse(void); void rgblight_mode(uint8_t mode); void rgblight_set(void); void rgblight_update_dword(uint32_t dword); -- cgit v1.2.3 From a7882b1ffceb6002dd1adf916a8fc32523227860 Mon Sep 17 00:00:00 2001 From: dungdung Date: Mon, 6 Feb 2017 14:14:56 -0800 Subject: Added non-animated gradient mode --- quantum/rgblight.c | 19 +++++++++++++++++++ quantum/rgblight.h | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/quantum/rgblight.c b/quantum/rgblight.c index 7e057b63e..dd1b91c63 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -66,6 +66,8 @@ __attribute__ ((weak)) const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {100, 50, 20}; __attribute__ ((weak)) const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {100, 50, 20}; +__attribute__ ((weak)) +const uint16_t RGBLED_GRADIENT_RANGES[] PROGMEM = {360, 240, 180, 120, 90}; rgblight_config_t rgblight_config; rgblight_config_t inmem_config; @@ -255,6 +257,12 @@ void rgblight_mode(uint8_t mode) { #ifdef RGBLIGHT_ANIMATIONS rgblight_timer_enable(); #endif + } else if (rgblight_config.mode >= 25 && rgblight_config.mode <= 34) { + // MODE 25-34, static gradient + + #ifdef RGBLIGHT_ANIMATIONS + rgblight_timer_disable(); + #endif } rgblight_sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val); } @@ -358,6 +366,17 @@ void rgblight_sethsv(uint16_t hue, uint8_t sat, uint8_t val) { } else if (rgblight_config.mode >= 6 && rgblight_config.mode <= 14) { // rainbow mood and rainbow swirl, ignore the change of hue hue = rgblight_config.hue; + } else if (rgblight_config.mode >= 25 && rgblight_config.mode <= 34) { + // static gradient + uint16_t _hue; + int8_t direction = ((rgblight_config.mode - 25) % 2) ? -1 : 1; + uint16_t range = pgm_read_word(&RGBLED_GRADIENT_RANGES[(rgblight_config.mode - 25) / 2]); + for (uint8_t i = 0; i < RGBLED_NUM; i++) { + _hue = (range / RGBLED_NUM * i * direction + hue + 360) % 360; + dprintf("rgblight rainbow set hsv: %u,%u,%d,%u\n", i, _hue, direction, range); + sethsv(_hue, sat, val, (LED_TYPE *)&led[i]); + } + rgblight_set(); } } rgblight_config.hue = hue; diff --git a/quantum/rgblight.h b/quantum/rgblight.h index a63b24604..2b3e791bf 100644 --- a/quantum/rgblight.h +++ b/quantum/rgblight.h @@ -2,7 +2,7 @@ #define RGBLIGHT_H #ifdef RGBLIGHT_ANIMATIONS - #define RGBLIGHT_MODES 24 + #define RGBLIGHT_MODES 34 #else #define RGBLIGHT_MODES 1 #endif -- cgit v1.2.3 From 5c8cdfd2b579c198ad37504772e663783f530685 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Mon, 6 Feb 2017 17:51:20 -0500 Subject: [skip build] testing travis script --- .travis.yml | 1 + util/travis_compiled_push.sh | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1a0a7bf15..792f2cd05 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,7 @@ language: c branches: except: - /^.*-automated-build$/ + - /^[0-9]+\.[0-9]+\.[0-9]+/ env: global: - secure: vBTSL34BDPxDilKUuTXqU4CJ26Pv5hogD2nghatkxSQkI1/jbdnLj/DQdPUrMJFDIY6TK3AltsBx72MaMsLQ1JO/Ou24IeHINHXzUC1FlS9yQa48cpxnhX5kzXNyGs3oa0qaFbvnr7RgYRWtmD52n4bIZuSuW+xpBv05x2OCizdT2ZonH33nATaHGFasxROm4qYZ241VfzcUv766V6RVHgL4x9V08warugs+RENVkfzxxwhk3NmkrISabze0gSVJLHBPHxroZC6EUcf/ocobcuDrCwFqtEt90i7pNIAFUE7gZsN2uE75LmpzAWin21G7lLPcPL2k4FJVd8an1HiP2WmscJU6U89fOfMb2viObnKcCzebozBCmKGtHEuXZo9FcReOx49AnQSpmESJGs+q2dL/FApkTjQiyT4J6O5dJpoww0/r57Wx0cmmqjETKBb5rSgXM51Etk3wO09mvcPHsEwrT7qH8r9XWdyCDoEn7FCLX3/LYnf/D4SmZ633YPl5gv3v9XEwxR5+04akjgnvWDSNIaDbWBdxHNb7l4pMc+WR1bwCyMyA7KXj0RrftEGOrm9ZRLe6BkbT4cycA+j77nbPOMcyZChliV9pPQos+4TOJoTzcK2L8yWVoY409aDNVuAjdP6Yum0R2maBGl/etLmIMpJC35C5/lZ+dUNjJAM= diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index b70999c72..8025ccb8f 100644 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -20,7 +20,8 @@ increment_version () NEFM=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/)' | wc -l) if [[ $NEFM -gt 0 ]] ; then echo "Essential files modified." - lasttag=$(git tag | grep -Ev '\-' | head -1) + git fetch --tags + lasttag=$(git tag | grep -Ev '\-' | xargs -I@ git log --format=format:"%ai @%n" -1 @ | sort | awk '{print $4}' | tail -1) newtag=$(increment_version $lasttag) git tag $newtag git push --tags -q https://$GH_TOKEN@github.com/qmk/qmk_firmware -- cgit v1.2.3 From 35edb382ee6390e1208806ce74d7dc1f4ab08f5d Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Mon, 6 Feb 2017 18:28:37 -0500 Subject: [skip build] testing travis script --- util/travis_compiled_push.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index 8025ccb8f..3751da1e5 100644 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -21,7 +21,7 @@ NEFM=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/ if [[ $NEFM -gt 0 ]] ; then echo "Essential files modified." git fetch --tags - lasttag=$(git tag | grep -Ev '\-' | xargs -I@ git log --format=format:"%ai @%n" -1 @ | sort | awk '{print $4}' | tail -1) + lasttag=$(git tag | grep -Ev '\-' | xargs -I@ git log --format=format:"%ai @%n" -1 @ | sort -V | awk '{print $4}' | tail -1) newtag=$(increment_version $lasttag) git tag $newtag git push --tags -q https://$GH_TOKEN@github.com/qmk/qmk_firmware -- cgit v1.2.3 From 0537977ba1412aa2ba753e152eec445e18858244 Mon Sep 17 00:00:00 2001 From: TerryMathews Date: Mon, 6 Feb 2017 19:14:57 -0500 Subject: Reverse rev2 and rev2fliphalf Flipped definitions on what constitutes "fliphalf" by popular demand. --- keyboards/lets_split/rev2/config.h | 6 +++--- keyboards/lets_split/rev2/rev2.h | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/keyboards/lets_split/rev2/config.h b/keyboards/lets_split/rev2/config.h index b34d7c004..1c45cf136 100644 --- a/keyboards/lets_split/rev2/config.h +++ b/keyboards/lets_split/rev2/config.h @@ -35,10 +35,10 @@ along with this program. If not, see . // wiring of each half #define MATRIX_ROW_PINS { D7, E6, B4, B5 } -#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 } -// #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6 } //uncomment this line and comment line above if you need to reverse left-to-right key order +//#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 } +#define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6 } //uncomment this line and comment line above if you need to reverse left-to-right key order -#define CATERINA_BOOTLOADER +//#define CATERINA_BOOTLOADER /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/lets_split/rev2/rev2.h b/keyboards/lets_split/rev2/rev2.h index 7c397912f..990976de2 100644 --- a/keyboards/lets_split/rev2/rev2.h +++ b/keyboards/lets_split/rev2/rev2.h @@ -9,10 +9,10 @@ //void promicro_bootloader_jmp(bool program); #define KEYMAP( \ - k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \ - k10, k11, k12, k13, k14, k15, k50, k51, k52, k53, k54, k55, \ - k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \ - k30, k31, k32, k33, k34, k35, k70, k71, k72, k73, k74, k75 \ + k00, k01, k02, k03, k04, k05, k45, k44, k43, k42, k41, k40, \ + k10, k11, k12, k13, k14, k15, k55, k54, k53, k52, k51, k50, \ + k20, k21, k22, k23, k24, k25, k65, k64, k63, k62, k61, k60, \ + k30, k31, k32, k33, k34, k35, k75, k74, k73, k72, k71, k70 \ ) \ { \ { k00, k01, k02, k03, k04, k05 }, \ -- cgit v1.2.3 From 5d55a44afa97386798bf7dd760123fbde8d35a28 Mon Sep 17 00:00:00 2001 From: TerryMathews Date: Mon, 6 Feb 2017 19:21:21 -0500 Subject: Revert "Reverse rev2 and rev2fliphalf" This reverts commit 0537977ba1412aa2ba753e152eec445e18858244. --- keyboards/lets_split/rev2/config.h | 6 +++--- keyboards/lets_split/rev2/rev2.h | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/keyboards/lets_split/rev2/config.h b/keyboards/lets_split/rev2/config.h index 1c45cf136..b34d7c004 100644 --- a/keyboards/lets_split/rev2/config.h +++ b/keyboards/lets_split/rev2/config.h @@ -35,10 +35,10 @@ along with this program. If not, see . // wiring of each half #define MATRIX_ROW_PINS { D7, E6, B4, B5 } -//#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 } -#define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6 } //uncomment this line and comment line above if you need to reverse left-to-right key order +#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 } +// #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6 } //uncomment this line and comment line above if you need to reverse left-to-right key order -//#define CATERINA_BOOTLOADER +#define CATERINA_BOOTLOADER /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/lets_split/rev2/rev2.h b/keyboards/lets_split/rev2/rev2.h index 990976de2..7c397912f 100644 --- a/keyboards/lets_split/rev2/rev2.h +++ b/keyboards/lets_split/rev2/rev2.h @@ -9,10 +9,10 @@ //void promicro_bootloader_jmp(bool program); #define KEYMAP( \ - k00, k01, k02, k03, k04, k05, k45, k44, k43, k42, k41, k40, \ - k10, k11, k12, k13, k14, k15, k55, k54, k53, k52, k51, k50, \ - k20, k21, k22, k23, k24, k25, k65, k64, k63, k62, k61, k60, \ - k30, k31, k32, k33, k34, k35, k75, k74, k73, k72, k71, k70 \ + k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \ + k10, k11, k12, k13, k14, k15, k50, k51, k52, k53, k54, k55, \ + k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \ + k30, k31, k32, k33, k34, k35, k70, k71, k72, k73, k74, k75 \ ) \ { \ { k00, k01, k02, k03, k04, k05 }, \ -- cgit v1.2.3 From 2a2be010d9d8c10d872c01637f4b4cd263f9bc1b Mon Sep 17 00:00:00 2001 From: TerryMathews Date: Mon, 6 Feb 2017 19:23:10 -0500 Subject: Reverse rev2 and rev2fliphalf Flipped definitions on what constitutes "fliphalf" by popular demand. --- keyboards/lets_split/rev2/rev2.h | 8 ++++---- keyboards/lets_split/rev2fliphalf/rev2fliphalf.h | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/keyboards/lets_split/rev2/rev2.h b/keyboards/lets_split/rev2/rev2.h index 7c397912f..990976de2 100644 --- a/keyboards/lets_split/rev2/rev2.h +++ b/keyboards/lets_split/rev2/rev2.h @@ -9,10 +9,10 @@ //void promicro_bootloader_jmp(bool program); #define KEYMAP( \ - k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \ - k10, k11, k12, k13, k14, k15, k50, k51, k52, k53, k54, k55, \ - k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \ - k30, k31, k32, k33, k34, k35, k70, k71, k72, k73, k74, k75 \ + k00, k01, k02, k03, k04, k05, k45, k44, k43, k42, k41, k40, \ + k10, k11, k12, k13, k14, k15, k55, k54, k53, k52, k51, k50, \ + k20, k21, k22, k23, k24, k25, k65, k64, k63, k62, k61, k60, \ + k30, k31, k32, k33, k34, k35, k75, k74, k73, k72, k71, k70 \ ) \ { \ { k00, k01, k02, k03, k04, k05 }, \ diff --git a/keyboards/lets_split/rev2fliphalf/rev2fliphalf.h b/keyboards/lets_split/rev2fliphalf/rev2fliphalf.h index 993e149dd..7dc8e5ba8 100644 --- a/keyboards/lets_split/rev2fliphalf/rev2fliphalf.h +++ b/keyboards/lets_split/rev2fliphalf/rev2fliphalf.h @@ -9,10 +9,10 @@ //void promicro_bootloader_jmp(bool program); #define KEYMAP( \ - k00, k01, k02, k03, k04, k05, k45, k44, k43, k42, k41, k40, \ - k10, k11, k12, k13, k14, k15, k55, k54, k53, k52, k51, k50, \ - k20, k21, k22, k23, k24, k25, k65, k64, k63, k62, k61, k60, \ - k30, k31, k32, k33, k34, k35, k75, k74, k73, k72, k71, k70 \ + k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \ + k10, k11, k12, k13, k14, k15, k50, k51, k52, k53, k54, k55, \ + k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \ + k30, k31, k32, k33, k34, k35, k70, k71, k72, k73, k74, k75 \ ) \ { \ { k00, k01, k02, k03, k04, k05 }, \ -- cgit v1.2.3 From 3dbdd153040087f23d63204b142f355936ae8bc0 Mon Sep 17 00:00:00 2001 From: Nic Aitch Date: Mon, 6 Feb 2017 19:57:34 -0600 Subject: Check for a new serial port every second --- keyboards/lets_split/rules.mk | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/keyboards/lets_split/rules.mk b/keyboards/lets_split/rules.mk index 0dc549130..0efa78550 100644 --- a/keyboards/lets_split/rules.mk +++ b/keyboards/lets_split/rules.mk @@ -76,10 +76,12 @@ CUSTOM_MATRIX = yes avrdude: build ls /dev/tty* > /tmp/1; \ - echo "Reset your Pro Micro then hit any key to continue..."; \ - read -n 1 -s; \ - ls /dev/tty* > /tmp/2; \ - USB=`diff /tmp/1 /tmp/2 | grep '>' | sed -e 's/> //'`; \ + echo "Reset your Pro Micro now"; \ + while [[ -z $$USB ]]; do \ + sleep 1; \ + ls /dev/tty* > /tmp/2; \ + USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \ + done; \ avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex .PHONY: avrdude -- cgit v1.2.3 From 19d63ad72c012ee3dfb9375724067b278593df8a Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Tue, 7 Feb 2017 01:35:10 -0500 Subject: try building only keyboards needed --- .travis.yml | 6 ++---- util/travis_build.sh | 18 ++++++++++++++++++ util/travis_compiled_push.sh | 6 +++--- 3 files changed, 23 insertions(+), 7 deletions(-) create mode 100644 util/travis_build.sh diff --git a/.travis.yml b/.travis.yml index 792f2cd05..093f13be6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,9 +9,6 @@ branches: env: global: - secure: vBTSL34BDPxDilKUuTXqU4CJ26Pv5hogD2nghatkxSQkI1/jbdnLj/DQdPUrMJFDIY6TK3AltsBx72MaMsLQ1JO/Ou24IeHINHXzUC1FlS9yQa48cpxnhX5kzXNyGs3oa0qaFbvnr7RgYRWtmD52n4bIZuSuW+xpBv05x2OCizdT2ZonH33nATaHGFasxROm4qYZ241VfzcUv766V6RVHgL4x9V08warugs+RENVkfzxxwhk3NmkrISabze0gSVJLHBPHxroZC6EUcf/ocobcuDrCwFqtEt90i7pNIAFUE7gZsN2uE75LmpzAWin21G7lLPcPL2k4FJVd8an1HiP2WmscJU6U89fOfMb2viObnKcCzebozBCmKGtHEuXZo9FcReOx49AnQSpmESJGs+q2dL/FApkTjQiyT4J6O5dJpoww0/r57Wx0cmmqjETKBb5rSgXM51Etk3wO09mvcPHsEwrT7qH8r9XWdyCDoEn7FCLX3/LYnf/D4SmZ633YPl5gv3v9XEwxR5+04akjgnvWDSNIaDbWBdxHNb7l4pMc+WR1bwCyMyA7KXj0RrftEGOrm9ZRLe6BkbT4cycA+j77nbPOMcyZChliV9pPQos+4TOJoTzcK2L8yWVoY409aDNVuAjdP6Yum0R2maBGl/etLmIMpJC35C5/lZ+dUNjJAM= - matrix: - - TARGET=all-keyboards AUTOGEN=true - - TARGET=test AUTOGEN=false before_install: - wget http://www.atmel.com/images/avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz install: @@ -20,7 +17,8 @@ install: before_script: - avr-gcc --version script: -- 'if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then make $TARGET AUTOGEN=$AUTOGEN; fi' +- make test AUTOGET=false +- bash util/travis_build.sh addons: apt: packages: diff --git a/util/travis_build.sh b/util/travis_build.sh new file mode 100644 index 000000000..df2e06960 --- /dev/null +++ b/util/travis_build.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +TRAVIS_COMMIT_MESSAGE="${TRAVIS_COMMIT_MESSAGE:-none}" +TRAVIS_COMMIT_RANGE="${TRAVIS_COMMIT_RANGE:-HEAD~1..HEAD}" + +if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then + NEFM=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/)' | wc -l) + if [[ $NEFM -gt 0 ]] ; then + echo "Making all keymaps for all keyboards" + make all-keyboards AUTOGEN=true + else + MKB=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -oP '(?<=keyboards\/)([a-zA-Z_]+)' | sort -u) + for KB in $MKB ; do + echo "Making all keymaps for $KB" + make "$KB" AUTOGEN=true + done + fi +fi diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index 3751da1e5..6ec558cac 100644 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -38,9 +38,9 @@ if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then git clone https://$GH_TOKEN@github.com/jackhumbert/qmk.fm.git cd qmk.fm git submodule update --init --recursive - rm -rf keyboard - rm -rf keyboards - cp -r ../qmk_firmware/keyboards . + #rm -rf keyboard + #rm -rf keyboards + yes | cp -rf ../qmk_firmware/keyboards . mkdir keyboards/ergodox_ez/ cp ../qmk_firmware/util/ergodox_ez.html keyboards/ergodox_ez/index.html cp ../qmk_firmware/readme.md qmk_readme.md -- cgit v1.2.3 From f79f38d72637956132112014bd2eb000122cb06a Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Tue, 7 Feb 2017 01:53:46 -0500 Subject: add comma --- keyboards/planck/keymaps/yale/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/planck/keymaps/yale/keymap.c b/keyboards/planck/keymaps/yale/keymap.c index a0910860a..f2280778a 100644 --- a/keyboards/planck/keymaps/yale/keymap.c +++ b/keyboards/planck/keymaps/yale/keymap.c @@ -54,7 +54,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_NUM] = { {_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______}, {KC_LCTL, KC_GRV, KC_LBRC, KC_LCBR, KC_LPRN, KC_SLSH, KC_BSLS, KC_RPRN, KC_RCBR, KC_RBRC, KC_MINS, KC_EQL}, - {_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC KC_CIRC, KC_AMPR, KC_ASTR, KC_UNDS, KC_PLUS, _______}, + {_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_UNDS, KC_PLUS, _______}, {_______, _______, _______, _______, _______, _______, _______, MO(_NAV), _______, _______, _______, _______} }, -- cgit v1.2.3 From c8d5376f11642aaaae9a247287db30d5b226c3b9 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Tue, 7 Feb 2017 01:54:58 -0500 Subject: fix typo --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 093f13be6..ebd4cc182 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ install: before_script: - avr-gcc --version script: -- make test AUTOGET=false +- make test AUTOGEN=false - bash util/travis_build.sh addons: apt: -- cgit v1.2.3 From 6a92cc28977ff4d51fa0bafcb757867b27ebdb45 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Tue, 7 Feb 2017 02:00:07 -0500 Subject: correctly assign bash variable --- .travis.yml | 2 +- util/travis_build.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index ebd4cc182..28f01ecb0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ install: before_script: - avr-gcc --version script: -- make test AUTOGEN=false +- make test AUTOGEN="false" - bash util/travis_build.sh addons: apt: diff --git a/util/travis_build.sh b/util/travis_build.sh index df2e06960..38c1ffc65 100644 --- a/util/travis_build.sh +++ b/util/travis_build.sh @@ -7,12 +7,12 @@ if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then NEFM=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/)' | wc -l) if [[ $NEFM -gt 0 ]] ; then echo "Making all keymaps for all keyboards" - make all-keyboards AUTOGEN=true + make all-keyboards AUTOGEN="true" else MKB=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -oP '(?<=keyboards\/)([a-zA-Z_]+)' | sort -u) for KB in $MKB ; do echo "Making all keymaps for $KB" - make "$KB" AUTOGEN=true + make "$KB" AUTOGEN="true" done fi fi -- cgit v1.2.3 From 616b8604b0b0f7e281ecfeff385d96a6a14955da Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Tue, 7 Feb 2017 11:53:43 -0500 Subject: variable scope fix for travis --- .travis.yml | 6 ++---- util/travis_build.sh | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 28f01ecb0..18ecde7e3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ install: before_script: - avr-gcc --version script: -- make test AUTOGEN="false" +- make test AUTOGEN=false - bash util/travis_build.sh addons: apt: @@ -29,6 +29,4 @@ addons: - libnewlib-arm-none-eabi - diffutils after_success: - if [ "$AUTOGEN" == "true" ]; then - bash util/travis_compiled_push.sh; - fi + bash util/travis_compiled_push.sh diff --git a/util/travis_build.sh b/util/travis_build.sh index 38c1ffc65..fab9178de 100644 --- a/util/travis_build.sh +++ b/util/travis_build.sh @@ -12,7 +12,7 @@ if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then MKB=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -oP '(?<=keyboards\/)([a-zA-Z_]+)' | sort -u) for KB in $MKB ; do echo "Making all keymaps for $KB" - make "$KB" AUTOGEN="true" + make "$KB" AUTOGEN=true done fi fi -- cgit v1.2.3 From de659486f52db6492be6ca03ce5450690f5d891d Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Tue, 7 Feb 2017 12:36:25 -0500 Subject: pass through travis errors --- keyboards/handwired/onekey/keymaps/default/keymap.c | 2 +- util/travis_build.sh | 4 ++++ util/travis_compiled_push.sh | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/keyboards/handwired/onekey/keymaps/default/keymap.c b/keyboards/handwired/onekey/keymaps/default/keymap.c index 756c4f51e..10c486718 100644 --- a/keyboards/handwired/onekey/keymaps/default/keymap.c +++ b/keyboards/handwired/onekey/keymaps/default/keymap.c @@ -1,5 +1,5 @@ #include "onekey.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - { KC_A } + {{ KC_A }} }; diff --git a/util/travis_build.sh b/util/travis_build.sh index fab9178de..794b0d3a1 100644 --- a/util/travis_build.sh +++ b/util/travis_build.sh @@ -4,15 +4,19 @@ TRAVIS_COMMIT_MESSAGE="${TRAVIS_COMMIT_MESSAGE:-none}" TRAVIS_COMMIT_RANGE="${TRAVIS_COMMIT_RANGE:-HEAD~1..HEAD}" if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then + exit_code=0 NEFM=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/)' | wc -l) if [[ $NEFM -gt 0 ]] ; then echo "Making all keymaps for all keyboards" make all-keyboards AUTOGEN="true" + : $((exit_code = $exit_code + $?)) else MKB=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -oP '(?<=keyboards\/)([a-zA-Z_]+)' | sort -u) for KB in $MKB ; do echo "Making all keymaps for $KB" make "$KB" AUTOGEN=true + : $((exit_code = $exit_code + $?)) done fi + exit $exit_code fi diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index 6ec558cac..de2481ce5 100644 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -41,7 +41,7 @@ if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then #rm -rf keyboard #rm -rf keyboards yes | cp -rf ../qmk_firmware/keyboards . - mkdir keyboards/ergodox_ez/ + #mkdir keyboards/ergodox_ez/ cp ../qmk_firmware/util/ergodox_ez.html keyboards/ergodox_ez/index.html cp ../qmk_firmware/readme.md qmk_readme.md ./generate.sh -- cgit v1.2.3 From b4e30d392969b000eb9a87065fc1caaf33d670e1 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Tue, 7 Feb 2017 15:23:56 -0500 Subject: added functionality for just a port --- quantum/quantum.c | 94 ++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 62 insertions(+), 32 deletions(-) diff --git a/quantum/quantum.c b/quantum/quantum.c index d3905decf..45ea8cb73 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -594,34 +594,45 @@ static const uint8_t backlight_pin = BACKLIGHT_PIN; # define COM1x1 COM1A1 # define OCR1x OCR1A #else -# error "Backlight pin not supported - use B5, B6, or B7" +# define NO_BACKLIGHT_CLOCK +#endif + +#ifndef BACKLIGHT_ON_STATE +#define BACKLIGHT_ON_STATE 0 #endif __attribute__ ((weak)) void backlight_init_ports(void) { - // Setup backlight pin as output and output low. + // Setup backlight pin as output and output to on state. // DDRx |= n _SFR_IO8((backlight_pin >> 4) + 1) |= _BV(backlight_pin & 0xF); - // PORTx &= ~n - _SFR_IO8((backlight_pin >> 4) + 2) &= ~_BV(backlight_pin & 0xF); + #if BACKLIGHT_ON_STATE == 0 + // PORTx &= ~n + _SFR_IO8((backlight_pin >> 4) + 2) &= ~_BV(backlight_pin & 0xF); + #else + // PORTx |= n + _SFR_IO8((backlight_pin >> 4) + 2) |= _BV(backlight_pin & 0xF); + #endif - // Use full 16-bit resolution. - ICR1 = 0xFFFF; + #ifndef NO_BACKLIGHT_CLOCK + // Use full 16-bit resolution. + ICR1 = 0xFFFF; - // I could write a wall of text here to explain... but TL;DW - // Go read the ATmega32u4 datasheet. - // And this: http://blog.saikoled.com/post/43165849837/secret-konami-cheat-code-to-high-resolution-pwm-on + // I could write a wall of text here to explain... but TL;DW + // Go read the ATmega32u4 datasheet. + // And this: http://blog.saikoled.com/post/43165849837/secret-konami-cheat-code-to-high-resolution-pwm-on - // Pin PB7 = OCR1C (Timer 1, Channel C) - // Compare Output Mode = Clear on compare match, Channel C = COM1C1=1 COM1C0=0 - // (i.e. start high, go low when counter matches.) - // WGM Mode 14 (Fast PWM) = WGM13=1 WGM12=1 WGM11=1 WGM10=0 - // Clock Select = clk/1 (no prescaling) = CS12=0 CS11=0 CS10=1 + // Pin PB7 = OCR1C (Timer 1, Channel C) + // Compare Output Mode = Clear on compare match, Channel C = COM1C1=1 COM1C0=0 + // (i.e. start high, go low when counter matches.) + // WGM Mode 14 (Fast PWM) = WGM13=1 WGM12=1 WGM11=1 WGM10=0 + // Clock Select = clk/1 (no prescaling) = CS12=0 CS11=0 CS10=1 - TCCR1A = _BV(COM1x1) | _BV(WGM11); // = 0b00001010; - TCCR1B = _BV(WGM13) | _BV(WGM12) | _BV(CS10); // = 0b00011001; + TCCR1A = _BV(COM1x1) | _BV(WGM11); // = 0b00001010; + TCCR1B = _BV(WGM13) | _BV(WGM12) | _BV(CS10); // = 0b00011001; + #endif backlight_init(); #ifdef BACKLIGHT_BREATHING @@ -633,24 +644,43 @@ __attribute__ ((weak)) void backlight_set(uint8_t level) { // Prevent backlight blink on lowest level - // PORTx &= ~n - _SFR_IO8((backlight_pin >> 4) + 2) &= ~_BV(backlight_pin & 0xF); + #if BACKLIGHT_ON_STATE == 0 + // PORTx &= ~n + _SFR_IO8((backlight_pin >> 4) + 2) &= ~_BV(backlight_pin & 0xF); + #else + // PORTx |= n + _SFR_IO8((backlight_pin >> 4) + 2) |= _BV(backlight_pin & 0xF); + #endif if ( level == 0 ) { - // Turn off PWM control on backlight pin, revert to output low. - TCCR1A &= ~(_BV(COM1x1)); - OCR1x = 0x0; - } else if ( level == BACKLIGHT_LEVELS ) { - // Turn on PWM control of backlight pin - TCCR1A |= _BV(COM1x1); - // Set the brightness - OCR1x = 0xFFFF; - } else { - // Turn on PWM control of backlight pin - TCCR1A |= _BV(COM1x1); - // Set the brightness - OCR1x = 0xFFFF >> ((BACKLIGHT_LEVELS - level) * ((BACKLIGHT_LEVELS + 1) / 2)); - } + #ifndef NO_BACKLIGHT_CLOCK + // Turn off PWM control on backlight pin, revert to output low. + TCCR1A &= ~(_BV(COM1x1)); + OCR1x = 0x0; + #else + #if BACKLIGHT_ON_STATE == 0 + // PORTx |= n + _SFR_IO8((backlight_pin >> 4) + 2) |= _BV(backlight_pin & 0xF); + #else + // PORTx &= ~n + _SFR_IO8((backlight_pin >> 4) + 2) &= ~_BV(backlight_pin & 0xF); + #endif + #endif + } + #ifndef NO_BACKLIGHT_CLOCK + else if ( level == BACKLIGHT_LEVELS ) { + // Turn on PWM control of backlight pin + TCCR1A |= _BV(COM1x1); + // Set the brightness + OCR1x = 0xFFFF; + } + else { + // Turn on PWM control of backlight pin + TCCR1A |= _BV(COM1x1); + // Set the brightness + OCR1x = 0xFFFF >> ((BACKLIGHT_LEVELS - level) * ((BACKLIGHT_LEVELS + 1) / 2)); + } + #endif #ifdef BACKLIGHT_BREATHING breathing_intensity_default(); -- cgit v1.2.3 From 9c02e2ab49f020218f39f386fcbe2edfcea3d810 Mon Sep 17 00:00:00 2001 From: Jimmy Chan Date: Mon, 6 Feb 2017 08:42:38 -0800 Subject: correctly put eeprom EE_HANDS at addr 0x0a (decimal 10). default to rev2 project. do not default EE_HANDS for the serial keymap if you compare split_util.h with the original project by ahtn, the address we look for isLeftHand config went from addr 7 to addr 10 (decimal). The EEP files were not updated. EE_HANDS should not be enabled by default since it's more confusing for most users --- keyboards/lets_split/Makefile | 4 +++- keyboards/lets_split/eeprom-lefthand.eep | 2 +- keyboards/lets_split/eeprom-righthand.eep | 2 +- keyboards/lets_split/keymaps/serial/config.h | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/keyboards/lets_split/Makefile b/keyboards/lets_split/Makefile index 4e2a6f00f..f5c87d4d6 100644 --- a/keyboards/lets_split/Makefile +++ b/keyboards/lets_split/Makefile @@ -1,3 +1,5 @@ +SUBPROJECT_DEFAULT = rev2 + ifndef MAKEFILE_INCLUDED include ../../Makefile -endif \ No newline at end of file +endif diff --git a/keyboards/lets_split/eeprom-lefthand.eep b/keyboards/lets_split/eeprom-lefthand.eep index a92200b12..b9666a74c 100644 --- a/keyboards/lets_split/eeprom-lefthand.eep +++ b/keyboards/lets_split/eeprom-lefthand.eep @@ -1,2 +1,2 @@ -:080000000000000000000001F7 +:0B0000000000000000000000000001F4 :00000001FF diff --git a/keyboards/lets_split/eeprom-righthand.eep b/keyboards/lets_split/eeprom-righthand.eep index 91a683170..94cc5be7f 100644 --- a/keyboards/lets_split/eeprom-righthand.eep +++ b/keyboards/lets_split/eeprom-righthand.eep @@ -1,2 +1,2 @@ -:080000000000000000000000F8 +:0B0000000000000000000000000000F5 :00000001FF diff --git a/keyboards/lets_split/keymaps/serial/config.h b/keyboards/lets_split/keymaps/serial/config.h index 0e59b191b..753f422dd 100644 --- a/keyboards/lets_split/keymaps/serial/config.h +++ b/keyboards/lets_split/keymaps/serial/config.h @@ -18,7 +18,7 @@ along with this program. If not, see . #define USE_SERIAL -#define EE_HANDS +// #define EE_HANDS #ifdef SUBPROJECT_rev1 @@ -29,4 +29,4 @@ along with this program. If not, see . #endif #ifdef SUBPROJECT_rev2fliphalf #include "../../rev2fliphalf/config.h" -#endif \ No newline at end of file +#endif -- cgit v1.2.3 From 048ef311dc5a92d736c8b0778334bfa82f8f42a8 Mon Sep 17 00:00:00 2001 From: Jimmy Chan Date: Mon, 6 Feb 2017 09:53:38 -0800 Subject: udpate readme to reflect QMK and not having the Makefile from ahtn's repo --- keyboards/lets_split/readme.md | 86 +++++++++++++++++++++++++++++++++++------- 1 file changed, 72 insertions(+), 14 deletions(-) diff --git a/keyboards/lets_split/readme.md b/keyboards/lets_split/readme.md index a63ce5907..0e903065e 100644 --- a/keyboards/lets_split/readme.md +++ b/keyboards/lets_split/readme.md @@ -6,9 +6,45 @@ This readme and most of the code are from https://github.com/ahtn/tmk_keyboard/ Split keyboard firmware for Arduino Pro Micro or other ATmega32u4 based boards. + +## First Time Setup + +Download or clone the whole firmware and navigate to the keyboards/lets_split directory. Once your dev env is setup, you'll be able to generate the default .hex using: + +``` +$ make rev2 +``` + +You will see a lot of output and if everything worked correctly you will see the built hex files: + +``` +lets_split_rev2_serial.hex +lets_split_rev2_i2c.hex +``` + +If you would like to use one of the alternative keymaps, or create your own, copy one of the existing [keymaps](keymaps/) and run make like so: + + +``` +$ make rev2-YOUR_KEYMAP_NAME +``` + +If everything worked correctly you will see a file: + +``` +lets_split_rev2_YOUR_KEYMAP_NAME.hex +``` + +For more information on customizing keymaps, take a look at the primary documentation for [Customizing Your Keymap](/readme.md##customizing-your-keymap) in the main readme.md. + +### Let's split 1.0 +If you have a first generation Let's Split you will need to use the revision 1 code. To do so, use `rev1` in all your commands instead. + Features -------- +For the full Quantum Mechanical Keyboard feature list, see [the parent readme.md](/readme.md). + Some features supported by the firmware: * Either half can connect to the computer via USB, or both halves can be used @@ -62,7 +98,7 @@ unnecessary in simple use cases. Notes on Software Configuration ------------------------------- -Configuring the firmware is similar to any other TMK project. One thing +Configuring the firmware is similar to any other QMK project. One thing to note is that `MATIX_ROWS` in `config.h` is the total number of rows between the two halves, i.e. if your split keyboard has 4 rows in each half, then `MATRIX_ROWS=8`. @@ -70,37 +106,59 @@ the two halves, i.e. if your split keyboard has 4 rows in each half, then Also the current implementation assumes a maximum of 8 columns, but it would not be very difficult to adapt it to support more if required. - Flashing +------- +From the keymap directory run `make SUBPROJECT-KEYMAP-avrdude` for automatic serial port resolution and flashing. +Example: `make rev2-serial-avrdude` + + +Choosing which board to plug the USB cable into (choosing Master) -------- +Because the two boards are identical, the firmware has logic to differentiate the left and right board. -From the keymap directory run `make SUBPROJECT-KEYMAP-avrdude` for automatic serial port resolution and flashing. +It uses two strategies to figure things out: look at the EEPROM (memory on the chip) or looks if the current board has the usb cable. -Example: `make rev2-serial-avrdude` +The EEPROM approach requires additional setup (flashing the eeeprom) but allows you to swap the usb cable to either side. + +The USB cable approach is easier to setup and if you just want the usb cable on the left board, you do not need to do anything extra. +### Setting the left hand as master +If you always plug the usb cable into the left board, nothing extra is needed as this is the default. Comment out `EE_HANDS` and comment out `I2C_MASTER_RIGHT` if for some reason it was set. + +### Setting the right hand as master +If you always plug the usb cable into the right board, add an extra flag to your `config.h` +``` + #define I2C_MASTER_RIGHT +``` + +### Setting EE_hands to use either hands as master If you define `EE_HANDS` in your `config.h`, you will need to set the -EEPROM for the left and right halves. The EEPROM is used to store whether the +EEPROM for the left and right halves. + +The EEPROM is used to store whether the half is left handed or right handed. This makes it so that the same firmware file will run on both hands instead of having to flash left and right handed versions of the firmware to each half. To flash the EEPROM file for the left half run: ``` -make eeprom-left +avrdude -p atmega32u4 -P $(COM_PORT) -c avr109 -U eeprom:w:eeprom-lefthand.eep +// or the equivalent in dfu-programmer + ``` and similarly for right half ``` -make eeprom-right +avrdude -p atmega32u4 -P $(COM_PORT) -c avr109 -U eeprom:w:eeprom-righhand.eep +// or the equivalent in dfu-programmer ``` -After you have flashed the EEPROM for the first time, you then need to program -the flash memory: -``` -make program -``` +NOTE: replace `$(COM_PORT)` with the port of your device (e.g. `/dev/ttyACM0`) + +After you have flashed the EEPROM, you then need to set `EE_HANDS` in your config.h, rebuild the hex files and reflash. + Note that you need to program both halves, but you have the option of using different keymaps for each half. You could program the left half with a QWERTY -layout and the right half with a Colemak layout. Then if you connect the left -half to a computer by USB the keyboard will use QWERTY and Colemak when the +layout and the right half with a Colemak layout using bootmagic's default layout option. +Then if you connect the left half to a computer by USB the keyboard will use QWERTY and Colemak when the right half is connected. -- cgit v1.2.3 From 56d2198b3d85f112317b4b0d09d5cf6a5c915db8 Mon Sep 17 00:00:00 2001 From: Jimmy Chan Date: Mon, 6 Feb 2017 10:03:48 -0800 Subject: rename I2C_MASTER_RIGHT to MASTER_RIGHT since this works for serial as well --- keyboards/lets_split/keymaps/i2c/config.h | 7 ++++--- keyboards/lets_split/keymaps/serial/config.h | 2 ++ keyboards/lets_split/readme.md | 4 ++-- keyboards/lets_split/split_util.c | 3 ++- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/keyboards/lets_split/keymaps/i2c/config.h b/keyboards/lets_split/keymaps/i2c/config.h index 332c990fc..013542731 100644 --- a/keyboards/lets_split/keymaps/i2c/config.h +++ b/keyboards/lets_split/keymaps/i2c/config.h @@ -16,8 +16,9 @@ along with this program. If not, see . */ #define USE_I2C -#define I2C_MASTER_LEFT -// #define I2C_MASTER_RIGHT +#define MASTER_LEFT +// #define _MASTER_RIGHT +// #define EE_HANDS #ifdef SUBPROJECT_rev1 #include "../../rev1/config.h" @@ -27,4 +28,4 @@ along with this program. If not, see . #endif #ifdef SUBPROJECT_rev2fliphalf #include "../../rev2fliphalf/config.h" -#endif \ No newline at end of file +#endif diff --git a/keyboards/lets_split/keymaps/serial/config.h b/keyboards/lets_split/keymaps/serial/config.h index 753f422dd..ba271d1ac 100644 --- a/keyboards/lets_split/keymaps/serial/config.h +++ b/keyboards/lets_split/keymaps/serial/config.h @@ -18,6 +18,8 @@ along with this program. If not, see . #define USE_SERIAL +#define MASTER_LEFT +// #define _MASTER_RIGHT // #define EE_HANDS diff --git a/keyboards/lets_split/readme.md b/keyboards/lets_split/readme.md index 0e903065e..ecce3f415 100644 --- a/keyboards/lets_split/readme.md +++ b/keyboards/lets_split/readme.md @@ -123,12 +123,12 @@ The EEPROM approach requires additional setup (flashing the eeeprom) but allows The USB cable approach is easier to setup and if you just want the usb cable on the left board, you do not need to do anything extra. ### Setting the left hand as master -If you always plug the usb cable into the left board, nothing extra is needed as this is the default. Comment out `EE_HANDS` and comment out `I2C_MASTER_RIGHT` if for some reason it was set. +If you always plug the usb cable into the left board, nothing extra is needed as this is the default. Comment out `EE_HANDS` and comment out `I2C_MASTER_RIGHT` or `MASTER_RIGHT` if for some reason it was set. ### Setting the right hand as master If you always plug the usb cable into the right board, add an extra flag to your `config.h` ``` - #define I2C_MASTER_RIGHT + #define MASTER_RIGHT ``` ### Setting EE_hands to use either hands as master diff --git a/keyboards/lets_split/split_util.c b/keyboards/lets_split/split_util.c index 461921798..226dc1881 100644 --- a/keyboards/lets_split/split_util.c +++ b/keyboards/lets_split/split_util.c @@ -21,7 +21,8 @@ static void setup_handedness(void) { #ifdef EE_HANDS isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS); #else - #ifdef I2C_MASTER_RIGHT + // I2C_MASTER_RIGHT is deprecated use MASTER_RIGHT instead since this works for both serial and i2c + #if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT) isLeftHand = !has_usb(); #else isLeftHand = has_usb(); -- cgit v1.2.3 From 304d84cd0835faaa3b95d1c3be48399a423f9944 Mon Sep 17 00:00:00 2001 From: dungdung Date: Tue, 7 Feb 2017 16:55:40 -0800 Subject: Moved KC60 capslock LED code to standard led_set_kb so it can be overridden by users --- keyboards/kc60/kc60.c | 15 +++++++++++++++ keyboards/kc60/led.c | 31 ------------------------------- keyboards/kc60/rules.mk | 3 --- 3 files changed, 15 insertions(+), 34 deletions(-) delete mode 100644 keyboards/kc60/led.c diff --git a/keyboards/kc60/kc60.c b/keyboards/kc60/kc60.c index 746ac634a..09b924b28 100644 --- a/keyboards/kc60/kc60.c +++ b/keyboards/kc60/kc60.c @@ -1 +1,16 @@ #include "kc60.h" + +void led_set_kb(uint8_t usb_led) +{ + if (usb_led & (1< -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 -#include "stdint.h" -#include "led.h" - - -void led_set(uint8_t usb_led) -{ - if (usb_led & (1< Date: Tue, 7 Feb 2017 20:51:50 -0500 Subject: accept numbers in travis build --- util/travis_build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/travis_build.sh b/util/travis_build.sh index 794b0d3a1..2d43f3e5e 100644 --- a/util/travis_build.sh +++ b/util/travis_build.sh @@ -11,7 +11,7 @@ if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then make all-keyboards AUTOGEN="true" : $((exit_code = $exit_code + $?)) else - MKB=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -oP '(?<=keyboards\/)([a-zA-Z_]+)' | sort -u) + MKB=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -oP '(?<=keyboards\/)([a-zA-Z0-9_]+)' | sort -u) for KB in $MKB ; do echo "Making all keymaps for $KB" make "$KB" AUTOGEN=true -- cgit v1.2.3 From 4be4ed33970bbe5387e0004257d5fabc46a03d54 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Thu, 9 Feb 2017 01:40:22 +0700 Subject: Add USB-BLE manual output switching and indicator --- .../handwired/promethium/keymaps/priyadi/keymap.c | 56 +++++++++++++++++----- 1 file changed, 44 insertions(+), 12 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 99948967b..05cd2f061 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -13,6 +13,7 @@ #include "rgbsps.h" #include "ps2_mouse.h" #include "ps2.h" +#include "outputselect.h" #define COUNT(x) (sizeof (x) / sizeof (*(x))) // #define RGBLED_NUM 5 @@ -496,6 +497,24 @@ void led_layer_gui(void) { rgbsps_send(); } +void led_set_output_ble(void) { + rgbsps_set(LED_IND_BLUETOOTH, 0, 0, 15); + rgbsps_set(LED_IND_USB, 0, 0, 0); + rgbsps_send(); +} + +void led_set_output_usb(void) { + rgbsps_set(LED_IND_BLUETOOTH, 0, 0, 0); + rgbsps_set(LED_IND_USB, 15, 15, 15); + rgbsps_send(); +} + +void led_set_output_none(void) { + rgbsps_set(LED_IND_BLUETOOTH, 0, 0, 0); + rgbsps_set(LED_IND_USB, 0, 0, 0); + rgbsps_send(); +} + void led_init(void) { // turn off all rgbsps_turnoff(); @@ -693,8 +712,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_GUI] = KEYMAP( _______, LGUI(KC_1),LGUI(KC_2),LGUI(KC_3),LGUI(KC_4),LGUI(KC_5),LGUI(KC_6),LGUI(KC_7),LGUI(KC_8),LGUI(KC_9),LGUI(KC_0), _______, - LINUX, _______, KC_VOLD, KC_MUTE, KC_VOLU,_______,_______,KC_WWW_BACK,_______,KC_WWW_FORWARD,KC_PAUS, QWERTY, - WIN, _______, KC_MPRV, KC_MPLY, KC_MNXT, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, COLEMAK, + LINUX, OUT_USB, KC_VOLD, KC_MUTE, KC_VOLU,_______,_______,KC_WWW_BACK,_______,KC_WWW_FORWARD,KC_PAUS, QWERTY, + WIN, OUT_BLE, KC_MPRV, KC_MPLY, KC_MNXT, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, COLEMAK, OSX, _______, _______, _______, _______, BL_DEC, BL_INC, _______, _______, RGB_VAI, RGB_VAD, WORKMAN ), @@ -908,23 +927,36 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } +void set_output_user(uint8_t output) { + switch(output) { + case OUTPUT_USB: + led_set_output_usb(); + break; + case OUTPUT_ADAFRUIT_BLE: + led_set_output_ble(); + break; + default: + led_set_output_none(); + } +} + void matrix_init_user(void) { + _delay_ms(500); // give time for usb to initialize + #ifdef AUDIO_ENABLE startup_user(); #endif set_unicode_input_mode(UC_LNX); led_init(); -} - -// void init_rgblight(void) { -// for (uint8_t i = 0; i < RGBLED_NUM; i++) { -// led[i].r = 255; -// led[i].g = 85; -// led[i].b = 0; -// } -// ws2812_setleds(led, RGBLED_NUM); -// } + // auto detect output on init + uint8_t output = auto_detect_output(); + if (output == OUTPUT_USB) { + set_output(OUTPUT_USB); + } else { + set_output(OUTPUT_ADAFRUIT_BLE); + } +} #ifdef AUDIO_ENABLE -- cgit v1.2.3 From 9a64eb8533a9001638e2c5c62d084a3fd7dd07a1 Mon Sep 17 00:00:00 2001 From: VoodaGod Date: Thu, 9 Feb 2017 10:01:39 +0100 Subject: updated bone2planck keymap & readme --- keyboards/planck/keymaps/bone2planck/Makefile | 14 ++--- keyboards/planck/keymaps/bone2planck/config.h | 5 +- keyboards/planck/keymaps/bone2planck/keymap.c | 23 ++++---- keyboards/planck/keymaps/bone2planck/readme.md | 82 ++++++++++++++++++++++++-- 4 files changed, 98 insertions(+), 26 deletions(-) diff --git a/keyboards/planck/keymaps/bone2planck/Makefile b/keyboards/planck/keymaps/bone2planck/Makefile index cf2c31f0f..39635192e 100644 --- a/keyboards/planck/keymaps/bone2planck/Makefile +++ b/keyboards/planck/keymaps/bone2planck/Makefile @@ -1,20 +1,16 @@ -# Please remove if no longer applicable -$(warning THIS FILE MAY BE TOO LARGE FOR YOUR KEYBOARD) -$(warning Please disable some options in the Makefile to resolve) - # Build Options -# change to "no" to disable the options, or define them in the Makefile in +# 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) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration +COMMAND_ENABLE = no # 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 = yes # Enable keyboard backlight functionality +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = yes # Audio output on port C6 +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. diff --git a/keyboards/planck/keymaps/bone2planck/config.h b/keyboards/planck/keymaps/bone2planck/config.h index 60aff6db0..3e9e692d3 100644 --- a/keyboards/planck/keymaps/bone2planck/config.h +++ b/keyboards/planck/keymaps/bone2planck/config.h @@ -1,7 +1,8 @@ #ifndef CONFIG_USER_H #define CONFIG_USER_H -#endif #include "../../config.h" -#define PREVENT_STUCK_MODIFIERS \ No newline at end of file +#define PREVENT_STUCK_MODIFIERS + +#endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/bone2planck/keymap.c b/keyboards/planck/keymaps/bone2planck/keymap.c index 69d164b8c..63fd2f1fc 100644 --- a/keyboards/planck/keymaps/bone2planck/keymap.c +++ b/keyboards/planck/keymaps/bone2planck/keymap.c @@ -7,10 +7,10 @@ // for intellisense, has to be commented for building /* #include "..\..\..\..\quantum\keymap_extras\keymap_german.h" -#include "..\..\..\..\quantum\keymap_common.h" #include "..\..\..\..\tmk_core\common\keycode.h" */ + #define _______ KC_TRNS /* This Layout tries to emulate the Bone2 Variant of Neo2, and is intended to be used with a German QWERTZ Softwarelayout. @@ -23,7 +23,7 @@ Bone2 wiki page: http://wiki.neo-layout.org/wiki/Bone const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Bone2 +/* Bone2 (adapted) * ,-----------------------------------------------------------------------------------. * | Q | J | D | U | A | X | P | H | L | M | W | ẞ | * |------+------+------+------+------+-------------+------+------+------+------+------| @@ -42,7 +42,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }, /* M1 Special Characters -very ergonomic placement for coding +* very ergonomic placement for coding * ,-----------------------------------------------------------------------------------. * | ° | @ | _ | [ | ] | ^ | ! | < | > | = | & | ´ | * |------+------+------+------+------+-------------+------+------+------+------+------| @@ -56,12 +56,12 @@ very ergonomic placement for coding [1] = { { DE_RING, DE_AT, DE_UNDS, DE_LBRC, DE_RBRC, DE_CIRC, DE_EXLM, DE_LESS, DE_MORE, DE_EQL, DE_AMPR, DE_ACUT }, { _______, DE_BSLS, DE_SLSH, DE_LCBR, DE_RCBR, DE_ASTR, DE_QST, DE_LPRN, DE_RPRN, DE_MINS, DE_COLN, _______ }, - { _______, DE_HASH, DE_DLR, DE_PIPE, DE_TILD, DE_EURO, DE_PLUS, DE_PERC, DE_DQOT, DE_QUOT, DE_SCLN, _______ }, + { _______, DE_HASH, DE_TILD, DE_PIPE, DE_DLR, DE_EURO, DE_PLUS, DE_PERC, DE_DQOT, DE_QUOT, DE_SCLN, _______ }, { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ } }, -/* Navigation & Number Blocks -very easy to get used to & intuituve placement +/* M2 Navigation & Number Blocks +* very easy to get used to & intuituve placement * ,-----------------------------------------------------------------------------------. * | | PgUp | Bksp | Up | DEL | PgDn | | 7 | 8 | 9 | | Ins | * |------+------+------+------+------+-------------+------+------+------+------+------| @@ -79,8 +79,8 @@ very easy to get used to & intuituve placement { _______, _______, _______, MO(3), _______, _______, _______, _______, MO(3), _______, _______, _______ } }, -/* Flipped Navigation & Number Blocks for one handed use -accessed by sliding from M2 to M3 with thumb +/* M3 Switched Navigation & Number Blocks for one handed use +* accessed by sliding from M2 to M3 with thumb * ,-----------------------------------------------------------------------------------. * | Ins | | 7 | 8 | 9 | | PgUp | Bksp | Up | DEL | PgDn | | * |------+------+------+------+------+-------------+------+------+------+------+------| @@ -100,8 +100,7 @@ accessed by sliding from M2 to M3 with thumb }, -/* Function & Media Keys -slide from m4 to m5 to access flipped version +/* M4 Function & Media Keys * ,-----------------------------------------------------------------------------------. * | | | Print|Scroll|Pause | | | F7 | F8 | F9 | F12 | | * |------+------+------+------+------+-------------+------+------+------+------+------| @@ -120,7 +119,8 @@ slide from m4 to m5 to access flipped version }, -/* flipped Function & Media Keys +/* M5 Switched Function & Media Keys| +* accessed by sliding from M4 to M5 with thumb * ,-----------------------------------------------------------------------------------. * | | | F7 | F8 | F9 | F12 | | Print|Scroll| Pause| | | * |------+------+------+------+------+-------------+------+------+------+------+------| @@ -139,6 +139,7 @@ slide from m4 to m5 to access flipped version } }; + const uint16_t PROGMEM fn_actions[] = { }; diff --git a/keyboards/planck/keymaps/bone2planck/readme.md b/keyboards/planck/keymaps/bone2planck/readme.md index 3c425efdd..4d19c3c11 100644 --- a/keyboards/planck/keymaps/bone2planck/readme.md +++ b/keyboards/planck/keymaps/bone2planck/readme.md @@ -1,8 +1,82 @@ -check keymap.c to the layers +Bone2Planck This Layout tries to emulate the Bone2 Variant of Neo2, and is intended to be used with a German QWERTZ Softwarelayout. It has "üäöß" as it is optimized for a mix of German & English. -My favourite features are the placement of the special characters often used for programming right on the home row -and the number & navigation block combo, so you never have to move your hands from their home position. +The special character layer and the navigation & number block layer are inspired by the Neo2 layers, +designed to keep the fingers near the home row. -Bone2 wiki page: http://wiki.neo-layout.org/wiki/Bone \ No newline at end of file +Bone2 wiki page: http://wiki.neo-layout.org/wiki/Bone + +* Bone2 (adapted) Base Layer +* ,-----------------------------------------------------------------------------------. +* | Q | J | D | U | A | X | P | H | L | M | W | ẞ | +* |------+------+------+------+------+-------------+------+------+------+------+------| +* |M1/Tab| C | T | I | E | O | B | N | R | S | G |M1/Ent| //hold for M1, tap for Tab/Enter +* |------+------+------+------+------+------|------+------+------+------+------+------| +* | Shift| F | V | Ü | Ä | Ö | Y | Z | , | . | K |Shift | +* |------+------+------+------+------+------+------+------+------+------+------+------| +* | Ctrl | GUI | Alt | M4 | M2 | Space | M2 | M4 | Alt | Esc | Ctrl | +* `-----------------------------------------------------------------------------------' + +* M1 Special Characters +* very ergonomic placement for coding +* ,-----------------------------------------------------------------------------------. +* | ° | @ | _ | [ | ] | ^ | ! | < | > | = | & | ´ | +* |------+------+------+------+------+-------------+------+------+------+------+------| +* |M1/Tab| \ | / | { | } | * | ? | ( | ) | - | : |M1/Ent| //hold for M1, tap for Tab/Enter +* |------+------+------+------+------+------|------+------+------+------+------+------| +* | Shift| # | $ | | | ~ | € | + | % | " | ' | ; |Shift | +* |------+------+------+------+------+------+------+------+------+------+------+------| +* | Ctrl | GUI | Alt | M4 | M2 | Space | M2 | M4 | Alt | Esc | Ctrl | +* `-----------------------------------------------------------------------------------' + +* M2 Navigation & Number Blocks +* very easy to get used to & intuituve placement +* ,-----------------------------------------------------------------------------------. +* | | PgUp | Bksp | Up | DEL | PgDn | | 7 | 8 | 9 | | Ins | +* |------+------+------+------+------+-------------+------+------+------+------+------| +* | Tab | Home | Lft | Down | Right| End | . | 4 | 5 | 6 | , | Enter| +* |------+------+------+------+------+------|------+------+------+------+------+------| +* | Shift| | Tab | | Enter| | 0 | 1 | 2 | 3 | ; |Shift | +* |------+------+------+------+------+------+------+------+------+------+------+------| +* | Ctrl | GUI | Alt | M3 | M2 | Space | M2 | M3 | Alt | Esc | Ctrl | +* `-----------------------------------------------------------------------------------' + +* M4 Function & Media Keys +* ,-----------------------------------------------------------------------------------. +* | | | Print|Scroll|Pause | | | F7 | F8 | F9 | F12 | | +* |------+------+------+------+------+-------------+------+------+------+------+------| +* | | | Mute | Vol- | Vol+ | | ³ | F4 | F5 | F6 | F11 | | +* |------+------+------+------+------+------|------+------+------+------+------+------| +* | Shift| | Prev | Play | Next | | ² | F1 | F2 | F3 | F10 |Shift | +* |------+------+------+------+------+------+------+------+------+------+------+------| +* | Ctrl | GUI | Alt | M4 | M5 | Space | M5 | M4 | Alt | Esc | Ctrl | +* `-----------------------------------------------------------------------------------' + + + +Switched layers for one handed access: + +* M3 Switched Navigation & Number Blocks for one handed use +* accessed by sliding from M2 to M3 with thumb +* ,-----------------------------------------------------------------------------------. +* | Ins | | 7 | 8 | 9 | | PgUp | Bksp | Up | DEL | PgDn | | +* |------+------+------+------+------+-------------+------+------+------+------+------| +* | Tab | . | 4 | 5 | 6 | , | Home | Left | Down | Right| End | Enter| +* |------+------+------+------+------+------|------+------+------+------+------+------| +* | Shift| 0 | 1 | 2 | 3 | ; | | Tab | Ins | Enter| |Shift | +* |------+------+------+------+------+------+------+------+------+------+------+------| +* | Ctrl | GUI | Alt | M3 | | Space | | M3 | Alt | Esc | Ctrl | +* `-----------------------------------------------------------------------------------' + +* M5 Switched Function & Media Keys| +* accessed by sliding from M4 to M5 with thumb +* ,-----------------------------------------------------------------------------------. +* | | | F7 | F8 | F9 | F12 | | Print|Scroll| Pause| | | +* |------+------+------+------+------+-------------+------+------+------+------+------| +* | | ³ | F4 | F5 | F6 | F11 | | Mute | Vol- | Vol+ | | | +* |------+------+------+------+------+------|------+------+------+------+------+------| +* | Shift| ² | F1 | F2 | F3 | F10 | | Prev | Play | Next | |Shift | +* |------+------+------+------+------+------+------+------+------+------+------+------| +* | Ctrl | GUI | Alt | | M5 | Space | M5 | | Alt | Esc | Ctrl | +* `-----------------------------------------------------------------------------------' \ No newline at end of file -- cgit v1.2.3 From cb590bb37bf5d460db872680c0324f90c0aedea5 Mon Sep 17 00:00:00 2001 From: VoodaGod Date: Thu, 9 Feb 2017 11:21:52 +0100 Subject: updated readme --- keyboards/planck/keymaps/bone2planck/readme.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/keyboards/planck/keymaps/bone2planck/readme.md b/keyboards/planck/keymaps/bone2planck/readme.md index 4d19c3c11..1469ce988 100644 --- a/keyboards/planck/keymaps/bone2planck/readme.md +++ b/keyboards/planck/keymaps/bone2planck/readme.md @@ -1,4 +1,5 @@ Bone2Planck +===================================== This Layout tries to emulate the Bone2 Variant of Neo2, and is intended to be used with a German QWERTZ Softwarelayout. It has "üäöß" as it is optimized for a mix of German & English. @@ -7,7 +8,9 @@ designed to keep the fingers near the home row. Bone2 wiki page: http://wiki.neo-layout.org/wiki/Bone -* Bone2 (adapted) Base Layer +To build, run "make" from within the \bone2planck folder. + +## Bone2 (adapted) Base Layer * ,-----------------------------------------------------------------------------------. * | Q | J | D | U | A | X | P | H | L | M | W | ẞ | * |------+------+------+------+------+-------------+------+------+------+------+------| @@ -18,7 +21,7 @@ Bone2 wiki page: http://wiki.neo-layout.org/wiki/Bone * | Ctrl | GUI | Alt | M4 | M2 | Space | M2 | M4 | Alt | Esc | Ctrl | * `-----------------------------------------------------------------------------------' -* M1 Special Characters +## M1 Special Characters * very ergonomic placement for coding * ,-----------------------------------------------------------------------------------. * | ° | @ | _ | [ | ] | ^ | ! | < | > | = | & | ´ | @@ -30,7 +33,7 @@ Bone2 wiki page: http://wiki.neo-layout.org/wiki/Bone * | Ctrl | GUI | Alt | M4 | M2 | Space | M2 | M4 | Alt | Esc | Ctrl | * `-----------------------------------------------------------------------------------' -* M2 Navigation & Number Blocks +## M2 Navigation & Number Blocks * very easy to get used to & intuituve placement * ,-----------------------------------------------------------------------------------. * | | PgUp | Bksp | Up | DEL | PgDn | | 7 | 8 | 9 | | Ins | @@ -42,7 +45,7 @@ Bone2 wiki page: http://wiki.neo-layout.org/wiki/Bone * | Ctrl | GUI | Alt | M3 | M2 | Space | M2 | M3 | Alt | Esc | Ctrl | * `-----------------------------------------------------------------------------------' -* M4 Function & Media Keys +## M4 Function & Media Keys * ,-----------------------------------------------------------------------------------. * | | | Print|Scroll|Pause | | | F7 | F8 | F9 | F12 | | * |------+------+------+------+------+-------------+------+------+------+------+------| @@ -55,9 +58,9 @@ Bone2 wiki page: http://wiki.neo-layout.org/wiki/Bone -Switched layers for one handed access: +##Switched layers for one handed access: -* M3 Switched Navigation & Number Blocks for one handed use +### M3 Switched Navigation & Number Blocks for one handed use * accessed by sliding from M2 to M3 with thumb * ,-----------------------------------------------------------------------------------. * | Ins | | 7 | 8 | 9 | | PgUp | Bksp | Up | DEL | PgDn | | @@ -69,7 +72,7 @@ Switched layers for one handed access: * | Ctrl | GUI | Alt | M3 | | Space | | M3 | Alt | Esc | Ctrl | * `-----------------------------------------------------------------------------------' -* M5 Switched Function & Media Keys| +### M5 Switched Function & Media Keys| * accessed by sliding from M4 to M5 with thumb * ,-----------------------------------------------------------------------------------. * | | | F7 | F8 | F9 | F12 | | Print|Scroll| Pause| | | -- cgit v1.2.3 From 1becbcb013bbad5ec9a30f017a3565e99211ea08 Mon Sep 17 00:00:00 2001 From: VoodaGod Date: Thu, 9 Feb 2017 11:25:50 +0100 Subject: readme formatting changes --- keyboards/planck/keymaps/bone2planck/readme.md | 122 ++++++++++++------------- 1 file changed, 61 insertions(+), 61 deletions(-) diff --git a/keyboards/planck/keymaps/bone2planck/readme.md b/keyboards/planck/keymaps/bone2planck/readme.md index 1469ce988..2a5db61f2 100644 --- a/keyboards/planck/keymaps/bone2planck/readme.md +++ b/keyboards/planck/keymaps/bone2planck/readme.md @@ -1,7 +1,7 @@ Bone2Planck ===================================== -This Layout tries to emulate the Bone2 Variant of Neo2, and is intended to be used with a German QWERTZ Softwarelayout. +This layout tries to emulate the Bone2 variant of Neo2, and is intended to be used with a German QWERTZ softwarelayout. It has "üäöß" as it is optimized for a mix of German & English. The special character layer and the navigation & number block layer are inspired by the Neo2 layers, designed to keep the fingers near the home row. @@ -11,75 +11,75 @@ Bone2 wiki page: http://wiki.neo-layout.org/wiki/Bone To build, run "make" from within the \bone2planck folder. ## Bone2 (adapted) Base Layer -* ,-----------------------------------------------------------------------------------. -* | Q | J | D | U | A | X | P | H | L | M | W | ẞ | -* |------+------+------+------+------+-------------+------+------+------+------+------| -* |M1/Tab| C | T | I | E | O | B | N | R | S | G |M1/Ent| //hold for M1, tap for Tab/Enter -* |------+------+------+------+------+------|------+------+------+------+------+------| -* | Shift| F | V | Ü | Ä | Ö | Y | Z | , | . | K |Shift | -* |------+------+------+------+------+------+------+------+------+------+------+------| -* | Ctrl | GUI | Alt | M4 | M2 | Space | M2 | M4 | Alt | Esc | Ctrl | -* `-----------------------------------------------------------------------------------' + ,-----------------------------------------------------------------------------------. + | Q | J | D | U | A | X | P | H | L | M | W | ẞ | + |------+------+------+------+------+-------------+------+------+------+------+------| + |M1/Tab| C | T | I | E | O | B | N | R | S | G |M1/Ent| hold for M1, tap for Tab/Enter + |------+------+------+------+------+------|------+------+------+------+------+------| + | Shift| F | V | Ü | Ä | Ö | Y | Z | , | . | K |Shift | + |------+------+------+------+------+------+------+------+------+------+------+------| + | Ctrl | GUI | Alt | M4 | M2 | Space | M2 | M4 | Alt | Esc | Ctrl | + `-----------------------------------------------------------------------------------' ## M1 Special Characters -* very ergonomic placement for coding -* ,-----------------------------------------------------------------------------------. -* | ° | @ | _ | [ | ] | ^ | ! | < | > | = | & | ´ | -* |------+------+------+------+------+-------------+------+------+------+------+------| -* |M1/Tab| \ | / | { | } | * | ? | ( | ) | - | : |M1/Ent| //hold for M1, tap for Tab/Enter -* |------+------+------+------+------+------|------+------+------+------+------+------| -* | Shift| # | $ | | | ~ | € | + | % | " | ' | ; |Shift | -* |------+------+------+------+------+------+------+------+------+------+------+------| -* | Ctrl | GUI | Alt | M4 | M2 | Space | M2 | M4 | Alt | Esc | Ctrl | -* `-----------------------------------------------------------------------------------' + very ergonomic placement for coding + ,-----------------------------------------------------------------------------------. + | ° | @ | _ | [ | ] | ^ | ! | < | > | = | & | ´ | + |------+------+------+------+------+-------------+------+------+------+------+------| + |M1/Tab| \ | / | { | } | * | ? | ( | ) | - | : |M1/Ent| hold for M1, tap for Tab/Enter + |------+------+------+------+------+------|------+------+------+------+------+------| + | Shift| # | $ | | | ~ | € | + | % | " | ' | ; |Shift | + |------+------+------+------+------+------+------+------+------+------+------+------| + | Ctrl | GUI | Alt | M4 | M2 | Space | M2 | M4 | Alt | Esc | Ctrl | + `-----------------------------------------------------------------------------------' ## M2 Navigation & Number Blocks -* very easy to get used to & intuituve placement -* ,-----------------------------------------------------------------------------------. -* | | PgUp | Bksp | Up | DEL | PgDn | | 7 | 8 | 9 | | Ins | -* |------+------+------+------+------+-------------+------+------+------+------+------| -* | Tab | Home | Lft | Down | Right| End | . | 4 | 5 | 6 | , | Enter| -* |------+------+------+------+------+------|------+------+------+------+------+------| -* | Shift| | Tab | | Enter| | 0 | 1 | 2 | 3 | ; |Shift | -* |------+------+------+------+------+------+------+------+------+------+------+------| -* | Ctrl | GUI | Alt | M3 | M2 | Space | M2 | M3 | Alt | Esc | Ctrl | -* `-----------------------------------------------------------------------------------' + very easy to get used to & intuituve placement + ,-----------------------------------------------------------------------------------. + | | PgUp | Bksp | Up | DEL | PgDn | | 7 | 8 | 9 | | Ins | + |------+------+------+------+------+-------------+------+------+------+------+------| + | Tab | Home | Lft | Down | Right| End | . | 4 | 5 | 6 | , | Enter| + |------+------+------+------+------+------|------+------+------+------+------+------| + | Shift| | Tab | | Enter| | 0 | 1 | 2 | 3 | ; |Shift | + |------+------+------+------+------+------+------+------+------+------+------+------| + | Ctrl | GUI | Alt | M3 | M2 | Space | M2 | M3 | Alt | Esc | Ctrl | + `-----------------------------------------------------------------------------------' ## M4 Function & Media Keys -* ,-----------------------------------------------------------------------------------. -* | | | Print|Scroll|Pause | | | F7 | F8 | F9 | F12 | | -* |------+------+------+------+------+-------------+------+------+------+------+------| -* | | | Mute | Vol- | Vol+ | | ³ | F4 | F5 | F6 | F11 | | -* |------+------+------+------+------+------|------+------+------+------+------+------| -* | Shift| | Prev | Play | Next | | ² | F1 | F2 | F3 | F10 |Shift | -* |------+------+------+------+------+------+------+------+------+------+------+------| -* | Ctrl | GUI | Alt | M4 | M5 | Space | M5 | M4 | Alt | Esc | Ctrl | -* `-----------------------------------------------------------------------------------' + ,-----------------------------------------------------------------------------------. + | | | Print|Scroll|Pause | | | F7 | F8 | F9 | F12 | | + |------+------+------+------+------+-------------+------+------+------+------+------| + | | | Mute | Vol- | Vol+ | | ³ | F4 | F5 | F6 | F11 | | + |------+------+------+------+------+------|------+------+------+------+------+------| + | Shift| | Prev | Play | Next | | ² | F1 | F2 | F3 | F10 |Shift | + |------+------+------+------+------+------+------+------+------+------+------+------| + | Ctrl | GUI | Alt | M4 | M5 | Space | M5 | M4 | Alt | Esc | Ctrl | + `-----------------------------------------------------------------------------------' ##Switched layers for one handed access: -### M3 Switched Navigation & Number Blocks for one handed use -* accessed by sliding from M2 to M3 with thumb -* ,-----------------------------------------------------------------------------------. -* | Ins | | 7 | 8 | 9 | | PgUp | Bksp | Up | DEL | PgDn | | -* |------+------+------+------+------+-------------+------+------+------+------+------| -* | Tab | . | 4 | 5 | 6 | , | Home | Left | Down | Right| End | Enter| -* |------+------+------+------+------+------|------+------+------+------+------+------| -* | Shift| 0 | 1 | 2 | 3 | ; | | Tab | Ins | Enter| |Shift | -* |------+------+------+------+------+------+------+------+------+------+------+------| -* | Ctrl | GUI | Alt | M3 | | Space | | M3 | Alt | Esc | Ctrl | -* `-----------------------------------------------------------------------------------' +### M3 Switched Navigation & Number Blocks + accessed by sliding from M2 to M3 with thumb + ,-----------------------------------------------------------------------------------. + | Ins | | 7 | 8 | 9 | | PgUp | Bksp | Up | DEL | PgDn | | + |------+------+------+------+------+-------------+------+------+------+------+------| + | Tab | . | 4 | 5 | 6 | , | Home | Left | Down | Right| End | Enter| + |------+------+------+------+------+------|------+------+------+------+------+------| + | Shift| 0 | 1 | 2 | 3 | ; | | Tab | Ins | Enter| |Shift | + |------+------+------+------+------+------+------+------+------+------+------+------| + | Ctrl | GUI | Alt | M3 | | Space | | M3 | Alt | Esc | Ctrl | + `-----------------------------------------------------------------------------------' -### M5 Switched Function & Media Keys| -* accessed by sliding from M4 to M5 with thumb -* ,-----------------------------------------------------------------------------------. -* | | | F7 | F8 | F9 | F12 | | Print|Scroll| Pause| | | -* |------+------+------+------+------+-------------+------+------+------+------+------| -* | | ³ | F4 | F5 | F6 | F11 | | Mute | Vol- | Vol+ | | | -* |------+------+------+------+------+------|------+------+------+------+------+------| -* | Shift| ² | F1 | F2 | F3 | F10 | | Prev | Play | Next | |Shift | -* |------+------+------+------+------+------+------+------+------+------+------+------| -* | Ctrl | GUI | Alt | | M5 | Space | M5 | | Alt | Esc | Ctrl | -* `-----------------------------------------------------------------------------------' \ No newline at end of file +### M5 Switched Function & Media Keys + accessed by sliding from M4 to M5 with thumb + ,-----------------------------------------------------------------------------------. + | | | F7 | F8 | F9 | F12 | | Print|Scroll| Pause| | | + |------+------+------+------+------+-------------+------+------+------+------+------| + | | ³ | F4 | F5 | F6 | F11 | | Mute | Vol- | Vol+ | | | + |------+------+------+------+------+------|------+------+------+------+------+------| + | Shift| ² | F1 | F2 | F3 | F10 | | Prev | Play | Next | |Shift | + |------+------+------+------+------+------+------+------+------+------+------+------| + | Ctrl | GUI | Alt | | M5 | Space | M5 | | Alt | Esc | Ctrl | + `-----------------------------------------------------------------------------------' \ No newline at end of file -- cgit v1.2.3 From 986b065654460653aa94e8ec1ebf8dba877df2e8 Mon Sep 17 00:00:00 2001 From: VoodaGod Date: Thu, 9 Feb 2017 12:17:13 +0100 Subject: more formatting --- keyboards/planck/keymaps/bone2planck/readme.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/keyboards/planck/keymaps/bone2planck/readme.md b/keyboards/planck/keymaps/bone2planck/readme.md index 2a5db61f2..9a27a86b9 100644 --- a/keyboards/planck/keymaps/bone2planck/readme.md +++ b/keyboards/planck/keymaps/bone2planck/readme.md @@ -11,6 +11,7 @@ Bone2 wiki page: http://wiki.neo-layout.org/wiki/Bone To build, run "make" from within the \bone2planck folder. ## Bone2 (adapted) Base Layer +``` ,-----------------------------------------------------------------------------------. | Q | J | D | U | A | X | P | H | L | M | W | ẞ | |------+------+------+------+------+-------------+------+------+------+------+------| @@ -20,9 +21,11 @@ To build, run "make" from within the \bone2planck folder. |------+------+------+------+------+------+------+------+------+------+------+------| | Ctrl | GUI | Alt | M4 | M2 | Space | M2 | M4 | Alt | Esc | Ctrl | `-----------------------------------------------------------------------------------' +``` ## M1 Special Characters very ergonomic placement for coding +``` ,-----------------------------------------------------------------------------------. | ° | @ | _ | [ | ] | ^ | ! | < | > | = | & | ´ | |------+------+------+------+------+-------------+------+------+------+------+------| @@ -32,9 +35,11 @@ To build, run "make" from within the \bone2planck folder. |------+------+------+------+------+------+------+------+------+------+------+------| | Ctrl | GUI | Alt | M4 | M2 | Space | M2 | M4 | Alt | Esc | Ctrl | `-----------------------------------------------------------------------------------' +``` ## M2 Navigation & Number Blocks very easy to get used to & intuituve placement +``` ,-----------------------------------------------------------------------------------. | | PgUp | Bksp | Up | DEL | PgDn | | 7 | 8 | 9 | | Ins | |------+------+------+------+------+-------------+------+------+------+------+------| @@ -44,8 +49,10 @@ To build, run "make" from within the \bone2planck folder. |------+------+------+------+------+------+------+------+------+------+------+------| | Ctrl | GUI | Alt | M3 | M2 | Space | M2 | M3 | Alt | Esc | Ctrl | `-----------------------------------------------------------------------------------' +``` ## M4 Function & Media Keys +``` ,-----------------------------------------------------------------------------------. | | | Print|Scroll|Pause | | | F7 | F8 | F9 | F12 | | |------+------+------+------+------+-------------+------+------+------+------+------| @@ -55,13 +62,14 @@ To build, run "make" from within the \bone2planck folder. |------+------+------+------+------+------+------+------+------+------+------+------| | Ctrl | GUI | Alt | M4 | M5 | Space | M5 | M4 | Alt | Esc | Ctrl | `-----------------------------------------------------------------------------------' - +``` ##Switched layers for one handed access: ### M3 Switched Navigation & Number Blocks accessed by sliding from M2 to M3 with thumb +``` ,-----------------------------------------------------------------------------------. | Ins | | 7 | 8 | 9 | | PgUp | Bksp | Up | DEL | PgDn | | |------+------+------+------+------+-------------+------+------+------+------+------| @@ -71,9 +79,11 @@ To build, run "make" from within the \bone2planck folder. |------+------+------+------+------+------+------+------+------+------+------+------| | Ctrl | GUI | Alt | M3 | | Space | | M3 | Alt | Esc | Ctrl | `-----------------------------------------------------------------------------------' +``` ### M5 Switched Function & Media Keys accessed by sliding from M4 to M5 with thumb +``` ,-----------------------------------------------------------------------------------. | | | F7 | F8 | F9 | F12 | | Print|Scroll| Pause| | | |------+------+------+------+------+-------------+------+------+------+------+------| @@ -82,4 +92,5 @@ To build, run "make" from within the \bone2planck folder. | Shift| ² | F1 | F2 | F3 | F10 | | Prev | Play | Next | |Shift | |------+------+------+------+------+------+------+------+------+------+------+------| | Ctrl | GUI | Alt | | M5 | Space | M5 | | Alt | Esc | Ctrl | - `-----------------------------------------------------------------------------------' \ No newline at end of file + `-----------------------------------------------------------------------------------' +``` \ No newline at end of file -- cgit v1.2.3 From c330872f47560d89b00fa48dfae39750406a0eaa Mon Sep 17 00:00:00 2001 From: VoodaGod Date: Thu, 9 Feb 2017 13:07:59 +0100 Subject: updated layout & readme --- keyboards/planck/keymaps/bone2planck/keymap.c | 58 +++++++++++++------------- keyboards/planck/keymaps/bone2planck/readme.md | 18 ++++---- 2 files changed, 39 insertions(+), 37 deletions(-) diff --git a/keyboards/planck/keymaps/bone2planck/keymap.c b/keyboards/planck/keymaps/bone2planck/keymap.c index 63fd2f1fc..5f77acf91 100644 --- a/keyboards/planck/keymaps/bone2planck/keymap.c +++ b/keyboards/planck/keymaps/bone2planck/keymap.c @@ -12,6 +12,7 @@ #define _______ KC_TRNS +#define XXXXXXX KC_NO /* This Layout tries to emulate the Bone2 Variant of Neo2, and is intended to be used with a German QWERTZ Softwarelayout. It has "üäöß" as it is optimized for a mix of German & English. @@ -25,9 +26,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Bone2 (adapted) * ,-----------------------------------------------------------------------------------. -* | Q | J | D | U | A | X | P | H | L | M | W | ẞ | +* | ß | J | D | U | A | X | P | H | L | M | W | Q | * |------+------+------+------+------+-------------+------+------+------+------+------| -* |M1/Tab| C | T | I | E | O | B | N | R | S | G |M1/Ent| //hold for M1, tap for Tab/Enter +* | M1 | C | T | I | E | O | B | N | R | S | G |M1/Ent| //hold for M1, tap for Enter * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| F | V | Ü | Ä | Ö | Y | Z | , | . | K |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -35,8 +36,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [0] = { - { DE_Q, DE_J, DE_D, DE_U, DE_A, DE_X, DE_P, DE_H, DE_L, DE_M, DE_W, DE_SS }, - { LT(1,KC_TAB), DE_C, DE_T, DE_I, DE_E, DE_O, DE_B, DE_N, DE_R, DE_S, DE_G, LT(1,KC_ENT) }, + { DE_SS, DE_J, DE_D, DE_U, DE_A, DE_X, DE_P, DE_H, DE_L, DE_M, DE_W, DE_Q }, + //{ LT(1,KC_TAB), DE_C, DE_T, DE_I, DE_E, DE_O, DE_B, DE_N, DE_R, DE_S, DE_G, LT(1,KC_ENT) }, + { MO(1), DE_C, DE_T, DE_I, DE_E, DE_O, DE_B, DE_N, DE_R, DE_S, DE_G, LT(1,KC_ENT) }, { KC_LSFT, DE_F, DE_V, DE_UE, DE_AE, DE_OE, DE_Y, DE_Z, DE_COMM, DE_DOT, DE_K, KC_LSFT }, { KC_LCTL, KC_RGUI, KC_LALT, MO(4), MO(2), KC_SPC, KC_SPC, MO(2), MO(4), KC_RALT, KC_ESC, KC_RCTL } }, @@ -46,9 +48,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | ° | @ | _ | [ | ] | ^ | ! | < | > | = | & | ´ | * |------+------+------+------+------+-------------+------+------+------+------+------| -* |M1/Tab| \ | / | { | } | * | ? | ( | ) | - | : |M1/Ent| //hold for M1, tap for Tab/Enter +* | M1 | \ | / | { | } | * | ? | ( | ) | - | : |M1/Ent| //hold for M1, tap for Enter * |------+------+------+------+------+------|------+------+------+------+------+------| -* | Shift| # | $ | | | ~ | € | + | % | " | ' | ; |Shift | +* | Shift| # | ~ | | | $ | € | + | % | " | ' | ; |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| * | Ctrl | GUI | Alt | M4 | M2 | Space | M2 | M4 | Alt | Esc | Ctrl | * `-----------------------------------------------------------------------------------' @@ -56,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [1] = { { DE_RING, DE_AT, DE_UNDS, DE_LBRC, DE_RBRC, DE_CIRC, DE_EXLM, DE_LESS, DE_MORE, DE_EQL, DE_AMPR, DE_ACUT }, { _______, DE_BSLS, DE_SLSH, DE_LCBR, DE_RCBR, DE_ASTR, DE_QST, DE_LPRN, DE_RPRN, DE_MINS, DE_COLN, _______ }, - { _______, DE_HASH, DE_TILD, DE_PIPE, DE_DLR, DE_EURO, DE_PLUS, DE_PERC, DE_DQOT, DE_QUOT, DE_SCLN, _______ }, + { _______, DE_HASH, DE_TILD, DE_PIPE, DE_DLR, DE_EURO, DE_PLUS, DE_PERC, DE_DQOT, DE_QUOT, DE_SCLN, _______ }, { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ } }, @@ -65,38 +67,38 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | | PgUp | Bksp | Up | DEL | PgDn | | 7 | 8 | 9 | | Ins | * |------+------+------+------+------+-------------+------+------+------+------+------| -* | Tab | Home | Lft | Down | Right| End | . | 4 | 5 | 6 | , | Enter| +* | Tab | Home | Lft | Down | Right| End | | 4 | 5 | 6 | . | Enter| * |------+------+------+------+------+------|------+------+------+------+------+------| -* | Shift| | Tab | | Enter| | 0 | 1 | 2 | 3 | ; |Shift | +* | Shift| | Tab | | Enter| | 0 | 1 | 2 | 3 | , |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| * | Ctrl | GUI | Alt | M3 | M2 | Space | M2 | M3 | Alt | Esc | Ctrl | * `-----------------------------------------------------------------------------------' */ [2] = { - { KC_NO, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, KC_NO, DE_7, DE_8, DE_9, KC_NO, KC_INS }, - { KC_TAB, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, DE_DOT, DE_4, DE_5, DE_6, DE_COMM, KC_ENT }, - { _______, KC_NO, KC_TAB, KC_NO, KC_ENT, KC_NO, DE_0, DE_1, DE_2, DE_3, DE_SCLN, _______ }, + { XXXXXXX, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, XXXXXXX, DE_7, DE_8, DE_9, XXXXXXX, KC_INS }, + { KC_TAB, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, DE_4, DE_5, DE_6, DE_DOT, KC_ENT }, + { _______, XXXXXXX, KC_TAB, XXXXXXX, KC_ENT, XXXXXXX, DE_0, DE_1, DE_2, DE_3, DE_COMM, _______ }, { _______, _______, _______, MO(3), _______, _______, _______, _______, MO(3), _______, _______, _______ } }, /* M3 Switched Navigation & Number Blocks for one handed use * accessed by sliding from M2 to M3 with thumb * ,-----------------------------------------------------------------------------------. -* | Ins | | 7 | 8 | 9 | | PgUp | Bksp | Up | DEL | PgDn | | +* | Ins | | 7 | 8 | 9 | | PgUp | Bksp | Up | DEL | PgDn | | * |------+------+------+------+------+-------------+------+------+------+------+------| -* | Tab | . | 4 | 5 | 6 | , | Home | Left | Down | Right| End | Enter| +* | Tab | | 4 | 5 | 6 | . | Home | Left | Down | Right| End | Enter| * |------+------+------+------+------+------|------+------+------+------+------+------| -* | Shift| 0 | 1 | 2 | 3 | ; | | Tab | Ins | Enter| |Shift | +* | Shift| 0 | 1 | 2 | 3 | , | | Tab | | Enter| |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| * | Ctrl | GUI | Alt | M3 | | Space | | M3 | Alt | Esc | Ctrl | * `-----------------------------------------------------------------------------------' */ [3] = { - { KC_INS, KC_NO, DE_7, DE_8, DE_9, KC_NO, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, KC_NO }, - { _______, DE_DOT, DE_4, DE_5, DE_6, DE_COMM, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, _______ }, - { _______, DE_0, DE_1, DE_2, DE_3, DE_SCLN, KC_NO, KC_TAB, KC_INS, KC_ENT, KC_NO, _______ }, - { _______, _______, _______, _______, KC_NO, _______, _______, KC_NO, _______, _______, _______, _______ } + { KC_INS, XXXXXXX, DE_7, DE_8, DE_9, XXXXXXX, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, XXXXXXX }, + { _______, XXXXXXX, DE_4, DE_5, DE_6, DE_DOT, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, _______ }, + { _______, DE_0, DE_1, DE_2, DE_3, DE_COMM, XXXXXXX, KC_TAB, XXXXXXX, KC_ENT, XXXXXXX, _______ }, + { _______, _______, _______, _______, XXXXXXX, _______, _______, XXXXXXX, _______, _______, _______, _______ } }, @@ -104,7 +106,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | | | Print|Scroll|Pause | | | F7 | F8 | F9 | F12 | | * |------+------+------+------+------+-------------+------+------+------+------+------| -* | | | Mute | Vol- | Vol+ | | ³ | F4 | F5 | F6 | F11 | | +* | Tab | | Mute | Vol- | Vol+ | | ³ | F4 | F5 | F6 | F11 | Enter| * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| | Prev | Play | Next | | ² | F1 | F2 | F3 | F10 |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -112,9 +114,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [4] = { - { KC_NO, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_NO, KC_NO, KC_F7, KC_F8, KC_F9, KC_F12, KC_NO }, - { KC_NO, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_F11, KC_NO }, - { _______, KC_NO, KC_MPRV, KC_MPLY, KC_MNXT, KC_NO, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_F10, _______ }, + { XXXXXXX, XXXXXXX, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F12, XXXXXXX }, + { KC_TAB, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_F11, KC_ENT }, + { _______, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_F10, _______ }, { _______, _______, _______, _______, MO(5), _______, _______, MO(5), _______, _______, _______, _______ } }, @@ -124,7 +126,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | | | F7 | F8 | F9 | F12 | | Print|Scroll| Pause| | | * |------+------+------+------+------+-------------+------+------+------+------+------| -* | | ³ | F4 | F5 | F6 | F11 | | Mute | Vol- | Vol+ | | | +* | Tab | ³ | F4 | F5 | F6 | F11 | | Mute | Vol- | Vol+ | | Enter| * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| ² | F1 | F2 | F3 | F10 | | Prev | Play | Next | |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -132,10 +134,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [5] = { - { KC_NO, KC_NO, KC_F7, KC_F8, KC_F9, KC_F12, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_NO, KC_NO }, - { KC_NO, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_F11, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO }, - { _______, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_F10, KC_NO, KC_MPRV, KC_MPLY, KC_MNXT, KC_NO, _______ }, - { _______, _______, _______, KC_NO, _______, _______, _______, _______, KC_NO, _______, _______, _______ } + { XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F12, XXXXXXX, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX, XXXXXXX }, + { _______, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_F11, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, _______ }, + { _______, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_F10, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, _______ }, + { _______, _______, _______, XXXXXXX, _______, _______, _______, _______, XXXXXXX, _______, _______, _______ } } }; diff --git a/keyboards/planck/keymaps/bone2planck/readme.md b/keyboards/planck/keymaps/bone2planck/readme.md index 9a27a86b9..0d053bb17 100644 --- a/keyboards/planck/keymaps/bone2planck/readme.md +++ b/keyboards/planck/keymaps/bone2planck/readme.md @@ -13,9 +13,9 @@ To build, run "make" from within the \bone2planck folder. ## Bone2 (adapted) Base Layer ``` ,-----------------------------------------------------------------------------------. - | Q | J | D | U | A | X | P | H | L | M | W | ẞ | + | ß | J | D | U | A | X | P | H | L | M | W | Q | |------+------+------+------+------+-------------+------+------+------+------+------| - |M1/Tab| C | T | I | E | O | B | N | R | S | G |M1/Ent| hold for M1, tap for Tab/Enter + | M1 | C | T | I | E | O | B | N | R | S | G |M1/Ent| hold for M1, tap for Enter |------+------+------+------+------+------|------+------+------+------+------+------| | Shift| F | V | Ü | Ä | Ö | Y | Z | , | . | K |Shift | |------+------+------+------+------+------+------+------+------+------+------+------| @@ -27,11 +27,11 @@ To build, run "make" from within the \bone2planck folder. very ergonomic placement for coding ``` ,-----------------------------------------------------------------------------------. - | ° | @ | _ | [ | ] | ^ | ! | < | > | = | & | ´ | + | ° | @ | _ | [ | ] | ^ | ! | < | > | = | & | ´ | |------+------+------+------+------+-------------+------+------+------+------+------| - |M1/Tab| \ | / | { | } | * | ? | ( | ) | - | : |M1/Ent| hold for M1, tap for Tab/Enter + | M1 | \ | / | { | } | * | ? | ( | ) | - | : |M1/Ent| hold for M1, tap for Enter |------+------+------+------+------+------|------+------+------+------+------+------| - | Shift| # | $ | | | ~ | € | + | % | " | ' | ; |Shift | + | Shift| # | ~ | | | $ | € | + | % | " | ' | ; |Shift | |------+------+------+------+------+------+------+------+------+------+------+------| | Ctrl | GUI | Alt | M4 | M2 | Space | M2 | M4 | Alt | Esc | Ctrl | `-----------------------------------------------------------------------------------' @@ -43,9 +43,9 @@ To build, run "make" from within the \bone2planck folder. ,-----------------------------------------------------------------------------------. | | PgUp | Bksp | Up | DEL | PgDn | | 7 | 8 | 9 | | Ins | |------+------+------+------+------+-------------+------+------+------+------+------| - | Tab | Home | Lft | Down | Right| End | . | 4 | 5 | 6 | , | Enter| + | Tab | Home | Lft | Down | Right| End | | 4 | 5 | 6 | . | Enter| |------+------+------+------+------+------|------+------+------+------+------+------| - | Shift| | Tab | | Enter| | 0 | 1 | 2 | 3 | ; |Shift | + | Shift| | Tab | | Enter| | 0 | 1 | 2 | 3 | , |Shift | |------+------+------+------+------+------+------+------+------+------+------+------| | Ctrl | GUI | Alt | M3 | M2 | Space | M2 | M3 | Alt | Esc | Ctrl | `-----------------------------------------------------------------------------------' @@ -73,9 +73,9 @@ To build, run "make" from within the \bone2planck folder. ,-----------------------------------------------------------------------------------. | Ins | | 7 | 8 | 9 | | PgUp | Bksp | Up | DEL | PgDn | | |------+------+------+------+------+-------------+------+------+------+------+------| - | Tab | . | 4 | 5 | 6 | , | Home | Left | Down | Right| End | Enter| + | Tab | | 4 | 5 | 6 | . | Home | Left | Down | Right| End | Enter| |------+------+------+------+------+------|------+------+------+------+------+------| - | Shift| 0 | 1 | 2 | 3 | ; | | Tab | Ins | Enter| |Shift | + | Shift| 0 | 1 | 2 | 3 | , | | Tab | | Enter| |Shift | |------+------+------+------+------+------+------+------+------+------+------+------| | Ctrl | GUI | Alt | M3 | | Space | | M3 | Alt | Esc | Ctrl | `-----------------------------------------------------------------------------------' -- cgit v1.2.3 From 2b95f41b912c9bf6c4582b45cabd3fe41bd20711 Mon Sep 17 00:00:00 2001 From: Rob Rogers Date: Thu, 9 Feb 2017 09:08:50 -0600 Subject: [Typo] correct link to default keymap in readme. --- keyboards/ergodox/keymaps/ab/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/ergodox/keymaps/ab/readme.md b/keyboards/ergodox/keymaps/ab/readme.md index 62e08e162..4ad80efe6 100644 --- a/keyboards/ergodox/keymaps/ab/readme.md +++ b/keyboards/ergodox/keymaps/ab/readme.md @@ -8,7 +8,7 @@ Beginner's keymap emulates standard QWERTY keyboard for beginners. Once you get * Easy on beginners. It has everything you need for your day to day usage. #### Cons -* Keys are not ergonomically placed to take full advantage of Ergodox-EZ. Take a look at this [Default Keymap](https://github.com/qmk/qmk_firmware/blob/master/keyboards/ergodox_ez/keymaps/default/readme.md) +* Keys are not ergonomically placed to take full advantage of Ergodox-EZ. Take a look at this [Default Keymap](https://github.com/qmk/qmk_firmware/blob/master/keyboards/ergodox/keymaps/default/readme.md) * While multiple layers are possible, beginner's keymap only uses one additional layer for mouse, function and volume keys. #### Notes -- cgit v1.2.3 From 92308ed0e5ccac1aaeba6a952ccc2556dfffe4e0 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Fri, 10 Feb 2017 02:08:55 +0700 Subject: Remove audio stuff --- .../handwired/promethium/keymaps/priyadi/keymap.c | 60 ---------------------- 1 file changed, 60 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 05cd2f061..f2d7ebcb7 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -3,10 +3,6 @@ #include "promethium.h" #include "action_layer.h" -#ifdef AUDIO_ENABLE - #include "audio.h" - #include "musical_notes.h" -#endif #include "eeconfig.h" #include "process_unicode.h" #include "quantum.h" @@ -719,29 +715,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -#ifdef AUDIO_ENABLE -float tone_startup[][2] = SONG(STARTUP_SOUND); -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -float tone_colemak[][2] = SONG(COLEMAK_SOUND); -float tone_workman[][2] = SONG(DVORAK_SOUND); -float tone_goodbye[][2] = SONG(GOODBYE_SOUND); -float tone_linux[][2] = SONG(CAPS_LOCK_ON_SOUND); -float tone_windows[][2] = SONG(SCROLL_LOCK_ON_SOUND); -float tone_osx[][2] = SONG(NUM_LOCK_ON_SOUND); -float tone_click[][2] = SONG(MUSICAL_NOTE(_F3, 2)); -#endif - void persistant_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) { - #ifdef AUDIO_ENABLE - // faux clicky - if (record->event.pressed) PLAY_NOTE_ARRAY(tone_click, false, 0); - #endif - bool lshifted = keyboard_report->mods & MOD_BIT(KC_LSFT); bool rshifted = keyboard_report->mods & MOD_BIT(KC_RSFT); @@ -813,27 +792,18 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // layout switchers case QWERTY: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); - #endif persistant_default_layer_set(1UL<<_QWERTY); } return false; break; case COLEMAK: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); - #endif persistant_default_layer_set(1UL<<_COLEMAK); } return false; break; case WORKMAN: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_workman, false, 0); - #endif persistant_default_layer_set(1UL<<_WORKMAN); } return false; @@ -904,23 +874,14 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // OS switchers case LINUX: set_unicode_input_mode(UC_LNX); - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_linux, false, 0); - #endif return false; break; case WIN: set_unicode_input_mode(UC_WINC); - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_windows, false, 0); - #endif return false; break; case OSX: set_unicode_input_mode(UC_OSX); - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_osx, false, 0); - #endif return false; break; } @@ -943,9 +904,6 @@ void set_output_user(uint8_t output) { void matrix_init_user(void) { _delay_ms(500); // give time for usb to initialize - #ifdef AUDIO_ENABLE - startup_user(); - #endif set_unicode_input_mode(UC_LNX); led_init(); @@ -958,24 +916,6 @@ void matrix_init_user(void) { } } -#ifdef AUDIO_ENABLE - -void startup_user() -{ - _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); -} - -void shutdown_user() -{ - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); - _delay_ms(150); - stop_all_notes(); -} - -#endif - - void ps2_mouse_init_user() { uint8_t rcv; -- cgit v1.2.3 From af97d6b58ea7e2a445093eff5d757edc59dc0b57 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Fri, 10 Feb 2017 06:01:59 +0700 Subject: Add dvorak & norman layout. Add sys layer. --- .../handwired/promethium/keymaps/priyadi/keymap.c | 227 ++++++++++++++------- 1 file changed, 148 insertions(+), 79 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index f2d7ebcb7..3c48347d4 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -20,22 +20,30 @@ extern keymap_config_t keymap_config; enum layers { _QWERTY, + _DVORAK, _COLEMAK, _WORKMAN, + _NORMAN, + _PUNC, _NUM, _FUNC, - _EMOJI, + _GREEKU, _GREEKL, + + _EMOJI, _GUI, + _SYS, }; enum planck_keycodes { // layouts QWERTY = SAFE_RANGE, + DVORAK, COLEMAK, WORKMAN, + NORMAN, // layer switchers PUNC, @@ -269,9 +277,9 @@ const uint32_t PROGMEM unicode_map[] = { // #undef KC_RSFT // #define KC_RSFT MT(MOD_LSFT, KC_EQL) -// hybrid right-gui & scroll lock (mapped to Compose in OS) -#undef KC_RCTL -#define KC_RCTL MT(MOD_LCTL, KC_SLCK) +// hybrid right-alt & scroll lock (mapped to Compose in OS) +#undef KC_RALT +#define KC_RALT MT(MOD_RALT, KC_SLCK) // RGBSPS @@ -537,18 +545,36 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | S | D | F | G | H | J | K | L | ; |Enter | + * | Esc | A | S | D | F | G | H | J | K | L | ' |Enter | * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| Z | X | C | V | B | N | M | , | . | / |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | Alt | GUI | Punc | Num | Space | Func |Emoji |Greek |AltGr | Ctrl | + * | Ctrl | Alt | GUI | Punc | Num | Space | Func |Greek | GUI |AltGr | Ctrl | * `-----------------------------------------------------------------------------------' */ [_QWERTY] = KEYMAP( 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, - KC_LCTL, KC_LALT, KC_LGUI, PUNC, NUM, KC_SPC, KC_SPC, FUNC, EMOJI, GREEK, KC_RALT, KC_RCTL + KC_LCTL, KC_LALT, KC_LGUI, PUNC, NUM, KC_SPC, KC_SPC, FUNC, GREEK, KC_RGUI, KC_RALT, KC_RCTL +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | ' | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S |Enter | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| / | Q | J | K | X | B | M | W | V | Z |Shift | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Alt | GUI | Punc | Num | Space | Func |Greek | GUI |AltGr | Ctrl | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = KEYMAP( + _______, 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, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), /* Colemak @@ -559,7 +585,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| Z | X | C | V | B | K | M | , | . | / |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | GUI | Alt | Punc | Num | Space | Func |Emoji |AltGr | GUI | Ctrl | + * | Ctrl | Alt | GUI | Punc | Num | Space | Func |Greek | GUI |AltGr | Ctrl | * `-----------------------------------------------------------------------------------' */ [_COLEMAK] = KEYMAP( @@ -569,57 +595,39 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), -/* Workman +/* Norman * ,-----------------------------------------------------------------------------------. - * | Tab | Q | D | R | W | B | J | F | U | P | ; | Bksp | + * | Tab | Q | W | D | F | K | J | U | R | L | ; | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | S | H | T | G | Y | N | E | O | I |Enter | + * | Esc | A | S | E | T | G | Y | N | I | O | H |Enter | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | M | C | V | K | K | , | . | / |Shift | + * | Shift| Z | X | C | V | B | P | M | , | . | / |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | GUI | Alt | Punc | Num | Space | Func |Emoji |AltGr | GUI | Ctrl | + * | Ctrl | Alt | GUI | Punc | Num | Space | Func |Greek | GUI |AltGr | Ctrl | * `-----------------------------------------------------------------------------------' */ -[_WORKMAN] = KEYMAP( - _______, 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, _______, +[_NORMAN] = KEYMAP( + _______, 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, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), -/* Uppercase Greek - * ,-----------------------------------------------------------------------------------. - * | | | | | | | | | | | | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ -[_GREEKU] = KEYMAP( - _______, _______, _______,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), _______, _______, - _______,X(UZETA), X(UCHI), X(UPSI),X(UOMEG),X(UBETA), X(UNU), X(UMU), _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -), - -/* Lowercase Greek +/* Workman * ,-----------------------------------------------------------------------------------. - * | | | | | | | | | | | | | + * | Tab | Q | D | R | W | B | J | F | U | P | ; | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | + * | Esc | A | S | H | T | G | Y | N | E | O | I |Enter | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | M | C | V | K | K | , | . | / |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | + * | Ctrl | Alt | GUI | Punc | Num | Space | Func |Greek | GUI |AltGr | Ctrl | * `-----------------------------------------------------------------------------------' */ -[_GREEKL] = KEYMAP( - _______, _______,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), _______, _______, - _______,X(LZETA), X(LCHI), X(LPSI),X(LOMEG),X(LBETA), X(LNU), X(LMU), _______, _______, _______, _______, +[_WORKMAN] = KEYMAP( + _______, 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, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), @@ -677,6 +685,42 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), +/* Uppercase Greek + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_GREEKU] = KEYMAP( + _______, _______, _______,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), _______, _______, + _______,X(UZETA), X(UCHI), X(UPSI),X(UOMEG),X(UBETA), X(UNU), X(UMU), _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* Lowercase Greek + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_GREEKL] = KEYMAP( + _______, _______,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), _______, _______, + _______,X(LZETA), X(LCHI), X(LPSI),X(LOMEG),X(LBETA), X(LNU), X(LMU), _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + /* Emoji * ,-----------------------------------------------------------------------------------. * | | | | | | | | | | | | | @@ -713,6 +757,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { OSX, _______, _______, _______, _______, BL_DEC, BL_INC, _______, _______, RGB_VAI, RGB_VAD, WORKMAN ), +/* GUI + * ,-----------------------------------------------------------------------------------. + * | |Qwerty| Win | | | | | USB | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | |Audio | |Dvorak| | Glow | | |WorkMn|Linux | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | |Colmak| | BLE |Norman|MacOS | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_SYS] = KEYMAP( + XXXXXXX, QWERTY, WIN, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, OUT_USB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, DVORAK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, WORKMAN, LINUX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, COLEMAK, XXXXXXX, OUT_BLE, NORMAN, OSX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +), + }; void persistant_default_layer_set(uint16_t default_layer) { @@ -725,22 +787,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool rshifted = keyboard_report->mods & MOD_BIT(KC_RSFT); switch (keycode) { - case GREEK: - if (record->event.pressed) { - if (lshifted || rshifted) { - layer_on(_GREEKU); - layer_off(_GREEKL); - } else { - layer_on(_GREEKL); - layer_off(_GREEKU); - } - } else { - layer_off(_GREEKU); - layer_off(_GREEKL); - } - return false; - break; - + // handle greek layer shift case KC_LSFT: case KC_RSFT: ; @@ -750,7 +797,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { layer_on(_GREEKU); layer_off(_GREEKL); } else { - if (lshifted ^ rshifted) { // if only one shift is pressed + if (lshifted ^ rshifted) { // if only one shift was pressed layer_on(_GREEKL); layer_off(_GREEKU); } @@ -796,6 +843,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; + case DVORAK: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_DVORAK); + } + return false; + break; case COLEMAK: if (record->event.pressed) { persistant_default_layer_set(1UL<<_COLEMAK); @@ -808,48 +861,63 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; + case NORMAN: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_NORMAN); + } + return false; + break; // layer switcher case PUNC: if (record->event.pressed) { layer_on(_PUNC); - update_tri_layer(_PUNC, _EMOJI, _GUI); - if (IS_LAYER_ON(_GUI)) { - led_layer_gui(); + update_tri_layer(_PUNC, _GREEKL, _EMOJI); + if (IS_LAYER_ON(_EMOJI)) { + led_layer_emoji(); } else { - led_layer_punc();; + led_layer_punc(); } } else { layer_off(_PUNC); - update_tri_layer(_PUNC, _EMOJI, _GUI); - if (IS_LAYER_ON(_EMOJI)) { - led_layer_emoji(); + update_tri_layer(_PUNC, _GREEKL, _EMOJI); + if (IS_LAYER_ON(_GREEKL)) { + ; } else { - led_layer_normal();; + led_layer_normal(); } } return false; break; - case EMOJI: + + case GREEK: if (record->event.pressed) { - layer_on(_EMOJI); - update_tri_layer(_PUNC, _EMOJI, _GUI); - if (IS_LAYER_ON(_GUI)) { - led_layer_gui(); + if (lshifted || rshifted) { + layer_on(_GREEKU); + layer_off(_GREEKL); } else { - led_layer_emoji();; + layer_on(_GREEKL); + layer_off(_GREEKU); + update_tri_layer(_PUNC, _GREEKL, _EMOJI); + if (IS_LAYER_ON(_EMOJI)) { + led_layer_emoji(); + } else { + ; + } } } else { - layer_off(_EMOJI); - update_tri_layer(_PUNC, _EMOJI, _GUI); + layer_off(_GREEKU); + layer_off(_GREEKL); + update_tri_layer(_PUNC, _GREEKL, _EMOJI); if (IS_LAYER_ON(_PUNC)) { led_layer_punc(); } else { - led_layer_normal();; + led_layer_normal(); } } return false; break; + case NUM: if (record->event.pressed) { layer_on(_NUM); @@ -860,6 +928,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; + case FUNC: if (record->event.pressed) { layer_on(_FUNC); -- cgit v1.2.3 From 97816df7e7aa8710c8a0837b2abe008e0c765f2a Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Fri, 10 Feb 2017 06:06:59 +0700 Subject: Implement tap mod dual role for right side mods. --- quantum/keymap_common.c | 2 +- quantum/process_keycode/process_unicode.c | 2 +- quantum/quantum_keycodes.h | 28 +++++++++++++++++++++------- 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index 5190f24e8..54b872d49 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c @@ -120,7 +120,7 @@ action_t action_for_key(uint8_t layer, keypos_t key) action.code = ACTION_MODS_ONESHOT(mod); break; case QK_MOD_TAP ... QK_MOD_TAP_MAX: - action.code = ACTION_MODS_TAP_KEY((keycode >> 0x8) & 0xF, keycode & 0xFF); + action.code = ACTION_MODS_TAP_KEY((keycode >> 0x8) & 0x1F, keycode & 0xFF); break; #ifdef BACKLIGHT_ENABLE case BL_0 ... BL_15: diff --git a/quantum/process_keycode/process_unicode.c b/quantum/process_keycode/process_unicode.c index 9995ba9bd..9d01a592d 100644 --- a/quantum/process_keycode/process_unicode.c +++ b/quantum/process_keycode/process_unicode.c @@ -139,7 +139,7 @@ void unicode_map_input_error() {} bool process_unicode_map(uint16_t keycode, keyrecord_t *record) { if ((keycode & QK_UNICODE_MAP) == QK_UNICODE_MAP && record->event.pressed) { const uint32_t* map = unicode_map; - uint16_t index = keycode & 0x7FF; + uint16_t index = keycode - QK_UNICODE_MAP; uint32_t code = pgm_read_dword_far(&map[index]); if (code > 0xFFFF && code <= 0x10ffff && input_mode == UC_OSX) { // Convert to UTF-16 surrogate pair diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 8a78a58c9..e562c9a18 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -39,14 +39,14 @@ enum quantum_keycodes { QK_CHORDING = 0x5600, QK_CHORDING_MAX = 0x56FF, #endif - QK_MOD_TAP = 0x6000, - QK_MOD_TAP_MAX = 0x6FFF, - QK_TAP_DANCE = 0x7100, - QK_TAP_DANCE_MAX = 0x71FF, + QK_TAP_DANCE = 0x5700, + QK_TAP_DANCE_MAX = 0x57FF, #ifdef UNICODEMAP_ENABLE - QK_UNICODE_MAP = 0x7800, - QK_UNICODE_MAP_MAX = 0x7FFF, + QK_UNICODE_MAP = 0x5800, + QK_UNICODE_MAP_MAX = 0x5FFF, #endif + QK_MOD_TAP = 0x6000, + QK_MOD_TAP_MAX = 0x7FFF, #ifdef UNICODE_ENABLE QK_UNICODE = 0x8000, QK_UNICODE_MAX = 0xFFFF, @@ -298,15 +298,29 @@ enum quantum_keycodes { #define OSM(mod) (mod | QK_ONE_SHOT_MOD) // M-od, T-ap - 256 keycode max -#define MT(mod, kc) (kc | QK_MOD_TAP | ((mod & 0xF) << 8)) +#define MT(mod, kc) (kc | QK_MOD_TAP | ((mod & 0x1F) << 8)) + #define CTL_T(kc) MT(MOD_LCTL, kc) +#define LCTL_T(kc) MT(MOD_LCTL, kc) +#define RCTL_T(kc) MT(MOD_RCTL, kc) + #define SFT_T(kc) MT(MOD_LSFT, kc) +#define LSFT_T(kc) MT(MOD_LSFT, kc) +#define RSFT_T(kc) MT(MOD_RSFT, kc) + #define ALT_T(kc) MT(MOD_LALT, kc) +#define LALT_T(kc) MT(MOD_LALT, kc) +#define RALT_T(kc) MT(MOD_RALT, kc) #define ALGR_T(kc) MT(MOD_RALT, kc) // dual-function AltGR + #define GUI_T(kc) MT(MOD_LGUI, kc) +#define LGUI_T(kc) MT(MOD_LGUI, kc) +#define RGUI_T(kc) MT(MOD_RGUI, kc) + #define C_S_T(kc) MT((MOD_LCTL | MOD_LSFT), kc) // Control + Shift e.g. for gnome-terminal #define MEH_T(kc) MT((MOD_LCTL | MOD_LSFT | MOD_LALT), kc) // Meh is a less hyper version of the Hyper key -- doesn't include Win or Cmd, so just alt+shift+ctrl #define LCAG_T(kc) MT((MOD_LCTL | MOD_LALT | MOD_LGUI), kc) // Left control alt and gui +#define RCAG_T(kc) MT((MOD_RCTL | MOD_RALT | MOD_RGUI), kc) // Right control alt and gui #define ALL_T(kc) MT((MOD_LCTL | MOD_LSFT | MOD_LALT | MOD_LGUI), kc) // see http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/ #define SCMD_T(kc) MT((MOD_LGUI | MOD_LSFT), kc) #define SWIN_T(kc) SCMD_T(kc) -- cgit v1.2.3 From dee6a6982cdc8ee7970d1c61f7b7b4799b0f777b Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Fri, 10 Feb 2017 06:31:29 +0700 Subject: Fix LED indicator --- keyboards/handwired/promethium/keymaps/priyadi/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 3c48347d4..082997ad6 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -882,7 +882,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { layer_off(_PUNC); update_tri_layer(_PUNC, _GREEKL, _EMOJI); if (IS_LAYER_ON(_GREEKL)) { - ; + led_layer_normal(); } else { led_layer_normal(); } -- cgit v1.2.3 From 27e7eac279b7f0f8c62a213444e1dd02968bd720 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Fri, 10 Feb 2017 06:51:10 +0700 Subject: Reorganize punctuation & numbers layer --- .../handwired/promethium/keymaps/priyadi/keymap.c | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 082997ad6..fa3e21d72 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -635,36 +635,36 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | ` | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | \ | - | = | | | ( | ) | < | > | | + * | | * | \ | - | = | | | ( | ) | < | > | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | _ | + | | | [ | ] | { | } | | + * | & | ^ | | | _ | + | | | [ | ] | { | } | : | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ [_PUNC] = KEYMAP( KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_GRV , - XXXXXXX, XXXXXXX, KC_BSLS, KC_MINS, KC_EQL, XXXXXXX, XXXXXXX, KC_LPRN, KC_RPRN, KC_LABK, KC_RABK, XXXXXXX, - XXXXXXX, XXXXXXX, KC_PIPE, KC_UNDS, KC_PLUS, XXXXXXX, XXXXXXX, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, XXXXXXX, + XXXXXXX, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, XXXXXXX, XXXXXXX, KC_LPRN, KC_RPRN, KC_LABK, KC_RABK, XXXXXXX, + KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, XXXXXXX, XXXXXXX, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_COLN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), /* Num * ,-----------------------------------------------------------------------------------. - * | ^ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * | ~ | ! | @ | # | $ | % | A | 7 | 8 | 9 | D | ` | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | @ | A | B | C | ( | ) | 4 | 5 | 6 | : |Enter | + * | | * | \ | - | = | | B | 4 | 5 | 6 | E | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | & | # | D | E | F | [ | ] | 1 | 2 | 3 | / | * | + * | & | ^ | | | _ | + | | C | 1 | 2 | 3 | F | : | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | x | | | 0 | , | . | + | - | + * | | | | | | | x | 0 | , | . | | | * `-----------------------------------------------------------------------------------' */ [_NUM] = KEYMAP( - KC_CIRC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, - KC_ESC, KC_AT, S(KC_A), S(KC_B), S(KC_C), KC_LPRN, KC_RPRN, KC_4, KC_5, KC_6, KC_COLN, KC_ENT, - KC_AMPR, KC_HASH, S(KC_D), S(KC_E), S(KC_F), KC_LBRC, KC_RBRC, KC_1, KC_2, KC_3, KC_SLSH, KC_ASTR, - _______, _______, _______, KC_X, _______, KC_SPC, KC_SPC, KC_0, KC_COMM, KC_DOT, KC_PLUS, KC_MINS + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, S(KC_A), KC_7, KC_8, KC_9, S(KC_D), KC_GRV, + XXXXXXX, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, XXXXXXX, S(KC_B), KC_4, KC_5, KC_6, S(KC_E), _______, + KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, XXXXXXX, S(KC_C), KC_1, KC_2, KC_3, S(KC_F), KC_COLN, + _______, _______, _______, _______, _______, _______, KC_X, KC_0, KC_COMM, KC_DOT, _______, _______ ), /* Func -- cgit v1.2.3 From a4a57d47eda4cae27dd56204a8bf36d3dac8e663 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Fri, 10 Feb 2017 13:13:04 +0700 Subject: Reimplement GUI Layer --- .../handwired/promethium/keymaps/priyadi/keymap.c | 41 +++++++++++----------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index fa3e21d72..9605c493c 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -63,6 +63,7 @@ enum planck_keycodes { #define _______ KC_TRNS #define XXXXXXX KC_NO +#define G(x) LGUI(x) // unicode map @@ -741,23 +742,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* GUI * ,-----------------------------------------------------------------------------------. - * | | D1 | D2 | D3 | D4 | D5 | D6 | D7 | D8 | D9 | D10 | | + * | | | | | | | | | | | | | * |------+------+------+------+------+-------------+------+------+------+------+------| - * |Linux | | Vol- | Mute | Vol+ | | | D- | | D+ | |Qwerty| + * | | D1 | D2 | D3 | D4 | D5 | D6 | D7 | D8 | D9 | D10 | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Win | | Prev | Play | Next | | | | | | |Colmak| + * | | | | | | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | OSX | | | | | BL- | BL+ | | | | |Workmn| + * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ [_GUI] = KEYMAP( - _______, LGUI(KC_1),LGUI(KC_2),LGUI(KC_3),LGUI(KC_4),LGUI(KC_5),LGUI(KC_6),LGUI(KC_7),LGUI(KC_8),LGUI(KC_9),LGUI(KC_0), _______, - LINUX, OUT_USB, KC_VOLD, KC_MUTE, KC_VOLU,_______,_______,KC_WWW_BACK,_______,KC_WWW_FORWARD,KC_PAUS, QWERTY, - WIN, OUT_BLE, KC_MPRV, KC_MPLY, KC_MNXT, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, COLEMAK, - OSX, _______, _______, _______, _______, BL_DEC, BL_INC, _______, _______, RGB_VAI, RGB_VAD, WORKMAN + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + 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, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX ), -/* GUI +/* Sys * ,-----------------------------------------------------------------------------------. * | |Qwerty| Win | | | | | USB | | | | | * |------+------+------+------+------+-------------+------+------+------+------+------| @@ -772,7 +773,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { XXXXXXX, QWERTY, WIN, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, OUT_USB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DVORAK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, WORKMAN, LINUX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, COLEMAK, XXXXXXX, OUT_BLE, NORMAN, OSX, 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, _______ ), }; @@ -872,15 +873,15 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case PUNC: if (record->event.pressed) { layer_on(_PUNC); - update_tri_layer(_PUNC, _GREEKL, _EMOJI); - if (IS_LAYER_ON(_EMOJI)) { - led_layer_emoji(); + update_tri_layer(_PUNC, _GREEKL, _GUI); + if (IS_LAYER_ON(_GUI)) { + led_layer_normal(); } else { led_layer_punc(); } } else { layer_off(_PUNC); - update_tri_layer(_PUNC, _GREEKL, _EMOJI); + update_tri_layer(_PUNC, _GREEKL, _GUI); if (IS_LAYER_ON(_GREEKL)) { led_layer_normal(); } else { @@ -898,19 +899,19 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } else { layer_on(_GREEKL); layer_off(_GREEKU); - update_tri_layer(_PUNC, _GREEKL, _EMOJI); - if (IS_LAYER_ON(_EMOJI)) { - led_layer_emoji(); + update_tri_layer(_PUNC, _GREEKL, _GUI); + if (IS_LAYER_ON(_GUI)) { + led_layer_normal(); } else { - ; + led_layer_normal(); } } } else { layer_off(_GREEKU); layer_off(_GREEKL); - update_tri_layer(_PUNC, _GREEKL, _EMOJI); + update_tri_layer(_PUNC, _GREEKL, _GUI); if (IS_LAYER_ON(_PUNC)) { - led_layer_punc(); + led_layer_normal(); } else { led_layer_normal(); } -- cgit v1.2.3 From 5ac0e6e6aee64c9b8fade79aaf22bc839e2c6b47 Mon Sep 17 00:00:00 2001 From: milestogo Date: Thu, 9 Feb 2017 23:23:39 -0800 Subject: dumber sculpt build --- .../handwired/MS-sculpt-mobile/MS-sculpt-mobile.c | 1 + .../handwired/MS-sculpt-mobile/MS-sculpt-mobile.h | 48 ++++++++ keyboards/handwired/MS-sculpt-mobile/Makefile | 3 + keyboards/handwired/MS-sculpt-mobile/config.h | 99 ++++++++++++++++ .../MS-sculpt-mobile/keymaps/default/Makefile | 21 ++++ .../MS-sculpt-mobile/keymaps/default/config.h | 8 ++ .../MS-sculpt-mobile/keymaps/default/keymap.c | 64 ++++++++++ .../MS-sculpt-mobile/keymaps/default/readme.md | 1 + .../MS-sculpt-mobile/keymaps/milestogo/Makefile | 21 ++++ .../MS-sculpt-mobile/keymaps/milestogo/config.h | 8 ++ .../MS-sculpt-mobile/keymaps/milestogo/keymap.c | 132 +++++++++++++++++++++ .../MS-sculpt-mobile/keymaps/milestogo/readme.md | 1 + keyboards/handwired/MS-sculpt-mobile/readme.md | 58 +++++++++ keyboards/handwired/MS-sculpt-mobile/rules.mk | 43 +++++++ 14 files changed, 508 insertions(+) create mode 100644 keyboards/handwired/MS-sculpt-mobile/MS-sculpt-mobile.c create mode 100644 keyboards/handwired/MS-sculpt-mobile/MS-sculpt-mobile.h create mode 100644 keyboards/handwired/MS-sculpt-mobile/Makefile create mode 100644 keyboards/handwired/MS-sculpt-mobile/config.h create mode 100644 keyboards/handwired/MS-sculpt-mobile/keymaps/default/Makefile create mode 100644 keyboards/handwired/MS-sculpt-mobile/keymaps/default/config.h create mode 100644 keyboards/handwired/MS-sculpt-mobile/keymaps/default/keymap.c create mode 100644 keyboards/handwired/MS-sculpt-mobile/keymaps/default/readme.md create mode 100644 keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/Makefile create mode 100644 keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/config.h create mode 100644 keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/keymap.c create mode 100644 keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/readme.md create mode 100644 keyboards/handwired/MS-sculpt-mobile/readme.md create mode 100644 keyboards/handwired/MS-sculpt-mobile/rules.mk diff --git a/keyboards/handwired/MS-sculpt-mobile/MS-sculpt-mobile.c b/keyboards/handwired/MS-sculpt-mobile/MS-sculpt-mobile.c new file mode 100644 index 000000000..4c735a6c2 --- /dev/null +++ b/keyboards/handwired/MS-sculpt-mobile/MS-sculpt-mobile.c @@ -0,0 +1 @@ +#include "MS-sculpt-mobile.h" diff --git a/keyboards/handwired/MS-sculpt-mobile/MS-sculpt-mobile.h b/keyboards/handwired/MS-sculpt-mobile/MS-sculpt-mobile.h new file mode 100644 index 000000000..1583dea6e --- /dev/null +++ b/keyboards/handwired/MS-sculpt-mobile/MS-sculpt-mobile.h @@ -0,0 +1,48 @@ +#ifndef MICROSOFT_SCULPT_MOBILE_H +#define MICROSOFT_SCULPT_MOBILE_H + +#include "quantum.h" + + +#define KEYMAP( \ + k7Q, k6O, k6P, k6Q, k5O, k5P, k5Q, k7A, k7B, k7C, k7D, k7E, k7F, k1O, k1K, k1L, \ + k5A, k5K, k5L, k5M, k5N, k5H, k5I, k2A, k2B, k2C, k2D, k5B, k5C, k5J, k2E, \ + k6R, k6D, k6E, k6F, k7I, k7J, k4A, k4B, k4C, k4D, k3A, k3B, k3C, k3D, \ + k0J, k6A, k6B, k6C, k7H, k1A, k1B, k5D, k5E, k5F, k5G, k1C, k7P, k2G, \ + k2P, k7K, k7L, k7M, k7O, k0A, k0B, k0C, k0D, k0E, k0F, k2L, k6G, k1P,\ + k1Q, k4N, k3O,k6N, k3K, k0R, k1M, k6H, k6I, k6J \ +) \ +{ \ + {k0A, k0B, k0C, k0D, k0E, k0F, KC_NO, KC_NO, KC_NO, k0J, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,KC_NO, KC_NO, k0R},\ + {k1A, k1B, k1C, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k1K, k1L, k1M, KC_NO, k1O, k1P, k1Q, KC_NO},\ + {k2A, k2B, k2C, k2D, k2E, KC_NO, k2G, KC_NO, KC_NO, KC_NO, KC_NO, k2L, KC_NO, KC_NO, KC_NO, k2P, KC_NO, KC_NO},\ + {k3A, k3B, k3C, k3D, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k3K, KC_NO, KC_NO, KC_NO, k3O, KC_NO, KC_NO, KC_NO},\ + {k4A, k4B, k4C, k4D, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k4N, KC_NO,KC_NO, KC_NO, KC_NO},\ + {k5A, k5B, k5C, k5D, k5E, k5F, k5G, k5H, k5I, k5J, k5K, k5L, k5M, k5N, k5O, k5P, k5Q, KC_NO },\ + {k6A, k6B, k6C, k6D, k6E, k6F, k6G, k6H, k6I, k6J, KC_NO, KC_NO, KC_NO, k6N, k6O, k6P, k6Q, k6R},\ + {k7A, k7B, k7C, k7D, k7E, k7F, KC_NO, k7H, k7I, k7J, k7K, k7L, k7M, KC_NO, k7O, k7P, k7Q, KC_NO},\ +} + + +#define MATRIX_TESTING_KEYMAP( \ + k0A, k0B, k0C, k0D, k0E, k0F, k0G, k0H, k0I, k0, k0J, k0K, k0L, k0M, k0N, k0O, k0P, k0Q,\ + k1A, k1B, k1C, k1D, k1E, k1F, k1G, k1H, k1I, k1, k1J, k1K, k1L, k1M, k1N, k1O, k1P, k1Q,\ + k2A, k2B, k2C, k2D, k2E, k2F, k2G, k2H, k2I, k2, k2J, k2K, k2L, k2M, k2N, k2O, k2P, k2Q,\ + k3A, k3B, k3C, k3D, k3E, k3F, k3G, k3H, k3I, k3, k3J, k3K, k3L, k3M, k3N, k3O, k3P, k3Q,\ + k4A, k4B, k4C, k4D, k4E, k4F, k4G, k4H, k4I, k4, k4J, k4K, k4L, k4M, k4N, k4O, k4P, k4Q,\ + k5A, k5B, k5C, k5D, k5E, k5F, k5G, k5H, k5I, k5, k5J, k5K, k5L, k5M, k5N, k5O, k5P, k5Q,\ + k6A, k6B, k6C, k6D, k6E, k6F, k6G, k6H, k6I, k6, k6J, k6K, k6L, k6M, k6N, k6O, k6P, k6Q,\ + k7A, k7B, k7C, k7D, k7E, k7F, k7G, k7H, k7I, k7, k7J, k7K, k7L, k7M, k7N, k7O, k7P, k7Q\ +) \ +{ \ + {k0A, k0B, k0C, k0D, k0E, k0F, k0G, k0H, k0I, k0, k0J, k0K, k0L, k0M, k0N, k0O, k0P, k0Q},\ + {k1A, k1B, k1C, k1D, k1E, k1F, k1G, k1H, k1I, k1, k1J, k1K, k1L, k1M, k1N, k1O, k1P, k1Q},\ + {k2A, k2B, k2C, k2D, k2E, k2F, k2G, k2H, k2I, k2, k2J, k2K, k2L, k2M, k2N, k2O, k2P, k2Q},\ + {k3A, k3B, k3C, k3D, k3E, k3F, k3G, k3H, k3I, k3, k3J, k3K, k3L, k3M, k3N, k3O, k3P, k3Q},\ + {k4A, k4B, k4C, k4D, k4E, k4F, k4G, k4H, k4I, k4, k4J, k4K, k4L, k4M, k4N, k4O, k4P, k4Q},\ + {k5A, k5B, k5C, k5D, k5E, k5F, k5G, k5H, k5I, k5, k5J, k5K, k5L, k5M, k5N, k5O, k5P, k5Q},\ + {k6A, k6B, k6C, k6D, k6E, k6F, k6G, k6H, k6I, k6, k6J, k6K, k6L, k6M, k6N, k6O, k6P, k6Q},\ + {k7A, k7B, k7C, k7D, k7E, k7F, k7G, k7H, k7I, k7, k7J, k7K, k7L, k7M, k7N, k7O, k7P, k7Q},\ +} + +#endif diff --git a/keyboards/handwired/MS-sculpt-mobile/Makefile b/keyboards/handwired/MS-sculpt-mobile/Makefile new file mode 100644 index 000000000..bd09e5885 --- /dev/null +++ b/keyboards/handwired/MS-sculpt-mobile/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../../Makefile +endif diff --git a/keyboards/handwired/MS-sculpt-mobile/config.h b/keyboards/handwired/MS-sculpt-mobile/config.h new file mode 100644 index 000000000..1ac40f996 --- /dev/null +++ b/keyboards/handwired/MS-sculpt-mobile/config.h @@ -0,0 +1,99 @@ +/* +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 Microsoft+abit +#define PRODUCT sculpt mobile +#define DESCRIPTION 6000 + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 18 + +#ifdef ASTAR + + /*0 1 2 3 4 5 6 7 8 */ +#define MATRIX_ROW_PINS {D7, C6, D4, D0, D1, D3, D2, E2} +/* A B C D E F G H I J K L M N O P Q R */ +#define MATRIX_COL_PINS {B4, B5, E6, B7, B6, D6, C7, F7, F6, F4,F5, F1,F0, D5, B0, B1, B2, B3} + +#else + +/* 0 1 2 3 4 5 6 7 */ +#define MATRIX_ROW_PINS { F7,F6,F4,F5,F3,F2,F1,F0} +/* A B C D E F G H I J K L M N O P Q R */ +#define MATRIX_COL_PINS { B7, D0, D1, D2, D3, D4, D5, D6, D7, E0,E1,C1, C0, C3, C2, C5, C4,C6} +#define UNUSED_PINS { B6,B5,B4,B3,B2,B1,B0 } + + +#endif + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/default/Makefile b/keyboards/handwired/MS-sculpt-mobile/keymaps/default/Makefile new file mode 100644 index 000000000..9d3df5964 --- /dev/null +++ b/keyboards/handwired/MS-sculpt-mobile/keymaps/default/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 = no # 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/handwired/MS-sculpt-mobile/keymaps/default/config.h b/keyboards/handwired/MS-sculpt-mobile/keymaps/default/config.h new file mode 100644 index 000000000..8893d122e --- /dev/null +++ b/keyboards/handwired/MS-sculpt-mobile/keymaps/default/config.h @@ -0,0 +1,8 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here + +#endif diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/default/keymap.c b/keyboards/handwired/MS-sculpt-mobile/keymaps/default/keymap.c new file mode 100644 index 000000000..ab09dcdd1 --- /dev/null +++ b/keyboards/handwired/MS-sculpt-mobile/keymaps/default/keymap.c @@ -0,0 +1,64 @@ +#include "MS-sculpt-mobile.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* +* +* |ESC | F1 | F2 | F3 | F4 | F5 | F6 | f7 | F8 | F9 | F10| F11| F12|Vol-|Vol+|Mute| +* -------------------------------------------------------------------------------' +* | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |Bakspace| Del | +* -------------------------------------------------------------------------- +* | tab | q | w | e | r | t | y | u | i | o | p | [ | ] | \ | | +* -------------------------------------------------------------------------------' +* | caps | a | s | d | f | g | h | j | k | l | ; | ' | enter |PgUp| +* -------------------------------------------------------------------------------- +* |Lsft | z | x | c | v | b | n | m | , | . | / | Rsft| Up| PgDn| +* --------------------------------------------------------------------------------- +* |Lctl |Lgui |Lalt | Space |Ralt | FN | Rctl |Left|Down|Rght| +* --------------------------------------------------------------------------------- +*/ + +[0] = KEYMAP( \ + 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_VOLD, KC_VOLU, KC_MUTE,\ + KC_GRAVE, KC_1, KC_2, KC_3 ,KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQL, KC_BSPC, KC_DEL,\ + 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_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_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_RALT, RSFT(KC_1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT +) + +}; +const uint16_t PROGMEM fn_actions[] = { + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; + + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/default/readme.md b/keyboards/handwired/MS-sculpt-mobile/keymaps/default/readme.md new file mode 100644 index 000000000..e67ddc6fe --- /dev/null +++ b/keyboards/handwired/MS-sculpt-mobile/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for microsoft-sculpt-mobile diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/Makefile b/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/Makefile new file mode 100644 index 000000000..9d3df5964 --- /dev/null +++ b/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/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 = no # 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/handwired/MS-sculpt-mobile/keymaps/milestogo/config.h b/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/config.h new file mode 100644 index 000000000..8893d122e --- /dev/null +++ b/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/config.h @@ -0,0 +1,8 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here + +#endif diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/keymap.c b/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/keymap.c new file mode 100644 index 000000000..a80d5beaa --- /dev/null +++ b/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/keymap.c @@ -0,0 +1,132 @@ +#include "MS-sculpt-mobile.h" + +#define _QWR 0 +#define _CDH 1 +#define _SYM 2 +#define _MOV 3 +#define _NUM 4 +#define _TRAN 9 + +// Shorter spacing +#define XXXX KC_NO +#define ____ KC_TRNS + +// Custom macros + +/* Fn Keys */ +#define TT_SYM MO(_SYM) +#define TO_CDH TG(_CDH) +#define TO_MOV MO(_MOV) +#define TT_NUM MO(_NUM) +#define SSFT ACTION_MODS_ONESHOT(MOD_LSFT) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* QWERTY +* +* |ESC | F1 | F2 | F3 | F4 | F5 | F6 | f7 | F8 | F9 | F10| F11| F12|Vol-|Vol+|Mute| +* -------------------------------------------------------------------------------' +* | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |Bakspace| Del | +* -------------------------------------------------------------------------- +* | tab | q | w | e | r | t | y | u | i | o | p | [ | ] | \ | | +* -------------------------------------------------------------------------------' +* | caps | a | s | d | f | g | h | j | k | l | ; | ' | enter |PgUp| +* -------------------------------------------------------------------------------- +* |Lsft | z | x | c | v | b | n | m | , | . | / | Rsft| Up| PgDn| +* --------------------------------------------------------------------------------- +* |Lctl |Lgui |Lalt | Space |Ralt | FN | Rctl |Left|Down|Rght| +* --------------------------------------------------------------------------------- +*/ + +[_QWR] = KEYMAP( \ + 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_VOLD, KC_VOLU, TO_CDH,\ + KC_ESC, KC_1, KC_2, KC_3 ,KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQL, KC_BSPC, KC_DEL,\ + 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,\ + TT_SYM, 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_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_RGUI,TT_SYM,KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT +), + +[_CDH] = KEYMAP (\ + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ + KC_ESC, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, ____, ____, ____,\ + TO_MOV, KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, ____,\ + KC_LSFT, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, ____, ____,\ + ____, ____, ____ , TT_SYM, ____, ____, ____, ____, ____, ____ + +), + +[_SYM] = KEYMAP (\ + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ + ____, KC_CIRC, KC_LCBR, KC_RCBR,KC_AT, KC_PERC, ____, KC_LBRC,KC_LPRN,KC_RPRN,KC_UNDS, ____, ____, ____,\ + ____, KC_EXLM, KC_HASH, KC_0, KC_EQL, ____, KC_ASTR,KC_MINS,KC_1, KC_PLUS,KC_RBRC, KC_GRV, ____, ____,\ + ____, ____, ____, ____, KC_TILDE, KC_PIPE, KC_DLR, ____, ____, ____, ____, ____, ____, ____,\ + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____ +), + +[_MOV] = KEYMAP (\ + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ + ____, ____, RGUI(KC_TAB), ____, ____, RCTL(KC_B), ____, ____, ____, ____, ____, ____, ____, ____, \ + ____, RCTL(KC_A), KC_S, RCTL(KC_K), RCTL(KC_E), ____, ____, KC_LEFT,KC_DOWN, KC_UP, KC_RIGHT, ____,____,____,\ + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____ +), + +[_TRAN] = KEYMAP (\ + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____ +) +}; + + +const uint16_t PROGMEM fn_actions[] = { +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + + + case KC_N: + if(keyboard_report->mods & MOD_BIT(KC_LGUI) ) { + clear_keyboard_but_mods(); + register_code(KC_V); + } + break; + + + } + return MACRO_NONE; +}; + + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/readme.md b/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/readme.md new file mode 100644 index 000000000..96ee0e77a --- /dev/null +++ b/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/readme.md @@ -0,0 +1 @@ +# A more programmer oriented keymap for microsoft-sculpt-mobile diff --git a/keyboards/handwired/MS-sculpt-mobile/readme.md b/keyboards/handwired/MS-sculpt-mobile/readme.md new file mode 100644 index 000000000..58029b50d --- /dev/null +++ b/keyboards/handwired/MS-sculpt-mobile/readme.md @@ -0,0 +1,58 @@ + +This is a way to take a Microsoft ergonomic bluetooth keyboard, and make it +into a hard-wired keyboard running QMK. + +The keyboard is known under several different names: +Mobile Bluetooth 5000, Mobile 6000, Sculpt mobile, and Asus rebranded + +I had a stack of them,since they're cheap on ebay, travel well, and are just ergo enough. + +The ribbon cable is 1mm pitch, which is hard to hand solder. I bought a cheap set of +"pitch adapter" boards https://www.amazon.com/Double-Sided-0-4mm-1-0-Adapter-60mmx38mm/dp/B00OK42118 + +Cut the original ribbon cable sockets off the bluetooth board using a razor, they're hard to desolder. +They're also allow the cable to be inserted on top or bottom. + +If I was going to do it again, I'd make the MCU connection come out the top of the keyboard +and avoid the wires dangling out the bottom. + +As I was debugging the matrix, I started to get random failures. In desparation I tried a second MCU, +but had the same problems. It turns out that the ribbon cable connections can get worn. Shave a +half millimeter off the end of the ribbon cable & the errors go away. + +My method for discovering the matrix was to set up a KEYMAP macro that included all pins. +See MATRIX_TESTING_KEYMAP if you need it. Then set up a keymap that has all printable symbols +in the first 4 rows. test each key & record output. Then switch the printable symbols to the +bottom 4 rows & repeat. This was enough to show the matrix. + + +The full original keymap for the sculpt is + A B C D E F G H ---> +0 b n m , . / +1 g h " +2 7 8 9 0 Del PgUp +3 p [ ] \ +4 y u i o +5 ~ - += j k l ; 5 +6 a s d q w e, Up left +7 F7 F8 F9 F10 F11 F12 f + +-----> I J K L M N O P Q R +0 Caps FN +1 Vol+ mute Rctl vol- pgdn LCTL +2 Rshift LShift +3 Ralt LAlt +4 LGUI +5 6 bakspc 1 2 3 4 F4 F5 F6 +6 Down right spc F1 F2 F3 tab +7 r t z x c v enter Esc + +This works with 18 cols + 8 rows on a Teensy++, or Arm based Teensy. + +The Astar mini has all pins exposed , so you can do 18x8 +If you want a speaker, LEDs &etc, you'll need to free up a pin. I recommend joining columns +R and L to the same pin. + +Building - edit rules.mk to set ASTAR=1 or comment it out for teensy2++ + + diff --git a/keyboards/handwired/MS-sculpt-mobile/rules.mk b/keyboards/handwired/MS-sculpt-mobile/rules.mk new file mode 100644 index 000000000..cb9d5813c --- /dev/null +++ b/keyboards/handwired/MS-sculpt-mobile/rules.mk @@ -0,0 +1,43 @@ +#CFLAGS=-D ASTAR + +ifdef ASTAR + OPT_DEFS += -DBOOTLOADER_SIZE=4096 + MCU = atmega32u4 + OPT_DEFS += -DCATERINA_BOOTLOADER + SCULPT_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done ; \ + avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) + +else + MCU = at90usb1286 + OPT_DEFS += -DBOOTLOADER_SIZE=2048 + SCULPT_UPLOAD_COMMAND = teensy_loader_cli -w -mmcu=$(MCU) $(TARGET).hex +endif + +F_CPU = 16000000 +ARCH = AVR8 +F_USB = $(F_CPU) +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# +BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= no # 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 +# 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 ?= no # USB Nkey Rollover +BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default +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 + + +USB ?= /dev/cu.usbmodem1421 + + +upload: build + $(SCULPT_UPLOAD_COMMAND) -- cgit v1.2.3 From 0f92d305e267bbf399913d3631007aac885df88d Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Fri, 10 Feb 2017 14:32:24 +0700 Subject: Add slash/question mark to punc/num layer --- .../handwired/promethium/keymaps/priyadi/keymap.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 9605c493c..80224b93a 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -636,17 +636,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | ` | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | * | \ | - | = | | | ( | ) | < | > | | + * | | * | \ | - | = | / | | ( | ) | < | > | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | & | ^ | | | _ | + | | | [ | ] | { | } | : | + * | & | ^ | | | _ | + | ? | | [ | ] | { | } | : | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ [_PUNC] = KEYMAP( KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_GRV , - XXXXXXX, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, XXXXXXX, XXXXXXX, KC_LPRN, KC_RPRN, KC_LABK, KC_RABK, XXXXXXX, - KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, XXXXXXX, XXXXXXX, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_COLN, + XXXXXXX, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, XXXXXXX, KC_LPRN, KC_RPRN, KC_LABK, KC_RABK, XXXXXXX, + KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, XXXXXXX, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_COLN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), @@ -654,17 +654,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | ~ | ! | @ | # | $ | % | A | 7 | 8 | 9 | D | ` | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | * | \ | - | = | | B | 4 | 5 | 6 | E | | + * | | * | \ | - | = | / | B | 4 | 5 | 6 | E | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | & | ^ | | | _ | + | | C | 1 | 2 | 3 | F | : | + * | & | ^ | | | _ | + | ? | C | 1 | 2 | 3 | F | : | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | x | 0 | , | . | | | * `-----------------------------------------------------------------------------------' */ [_NUM] = KEYMAP( KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, S(KC_A), KC_7, KC_8, KC_9, S(KC_D), KC_GRV, - XXXXXXX, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, XXXXXXX, S(KC_B), KC_4, KC_5, KC_6, S(KC_E), _______, - KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, XXXXXXX, S(KC_C), KC_1, KC_2, KC_3, S(KC_F), KC_COLN, + XXXXXXX, 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_1, KC_2, KC_3, S(KC_F), KC_COLN, _______, _______, _______, _______, _______, _______, KC_X, KC_0, KC_COMM, KC_DOT, _______, _______ ), @@ -752,9 +752,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_GUI] = KEYMAP( - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, 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, 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 ), -- cgit v1.2.3 From 4ffbfe829862bb6cc23202ced13da2672c490f5b Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Fri, 10 Feb 2017 14:43:56 +0700 Subject: Restore GUI layer --- .../handwired/promethium/keymaps/priyadi/keymap.c | 24 ++++++++++------------ 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 80224b93a..c06fb7e78 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -12,9 +12,13 @@ #include "outputselect.h" #define COUNT(x) (sizeof (x) / sizeof (*(x))) -// #define RGBLED_NUM 5 -// struct cRGB led[RGBLED_NUM]; +// Fillers to make layering clearer +#define _______ KC_TRNS +#define XXXXXXX KC_NO +#define G(x) LGUI(x) +#define KC_WWWB KC_WWW_BACK +#define KC_WWWF KC_WWW_FORWARD extern keymap_config_t keymap_config; @@ -59,12 +63,6 @@ enum planck_keycodes { OSX, }; -// Fillers to make layering clearer - -#define _______ KC_TRNS -#define XXXXXXX KC_NO -#define G(x) LGUI(x) - // unicode map enum unicode_name { @@ -742,19 +740,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* GUI * ,-----------------------------------------------------------------------------------. - * | | | | | | | | | | | | | - * |------+------+------+------+------+-------------+------+------+------+------+------| * | | D1 | D2 | D3 | D4 | D5 | D6 | D7 | D8 | D9 | D10 | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | Vol- | Mute | Vol+ | | | Prev | | Next | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | + * | | | Prev | Play | Next | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ [_GUI] = KEYMAP( 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, - 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, KC_VOLD, KC_MUTE, KC_VOLU, XXXXXXX, XXXXXXX, KC_WWWB, XXXXXXX, KC_WWWF, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX ), -- cgit v1.2.3 From c0cfacda98eba8d291c376d91d586c1f4f9fd3ef Mon Sep 17 00:00:00 2001 From: VoodaGod Date: Fri, 10 Feb 2017 09:51:08 +0100 Subject: fixed readme (i swear) --- keyboards/planck/keymaps/bone2planck/readme.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/planck/keymaps/bone2planck/readme.md b/keyboards/planck/keymaps/bone2planck/readme.md index 0d053bb17..be22eabdb 100644 --- a/keyboards/planck/keymaps/bone2planck/readme.md +++ b/keyboards/planck/keymaps/bone2planck/readme.md @@ -15,7 +15,7 @@ To build, run "make" from within the \bone2planck folder. ,-----------------------------------------------------------------------------------. | ß | J | D | U | A | X | P | H | L | M | W | Q | |------+------+------+------+------+-------------+------+------+------+------+------| - | M1 | C | T | I | E | O | B | N | R | S | G |M1/Ent| hold for M1, tap for Enter + | M1 | C | T | I | E | O | B | N | R | S | G |M1/Ent| hold: M1, tap: Enter |------+------+------+------+------+------|------+------+------+------+------+------| | Shift| F | V | Ü | Ä | Ö | Y | Z | , | . | K |Shift | |------+------+------+------+------+------+------+------+------+------+------+------| @@ -29,7 +29,7 @@ To build, run "make" from within the \bone2planck folder. ,-----------------------------------------------------------------------------------. | ° | @ | _ | [ | ] | ^ | ! | < | > | = | & | ´ | |------+------+------+------+------+-------------+------+------+------+------+------| - | M1 | \ | / | { | } | * | ? | ( | ) | - | : |M1/Ent| hold for M1, tap for Enter + | M1 | \ | / | { | } | * | ? | ( | ) | - | : |M1/Ent| hold: M1, tap: Enter |------+------+------+------+------+------|------+------+------+------+------+------| | Shift| # | ~ | | | $ | € | + | % | " | ' | ; |Shift | |------+------+------+------+------+------+------+------+------+------+------+------| @@ -56,7 +56,7 @@ To build, run "make" from within the \bone2planck folder. ,-----------------------------------------------------------------------------------. | | | Print|Scroll|Pause | | | F7 | F8 | F9 | F12 | | |------+------+------+------+------+-------------+------+------+------+------+------| - | | | Mute | Vol- | Vol+ | | ³ | F4 | F5 | F6 | F11 | | + | Tab | | Mute | Vol- | Vol+ | | ³ | F4 | F5 | F6 | F11 | Enter| |------+------+------+------+------+------|------+------+------+------+------+------| | Shift| | Prev | Play | Next | | ² | F1 | F2 | F3 | F10 |Shift | |------+------+------+------+------+------+------+------+------+------+------+------| @@ -87,7 +87,7 @@ To build, run "make" from within the \bone2planck folder. ,-----------------------------------------------------------------------------------. | | | F7 | F8 | F9 | F12 | | Print|Scroll| Pause| | | |------+------+------+------+------+-------------+------+------+------+------+------| - | | ³ | F4 | F5 | F6 | F11 | | Mute | Vol- | Vol+ | | | + | Tab | ³ | F4 | F5 | F6 | F11 | | Mute | Vol- | Vol+ | | Enter| |------+------+------+------+------+------|------+------+------+------+------+------| | Shift| ² | F1 | F2 | F3 | F10 | | Prev | Play | Next | |Shift | |------+------+------+------+------+------+------+------+------+------+------+------| -- cgit v1.2.3 From a5b8db52a046e803c21146402e1d009f31b91508 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Fri, 10 Feb 2017 17:11:52 +0700 Subject: Activate SYS layer by pressing both Ctrls --- .../handwired/promethium/keymaps/priyadi/keymap.c | 34 ++++++++++++++++------ 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index c06fb7e78..eee859e31 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -782,8 +782,8 @@ void persistant_default_layer_set(uint16_t default_layer) { } bool process_record_user(uint16_t keycode, keyrecord_t *record) { - bool lshifted = keyboard_report->mods & MOD_BIT(KC_LSFT); - bool rshifted = keyboard_report->mods & MOD_BIT(KC_RSFT); + bool lshift = keyboard_report->mods & MOD_BIT(KC_LSFT); + bool rshift = keyboard_report->mods & MOD_BIT(KC_RSFT); switch (keycode) { // handle greek layer shift @@ -796,7 +796,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { layer_on(_GREEKU); layer_off(_GREEKL); } else { - if (lshifted ^ rshifted) { // if only one shift was pressed + if (lshift ^ rshift) { // if only one shift was pressed layer_on(_GREEKL); layer_off(_GREEKU); } @@ -805,16 +805,32 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; break; + // press both ctrls to activate SYS layer + case KC_LCTL: + case KC_RCTL: + ; + bool lctrl = keyboard_report->mods & MOD_BIT(KC_LCTL); + bool rctrl = keyboard_report->mods & MOD_BIT(KC_RCTL); + if (record->event.pressed) { + if (lctrl ^ rctrl) { // if only one ctrl was pressed + layer_on(_SYS); + } + } else { + layer_off(_SYS); + } + return true; + break; + // QWERTZ style comma and dot: semicolon and colon when shifted case KC_COMM: if (record->event.pressed) { - if (lshifted || rshifted) { - if (lshifted) unregister_code(KC_LSFT); - if (rshifted) unregister_code(KC_RSFT); + if (lshift || rshift) { + if (lshift) unregister_code(KC_LSFT); + if (rshift) unregister_code(KC_RSFT); register_code(KC_SCLN); unregister_code(KC_SCLN); - if (lshifted) register_code(KC_LSFT); - if (rshifted) register_code(KC_RSFT); + if (lshift) register_code(KC_LSFT); + if (rshift) register_code(KC_RSFT); } else { register_code(KC_COMM); unregister_code(KC_COMM); @@ -891,7 +907,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case GREEK: if (record->event.pressed) { - if (lshifted || rshifted) { + if (lshift || rshift) { layer_on(_GREEKU); layer_off(_GREEKL); } else { -- cgit v1.2.3 From 07879bf66b29535214a147b1797f96767b1faa58 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Fri, 10 Feb 2017 17:45:12 +0700 Subject: Add function to cycle backlight modes --- .../handwired/promethium/keymaps/priyadi/keymap.c | 152 ++++++++++----------- 1 file changed, 74 insertions(+), 78 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index eee859e31..65fa14dd3 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -20,6 +20,13 @@ #define KC_WWWB KC_WWW_BACK #define KC_WWWF KC_WWW_FORWARD +enum glow_modes { + GLOW_NONE, + GLOW_MIN, + GLOW_FULL +}; +uint8_t glow_mode = GLOW_MIN; + extern keymap_config_t keymap_config; enum layers { @@ -61,6 +68,10 @@ enum planck_keycodes { LINUX, WIN, OSX, + + // others + GLOW, + AUDIO }; // unicode map @@ -317,6 +328,17 @@ const uint8_t PROGMEM LED_ALNUM[] = { LED_RSPC }; +const uint8_t PROGMEM LED_HOMING[] = { + LED_A, + LED_S, + LED_D, + LED_F, + LED_J, + LED_K, + LED_L, + LED_SCLN +}; + const uint8_t PROGMEM LED_MODS[] = { LED_TAB, LED_ESC, @@ -354,20 +376,50 @@ const uint8_t PROGMEM LED_TRACKPOINT[] = { LED_TRACKPOINT3, }; -void led_reset(void) { +void led_turnoff_keys(void) { for(uint8_t i = 0; i < COUNT(LED_ALNUM); i++) { rgbsps_set(pgm_read_byte(&LED_ALNUM[i]), 0, 0, 0); } - for(uint8_t i = 0; i < COUNT(LED_MODS); i++) { rgbsps_set(pgm_read_byte(&LED_MODS[i]), 0, 0, 0); } - for(uint8_t i = 0; i < COUNT(LED_FN); i++) { rgbsps_set(pgm_read_byte(&LED_FN[i]), 0, 0, 0); } } +void led_reset(void) { + switch (glow_mode) { + case GLOW_NONE: + led_turnoff_keys(); + break; + case GLOW_MIN: + led_turnoff_keys(); + for(uint8_t i = 0; i < COUNT(LED_HOMING); i++) { + rgbsps_set(pgm_read_byte(&LED_HOMING[i]), 8, 8, 8); + } + rgbsps_set(LED_F, 15, 0, 0); + rgbsps_set(LED_J, 15, 0, 0); + break; + case GLOW_FULL: + for(uint8_t i = 0; i < COUNT(LED_ALNUM); i++) { + rgbsps_set(pgm_read_byte(&LED_ALNUM[i]), 8, 8, 8); + } + for(uint8_t i = 0; i < COUNT(LED_MODS); i++) { + rgbsps_set(pgm_read_byte(&LED_MODS[i]), 0, 15, 0); + } + for(uint8_t i = 0; i < COUNT(LED_FN); i++) { + rgbsps_set(pgm_read_byte(&LED_FN[i]), 0, 0, 15); + } + for(uint8_t i = 0; i < COUNT(LED_HOMING); i++) { + rgbsps_set(pgm_read_byte(&LED_HOMING[i]), 15, 0, 0); + } + rgbsps_set(LED_F, 15, 15, 0); + rgbsps_set(LED_J, 15, 15, 0); + break; + } +} + void led_layer_normal(void) { rgbsps_set(LED_IND_FUNC, 0, 0, 0); rgbsps_set(LED_IND_NUM, 0, 0, 0); @@ -385,35 +437,6 @@ void led_layer_func(void) { led_reset(); - for(uint8_t i = 0; i < COUNT(LED_ALNUM); i++) { - rgbsps_set(pgm_read_byte(&LED_ALNUM[i]), 0, 0, 0); - } - - // rgbsps_set(LED_I, 15, 0, 15); - // rgbsps_set(LED_J, 15, 0, 15); - // rgbsps_set(LED_K, 15, 0, 15); - // rgbsps_set(LED_L, 15, 0, 15); - - // rgbsps_set(LED_U, 15, 0, 0); - // rgbsps_set(LED_O, 15, 0, 0); - // rgbsps_set(LED_COMM, 15, 0, 0); - // rgbsps_set(LED_DOT, 15, 0, 0); - // rgbsps_set(LED_SCLN, 15, 0, 0); - // rgbsps_set(LED_P, 15, 0, 0); - - // rgbsps_set(LED_Q, 0, 15, 0); - // rgbsps_set(LED_W, 0, 15, 0); - // rgbsps_set(LED_E, 0, 15, 0); - // rgbsps_set(LED_R, 0, 15, 0); - // rgbsps_set(LED_A, 0, 15, 0); - // rgbsps_set(LED_S, 0, 15, 0); - // rgbsps_set(LED_D, 0, 15, 0); - // rgbsps_set(LED_F, 0, 15, 0); - // rgbsps_set(LED_Z, 0, 15, 0); - // rgbsps_set(LED_X, 0, 15, 0); - // rgbsps_set(LED_C, 0, 15, 0); - // rgbsps_set(LED_V, 0, 15, 0); - rgbsps_send(); } @@ -434,55 +457,10 @@ void led_layer_num(void) { led_reset(); - // for(uint8_t i = 0; i < COUNT(LED_ALNUM); i++) { - // rgbsps_set(pgm_read_byte(&LED_ALNUM[i]), 0, 0, 0); - // } - - // rgbsps_set(LED_U, 0, 5, 15); - // rgbsps_set(LED_I, 0, 5, 15); - // rgbsps_set(LED_O, 0, 5, 15); - // rgbsps_set(LED_J, 0, 5, 15); - // rgbsps_set(LED_K, 0, 5, 15); - // rgbsps_set(LED_L, 0, 5, 15); - // rgbsps_set(LED_M, 0, 5, 15); - // rgbsps_set(LED_COMM, 0, 5, 15); - // rgbsps_set(LED_DOT, 0, 5, 15); - // rgbsps_set(LED_FUNC, 0, 5, 15); - - // rgbsps_set(LED_EMOJI, 0, 10, 15); - // rgbsps_set(LED_RALT, 0, 10, 15); - - // rgbsps_set(LED_Q, 0, 10, 15); - // rgbsps_set(LED_W, 0, 10, 15); - // rgbsps_set(LED_E, 0, 10, 15); - // rgbsps_set(LED_R, 0, 10, 15); - // rgbsps_set(LED_T, 0, 10, 15); - // rgbsps_set(LED_Y, 0, 10, 15); - // rgbsps_set(LED_P, 0, 10, 15); - - // rgbsps_set(LED_A, 0, 15, 15); - // rgbsps_set(LED_S, 0, 15, 15); - // rgbsps_set(LED_D, 0, 15, 15); - // rgbsps_set(LED_F, 0, 15, 15); - // rgbsps_set(LED_Z, 0, 15, 15); - // rgbsps_set(LED_X, 0, 15, 15); - // rgbsps_set(LED_C, 0, 15, 15); - // rgbsps_set(LED_V, 0, 15, 15); - rgbsps_send(); } void led_layer_emoji(void) { - // for(uint8_t i = 0; i < COUNT(LED_ALNUM); i++) { - // rgbsps_set(pgm_read_byte(&LED_ALNUM[i]), 15, 15, 0); - // } - // for(uint8_t i = 0; i < COUNT(LED_MODS); i++) { - // rgbsps_set(pgm_read_byte(&LED_MODS[i]), 15, 15, 0); - // } - // for(uint8_t i = 0; i < COUNT(LED_FN); i++) { - // rgbsps_set(pgm_read_byte(&LED_FN[i]), 15, 15, 0); - // } - rgbsps_set(LED_IND_FUNC, 0, 0, 0); rgbsps_set(LED_IND_NUM, 0, 0, 0); rgbsps_set(LED_IND_EMOJI, 15, 15, 0); @@ -769,7 +747,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_SYS] = KEYMAP( XXXXXXX, QWERTY, WIN, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, OUT_USB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, DVORAK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, WORKMAN, LINUX, XXXXXXX, XXXXXXX, + XXXXXXX, AUDIO, XXXXXXX, DVORAK, XXXXXXX, GLOW, XXXXXXX, XXXXXXX, WORKMAN, LINUX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, COLEMAK, XXXXXXX, OUT_BLE, NORMAN, OSX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______ ), @@ -968,6 +946,24 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { set_unicode_input_mode(UC_OSX); return false; break; + + // glow mode changer + case GLOW: + if (record->event.pressed) { + glow_mode++; + if (glow_mode > GLOW_FULL) { + glow_mode = GLOW_NONE; + } + led_reset(); + rgbsps_send(); + } + return false; + break; + + // faux clicky toggle, TBD + case AUDIO: + return false; + break; } return true; } -- cgit v1.2.3 From 420a032e8d0a7e0391b1899dcc2c7bd8f6c4ac45 Mon Sep 17 00:00:00 2001 From: luc wastiaux Date: Fri, 10 Feb 2017 21:44:27 +0800 Subject: made left shift an MO for SHELL_NAV --- .../ergodox/keymaps/dvorak_programmer/Makefile | 2 +- .../ergodox/keymaps/dvorak_programmer/README.md | 3 ++ .../ergodox/keymaps/dvorak_programmer/keymap.c | 49 +++------------------- 3 files changed, 9 insertions(+), 45 deletions(-) diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/Makefile b/keyboards/ergodox/keymaps/dvorak_programmer/Makefile index 3c65e25e1..91b1ae597 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/Makefile +++ b/keyboards/ergodox/keymaps/dvorak_programmer/Makefile @@ -4,5 +4,5 @@ SLEEP_LED_ENABLE=no FORCE_NKRO ?= yes DEBUG_ENABLE = no CONSOLE_ENABLE = no -TAP_DANCE_ENABLE = yes +TAP_DANCE_ENABLE = no MOUSEKEY_ENABLE = yes diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/README.md b/keyboards/ergodox/keymaps/dvorak_programmer/README.md index 09f30c04f..42723ea17 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/README.md +++ b/keyboards/ergodox/keymaps/dvorak_programmer/README.md @@ -19,6 +19,9 @@ Layers Updates ------- +2017/02/10: +* Made left shift an MO for SHELL_NAV, and symbol+right shift CAPSLOCK + 2017/01/28: * Made the capslock key a dual momentary layer activation for BRACKETS and SHELL_NAV. One keypress held down for BRACKETS, one keypress, released and then held down for SHELL_NAV diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c index 4594a7698..2fef048b5 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c +++ b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c @@ -34,24 +34,6 @@ #define SHELL_RECALL_LAST_ARG_REMOVE_FIRST_COMMAND 15 #define SEMICOLON_NEWLINE 16 #define END_NEWLINE 17 -#define DUAL_CAPSLOCK 18 - -static uint16_t capslock_timer; - -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(KEY_NAV), // FN1 - keynav layer - [2] = ACTION_LAYER_TAP_TOGGLE(NUMBER), // FN2 - number layer - [3] = ACTION_MODS_ONESHOT(MOD_LSFT), // FN3 - shift modifier / oneshot - [4] = ACTION_MODS_ONESHOT(MOD_LCTL), // FN4 - ctrl modifier / oneshot - [5] = ACTION_MODS_ONESHOT(MOD_LALT), // FN5 - alt modifier / oneshot -}; - -//Tap Dance Declarations -enum { - TD_SHIFT_CAPSLOCK = 0, - TD_BRK_LEFT = 1, - TD_BRK_RIGHT = 2 -}; @@ -61,9 +43,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // left hand KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, MO(KEY_SEL), - M(DUAL_CAPSLOCK), KC_A, KC_O, KC_E, KC_U, KC_I, - OSM(MOD_LSFT), KC_SCLN, KC_Q, KC_J, KC_K, KC_X, MO(KEY_NAV), - OSL(SHORTCUTS),KC_FN4, KC_FN5,OSL(SYMBOL),MO(NUMBER), + MO(BRACKETS), KC_A, KC_O, KC_E, KC_U, KC_I, + MO(SHELL_NAV), KC_SCLN, KC_Q, KC_J, KC_K, KC_X, MO(KEY_NAV), + OSL(SHORTCUTS),OSM(MOD_LCTL), OSM(MOD_LALT),OSL(SYMBOL),MO(NUMBER), // thumb cluster MO(MOUSE), RCTL(KC_S), RCTL(KC_DEL), @@ -72,7 +54,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSLS, KC_PGUP, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, - KC_PGDN, KC_B, KC_M, KC_W, KC_V, KC_Z, TD(TD_SHIFT_CAPSLOCK), + KC_PGDN, KC_B, KC_M, KC_W, KC_V, KC_Z, OSM(MOD_LSFT), // lower keys - browser tab control RSFT(RCTL(KC_TAB)), RCTL(KC_TAB), RCTL(KC_T), LALT(KC_LEFT), RCTL(KC_W), // thumb cluster @@ -246,7 +228,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { MEH(KC_F7), MEH(KC_F8), MEH(KC_F9), MEH(KC_F10), MEH(KC_F11), MEH(KC_F12), M(SWITCH_NDS), KC_TRNS, MEH(KC_A), MEH(KC_B), MEH(KC_C), MEH(KC_D), MEH(KC_E), MEH(KC_F), MEH(KC_G), MEH(KC_H), MEH(KC_I), MEH(KC_J), MEH(KC_K), MEH(KC_L), - KC_TRNS, MEH(KC_M), MEH(KC_N), MEH(KC_O), MEH(KC_P), MEH(KC_Q), MEH(KC_R), + KC_TRNS, MEH(KC_M), MEH(KC_N), MEH(KC_O), MEH(KC_P), MEH(KC_Q), KC_CAPSLOCK, MEH(KC_S), MEH(KC_T), MEH(KC_U), MEH(KC_V), MEH(KC_X), MEH(KC_6), MEH(KC_7), MEH(KC_8), @@ -372,20 +354,6 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) return MACRO( T(END), T(ENTER), END); } break; - case DUAL_CAPSLOCK: - if (record->event.pressed) { - if(timer_elapsed(capslock_timer) < 300) { - // activate SHELL_NAV - layer_on(SHELL_NAV); - } else { - layer_on(BRACKETS); - } - } else { - layer_off(SHELL_NAV); - layer_off(BRACKETS); - capslock_timer = timer_read(); - } - break; } @@ -406,13 +374,6 @@ void led_set_user(uint8_t usb_led) { } } -qk_tap_dance_action_t tap_dance_actions[] = { - [TD_SHIFT_CAPSLOCK] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPSLOCK), - [TD_BRK_LEFT] = ACTION_TAP_DANCE_DOUBLE (KC_LPRN, KC_LCBR), - [TD_BRK_RIGHT] = ACTION_TAP_DANCE_DOUBLE (KC_RPRN, KC_RCBR) - -}; - // Runs constantly in the background, in a loop. void matrix_scan_user(void) { -- cgit v1.2.3 From 5944ab246a981d6ceca94b0972345277a746c2d3 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Fri, 10 Feb 2017 21:28:46 +0700 Subject: Implement battery level indicator --- .../handwired/promethium/keymaps/priyadi/keymap.c | 11 ++--- keyboards/handwired/promethium/promethium.c | 34 ++++++++++++++- keyboards/handwired/promethium/promethium.h | 6 ++- keyboards/handwired/promethium/rgbsps.c | 51 +++++++++++++++++++++- keyboards/handwired/promethium/rgbsps.h | 3 +- keyboards/handwired/promethium/rules.mk | 3 +- 6 files changed, 97 insertions(+), 11 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 65fa14dd3..469d7a5d8 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -25,6 +25,7 @@ enum glow_modes { GLOW_MIN, GLOW_FULL }; + uint8_t glow_mode = GLOW_MIN; extern keymap_config_t keymap_config; @@ -505,11 +506,6 @@ void led_init(void) { rgbsps_set(LED_TRACKPOINT2, 0, 0, 15); rgbsps_set(LED_TRACKPOINT3, 15, 0, 0); - // // hardcode indicator for now - rgbsps_set(LED_IND_BLUETOOTH, 0, 0, 15); - rgbsps_set(LED_IND_USB, 15, 15, 15); - rgbsps_set(LED_IND_BATTERY, 0, 15, 0); - led_layer_normal(); } @@ -996,6 +992,11 @@ void matrix_init_user(void) { } } +void battery_poll(float percentage) { + rgbsps_sethsv(LED_IND_BATTERY, percentage*120/100, 255, 15); + rgbsps_send(); +} + void ps2_mouse_init_user() { uint8_t rcv; diff --git a/keyboards/handwired/promethium/promethium.c b/keyboards/handwired/promethium/promethium.c index a0035cce1..7f876c756 100644 --- a/keyboards/handwired/promethium/promethium.c +++ b/keyboards/handwired/promethium/promethium.c @@ -1,6 +1,36 @@ #include "promethium.h" +#include "analog.h" +#include "timer.h" +#include "matrix.h" -void matrix_init_kb(void) { +float battery_percentage(void) { + float voltage = analogRead(BATTERY_PIN) * 2 * 3.3 / 1024; + float percentage = (voltage - 3.5) * 143; + if (percentage > 100) { + return 100; + } else if (percentage < 0) { + return 0; + } else { + return percentage; + } +} + +__attribute__ ((weak)) +void battery_poll(float percentage) { +} +void matrix_init_kb(void) { matrix_init_user(); -} \ No newline at end of file +} + +void matrix_scan_kb(void) { + static uint16_t counter = BATTERY_POLL; + counter++; + + if (counter > BATTERY_POLL) { + counter = 0; + battery_poll(battery_percentage()); + } +} + + diff --git a/keyboards/handwired/promethium/promethium.h b/keyboards/handwired/promethium/promethium.h index a2572db2a..6d51f81ca 100644 --- a/keyboards/handwired/promethium/promethium.h +++ b/keyboards/handwired/promethium/promethium.h @@ -5,6 +5,8 @@ #define PS2_INIT_DELAY 2000 #define UNICODE_TYPE_DELAY 0 +#define BATTERY_PIN 9 +#define BATTERY_POLL 30000 #define KEYMAP( \ k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ @@ -23,6 +25,8 @@ {k47, k48, k49, k4a, k4b, k4c} \ } + + enum led_sequence { LED_IND_BLUETOOTH, LED_IND_USB, @@ -99,4 +103,4 @@ enum led_sequence { #endif - +void battery_poll(float percentage); \ No newline at end of file diff --git a/keyboards/handwired/promethium/rgbsps.c b/keyboards/handwired/promethium/rgbsps.c index ea922ec3f..f30badd35 100644 --- a/keyboards/handwired/promethium/rgbsps.c +++ b/keyboards/handwired/promethium/rgbsps.c @@ -21,4 +21,53 @@ void rgbsps_turnoff(void) { void rgbsps_send(void) { ws2812_setleds(led, RGBSPS_NUM); -} \ No newline at end of file +} + +void rgbsps_sethsv(uint8_t index, uint16_t hue, uint8_t sat, uint8_t val) { + uint8_t r = 0, g = 0, b = 0, base, color; + + if (sat == 0) { // Acromatic color (gray). Hue doesn't mind. + r = val; + g = val; + b = val; + } else { + base = ((255 - sat) * val) >> 8; + color = (val - base) * (hue % 60) / 60; + + switch (hue / 60) { + case 0: + r = val; + g = base + color; + b = base; + break; + case 1: + r = val - color; + g = val; + b = base; + break; + case 2: + r = base; + g = val; + b = base + color; + break; + case 3: + r = base; + g = val - color; + b = val; + break; + case 4: + r = base + color; + g = base; + b = val; + break; + case 5: + r = val; + g = base; + b = val - color; + break; + } + } + + rgbsps_set(index, r, g, b); +} + diff --git a/keyboards/handwired/promethium/rgbsps.h b/keyboards/handwired/promethium/rgbsps.h index 6da197f75..72612a7a8 100644 --- a/keyboards/handwired/promethium/rgbsps.h +++ b/keyboards/handwired/promethium/rgbsps.h @@ -1,4 +1,5 @@ void rgbsps_set(uint8_t index, uint8_t r, uint8_t g, uint8_t b); void rgbsps_setall(uint8_t r, uint8_t g, uint8_t b); void rgbsps_turnoff(void); -void rgbsps_send(void); \ No newline at end of file +void rgbsps_send(void); +void rgbsps_sethsv(uint8_t index, uint16_t hue, uint8_t sat, uint8_t val); \ No newline at end of file diff --git a/keyboards/handwired/promethium/rules.mk b/keyboards/handwired/promethium/rules.mk index 465ef3359..e75cf4dde 100644 --- a/keyboards/handwired/promethium/rules.mk +++ b/keyboards/handwired/promethium/rules.mk @@ -72,4 +72,5 @@ API_SYSEX_ENABLE ?= no SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend SRC += $(QUANTUM_DIR)/light_ws2812.c -SRC += rgbsps.c \ No newline at end of file +SRC += rgbsps.c +SRC += $(QUANTUM_DIR)/analog.c \ No newline at end of file -- cgit v1.2.3 From 229e38f097448c61b2311c00837362fe5de17889 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Fri, 10 Feb 2017 22:15:15 +0700 Subject: Add ifdefs for keyboard layouts --- .../handwired/promethium/keymaps/priyadi/config.h | 5 +++ .../handwired/promethium/keymaps/priyadi/keymap.c | 37 ++++++++++++++-------- 2 files changed, 29 insertions(+), 13 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/config.h b/keyboards/handwired/promethium/keymaps/priyadi/config.h index 8b78c0dc4..36baedd48 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/config.h +++ b/keyboards/handwired/promethium/keymaps/priyadi/config.h @@ -14,4 +14,9 @@ #define RGB_DI_PIN B5 #define RGBSPS_NUM 57 +#define LAYOUT_DVORAK +#define LAYOUT_COLEMAK +#define LAYOUT_NORMAN +#define LAYOUT_WORKMAN + #endif diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 469d7a5d8..1e5e497df 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -13,19 +13,22 @@ #define COUNT(x) (sizeof (x) / sizeof (*(x))) // Fillers to make layering clearer - #define _______ KC_TRNS #define XXXXXXX KC_NO #define G(x) LGUI(x) #define KC_WWWB KC_WWW_BACK #define KC_WWWF KC_WWW_FORWARD +// hybrid right-alt & scroll lock (mapped to Compose in OS) +#undef KC_RALT +#define KC_RALT MT(MOD_RALT, KC_SLCK) + +// glow enum glow_modes { GLOW_NONE, GLOW_MIN, GLOW_FULL }; - uint8_t glow_mode = GLOW_MIN; extern keymap_config_t keymap_config; @@ -281,17 +284,6 @@ const uint32_t PROGMEM unicode_map[] = { [FSIGM] = 0x03C2, }; - -// hybrid shift - = -// #undef KC_LSFT -// #define KC_LSFT MT(MOD_LSFT, KC_MINS) -// #undef KC_RSFT -// #define KC_RSFT MT(MOD_LSFT, KC_EQL) - -// hybrid right-alt & scroll lock (mapped to Compose in OS) -#undef KC_RALT -#define KC_RALT MT(MOD_RALT, KC_SLCK) - // RGBSPS const uint8_t PROGMEM LED_ALNUM[] = { @@ -543,12 +535,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Alt | GUI | Punc | Num | Space | Func |Greek | GUI |AltGr | Ctrl | * `-----------------------------------------------------------------------------------' */ +#ifdef LAYOUT_DVORAK [_DVORAK] = KEYMAP( _______, 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, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), +#endif /* Colemak * ,-----------------------------------------------------------------------------------. @@ -561,12 +555,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Alt | GUI | Punc | Num | Space | Func |Greek | GUI |AltGr | Ctrl | * `-----------------------------------------------------------------------------------' */ + +#ifdef LAYOUT_COLEMAK [_COLEMAK] = KEYMAP( _______, 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, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), +#endif /* Norman * ,-----------------------------------------------------------------------------------. @@ -579,12 +576,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Alt | GUI | Punc | Num | Space | Func |Greek | GUI |AltGr | Ctrl | * `-----------------------------------------------------------------------------------' */ + +#ifdef LAYOUT_NORMAN [_NORMAN] = KEYMAP( _______, 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, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), +#endif /* Workman * ,-----------------------------------------------------------------------------------. @@ -597,12 +597,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Alt | GUI | Punc | Num | Space | Func |Greek | GUI |AltGr | Ctrl | * `-----------------------------------------------------------------------------------' */ + +#ifdef LAYOUT_WORKMAN [_WORKMAN] = KEYMAP( _______, 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, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), +#endif /* Punc * ,-----------------------------------------------------------------------------------. @@ -832,30 +835,38 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; +#ifdef LAYOUT_DVORAK case DVORAK: if (record->event.pressed) { persistant_default_layer_set(1UL<<_DVORAK); } return false; break; +#endif +#ifdef LAYOUT_COLEMAK case COLEMAK: if (record->event.pressed) { persistant_default_layer_set(1UL<<_COLEMAK); } return false; break; +#endif +#ifdef LAYOUT_WORKMAN case WORKMAN: if (record->event.pressed) { persistant_default_layer_set(1UL<<_WORKMAN); } return false; break; +#endif +#ifdef LAYOUT_NORMAN case NORMAN: if (record->event.pressed) { persistant_default_layer_set(1UL<<_NORMAN); } return false; break; +#endif // layer switcher case PUNC: -- cgit v1.2.3 From 909fd4ae64432206e80925f12268c17ea7f2f68f Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Sat, 11 Feb 2017 00:07:10 +0700 Subject: Generalize layer indicators --- .../handwired/promethium/keymaps/priyadi/keymap.c | 142 +++++++++------------ keyboards/handwired/promethium/promethium.c | 2 + 2 files changed, 61 insertions(+), 83 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 1e5e497df..72b625357 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -413,61 +413,43 @@ void led_reset(void) { } } -void led_layer_normal(void) { - rgbsps_set(LED_IND_FUNC, 0, 0, 0); - rgbsps_set(LED_IND_NUM, 0, 0, 0); - rgbsps_set(LED_IND_EMOJI, 0, 0, 0); - - led_reset(); - - rgbsps_send(); -} +void led_set_layer_indicator(void) { + static uint8_t oldlayer = 255; -void led_layer_func(void) { - rgbsps_set(LED_IND_FUNC, 0, 15, 0); + rgbsps_set(LED_IND_FUNC, 0, 0, 0); rgbsps_set(LED_IND_NUM, 0, 0, 0); rgbsps_set(LED_IND_EMOJI, 0, 0, 0); led_reset(); - rgbsps_send(); -} - -void led_layer_punc(void) { - rgbsps_set(LED_IND_FUNC, 0, 15, 0); - rgbsps_set(LED_IND_NUM, 0, 0, 15); - rgbsps_set(LED_IND_EMOJI, 0, 0, 0); - - led_reset(); - - rgbsps_send(); -} - -void led_layer_num(void) { - rgbsps_set(LED_IND_FUNC, 0, 0, 0); - rgbsps_set(LED_IND_NUM, 0, 0, 15); - rgbsps_set(LED_IND_EMOJI, 0, 0, 0); - - led_reset(); + uint8_t layer = biton32(layer_state); + if (oldlayer == layer) { + return; + } - rgbsps_send(); -} + oldlayer = layer; -void led_layer_emoji(void) { - rgbsps_set(LED_IND_FUNC, 0, 0, 0); - rgbsps_set(LED_IND_NUM, 0, 0, 0); - rgbsps_set(LED_IND_EMOJI, 15, 15, 0); - - rgbsps_set(LED_PUNC, 15, 15, 15); - rgbsps_set(LED_EMOJI, 15, 15, 15); + if (layer <= _NORMAN) { + rgbsps_send(); + return; + } - rgbsps_send(); -} + switch(layer) { + case _FUNC: + rgbsps_set(LED_IND_FUNC, 15, 0, 0); + break; + case _NUM: + rgbsps_set(LED_IND_NUM, 0, 0, 15); + break; + case _EMOJI: + rgbsps_set(LED_IND_EMOJI, 15, 15, 0); + break; + default: + rgbsps_set(LED_IND_FUNC, 3, 3, 3); + rgbsps_set(LED_IND_NUM, 3, 3, 3); + rgbsps_set(LED_IND_EMOJI, 3, 3, 3); + } -void led_layer_gui(void) { - rgbsps_set(LED_IND_FUNC, 15, 10, 15); - rgbsps_set(LED_IND_NUM, 15, 10, 15); - rgbsps_set(LED_IND_EMOJI, 15, 10, 15); rgbsps_send(); } @@ -497,8 +479,6 @@ void led_init(void) { rgbsps_set(LED_TRACKPOINT1, 15, 0, 0); rgbsps_set(LED_TRACKPOINT2, 0, 0, 15); rgbsps_set(LED_TRACKPOINT3, 15, 0, 0); - - led_layer_normal(); } @@ -798,6 +778,22 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; break; + // press both Supers to activate EMOJI layer + case KC_LGUI: + case KC_RGUI: + ; + bool lgui = keyboard_report->mods & MOD_BIT(KC_LGUI); + bool rgui = keyboard_report->mods & MOD_BIT(KC_RGUI); + if (record->event.pressed) { + if (lgui ^ rgui) { // if only one super was pressed + layer_on(_EMOJI); + } + } else { + layer_off(_EMOJI); + } + return true; + break; + // QWERTZ style comma and dot: semicolon and colon when shifted case KC_COMM: if (record->event.pressed) { @@ -873,19 +869,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { layer_on(_PUNC); update_tri_layer(_PUNC, _GREEKL, _GUI); - if (IS_LAYER_ON(_GUI)) { - led_layer_normal(); - } else { - led_layer_punc(); - } } else { layer_off(_PUNC); update_tri_layer(_PUNC, _GREEKL, _GUI); - if (IS_LAYER_ON(_GREEKL)) { - led_layer_normal(); - } else { - led_layer_normal(); - } } return false; break; @@ -899,21 +885,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { layer_on(_GREEKL); layer_off(_GREEKU); update_tri_layer(_PUNC, _GREEKL, _GUI); - if (IS_LAYER_ON(_GUI)) { - led_layer_normal(); - } else { - led_layer_normal(); - } } } else { layer_off(_GREEKU); layer_off(_GREEKL); update_tri_layer(_PUNC, _GREEKL, _GUI); - if (IS_LAYER_ON(_PUNC)) { - led_layer_normal(); - } else { - led_layer_normal(); - } } return false; break; @@ -921,10 +897,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case NUM: if (record->event.pressed) { layer_on(_NUM); - led_layer_num(); } else { layer_off(_NUM); - led_layer_normal(); } return false; break; @@ -932,10 +906,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case FUNC: if (record->event.pressed) { layer_on(_FUNC); - led_layer_func(); } else { layer_off(_FUNC); - led_layer_normal(); } return false; break; @@ -1003,6 +975,10 @@ void matrix_init_user(void) { } } +void matrix_scan_user(void) { + led_set_layer_indicator(); +} + void battery_poll(float percentage) { rgbsps_sethsv(LED_IND_BATTERY, percentage*120/100, 255, 15); rgbsps_send(); @@ -1012,23 +988,23 @@ void ps2_mouse_init_user() { uint8_t rcv; // set TrackPoint sensitivity - PS2_MOUSE_SEND(0xE2, "set trackpoint sensitivity: 0xE2"); - PS2_MOUSE_SEND(0x81, "set trackpoint sensitivity: 0x81"); - PS2_MOUSE_SEND(0x4A, "set trackpoint sensitivity: 0x4A"); - PS2_MOUSE_SEND(0x49, "set trackpoint sensitivity: 0x59"); + PS2_MOUSE_SEND(0xE2, "tpsens: 0xE2"); + PS2_MOUSE_SEND(0x81, "tpsens: 0x81"); + PS2_MOUSE_SEND(0x4A, "tpsens: 0x4A"); + PS2_MOUSE_SEND(0x49, "tpsens: 0x59"); // set TrackPoint Negative Inertia factor - PS2_MOUSE_SEND(0xE2, "set negative inertia factor: 0xE2"); - PS2_MOUSE_SEND(0x81, "set negative inertia factor: 0x81"); - PS2_MOUSE_SEND(0x4D, "set negative inertia factor: 0x4D"); - PS2_MOUSE_SEND(0x06, "set negative inertia factor: 0x06"); + PS2_MOUSE_SEND(0xE2, "tpnegin: 0xE2"); + PS2_MOUSE_SEND(0x81, "tpnegin: 0x81"); + PS2_MOUSE_SEND(0x4D, "tpnegin: 0x4D"); + PS2_MOUSE_SEND(0x06, "tpnegin: 0x06"); // set TrackPoint speed // (transfer function upper plateau speed) - PS2_MOUSE_SEND(0xE2, "set trackpoint speed: 0xE2"); - PS2_MOUSE_SEND(0x81, "set trackpoint speed: 0x81"); - PS2_MOUSE_SEND(0x60, "set trackpoint speed: 0x60"); - PS2_MOUSE_SEND(0x61, "set trackpoint speed: 0x61"); + PS2_MOUSE_SEND(0xE2, "tpsp: 0xE2"); + PS2_MOUSE_SEND(0x81, "tpsp: 0x81"); + PS2_MOUSE_SEND(0x60, "tpsp: 0x60"); + PS2_MOUSE_SEND(0x61, "tpsp: 0x61"); // inquire pts status rcv = ps2_host_send(0xE2); diff --git a/keyboards/handwired/promethium/promethium.c b/keyboards/handwired/promethium/promethium.c index 7f876c756..adfc11e2a 100644 --- a/keyboards/handwired/promethium/promethium.c +++ b/keyboards/handwired/promethium/promethium.c @@ -31,6 +31,8 @@ void matrix_scan_kb(void) { counter = 0; battery_poll(battery_percentage()); } + + matrix_scan_user(); } -- cgit v1.2.3 From bf31f516e30c4aae89a6636cecb3d7c5bb332cad Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Sat, 11 Feb 2017 00:07:44 +0700 Subject: Add reset keycode --- keyboards/handwired/promethium/keymaps/priyadi/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 72b625357..3107d4e05 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -715,7 +715,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Sys * ,-----------------------------------------------------------------------------------. - * | |Qwerty| Win | | | | | USB | | | | | + * | |Qwerty| Win | |Reset | | | USB | | | | | * |------+------+------+------+------+-------------+------+------+------+------+------| * | |Audio | |Dvorak| | Glow | | |WorkMn|Linux | | | * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -725,7 +725,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_SYS] = KEYMAP( - XXXXXXX, QWERTY, WIN, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, OUT_USB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, QWERTY, WIN, XXXXXXX, RESET, XXXXXXX, XXXXXXX, OUT_USB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, AUDIO, XXXXXXX, DVORAK, XXXXXXX, GLOW, XXXXXXX, XXXXXXX, WORKMAN, LINUX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, COLEMAK, XXXXXXX, OUT_BLE, NORMAN, OSX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______ -- cgit v1.2.3 From fdd06d3fcafd5aae5eb8a6edf208f60a40a6a0be Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Sat, 11 Feb 2017 00:21:27 +0700 Subject: RShift + LShift = Capslock --- keyboards/handwired/promethium/keymaps/priyadi/keymap.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 3107d4e05..b50d2c3e2 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -744,6 +744,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { // handle greek layer shift + // handle both shift = capslock case KC_LSFT: case KC_RSFT: ; @@ -758,6 +759,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { layer_off(_GREEKU); } } + } else { + if (record->event.pressed) { + if (lshift ^ rshift) { // if only one shift was pressed + register_code(KC_CAPS); + unregister_code(KC_CAPS); + } + } } return true; break; -- cgit v1.2.3 From b92515f139a80763b9b0b77ed4440cd9635fafac Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Sat, 11 Feb 2017 00:36:08 +0700 Subject: Make room for 'loose keycodes' by halving UNICODE_MAP range --- quantum/quantum_keycodes.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index e562c9a18..ab2e79026 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -43,7 +43,7 @@ enum quantum_keycodes { QK_TAP_DANCE_MAX = 0x57FF, #ifdef UNICODEMAP_ENABLE QK_UNICODE_MAP = 0x5800, - QK_UNICODE_MAP_MAX = 0x5FFF, + QK_UNICODE_MAP_MAX = 0x5BFF, #endif QK_MOD_TAP = 0x6000, QK_MOD_TAP_MAX = 0x7FFF, @@ -54,7 +54,7 @@ enum quantum_keycodes { // Loose keycodes - to be used directly - RESET = 0x7000, + RESET = 0x5C00, DEBUG, MAGIC_SWAP_CONTROL_CAPSLOCK, MAGIC_CAPSLOCK_TO_CONTROL, -- cgit v1.2.3 From b31ac35441a8117877e446b8467e3e34e0a4505b Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Sat, 11 Feb 2017 01:30:08 +0700 Subject: Fix emoji layer --- keyboards/handwired/promethium/keymaps/priyadi/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index b50d2c3e2..6eb4e903f 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -692,7 +692,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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), - X(POO), X(EYES),X(HUNRD), _______,X(SKULL),X(HORNS), X(HALO), X(FEAR), _______,X(YUMMY),X(DISAP),X(NOEVK) + X(POO), X(EYES), _______,X(HUNRD), X(SKULL),X(HORNS), X(HALO), X(FEAR),X(YUMMY),_______,X(DISAP),X(NOEVK) ), /* GUI -- cgit v1.2.3 From 9fc3afbef4b3ecc8568c37f247c3c7f1ec87a4c1 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Sat, 11 Feb 2017 14:50:43 +0700 Subject: simplify battery calculation for now --- keyboards/handwired/promethium/config.h | 89 +++++++++++++++++++--- .../handwired/promethium/keymaps/priyadi/keymap.c | 4 +- keyboards/handwired/promethium/promethium.c | 19 ++--- keyboards/handwired/promethium/promethium.h | 4 +- 4 files changed, 92 insertions(+), 24 deletions(-) diff --git a/keyboards/handwired/promethium/config.h b/keyboards/handwired/promethium/config.h index 23fbfd0b9..fd45c2bfe 100644 --- a/keyboards/handwired/promethium/config.h +++ b/keyboards/handwired/promethium/config.h @@ -43,38 +43,107 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { D7, C6, D0, D1, F5, F4, F1, F0 } #define UNUSED_PINS -/* COL2ROW or ROW2COL */ +/* + * 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 DIODE_DIRECTION COL2ROW -/* define if matrix has ghost */ +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST /* number of backlight levels */ -#define BACKLIGHT_LEVELS 3 - -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE +// #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE +// #define LOCKING_RESYNC_ENABLE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO /* key combination for command */ #define IS_COMMAND() ( \ keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT) | MOD_BIT(KC_LCTRL) | MOD_BIT(KC_RCTRL)) \ ) +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + /* * Feature disable options * These options are also useful to firmware size reduction. */ /* disable debug print */ -//#define NO_DEBUG +// #define NO_DEBUG /* disable print */ -//#define NO_PRINT +// #define NO_PRINT /* disable action features */ //#define NO_ACTION_LAYER diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 6eb4e903f..992a03a41 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -987,8 +987,8 @@ void matrix_scan_user(void) { led_set_layer_indicator(); } -void battery_poll(float percentage) { - rgbsps_sethsv(LED_IND_BATTERY, percentage*120/100, 255, 15); +void battery_poll(uint8_t level) { + rgbsps_sethsv(LED_IND_BATTERY, level * 120/255, 255, 15); rgbsps_send(); } diff --git a/keyboards/handwired/promethium/promethium.c b/keyboards/handwired/promethium/promethium.c index adfc11e2a..3e369a624 100644 --- a/keyboards/handwired/promethium/promethium.c +++ b/keyboards/handwired/promethium/promethium.c @@ -3,20 +3,17 @@ #include "timer.h" #include "matrix.h" -float battery_percentage(void) { +// cubic fit {3.3, 0}, {3.5, 2.9}, {3.6, 5}, {3.7, 8.6}, {3.8, 36}, {3.9, 62}, {4.0, 73}, {4.05, 83}, {4.1, 89}, {4.15, 94}, {4.2, 100} + +uint8_t battery_level(void) { float voltage = analogRead(BATTERY_PIN) * 2 * 3.3 / 1024; - float percentage = (voltage - 3.5) * 143; - if (percentage > 100) { - return 100; - } else if (percentage < 0) { - return 0; - } else { - return percentage; - } + if (voltage < MIN_VOLTAGE) return 0; + if (voltage > MAX_VOLTAGE) return 255; + return (voltage - MIN_VOLTAGE) / (MAX_VOLTAGE - MIN_VOLTAGE) * 255; } __attribute__ ((weak)) -void battery_poll(float percentage) { +void battery_poll(uint8_t level) { } void matrix_init_kb(void) { @@ -29,7 +26,7 @@ void matrix_scan_kb(void) { if (counter > BATTERY_POLL) { counter = 0; - battery_poll(battery_percentage()); + battery_poll(battery_level()); } matrix_scan_user(); diff --git a/keyboards/handwired/promethium/promethium.h b/keyboards/handwired/promethium/promethium.h index 6d51f81ca..da37e5c56 100644 --- a/keyboards/handwired/promethium/promethium.h +++ b/keyboards/handwired/promethium/promethium.h @@ -7,6 +7,8 @@ #define UNICODE_TYPE_DELAY 0 #define BATTERY_PIN 9 #define BATTERY_POLL 30000 +#define MAX_VOLTAGE 4.2 +#define MIN_VOLTAGE 3.2 #define KEYMAP( \ k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ @@ -103,4 +105,4 @@ enum led_sequence { #endif -void battery_poll(float percentage); \ No newline at end of file +void battery_poll(uint8_t level); \ No newline at end of file -- cgit v1.2.3 From aa69337cf563d7b37722aabfcd1c5bae6c185208 Mon Sep 17 00:00:00 2001 From: David Olsson Date: Sat, 11 Feb 2017 10:49:53 +0100 Subject: update readme --- keyboards/atreus62/keymaps/mneme/README.md | 4 +++- keyboards/atreus62/keymaps/mneme/config.h | 2 +- keyboards/atreus62/keymaps/mneme/img/base.png | Bin 458762 -> 457157 bytes keyboards/atreus62/keymaps/mneme/img/fun.png | Bin 430634 -> 425368 bytes keyboards/atreus62/keymaps/mneme/img/sym.png | Bin 433342 -> 433218 bytes keyboards/atreus62/keymaps/mneme/keymap.c | 10 +++++----- 6 files changed, 9 insertions(+), 7 deletions(-) diff --git a/keyboards/atreus62/keymaps/mneme/README.md b/keyboards/atreus62/keymaps/mneme/README.md index 04ab070be..3231a88d2 100644 --- a/keyboards/atreus62/keymaps/mneme/README.md +++ b/keyboards/atreus62/keymaps/mneme/README.md @@ -33,6 +33,8 @@ It's for Windows (current work forces me to) and Swedish (matter of birth) so ym - `LEAD s l` : `λ`. - `LEAD s s` : `¯\_(ツ)_/¯` - `LEAD s f` : `凸(ツ)凸` + - `LEAD u l` : Set unicode input mode to linux. + - `LEAD s w` : Set unicode input mode to windows. - `LEAD a *` : Application switching based on position in start menu. Very specific to my computer. @@ -42,7 +44,7 @@ It's for Windows (current work forces me to) and Swedish (matter of birth) so ym Basic navigation on the right hand and modifiers close by for the left. The latter because I tend to use `ctrl+arrows` quite a lot. - + ## Sym layer ![Sym layer](img/sym.png) diff --git a/keyboards/atreus62/keymaps/mneme/config.h b/keyboards/atreus62/keymaps/mneme/config.h index 2c2a08c05..73eb0fa33 100644 --- a/keyboards/atreus62/keymaps/mneme/config.h +++ b/keyboards/atreus62/keymaps/mneme/config.h @@ -1,7 +1,7 @@ #define ONESHOT_TIMEOUT 3000 #define TAPPING_TERM 200 #define PREVENT_STUCK_MODIFIERS - +#define FORCE_NKRO #define LEADER_TIMEOUT 1000 #include "../../config.h" diff --git a/keyboards/atreus62/keymaps/mneme/img/base.png b/keyboards/atreus62/keymaps/mneme/img/base.png index 86907d544..3e77a5183 100644 Binary files a/keyboards/atreus62/keymaps/mneme/img/base.png and b/keyboards/atreus62/keymaps/mneme/img/base.png differ diff --git a/keyboards/atreus62/keymaps/mneme/img/fun.png b/keyboards/atreus62/keymaps/mneme/img/fun.png index ec5a478c6..961a19724 100644 Binary files a/keyboards/atreus62/keymaps/mneme/img/fun.png and b/keyboards/atreus62/keymaps/mneme/img/fun.png differ diff --git a/keyboards/atreus62/keymaps/mneme/img/sym.png b/keyboards/atreus62/keymaps/mneme/img/sym.png index 11b5bd4b0..5e2c80335 100644 Binary files a/keyboards/atreus62/keymaps/mneme/img/sym.png and b/keyboards/atreus62/keymaps/mneme/img/sym.png differ diff --git a/keyboards/atreus62/keymaps/mneme/keymap.c b/keyboards/atreus62/keymaps/mneme/keymap.c index 46edd2e08..2627e024f 100644 --- a/keyboards/atreus62/keymaps/mneme/keymap.c +++ b/keyboards/atreus62/keymaps/mneme/keymap.c @@ -97,11 +97,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = { - { M(KF_11) ,M(KF_1) ,M(KF_2) ,M(KF_3) ,M(KF_4) ,M(KF_5) ,KC_NO ,M(KF_6) ,M(KF_7) ,M(KF_8) ,M(KF_9) ,M(KF_10) ,M(KF_12) }, - { KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_NO ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KN_AO }, - { OSM_LCTL ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_NO ,KC_H ,KC_J ,KC_K ,KC_L ,KN_OE ,KN_AE }, - { OSM_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_DELT ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KN_MINS ,OSM_LSFT }, - { MO(NAV) ,OSM_LCTL ,OSM_LALT ,KC_LGUI ,KC_SPC ,LT(SYM,KC_BSPC) ,KC_HYP ,LT(SYM,KC_ENT) ,KC_SPC ,KC_LEAD ,KC_LALT ,KC_LCTRL ,MO(NAV) } + { M(KF_11) ,M(KF_1) ,M(KF_2) ,M(KF_3) ,M(KF_4) ,M(KF_5) ,KC_NO ,M(KF_6) ,M(KF_7) ,M(KF_8) ,M(KF_9) ,M(KF_10) ,M(KF_12) }, + { KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_NO ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KN_AO }, + { OSM_LCTL ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_NO ,KC_H ,KC_J ,KC_K ,KC_L ,KN_OE ,KN_AE }, + { OSM_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_DELT ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KN_MINS ,OSM_LSFT }, + { MO(NAV) ,OSM_LCTL ,OSM_LALT ,KC_LGUI ,MO(SYM) ,KC_BSPC ,KC_ENT ,KC_SPC ,MO(SYM) ,KC_LEAD ,KC_LALT ,KC_LCTRL ,KC_HYP } }, [NAV] = { -- cgit v1.2.3 From 79de0cd11964e9205654498aa0027510e3c3535e Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Sat, 11 Feb 2017 19:03:18 +0700 Subject: Implement Capslock LED --- .../handwired/promethium/keymaps/priyadi/keymap.c | 23 ++++++++++++++++++---- keyboards/handwired/promethium/promethium.c | 3 +++ 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 992a03a41..2a21b4ba7 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -10,6 +10,7 @@ #include "ps2_mouse.h" #include "ps2.h" #include "outputselect.h" +#include "led.h" #define COUNT(x) (sizeof (x) / sizeof (*(x))) // Fillers to make layering clearer @@ -23,6 +24,8 @@ #undef KC_RALT #define KC_RALT MT(MOD_RALT, KC_SLCK) +bool capslock = false; + // glow enum glow_modes { GLOW_NONE, @@ -417,7 +420,7 @@ void led_set_layer_indicator(void) { static uint8_t oldlayer = 255; rgbsps_set(LED_IND_FUNC, 0, 0, 0); - rgbsps_set(LED_IND_NUM, 0, 0, 0); + // rgbsps_set(LED_IND_NUM, 0, 0, 0); rgbsps_set(LED_IND_EMOJI, 0, 0, 0); led_reset(); @@ -438,9 +441,9 @@ void led_set_layer_indicator(void) { case _FUNC: rgbsps_set(LED_IND_FUNC, 15, 0, 0); break; - case _NUM: - rgbsps_set(LED_IND_NUM, 0, 0, 15); - break; + // case _NUM: + // rgbsps_set(LED_IND_NUM, 0, 0, 15); + // break; case _EMOJI: rgbsps_set(LED_IND_EMOJI, 15, 15, 0); break; @@ -992,6 +995,18 @@ void battery_poll(uint8_t level) { rgbsps_send(); } +void led_set_user(uint8_t usb_led) { + bool new_capslock = usb_led & (1< Date: Sat, 11 Feb 2017 15:09:30 +0100 Subject: correct spelling in readme --- keyboards/atreus62/keymaps/mneme/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/atreus62/keymaps/mneme/README.md b/keyboards/atreus62/keymaps/mneme/README.md index 3231a88d2..7bb5da9fc 100644 --- a/keyboards/atreus62/keymaps/mneme/README.md +++ b/keyboards/atreus62/keymaps/mneme/README.md @@ -1,6 +1,6 @@ -Mnemes Swedish Bonaza +Mnemes Swedish Bonanza ======================= My Layout in process, most of the code is shamelessly stolen from [algernons][algernon] excellent layout -- cgit v1.2.3 From 513286cf9873564879ee2e50e0e432429ee53a1e Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Sat, 11 Feb 2017 21:54:10 +0700 Subject: LSpace + RSpace = switch layer --- .../handwired/promethium/keymaps/priyadi/config.h | 2 + .../handwired/promethium/keymaps/priyadi/keymap.c | 91 +++++++++++++++++++++- 2 files changed, 92 insertions(+), 1 deletion(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/config.h b/keyboards/handwired/promethium/keymaps/priyadi/config.h index 36baedd48..53059ca7d 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/config.h +++ b/keyboards/handwired/promethium/keymaps/priyadi/config.h @@ -19,4 +19,6 @@ #define LAYOUT_NORMAN #define LAYOUT_WORKMAN +#define DOUBLESPACE_LAYER_ENABLE + #endif diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 2a21b4ba7..9fa038724 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -25,6 +25,13 @@ #define KC_RALT MT(MOD_RALT, KC_SLCK) bool capslock = false; +#ifdef DOUBLESPACE_LAYER_ENABLE +bool lspace_active = false; +bool rspace_active = false; +bool lspace_emitted = false; +bool rspace_emitted = false; +bool space_layer_entered = false; +#endif // glow enum glow_modes { @@ -55,6 +62,9 @@ enum layers { _SYS, }; +// double-space layer +#define _SPACE _GUI + enum planck_keycodes { // layouts QWERTY = SAFE_RANGE, @@ -77,6 +87,8 @@ enum planck_keycodes { OSX, // others + LSPACE, + RSPACE, GLOW, AUDIO }; @@ -504,7 +516,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_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, - KC_LCTL, KC_LALT, KC_LGUI, PUNC, NUM, KC_SPC, KC_SPC, FUNC, GREEK, KC_RGUI, KC_RALT, KC_RCTL + KC_LCTL, KC_LALT, KC_LGUI, PUNC, NUM, LSPACE, RSPACE, FUNC, GREEK, KC_RGUI, KC_RALT, KC_RCTL ), /* Dvorak @@ -745,7 +757,84 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool lshift = keyboard_report->mods & MOD_BIT(KC_LSFT); bool rshift = keyboard_report->mods & MOD_BIT(KC_RSFT); +#ifdef DOUBLESPACE_LAYER_ENABLE + // double-space: send space immediately if any other key depressed before space is released + if ((lspace_active ^ rspace_active) + && keycode != LSPACE + && keycode != RSPACE + && record->event.pressed) + { + if (lspace_active) { + if (!lspace_emitted) { + register_code(KC_SPC); + unregister_code(KC_SPC); + } + lspace_emitted = true; + } + if (rspace_active) { + if (!rspace_emitted) { + register_code(KC_SPC); + unregister_code(KC_SPC); + } + rspace_emitted = true; + } + } +#endif + switch (keycode) { + +#ifdef DOUBLESPACE_LAYER_ENABLE + // double-space enter space layer + case LSPACE: + if (record->event.pressed) { + lspace_active = true; + if (rspace_active) { + layer_on(_SPACE); + space_layer_entered = true; + } + } else { + lspace_active = false; + if (space_layer_entered) { + layer_off(_SPACE); + if (!rspace_active) { + space_layer_entered = false; + } + } else { + if (!lspace_emitted) { + register_code(KC_SPC); + unregister_code(KC_SPC); + } + lspace_emitted = false; + } + } + return false; + break; + case RSPACE: + if (record->event.pressed) { + rspace_active = true; + if (lspace_active) { + layer_on(_SPACE); + space_layer_entered = true; + } + } else { + rspace_active = false; + if (space_layer_entered) { + layer_off(_SPACE); + if (!lspace_active) { + space_layer_entered = false; + } + } else { + if (!rspace_emitted) { + register_code(KC_SPC); + unregister_code(KC_SPC); + } + rspace_emitted = false; + } + } + return false; + break; +#endif + // handle greek layer shift // handle both shift = capslock case KC_LSFT: -- cgit v1.2.3 From c6123b2e4a8472557c3a563d69662840dc3d0720 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Sat, 11 Feb 2017 22:03:34 +0700 Subject: Move X in number layer away from space --- keyboards/handwired/promethium/keymaps/priyadi/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 9fa038724..bfca58e37 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -635,7 +635,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, S(KC_A), KC_7, KC_8, KC_9, S(KC_D), KC_GRV, XXXXXXX, 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_1, KC_2, KC_3, S(KC_F), KC_COLN, - _______, _______, _______, _______, _______, _______, KC_X, KC_0, KC_COMM, KC_DOT, _______, _______ + _______, _______, _______, _______, _______, _______, _______, KC_0, KC_COMM, KC_DOT, KC_X, _______ ), /* Func -- cgit v1.2.3 From 4586b19be3058822474ba0b8035cc867a41154f9 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Sat, 11 Feb 2017 22:07:04 +0700 Subject: Turn off capslock when entering num layer --- keyboards/handwired/promethium/keymaps/priyadi/keymap.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index bfca58e37..8c24f381f 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -996,6 +996,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case NUM: if (record->event.pressed) { + turn_off_capslock(); layer_on(_NUM); } else { layer_off(_NUM); @@ -1096,6 +1097,13 @@ void led_set_user(uint8_t usb_led) { } } +void turn_off_capslock() { + if (capslock) { + register_code(KC_CAPS); + unregister_code(KC_CAPS); + } +} + void ps2_mouse_init_user() { uint8_t rcv; -- cgit v1.2.3 From 4c05e39a02a06644da6a5e65cbfce44e8626cfd2 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Sat, 11 Feb 2017 22:13:35 +0700 Subject: Switch to Emoji layer using Punc + greek --- .../handwired/promethium/keymaps/priyadi/keymap.c | 24 ++++------------------ 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 8c24f381f..9fa224bb5 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -878,22 +878,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; break; - // press both Supers to activate EMOJI layer - case KC_LGUI: - case KC_RGUI: - ; - bool lgui = keyboard_report->mods & MOD_BIT(KC_LGUI); - bool rgui = keyboard_report->mods & MOD_BIT(KC_RGUI); - if (record->event.pressed) { - if (lgui ^ rgui) { // if only one super was pressed - layer_on(_EMOJI); - } - } else { - layer_off(_EMOJI); - } - return true; - break; - // QWERTZ style comma and dot: semicolon and colon when shifted case KC_COMM: if (record->event.pressed) { @@ -968,10 +952,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case PUNC: if (record->event.pressed) { layer_on(_PUNC); - update_tri_layer(_PUNC, _GREEKL, _GUI); + update_tri_layer(_PUNC, _GREEKL, _EMOJI); } else { layer_off(_PUNC); - update_tri_layer(_PUNC, _GREEKL, _GUI); + update_tri_layer(_PUNC, _GREEKL, _EMOJI); } return false; break; @@ -984,12 +968,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } else { layer_on(_GREEKL); layer_off(_GREEKU); - update_tri_layer(_PUNC, _GREEKL, _GUI); + update_tri_layer(_PUNC, _GREEKL, _EMOJI); } } else { layer_off(_GREEKU); layer_off(_GREEKL); - update_tri_layer(_PUNC, _GREEKL, _GUI); + update_tri_layer(_PUNC, _GREEKL, _EMOJI); } return false; break; -- cgit v1.2.3 From 4163a3819ee4cdd49446da612a6ef3f74091ede1 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Sat, 11 Feb 2017 22:16:19 +0700 Subject: Add regular space to B+N on GUI layer for repeating space --- keyboards/handwired/promethium/keymaps/priyadi/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 9fa224bb5..1ad34612e 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -724,7 +724,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_GUI] = KEYMAP( 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, XXXXXXX, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, XXXXXXX, XXXXXXX, KC_WWWB, XXXXXXX, KC_WWWF, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, KC_SPC, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX ), -- cgit v1.2.3 From 5daa3a8836bd80deb00bbee1dd71ea09cdeebdba Mon Sep 17 00:00:00 2001 From: Marvin Ramin Date: Sat, 11 Feb 2017 16:46:13 +0100 Subject: add GON NerD --- keyboards/gonnerd/Makefile | 3 ++ keyboards/gonnerd/config.h | 43 ++++++++++++++++ keyboards/gonnerd/gonnerd.c | 1 + keyboards/gonnerd/gonnerd.h | 42 ++++++++++++++++ keyboards/gonnerd/keymaps/default/Makefile | 21 ++++++++ keyboards/gonnerd/keymaps/default/keymap.c | 16 ++++++ keyboards/gonnerd/keymaps/mauin/Makefile | 21 ++++++++ keyboards/gonnerd/keymaps/mauin/keymap.c | 78 ++++++++++++++++++++++++++++++ keyboards/gonnerd/keymaps/mauin/readme.md | 5 ++ keyboards/gonnerd/readme.md | 34 +++++++++++++ keyboards/gonnerd/rules.mk | 66 +++++++++++++++++++++++++ keyboards/readme.md | 1 + 12 files changed, 331 insertions(+) create mode 100644 keyboards/gonnerd/Makefile create mode 100644 keyboards/gonnerd/config.h create mode 100644 keyboards/gonnerd/gonnerd.c create mode 100644 keyboards/gonnerd/gonnerd.h create mode 100644 keyboards/gonnerd/keymaps/default/Makefile create mode 100644 keyboards/gonnerd/keymaps/default/keymap.c create mode 100644 keyboards/gonnerd/keymaps/mauin/Makefile create mode 100644 keyboards/gonnerd/keymaps/mauin/keymap.c create mode 100644 keyboards/gonnerd/keymaps/mauin/readme.md create mode 100644 keyboards/gonnerd/readme.md create mode 100644 keyboards/gonnerd/rules.mk diff --git a/keyboards/gonnerd/Makefile b/keyboards/gonnerd/Makefile new file mode 100644 index 000000000..57b2ef62e --- /dev/null +++ b/keyboards/gonnerd/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif diff --git a/keyboards/gonnerd/config.h b/keyboards/gonnerd/config.h new file mode 100644 index 000000000..cad8fe586 --- /dev/null +++ b/keyboards/gonnerd/config.h @@ -0,0 +1,43 @@ +#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 GON +#define PRODUCT NerD +#define DESCRIPTION QMK port for the GON Nerd PCB + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 9 + +/* backlight */ +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_LEVELS 3 + +/* matrix pins */ +#define MATRIX_ROW_PINS { B4, E2, F4, F7, F1, F6, C6, F5, D7, C7 } +#define MATRIX_COL_PINS { E6, B0, B1, B2, B3, F0, D0, D5, D1 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* 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)) \ +) + +#endif diff --git a/keyboards/gonnerd/gonnerd.c b/keyboards/gonnerd/gonnerd.c new file mode 100644 index 000000000..f25d3a85f --- /dev/null +++ b/keyboards/gonnerd/gonnerd.c @@ -0,0 +1 @@ +#include "gonnerd.h" diff --git a/keyboards/gonnerd/gonnerd.h b/keyboards/gonnerd/gonnerd.h new file mode 100644 index 000000000..e5070328e --- /dev/null +++ b/keyboards/gonnerd/gonnerd.h @@ -0,0 +1,42 @@ +#ifndef GONNERD_H +#define GONNERD_H + +#include "quantum.h" + +#define KEYMAP_TKL( \ + K08, K09, K18, K19, K28, K29, K38, K39, K48, K49, K58, K59, K68, K69, K88, K89, \ + K00, K01, K10, K11, K20, K21, K30, K31, K40, K41, K50, K51, K60, K61, K80, K81, K84, \ + K02, K03, K12, K13, K22, K23, K32, K33, K42, K43, K52, K53, K62, K63, K82, K83, K85, \ + K04, K14, K15, K24, K25, K34, K35, K44, K45, K54, K55, K64, K71, K65, \ + K07, K79, K16, K17, K26, K27, K36, K37, K46, K47, K56, K57, K66, K67, K86, \ + K06, K05, K78, K70, K72, K73, K74, K75, K76, K77, K87 \ +) \ +{ \ + { K00, K10, K20, K30, K40, K50, K60, K70, K80 }, \ + { K01, K11, K21, K31, K41, K51, K61, K71, K81 }, \ + { K02, K12, K22, K32, K42, K52, K62, K72, K82 }, \ + { K03, K13, K23, K33, K43, K53, K63, K73, K83 }, \ + { K04, K14, K24, K34, K44, K54, K64, K74, K84 }, \ + { K05, K15, K25, K35, K45, K55, K65, K75, K85 }, \ + { K06, K16, K26, K36, K46, K56, K66, K76, K86 }, \ + { K07, K17, K27, K37, K47, K57, K67, K77, K87 }, \ + { K08, K18, K28, K38, K48, K58, K68, K78, K88 }, \ + { K09, K19, K29, K39, K49, K59, K69, K79, K89 } \ +} + +#define KEYMAP_60( \ + K08, K01, K10, K11, K20, K21, K30, K31, K40, K41, K50, K51, K60, K61, \ + K02, K03, K12, K13, K22, K23, K32, K33, K42, K43, K52, K53, K62, K63, \ + K04, K14, K15, K24, K25, K34, K35, K44, K45, K54, K55, K64, K71, K65, \ + K07, K79, K16, K17, K26, K27, K36, K37, K46, K47, K56, K57, K66, K67, \ + K06, K05, K78, K70, K72, K73, K74, K75 \ +) KEYMAP_TKL( \ + K08, 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, K01, K10, K11, K20, K21, K30, K31, K40, K41, K50, K51, K60, K61, KC_NO, KC_NO, KC_NO, \ + K02, K03, K12, K13, K22, K23, K32, K33, K42, K43, K52, K53, K62, K63, KC_NO, KC_NO, KC_NO, \ + K04, K14, K15, K24, K25, K34, K35, K44, K45, K54, K55, K64, K71, K65, \ + K07, K79, K16, K17, K26, K27, K36, K37, K46, K47, K56, K57, K66, K67, KC_NO, \ + K06, K05, K78, K70, K72, K73, K74, K75, KC_NO, KC_NO, KC_NO \ +) + +#endif diff --git a/keyboards/gonnerd/keymaps/default/Makefile b/keyboards/gonnerd/keymaps/default/Makefile new file mode 100644 index 000000000..772d7aee3 --- /dev/null +++ b/keyboards/gonnerd/keymaps/default/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 = no # 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/default/keymap.c b/keyboards/gonnerd/keymaps/default/keymap.c new file mode 100644 index 000000000..a37005939 --- /dev/null +++ b/keyboards/gonnerd/keymaps/default/keymap.c @@ -0,0 +1,16 @@ +#include "gonnerd.h" + +// Keymap layers + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = KEYMAP_60( /* Base */ + KC_ESC, 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_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_LCTL,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_RSFT,KC_NO, \ + KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,MO(1), KC_RCTL), +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; diff --git a/keyboards/gonnerd/keymaps/mauin/Makefile b/keyboards/gonnerd/keymaps/mauin/Makefile new file mode 100644 index 000000000..772d7aee3 --- /dev/null +++ b/keyboards/gonnerd/keymaps/mauin/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 = no # 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/mauin/keymap.c b/keyboards/gonnerd/keymaps/mauin/keymap.c new file mode 100644 index 000000000..1a1d515a9 --- /dev/null +++ b/keyboards/gonnerd/keymaps/mauin/keymap.c @@ -0,0 +1,78 @@ +#include "gonnerd.h" + +// Keymap layers +#define BASE_LAYER 0 +#define FUNCTION_LAYER 1 +#define SYSTEM_LAYER 2 + +// Key aliases +#define __x__ KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Layer 0: Default Layer + * ,-----------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| = | BSp | + * |-----------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| + * |-----------------------------------------------------------| + * |Funct | A| S| D| F| G| H| J| K| L| ;| '|Enter | + * |-----------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /| Shift | + * |-----------------------------------------------------------' + * | Ctl|Alt|Gui | Space |Gui |Alt| F2| Ctl | + * `-----------------------------------------------------------' + */ + [BASE_LAYER] = KEYMAP_60( + KC_ESC, 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_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, \ + MO(1), 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_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, MO(3), KC_RCTL \ + ), + + /* Layer 1: Function Layer + * ,-----------------------------------------------------------. + * | | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11| F12| Del | + * |-----------------------------------------------------------| + * | |Prv|Ply|Nxt| | |Pg^|Hme|Up |End| |Br-|Br+| | + * |-----------------------------------------------------------| + * |Hold |Mte|Vl-|Vl+| | |Pgv|Lft|Dwn|Rgt| | | | + * |-----------------------------------------------------------| + * | | | | | | | | | | | | | + * |-----------------------------------------------------------' + * | | | | | | | | | + * `-----------------------------------------------------------' + */ + [FUNCTION_LAYER] = KEYMAP_60( + 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_DEL, \ + __x__, KC_MPRV, KC_MPLY, KC_MNXT, __x__, __x__, KC_PGUP, KC_HOME, KC_UP, KC_END, __x__, KC_SLCK, KC_PAUS, __x__, \ + KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, __x__, __x__, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, __x__, __x__, __x__, __x__, \ + KC_LSFT, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \ + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, __x__, __x__, __x__, __x__ \ + ), + + /* Layer 2: System Layer + * ,-----------------------------------------------------------. + * |Reset| | | | | | | | | | | | | | + * |-----------------------------------------------------------| + * | | | | | | | | | | | | | | | + * |-----------------------------------------------------------| + * | | | | | | | | | | | | | | + * |-----------------------------------------------------------| + * | | | | | | | | | | | | | + * |-----------------------------------------------------------' + * | | | | | | | | | + * `-----------------------------------------------------------' + */ + [SYSTEM_LAYER] = KEYMAP_60( + 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__, KC_TRNS, __x__ \ + ), +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; diff --git a/keyboards/gonnerd/keymaps/mauin/readme.md b/keyboards/gonnerd/keymaps/mauin/readme.md new file mode 100644 index 000000000..63be7c392 --- /dev/null +++ b/keyboards/gonnerd/keymaps/mauin/readme.md @@ -0,0 +1,5 @@ +# Mauin's keymap for the GON NerD + +This layout is based on a Pok3r style layout with a standard base layer. + +Function layers provide access to navigation and media keys. diff --git a/keyboards/gonnerd/readme.md b/keyboards/gonnerd/readme.md new file mode 100644 index 000000000..1224ff6b0 --- /dev/null +++ b/keyboards/gonnerd/readme.md @@ -0,0 +1,34 @@ +GON NerD keyboard firmware +====================== + +## Changing Bootloader + +It's not possible to simply flash this firmware on the GON NerD keyboard as the original bootloader does not support DFU connections. + +It is possible to change the bootloader of the GON NerD with an ISP programmer. A guide on how to change the bootloader on your GON NerD can be found here: +[Converting NerD60 to TMK](https://deskthority.net/wiki/Converting_NerD60_to_TMK). After changing the bootloader you can flash your QMK keymap onto the keyboard. + +_After changing the bootloader on your GON NerD PCB you will not be able to go back to the original firmware and the official configuration software will +not work anymore. You will lose your warranty and official support from GON!_ + +## Building + +Download or clone the whole firmware and navigate to the keyboards/gonnerd folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. + +Depending on which keymap you would like to use, you will have to compile slightly differently. + +### Default + +To build with the default keymap, simply run `make default`. + +### Other Keymaps + +Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files. + +To build the firmware binary hex file with a keymap just do `make` with a keymap like this: + +``` +$ make [default|jack|] +``` + +Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. diff --git a/keyboards/gonnerd/rules.mk b/keyboards/gonnerd/rules.mk new file mode 100644 index 000000000..c9b584d54 --- /dev/null +++ b/keyboards/gonnerd/rules.mk @@ -0,0 +1,66 @@ +# MCU name +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 = 8000000 + + +# +# 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 ?= yes # 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 ?= no # USB Nkey Rollover +BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality on B7 by default +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 diff --git a/keyboards/readme.md b/keyboards/readme.md index d2f41ad7e..5b7b28207 100644 --- a/keyboards/readme.md +++ b/keyboards/readme.md @@ -39,6 +39,7 @@ These keyboards are part of the QMK repository, but their manufacturers are not * [Bantam44](/keyboards/bantam44) — It is a 44-key 40% staggered keyboard. * [Ergodox Infinity](/keyboards/ergodox) - Ergonomic Split Keyboard by Input Club. * [GH60](/keyboards/gh60) — A 60% Geekhack community-driven project. +* [GON NerD](/keyboards/gonnerd) — Korean custom 60% PCB * [Happy Hacking Keyboard](/keyboards/hhkb) — The Happy Hacking keyboard can be hacked with a custom controller to run QMK. * [Infinity 60%](/keyboards/infinity60) - — Compact community keyboard by Input Club. * [JD45](/keyboards/jd45) — Another Geekhack community project, designed by jdcarpe. -- cgit v1.2.3 From bfc33a56d7f69d1e75d72d88a6df3fdc16f3dafb Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Sat, 11 Feb 2017 11:39:57 -0500 Subject: don't try to build the readme --- util/travis_build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/travis_build.sh b/util/travis_build.sh index 2d43f3e5e..6bafd1941 100644 --- a/util/travis_build.sh +++ b/util/travis_build.sh @@ -11,7 +11,7 @@ if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then make all-keyboards AUTOGEN="true" : $((exit_code = $exit_code + $?)) else - MKB=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -oP '(?<=keyboards\/)([a-zA-Z0-9_]+)' | sort -u) + MKB=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -oP '(?<=keyboards\/)([a-zA-Z0-9_]+)(?=\/)' | sort -u) for KB in $MKB ; do echo "Making all keymaps for $KB" make "$KB" AUTOGEN=true -- cgit v1.2.3 From 89d3ff8f184cd2ed48f2174a113f4270c4a933a8 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Sun, 12 Feb 2017 00:00:01 +0700 Subject: Some space optimization and housekeeping --- .../handwired/promethium/keymaps/priyadi/keymap.c | 74 +++++++++------------- 1 file changed, 30 insertions(+), 44 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 1ad34612e..e35e42488 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -41,6 +41,7 @@ enum glow_modes { }; uint8_t glow_mode = GLOW_MIN; +void turn_off_capslock(void); extern keymap_config_t keymap_config; enum layers { @@ -49,6 +50,7 @@ enum layers { _COLEMAK, _WORKMAN, _NORMAN, + _DEFAULT_LAYER_MAX = _NORMAN, _PUNC, _NUM, @@ -444,7 +446,7 @@ void led_set_layer_indicator(void) { oldlayer = layer; - if (layer <= _NORMAN) { + if (layer <= _DEFAULT_LAYER_MAX) { rgbsps_send(); return; } @@ -461,7 +463,7 @@ void led_set_layer_indicator(void) { break; default: rgbsps_set(LED_IND_FUNC, 3, 3, 3); - rgbsps_set(LED_IND_NUM, 3, 3, 3); + // rgbsps_set(LED_IND_NUM, 3, 3, 3); rgbsps_set(LED_IND_EMOJI, 3, 3, 3); } @@ -753,6 +755,30 @@ void persistant_default_layer_set(uint16_t default_layer) { default_layer_set(default_layer); } +void process_doublespace(bool pressed, bool *isactive, bool *otheractive, bool *isemitted) { + if (pressed) { + *isactive = true; + if (*otheractive) { + layer_on(_SPACE); + space_layer_entered = true; + } + } else { + *isactive = false; + if (space_layer_entered) { + layer_off(_SPACE); + if (!*otheractive) { + space_layer_entered = false; + } + } else { + if (!*isemitted) { + register_code(KC_SPC); + unregister_code(KC_SPC); + } + *isemitted = false; + } + } +} + bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool lshift = keyboard_report->mods & MOD_BIT(KC_LSFT); bool rshift = keyboard_report->mods & MOD_BIT(KC_RSFT); @@ -786,51 +812,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #ifdef DOUBLESPACE_LAYER_ENABLE // double-space enter space layer case LSPACE: - if (record->event.pressed) { - lspace_active = true; - if (rspace_active) { - layer_on(_SPACE); - space_layer_entered = true; - } - } else { - lspace_active = false; - if (space_layer_entered) { - layer_off(_SPACE); - if (!rspace_active) { - space_layer_entered = false; - } - } else { - if (!lspace_emitted) { - register_code(KC_SPC); - unregister_code(KC_SPC); - } - lspace_emitted = false; - } - } + process_doublespace(record->event.pressed, &lspace_active, &rspace_active, &lspace_emitted); return false; break; case RSPACE: - if (record->event.pressed) { - rspace_active = true; - if (lspace_active) { - layer_on(_SPACE); - space_layer_entered = true; - } - } else { - rspace_active = false; - if (space_layer_entered) { - layer_off(_SPACE); - if (!lspace_active) { - space_layer_entered = false; - } - } else { - if (!rspace_emitted) { - register_code(KC_SPC); - unregister_code(KC_SPC); - } - rspace_emitted = false; - } - } + process_doublespace(record->event.pressed, &rspace_active, &lspace_active, &rspace_emitted); return false; break; #endif -- cgit v1.2.3 From 2c1ef84b226c21d11e54d93cf76d8aa356cb725a Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Sun, 12 Feb 2017 00:02:36 +0700 Subject: Workaround to remove warning --- keyboards/handwired/promethium/keymaps/priyadi/config.h | 2 ++ keyboards/handwired/promethium/promethium.h | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/config.h b/keyboards/handwired/promethium/keymaps/priyadi/config.h index 53059ca7d..6c9d2195e 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/config.h +++ b/keyboards/handwired/promethium/keymaps/priyadi/config.h @@ -14,6 +14,8 @@ #define RGB_DI_PIN B5 #define RGBSPS_NUM 57 +#define UNICODE_TYPE_DELAY 0 + #define LAYOUT_DVORAK #define LAYOUT_COLEMAK #define LAYOUT_NORMAN diff --git a/keyboards/handwired/promethium/promethium.h b/keyboards/handwired/promethium/promethium.h index da37e5c56..d6fea76ce 100644 --- a/keyboards/handwired/promethium/promethium.h +++ b/keyboards/handwired/promethium/promethium.h @@ -4,7 +4,6 @@ #include "quantum.h" #define PS2_INIT_DELAY 2000 -#define UNICODE_TYPE_DELAY 0 #define BATTERY_PIN 9 #define BATTERY_POLL 30000 #define MAX_VOLTAGE 4.2 -- cgit v1.2.3 From ce6b68f85b1e09a3912fb395ed4d6b35bb0f065d Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Sun, 12 Feb 2017 00:07:33 +0700 Subject: Remove assignment warning --- keyboards/handwired/promethium/keymaps/priyadi/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index e35e42488..52b186c40 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -1058,7 +1058,7 @@ void battery_poll(uint8_t level) { void led_set_user(uint8_t usb_led) { bool new_capslock = usb_led & (1< Date: Sun, 12 Feb 2017 00:13:36 +0700 Subject: Supress warnings from ps2_mouse.h --- tmk_core/protocol/ps2_mouse.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tmk_core/protocol/ps2_mouse.h b/tmk_core/protocol/ps2_mouse.h index 3c93a4634..eeeffe4d8 100644 --- a/tmk_core/protocol/ps2_mouse.h +++ b/tmk_core/protocol/ps2_mouse.h @@ -23,7 +23,7 @@ along with this program. If not, see . #define PS2_MOUSE_SEND(command, message) \ do { \ - uint8_t rcv = ps2_host_send(command); \ + __attribute__ ((unused)) uint8_t rcv = ps2_host_send(command); \ if (debug_mouse) { \ print((message)); \ xprintf(" command: %X, result: %X, error: %X \n", command, rcv, ps2_error); \ @@ -55,13 +55,14 @@ do { \ #define PS2_MOUSE_RECEIVE(message) \ do { \ - uint8_t rcv = ps2_host_recv_response(); \ + __attribute__ ((unused)) uint8_t rcv = ps2_host_recv_response(); \ if (debug_mouse) { \ print((message)); \ xprintf(" result: %X, error: %X \n", rcv, ps2_error); \ } \ } while(0) +__attribute__ ((unused)) static enum ps2_mouse_mode_e { PS2_MOUSE_STREAM_MODE, PS2_MOUSE_REMOTE_MODE, -- cgit v1.2.3 From 1b7439bfb1891d3ec7983649719d917af15aacf9 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Sun, 12 Feb 2017 00:20:47 +0700 Subject: Forgot to add ifdef to optional feature --- keyboards/handwired/promethium/keymaps/priyadi/keymap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 52b186c40..a24a79aa1 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -755,6 +755,7 @@ void persistant_default_layer_set(uint16_t default_layer) { default_layer_set(default_layer); } +#ifdef DOUBLESPACE_LAYER_ENABLE void process_doublespace(bool pressed, bool *isactive, bool *otheractive, bool *isemitted) { if (pressed) { *isactive = true; @@ -778,6 +779,7 @@ void process_doublespace(bool pressed, bool *isactive, bool *otheractive, bool * } } } +#endif bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool lshift = keyboard_report->mods & MOD_BIT(KC_LSFT); -- cgit v1.2.3 From bc1308c112ebdd2089b36d7d3289308301bd6832 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Sun, 12 Feb 2017 05:04:14 +0700 Subject: Update my Planck layout --- keyboards/planck/keymaps/priyadi/keymap.c | 516 +++++++++++++++++++++--------- 1 file changed, 365 insertions(+), 151 deletions(-) diff --git a/keyboards/planck/keymaps/priyadi/keymap.c b/keyboards/planck/keymaps/priyadi/keymap.c index 2e979221a..80e867621 100644 --- a/keyboards/planck/keymaps/priyadi/keymap.c +++ b/keyboards/planck/keymaps/priyadi/keymap.c @@ -10,29 +10,76 @@ #include "eeconfig.h" #include "process_unicode.h" #include "quantum.h" - // #define TOLELOT_ENABLE +#define DOUBLESPACE_LAYER_ENABLE + +// so i can copy & paste stuff from my other planck-like keyboards +#define KEYMAP( \ + 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, \ + k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c \ +) \ +{ \ + {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}, \ + {k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c} \ +} +// Fillers to make layering clearer +#define _______ KC_TRNS +#define XXXXXXX KC_NO +#define G(x) LGUI(x) +#define KC_WWWB KC_WWW_BACK +#define KC_WWWF KC_WWW_FORWARD + +// hybrid right-alt & scroll lock (mapped to Compose in OS) +#undef KC_RALT +#define KC_RALT MT(MOD_RALT, KC_SLCK) + +bool capslock = false; +#ifdef DOUBLESPACE_LAYER_ENABLE +bool lspace_active = false; +bool rspace_active = false; +bool lspace_emitted = false; +bool rspace_emitted = false; +bool space_layer_entered = false; +#endif + +void turn_off_capslock(void); extern keymap_config_t keymap_config; enum layers { _QWERTY, + _DVORAK, _COLEMAK, _WORKMAN, + _NORMAN, + _DEFAULT_LAYER_MAX = _NORMAN, + _PUNC, _NUM, _FUNC, - _EMOJI, + _GREEKU, _GREEKL, + + _EMOJI, _GUI, + _SYS, }; +// double-space layer +#define _SPACE _GUI + enum planck_keycodes { // layouts QWERTY = SAFE_RANGE, + DVORAK, COLEMAK, WORKMAN, + NORMAN, // layer switchers PUNC, @@ -46,12 +93,16 @@ enum planck_keycodes { LINUX, WIN, OSX, -}; -// Fillers to make layering clearer + // others + LSPACE, + RSPACE, + GLOW, + AUDIO, -#define _______ KC_TRNS -#define XXXXXXX KC_NO + // stubs + OUT_BLE +}; // unicode map @@ -259,18 +310,6 @@ const uint32_t PROGMEM unicode_map[] = { [FSIGM] = 0x03C2, }; - -// hybrid shift - = -// #undef KC_LSFT -// #define KC_LSFT MT(MOD_LSFT, KC_MINS) -// #undef KC_RSFT -// #define KC_RSFT MT(MOD_LSFT, KC_EQL) - - -// hybrid right-gui & scroll lock (mapped to Compose in OS) -#undef KC_RCTL -#define KC_RCTL MT(MOD_LCTL, KC_SLCK) - // keymaps const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -279,127 +318,138 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | S | D | F | G | H | J | K | L | ; |Enter | + * | Esc | A | S | D | F | G | H | J | K | L | ' |Enter | * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| Z | X | C | V | B | N | M | , | . | / |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | GUI | Alt | Punc | Num | Space | Func |Emoji |Greek |AltGr | Ctrl | + * | Ctrl | Alt | GUI | Punc | Num | Space | Func |Greek | GUI |AltGr | Ctrl | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = { - {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, - {KC_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}, - {KC_LCTL, KC_LALT, KC_LGUI, PUNC, NUM, KC_SPC, KC_SPC, FUNC, EMOJI, GREEK, KC_RALT, KC_RCTL} -}, - -/* Colemak +[_QWERTY] = KEYMAP( + 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, + KC_LCTL, KC_LALT, KC_LGUI, PUNC, NUM, LSPACE, RSPACE, FUNC, GREEK, KC_RGUI, KC_RALT, KC_RCTL +), + +/* Dvorak * ,-----------------------------------------------------------------------------------. - * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * | Tab | ' | , | . | P | Y | F | G | C | R | L | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | R | S | T | D | H | N | E | I | O |Enter | + * | Esc | A | O | E | U | I | D | H | T | N | S |Enter | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | K | M | , | . | / |Shift | + * | Shift| / | Q | J | K | X | B | M | W | V | Z |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | GUI | Alt | Punc | Num | Space | Func |Emoji |AltGr | GUI | Ctrl | + * | Ctrl | Alt | GUI | Punc | Num | Space | Func |Greek | GUI |AltGr | Ctrl | * `-----------------------------------------------------------------------------------' */ -[_COLEMAK] = { - {_______, 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, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, +#ifdef LAYOUT_DVORAK +[_DVORAK] = KEYMAP( + _______, 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, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), +#endif -/* Workman +/* Colemak * ,-----------------------------------------------------------------------------------. - * | Tab | Q | D | R | W | B | J | F | U | P | ; | Bksp | + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | S | H | T | G | Y | N | E | O | I |Enter | + * | Esc | A | R | S | T | D | H | N | E | I | O |Enter | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | M | C | V | K | K | , | . | / |Shift | + * | Shift| Z | X | C | V | B | K | M | , | . | / |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | GUI | Alt | Punc | Num | Space | Func |Emoji |AltGr | GUI | Ctrl | + * | Ctrl | Alt | GUI | Punc | Num | Space | Func |Greek | GUI |AltGr | Ctrl | * `-----------------------------------------------------------------------------------' */ -[_WORKMAN] = { - {_______, 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, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, -/* Uppercase Greek +#ifdef LAYOUT_COLEMAK +[_COLEMAK] = KEYMAP( + _______, 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, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), +#endif + +/* Norman * ,-----------------------------------------------------------------------------------. - * | | | | | | | | | | | | | + * | Tab | Q | W | D | F | K | J | U | R | L | ; | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | + * | Esc | A | S | E | T | G | Y | N | I | O | H |Enter | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | P | M | , | . | / |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | + * | Ctrl | Alt | GUI | Punc | Num | Space | Func |Greek | GUI |AltGr | Ctrl | * `-----------------------------------------------------------------------------------' */ -[_GREEKU] = { - {_______, _______, _______,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), _______, _______}, - {_______,X(UZETA), X(UCHI), X(UPSI),X(UOMEG),X(UBETA), X(UNU), X(UMU), _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, -/* Lowercase Greek +#ifdef LAYOUT_NORMAN +[_NORMAN] = KEYMAP( + _______, 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, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), +#endif + +/* Workman * ,-----------------------------------------------------------------------------------. - * | | | | | | | | | | | | | + * | Tab | Q | D | R | W | B | J | F | U | P | ; | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | + * | Esc | A | S | H | T | G | Y | N | E | O | I |Enter | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | M | C | V | K | K | , | . | / |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | + * | Ctrl | Alt | GUI | Punc | Num | Space | Func |Greek | GUI |AltGr | Ctrl | * `-----------------------------------------------------------------------------------' */ -[_GREEKL] = { - {_______, _______,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), _______, _______}, - {_______,X(LZETA), X(LCHI), X(LPSI),X(LOMEG),X(LBETA), X(LNU), X(LMU), _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, + +#ifdef LAYOUT_WORKMAN +[_WORKMAN] = KEYMAP( + _______, 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, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), +#endif /* Punc * ,-----------------------------------------------------------------------------------. * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | ` | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | \ | - | = | < | > | ( | ) | ' | | | + * | | * | \ | - | = | / | | ( | ) | < | > | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | _ | + | { | } | [ | ] | " | | | + * | & | ^ | | | _ | + | ? | | [ | ] | { | } | : | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_PUNC] = { - {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_GRV }, - {XXXXXXX, XXXXXXX, KC_BSLS, KC_MINS, KC_EQL, KC_LABK, KC_RABK, KC_LPRN, KC_RPRN, KC_QUOT, XXXXXXX, XXXXXXX}, - {XXXXXXX, XXXXXXX, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, KC_DQUO, XXXXXXX, XXXXXXX}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, +[_PUNC] = KEYMAP( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_GRV , + XXXXXXX, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, XXXXXXX, KC_LPRN, KC_RPRN, KC_LABK, KC_RABK, XXXXXXX, + KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, XXXXXXX, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_COLN, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), /* Num * ,-----------------------------------------------------------------------------------. - * | ^ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * | ~ | ! | @ | # | $ | % | A | 7 | 8 | 9 | D | ` | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | @ | A | B | C | ( | ) | 4 | 5 | 6 | : |Enter | + * | | * | \ | - | = | / | B | 4 | 5 | 6 | E | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | & | # | D | E | F | [ | ] | 1 | 2 | 3 | / | * | + * | & | ^ | | | _ | + | ? | C | 1 | 2 | 3 | F | : | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | x | | | 0 | , | . | + | - | + * | | | | | | | x | 0 | , | . | | | * `-----------------------------------------------------------------------------------' */ -[_NUM] = { - {KC_CIRC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, - { KC_ESC, KC_AT, S(KC_A), S(KC_B), S(KC_C), KC_LPRN, KC_RPRN, KC_4, KC_5, KC_6, KC_COLN, KC_ENT}, - {KC_AMPR, KC_HASH, S(KC_D), S(KC_E), S(KC_F), KC_LBRC, KC_RBRC, KC_1, KC_2, KC_3, KC_SLSH, KC_ASTR}, - {_______, _______, _______, KC_X, _______, KC_SPC, KC_SPC, KC_0, KC_COMM, KC_DOT, KC_PLUS, KC_MINS} -}, +[_NUM] = KEYMAP( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, S(KC_A), KC_7, KC_8, KC_9, S(KC_D), KC_GRV, + XXXXXXX, 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_1, KC_2, KC_3, S(KC_F), KC_COLN, + _______, _______, _______, _______, _______, _______, _______, KC_0, KC_COMM, KC_DOT, KC_X, _______ +), /* Func * ,-----------------------------------------------------------------------------------. @@ -412,12 +462,48 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_FUNC] = { - {XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, KC_DEL}, - {XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8,KC_PSCREEN,XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_INS}, - {_______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_END, XXXXXXX, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, +[_FUNC] = KEYMAP( + XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, KC_DEL, + XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8,KC_PSCREEN,XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_INS, + _______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_END, XXXXXXX, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* Uppercase Greek + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_GREEKU] = KEYMAP( + _______, _______, _______,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), _______, _______, + _______,X(UZETA), X(UCHI), X(UPSI),X(UOMEG),X(UBETA), X(UNU), X(UMU), _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* Lowercase Greek + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_GREEKL] = KEYMAP( + _______, _______,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), _______, _______, + _______,X(LZETA), X(LCHI), X(LPSI),X(LOMEG),X(LBETA), X(LNU), X(LMU), _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), /* Emoji * ,-----------------------------------------------------------------------------------. @@ -430,30 +516,48 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_EMOJI] = { - {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)}, - { X(POO), X(EYES),X(HUNRD), _______,X(SKULL),X(HORNS), X(HALO), X(FEAR), _______,X(YUMMY),X(DISAP),X(NOEVK)} -}, +[_EMOJI] = KEYMAP( + 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), + X(POO), X(EYES), _______,X(HUNRD), X(SKULL),X(HORNS), X(HALO), X(FEAR),X(YUMMY),_______,X(DISAP),X(NOEVK) +), /* GUI * ,-----------------------------------------------------------------------------------. * | | D1 | D2 | D3 | D4 | D5 | D6 | D7 | D8 | D9 | D10 | | * |------+------+------+------+------+-------------+------+------+------+------+------| - * |Linux | | Vol- | Mute | Vol+ | | | D- | | D+ | |Qwerty| + * | | | Vol- | Mute | Vol+ | | | Prev | | Next | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Win | | Prev | Play | Next | | | | | | |Colmak| + * | | | Prev | Play | Next | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | OSX | | | | | BL- | BL+ | | | | |Workmn| + * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_GUI] = { - {_______, LGUI(KC_1),LGUI(KC_2),LGUI(KC_3),LGUI(KC_4),LGUI(KC_5),LGUI(KC_6),LGUI(KC_7),LGUI(KC_8),LGUI(KC_9),LGUI(KC_0), _______}, - { LINUX, _______, KC_VOLD, KC_MUTE, KC_VOLU,_______,_______,KC_WWW_BACK,_______,KC_WWW_FORWARD,_______, QWERTY}, - { WIN, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, _______, COLEMAK}, - { OSX, _______, _______, _______, _______, BL_DEC, BL_INC, _______, _______, _______, _______, WORKMAN} -}, +[_GUI] = KEYMAP( + 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, + XXXXXXX, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, XXXXXXX, XXXXXXX, KC_WWWB, XXXXXXX, KC_WWWF, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, KC_SPC, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX +), + +/* Sys + * ,-----------------------------------------------------------------------------------. + * | |Qwerty| Win | |Reset | | | USB | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | |Audio | |Dvorak| | Glow | | |WorkMn|Linux | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | |Colmak| | BLE |Norman|MacOS | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_SYS] = KEYMAP( + XXXXXXX, QWERTY, WIN, XXXXXXX, RESET, XXXXXXX, XXXXXXX, OUT_USB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, AUDIO, XXXXXXX, DVORAK, XXXXXXX, GLOW, XXXXXXX, XXXXXXX, WORKMAN, LINUX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, COLEMAK, XXXXXXX, OUT_BLE, NORMAN, OSX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______ +), }; @@ -476,6 +580,32 @@ void persistant_default_layer_set(uint16_t default_layer) { default_layer_set(default_layer); } +#ifdef DOUBLESPACE_LAYER_ENABLE +void process_doublespace(bool pressed, bool *isactive, bool *otheractive, bool *isemitted) { + if (pressed) { + *isactive = true; + if (*otheractive) { + layer_on(_SPACE); + space_layer_entered = true; + } + } else { + *isactive = false; + if (space_layer_entered) { + layer_off(_SPACE); + if (!*otheractive) { + space_layer_entered = false; + } + } else { + if (!*isemitted) { + register_code(KC_SPC); + unregister_code(KC_SPC); + } + *isemitted = false; + } + } +} +#endif + bool process_record_user(uint16_t keycode, keyrecord_t *record) { // faux clicky // if (record->event.pressed) PLAY_NOTE_ARRAY(tone_click, false, 0); @@ -493,27 +623,49 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #endif #endif - bool lshifted = keyboard_report->mods & MOD_BIT(KC_LSFT); - bool rshifted = keyboard_report->mods & MOD_BIT(KC_RSFT); + bool lshift = keyboard_report->mods & MOD_BIT(KC_LSFT); + bool rshift = keyboard_report->mods & MOD_BIT(KC_RSFT); + +#ifdef DOUBLESPACE_LAYER_ENABLE + // double-space: send space immediately if any other key depressed before space is released + if ((lspace_active ^ rspace_active) + && keycode != LSPACE + && keycode != RSPACE + && record->event.pressed) + { + if (lspace_active) { + if (!lspace_emitted) { + register_code(KC_SPC); + unregister_code(KC_SPC); + } + lspace_emitted = true; + } + if (rspace_active) { + if (!rspace_emitted) { + register_code(KC_SPC); + unregister_code(KC_SPC); + } + rspace_emitted = true; + } + } +#endif switch (keycode) { - // Greek layer handling - case GREEK: - if (record->event.pressed) { - if (lshifted || rshifted) { - layer_on(_GREEKU); - layer_off(_GREEKL); - } else { - layer_on(_GREEKL); - layer_off(_GREEKU); - } - } else { - layer_off(_GREEKU); - layer_off(_GREEKL); - } + +#ifdef DOUBLESPACE_LAYER_ENABLE + // double-space enter space layer + case LSPACE: + process_doublespace(record->event.pressed, &lspace_active, &rspace_active, &lspace_emitted); + return false; + break; + case RSPACE: + process_doublespace(record->event.pressed, &rspace_active, &lspace_active, &rspace_emitted); return false; break; +#endif + // handle greek layer shift + // handle both shift = capslock case KC_LSFT: case KC_RSFT: ; @@ -523,11 +675,34 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { layer_on(_GREEKU); layer_off(_GREEKL); } else { - if (lshifted ^ rshifted) { // if only one shift is pressed + if (lshift ^ rshift) { // if only one shift was pressed layer_on(_GREEKL); layer_off(_GREEKU); } } + } else { + if (record->event.pressed) { + if (lshift ^ rshift) { // if only one shift was pressed + register_code(KC_CAPS); + unregister_code(KC_CAPS); + } + } + } + return true; + break; + + // press both ctrls to activate SYS layer + case KC_LCTL: + case KC_RCTL: + ; + bool lctrl = keyboard_report->mods & MOD_BIT(KC_LCTL); + bool rctrl = keyboard_report->mods & MOD_BIT(KC_RCTL); + if (record->event.pressed) { + if (lctrl ^ rctrl) { // if only one ctrl was pressed + layer_on(_SYS); + } + } else { + layer_off(_SYS); } return true; break; @@ -535,13 +710,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // QWERTZ style comma and dot: semicolon and colon when shifted case KC_COMM: if (record->event.pressed) { - if (lshifted || rshifted) { - if (lshifted) unregister_code(KC_LSFT); - if (rshifted) unregister_code(KC_RSFT); + if (lshift || rshift) { + if (lshift) unregister_code(KC_LSFT); + if (rshift) unregister_code(KC_RSFT); register_code(KC_SCLN); unregister_code(KC_SCLN); - if (lshifted) register_code(KC_LSFT); - if (rshifted) register_code(KC_RSFT); + if (lshift) register_code(KC_LSFT); + if (rshift) register_code(KC_RSFT); } else { register_code(KC_COMM); unregister_code(KC_COMM); @@ -565,53 +740,73 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // layout switcher case QWERTY: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); - #endif persistant_default_layer_set(1UL<<_QWERTY); } return false; break; +#ifdef LAYOUT_DVORAK + case DVORAK: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_DVORAK); + } + return false; + break; +#endif +#ifdef LAYOUT_COLEMAK case COLEMAK: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); - #endif persistant_default_layer_set(1UL<<_COLEMAK); } return false; break; +#endif +#ifdef LAYOUT_WORKMAN case WORKMAN: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_workman, false, 0); - #endif persistant_default_layer_set(1UL<<_WORKMAN); } return false; break; +#endif +#ifdef LAYOUT_NORMAN + case NORMAN: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_NORMAN); + } + return false; + break; +#endif // layer switchers case PUNC: if (record->event.pressed) { layer_on(_PUNC); - update_tri_layer(_PUNC, _EMOJI, _GUI); + update_tri_layer(_PUNC, _GREEKL, _EMOJI); } else { layer_off(_PUNC); - update_tri_layer(_PUNC, _EMOJI, _GUI); + update_tri_layer(_PUNC, _GREEKL, _EMOJI); } return false; break; - case EMOJI: + + case GREEK: if (record->event.pressed) { - layer_on(_EMOJI); - update_tri_layer(_PUNC, _EMOJI, _GUI); + if (lshift || rshift) { + layer_on(_GREEKU); + layer_off(_GREEKL); + } else { + layer_on(_GREEKL); + layer_off(_GREEKU); + update_tri_layer(_PUNC, _GREEKL, _EMOJI); + } } else { - layer_off(_EMOJI); - update_tri_layer(_PUNC, _EMOJI, _GUI); + layer_off(_GREEKU); + layer_off(_GREEKL); + update_tri_layer(_PUNC, _GREEKL, _EMOJI); } return false; break; + case NUM: if (record->event.pressed) { layer_on(_NUM); @@ -651,6 +846,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #endif return false; break; + + // faux clicky toggle, TBD + case AUDIO: + return false; + break; + } return true; } @@ -677,4 +878,17 @@ void shutdown_user() stop_all_notes(); } -#endif \ No newline at end of file +#endif + +void matrix_scan_user(void) { +} + +void led_set_user(uint8_t usb_led) { +} + +void turn_off_capslock() { + if (capslock) { + register_code(KC_CAPS); + unregister_code(KC_CAPS); + } +} -- cgit v1.2.3 From 274b1c53fbc8c0838305e7837c4594d67431f2b6 Mon Sep 17 00:00:00 2001 From: milestogo Date: Sat, 11 Feb 2017 22:10:44 -0800 Subject: keymap update --- .../MS-sculpt-mobile/keymaps/milestogo/Makefile | 2 +- .../MS-sculpt-mobile/keymaps/milestogo/keymap.c | 34 +++++++++++++++------- 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/Makefile b/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/Makefile index 9d3df5964..a82d80dee 100644 --- a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/Makefile +++ b/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/Makefile @@ -17,5 +17,5 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend ifndef QUANTUM_DIR - include ../../../../Makefile + include ../../../../../Makefile endif diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/keymap.c b/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/keymap.c index a80d5beaa..0551fbde7 100644 --- a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/keymap.c +++ b/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/keymap.c @@ -16,7 +16,7 @@ /* Fn Keys */ #define TT_SYM MO(_SYM) #define TO_CDH TG(_CDH) -#define TO_MOV MO(_MOV) +#define TT_MOV KC_FN2 #define TT_NUM MO(_NUM) #define SSFT ACTION_MODS_ONESHOT(MOD_LSFT) @@ -42,18 +42,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_VOLD, KC_VOLU, TO_CDH,\ KC_ESC, KC_1, KC_2, KC_3 ,KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQL, KC_BSPC, KC_DEL,\ 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,\ - TT_SYM, 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,\ + TT_MOV, 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_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_RGUI,TT_SYM,KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT + KC_LCTL, KC_LGUI, KC_LALT, KC_FN1, KC_RGUI,TT_SYM,KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT ), [_CDH] = KEYMAP (\ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ KC_ESC, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, ____, ____, ____,\ - TO_MOV, KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, ____,\ - KC_LSFT, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, ____, ____,\ - ____, ____, ____ , TT_SYM, ____, ____, ____, ____, ____, ____ + TT_MOV, KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, ____,\ + KC_LSFT, KC_Z, KC_X, KC_C, M(1), KC_V, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, ____, ____,\ + ____, ____, ____ , KC_FN1, ____, ____, ____, ____, ____, ____ ), @@ -70,7 +70,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ ____, ____, RGUI(KC_TAB), ____, ____, RCTL(KC_B), ____, ____, ____, ____, ____, ____, ____, ____, \ - ____, RCTL(KC_A), KC_S, RCTL(KC_K), RCTL(KC_E), ____, ____, KC_LEFT,KC_DOWN, KC_UP, KC_RIGHT, ____,____,____,\ + ____, RCTL(KC_A), KC_S, RCTL(KC_K), RCTL(KC_E), ____, KC_LEFT,KC_DOWN, KC_UP, KC_RIGHT, ____, ____,____,____,\ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____ ), @@ -87,6 +87,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM fn_actions[] = { +[1] = ACTION_LAYER_TAP_KEY(_SYM,KC_SPACE), +[2] = ACTION_LAYER_TAP_KEY(_MOV,KC_BSPC), }; const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) @@ -102,11 +104,21 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) break; - case KC_N: + case 1 : if(keyboard_report->mods & MOD_BIT(KC_LGUI) ) { - clear_keyboard_but_mods(); - register_code(KC_V); - } + if (record->event.pressed) { + clear_keyboard_but_mods(); + register_code(KC_V); + } else { + unregister_code(KC_V); + } + }else { + if (record->event.pressed) { + register_code(KC_D); + } else { + unregister_code(KC_D); + } + } break; -- cgit v1.2.3 From 8d0fdf10086a0e8a1615f0521fccf1f5a2806497 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Sun, 12 Feb 2017 11:29:42 -0500 Subject: adds soft pwm for non-timed ports --- keyboards/planck/rules.mk | 4 ++-- keyboards/preonic/rules.mk | 4 ++-- quantum/quantum.c | 59 +++++++++++++++++++++++++++++++++++----------- quantum/quantum.h | 1 + 4 files changed, 50 insertions(+), 18 deletions(-) diff --git a/keyboards/planck/rules.mk b/keyboards/planck/rules.mk index 4423d422f..6776062f6 100644 --- a/keyboards/planck/rules.mk +++ b/keyboards/planck/rules.mk @@ -56,13 +56,13 @@ EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) CONSOLE_ENABLE ?= no # Console for debug(+400) COMMAND_ENABLE ?= no # Commands for debug and configuration NKRO_ENABLE ?= no # 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 +BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality MIDI_ENABLE ?= yes # MIDI controls AUDIO_ENABLE ?= yes # 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. -API_SYSEX_ENABLE = yes +API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend diff --git a/keyboards/preonic/rules.mk b/keyboards/preonic/rules.mk index 62473e356..6be5b55bc 100644 --- a/keyboards/preonic/rules.mk +++ b/keyboards/preonic/rules.mk @@ -58,13 +58,13 @@ EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) CONSOLE_ENABLE ?= no # Console for debug(+400) COMMAND_ENABLE ?= no # Commands for debug and configuration NKRO_ENABLE ?= no # 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 +BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality MIDI_ENABLE ?= yes # MIDI controls AUDIO_ENABLE ?= yes # 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. -API_SYSEX_ENABLE ?= yes +API_SYSEX_ENABLE ?= no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend \ No newline at end of file diff --git a/quantum/quantum.c b/quantum/quantum.c index 45ea8cb73..95f06d95d 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -7,6 +7,9 @@ #define TAPPING_TERM 200 #endif +#include "backlight.h" +extern backlight_config_t backlight_config; + static void do_code16 (uint16_t code, void (*f) (uint8_t)) { switch (code) { case QK_MODS ... QK_MODS_MAX: @@ -577,6 +580,10 @@ void matrix_scan_quantum() { matrix_scan_combo(); #endif + #if defined(BACKLIGHT_ENABLE) && defined(BACKLIGHT_PIN) + backlight_task(); + #endif + matrix_scan_kb(); } @@ -644,13 +651,13 @@ __attribute__ ((weak)) void backlight_set(uint8_t level) { // Prevent backlight blink on lowest level - #if BACKLIGHT_ON_STATE == 0 - // PORTx &= ~n - _SFR_IO8((backlight_pin >> 4) + 2) &= ~_BV(backlight_pin & 0xF); - #else - // PORTx |= n - _SFR_IO8((backlight_pin >> 4) + 2) |= _BV(backlight_pin & 0xF); - #endif + // #if BACKLIGHT_ON_STATE == 0 + // // PORTx &= ~n + // _SFR_IO8((backlight_pin >> 4) + 2) &= ~_BV(backlight_pin & 0xF); + // #else + // // PORTx |= n + // _SFR_IO8((backlight_pin >> 4) + 2) |= _BV(backlight_pin & 0xF); + // #endif if ( level == 0 ) { #ifndef NO_BACKLIGHT_CLOCK @@ -658,13 +665,13 @@ void backlight_set(uint8_t level) TCCR1A &= ~(_BV(COM1x1)); OCR1x = 0x0; #else - #if BACKLIGHT_ON_STATE == 0 - // PORTx |= n - _SFR_IO8((backlight_pin >> 4) + 2) |= _BV(backlight_pin & 0xF); - #else - // PORTx &= ~n - _SFR_IO8((backlight_pin >> 4) + 2) &= ~_BV(backlight_pin & 0xF); - #endif + // #if BACKLIGHT_ON_STATE == 0 + // // PORTx |= n + // _SFR_IO8((backlight_pin >> 4) + 2) |= _BV(backlight_pin & 0xF); + // #else + // // PORTx &= ~n + // _SFR_IO8((backlight_pin >> 4) + 2) &= ~_BV(backlight_pin & 0xF); + // #endif #endif } #ifndef NO_BACKLIGHT_CLOCK @@ -687,6 +694,30 @@ void backlight_set(uint8_t level) #endif } +uint8_t backlight_tick = 0; + +void backlight_task(void) { + #ifdef NO_BACKLIGHT_CLOCK + if ((0xFFFF >> ((BACKLIGHT_LEVELS - backlight_config.level) * ((BACKLIGHT_LEVELS + 1) / 2))) & (1 << backlight_tick)) { + #if BACKLIGHT_ON_STATE == 0 + // PORTx &= ~n + _SFR_IO8((backlight_pin >> 4) + 2) &= ~_BV(backlight_pin & 0xF); + #else + // PORTx |= n + _SFR_IO8((backlight_pin >> 4) + 2) |= _BV(backlight_pin & 0xF); + #endif + } else { + #if BACKLIGHT_ON_STATE == 0 + // PORTx |= n + _SFR_IO8((backlight_pin >> 4) + 2) |= _BV(backlight_pin & 0xF); + #else + // PORTx &= ~n + _SFR_IO8((backlight_pin >> 4) + 2) &= ~_BV(backlight_pin & 0xF); + #endif + } + backlight_tick = (backlight_tick + 1) % 16; + #endif +} #ifdef BACKLIGHT_BREATHING diff --git a/quantum/quantum.h b/quantum/quantum.h index 18f072189..2470d8c7d 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -95,6 +95,7 @@ void unregister_code16 (uint16_t code); #ifdef BACKLIGHT_ENABLE void backlight_init_ports(void); +void backlight_task(void); #ifdef BACKLIGHT_BREATHING void breathing_enable(void); -- cgit v1.2.3 From a773124537a09679e905e7497ab73fe2808fced1 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Sun, 12 Feb 2017 12:23:03 -0500 Subject: send travis stuff to gitter --- .travis.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.travis.yml b/.travis.yml index 18ecde7e3..6c26e4112 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,3 +30,10 @@ addons: - diffutils after_success: bash util/travis_compiled_push.sh +notifications: + webhooks: + urls: + - https://webhooks.gitter.im/e/cca31de3d44b9adb617b + on_success: change # options: [always|never|change] default: always + on_failure: always # options: [always|never|change] default: always + on_start: never # options: [always|never|change] default: always \ No newline at end of file -- cgit v1.2.3 From b6730285b4a8316765dad59fe3e9a383589694ab Mon Sep 17 00:00:00 2001 From: Stephen Tudor Date: Thu, 9 Feb 2017 15:37:23 -0500 Subject: Add smt keymap for tv44 (MiniVan) --- keyboards/tv44/keymaps/smt/Makefile | 21 ++ keyboards/tv44/keymaps/smt/config.h | 36 ++++ .../tv44/keymaps/smt/keyboard-layout-minivan.png | Bin 0 -> 66567 bytes keyboards/tv44/keymaps/smt/keymap.c | 232 +++++++++++++++++++++ keyboards/tv44/keymaps/smt/readme.md | 126 +++++++++++ 5 files changed, 415 insertions(+) create mode 100644 keyboards/tv44/keymaps/smt/Makefile create mode 100644 keyboards/tv44/keymaps/smt/config.h create mode 100644 keyboards/tv44/keymaps/smt/keyboard-layout-minivan.png create mode 100644 keyboards/tv44/keymaps/smt/keymap.c create mode 100644 keyboards/tv44/keymaps/smt/readme.md diff --git a/keyboards/tv44/keymaps/smt/Makefile b/keyboards/tv44/keymaps/smt/Makefile new file mode 100644 index 000000000..f4671a9d1 --- /dev/null +++ b/keyboards/tv44/keymaps/smt/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 = no # 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 \ No newline at end of file diff --git a/keyboards/tv44/keymaps/smt/config.h b/keyboards/tv44/keymaps/smt/config.h new file mode 100644 index 000000000..f8f0a5078 --- /dev/null +++ b/keyboards/tv44/keymaps/smt/config.h @@ -0,0 +1,36 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/** + *TV44 keymap definition macro + */ +#define KEYMAP_TV44( \ + K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, \ + K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, \ + K25, K26, K27, K28, K29, K30, K31, K32, K33, K34, K35, K36, \ + K37, K38, K39, K40, K41, K42, K43, K44 \ +) { \ + { K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, }, \ + { K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, }, \ + { K25, K26, K27, K28, K29, K30, K31, K32, K33, K34, K35, K36, }, \ + { K37, K38, K39, K40, KC_NO, KC_NO, KC_NO, K41, K42, K43, KC_NO, K44 } \ +} + +/** + *TV45 keymap definition macro (arrows layout) + */ +#define KEYMAP_TV45( \ + K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, \ + K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, \ + K25, K26, K27, K28, K29, K30, K31, K32, K33, K34, K35, K36, \ + K37, K38, K39, K40, K41, K42, K43, K44, K45 \ +) { \ + { K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, }, \ + { K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, }, \ + { K25, K26, K27, K28, K29, K30, K31, K32, K33, K34, K35, K36, }, \ + { K37, K38, K39, K40, KC_NO, KC_NO, KC_NO, K41, K42, K43, K44, K45 } \ +} + +#endif diff --git a/keyboards/tv44/keymaps/smt/keyboard-layout-minivan.png b/keyboards/tv44/keymaps/smt/keyboard-layout-minivan.png new file mode 100644 index 000000000..2dca67fb6 Binary files /dev/null and b/keyboards/tv44/keymaps/smt/keyboard-layout-minivan.png differ diff --git a/keyboards/tv44/keymaps/smt/keymap.c b/keyboards/tv44/keymaps/smt/keymap.c new file mode 100644 index 000000000..de5ce03e2 --- /dev/null +++ b/keyboards/tv44/keymaps/smt/keymap.c @@ -0,0 +1,232 @@ +#include "tv44.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 _ADJUST 16 + +// Keycodes +enum planck_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + BACKLIT +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +// Custom macros +#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl +#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift +#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper +#define ALT_GRV ALT_T(KC_GRV) // Tap for Backtick, hold for Alt + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * + * ,---------+------+------+------+------+------+------+------+------+------+------+---------. + * |Hyper/Tab| Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |---------`------`------`------`------`------`------`------`------`------`------`---------| + * | Ctrl/Esc | A | S | D | F | G | H | J | K | L | ; | ' | + * |----------`------`------`------`------`------`------`------`------`------`------`--------| + * | Shift | Z | X | C | V | B | N | M | , | . | / |Sft/Ent| + * |-----------`------`------`------`------`-----'-------`------`------`------`------`-------| + * | Alt/` | GUI | Lower | Space | Space | Raise | GUI | Alt | Ctrl | + * `-------+---------+--------+-----^^^------+-----^^^------+---------+------+------+-------' + */ +[_QWERTY] = KEYMAP_TV45( +/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/ + HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC , +/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/ + CTL_ESC , KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT , +/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ + KC_LSFT , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT , +/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ + ALT_GRV , KC_LGUI , LOWER , KC_SPC , KC_SPC , RAISE , KC_RGUI, KC_RALT, KC_RCTL ), +/*`---------+---------------+---------+-------^^^------+-------^^^-------+----------+--------+--------+--------------'*/ + +/* Colemak + * ,---------+------+------+------+------+------+------+------+------+------+------+---------. + * |Hyper/Tab| Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |---------`------`------`------`------`------`------`------`------`------`------`---------| + * | Ctrl/Esc | A | R | S | T | D | H | N | E | I | O | ' | + * |----------`------`------`------`------`------`------`------`------`------`------`--------| + * | Shift | Z | X | C | V | B | K | M | , | . | / |Sft/Ent| + * |-----------`------`------`------`------`-----'-------`------`------`------`------`-------| + * | Alt/` | GUI | Lower | Space | Space | Raise | GUI | Alt | Ctrl | + * `-------+---------+--------+-----^^^------+-----^^^------+---------+------+------+-------' + */ +[_COLEMAK] = KEYMAP_TV45( +/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/ + HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC , +/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/ + CTL_ESC , KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT , +/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ + KC_LSFT , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT , +/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ + ALT_GRV , KC_LGUI , LOWER , KC_SPC , KC_SPC , RAISE , KC_RGUI, KC_RALT, KC_RCTL ), +/*`---------+---------------+---------+-------^^^------+-------^^^-------+----------+--------+--------+--------------'*/ + +/* Dvorak + * ,---------+------+------+------+------+------+------+------+------+------+------+---------. + * |Hyper/Tab| ' | , | . | P | Y | F | G | C | R | L | Bksp | + * |---------`------`------`------`------`------`------`------`------`------`------`---------| + * | Ctrl/Esc | A | O | E | U | I | D | H | T | N | S | - | + * |----------`------`------`------`------`------`------`------`------`------`------`--------| + * | Shift | ; | Q | J | K | X | B | M | W | V | Z |Sft/Ent| + * |-----------`------`------`------`------`-----'-------`------`------`------`------`-------| + * | Alt/` | GUI | Lower | Space | Space | Raise | GUI | Alt | Ctrl | + * `-------+---------+--------+-----^^^------+-----^^^------+---------+------+------+-------' + */ +[_DVORAK] = KEYMAP_TV45( +/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/ + HPR_TAB,KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC , +/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/ + CTL_ESC , KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS , +/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ + KC_LSFT , KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT , +/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ + ALT_GRV , KC_LGUI , LOWER , KC_SPC , KC_SPC , RAISE , KC_RGUI, KC_RALT, KC_RCTL ), +/*`---------+---------------+---------+-------^^^------+-------^^^-------+----------+--------+--------+--------------'*/ + +/* Lower + * ,---------+------+------+------+------+------+------+------+------+------+------+---------. + * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |---------`------`------`------`------`------`------`------`------`------`------`---------| + * | $ | 4 | 5 | 6 | . | + | * | 4 | 5 | 6 | . | PageUp | + * |----------`------`------`------`------`------`------`------`------`------`------`--------| + * | = | 7 | 8 | 9 | 0 | - | / | 1 | 2 | 3 | Up |PageDn | + * |-----------`------`------`------`------`-----'-------`------`------`------`------`-------| + * | Brite | | | Home | End | | Left | Down | Right | + * `-------+---------+--------+-----^^^------+-----^^^------+---------+------+------+-------' + */ +[_LOWER] = KEYMAP_TV45( +/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/ + KC_0 , KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL , +/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/ + KC_DLR , KC_4, KC_5, KC_6, KC_DOT, KC_PLUS, KC_ASTR, KC_4, KC_5, KC_6, KC_DOT, KC_PGUP , +/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ + KC_EQL , KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_SLSH, KC_1, KC_2, KC_3, KC_UP, KC_PGDN , +/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ + BACKLIT , _______ , _______ , KC_HOME , KC_END , _______ , KC_LEFT, KC_DOWN, KC_RGHT ), +/*`---------+---------------+---------+-------^^^------+-------^^^-------+----------+--------+--------+--------------'*/ + +/* Raise + * ,---------+------+------+------+------+------+------+------+------+------+------+---------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |---------`------`------`------`------`------`------`------`------`------`------`---------| + * | F1 | F2 | F3 | F4 | F5 | F6 | _ | ? | + | { | } | | + * |----------`------`------`------`------`------`------`------`------`------`------`--------| + * | F7 | F8 | F9 | F10 | F11 | F12 | - | / | = | [ | ] | | + * |-----------`------`------`------`------`-----'-------`------`------`------`------`-------| + * | Brite | | | Play | Next | | Mute | Vol- | Vol+ | + * `-------+---------+--------+-----^^^------+-----^^^------+---------+------+------+-------' + */ +[_RAISE] = KEYMAP_TV45( +/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/ + KC_TILD,KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL , +/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_QUES, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE , +/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MINS, KC_SLSH, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS , +/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ + BACKLIT , _______ , _______ , KC_MPLY , KC_MNXT , _______ , KC_MUTE, KC_VOLD, KC_VOLU ), +/*`---------+---------------+---------+-------^^^------+-------^^^-------+----------+--------+--------+--------------'*/ + +/* Adjust (Lower + Raise) + * ,---------+------+------+------+------+------+------+------+------+------+------+---------. + * | | Reset| | | | | | | | | | Del | + * |---------`------`------`------`------`------`------`------`------`------`------`---------| + * | | | | | |AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |----------`------`------`------`------`------`------`------`------`------`------`--------| + * | | | | | | | | | | | | | + * |-----------`------`------`------`------`-----'-------`------`------`------`------`-------| + * | | | | | | | | | | + * `-------+---------+--------+-----^^^------+-----^^^------+---------+------+------+-------' + */ +[_ADJUST] = KEYMAP_TV45( +/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/ + _______, RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL , +/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/ + _______ ,_______, _______, _______, _______, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______ , +/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ + _______ ,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ , +/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ + _______ , _______ , _______ , _______ , _______ , _______ , _______, _______, _______ ), +/*`---------+---------------+---------+-------^^^------+-------^^^-------+----------+--------+--------+--------------'*/ +}; + +void persistant_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) { + persistant_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_DVORAK); + } + 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 BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + return false; + break; + } + return true; +} diff --git a/keyboards/tv44/keymaps/smt/readme.md b/keyboards/tv44/keymaps/smt/readme.md new file mode 100644 index 000000000..647eb8976 --- /dev/null +++ b/keyboards/tv44/keymaps/smt/readme.md @@ -0,0 +1,126 @@ +# smt's TV44 keymap + +This keymap is based on a combination of my Planck keymap and [jeebak's TV44 layout](https://github.com/qmk/qmk_firmware/tree/master/keyboards/tv44/keymaps/jeebak). I removed the macros and TouchCursor/MouseCursor layers, because I'm just not ready for that level of mind-mapping. + +I had been using something close to the default Minivan layout, but after spending a bit of time with the Planck and Preonic, I decided it would be better for me to try to standardize to some degree, where possible. + +Also, it's worth noting that my Minivan is one with the "arrows" layout, which has a 45th key, so I had to define a new KEYMAP_TV45 macro in config.h. In spite of this, the 45-key Minivan is still technically considered a "TV44" as far as I know. + +![smt's TV44 keymap](keyboard-layout-minivan.png) + +## Notable features (most of which can be found in my or jeebak's respective keymap file): + +1. **Shift/Enter** + + I use both the left and right shift keys when I type. When I want to modify a key with shift, I hold shift with the hand opposite the one typing the key. In the default keymap, Enter is where shift would be on a standard keyboard layout. Oh, muscle memory. + + Thankfully, QMK supports [mod-tap](https://github.com/jackhumbert/qmk_firmware/wiki#fun-with-modifier-keys) keys, and this allows me to set the Enter key to send a modifier (MOD_LSFT) when held, and KC_ENT when tapped. Awesome! + +2. **Hyper/Tab** + + This key modifies with "Hyper" (see [Brett Terpstra's post](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/) on this) when held, and outputs the code for Tab when tapped. On the Mac, I use KeyboardMaestro to remap my hyper-keys to do a lot of crazy things. + +3. **Ctrl/Escape** + + I set up another mod-tap, this time for the Escape key that would act as a Control modifier when held. + +4. **Alt/Backtick** + + I don't currently have LEDs on most of my keyboards, and I certainly don't want LED controls on the base layer of a 40%. + + So, why use backtick in the lower left corner? I use it as my tmux prefix key, so I need to type it more frequently than most people. Putting it on the base layer works well for my use case, and it's consistent with where I place it in my Planck and Preonic keymaps. + + I also like Alt in that position, so it works well as yet another mod-tap key. + + +## Layers + +### Qwerty + +``` +,---------+------+------+------+------+------+------+------+------+------+------+---------. +|Hyper/Tab| Q | W | E | R | T | Y | U | I | O | P | Bksp | +|---------`------`------`------`------`------`------`------`------`------`------`---------| +| Ctrl/Esc | A | S | D | F | G | H | J | K | L | ; | ' | +|----------`------`------`------`------`------`------`------`------`------`------`--------| +| Shift | Z | X | C | V | B | N | M | , | . | / |Sft/Ent| +|-----------`------`------`------`------`-----'-------`------`------`------`------`-------| +| Alt/` | GUI | Lower | Space | Space | Raise | GUI | Alt | Ctrl | + `-------+---------+--------+-----^^^------+-----^^^------+---------+------+------+-------' +``` + +### Colemak + +``` +,---------+------+------+------+------+------+------+------+------+------+------+---------. +|Hyper/Tab| Q | W | F | P | G | J | L | U | Y | ; | Bksp | +|---------`------`------`------`------`------`------`------`------`------`------`---------| +| Ctrl/Esc | A | R | S | T | D | H | N | E | I | O | ' | +|----------`------`------`------`------`------`------`------`------`------`------`--------| +| Shift | Z | X | C | V | B | K | M | , | . | / |Sft/Ent| +|-----------`------`------`------`------`-----'-------`------`------`------`------`-------| +| Alt/` | GUI | Lower | Space | Space | Raise | GUI | Alt | Ctrl | + `-------+---------+--------+-----^^^------+-----^^^------+---------+------+------+-------' +``` + +### Dvorak + +``` +,---------+------+------+------+------+------+------+------+------+------+------+---------. +|Hyper/Tab| ' | , | . | P | Y | F | G | C | R | L | Bksp | +|---------`------`------`------`------`------`------`------`------`------`------`---------| +| Ctrl/Esc | A | O | E | U | I | D | H | T | N | S | - | +|----------`------`------`------`------`------`------`------`------`------`------`--------| +| Shift | ; | Q | J | K | X | B | M | W | V | Z |Sft/Ent| +|-----------`------`------`------`------`-----'-------`------`------`------`------`-------| +| Alt/` | GUI | Lower | Space | Space | Raise | GUI | Alt | Ctrl | + `-------+---------+--------+-----^^^------+-----^^^------+---------+------+------+-------' +``` + +### Lower + +This is where I put the number row, two numpad clusters, common arithmetic operators, and cursorkeys: Arrow cluster, Home/End, Page Up/Page Down. `0` and `$` are also placed on the left side for convenient access to beginning-of-line and end-of-line Vim commands. BRITE has been moved here from the base layer. + +``` +,---------+------+------+------+------+------+------+------+------+------+------+---------. +| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | +|---------`------`------`------`------`------`------`------`------`------`------`---------| +| $ | 4 | 5 | 6 | . | + | * | 4 | 5 | 6 | . | PageUp | +|----------`------`------`------`------`------`------`------`------`------`------`--------| +| = | 7 | 8 | 9 | 0 | - | / | 1 | 2 | 3 | Up |PageDn | +|-----------`------`------`------`------`-----'-------`------`------`------`------`-------| +| Brite | | | Home | End | | Left | Down | Right | + `-------+---------+--------+-----^^^------+-----^^^------+---------+------+------+-------' +``` + +### Raise + +As a developer, it makes the most sense for me to group all the commonly-used symbols that don't fit on the main layer. In particular, having the dual-column of parens-braces-brackets helps me keep them straight. I've dropped basic media controls onto this layer as well. + +``` +,---------+------+------+------+------+------+------+------+------+------+------+---------. +| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | +|---------`------`------`------`------`------`------`------`------`------`------`---------| +| F1 | F2 | F3 | F4 | F5 | F6 | _ | ? | + | { | } | | | +|----------`------`------`------`------`------`------`------`------`------`------`--------| +| F7 | F8 | F9 | F10 | F11 | F12 | - | / | = | [ | ] | \ | +|-----------`------`------`------`------`-----'-------`------`------`------`------`-------| +| Brite | | | Play | Next | | Mute | Vol- | Vol+ | + `-------+---------+--------+-----^^^------+-----^^^------+---------+------+------+-------' +``` + +### Adjust (Lower + Raise) + +Utility layer. There isn't much here; it's mainly for swapping the default keymap between Qwerty and Dvorak, or putting the keyboard into flash mode via the Reset key. + +``` +,---------+------+------+------+------+------+------+------+------+------+------+---------. +| | Reset| | | | | | | | | | Del | +|---------`------`------`------`------`------`------`------`------`------`------`---------| +| | | | | |AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | +|----------`------`------`------`------`------`------`------`------`------`------`--------| +| | | | | | | | | | | | | +|-----------`------`------`------`------`-----'-------`------`------`------`------`-------| +| | | | | | | | | | + `-------+---------+--------+-----^^^------+-----^^^------+---------+------+------+-------' +``` -- cgit v1.2.3 From 5f8535b356e66975e20f1a573ab104db75f8b33c Mon Sep 17 00:00:00 2001 From: luc wastiaux Date: Mon, 13 Feb 2017 07:16:01 +0800 Subject: change thumb cluster key to be shift --- keyboards/ergodox/keymaps/dvorak_programmer/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c index 2fef048b5..ae4fd444d 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c +++ b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c @@ -47,8 +47,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { MO(SHELL_NAV), KC_SCLN, KC_Q, KC_J, KC_K, KC_X, MO(KEY_NAV), OSL(SHORTCUTS),OSM(MOD_LCTL), OSM(MOD_LALT),OSL(SYMBOL),MO(NUMBER), // thumb cluster - MO(MOUSE), RCTL(KC_S), - RCTL(KC_DEL), + OSM(MOD_LSFT), RCTL(KC_S), + RCTL(KC_DEL), KC_BSPC,RCTL(KC_BSPC),KC_DEL, // right hand KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSLS, -- cgit v1.2.3 From 3bf6c43de779e0790b85eef4a78c9ecc17cd06dc Mon Sep 17 00:00:00 2001 From: luc wastiaux Date: Mon, 13 Feb 2017 07:46:07 +0800 Subject: updated readme --- keyboards/ergodox/keymaps/dvorak_programmer/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/README.md b/keyboards/ergodox/keymaps/dvorak_programmer/README.md index 42723ea17..36722469f 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/README.md +++ b/keyboards/ergodox/keymaps/dvorak_programmer/README.md @@ -20,7 +20,7 @@ Updates ------- 2017/02/10: -* Made left shift an MO for SHELL_NAV, and symbol+right shift CAPSLOCK +* Made left shift an MO for SHELL_NAV, and symbol+right shift CAPSLOCK. Made all modifiers OSM. 2017/01/28: * Made the capslock key a dual momentary layer activation for BRACKETS and SHELL_NAV. One keypress held down for BRACKETS, one keypress, released and then held down for SHELL_NAV -- cgit v1.2.3 From 1e97f77278b757d740a800ae228c6202de0679b4 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Sun, 12 Feb 2017 20:01:04 -0500 Subject: update travis badge --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 71f756667..21bb79a49 100644 --- a/readme.md +++ b/readme.md @@ -1,6 +1,6 @@ # Quantum Mechanical Keyboard Firmware -[![Build Status](https://travis-ci.org/jackhumbert/qmk_firmware.svg?branch=master)](https://travis-ci.org/jackhumbert/qmk_firmware) [![Gitter](https://badges.gitter.im/qmk/qmk_firmware.svg)](https://gitter.im/qmk/qmk_firmware?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) +[![Build Status](https://travis-ci.org/qmk/qmk_firmware.svg?branch=master)](https://travis-ci.org/jackhumbert/qmk_firmware) [![Gitter](https://badges.gitter.im/qmk/qmk_firmware.svg)](https://gitter.im/qmk/qmk_firmware?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) This is a keyboard firmware based on the [tmk_keyboard firmware](http://github.com/tmk/tmk_keyboard) with some useful features for Atmel AVR controllers, and more specifically, the [OLKB product line](http://olkb.com), the [ErgoDox EZ](http://www.ergodox-ez.com) keyboard, and the [Clueboard product line](http://clueboard.co/). -- cgit v1.2.3 From c68e596f32c5d450a714627871408407e9988ef7 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Mon, 13 Feb 2017 08:03:07 +0700 Subject: Implement faux-clicky feature --- build_keyboard.mk | 5 ++ keyboards/planck/keymaps/priyadi/Makefile | 3 +- keyboards/planck/keymaps/priyadi/keymap.c | 4 +- quantum/fauxclicky.c | 68 ++++++++++++++++++++++++ quantum/fauxclicky.h | 87 +++++++++++++++++++++++++++++++ quantum/template/rules.mk | 1 + tmk_core/common/action.c | 13 +++++ tmk_core/common/keyboard.c | 6 +++ 8 files changed, 184 insertions(+), 3 deletions(-) create mode 100644 quantum/fauxclicky.c create mode 100644 quantum/fauxclicky.h diff --git a/build_keyboard.mk b/build_keyboard.mk index 2c64e93a2..c8e82cf0e 100644 --- a/build_keyboard.mk +++ b/build_keyboard.mk @@ -161,6 +161,11 @@ ifeq ($(strip $(AUDIO_ENABLE)), yes) SRC += $(QUANTUM_DIR)/audio/luts.c endif +ifeq ($(strip $(FAUXCLICKY_ENABLE)), yes) + OPT_DEFS += -DFAUXCLICKY_ENABLE + SRC += $(QUANTUM_DIR)/fauxclicky.c +endif + ifeq ($(strip $(UCIS_ENABLE)), yes) OPT_DEFS += -DUCIS_ENABLE UNICODE_ENABLE = yes diff --git a/keyboards/planck/keymaps/priyadi/Makefile b/keyboards/planck/keymaps/priyadi/Makefile index 336608b8c..27c2638e2 100644 --- a/keyboards/planck/keymaps/priyadi/Makefile +++ b/keyboards/planck/keymaps/priyadi/Makefile @@ -10,12 +10,13 @@ COMMAND_ENABLE = no # 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 = yes # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = yes # Audio output on port C6 +AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode UNICODEMAP_ENABLE = yes # Unicode map 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. API_SYSEX_ENABLE = no +FAUXCLICKY_ENABLE = yes # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/planck/keymaps/priyadi/keymap.c b/keyboards/planck/keymaps/priyadi/keymap.c index 2e979221a..13668fd10 100644 --- a/keyboards/planck/keymaps/priyadi/keymap.c +++ b/keyboards/planck/keymaps/priyadi/keymap.c @@ -268,8 +268,8 @@ const uint32_t PROGMEM unicode_map[] = { // hybrid right-gui & scroll lock (mapped to Compose in OS) -#undef KC_RCTL -#define KC_RCTL MT(MOD_LCTL, KC_SLCK) +#undef KC_RALT +#define KC_RALT MT(MOD_RALT, KC_SLCK) // keymaps diff --git a/quantum/fauxclicky.c b/quantum/fauxclicky.c new file mode 100644 index 000000000..13273e705 --- /dev/null +++ b/quantum/fauxclicky.c @@ -0,0 +1,68 @@ +/* +Copyright 2017 Priyadi Iman Nurcahyo + +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 +#include +#include +#include +#include +#include + +__attribute__ ((weak)) +float fauxclicky_pressed_note[2] = MUSICAL_NOTE(_F3, 2); +__attribute__ ((weak)) +float fauxclicky_released_note[2] = MUSICAL_NOTE(_A3, 2); +__attribute__ ((weak)) +float fauxclicky_beep_note[2] = MUSICAL_NOTE(_C3, 2); + +bool fauxclicky_enabled = true; +uint16_t note_start = 0; +bool note_playing = false; +uint16_t note_period = 0; + +void fauxclicky_init() +{ + // Set port PC6 (OC3A and /OC4A) as output + DDRC |= _BV(PORTC6); + + // TCCR3A / TCCR3B: Timer/Counter #3 Control Registers + TCCR3A = (0 << COM3A1) | (0 << COM3A0) | (1 << WGM31) | (0 << WGM30); + TCCR3B = (1 << WGM33) | (1 << WGM32) | (0 << CS32) | (1 << CS31) | (0 << CS30); +} + +void fauxclicky_stop() +{ + FAUXCLICKY_DISABLE_OUTPUT; + note_playing = false; +} + +void fauxclicky_play(float note[2]) { + if (!fauxclicky_enabled) return; + if (note_playing) fauxclicky_stop(); + FAUXCLICKY_TIMER_PERIOD = (uint16_t)(((float)F_CPU) / (note[0] * FAUXCLICKY_CPU_PRESCALER)); + FAUXCLICKY_DUTY_CYCLE = (uint16_t)((((float)F_CPU) / (note[0] * FAUXCLICKY_CPU_PRESCALER)) / 2); + note_playing = true; + note_period = (note[1] / 16) * (60 / (float)FAUXCLICKY_TEMPO) * 100; // check this + note_start = timer_read(); + FAUXCLICKY_ENABLE_OUTPUT; +} + +void fauxclicky_check() { + if (!note_playing) return; + + if (timer_elapsed(note_start) > note_period) { + fauxclicky_stop(); + } +} diff --git a/quantum/fauxclicky.h b/quantum/fauxclicky.h new file mode 100644 index 000000000..6cfc291c0 --- /dev/null +++ b/quantum/fauxclicky.h @@ -0,0 +1,87 @@ +/* +Copyright 2017 Priyadi Iman Nurcahyo + +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 . +*/ + +#ifdef AUDIO_ENABLE +#error "AUDIO_ENABLE and FAUXCLICKY_ENABLE cannot be both enabled" +#endif + +#include "musical_notes.h" + +__attribute__ ((weak)) +float fauxclicky_pressed_note[2]; +__attribute__ ((weak)) +float fauxclicky_released_note[2]; +__attribute__ ((weak)) +float fauxclicky_beep_note[2]; + +// +// tempo in BPM +// + +#ifndef FAUXCLICKY_TEMPO +#define FAUXCLICKY_TEMPO TEMPO_DEFAULT +#endif + +// beep on press +#define FAUXCLICKY_ACTION_PRESS fauxclicky_play(fauxclicky_pressed_note) + +// beep on release +#define FAUXCLICKY_ACTION_RELEASE fauxclicky_play(fauxclicky_released_note) + +// general purpose beep +#define FAUXCLICKY_BEEP fauxclicky_play(fauxclicky_beep_note) + +// enable +#define FAUXCLICKY_ON fauxclicky_enabled = true + +// disable +#define FAUXCLICKY_OFF do { \ + fauxclicky_enabled = false; \ + fauxclicky_stop(); \ +} while (0) + +// +// pin configuration +// + +#ifndef FAUXCLICKY_CPU_PRESCALER +#define FAUXCLICKY_CPU_PRESCALER 8 +#endif + +#ifndef FAUXCLICKY_ENABLE_OUTPUT +#define FAUXCLICKY_ENABLE_OUTPUT TCCR3A |= _BV(COM3A1); +#endif + +#ifndef FAUXCLICKY_DISABLE_OUTPUT +#define FAUXCLICKY_DISABLE_OUTPUT TCCR3A &= ~(_BV(COM3A1) | _BV(COM3A0)); +#endif + +#ifndef FAUXCLICKY_TIMER_PERIOD +#define FAUXCLICKY_TIMER_PERIOD ICR3 +#endif + +#ifndef FAUXCLICKY_DUTY_CYCLE +#define FAUXCLICKY_DUTY_CYCLE OCR3A +#endif + +// +// definitions +// + +void fauxclicky_init(void); +void fauxclicky_stop(void); +void fauxclicky_play(float note[2]); +void fauxclicky_check(void); + diff --git a/quantum/template/rules.mk b/quantum/template/rules.mk index 55898147d..bad3387bf 100644 --- a/quantum/template/rules.mk +++ b/quantum/template/rules.mk @@ -65,3 +65,4 @@ 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 +FAUXCLICKY_ENABLE ?= no # Use buzzer to emulate clicky switches diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index f03670a7f..94de36918 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c @@ -33,6 +33,9 @@ along with this program. If not, see . #include "nodebug.h" #endif +#ifdef FAUXCLICKY_ENABLE +#include +#endif void action_exec(keyevent_t event) { @@ -41,6 +44,16 @@ void action_exec(keyevent_t event) dprint("EVENT: "); debug_event(event); dprintln(); } +#ifdef FAUXCLICKY_ENABLE + if (IS_PRESSED(event)) { + FAUXCLICKY_ACTION_PRESS; + } + if (IS_RELEASED(event)) { + FAUXCLICKY_ACTION_RELEASE; + } + fauxclicky_check(); +#endif + #ifdef ONEHAND_ENABLE if (!IS_NOEVENT(event)) { process_hand_swap(&event); diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c index 3aa82231b..eac1f1dd8 100644 --- a/tmk_core/common/keyboard.c +++ b/tmk_core/common/keyboard.c @@ -51,6 +51,9 @@ along with this program. If not, see . #ifdef RGBLIGHT_ENABLE # include "rgblight.h" #endif +#ifdef FAUXCLICKY_ENABLE +# include "fauxclicky.h" +#endif #ifdef SERIAL_LINK_ENABLE # include "serial_link/system/serial_link.h" #endif @@ -108,6 +111,9 @@ void keyboard_init(void) { #ifdef RGBLIGHT_ENABLE rgblight_init(); #endif +#ifdef FAUXCLICKY_ENABLE + fauxclicky_init(); +#endif #if defined(NKRO_ENABLE) && defined(FORCE_NKRO) keymap_config.nkro = 1; #endif -- cgit v1.2.3 From 4010360912125c120904e2d5294963db2d4ded65 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Sun, 12 Feb 2017 23:58:44 -0500 Subject: adds planck/rev3 makefile so subproject is found --- keyboards/planck/rev3/Makefile | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 keyboards/planck/rev3/Makefile diff --git a/keyboards/planck/rev3/Makefile b/keyboards/planck/rev3/Makefile new file mode 100644 index 000000000..191c6bb66 --- /dev/null +++ b/keyboards/planck/rev3/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../../Makefile +endif \ No newline at end of file -- cgit v1.2.3 From 8c93c5d9ab8a0a69d84f707db71f417b66402693 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Mon, 13 Feb 2017 14:55:35 +0700 Subject: Add keycodes to turn on, turn off and toggle faux clicky --- quantum/fauxclicky.h | 12 ++++++++++++ quantum/quantum.c | 24 ++++++++++++++++++++++++ quantum/quantum_keycodes.h | 7 +++++++ 3 files changed, 43 insertions(+) diff --git a/quantum/fauxclicky.h b/quantum/fauxclicky.h index 6cfc291c0..109bd0d83 100644 --- a/quantum/fauxclicky.h +++ b/quantum/fauxclicky.h @@ -18,6 +18,7 @@ along with this program. If not, see . #endif #include "musical_notes.h" +#include "stdbool.h" __attribute__ ((weak)) float fauxclicky_pressed_note[2]; @@ -26,6 +27,8 @@ float fauxclicky_released_note[2]; __attribute__ ((weak)) float fauxclicky_beep_note[2]; +bool fauxclicky_enabled; + // // tempo in BPM // @@ -52,6 +55,15 @@ float fauxclicky_beep_note[2]; fauxclicky_stop(); \ } while (0) +// toggle +#define FAUXCLICKY_TOGGLE do { \ + if (fauxclicky_enabled) { \ + FAUXCLICKY_OFF; \ + } else { \ + FAUXCLICKY_ON; \ + } \ +} while (0) + // // pin configuration // diff --git a/quantum/quantum.c b/quantum/quantum.c index 45ea8cb73..2088c10c9 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -7,6 +7,10 @@ #define TAPPING_TERM 200 #endif +#ifdef FAUXCLICKY_ENABLE +#include "fauxclicky.h" +#endif + static void do_code16 (uint16_t code, void (*f) (uint8_t)) { switch (code) { case QK_MODS ... QK_MODS_MAX: @@ -196,6 +200,26 @@ bool process_record_quantum(keyrecord_t *record) { } return false; break; + #ifdef FAUXCLICKY_ENABLE + case FC_TOG: + if (record->event.pressed) { + FAUXCLICKY_TOGGLE; + } + return false; + break; + case FC_ON: + if (record->event.pressed) { + FAUXCLICKY_ON; + } + return false; + break; + case FC_OFF: + if (record->event.pressed) { + FAUXCLICKY_OFF; + } + return false; + break; + #endif #ifdef RGBLIGHT_ENABLE case RGB_TOG: if (record->event.pressed) { diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index ab2e79026..cc7a5013f 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -86,6 +86,13 @@ enum quantum_keycodes { AU_OFF, AU_TOG, +#ifdef FAUXCLICKY_ENABLE + // Faux clicky + FC_ON, + FC_OFF, + FC_TOG, +#endif + // Music mode on/off/toggle MU_ON, MU_OFF, -- cgit v1.2.3 From b28fb29898efc638000c0388eb30b5fb9200ce4a Mon Sep 17 00:00:00 2001 From: Marvin Ramin Date: Mon, 13 Feb 2017 09:00:25 +0100 Subject: adds documentation for reset button and adds one to the default keymap --- keyboards/gonnerd/keymaps/default/keymap.c | 19 +++++++++--- keyboards/gonnerd/keymaps/mauin/keymap.c | 50 ++++++++++++++++++++++++------ keyboards/gonnerd/readme.md | 4 +++ 3 files changed, 58 insertions(+), 15 deletions(-) diff --git a/keyboards/gonnerd/keymaps/default/keymap.c b/keyboards/gonnerd/keymaps/default/keymap.c index a37005939..353648ecf 100644 --- a/keyboards/gonnerd/keymaps/default/keymap.c +++ b/keyboards/gonnerd/keymaps/default/keymap.c @@ -4,11 +4,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = KEYMAP_60( /* Base */ - KC_ESC, 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_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_LCTL,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_RSFT,KC_NO, \ - KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,MO(1), KC_RCTL), + KC_ESC, 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_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_LCTL,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_RSFT,KC_NO, \ + KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,MO(1), KC_RCTL \ + ), + + [1] = KEYMAP_60( /* System layer to have access to RESET button */ + 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__, KC_TRNS, __x__ \ + ), }; const uint16_t PROGMEM fn_actions[] = { diff --git a/keyboards/gonnerd/keymaps/mauin/keymap.c b/keyboards/gonnerd/keymaps/mauin/keymap.c index 1a1d515a9..5979a7ca4 100644 --- a/keyboards/gonnerd/keymaps/mauin/keymap.c +++ b/keyboards/gonnerd/keymaps/mauin/keymap.c @@ -23,11 +23,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------' */ [BASE_LAYER] = KEYMAP_60( - KC_ESC, 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, \ + F(0), 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_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, \ - MO(1), 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_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, MO(3), KC_RCTL \ + MO(1), 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_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, MO(2), KC_RCTL \ ), /* Layer 1: Function Layer @@ -45,10 +45,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [FUNCTION_LAYER] = KEYMAP_60( 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_DEL, \ - __x__, KC_MPRV, KC_MPLY, KC_MNXT, __x__, __x__, KC_PGUP, KC_HOME, KC_UP, KC_END, __x__, KC_SLCK, KC_PAUS, __x__, \ - KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, __x__, __x__, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, __x__, __x__, __x__, __x__, \ - KC_LSFT, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \ - KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, __x__, __x__, __x__, __x__ \ + __x__, KC_MPRV, KC_MPLY, KC_MNXT, __x__, __x__, KC_PGUP, KC_HOME, KC_UP, KC_END, __x__, KC_SLCK, KC_PAUS, __x__, \ + KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, __x__, __x__, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, __x__, __x__, __x__, __x__, \ + KC_LSFT, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \ + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, __x__, __x__, __x__, __x__ \ ), /* Layer 2: System Layer @@ -69,10 +69,40 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { __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__, KC_TRNS, __x__ \ + __x__, __x__, __x__, __x__, __x__, __x__, KC_TRNS, __x__ \ ), }; -const uint16_t PROGMEM fn_actions[] = { +enum function_id { + ESC_GRV, // Makes Esc behave like `~ when pressed with the left GUI modifier. This is the "switch between windows of the same application" key combination in macOS +}; +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_FUNCTION(ESC_GRV), }; + +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { + static uint8_t esc_grv_mask; + switch (id) { + case ESC_GRV: + esc_grv_mask = get_mods() & MOD_BIT(KC_LGUI); + if (record->event.pressed) { + if (esc_grv_mask) { + add_key(KC_GRV); + send_keyboard_report(); + } else { + add_key(KC_ESC); + send_keyboard_report(); + } + } else { + if (esc_grv_mask) { + del_key(KC_GRV); + send_keyboard_report(); + } else { + del_key(KC_ESC); + send_keyboard_report(); + } + } + break; + } +} diff --git a/keyboards/gonnerd/readme.md b/keyboards/gonnerd/readme.md index 1224ff6b0..807df308a 100644 --- a/keyboards/gonnerd/readme.md +++ b/keyboards/gonnerd/readme.md @@ -11,6 +11,10 @@ It is possible to change the bootloader of the GON NerD with an ISP programmer. _After changing the bootloader on your GON NerD PCB you will not be able to go back to the original firmware and the official configuration software will not work anymore. You will lose your warranty and official support from GON!_ +## Reset button + +To run the `make dfu` command to flash keymaps onto the board, you need to put the board into DFU mode. As the GON NerD PCBs do not have a reset button on the board to put it into DFU mode, be sure to include a `RESET` button on your keymap. Otherwise you'll have to unscrew your keyboard from the case and short the GND and RST pins. + ## Building Download or clone the whole firmware and navigate to the keyboards/gonnerd folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. -- cgit v1.2.3 From 5d5f2ff50daaef0e76e8e267a29a7ac2286f65d8 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Sun, 12 Feb 2017 00:00:01 +0700 Subject: Some space optimization and housekeeping --- .../handwired/promethium/keymaps/priyadi/keymap.c | 74 +++++++++------------- 1 file changed, 30 insertions(+), 44 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 1ad34612e..e35e42488 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -41,6 +41,7 @@ enum glow_modes { }; uint8_t glow_mode = GLOW_MIN; +void turn_off_capslock(void); extern keymap_config_t keymap_config; enum layers { @@ -49,6 +50,7 @@ enum layers { _COLEMAK, _WORKMAN, _NORMAN, + _DEFAULT_LAYER_MAX = _NORMAN, _PUNC, _NUM, @@ -444,7 +446,7 @@ void led_set_layer_indicator(void) { oldlayer = layer; - if (layer <= _NORMAN) { + if (layer <= _DEFAULT_LAYER_MAX) { rgbsps_send(); return; } @@ -461,7 +463,7 @@ void led_set_layer_indicator(void) { break; default: rgbsps_set(LED_IND_FUNC, 3, 3, 3); - rgbsps_set(LED_IND_NUM, 3, 3, 3); + // rgbsps_set(LED_IND_NUM, 3, 3, 3); rgbsps_set(LED_IND_EMOJI, 3, 3, 3); } @@ -753,6 +755,30 @@ void persistant_default_layer_set(uint16_t default_layer) { default_layer_set(default_layer); } +void process_doublespace(bool pressed, bool *isactive, bool *otheractive, bool *isemitted) { + if (pressed) { + *isactive = true; + if (*otheractive) { + layer_on(_SPACE); + space_layer_entered = true; + } + } else { + *isactive = false; + if (space_layer_entered) { + layer_off(_SPACE); + if (!*otheractive) { + space_layer_entered = false; + } + } else { + if (!*isemitted) { + register_code(KC_SPC); + unregister_code(KC_SPC); + } + *isemitted = false; + } + } +} + bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool lshift = keyboard_report->mods & MOD_BIT(KC_LSFT); bool rshift = keyboard_report->mods & MOD_BIT(KC_RSFT); @@ -786,51 +812,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #ifdef DOUBLESPACE_LAYER_ENABLE // double-space enter space layer case LSPACE: - if (record->event.pressed) { - lspace_active = true; - if (rspace_active) { - layer_on(_SPACE); - space_layer_entered = true; - } - } else { - lspace_active = false; - if (space_layer_entered) { - layer_off(_SPACE); - if (!rspace_active) { - space_layer_entered = false; - } - } else { - if (!lspace_emitted) { - register_code(KC_SPC); - unregister_code(KC_SPC); - } - lspace_emitted = false; - } - } + process_doublespace(record->event.pressed, &lspace_active, &rspace_active, &lspace_emitted); return false; break; case RSPACE: - if (record->event.pressed) { - rspace_active = true; - if (lspace_active) { - layer_on(_SPACE); - space_layer_entered = true; - } - } else { - rspace_active = false; - if (space_layer_entered) { - layer_off(_SPACE); - if (!lspace_active) { - space_layer_entered = false; - } - } else { - if (!rspace_emitted) { - register_code(KC_SPC); - unregister_code(KC_SPC); - } - rspace_emitted = false; - } - } + process_doublespace(record->event.pressed, &rspace_active, &lspace_active, &rspace_emitted); return false; break; #endif -- cgit v1.2.3 From 455568d1978bdf4312ab684d7b6da43bdc19895c Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Sun, 12 Feb 2017 00:02:36 +0700 Subject: Workaround to remove warning --- keyboards/handwired/promethium/keymaps/priyadi/config.h | 2 ++ keyboards/handwired/promethium/promethium.h | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/config.h b/keyboards/handwired/promethium/keymaps/priyadi/config.h index 53059ca7d..6c9d2195e 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/config.h +++ b/keyboards/handwired/promethium/keymaps/priyadi/config.h @@ -14,6 +14,8 @@ #define RGB_DI_PIN B5 #define RGBSPS_NUM 57 +#define UNICODE_TYPE_DELAY 0 + #define LAYOUT_DVORAK #define LAYOUT_COLEMAK #define LAYOUT_NORMAN diff --git a/keyboards/handwired/promethium/promethium.h b/keyboards/handwired/promethium/promethium.h index da37e5c56..d6fea76ce 100644 --- a/keyboards/handwired/promethium/promethium.h +++ b/keyboards/handwired/promethium/promethium.h @@ -4,7 +4,6 @@ #include "quantum.h" #define PS2_INIT_DELAY 2000 -#define UNICODE_TYPE_DELAY 0 #define BATTERY_PIN 9 #define BATTERY_POLL 30000 #define MAX_VOLTAGE 4.2 -- cgit v1.2.3 From 68e5c859990b31240b57ddf70a6d4e2e3762d195 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Sun, 12 Feb 2017 00:07:33 +0700 Subject: Remove assignment warning --- keyboards/handwired/promethium/keymaps/priyadi/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index e35e42488..52b186c40 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -1058,7 +1058,7 @@ void battery_poll(uint8_t level) { void led_set_user(uint8_t usb_led) { bool new_capslock = usb_led & (1< Date: Sun, 12 Feb 2017 00:20:47 +0700 Subject: Forgot to add ifdef to optional feature --- keyboards/handwired/promethium/keymaps/priyadi/keymap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 52b186c40..a24a79aa1 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -755,6 +755,7 @@ void persistant_default_layer_set(uint16_t default_layer) { default_layer_set(default_layer); } +#ifdef DOUBLESPACE_LAYER_ENABLE void process_doublespace(bool pressed, bool *isactive, bool *otheractive, bool *isemitted) { if (pressed) { *isactive = true; @@ -778,6 +779,7 @@ void process_doublespace(bool pressed, bool *isactive, bool *otheractive, bool * } } } +#endif bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool lshift = keyboard_report->mods & MOD_BIT(KC_LSFT); -- cgit v1.2.3 From 40ced7760649b7d16830ebfd884d5ee2ab980827 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Sun, 12 Feb 2017 05:04:14 +0700 Subject: Update my Planck layout --- keyboards/planck/keymaps/priyadi/keymap.c | 516 +++++++++++++++++++++--------- 1 file changed, 365 insertions(+), 151 deletions(-) diff --git a/keyboards/planck/keymaps/priyadi/keymap.c b/keyboards/planck/keymaps/priyadi/keymap.c index 2e979221a..80e867621 100644 --- a/keyboards/planck/keymaps/priyadi/keymap.c +++ b/keyboards/planck/keymaps/priyadi/keymap.c @@ -10,29 +10,76 @@ #include "eeconfig.h" #include "process_unicode.h" #include "quantum.h" - // #define TOLELOT_ENABLE +#define DOUBLESPACE_LAYER_ENABLE + +// so i can copy & paste stuff from my other planck-like keyboards +#define KEYMAP( \ + 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, \ + k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c \ +) \ +{ \ + {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}, \ + {k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c} \ +} +// Fillers to make layering clearer +#define _______ KC_TRNS +#define XXXXXXX KC_NO +#define G(x) LGUI(x) +#define KC_WWWB KC_WWW_BACK +#define KC_WWWF KC_WWW_FORWARD + +// hybrid right-alt & scroll lock (mapped to Compose in OS) +#undef KC_RALT +#define KC_RALT MT(MOD_RALT, KC_SLCK) + +bool capslock = false; +#ifdef DOUBLESPACE_LAYER_ENABLE +bool lspace_active = false; +bool rspace_active = false; +bool lspace_emitted = false; +bool rspace_emitted = false; +bool space_layer_entered = false; +#endif + +void turn_off_capslock(void); extern keymap_config_t keymap_config; enum layers { _QWERTY, + _DVORAK, _COLEMAK, _WORKMAN, + _NORMAN, + _DEFAULT_LAYER_MAX = _NORMAN, + _PUNC, _NUM, _FUNC, - _EMOJI, + _GREEKU, _GREEKL, + + _EMOJI, _GUI, + _SYS, }; +// double-space layer +#define _SPACE _GUI + enum planck_keycodes { // layouts QWERTY = SAFE_RANGE, + DVORAK, COLEMAK, WORKMAN, + NORMAN, // layer switchers PUNC, @@ -46,12 +93,16 @@ enum planck_keycodes { LINUX, WIN, OSX, -}; -// Fillers to make layering clearer + // others + LSPACE, + RSPACE, + GLOW, + AUDIO, -#define _______ KC_TRNS -#define XXXXXXX KC_NO + // stubs + OUT_BLE +}; // unicode map @@ -259,18 +310,6 @@ const uint32_t PROGMEM unicode_map[] = { [FSIGM] = 0x03C2, }; - -// hybrid shift - = -// #undef KC_LSFT -// #define KC_LSFT MT(MOD_LSFT, KC_MINS) -// #undef KC_RSFT -// #define KC_RSFT MT(MOD_LSFT, KC_EQL) - - -// hybrid right-gui & scroll lock (mapped to Compose in OS) -#undef KC_RCTL -#define KC_RCTL MT(MOD_LCTL, KC_SLCK) - // keymaps const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -279,127 +318,138 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | S | D | F | G | H | J | K | L | ; |Enter | + * | Esc | A | S | D | F | G | H | J | K | L | ' |Enter | * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| Z | X | C | V | B | N | M | , | . | / |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | GUI | Alt | Punc | Num | Space | Func |Emoji |Greek |AltGr | Ctrl | + * | Ctrl | Alt | GUI | Punc | Num | Space | Func |Greek | GUI |AltGr | Ctrl | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = { - {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, - {KC_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}, - {KC_LCTL, KC_LALT, KC_LGUI, PUNC, NUM, KC_SPC, KC_SPC, FUNC, EMOJI, GREEK, KC_RALT, KC_RCTL} -}, - -/* Colemak +[_QWERTY] = KEYMAP( + 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, + KC_LCTL, KC_LALT, KC_LGUI, PUNC, NUM, LSPACE, RSPACE, FUNC, GREEK, KC_RGUI, KC_RALT, KC_RCTL +), + +/* Dvorak * ,-----------------------------------------------------------------------------------. - * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * | Tab | ' | , | . | P | Y | F | G | C | R | L | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | R | S | T | D | H | N | E | I | O |Enter | + * | Esc | A | O | E | U | I | D | H | T | N | S |Enter | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | K | M | , | . | / |Shift | + * | Shift| / | Q | J | K | X | B | M | W | V | Z |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | GUI | Alt | Punc | Num | Space | Func |Emoji |AltGr | GUI | Ctrl | + * | Ctrl | Alt | GUI | Punc | Num | Space | Func |Greek | GUI |AltGr | Ctrl | * `-----------------------------------------------------------------------------------' */ -[_COLEMAK] = { - {_______, 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, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, +#ifdef LAYOUT_DVORAK +[_DVORAK] = KEYMAP( + _______, 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, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), +#endif -/* Workman +/* Colemak * ,-----------------------------------------------------------------------------------. - * | Tab | Q | D | R | W | B | J | F | U | P | ; | Bksp | + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | S | H | T | G | Y | N | E | O | I |Enter | + * | Esc | A | R | S | T | D | H | N | E | I | O |Enter | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | M | C | V | K | K | , | . | / |Shift | + * | Shift| Z | X | C | V | B | K | M | , | . | / |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | GUI | Alt | Punc | Num | Space | Func |Emoji |AltGr | GUI | Ctrl | + * | Ctrl | Alt | GUI | Punc | Num | Space | Func |Greek | GUI |AltGr | Ctrl | * `-----------------------------------------------------------------------------------' */ -[_WORKMAN] = { - {_______, 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, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, -/* Uppercase Greek +#ifdef LAYOUT_COLEMAK +[_COLEMAK] = KEYMAP( + _______, 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, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), +#endif + +/* Norman * ,-----------------------------------------------------------------------------------. - * | | | | | | | | | | | | | + * | Tab | Q | W | D | F | K | J | U | R | L | ; | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | + * | Esc | A | S | E | T | G | Y | N | I | O | H |Enter | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | P | M | , | . | / |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | + * | Ctrl | Alt | GUI | Punc | Num | Space | Func |Greek | GUI |AltGr | Ctrl | * `-----------------------------------------------------------------------------------' */ -[_GREEKU] = { - {_______, _______, _______,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), _______, _______}, - {_______,X(UZETA), X(UCHI), X(UPSI),X(UOMEG),X(UBETA), X(UNU), X(UMU), _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, -/* Lowercase Greek +#ifdef LAYOUT_NORMAN +[_NORMAN] = KEYMAP( + _______, 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, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), +#endif + +/* Workman * ,-----------------------------------------------------------------------------------. - * | | | | | | | | | | | | | + * | Tab | Q | D | R | W | B | J | F | U | P | ; | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | + * | Esc | A | S | H | T | G | Y | N | E | O | I |Enter | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | M | C | V | K | K | , | . | / |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | + * | Ctrl | Alt | GUI | Punc | Num | Space | Func |Greek | GUI |AltGr | Ctrl | * `-----------------------------------------------------------------------------------' */ -[_GREEKL] = { - {_______, _______,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), _______, _______}, - {_______,X(LZETA), X(LCHI), X(LPSI),X(LOMEG),X(LBETA), X(LNU), X(LMU), _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, + +#ifdef LAYOUT_WORKMAN +[_WORKMAN] = KEYMAP( + _______, 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, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), +#endif /* Punc * ,-----------------------------------------------------------------------------------. * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | ` | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | \ | - | = | < | > | ( | ) | ' | | | + * | | * | \ | - | = | / | | ( | ) | < | > | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | _ | + | { | } | [ | ] | " | | | + * | & | ^ | | | _ | + | ? | | [ | ] | { | } | : | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_PUNC] = { - {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_GRV }, - {XXXXXXX, XXXXXXX, KC_BSLS, KC_MINS, KC_EQL, KC_LABK, KC_RABK, KC_LPRN, KC_RPRN, KC_QUOT, XXXXXXX, XXXXXXX}, - {XXXXXXX, XXXXXXX, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, KC_DQUO, XXXXXXX, XXXXXXX}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, +[_PUNC] = KEYMAP( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_GRV , + XXXXXXX, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, XXXXXXX, KC_LPRN, KC_RPRN, KC_LABK, KC_RABK, XXXXXXX, + KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, XXXXXXX, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_COLN, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), /* Num * ,-----------------------------------------------------------------------------------. - * | ^ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * | ~ | ! | @ | # | $ | % | A | 7 | 8 | 9 | D | ` | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | @ | A | B | C | ( | ) | 4 | 5 | 6 | : |Enter | + * | | * | \ | - | = | / | B | 4 | 5 | 6 | E | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | & | # | D | E | F | [ | ] | 1 | 2 | 3 | / | * | + * | & | ^ | | | _ | + | ? | C | 1 | 2 | 3 | F | : | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | x | | | 0 | , | . | + | - | + * | | | | | | | x | 0 | , | . | | | * `-----------------------------------------------------------------------------------' */ -[_NUM] = { - {KC_CIRC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, - { KC_ESC, KC_AT, S(KC_A), S(KC_B), S(KC_C), KC_LPRN, KC_RPRN, KC_4, KC_5, KC_6, KC_COLN, KC_ENT}, - {KC_AMPR, KC_HASH, S(KC_D), S(KC_E), S(KC_F), KC_LBRC, KC_RBRC, KC_1, KC_2, KC_3, KC_SLSH, KC_ASTR}, - {_______, _______, _______, KC_X, _______, KC_SPC, KC_SPC, KC_0, KC_COMM, KC_DOT, KC_PLUS, KC_MINS} -}, +[_NUM] = KEYMAP( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, S(KC_A), KC_7, KC_8, KC_9, S(KC_D), KC_GRV, + XXXXXXX, 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_1, KC_2, KC_3, S(KC_F), KC_COLN, + _______, _______, _______, _______, _______, _______, _______, KC_0, KC_COMM, KC_DOT, KC_X, _______ +), /* Func * ,-----------------------------------------------------------------------------------. @@ -412,12 +462,48 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_FUNC] = { - {XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, KC_DEL}, - {XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8,KC_PSCREEN,XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_INS}, - {_______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_END, XXXXXXX, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, +[_FUNC] = KEYMAP( + XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, KC_DEL, + XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8,KC_PSCREEN,XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_INS, + _______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_END, XXXXXXX, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* Uppercase Greek + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_GREEKU] = KEYMAP( + _______, _______, _______,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), _______, _______, + _______,X(UZETA), X(UCHI), X(UPSI),X(UOMEG),X(UBETA), X(UNU), X(UMU), _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* Lowercase Greek + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_GREEKL] = KEYMAP( + _______, _______,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), _______, _______, + _______,X(LZETA), X(LCHI), X(LPSI),X(LOMEG),X(LBETA), X(LNU), X(LMU), _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), /* Emoji * ,-----------------------------------------------------------------------------------. @@ -430,30 +516,48 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_EMOJI] = { - {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)}, - { X(POO), X(EYES),X(HUNRD), _______,X(SKULL),X(HORNS), X(HALO), X(FEAR), _______,X(YUMMY),X(DISAP),X(NOEVK)} -}, +[_EMOJI] = KEYMAP( + 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), + X(POO), X(EYES), _______,X(HUNRD), X(SKULL),X(HORNS), X(HALO), X(FEAR),X(YUMMY),_______,X(DISAP),X(NOEVK) +), /* GUI * ,-----------------------------------------------------------------------------------. * | | D1 | D2 | D3 | D4 | D5 | D6 | D7 | D8 | D9 | D10 | | * |------+------+------+------+------+-------------+------+------+------+------+------| - * |Linux | | Vol- | Mute | Vol+ | | | D- | | D+ | |Qwerty| + * | | | Vol- | Mute | Vol+ | | | Prev | | Next | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Win | | Prev | Play | Next | | | | | | |Colmak| + * | | | Prev | Play | Next | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | OSX | | | | | BL- | BL+ | | | | |Workmn| + * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_GUI] = { - {_______, LGUI(KC_1),LGUI(KC_2),LGUI(KC_3),LGUI(KC_4),LGUI(KC_5),LGUI(KC_6),LGUI(KC_7),LGUI(KC_8),LGUI(KC_9),LGUI(KC_0), _______}, - { LINUX, _______, KC_VOLD, KC_MUTE, KC_VOLU,_______,_______,KC_WWW_BACK,_______,KC_WWW_FORWARD,_______, QWERTY}, - { WIN, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, _______, COLEMAK}, - { OSX, _______, _______, _______, _______, BL_DEC, BL_INC, _______, _______, _______, _______, WORKMAN} -}, +[_GUI] = KEYMAP( + 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, + XXXXXXX, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, XXXXXXX, XXXXXXX, KC_WWWB, XXXXXXX, KC_WWWF, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, KC_SPC, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX +), + +/* Sys + * ,-----------------------------------------------------------------------------------. + * | |Qwerty| Win | |Reset | | | USB | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | |Audio | |Dvorak| | Glow | | |WorkMn|Linux | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | |Colmak| | BLE |Norman|MacOS | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_SYS] = KEYMAP( + XXXXXXX, QWERTY, WIN, XXXXXXX, RESET, XXXXXXX, XXXXXXX, OUT_USB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, AUDIO, XXXXXXX, DVORAK, XXXXXXX, GLOW, XXXXXXX, XXXXXXX, WORKMAN, LINUX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, COLEMAK, XXXXXXX, OUT_BLE, NORMAN, OSX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______ +), }; @@ -476,6 +580,32 @@ void persistant_default_layer_set(uint16_t default_layer) { default_layer_set(default_layer); } +#ifdef DOUBLESPACE_LAYER_ENABLE +void process_doublespace(bool pressed, bool *isactive, bool *otheractive, bool *isemitted) { + if (pressed) { + *isactive = true; + if (*otheractive) { + layer_on(_SPACE); + space_layer_entered = true; + } + } else { + *isactive = false; + if (space_layer_entered) { + layer_off(_SPACE); + if (!*otheractive) { + space_layer_entered = false; + } + } else { + if (!*isemitted) { + register_code(KC_SPC); + unregister_code(KC_SPC); + } + *isemitted = false; + } + } +} +#endif + bool process_record_user(uint16_t keycode, keyrecord_t *record) { // faux clicky // if (record->event.pressed) PLAY_NOTE_ARRAY(tone_click, false, 0); @@ -493,27 +623,49 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #endif #endif - bool lshifted = keyboard_report->mods & MOD_BIT(KC_LSFT); - bool rshifted = keyboard_report->mods & MOD_BIT(KC_RSFT); + bool lshift = keyboard_report->mods & MOD_BIT(KC_LSFT); + bool rshift = keyboard_report->mods & MOD_BIT(KC_RSFT); + +#ifdef DOUBLESPACE_LAYER_ENABLE + // double-space: send space immediately if any other key depressed before space is released + if ((lspace_active ^ rspace_active) + && keycode != LSPACE + && keycode != RSPACE + && record->event.pressed) + { + if (lspace_active) { + if (!lspace_emitted) { + register_code(KC_SPC); + unregister_code(KC_SPC); + } + lspace_emitted = true; + } + if (rspace_active) { + if (!rspace_emitted) { + register_code(KC_SPC); + unregister_code(KC_SPC); + } + rspace_emitted = true; + } + } +#endif switch (keycode) { - // Greek layer handling - case GREEK: - if (record->event.pressed) { - if (lshifted || rshifted) { - layer_on(_GREEKU); - layer_off(_GREEKL); - } else { - layer_on(_GREEKL); - layer_off(_GREEKU); - } - } else { - layer_off(_GREEKU); - layer_off(_GREEKL); - } + +#ifdef DOUBLESPACE_LAYER_ENABLE + // double-space enter space layer + case LSPACE: + process_doublespace(record->event.pressed, &lspace_active, &rspace_active, &lspace_emitted); + return false; + break; + case RSPACE: + process_doublespace(record->event.pressed, &rspace_active, &lspace_active, &rspace_emitted); return false; break; +#endif + // handle greek layer shift + // handle both shift = capslock case KC_LSFT: case KC_RSFT: ; @@ -523,11 +675,34 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { layer_on(_GREEKU); layer_off(_GREEKL); } else { - if (lshifted ^ rshifted) { // if only one shift is pressed + if (lshift ^ rshift) { // if only one shift was pressed layer_on(_GREEKL); layer_off(_GREEKU); } } + } else { + if (record->event.pressed) { + if (lshift ^ rshift) { // if only one shift was pressed + register_code(KC_CAPS); + unregister_code(KC_CAPS); + } + } + } + return true; + break; + + // press both ctrls to activate SYS layer + case KC_LCTL: + case KC_RCTL: + ; + bool lctrl = keyboard_report->mods & MOD_BIT(KC_LCTL); + bool rctrl = keyboard_report->mods & MOD_BIT(KC_RCTL); + if (record->event.pressed) { + if (lctrl ^ rctrl) { // if only one ctrl was pressed + layer_on(_SYS); + } + } else { + layer_off(_SYS); } return true; break; @@ -535,13 +710,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // QWERTZ style comma and dot: semicolon and colon when shifted case KC_COMM: if (record->event.pressed) { - if (lshifted || rshifted) { - if (lshifted) unregister_code(KC_LSFT); - if (rshifted) unregister_code(KC_RSFT); + if (lshift || rshift) { + if (lshift) unregister_code(KC_LSFT); + if (rshift) unregister_code(KC_RSFT); register_code(KC_SCLN); unregister_code(KC_SCLN); - if (lshifted) register_code(KC_LSFT); - if (rshifted) register_code(KC_RSFT); + if (lshift) register_code(KC_LSFT); + if (rshift) register_code(KC_RSFT); } else { register_code(KC_COMM); unregister_code(KC_COMM); @@ -565,53 +740,73 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // layout switcher case QWERTY: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); - #endif persistant_default_layer_set(1UL<<_QWERTY); } return false; break; +#ifdef LAYOUT_DVORAK + case DVORAK: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_DVORAK); + } + return false; + break; +#endif +#ifdef LAYOUT_COLEMAK case COLEMAK: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); - #endif persistant_default_layer_set(1UL<<_COLEMAK); } return false; break; +#endif +#ifdef LAYOUT_WORKMAN case WORKMAN: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_workman, false, 0); - #endif persistant_default_layer_set(1UL<<_WORKMAN); } return false; break; +#endif +#ifdef LAYOUT_NORMAN + case NORMAN: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_NORMAN); + } + return false; + break; +#endif // layer switchers case PUNC: if (record->event.pressed) { layer_on(_PUNC); - update_tri_layer(_PUNC, _EMOJI, _GUI); + update_tri_layer(_PUNC, _GREEKL, _EMOJI); } else { layer_off(_PUNC); - update_tri_layer(_PUNC, _EMOJI, _GUI); + update_tri_layer(_PUNC, _GREEKL, _EMOJI); } return false; break; - case EMOJI: + + case GREEK: if (record->event.pressed) { - layer_on(_EMOJI); - update_tri_layer(_PUNC, _EMOJI, _GUI); + if (lshift || rshift) { + layer_on(_GREEKU); + layer_off(_GREEKL); + } else { + layer_on(_GREEKL); + layer_off(_GREEKU); + update_tri_layer(_PUNC, _GREEKL, _EMOJI); + } } else { - layer_off(_EMOJI); - update_tri_layer(_PUNC, _EMOJI, _GUI); + layer_off(_GREEKU); + layer_off(_GREEKL); + update_tri_layer(_PUNC, _GREEKL, _EMOJI); } return false; break; + case NUM: if (record->event.pressed) { layer_on(_NUM); @@ -651,6 +846,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #endif return false; break; + + // faux clicky toggle, TBD + case AUDIO: + return false; + break; + } return true; } @@ -677,4 +878,17 @@ void shutdown_user() stop_all_notes(); } -#endif \ No newline at end of file +#endif + +void matrix_scan_user(void) { +} + +void led_set_user(uint8_t usb_led) { +} + +void turn_off_capslock() { + if (capslock) { + register_code(KC_CAPS); + unregister_code(KC_CAPS); + } +} -- cgit v1.2.3 From 24a40d63c9deaf4c7a1349a4dc2383621147ac41 Mon Sep 17 00:00:00 2001 From: Marvin Ramin Date: Mon, 13 Feb 2017 13:44:53 +0100 Subject: define missing KC_NO macro --- keyboards/gonnerd/keymaps/default/keymap.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/keyboards/gonnerd/keymaps/default/keymap.c b/keyboards/gonnerd/keymaps/default/keymap.c index 353648ecf..d74f949dc 100644 --- a/keyboards/gonnerd/keymaps/default/keymap.c +++ b/keyboards/gonnerd/keymaps/default/keymap.c @@ -1,14 +1,15 @@ #include "gonnerd.h" -// Keymap layers +#define __x__ KC_NO +// Keymap layers const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = KEYMAP_60( /* Base */ - KC_ESC, 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_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_LCTL,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_RSFT,KC_NO, \ - KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,MO(1), KC_RCTL \ + KC_ESC, 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_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_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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL \ ), [1] = KEYMAP_60( /* System layer to have access to RESET button */ -- cgit v1.2.3 From 903e4d31939626606e3c4856698732bef621e5e8 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Mon, 13 Feb 2017 20:13:33 +0700 Subject: Fix faux clicky toggle key --- keyboards/planck/keymaps/priyadi/keymap.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/keyboards/planck/keymaps/priyadi/keymap.c b/keyboards/planck/keymaps/priyadi/keymap.c index 2c215702b..a74481b8b 100644 --- a/keyboards/planck/keymaps/priyadi/keymap.c +++ b/keyboards/planck/keymaps/priyadi/keymap.c @@ -12,6 +12,10 @@ #include "quantum.h" // #define TOLELOT_ENABLE #define DOUBLESPACE_LAYER_ENABLE +#define LAYOUT_DVORAK +#define LAYOUT_COLEMAK +#define LAYOUT_WORKMAN +#define LAYOUT_NORMAN // so i can copy & paste stuff from my other planck-like keyboards #define KEYMAP( \ @@ -558,7 +562,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_SYS] = KEYMAP( XXXXXXX, QWERTY, WIN, XXXXXXX, RESET, XXXXXXX, XXXXXXX, OUT_USB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, AUDIO, XXXXXXX, DVORAK, XXXXXXX, GLOW, XXXXXXX, XXXXXXX, WORKMAN, LINUX, XXXXXXX, XXXXXXX, + XXXXXXX, FC_TOG, XXXXXXX, DVORAK, XXXXXXX, GLOW, XXXXXXX, XXXXXXX, WORKMAN, LINUX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, COLEMAK, XXXXXXX, OUT_BLE, NORMAN, OSX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______ ), @@ -852,8 +856,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; // faux clicky toggle, TBD - case AUDIO: - return false; + case FC_TOG: + return true; break; } -- cgit v1.2.3 From 15e2dbb2a991945d354f7ffdb34a9eac2815bd12 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Mon, 13 Feb 2017 22:18:36 +0700 Subject: move GRV to ESC position --- keyboards/handwired/promethium/keymaps/priyadi/keymap.c | 8 ++++---- keyboards/planck/keymaps/priyadi/keymap.c | 9 +++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index a24a79aa1..68f79f5f7 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -616,8 +616,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_PUNC] = KEYMAP( - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_GRV , - XXXXXXX, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, XXXXXXX, KC_LPRN, KC_RPRN, KC_LABK, KC_RABK, XXXXXXX, + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + KC_GRV, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, XXXXXXX, KC_LPRN, KC_RPRN, KC_LABK, KC_RABK, _______, KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, XXXXXXX, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_COLN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), @@ -634,8 +634,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_NUM] = KEYMAP( - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, S(KC_A), KC_7, KC_8, KC_9, S(KC_D), KC_GRV, - XXXXXXX, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, S(KC_B), KC_4, KC_5, KC_6, S(KC_E), _______, + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, S(KC_A), KC_7, KC_8, KC_9, 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_1, KC_2, KC_3, S(KC_F), KC_COLN, _______, _______, _______, _______, _______, _______, _______, KC_0, KC_COMM, KC_DOT, KC_X, _______ ), diff --git a/keyboards/planck/keymaps/priyadi/keymap.c b/keyboards/planck/keymaps/priyadi/keymap.c index a74481b8b..8f721b77a 100644 --- a/keyboards/planck/keymaps/priyadi/keymap.c +++ b/keyboards/planck/keymaps/priyadi/keymap.c @@ -43,6 +43,7 @@ #define KC_RALT MT(MOD_RALT, KC_SLCK) bool capslock = false; + #ifdef DOUBLESPACE_LAYER_ENABLE bool lspace_active = false; bool rspace_active = false; @@ -435,8 +436,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_PUNC] = KEYMAP( - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_GRV , - XXXXXXX, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, XXXXXXX, KC_LPRN, KC_RPRN, KC_LABK, KC_RABK, XXXXXXX, + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + KC_GRV, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, XXXXXXX, KC_LPRN, KC_RPRN, KC_LABK, KC_RABK, _______, KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, XXXXXXX, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_COLN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), @@ -453,8 +454,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_NUM] = KEYMAP( - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, S(KC_A), KC_7, KC_8, KC_9, S(KC_D), KC_GRV, - XXXXXXX, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, S(KC_B), KC_4, KC_5, KC_6, S(KC_E), _______, + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, S(KC_A), KC_7, KC_8, KC_9, 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_1, KC_2, KC_3, S(KC_F), KC_COLN, _______, _______, _______, _______, _______, _______, _______, KC_0, KC_COMM, KC_DOT, KC_X, _______ ), -- cgit v1.2.3 From c2531ff43b9929382e97c5cbce6f4abc4559bd3a Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Tue, 14 Feb 2017 00:44:02 +0700 Subject: Func + Num = Punc --- .../handwired/promethium/keymaps/priyadi/keymap.c | 18 +++++++++--------- keyboards/planck/keymaps/priyadi/keymap.c | 16 ++++++++-------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 68f79f5f7..4e33d61f3 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -52,13 +52,13 @@ enum layers { _NORMAN, _DEFAULT_LAYER_MAX = _NORMAN, - _PUNC, - _NUM, - _FUNC, - _GREEKU, _GREEKL, + _NUM, + _FUNC, + _PUNC, + _EMOJI, _GUI, _SYS, @@ -637,7 +637,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, S(KC_A), KC_7, KC_8, KC_9, 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_1, KC_2, KC_3, S(KC_F), KC_COLN, - _______, _______, _______, _______, _______, _______, _______, KC_0, KC_COMM, KC_DOT, KC_X, _______ + _______, _______, _______, _______, _______, _______, _______, LT(_PUNC, KC_0), KC_COMM, KC_DOT, KC_X, _______ ), /* Func @@ -652,10 +652,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_FUNC] = KEYMAP( - XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, KC_DEL, - XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8,KC_PSCREEN,XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_INS, - _______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_END, XXXXXXX, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, KC_DEL, + XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, KC_PSCR, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_INS, + _______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_END, XXXXXXX, _______, + _______, _______, _______, _______, PUNC, _______, _______, _______, _______, _______, _______, _______ ), /* Uppercase Greek diff --git a/keyboards/planck/keymaps/priyadi/keymap.c b/keyboards/planck/keymaps/priyadi/keymap.c index 8f721b77a..d88eb3dbf 100644 --- a/keyboards/planck/keymaps/priyadi/keymap.c +++ b/keyboards/planck/keymaps/priyadi/keymap.c @@ -63,13 +63,13 @@ enum layers { _NORMAN, _DEFAULT_LAYER_MAX = _NORMAN, - _PUNC, - _NUM, - _FUNC, - _GREEKU, _GREEKL, + _NUM, + _FUNC, + _PUNC, + _EMOJI, _GUI, _SYS, @@ -457,7 +457,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, S(KC_A), KC_7, KC_8, KC_9, 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_1, KC_2, KC_3, S(KC_F), KC_COLN, - _______, _______, _______, _______, _______, _______, _______, KC_0, KC_COMM, KC_DOT, KC_X, _______ + _______, _______, _______, _______, _______, _______, _______, LT(_PUNC, KC_0), KC_COMM, KC_DOT, KC_X, _______ ), /* Func @@ -472,10 +472,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_FUNC] = KEYMAP( - XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, KC_DEL, - XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8,KC_PSCREEN,XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_INS, + XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, KC_DEL, + XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, KC_PSCR, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_INS, _______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_END, XXXXXXX, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, PUNC, _______, _______, _______, _______, _______, _______, _______ ), /* Uppercase Greek -- cgit v1.2.3 From 02662e386923ba3d47d75d85e22672ef9fb46827 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Tue, 14 Feb 2017 00:46:06 +0700 Subject: Add explicit punctuation key for greek layers --- keyboards/handwired/promethium/keymaps/priyadi/keymap.c | 12 ++++++------ keyboards/planck/keymaps/priyadi/keymap.c | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 4e33d61f3..96d0d940e 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -670,9 +670,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_GREEKU] = KEYMAP( - _______, _______, _______,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), _______, _______, - _______,X(UZETA), X(UCHI), X(UPSI),X(UOMEG),X(UBETA), X(UNU), X(UMU), _______, _______, _______, _______, + _______, 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, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), @@ -688,9 +688,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_GREEKL] = KEYMAP( - _______, _______,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), _______, _______, - _______,X(LZETA), X(LCHI), X(LPSI),X(LOMEG),X(LBETA), X(LNU), X(LMU), _______, _______, _______, _______, + _______, 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, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), diff --git a/keyboards/planck/keymaps/priyadi/keymap.c b/keyboards/planck/keymaps/priyadi/keymap.c index d88eb3dbf..c8d3f1eae 100644 --- a/keyboards/planck/keymaps/priyadi/keymap.c +++ b/keyboards/planck/keymaps/priyadi/keymap.c @@ -490,9 +490,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_GREEKU] = KEYMAP( - _______, _______, _______,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), _______, _______, - _______,X(UZETA), X(UCHI), X(UPSI),X(UOMEG),X(UBETA), X(UNU), X(UMU), _______, _______, _______, _______, + _______, 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, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), @@ -508,9 +508,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_GREEKL] = KEYMAP( - _______, _______,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), _______, _______, - _______,X(LZETA), X(LCHI), X(LPSI),X(LOMEG),X(LBETA), X(LNU), X(LMU), _______, _______, _______, _______, + _______, 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, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), -- cgit v1.2.3 From 7ae677dcb7f54960a6f58c85f3e3430bfc2797fc Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Tue, 14 Feb 2017 03:18:34 +0700 Subject: remove stand alone punc layer switcher for now --- keyboards/handwired/promethium/keymaps/priyadi/keymap.c | 4 +++- keyboards/planck/keymaps/priyadi/keymap.c | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 96d0d940e..907da21cb 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -92,6 +92,8 @@ enum planck_keycodes { LSPACE, RSPACE, GLOW, + + // stub AUDIO }; @@ -518,7 +520,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_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, - KC_LCTL, KC_LALT, KC_LGUI, PUNC, NUM, LSPACE, RSPACE, FUNC, GREEK, KC_RGUI, KC_RALT, KC_RCTL + KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, NUM, LSPACE, RSPACE, FUNC, GREEK, KC_RGUI, KC_RALT, KC_RCTL ), /* Dvorak diff --git a/keyboards/planck/keymaps/priyadi/keymap.c b/keyboards/planck/keymaps/priyadi/keymap.c index c8d3f1eae..7a6305112 100644 --- a/keyboards/planck/keymaps/priyadi/keymap.c +++ b/keyboards/planck/keymaps/priyadi/keymap.c @@ -103,7 +103,6 @@ enum planck_keycodes { LSPACE, RSPACE, GLOW, - AUDIO, // stubs OUT_BLE @@ -338,7 +337,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_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, - KC_LCTL, KC_LALT, KC_LGUI, PUNC, NUM, LSPACE, RSPACE, FUNC, GREEK, KC_RGUI, KC_RALT, KC_RCTL + KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, NUM, LSPACE, RSPACE, FUNC, GREEK, KC_RGUI, KC_RALT, KC_RCTL ), /* Dvorak -- cgit v1.2.3 From 6c692fca7df7178c2abe673b6d5b1db686e22190 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Tue, 14 Feb 2017 03:58:12 +0700 Subject: Alt-tab handling in GUI layer --- keyboards/handwired/promethium/keymaps/priyadi/keymap.c | 16 +++++++++++++--- keyboards/planck/keymaps/priyadi/keymap.c | 14 ++++++++++++-- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 907da21cb..5829d2e43 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -720,14 +720,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+-------------+------+------+------+------+------| * | | | Vol- | Mute | Vol+ | | | Prev | | Next | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | Prev | Play | Next | | | | | | | | + * | | | Prev | Play | Next | BTab | Tab | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ [_GUI] = KEYMAP( 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, - XXXXXXX, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, XXXXXXX, XXXXXXX, KC_WWWB, XXXXXXX, KC_WWWF, XXXXXXX, XXXXXXX, + KC_ESC, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU,S(KC_TAB),KC_TAB, KC_WWWB, XXXXXXX, KC_WWWF, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, KC_SPC, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX ), @@ -763,11 +763,13 @@ void process_doublespace(bool pressed, bool *isactive, bool *otheractive, bool * *isactive = true; if (*otheractive) { layer_on(_SPACE); + register_code(KC_LALT); // sends alt and enter layer space_layer_entered = true; } } else { *isactive = false; if (space_layer_entered) { + unregister_code(KC_LALT); // release alt and exit layer layer_off(_SPACE); if (!*otheractive) { space_layer_entered = false; @@ -786,6 +788,7 @@ void process_doublespace(bool pressed, bool *isactive, bool *otheractive, bool * bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool lshift = keyboard_report->mods & MOD_BIT(KC_LSFT); bool rshift = keyboard_report->mods & MOD_BIT(KC_RSFT); + uint8_t layer = biton32(layer_state); #ifdef DOUBLESPACE_LAYER_ENABLE // double-space: send space immediately if any other key depressed before space is released @@ -809,6 +812,14 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { rspace_emitted = true; } } + + if (layer == _SPACE && keycode != S(KC_TAB) && keycode != KC_TAB && keycode != KC_ESC) { + if (record->event.pressed) { + unregister_code(KC_LALT); + } else { + register_code(KC_LALT); + } + } #endif switch (keycode) { @@ -830,7 +841,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KC_LSFT: case KC_RSFT: ; - uint8_t layer = biton32(layer_state); if (layer == _GREEKU || layer == _GREEKL) { if (record->event.pressed) { layer_on(_GREEKU); diff --git a/keyboards/planck/keymaps/priyadi/keymap.c b/keyboards/planck/keymaps/priyadi/keymap.c index 7a6305112..c279bfcd0 100644 --- a/keyboards/planck/keymaps/priyadi/keymap.c +++ b/keyboards/planck/keymaps/priyadi/keymap.c @@ -537,14 +537,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+-------------+------+------+------+------+------| * | | | Vol- | Mute | Vol+ | | | Prev | | Next | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | Prev | Play | Next | | | | | | | | + * | | | Prev | Play | Next | BTab | Tab | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ [_GUI] = KEYMAP( 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, - XXXXXXX, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, XXXXXXX, XXXXXXX, KC_WWWB, XXXXXXX, KC_WWWF, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, S(KC_TAB),KC_TAB, KC_WWWB, XXXXXXX, KC_WWWF, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, KC_SPC, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX ), @@ -594,11 +594,13 @@ void process_doublespace(bool pressed, bool *isactive, bool *otheractive, bool * *isactive = true; if (*otheractive) { layer_on(_SPACE); + register_code(KC_LALT); // sends alt and enter layer space_layer_entered = true; } } else { *isactive = false; if (space_layer_entered) { + unregister_code(KC_LALT); // release alt and exit layer layer_off(_SPACE); if (!*otheractive) { space_layer_entered = false; @@ -656,6 +658,14 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { rspace_emitted = true; } } + + if (layer == _SPACE && keycode != S(KC_TAB) && keycode != KC_TAB && keycode != KC_ESC) { + if (record->event.pressed) { + unregister_code(KC_LALT); + } else { + register_code(KC_LALT); + } + } #endif switch (keycode) { -- cgit v1.2.3 From 3758cfd95fe25d6928cf6650b8be3301335dada9 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Tue, 14 Feb 2017 04:17:09 +0700 Subject: GUI layer fixes --- keyboards/handwired/promethium/keymaps/priyadi/keymap.c | 4 ++-- keyboards/planck/keymaps/priyadi/keymap.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 5829d2e43..08a425823 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -729,7 +729,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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, KC_VOLD, KC_MUTE, KC_VOLU,S(KC_TAB),KC_TAB, KC_WWWB, XXXXXXX, KC_WWWF, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, KC_SPC, KC_SPC, 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 ), /* Sys @@ -813,7 +813,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } } - if (layer == _SPACE && keycode != S(KC_TAB) && keycode != KC_TAB && keycode != KC_ESC) { + if (layer == _SPACE && keycode != S(KC_TAB) && keycode != KC_TAB && keycode != KC_ESC && keycode != XXXXXXX) { if (record->event.pressed) { unregister_code(KC_LALT); } else { diff --git a/keyboards/planck/keymaps/priyadi/keymap.c b/keyboards/planck/keymaps/priyadi/keymap.c index c279bfcd0..20bfa3958 100644 --- a/keyboards/planck/keymaps/priyadi/keymap.c +++ b/keyboards/planck/keymaps/priyadi/keymap.c @@ -546,7 +546,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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, XXXXXXX, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, S(KC_TAB),KC_TAB, KC_WWWB, XXXXXXX, KC_WWWF, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, KC_SPC, KC_SPC, 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 ), /* Sys @@ -659,7 +659,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } } - if (layer == _SPACE && keycode != S(KC_TAB) && keycode != KC_TAB && keycode != KC_ESC) { + if (layer == _SPACE && keycode != S(KC_TAB) && keycode != KC_TAB && keycode != KC_ESC && keycode != XXXXXXX) { if (record->event.pressed) { unregister_code(KC_LALT); } else { -- cgit v1.2.3 From 3272821d32e79cafbf4d96dae811c5d57954a4b1 Mon Sep 17 00:00:00 2001 From: Stanley Lai Date: Mon, 13 Feb 2017 18:09:02 -0800 Subject: Added support for XD60v2 with RGB underglow and LED backlight support --- keyboards/xd60/config.h | 22 +++++++++++--- keyboards/xd60/keymaps/default/keymap.c | 40 +++++++------------------ keyboards/xd60/keymaps/stanleylai/keymap.c | 47 +++++++++++++----------------- keyboards/xd60/rules.mk | 2 +- keyboards/xd60/xd60.h | 18 ++++-------- 5 files changed, 57 insertions(+), 72 deletions(-) diff --git a/keyboards/xd60/config.h b/keyboards/xd60/config.h index 13ae29063..d3052b403 100644 --- a/keyboards/xd60/config.h +++ b/keyboards/xd60/config.h @@ -25,8 +25,8 @@ along with this program. If not, see . #define PRODUCT_ID 0x6060 #define DEVICE_VER 0x0001 #define MANUFACTURER XIUDI -#define PRODUCT XD60 -#define DESCRIPTION XD60 Keyboard by XIUDI +#define PRODUCT XD60v2 +#define DESCRIPTION XD60 v2 Keyboard PCB by XIUDI /* key matrix size */ #define MATRIX_ROWS 5 @@ -46,14 +46,28 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3 } #define UNUSED_PINS +/* Backlight Setup + * Only 1 level, since XD60's backlight implementation doesn't seem compatible with QMK for variable brightness + * Use BL_STEP to toggle LEDs instead, as BL_TOGG can be inconsistent (depending on current level) + */ +#define BACKLIGHT_PIN F5 +#define BACKLIGHT_LEVELS 1 + /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 -/* number of backlight levels */ -#define BACKLIGHT_LEVELS 3 +/* RGB Underglow + * F6 PIN for XD60v2 that has pre-soldered WS2812 LEDs + */ +#define RGB_DI_PIN F6 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 6 // 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 diff --git a/keyboards/xd60/keymaps/default/keymap.c b/keyboards/xd60/keymaps/default/keymap.c index ea85c02a3..11be9afca 100644 --- a/keyboards/xd60/keymaps/default/keymap.c +++ b/keyboards/xd60/keymaps/default/keymap.c @@ -9,56 +9,38 @@ 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_LBRC, KC_RBRC, KC_BSPC, \ 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_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_RSFT, KC_UP, KC_DEL, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, F(0), KC_LEFT, KC_DOWN, KC_RIGHT), // 1: Function Layer KEYMAP( RESET, 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_F13, KC_F14, \ KC_NO, KC_WH_U, KC_UP, KC_WH_D, KC_BSPC,KC_HOME,KC_CALC,KC_NO, KC_INS, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_DEL, \ KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, KC_END, KC_PGDN,KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGUP, KC_NO, KC_ENT, \ - KC_LSFT, KC_NO, KC_NO, KC_APP, BL_TOGG,BL_DEC, BL_INC, KC_VOLD,KC_VOLU,KC_MUTE, KC_END, KC_PGDN, KC_RSFT, KC_PGUP, KC_NO, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, F(0), KC_HOME, KC_PGDOWN,KC_END), + KC_LSFT, KC_NO, KC_NO, KC_APP, BL_STEP,KC_NO, KC_NO, KC_VOLD,KC_VOLU,KC_MUTE, KC_END, KC_PGDN, KC_RSFT, KC_PGUP, KC_INS, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, F(0), KC_HOME, KC_PGDOWN,KC_END), }; +// Custom Actions const uint16_t PROGMEM fn_actions[] = { [0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay }; +// Macros const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - // MACRODOWN only works in this function + // MACRODOWN only works in this function switch(id) { case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; + if (record->event.pressed) { register_code(KC_RSFT); } + else { unregister_code(KC_RSFT); } + break; } return MACRO_NONE; }; +// Loop void matrix_scan_user(void) { - - // Layer LED indicators - uint32_t layer = layer_state; - - if (layer & (1<<1)) { - xd60_esc_led_on(); - } else { - xd60_esc_led_off(); - } - - /* - if (layer & (1<<2)) { - xd60_poker_leds_on(); - xd60_esc_led_on(); - } else { - xd60_poker_leds_off(); - xd60_esc_led_off(); - } - */ + // Empty }; diff --git a/keyboards/xd60/keymaps/stanleylai/keymap.c b/keyboards/xd60/keymaps/stanleylai/keymap.c index a84ee0f89..4d3032a10 100644 --- a/keyboards/xd60/keymaps/stanleylai/keymap.c +++ b/keyboards/xd60/keymaps/stanleylai/keymap.c @@ -8,53 +8,48 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, 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_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, \ F(0), 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_RSFT, KC_UP, KC_DEL, \ + KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, F(1), KC_UP, KC_DEL, \ KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT), // 1: Function Layer KEYMAP( RESET, 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_F13, KC_F14, \ - KC_CAPS, KC_MPRV, KC_UP, KC_MNXT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, BL_STEP, BL_TOGG, KC_DEL, \ + KC_CAPS, KC_MPRV, KC_UP, KC_MNXT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL, \ F(0), KC_LEFT, KC_DOWN, KC_RIGHT,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ENT, \ - KC_LSFT, KC_NO, KC_VOLD, KC_MUTE, KC_VOLU,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_RSFT, KC_PGUP, KC_INS, \ + KC_LSFT, KC_NO, KC_VOLD, KC_MUTE, KC_VOLU,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PGUP, KC_INS, \ KC_LCTL, KC_LALT, KC_LGUI, KC_MPLY, KC_RGUI, KC_RALT, KC_HOME, KC_PGDOWN,KC_END), + // 2: RGB Layer + 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, \ + BL_STEP, RGB_TOG, RGB_MOD, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, RGB_HUI, RGB_SAI, RGB_VAI, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, KC_NO, RGB_HUD, RGB_SAD, RGB_VAD,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, F(1), KC_NO, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), + }; +// Custom Actions const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay + [0] = ACTION_LAYER_MOMENTARY(1), // to Function Layer + [1] = ACTION_LAYER_MOMENTARY(2), // to RGB Layer }; +// Macros const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - // MACRODOWN only works in this function + // MACRODOWN only works in this function switch(id) { case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; + if (record->event.pressed) { register_code(KC_RSFT); } + else { unregister_code(KC_RSFT); } + break; } return MACRO_NONE; }; +// Loop void matrix_scan_user(void) { - - // Layer LED indicators - uint32_t layer = layer_state; - - if (layer & (1<<1)) { - xd60_wasd_leds_on(); - xd60_fn_led_on(); - xd60_esc_led_on(); - xd60_poker_leds_on(); - } else { - xd60_wasd_leds_off(); - xd60_fn_led_off(); - xd60_esc_led_off(); - xd60_poker_leds_off(); - } + // Empty }; diff --git a/keyboards/xd60/rules.mk b/keyboards/xd60/rules.mk index e0b92121d..174c3ec84 100644 --- a/keyboards/xd60/rules.mk +++ b/keyboards/xd60/rules.mk @@ -61,5 +61,5 @@ 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. +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/xd60/xd60.h b/keyboards/xd60/xd60.h index 36442cb52..dd5f63c0c 100644 --- a/keyboards/xd60/xd60.h +++ b/keyboards/xd60/xd60.h @@ -6,24 +6,18 @@ /* XD60 LEDs * GPIO pads - * 0 F7 WASD LEDs - * 1 F6 ESC LED - * 2 F5 FN LED - * 3 F4 POKER Arrow LEDs + * 0 F7 not connected + * 1 F6 RGB PWM Underglow + * 2 F5 Backlight LED + * 3 F4 not connected * B2 Capslock LED * B0 not connected */ inline void xd60_caps_led_on(void) { DDRB |= (1<<2); PORTB &= ~(1<<2); } -inline void xd60_poker_leds_on(void) { DDRF |= (1<<4); PORTF &= ~(1<<4); } -inline void xd60_fn_led_on(void) { DDRF |= (1<<5); PORTF &= ~(1<<5); } -inline void xd60_esc_led_on(void) { DDRF |= (1<<6); PORTF &= ~(1<<6); } -inline void xd60_wasd_leds_on(void) { DDRF |= (1<<7); PORTF &= ~(1<<7); } +inline void xd60_bl_led_on(void) { DDRF |= (1<<5); PORTF &= ~(1<<5); } inline void xd60_caps_led_off(void) { DDRB &= ~(1<<2); PORTB &= ~(1<<2); } -inline void xd60_poker_leds_off(void) { DDRF &= ~(1<<4); PORTF &= ~(1<<4); } -inline void xd60_fn_led_off(void) { DDRF &= ~(1<<5); PORTF &= ~(1<<5); } -inline void xd60_esc_led_off(void) { DDRF &= ~(1<<6); PORTF &= ~(1<<6); } -inline void xd60_wasd_leds_off(void) { DDRF &= ~(1<<7); PORTF &= ~(1<<7); } +inline void xd60_bl_led_off(void) { DDRF &= ~(1<<5); PORTF &= ~(1<<5); } /* XD60 Keymap Definition Macro */ #define KEYMAP( \ -- cgit v1.2.3 From 64f9779fe54facecdef9d1a6a7c1d893f79ca20e Mon Sep 17 00:00:00 2001 From: lambdalisue Date: Tue, 14 Feb 2017 14:12:54 +0900 Subject: Add TAPPING_FORCE_HOLD to regulate behaviour See #889 for the detail. --- doc/keymap.md | 3 +++ tmk_core/common/action_tapping.c | 9 +++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/doc/keymap.md b/doc/keymap.md index 6f2a663fc..2b0d2cd95 100644 --- a/doc/keymap.md +++ b/doc/keymap.md @@ -549,6 +549,9 @@ Layer switching with tap key: [dual_role]: http://en.wikipedia.org/wiki/Modifier_key#Dual-role_keys +When user hold a key after tap, it repeat the tapped key rather to hold a modifier key. +If you prefer to hold a modifier instead, define `TAPPING_FORCE_HOLD` in `config.h`. +See https://github.com/qmk/qmk_firmware/issues/889 for the detail. ### 4.2 Tap Toggle This is a feature to assign both toggle layer and momentary switch layer action to just same one physical key. It works as momentary layer switch when holding a key but toggle switch with several taps. diff --git a/tmk_core/common/action_tapping.c b/tmk_core/common/action_tapping.c index e16e11be7..66044d8bc 100644 --- a/tmk_core/common/action_tapping.c +++ b/tmk_core/common/action_tapping.c @@ -228,6 +228,7 @@ bool process_tapping(keyrecord_t *keyp) if (WITHIN_TAPPING_TERM(event)) { if (event.pressed) { if (IS_TAPPING_KEY(event.key)) { +#ifndef TAPPING_FORCE_HOLD if (!tapping_key.tap.interrupted && tapping_key.tap.count > 0) { // sequential tap. keyp->tap = tapping_key.tap; @@ -237,11 +238,11 @@ bool process_tapping(keyrecord_t *keyp) tapping_key = *keyp; debug_tapping_key(); return true; - } else { - // FIX: start new tap again - tapping_key = *keyp; - return true; } +#endif + // FIX: start new tap again + tapping_key = *keyp; + return true; } else if (is_tap_key(event.key)) { // Sequential tap can be interfered with other tap key. debug("Tapping: Start with interfering other tap.\n"); -- cgit v1.2.3 From df311c7b40cb6e611a522331dca9836f6eef9dce Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Wed, 15 Feb 2017 05:01:03 +0700 Subject: num, func, punc 3state layer done right --- .../handwired/promethium/keymaps/priyadi/keymap.c | 99 ++++++++++------------ keyboards/handwired/promethium/promethium.h | 4 +- 2 files changed, 46 insertions(+), 57 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 08a425823..9f07a7d08 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -56,7 +56,7 @@ enum layers { _GREEKL, _NUM, - _FUNC, + _FUN, _PUNC, _EMOJI, @@ -76,9 +76,9 @@ enum planck_keycodes { NORMAN, // layer switchers - PUNC, - NUM, - FUNC, + // PUNC, + // NUM, + // FUN, EMOJI, GUI, GREEK, @@ -92,11 +92,16 @@ enum planck_keycodes { LSPACE, RSPACE, GLOW, + FOR0, // stub AUDIO }; +#define NUM MO(_NUM) +#define FUN MO(_FUN) +#define FUN0 LT(_FUN, KC_0) + // unicode map enum unicode_name { @@ -369,14 +374,14 @@ const uint8_t PROGMEM LED_MODS[] = { const uint8_t PROGMEM LED_FN[] = { LED_PUNC, LED_NUM, - LED_FUNC, + LED_FUN, LED_EMOJI }; const uint8_t PROGMEM LED_INDICATORS[] = { LED_IND_EMOJI, LED_IND_NUM, - LED_IND_FUNC, + LED_IND_FUN, LED_IND_BATTERY, LED_IND_USB, LED_IND_BLUETOOTH, @@ -435,7 +440,7 @@ void led_reset(void) { void led_set_layer_indicator(void) { static uint8_t oldlayer = 255; - rgbsps_set(LED_IND_FUNC, 0, 0, 0); + rgbsps_set(LED_IND_FUN, 0, 0, 0); // rgbsps_set(LED_IND_NUM, 0, 0, 0); rgbsps_set(LED_IND_EMOJI, 0, 0, 0); @@ -454,8 +459,8 @@ void led_set_layer_indicator(void) { } switch(layer) { - case _FUNC: - rgbsps_set(LED_IND_FUNC, 15, 0, 0); + case _FUN: + rgbsps_set(LED_IND_FUN, 15, 0, 0); break; // case _NUM: // rgbsps_set(LED_IND_NUM, 0, 0, 15); @@ -464,7 +469,7 @@ void led_set_layer_indicator(void) { rgbsps_set(LED_IND_EMOJI, 15, 15, 0); break; default: - rgbsps_set(LED_IND_FUNC, 3, 3, 3); + rgbsps_set(LED_IND_FUN, 3, 3, 3); // rgbsps_set(LED_IND_NUM, 3, 3, 3); rgbsps_set(LED_IND_EMOJI, 3, 3, 3); } @@ -520,7 +525,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_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, - KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, NUM, LSPACE, RSPACE, FUNC, GREEK, KC_RGUI, KC_RALT, KC_RCTL + KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, NUM, LSPACE, RSPACE, FUN, GREEK, KC_RGUI, KC_RALT, KC_RCTL ), /* Dvorak @@ -636,10 +641,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_NUM] = KEYMAP( - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, S(KC_A), KC_7, KC_8, KC_9, 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_1, KC_2, KC_3, S(KC_F), KC_COLN, - _______, _______, _______, _______, _______, _______, _______, LT(_PUNC, KC_0), KC_COMM, KC_DOT, KC_X, _______ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, S(KC_A), KC_7, KC_8, KC_9, 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_1, KC_2, KC_3, S(KC_F), KC_COLN, + _______, _______, _______, _______, _______, _______, _______, FUN0 , KC_COMM, KC_DOT, KC_X, _______ ), /* Func @@ -653,11 +658,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_FUNC] = KEYMAP( - XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, KC_DEL, - XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, KC_PSCR, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_INS, - _______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_END, XXXXXXX, _______, - _______, _______, _______, _______, PUNC, _______, _______, _______, _______, _______, _______, _______ +[_FUN] = KEYMAP( + XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, KC_DEL, + XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, KC_PSCR, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_INS, + _______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_END, XXXXXXX, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), /* Uppercase Greek @@ -785,10 +790,25 @@ void process_doublespace(bool pressed, bool *isactive, bool *otheractive, bool * } #endif +uint32_t layer_state_set_kb(uint32_t state) +{ + // turn on punc layer if both fun & num are on + if ((state & ((1UL<<_NUM) | (1UL<<_FUN))) == ((1UL<<_NUM) | (1UL<<_FUN))) { + state |= (1UL<<_PUNC); + } else { + state &= ~(1UL<<_PUNC); + } + return state; +} + bool process_record_user(uint16_t keycode, keyrecord_t *record) { - bool lshift = keyboard_report->mods & MOD_BIT(KC_LSFT); - bool rshift = keyboard_report->mods & MOD_BIT(KC_RSFT); - uint8_t layer = biton32(layer_state); + static bool lshift = false; + static bool rshift = false; + static uint8_t layer = 0; + + lshift = keyboard_report->mods & MOD_BIT(KC_LSFT); + rshift = keyboard_report->mods & MOD_BIT(KC_RSFT); + layer = biton32(layer_state); #ifdef DOUBLESPACE_LAYER_ENABLE // double-space: send space immediately if any other key depressed before space is released @@ -949,17 +969,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #endif // layer switcher - case PUNC: - if (record->event.pressed) { - layer_on(_PUNC); - update_tri_layer(_PUNC, _GREEKL, _EMOJI); - } else { - layer_off(_PUNC); - update_tri_layer(_PUNC, _GREEKL, _EMOJI); - } - return false; - break; - + // case GREEK: if (record->event.pressed) { if (lshift || rshift) { @@ -968,31 +978,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } else { layer_on(_GREEKL); layer_off(_GREEKU); - update_tri_layer(_PUNC, _GREEKL, _EMOJI); } } else { layer_off(_GREEKU); layer_off(_GREEKL); - update_tri_layer(_PUNC, _GREEKL, _EMOJI); - } - return false; - break; - - case NUM: - if (record->event.pressed) { - turn_off_capslock(); - layer_on(_NUM); - } else { - layer_off(_NUM); - } - return false; - break; - - case FUNC: - if (record->event.pressed) { - layer_on(_FUNC); - } else { - layer_off(_FUNC); } return false; break; diff --git a/keyboards/handwired/promethium/promethium.h b/keyboards/handwired/promethium/promethium.h index d6fea76ce..caad5258e 100644 --- a/keyboards/handwired/promethium/promethium.h +++ b/keyboards/handwired/promethium/promethium.h @@ -33,7 +33,7 @@ enum led_sequence { LED_IND_USB, LED_IND_BATTERY, - LED_IND_FUNC, + LED_IND_FUN, LED_IND_NUM, LED_IND_EMOJI, @@ -60,7 +60,7 @@ enum led_sequence { LED_U, LED_J, LED_M, - LED_FUNC, + LED_FUN, LED_RSPC, LED_N, -- cgit v1.2.3 From d369bfb83a74d94ed0fbb13f8ee3a8a1146da770 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Wed, 15 Feb 2017 05:02:15 +0700 Subject: Add layer_state_set_kb hook --- tmk_core/common/action_layer.c | 6 ++++++ tmk_core/common/action_layer.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/tmk_core/common/action_layer.c b/tmk_core/common/action_layer.c index a3c757964..3363a2e53 100644 --- a/tmk_core/common/action_layer.c +++ b/tmk_core/common/action_layer.c @@ -57,8 +57,14 @@ void default_layer_xor(uint32_t state) */ uint32_t layer_state = 0; +__attribute__((weak)) +uint32_t layer_state_set_kb(uint32_t state) { + return state; +} + static void layer_state_set(uint32_t state) { + state = layer_state_set_kb(state); dprint("layer_state: "); layer_debug(); dprint(" to "); layer_state = state; diff --git a/tmk_core/common/action_layer.h b/tmk_core/common/action_layer.h index 025cf5420..fc714700d 100644 --- a/tmk_core/common/action_layer.h +++ b/tmk_core/common/action_layer.h @@ -69,6 +69,8 @@ void layer_xor(uint32_t state); #define layer_xor(state) #define layer_debug() +__attribute__((weak)) +void layer_state_set_kb(uint32_t oldstate, uint32_t newstate); #endif /* pressed actions cache */ -- cgit v1.2.3 From 3c8c3ebe3ffad774f0c3019654a5e185d37b8ebc Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Wed, 15 Feb 2017 05:19:31 +0700 Subject: Bug fix & added default_layer_state_set_kb --- tmk_core/common/action_layer.c | 6 ++++++ tmk_core/common/action_layer.h | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/tmk_core/common/action_layer.c b/tmk_core/common/action_layer.c index 3363a2e53..58d919a04 100644 --- a/tmk_core/common/action_layer.c +++ b/tmk_core/common/action_layer.c @@ -16,8 +16,14 @@ */ uint32_t default_layer_state = 0; +__attribute__((weak)) +uint32_t default_layer_state_set_kb(uint32_t state) { + return state; +} + static void default_layer_state_set(uint32_t state) { + state = default_layer_state_set_kb(state); debug("default_layer_state: "); default_layer_debug(); debug(" to "); default_layer_state = state; diff --git a/tmk_core/common/action_layer.h b/tmk_core/common/action_layer.h index fc714700d..785bb5be4 100644 --- a/tmk_core/common/action_layer.h +++ b/tmk_core/common/action_layer.h @@ -27,7 +27,10 @@ along with this program. If not, see . */ extern uint32_t default_layer_state; void default_layer_debug(void); -void default_layer_set(uint32_t state); +uint32_t default_layer_set(uint32_t state); + +__attribute__((weak)) +void default_layer_state_set_kb(uint32_t state); #ifndef NO_ACTION_LAYER /* bitwise operation */ @@ -70,7 +73,7 @@ void layer_xor(uint32_t state); #define layer_debug() __attribute__((weak)) -void layer_state_set_kb(uint32_t oldstate, uint32_t newstate); +uint32_t layer_state_set_kb(uint32_t state); #endif /* pressed actions cache */ -- cgit v1.2.3 From d96175937bfa9f700d9ee54c20e5d963c12d02df Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Wed, 15 Feb 2017 05:19:31 +0700 Subject: Bug fix & added default_layer_state_set_kb --- tmk_core/common/action_layer.c | 6 ++++++ tmk_core/common/action_layer.h | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/tmk_core/common/action_layer.c b/tmk_core/common/action_layer.c index 3363a2e53..58d919a04 100644 --- a/tmk_core/common/action_layer.c +++ b/tmk_core/common/action_layer.c @@ -16,8 +16,14 @@ */ uint32_t default_layer_state = 0; +__attribute__((weak)) +uint32_t default_layer_state_set_kb(uint32_t state) { + return state; +} + static void default_layer_state_set(uint32_t state) { + state = default_layer_state_set_kb(state); debug("default_layer_state: "); default_layer_debug(); debug(" to "); default_layer_state = state; diff --git a/tmk_core/common/action_layer.h b/tmk_core/common/action_layer.h index fc714700d..785bb5be4 100644 --- a/tmk_core/common/action_layer.h +++ b/tmk_core/common/action_layer.h @@ -27,7 +27,10 @@ along with this program. If not, see . */ extern uint32_t default_layer_state; void default_layer_debug(void); -void default_layer_set(uint32_t state); +uint32_t default_layer_set(uint32_t state); + +__attribute__((weak)) +void default_layer_state_set_kb(uint32_t state); #ifndef NO_ACTION_LAYER /* bitwise operation */ @@ -70,7 +73,7 @@ void layer_xor(uint32_t state); #define layer_debug() __attribute__((weak)) -void layer_state_set_kb(uint32_t oldstate, uint32_t newstate); +uint32_t layer_state_set_kb(uint32_t state); #endif /* pressed actions cache */ -- cgit v1.2.3 From bd8d717f1ff2eef42dfef490374a8cee61be5d87 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Wed, 15 Feb 2017 05:25:08 +0700 Subject: Fix bug fix attempt --- tmk_core/common/action_layer.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tmk_core/common/action_layer.h b/tmk_core/common/action_layer.h index 785bb5be4..d89ed6e5c 100644 --- a/tmk_core/common/action_layer.h +++ b/tmk_core/common/action_layer.h @@ -27,10 +27,10 @@ along with this program. If not, see . */ extern uint32_t default_layer_state; void default_layer_debug(void); -uint32_t default_layer_set(uint32_t state); +void default_layer_set(uint32_t state); __attribute__((weak)) -void default_layer_state_set_kb(uint32_t state); +uint32_t default_layer_state_set_kb(uint32_t state); #ifndef NO_ACTION_LAYER /* bitwise operation */ -- cgit v1.2.3 From 168c91202731ab5df5a8b1e9f985ab52ab7291e8 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Wed, 15 Feb 2017 05:38:40 +0700 Subject: Move Alt-Tab position --- keyboards/handwired/promethium/keymaps/priyadi/keymap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 9f07a7d08..3d25c766c 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -723,17 +723,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | | D1 | D2 | D3 | D4 | D5 | D6 | D7 | D8 | D9 | D10 | | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | Vol- | Mute | Vol+ | | | Prev | | Next | | | + * | Esc | | Btab | Esc | Tab | | | Prev | | Next | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | Prev | Play | Next | BTab | Tab | | | | | | + * | | | Prev | Play | Next | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ [_GUI] = KEYMAP( 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, KC_VOLD, KC_MUTE, KC_VOLU,S(KC_TAB),KC_TAB, KC_WWWB, XXXXXXX, KC_WWWF, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, KC_SPC, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, 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, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ), -- cgit v1.2.3 From c05509895208c078401b610eddf85cbc0c5e5a25 Mon Sep 17 00:00:00 2001 From: Nicholas Keene Date: Tue, 14 Feb 2017 22:30:07 -0600 Subject: The Ordinary Layout now has more symbols on the Symbols layer! So useful! --- .../ergodox/keymaps/ordinary/ordinary-symbol.png | Bin 101255 -> 89582 bytes .../ergodox/keymaps/ordinary/ordinary-symbol.txt | 22 ++++++++++----------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/keyboards/ergodox/keymaps/ordinary/ordinary-symbol.png b/keyboards/ergodox/keymaps/ordinary/ordinary-symbol.png index dd9086329..8cd92cee1 100644 Binary files a/keyboards/ergodox/keymaps/ordinary/ordinary-symbol.png and b/keyboards/ergodox/keymaps/ordinary/ordinary-symbol.png differ diff --git a/keyboards/ergodox/keymaps/ordinary/ordinary-symbol.txt b/keyboards/ergodox/keymaps/ordinary/ordinary-symbol.txt index 001bf370d..f64503ecb 100644 --- a/keyboards/ergodox/keymaps/ordinary/ordinary-symbol.txt +++ b/keyboards/ergodox/keymaps/ordinary/ordinary-symbol.txt @@ -10,18 +10,18 @@ [{y:-0.875,x:2.5,c:"#bbddbb"},"$",{x:1},")",{x:8.5,c:"#89b087"},"4",{x:1},"6"], [{y:-0.875,x:5.5,c:"#bbddbb"},"`",{x:6.5},"/"], [{y:-0.875,c:"#000000",t:"#007d00",w:1.5},"Symbols\n\n\n\n\n\nShift",{c:"#bbddbb",t:"#000000"},"#",{x:14.5,c:"#89b087"},"*",{c:"#000000",t:"#007d00",w:1.5},"\n\nSymbols\n\n\n\n\nShift"], -[{y:-0.625,x:6.5,c:"#ff8500",t:"#000000",fa:[0,0,0,1],h:1.5},"Tab >\n\n\nTab",{x:4.5,h:1.5},"< Tab\n\n\nShift Tab"], -[{y:-0.75,x:3.5,c:"#bbddbb"},"[",{x:10.5,c:"#89b087"},"2"], +[{y:-0.625,x:6.5,c:"#bbddbb",t:"#000000",a:6,h:1.5},"'",{x:4.5,h:1.5},"\""], +[{y:-0.75,x:3.5,a:4},"[",{x:10.5,c:"#89b087"},"2"], [{y:-0.875,x:2.5,c:"#bbddbb"},"^",{x:1},"]",{x:8.5,c:"#89b087"},"1",{x:1},"3"], [{y:-0.875,x:5.5,c:"#bbddbb"},"~",{x:6.5},"\\"], [{y:-0.875,c:"#c6c600",t:"#9e0000",w:1.5},"Capitals\n\n\n\n\n\nShift",{c:"#bbddbb",t:"#000000"},"%",{x:14.5,c:"#89b087"},"-",{c:"#c6c600",t:"#9e0000",w:1.5},"\n\nCapitals\n\n\n\n\nShift"], -[{y:-0.375,x:3.5,c:"#dddd77",t:"#000000"},"Option\n\n\nLAlt",{x:10.5,c:"#89b087"},"."], -[{y:-0.875,x:2.5,c:"#dddd77"},"Hyper",{x:1},"Cmd\n\n\nSuper",{x:8.5,c:"#89b087"},"0",{x:1},"="], -[{y:-0.75,x:0.5,c:"#dddd77"},"Ctrl\n\n\nLCtrl","Meh",{x:14.5,c:"#89b087"},"+","Enter"], -[{r:30,rx:6.5,ry:4.25,y:-1,x:1,c:"#ff8500"},"Left","Right"], -[{h:2},"Space",{h:2},"Enter","Up"], -[{x:2},"Down"], -[{r:-30,rx:13,y:-1,x:-3},"Home","End"], -[{x:-3},"Page\n\n\n\n\n\nUp",{h:2},"< Del\n\n\nBackspace",{h:2},"Del >\n\n\nDelete"], -[{x:-3},"Page\n\n\n\n\n\nDown"] +[{y:-0.375,x:3.5,c:"#bbddbb",t:"#000000"},"<",{x:10.5,c:"#89b087"},"."], +[{y:-0.875,x:2.5,c:"#bbddbb"},"*",{x:1,a:5},">",{x:8.5,c:"#89b087",a:4},"0",{x:1},"="], +[{y:-0.75,x:0.5,c:"#bbddbb"},";","&",{x:14.5,c:"#89b087"},"+","Enter"], +[{r:30,rx:6.5,ry:4.25,y:-1,x:1,c:"#737373",a:7},"",""], +[{c:"#bbddbb",h:2},"+",{h:2},"=",{c:"#737373"},""], +[{x:2,c:"#bbddbb"},"!="], +[{r:-30,rx:13,y:-1,x:-3,c:"#737373"},"",""], +[{x:-3},"",{c:"#bbddbb",h:2},"_",{h:2},"-"], +[{x:-3},"->"] -- cgit v1.2.3 From 1e096981468d75cb38ae97866b0a12b884caa77e Mon Sep 17 00:00:00 2001 From: Nicholas Keene Date: Tue, 14 Feb 2017 22:31:54 -0600 Subject: All my friends us The Ordinary Layout because it doesn't force you to change you typing habits --- .../ergodox/keymaps/ordinary/ordinary-media.png | Bin 123435 -> 123523 bytes .../ergodox/keymaps/ordinary/ordinary-media.txt | 8 ++++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/ergodox/keymaps/ordinary/ordinary-media.png b/keyboards/ergodox/keymaps/ordinary/ordinary-media.png index 5ff3f5338..491f698d8 100644 Binary files a/keyboards/ergodox/keymaps/ordinary/ordinary-media.png and b/keyboards/ergodox/keymaps/ordinary/ordinary-media.png differ diff --git a/keyboards/ergodox/keymaps/ordinary/ordinary-media.txt b/keyboards/ergodox/keymaps/ordinary/ordinary-media.txt index e1467b22e..67b7840b5 100644 --- a/keyboards/ergodox/keymaps/ordinary/ordinary-media.txt +++ b/keyboards/ergodox/keymaps/ordinary/ordinary-media.txt @@ -15,10 +15,10 @@ [{y:-0.875,x:2.5},"Mouse\n\n\n\n\n\nDnLeft",{x:1},"Mouse\n\n\n\n\n\nDnRgt",{x:8.5,c:"#1e8fff"},"End",{x:1},"Page\n\n\n\n\n\nDown"], [{y:-0.875,x:5.5,c:"#9977ee"},"Mute",{x:6.5,c:"#737373",a:7},""], [{y:-0.875,c:"#c6c600",t:"#9e0000",a:4,w:1.5},"Capitals\n\n\n\n\n\nShift",{c:"#737373",t:"#000000",a:7},"",{x:14.5},"",{c:"#c6c600",t:"#9e0000",a:4,w:1.5},"\n\nCapitals\n\n\n\n\nShift"], -[{y:-0.375,x:3.5,c:"#0066cc",t:"#000000"},"Middle\n\n\n\n\n\nClick",{x:10.5,c:"#1e8fff",fa:[0,0,0,1]},"Delete\n\n\nOption"], -[{y:-0.875,x:2.5,c:"#0066cc"},"Left\n\n\n\n\n\nClick",{x:1},"Right\n\n\n\n\n\nClick",{x:8.5,c:"#1e8fff"},"Insert\n\n\nCmd",{x:1,c:"#dddd77"},"Hyper"], -[{y:-0.75,x:0.5},"Ctrl\n\n\nLCtrl","Meh",{x:14.5},"Meh","Crtl\n\n\nRCtrl"], -[{r:30,rx:6.5,ry:4.25,y:-1,x:1,c:"#6633ee"},"Stop\n\n\nBrowser","Reload\n\n\nBrowser"], +[{y:-0.375,x:3.5,c:"#0066cc",t:"#000000"},"Middle\n\n\n\n\n\nClick",{x:10.5,c:"#1e8fff"},"Delete"], +[{y:-0.875,x:2.5,c:"#0066cc"},"Left\n\n\n\n\n\nClick",{x:1},"Right\n\n\n\n\n\nClick",{x:8.5,c:"#1e8fff"},"Insert",{x:1,c:"#737373",a:7},""], +[{y:-0.75,x:0.5},"","",{x:14.5},"",""], +[{r:30,rx:6.5,ry:4.25,y:-1,x:1,c:"#6633ee",a:4,fa:[0,0,0,1]},"Stop\n\n\nBrowser","Reload\n\n\nBrowser"], [{h:2},"< Web\n\n\nBrowser",{h:2},"Web >\n\n\nBrowser","Search\n\n\nBrowser"], [{x:2},"Home\n\n\nBrowser"], [{r:-30,rx:13,y:-1,x:-3},"Prev\n\n\nAudio\n\n\nTrack","Next\n\n\nAudio\n\n\nTrack"], -- cgit v1.2.3 From e006b4a600379e30918235c4cdf58f7678ccd1d4 Mon Sep 17 00:00:00 2001 From: Nicholas Keene Date: Tue, 14 Feb 2017 22:32:31 -0600 Subject: The Ordinary Layout has a feature for one-handed chorded typing --- .../ergodox/keymaps/ordinary/ordinary-base.png | Bin 98200 -> 120512 bytes .../ergodox/keymaps/ordinary/ordinary-base.txt | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboards/ergodox/keymaps/ordinary/ordinary-base.png b/keyboards/ergodox/keymaps/ordinary/ordinary-base.png index 831db4f5d..18c6c4ab2 100644 Binary files a/keyboards/ergodox/keymaps/ordinary/ordinary-base.png and b/keyboards/ergodox/keymaps/ordinary/ordinary-base.png differ diff --git a/keyboards/ergodox/keymaps/ordinary/ordinary-base.txt b/keyboards/ergodox/keymaps/ordinary/ordinary-base.txt index 7763c3d37..4fc11faf9 100644 --- a/keyboards/ergodox/keymaps/ordinary/ordinary-base.txt +++ b/keyboards/ergodox/keymaps/ordinary/ordinary-base.txt @@ -7,10 +7,10 @@ [{y:-0.875,x:5.5},"T",{h:1.5},"{\n\n\n\n\n\n[",{x:4.5,h:1.5},"}\n\n\n\n\n\n]","Y"], [{y:-0.875,c:"#c6c600",t:"#002299",w:1.5},"Media\n\nTab\n\n\n\nShift",{c:"#cccccc",t:"#000000"},"Q",{x:14.5},"P",{c:"#c6c600",t:"#002299",w:1.5},"|\n\\\nMedia\n\n\n\n\nShift"], [{y:-0.375,x:3.5,c:"#cccccc",t:"#000000"},"D",{x:10.5},"K"], -[{y:-0.875,x:2.5},"S",{x:1},"F",{x:8.5},"J",{x:1},"L"], +[{y:-0.875,x:2.5},"S",{x:1,fa:[0,0,0,1]},"F\n\n\nreverse",{x:8.5},"J\n\n\nreverse",{x:1},"L"], [{y:-0.875,x:5.5},"G",{x:6.5},"H"], -[{y:-0.875,c:"#c6c600",t:"#007d00",w:1.5},"Symbols\n\n\n\n\n\nShift",{c:"#cccccc",t:"#000000"},"A",{x:14.5},":\n;",{c:"#c6c600",t:"#007d00",w:1.5},"\"\n'\nSymbols\n\n\n\n\nShift"], -[{y:-0.625,x:6.5,c:"#ff8500",t:"#000000",fa:[0,0,0,1],h:1.5},"< Tab\n\n\nShift Tab",{x:4.5,h:1.5},"Tab >\n\n\nTab"], +[{y:-0.875,c:"#c6c600",t:"#007d00",w:1.5},"Symbols\n\n\n\n\n\nShift",{c:"#cccccc",t:"#000000"},"A\n\n\nreverse",{x:14.5},":\n;\n\nreverse",{c:"#c6c600",t:"#007d00",w:1.5},"\"\n'\nSymbols\n\n\n\n\nShift"], +[{y:-0.625,x:6.5,c:"#ff8500",t:"#000000",h:1.5},"< Tab\n\n\nShift Tab",{x:4.5,h:1.5},"Tab >\n\n\nTab"], [{y:-0.75,x:3.5,c:"#cccccc"},"C",{x:10.5},"<\n,"], [{y:-0.875,x:2.5},"X",{x:1},"V",{x:8.5},"M",{x:1},">\n."], [{y:-0.875,x:5.5},"B",{x:6.5},"N"], -- cgit v1.2.3 From 54785c1976590dc3081f06ca49747dfcb6ecd3b3 Mon Sep 17 00:00:00 2001 From: Nicholas Keene Date: Tue, 14 Feb 2017 22:47:11 -0600 Subject: The Ordinary Layout is boring, normal, typical, expected. --- keyboards/ergodox/keymaps/ordinary/keymap.c | 146 +++++++++++++++++++-------- keyboards/ergodox/keymaps/ordinary/readme.md | 33 ++++-- 2 files changed, 125 insertions(+), 54 deletions(-) diff --git a/keyboards/ergodox/keymaps/ordinary/keymap.c b/keyboards/ergodox/keymaps/ordinary/keymap.c index 5c01d9678..b79f0f064 100644 --- a/keyboards/ergodox/keymaps/ordinary/keymap.c +++ b/keyboards/ergodox/keymaps/ordinary/keymap.c @@ -9,6 +9,7 @@ #define SYMB 1 // symbols layer #define MDIA 2 // media layer #define SPEC 3 // special layer +#define RBASE 4 // reverse default layer #define LSymb 10 // left symbol-shift key #define LMdia 11 // left media-shift key @@ -17,15 +18,21 @@ #define RMdia 14 // right media-shift key #define RSpec 15 // right special-shift key +#define NotEq 16 // != macro +#define Point 17 // -> macro + #define MUL 20 // mouse up left #define MUR 21 // mouse up right #define MDL 22 // mouse down left #define MDR 23 // mouse down right + + /* - * The Ordinary Layout for the Ergodox EZ keyboard, v4.20 + * The Ordinary Layout for the Ergodox EZ keyboard, v5 * - * Modifications from default by Nicholas Keene ergodoxez@nicholaskeene.com + * Modifications from the default Ergodox EZ layout + * by Nicholas Keene ergodoxez@nicholaskeene.com * * No rights reserved. This software is in the public domain. * Credit me if you are friendly but if you're a jerk don't bother. @@ -44,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------------+------+------+------+------+-------------| |------+------+------+------+------+------+------------| * | Media Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | \| Media | * |------------+------+------+------+------+------| | | |------+------+------+------+------+------------| - * | Symbol | A | S | D | F | G |------| |------| H | J | K | L | ; | '" Symbol | + * | Symbol | ^A | S | D | ^F | G |------| |------| H | ^J | K | L | ^; | '" Symbol | * |------------+------+------+------+------+------|Shift | | Tab |------+------+------+------+------+------------| * | Capitals | Z | X | C | V | B | -Tab | | | N | M | , | . | / | Capitals | * `------------+------+------+------+------+-------------' `-------------+------+------+------+------+------------' @@ -60,24 +67,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [BASE] = KEYMAP( // left hand - F(LSpec) ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_ESC -,F(LMdia) ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_LBRC -,M(LSymb) ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G -,KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,LSFT(KC_TAB) -,KC_LCTL ,KC_MEH ,KC_HYPR,KC_LALT,KC_LGUI + F(LSpec) ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_ESC +,F(LMdia) ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_LBRC +,M(LSymb) ,LT(RBASE, KC_A),KC_S ,KC_D ,LT(RBASE, KC_F) ,KC_G +,KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,LSFT(KC_TAB) +,KC_SCLN ,MEH_T(KC_NO) ,ALL_T(KC_NO),KC_LALT,KC_LGUI ,KC_HOME,KC_END ,KC_PGUP ,KC_BSPC,KC_DEL ,KC_PGDN // right hand - ,KC_MINS ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,F(RSpec) - ,KC_RBRC ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,F(RMdia) - ,KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,F(RSymb) - ,KC_TAB ,KC_N ,KC_M ,KC_COMM,KC_DOT ,KC_SLSH ,KC_RSFT - ,KC_RGUI,KC_RALT,KC_HYPR ,KC_MEH ,KC_RCTL + ,KC_MINS ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,F(RSpec) + ,KC_RBRC ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,F(RMdia) + ,KC_H ,LT(RBASE, KC_J),KC_K ,KC_L ,LT(RBASE,KC_SCLN),F(RSymb) + ,KC_TAB ,KC_N ,KC_M ,KC_COMM,KC_DOT ,KC_SLSH ,KC_RSFT + ,KC_RGUI ,KC_RALT,KC_HYPR,KC_MEH ,KC_RCTL ,KC_LEFT ,KC_RGHT ,KC_UP ,KC_DOWN ,KC_ENT ,KC_SPC - ), +), /******* Symbols Layer ************************************************************************************************* * @@ -90,35 +97,35 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-----------+------+------+------+------+------| Tab | | Shift|------+------+------+------+------+-----------| * | | % | ^ | [ | ] | ~ | | | -Tab| \ | 1 | 2 | 3 | - | | * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' - * | LCtrl | Meh |Hyper | LAlt | LGui | | 0 | . | = | + | Ent | + * | ; | & | * | < | > | | 0 | . | = | + | Enter | * `-----------------------------------' `-----------------------------------' * ,-------------. ,-------------. - * | Left | Right| | Home | End | + * ||||||||||||||| ||||||||||||||| * ,------|------|------| |------+------+------. - * | | | Up | | PgUp | | | - * |Space |Enter |------| |------|BackSp| Del | - * | | | Down | | PgDn | | | + * | Plus | Equal|||||||| |||||||| Under| Dash | + * | | |------| |------| Score| | + * | + | = | != | | -> | _ | - | * `--------------------' `--------------------' */ [SYMB] = KEYMAP( // left hand - KC_TRNS ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_ESC -,KC_TRNS ,KC_EXLM ,KC_AT ,KC_LCBR ,KC_RCBR ,KC_AMPR ,LSFT(KC_COMM) -,KC_TRNS ,KC_HASH ,KC_DLR ,KC_LPRN ,KC_RPRN ,KC_GRV -,KC_TRNS ,KC_PERC ,KC_CIRC ,KC_LBRC ,KC_RBRC ,KC_TILD ,KC_TAB -,KC_LCTL ,KC_MEH ,KC_HYPR ,KC_LALT ,KC_LGUI - ,KC_LEFT ,KC_RGHT - ,KC_UP - ,KC_SPC ,KC_ENT ,KC_DOWN + KC_TRNS ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_ESC +,KC_TRNS ,KC_EXLM ,KC_AT ,KC_LCBR ,KC_RCBR ,KC_AMPR ,LSFT(KC_COMM) +,KC_TRNS ,KC_HASH ,KC_DLR ,KC_LPRN ,KC_RPRN ,KC_GRV +,KC_TRNS ,KC_PERC ,KC_CIRC ,KC_LBRC ,KC_RBRC ,KC_TILD ,KC_TAB +,KC_LCTL ,KC_AMPR ,KC_ASTR ,LSFT(KC_COMM),LSFT(KC_DOT) + ,KC_NO ,KC_NO + ,KC_NO + ,KC_PLUS ,KC_EQL ,M(NotEq) // right hand - ,KC_MINS ,KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_TRNS - ,LSFT(KC_DOT),KC_PIPE ,KC_7 ,KC_8 ,KC_9 ,KC_SLSH ,KC_TRNS - ,KC_SLSH ,KC_4 ,KC_5 ,KC_6 ,KC_ASTR ,KC_TRNS - ,LSFT(KC_TAB),KC_BSLS ,KC_1 ,KC_2 ,KC_3 ,KC_MINS ,KC_TRNS - ,KC_0 ,KC_DOT ,KC_EQL,KC_PLUS ,KC_ENT - ,KC_HOME ,KC_END - ,KC_PGUP - ,KC_PGDN ,KC_BSPC ,KC_DEL + ,KC_MINS ,KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_TRNS + ,LSFT(KC_DOT),KC_PIPE ,KC_7 ,KC_8 ,KC_9 ,KC_SLSH ,KC_TRNS + ,KC_SLSH ,KC_4 ,KC_5 ,KC_6 ,KC_ASTR ,KC_TRNS + ,LSFT(KC_TAB),KC_BSLS ,KC_1 ,KC_2 ,KC_3 ,KC_MINS ,KC_TRNS + ,KC_0 ,KC_DOT ,KC_EQL,KC_PLUS ,KC_ENT + ,KC_NO ,KC_NO + ,KC_NO + ,M(Point) ,LSFT(KC_MINS),KC_MINS ), /******* Media Layer ******************************************************************************************************* @@ -132,7 +139,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+---------+---------+---------+---------+---------|Scroll| |Scroll|---------+---------+---------+---------+---------+------| * | | |MouseDnLf|MouseDown|MouseDnRg| Mute | Down | | Down | | End | Down | PgDn | | | * `------+---------+---------+---------+---------+----------------' `----------------+---------+---------+---------+---------+------' - * |LCtrl| Meh | MClick | LClick | R Click| |Cmd/Insrt|Optn/Del | Hyper | Meh |RCtrl| + * | | | MClick | LClick | R Click| | Insert | Del | | | | * `---------------------------------------------' `---------------------------------------------' * ,-------------. ,-------------. * | Stop |Refrsh| | Prev | Next | @@ -148,7 +155,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ,KC_TRNS ,KC_POWER ,M(MUL) ,KC_MS_U ,M(MUR) ,KC_VOLU ,KC_WH_U ,KC_TRNS ,KC_SLEP ,KC_MS_L ,KC_MS_D ,KC_MS_R ,KC_VOLD ,KC_TRNS ,KC_NO ,M(MDL) ,KC_MS_D ,M(MDR) ,KC_MUTE ,KC_WH_D -,KC_LCTL ,KC_MEH ,KC_BTN3 ,KC_BTN1 ,KC_BTN2 +,KC_NO ,KC_NO ,KC_BTN3 ,KC_BTN1 ,KC_BTN2 ,KC_WSTP ,KC_WREF ,KC_WSCH ,KC_WBAK ,KC_NO ,KC_WHOM @@ -157,7 +164,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ,KC_WH_U ,KC_PSCR ,KC_HOME ,KC_UP ,KC_PGUP ,KC_MAIL ,KC_TRNS ,KC_NLCK ,KC_LEFT ,KC_DOWN ,KC_RIGHT,KC_MYCM ,KC_TRNS ,KC_WH_D ,KC_NO ,KC_END ,KC_DOWN ,KC_PGDN ,KC_NO ,KC_TRNS - ,GUI_T(KC_INS),ALT_T(KC_DEL),KC_HYPR ,KC_MEH ,KC_RCTL + ,KC_INS ,KC_DEL ,KC_NO ,KC_NO ,KC_NO ,KC_MPRV ,KC_MNXT ,KC_VOLU ,KC_VOLD ,KC_MSTP ,KC_MPLY @@ -203,7 +210,49 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS - ) +), + +/******* Reverse Base Layer ********************************************************************************************* + * + * ,------------------------------------------------------. ,------------------------------------------------------. + * | =+ | 0 | 9 | 8 | 7 | 6 | - | | Esc | 5 | 4 | 3 | 2 | 1 | `~ | + * |------------+------+------+------+------+-------------| |------+------+------+------+------+------+------------| + * | \| | P | O | I | U | Y | ] | | [ | T | R | E | W | Q | Tab | + * |------------+------+------+------+------+------| | | |------+------+------+------+------+------------| + * | | ; | L | K | J | H |------| |------| G | F | D | S | A | '" | + * |------------+------+------+------+------+------| Tab | |Shift |------+------+------+------+------+------------| + * | Capitals | / | . | , | M | N | | | -Tab | B | V | C | X | Z | Capitals | + * `------------+------+------+------+------+-------------' `-------------+------+------+------+------+------------' + * | LCtrl | Meh |Hyper | LAlt | LGui | | RGui | RAlt | Hyper| Meh | RCtrl | + * `-----------------------------------' `-----------------------------------' + * ,-------------. ,-------------. + * | Left | Right| | Home | End | + * ,------|------|------| |------+------+------. + * | | | Up | | PgUp | | | + * |Space |Enter |------| |------|BackSp| Del | + * | | | Down | | PgDn | | | + * `--------------------' `--------------------' + */ +[RBASE] = KEYMAP( +// left hand + KC_EQL ,KC_0 ,KC_9 ,KC_8 ,KC_7 ,KC_6 ,KC_MINS +,KC_BSLS ,KC_P ,KC_O ,KC_I ,KC_U ,KC_Y ,KC_RBRC +,KC_NO ,LT(RBASE, KC_SCLN) ,KC_L ,KC_K ,LT(RBASE, KC_J) ,KC_H +,KC_RSFT ,KC_SLSH ,KC_DOT ,KC_COMM,KC_M ,KC_N ,KC_TAB +,KC_RCTL ,MEH_T(KC_NO),ALL_T(KC_NO),KC_RALT,KC_RGUI + ,KC_LEFT ,KC_RGHT + ,KC_UP + ,KC_SPC ,KC_ENT ,KC_DOWN + // right hand + ,KC_ESC ,KC_5 ,KC_4 ,KC_3 ,KC_2 ,KC_1 ,KC_GRV + ,KC_LBRC ,KC_T ,KC_R ,KC_E ,KC_W ,KC_Q ,KC_TAB + ,KC_G ,LT(RBASE, KC_F),KC_D ,KC_S ,LT(RBASE, KC_A) ,F(LSymb) + ,LSFT(KC_TAB),KC_B ,KC_V ,KC_C ,KC_X ,KC_Z ,KC_LSFT + ,KC_LGUI,KC_LALT,KC_HYPR ,KC_MEH,KC_LCTL + ,KC_HOME ,KC_END + ,KC_PGUP + ,KC_PGDN ,KC_BSPC ,KC_DEL +) }; const uint16_t PROGMEM fn_actions[] = { @@ -227,14 +276,13 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { switch(id) { // There are two shift keys for each layer so we increment a layer_shift var when one - // is pressed and decrement when one is released. If both are pressed at the same time - // then the layer is locked (or unlocked). The shift counts are bound between 0 and 2 + // is pressed and decrement when one is released. The shift counts are bound between 0 and 2 // only because sometimes rapid pressing led to irregular events; this way the states // are self healing during use. case LSymb: // if (record->event.pressed) { // when the LSymb button is pressed - if(++symb_shift > 2) mdia_shift = 2; // increment the symb shift count, max two + if(++symb_shift > 2) symb_shift = 2; // increment the symb shift count, max two if(spec_shift) symb_lock = !symb_lock; // if the Special layer is on, toggle the shift lock layer_on(SYMB); // in any case, turn on the Symbols layer } else { // when the LSymb button is released @@ -264,7 +312,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case LSpec: if (record->event.pressed) { // when the LSpec button is pressed - if(symb_shift) symb_lock == !symb_lock; // if another layer button is engaged, then + if(symb_shift) symb_lock = !symb_lock; // if another layer button is engaged, then else if(mdia_shift) mdia_lock = !mdia_lock; // lock that layer, be it caps or symb or mdia else if (record->tap.count && !record->tap.interrupted && (!spec_shift)) { register_code(KC_GRV); // otherwise, if it's an uninterrupted tap, emit a char @@ -340,6 +388,18 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) } break; + case NotEq: + if (record->event.pressed) { + return MACRO( I(30), T(EXLM), T(EQL), END ); // + } + break; + + case Point: + if (record->event.pressed) { + return MACRO( I(30), T(MINS), T(DOT), END ); // + } + break; + // mouse diagonals case MUL: // mouse up left diff --git a/keyboards/ergodox/keymaps/ordinary/readme.md b/keyboards/ergodox/keymaps/ordinary/readme.md index 820b80b45..313b726ba 100644 --- a/keyboards/ergodox/keymaps/ordinary/readme.md +++ b/keyboards/ergodox/keymaps/ordinary/readme.md @@ -11,10 +11,11 @@ no rights reserved, use for any purposes, credit me if you are a nice person ## The Base Layout ## * *White Keys* are all the normal characters and symbols in all the normal locations (except for the brackets). -* *Modifier Keys* are light yellow and in the traditional location: Control, Option, Command, plus Hyper and Meh. +* *Modifier Keys* are light yellow and in the traditional locationn at the bottom of the keyboard: Control, Option, Command, plus Hyper and Meh. * *Shift Keys* are dark yellow, found on the outsides of the keyboard. Capitals Shift (traditional shift) is found in the usual place and above that is found Symbol Shift, Media Shift, and Special Shift (Shift Lock). * Several of the shift keys double for entry of characters which would typically be in those locations. * *Thumb Keys* shown in orange are for text navigation and manipulation. +* The keys under pinky fingers and index fingers will *reverse* the keyboard layout. * *Escape* is red and it is always found in that location no matter what. ![Ordinary base layout](ordinary-base.png) @@ -23,16 +24,20 @@ The four big orange keys are arranged differently than in the default Ergodox EZ The Forward Tab and Backward Tab keys are in their locations mostly because I ended up with two extra buttons and needed something to do with them. My muscle memory from using the Truly Ergonomic Keyboard makes me look for the Tab key with my right index finger, so it is handy to have this redundant Tab, and the idea with the Backward Tab key is that it becomes easy to navigate text fields in forms, or to indent/unindent code. +#### Reversing The Base Layout #### + +The Ordinary Layout can be used to perform one-handed chorded text input. If you hold down the key under either index finger or either pinky finger (A, F, J and Semicolon), the whole base layout reverses order. Most keys are _mirrored_ but the delete keys are merely *translated* to preserve directionality. Pro-tip: This feature is particularly handly for bringing the Enter key to the left hand when the right hand is using the mouse. + ## The Symbols Layer ## * *Symbols* shown in light green. All kinds of brackets are available on this layer. Ampersand and Pipe justapose each other. Pipe, slash, and backslash are arranged in a column. -* *F-Keys* are bright green and overlay the row of numerals. +* *F-Keys* are bright green and overlay the row of numerals. This layer has F1-F10, higher *F-Keys* are on the Symbols layer. * *Number pad* in dark green under the right hand includes all four arithmetic operations in the same order found on most number pads and features an Enter key. The keycodes emitted here are normal numeric keycodes, not the number-pad specific keycodes emitted by most number pads so that NumLock is not needed. -* *Thumb keys* on this layer are the *reverse* of the orange keys on the base layer, with the keys either mirrored or shifted. This is powerful! Often I find myself using the mouse with my right hand, and the left hand needs to press Enter. Instead of reaching the left hand over to the right side of the keyboard, now I simply tap Symbols to reverse the turquoise keys, and Enter is right where it should be. ![Ordinary symbol layout](ordinary-symbol.png) The Symbols Layer is based on the Coder Layer from the default Ergodox EZ layout. I slightly rearranged the symbols, added some symbols, expanded the number pad, and straightened out the F-Keys. It's very handy to have the symbols directly underneath the normal typing keys. +* The dark gray keys do nothing in case you bump them by accident. ## The Media Layer ## @@ -42,7 +47,7 @@ The Symbols Layer is based on the Coder Layer from the default Ergodox EZ layout * Higher-order *F-Keys* are shown in bright green overylaying the numerals. * *Application Keys* to control web browsers and audio players are dark purple but don't get too excited because these have weak support on operating systems I've looked at. Good luck. * The light purple keys are various operating system keys such as NumLock and Mute and a button to navigate to My Computer (usually your home dir). -* The dark gray keys do nothing in case you bump them by accident +* The dark gray keys do nothing in case you bump them by accident. ![Ordinary media layout](ordinary-media.png) @@ -64,27 +69,33 @@ Multiple layers can be turned on at once. The Capitals layer will affect charact The Special Shift layer is mostly used to lock the shift keys but in order to make this layout more _ordinary_ there are a few special sequences which put some keys near their most common traditional locations. -### Escape ### +#### Escape #### -The One True Location for the Escape key is segregated way up on the top left of the keyboard. The Ergodox does not have a physical button in such a location and the nearest one is home to the tilde (er, grave) which is commonly found there. In the Ordinary layout the Escape key is found on all layers in the prominent location in the corner next to the 5, which is easy to remember, and yet it isn't natural for those of us with muscle memory flicking our wrists up and to the left looking for Escape. +The One True Location for an Escape key is separated from the rest of the keys, way up on the top left of the keyboard. The Ergodox does not have a physical button in such a location, however, and the nearest one is home to the tilde (er, *grave*) which is commonly found there. In the Ordinary layout the Escape key is found on all layers in the prominent location in the corner next to the 5, which is easy to remember, and yet it isn't natural for those of us with muscle memory flicking our wrists up and to the left looking for Escape. -The Ordinary layout offers as a consolation prize a Special sequence for Escape: Special Shift + 1. This is natural so you can tap the top left button, then the button next to it and get Escape. This gesture works in all layers. +The Ordinary layout offers as a consolation prize, a Special sequence for Escape: **Special Shift + 1**. This is natural so you can tap the top left button, then the button next to it and get Escape. This gesture works in all layers. -### Backspace ### +#### Backspace #### -At the top right corner of the Ergodox EZ you can a gesture similar to the special Escape sequence using the 0 key to produce a Backspace. Users of this keyboard and this layout are well advised to learn to use their thumbs for deleting text, but sometimes you are doing other computery things and just want to flick your digits up to the right and press backspace a bunch times. +At the top right corner of the Ergodox EZ you can do **Special Shift + 0** to produce a Backspace. Users of this keyboard and this layout are well advised to learn to use their thumbs for deleting text, but sometimes you are doing other computery things and just want to flick your digits up to the right and press backspace a bunch times. -### Other Characters ### +#### Other Characters #### The Escape and Backspace special sequences are so useful why not have a few more? You can find dash under 9, left bracket under o, and right bracket under p. That's pretty much all the characters from the top right corner of the keyboard which moved to make room for the columnar layout. +## Errata ## + +Some of the symbols on the Symbols layer are produced by the keyboard by "capitalizing" another symbol (such as *!* from *1*) so when you type that key you will notice the Capitals Shift red LED turn on. + **** -The Ordinary Layout for the Ergodox EZ keyboard, v4.20 +The Ordinary Layout for the Ergodox EZ keyboard, v5 Modifications from default by Nicholas Keene ergodoxez@nicholaskeene.com No rights reserved. This software is in the public domain. Credit me if you are friendly but if you're a jerk don't bother. +Keyboard layout images were created with http://www.keyboard-layout-editor.com/ by Ian Prest my thanks to that free service + Details: readme.md https://github.com/nrrkeene/qmk_firmware/tree/master/keyboards/ergodox/keymaps/ordinary -- cgit v1.2.3 From c2f0207d598189415b355e46031f37835408b6ea Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Wed, 15 Feb 2017 16:36:31 +0700 Subject: Merge my Planck-like keyboards --- .../handwired/promethium/keymaps/priyadi/config.h | 4 + .../handwired/promethium/keymaps/priyadi/keymap.c | 164 ++-- keyboards/planck/keymaps/priyadi/config.h | 39 + keyboards/planck/keymaps/priyadi/keymap.c | 913 +-------------------- 4 files changed, 144 insertions(+), 976 deletions(-) create mode 100644 keyboards/planck/keymaps/priyadi/config.h diff --git a/keyboards/handwired/promethium/keymaps/priyadi/config.h b/keyboards/handwired/promethium/keymaps/priyadi/config.h index 6c9d2195e..00f9fed31 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/config.h +++ b/keyboards/handwired/promethium/keymaps/priyadi/config.h @@ -3,6 +3,8 @@ #include "../../config.h" +#define PRIYADI_PROMETHIUM + /* bootmagic salt key */ #define BOOTMAGIC_KEY_SALT KC_ESC @@ -11,6 +13,7 @@ #define PREVENT_STUCK_MODIFIERS +#define RGBSPS_ENABLE #define RGB_DI_PIN B5 #define RGBSPS_NUM 57 @@ -22,5 +25,6 @@ #define LAYOUT_WORKMAN #define DOUBLESPACE_LAYER_ENABLE +// #define TOLELOT_ENABLE #endif diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 3d25c766c..0dc0a0339 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -1,14 +1,32 @@ // This is the canonical layout file for the Quantum project. If you want to add another keyboard, // this is the style you want to emulate. -#include "promethium.h" +#if defined(PRIYADI_PROMETHIUM) + #include "promethium.h" +#elif defined(PRIYADI_PLANCK) + #include "planck.h" +#else + #error "no keyboard defined" +#endif + #include "action_layer.h" +#ifdef AUDIO_ENABLE + #include "audio.h" + #include "musical_notes.h" +#endif #include "eeconfig.h" #include "process_unicode.h" #include "quantum.h" +#ifdef RGBSPS_ENABLE #include "rgbsps.h" +#endif +#ifdef PS2_MOUSE_ENABLE #include "ps2_mouse.h" #include "ps2.h" +#endif +#ifdef FAUXCLICKY_ENABLE +#include "fauxclicky.h" +#endif #include "outputselect.h" #include "led.h" #define COUNT(x) (sizeof (x) / sizeof (*(x))) @@ -76,9 +94,6 @@ enum planck_keycodes { NORMAN, // layer switchers - // PUNC, - // NUM, - // FUN, EMOJI, GUI, GREEK, @@ -92,10 +107,15 @@ enum planck_keycodes { LSPACE, RSPACE, GLOW, - FOR0, // stub - AUDIO +#ifndef FAUXCLICKY_ENABLE + FC_TOG, +#endif +#ifndef ADAFRUIT_BLE_ENABLE + OUT_BLE, +#endif + KEYCODE_END }; #define NUM MO(_NUM) @@ -310,6 +330,7 @@ const uint32_t PROGMEM unicode_map[] = { // RGBSPS +#ifdef RGBSPS_ENABLE const uint8_t PROGMEM LED_ALNUM[] = { LED_Z, LED_A, @@ -504,7 +525,7 @@ void led_init(void) { rgbsps_set(LED_TRACKPOINT2, 0, 0, 15); rgbsps_set(LED_TRACKPOINT3, 15, 0, 0); } - +#endif // RGBSPS_ENABLE // keymaps @@ -750,7 +771,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_SYS] = KEYMAP( XXXXXXX, QWERTY, WIN, XXXXXXX, RESET, XXXXXXX, XXXXXXX, OUT_USB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, AUDIO, XXXXXXX, DVORAK, XXXXXXX, GLOW, XXXXXXX, XXXXXXX, WORKMAN, LINUX, XXXXXXX, XXXXXXX, + XXXXXXX, FC_TOG, XXXXXXX, DVORAK, XXXXXXX, GLOW, XXXXXXX, XXXXXXX, WORKMAN, LINUX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, COLEMAK, XXXXXXX, OUT_BLE, NORMAN, OSX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______ ), @@ -1001,6 +1022,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; // glow mode changer +#ifdef RGBSPS_ENABLE case GLOW: if (record->event.pressed) { glow_mode++; @@ -1012,16 +1034,20 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; +#endif - // faux clicky toggle, TBD - case AUDIO: - return false; + // faux clicky indicator +#ifdef FAUXCLICKY_ENABLE + case FC_TOG: + return true; break; +#endif } return true; } void set_output_user(uint8_t output) { +#ifdef ADAFRUIT_BLE_ENABLE switch(output) { case OUTPUT_USB: led_set_output_usb(); @@ -1032,82 +1058,92 @@ void set_output_user(uint8_t output) { default: led_set_output_none(); } +#endif } -void matrix_init_user(void) { +void matrix_init_user() { _delay_ms(500); // give time for usb to initialize set_unicode_input_mode(UC_LNX); + +#ifdef RGBSPS_ENABLE led_init(); +#endif // auto detect output on init +#ifdef ADAFRUIT_BLE_ENABLE uint8_t output = auto_detect_output(); if (output == OUTPUT_USB) { set_output(OUTPUT_USB); } else { set_output(OUTPUT_ADAFRUIT_BLE); } +#endif } -void matrix_scan_user(void) { - led_set_layer_indicator(); +void turn_off_capslock() { + if (capslock) { + register_code(KC_CAPS); + unregister_code(KC_CAPS); + } } -void battery_poll(uint8_t level) { - rgbsps_sethsv(LED_IND_BATTERY, level * 120/255, 255, 15); - rgbsps_send(); -} +#ifdef RGBSPS_ENABLE + void matrix_scan_user(void) { + led_set_layer_indicator(); + } -void led_set_user(uint8_t usb_led) { - bool new_capslock = usb_led & (1< | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | & | ^ | | | _ | + | ? | | [ | ] | { | } | : | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ -[_PUNC] = KEYMAP( - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, - KC_GRV, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, XXXXXXX, KC_LPRN, KC_RPRN, KC_LABK, KC_RABK, _______, - KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, XXXXXXX, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_COLN, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -), - -/* Num - * ,-----------------------------------------------------------------------------------. - * | ~ | ! | @ | # | $ | % | A | 7 | 8 | 9 | D | ` | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | * | \ | - | = | / | B | 4 | 5 | 6 | E | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | & | ^ | | | _ | + | ? | C | 1 | 2 | 3 | F | : | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | x | 0 | , | . | | | - * `-----------------------------------------------------------------------------------' - */ -[_NUM] = KEYMAP( - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, S(KC_A), KC_7, KC_8, KC_9, 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_1, KC_2, KC_3, S(KC_F), KC_COLN, - _______, _______, _______, _______, _______, _______, _______, LT(_PUNC, KC_0), KC_COMM, KC_DOT, KC_X, _______ -), - -/* Func - * ,-----------------------------------------------------------------------------------. - * | | F1 | F2 | F3 | F4 | | | PgUp | Up | PgDn | PgUp | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | F5 | F6 | F7 | F8 |PrtSc | | Left | Down | Right| PgDn | Ins | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F9 | F10 | F11 | F12 | | | | Home | End | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ -[_FUNC] = KEYMAP( - XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, KC_DEL, - XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, KC_PSCR, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_INS, - _______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_END, XXXXXXX, _______, - _______, _______, _______, _______, PUNC, _______, _______, _______, _______, _______, _______, _______ -), - -/* Uppercase Greek - * ,-----------------------------------------------------------------------------------. - * | | | | | | | | | | | | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ -[_GREEKU] = KEYMAP( - _______, 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, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -), - -/* Lowercase Greek - * ,-----------------------------------------------------------------------------------. - * | | | | | | | | | | | | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ -[_GREEKL] = KEYMAP( - _______, 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, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -), - -/* Emoji - * ,-----------------------------------------------------------------------------------. - * | | | | | | | | | | | | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ -[_EMOJI] = KEYMAP( - 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), - X(POO), X(EYES), _______,X(HUNRD), X(SKULL),X(HORNS), X(HALO), X(FEAR),X(YUMMY),_______,X(DISAP),X(NOEVK) -), - -/* GUI - * ,-----------------------------------------------------------------------------------. - * | | D1 | D2 | D3 | D4 | D5 | D6 | D7 | D8 | D9 | D10 | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | Vol- | Mute | Vol+ | | | Prev | | Next | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | Prev | Play | Next | BTab | Tab | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ -[_GUI] = KEYMAP( - 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, - XXXXXXX, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, S(KC_TAB),KC_TAB, KC_WWWB, XXXXXXX, KC_WWWF, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, KC_SPC, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX -), - -/* Sys - * ,-----------------------------------------------------------------------------------. - * | |Qwerty| Win | |Reset | | | USB | | | | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | |Audio | |Dvorak| | Glow | | |WorkMn|Linux | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | |Colmak| | BLE |Norman|MacOS | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ -[_SYS] = KEYMAP( - XXXXXXX, QWERTY, WIN, XXXXXXX, RESET, XXXXXXX, XXXXXXX, OUT_USB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, FC_TOG, XXXXXXX, DVORAK, XXXXXXX, GLOW, XXXXXXX, XXXXXXX, WORKMAN, LINUX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, COLEMAK, XXXXXXX, OUT_BLE, NORMAN, OSX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______ -), - -}; - -#ifdef AUDIO_ENABLE -float tone_startup[][2] = SONG(STARTUP_SOUND); -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -float tone_colemak[][2] = SONG(COLEMAK_SOUND); -float tone_workman[][2] = SONG(DVORAK_SOUND); -float tone_goodbye[][2] = SONG(GOODBYE_SOUND); -float tone_linux[][2] = SONG(CAPS_LOCK_ON_SOUND); -float tone_windows[][2] = SONG(SCROLL_LOCK_ON_SOUND); -float tone_osx[][2] = SONG(NUM_LOCK_ON_SOUND); -float tone_click[][2] = SONG(MUSICAL_NOTE(_F3, 2)); -float tone_release[][2] = SONG(MUSICAL_NOTE(_A3, 2)); -float tone_tolelot[][2] = SONG(Q__NOTE(_E5), Q__NOTE(_C5), Q__NOTE(_D5)); -#endif - -void persistant_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - -#ifdef DOUBLESPACE_LAYER_ENABLE -void process_doublespace(bool pressed, bool *isactive, bool *otheractive, bool *isemitted) { - if (pressed) { - *isactive = true; - if (*otheractive) { - layer_on(_SPACE); - register_code(KC_LALT); // sends alt and enter layer - space_layer_entered = true; - } - } else { - *isactive = false; - if (space_layer_entered) { - unregister_code(KC_LALT); // release alt and exit layer - layer_off(_SPACE); - if (!*otheractive) { - space_layer_entered = false; - } - } else { - if (!*isemitted) { - register_code(KC_SPC); - unregister_code(KC_SPC); - } - *isemitted = false; - } - } -} -#endif - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - // faux clicky - // if (record->event.pressed) PLAY_NOTE_ARRAY(tone_click, false, 0); - #ifdef AUDIO_ENABLE - #ifdef TOLELOT_ENABLE - if (record->event.pressed) { - PLAY_NOTE_ARRAY(tone_tolelot, false, 0); - } - #else - if (record->event.pressed) { - PLAY_NOTE_ARRAY(tone_click, false, 0); - } else { - PLAY_NOTE_ARRAY(tone_release, false, 0); - } - #endif - #endif - - bool lshift = keyboard_report->mods & MOD_BIT(KC_LSFT); - bool rshift = keyboard_report->mods & MOD_BIT(KC_RSFT); - -#ifdef DOUBLESPACE_LAYER_ENABLE - // double-space: send space immediately if any other key depressed before space is released - if ((lspace_active ^ rspace_active) - && keycode != LSPACE - && keycode != RSPACE - && record->event.pressed) - { - if (lspace_active) { - if (!lspace_emitted) { - register_code(KC_SPC); - unregister_code(KC_SPC); - } - lspace_emitted = true; - } - if (rspace_active) { - if (!rspace_emitted) { - register_code(KC_SPC); - unregister_code(KC_SPC); - } - rspace_emitted = true; - } - } - - if (layer == _SPACE && keycode != S(KC_TAB) && keycode != KC_TAB && keycode != KC_ESC && keycode != XXXXXXX) { - if (record->event.pressed) { - unregister_code(KC_LALT); - } else { - register_code(KC_LALT); - } - } -#endif - - switch (keycode) { - -#ifdef DOUBLESPACE_LAYER_ENABLE - // double-space enter space layer - case LSPACE: - process_doublespace(record->event.pressed, &lspace_active, &rspace_active, &lspace_emitted); - return false; - break; - case RSPACE: - process_doublespace(record->event.pressed, &rspace_active, &lspace_active, &rspace_emitted); - return false; - break; -#endif - - // handle greek layer shift - // handle both shift = capslock - case KC_LSFT: - case KC_RSFT: - ; - uint8_t layer = biton32(layer_state); - if (layer == _GREEKU || layer == _GREEKL) { - if (record->event.pressed) { - layer_on(_GREEKU); - layer_off(_GREEKL); - } else { - if (lshift ^ rshift) { // if only one shift was pressed - layer_on(_GREEKL); - layer_off(_GREEKU); - } - } - } else { - if (record->event.pressed) { - if (lshift ^ rshift) { // if only one shift was pressed - register_code(KC_CAPS); - unregister_code(KC_CAPS); - } - } - } - return true; - break; - - // press both ctrls to activate SYS layer - case KC_LCTL: - case KC_RCTL: - ; - bool lctrl = keyboard_report->mods & MOD_BIT(KC_LCTL); - bool rctrl = keyboard_report->mods & MOD_BIT(KC_RCTL); - if (record->event.pressed) { - if (lctrl ^ rctrl) { // if only one ctrl was pressed - layer_on(_SYS); - } - } else { - layer_off(_SYS); - } - return true; - break; - - // QWERTZ style comma and dot: semicolon and colon when shifted - case KC_COMM: - if (record->event.pressed) { - if (lshift || rshift) { - if (lshift) unregister_code(KC_LSFT); - if (rshift) unregister_code(KC_RSFT); - register_code(KC_SCLN); - unregister_code(KC_SCLN); - if (lshift) register_code(KC_LSFT); - if (rshift) register_code(KC_RSFT); - } else { - register_code(KC_COMM); - unregister_code(KC_COMM); - } - } - return false; - break; - case KC_DOT: - if (record->event.pressed) { - if ((keyboard_report->mods & MOD_BIT(KC_LSFT)) || (keyboard_report->mods & MOD_BIT(KC_RSFT))) { - register_code(KC_SCLN); - unregister_code(KC_SCLN); - } else { - register_code(KC_DOT); - unregister_code(KC_DOT); - } - } - return false; - break; - - // layout switcher - case QWERTY: - if (record->event.pressed) { - persistant_default_layer_set(1UL<<_QWERTY); - } - return false; - break; -#ifdef LAYOUT_DVORAK - case DVORAK: - if (record->event.pressed) { - persistant_default_layer_set(1UL<<_DVORAK); - } - return false; - break; -#endif -#ifdef LAYOUT_COLEMAK - case COLEMAK: - if (record->event.pressed) { - persistant_default_layer_set(1UL<<_COLEMAK); - } - return false; - break; -#endif -#ifdef LAYOUT_WORKMAN - case WORKMAN: - if (record->event.pressed) { - persistant_default_layer_set(1UL<<_WORKMAN); - } - return false; - break; -#endif -#ifdef LAYOUT_NORMAN - case NORMAN: - if (record->event.pressed) { - persistant_default_layer_set(1UL<<_NORMAN); - } - return false; - break; -#endif - - // layer switchers - case PUNC: - if (record->event.pressed) { - layer_on(_PUNC); - update_tri_layer(_PUNC, _GREEKL, _EMOJI); - } else { - layer_off(_PUNC); - update_tri_layer(_PUNC, _GREEKL, _EMOJI); - } - return false; - break; - - case GREEK: - if (record->event.pressed) { - if (lshift || rshift) { - layer_on(_GREEKU); - layer_off(_GREEKL); - } else { - layer_on(_GREEKL); - layer_off(_GREEKU); - update_tri_layer(_PUNC, _GREEKL, _EMOJI); - } - } else { - layer_off(_GREEKU); - layer_off(_GREEKL); - update_tri_layer(_PUNC, _GREEKL, _EMOJI); - } - return false; - break; - - case NUM: - if (record->event.pressed) { - layer_on(_NUM); - } else { - layer_off(_NUM); - } - return false; - break; - case FUNC: - if (record->event.pressed) { - layer_on(_FUNC); - } else { - layer_off(_FUNC); - } - return false; - break; - - // OS switchers - case LINUX: - set_unicode_input_mode(UC_LNX); - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_linux, false, 0); - #endif - return false; - break; - case WIN: - set_unicode_input_mode(UC_WINC); - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_windows, false, 0); - #endif - return false; - break; - case OSX: - set_unicode_input_mode(UC_OSX); - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_osx, false, 0); - #endif - return false; - break; - - // faux clicky toggle, TBD - case FC_TOG: - return true; - break; - - } - return true; -} - -void matrix_init_user(void) { - #ifdef AUDIO_ENABLE - startup_user(); - #endif - set_unicode_input_mode(UC_LNX); -} - -#ifdef AUDIO_ENABLE - -void startup_user() -{ - _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); -} - -void shutdown_user() -{ - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); - _delay_ms(150); - stop_all_notes(); -} - -#endif - -void matrix_scan_user(void) { -} - -void led_set_user(uint8_t usb_led) { -} - -void turn_off_capslock() { - if (capslock) { - register_code(KC_CAPS); - unregister_code(KC_CAPS); - } -} +#include "../../../handwired/promethium/keymaps/priyadi/keymap.c" \ No newline at end of file -- cgit v1.2.3 From 1eac297a2fa4da7c5799bff80a112cd9bff6cf2a Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Wed, 15 Feb 2017 16:39:19 +0700 Subject: Added copyright notice --- keyboards/handwired/promethium/keymaps/priyadi/keymap.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 0dc0a0339..cdec187ee 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -1,5 +1,17 @@ -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, -// this is the style you want to emulate. +/* +Copyright 2017 Priyadi Iman Nurcahyo + +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 . +*/ #if defined(PRIYADI_PROMETHIUM) #include "promethium.h" -- cgit v1.2.3 From 3882f97d2e779899c202111e46cf2cf2926b9212 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Wed, 15 Feb 2017 19:22:58 +0700 Subject: Move keyboard specific stuff to keyboard specific files, and vice versa --- keyboards/handwired/promethium/config.h | 104 ++++++++++++++++++++ .../handwired/promethium/keymaps/priyadi/config.h | 2 - .../handwired/promethium/keymaps/priyadi/keymap.c | 69 +++++++++++--- keyboards/handwired/promethium/promethium.c | 4 + keyboards/handwired/promethium/promethium.h | 105 +-------------------- 5 files changed, 168 insertions(+), 116 deletions(-) diff --git a/keyboards/handwired/promethium/config.h b/keyboards/handwired/promethium/config.h index fd45c2bfe..24f02993f 100644 --- a/keyboards/handwired/promethium/config.h +++ b/keyboards/handwired/promethium/config.h @@ -152,6 +152,110 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION +#define PS2_INIT_DELAY 2000 +#define BATTERY_PIN 9 +#define BATTERY_POLL 30000 +#define MAX_VOLTAGE 4.2 +#define MIN_VOLTAGE 3.2 + +#define KEYMAP( \ + 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, \ + k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c \ +) \ +{ \ + {k11, k12, k13, k14, k15, k16}, \ + {k21, k22, k23, k24, k25, k26}, \ + {k31, k32, k33, k34, k35, k36}, \ + {k41, k42, k43, k44, k45, k46}, \ + {k17, k18, k19, k1a, k1b, k1c}, \ + {k27, k28, k29, k2a, k2b, k2c}, \ + {k37, k38, k39, k3a, k3b, k3c}, \ + {k47, k48, k49, k4a, k4b, k4c} \ +} + +#ifndef __ASSEMBLER__ // assembler doesn't like enum in .h file +enum led_sequence { + LED_IND_BLUETOOTH, + LED_IND_USB, + LED_IND_BATTERY, + + LED_IND_FUN, + LED_IND_NUM, + LED_IND_EMOJI, + + LED_BKSP, + LED_ENT, + LED_RSFT, + LED_RCTL, + + LED_RGUI, + LED_SLSH, + LED_SCLN, + LED_P, + + LED_O, + LED_L, + LED_DOT, + LED_RALT, + + LED_EMOJI, + LED_COMM, + LED_K, + LED_I, + + LED_U, + LED_J, + LED_M, + LED_FUN, + + LED_RSPC, + LED_N, + LED_HH, + LED_Y, + + LED_TRACKPOINT3, + LED_TRACKPOINT2, + LED_TRACKPOINT1, + + LED_LSPC, + LED_B, + LED_G, + LED_T, + + LED_R, + LED_F, + LED_V, + LED_NUM, + + LED_PUNC, + LED_C, + LED_D, + LED_E, + + LED_W, + LED_S, + LED_X, + LED_LALT, + + LED_LGUI, + LED_Z, + LED_A, + LED_Q, + + LED_TAB, + LED_ESC, + LED_LSFT, + LED_LCTL, + + LED_TOTAL +}; + +#define RGB_DI_PIN B5 +#define RGBSPS_NUM LED_TOTAL +#endif + /* PS/2 mouse */ #ifdef PS2_USE_BUSYWAIT # define PS2_CLOCK_PORT PORTD diff --git a/keyboards/handwired/promethium/keymaps/priyadi/config.h b/keyboards/handwired/promethium/keymaps/priyadi/config.h index 00f9fed31..3f5dd5817 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/config.h +++ b/keyboards/handwired/promethium/keymaps/priyadi/config.h @@ -14,8 +14,6 @@ #define PREVENT_STUCK_MODIFIERS #define RGBSPS_ENABLE -#define RGB_DI_PIN B5 -#define RGBSPS_NUM 57 #define UNICODE_TYPE_DELAY 0 diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index cdec187ee..2c43f9884 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -74,6 +74,7 @@ uint8_t glow_mode = GLOW_MIN; void turn_off_capslock(void); extern keymap_config_t keymap_config; +// layers, ordering is important! enum layers { _QWERTY, _DVORAK, @@ -89,9 +90,10 @@ enum layers { _FUN, _PUNC, + _EMPTY, _EMOJI, _GUI, - _SYS, + _SYS }; // double-space layer @@ -130,6 +132,7 @@ enum planck_keycodes { KEYCODE_END }; +#define EMPTY MO(_EMPTY) #define NUM MO(_NUM) #define FUN MO(_FUN) #define FUN0 LT(_FUN, KC_0) @@ -237,6 +240,11 @@ enum unicode_name { LOMEG, FSIGM, + + LTEQ, + GTEQ, + NOTEQ, + PLMIN, }; const uint32_t PROGMEM unicode_map[] = { @@ -338,6 +346,12 @@ const uint32_t PROGMEM unicode_map[] = { [LPSI] = 0x03C8, [LOMEG] = 0x03C9, [FSIGM] = 0x03C2, + + // other + [LTEQ] = 0x2264, // less than or equal + [GTEQ] = 0x2265, // greater than or equal + [NOTEQ] = 0x2260, // not equal + [PLMIN] = 0xB1, // plus minus }; // RGBSPS @@ -551,14 +565,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| Z | X | C | V | B | N | M | , | . | / |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | Alt | GUI | Punc | Num | Space | Func |Greek | GUI |AltGr | Ctrl | + * | Ctrl | Alt | GUI | Punc | Num | Space | Fun |Greek | GUI |AltGr | Ctrl | * `-----------------------------------------------------------------------------------' */ [_QWERTY] = KEYMAP( 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, - KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, NUM, LSPACE, RSPACE, FUN, GREEK, KC_RGUI, KC_RALT, KC_RCTL + KC_LCTL, KC_LALT, KC_LGUI, EMPTY, NUM, LSPACE, RSPACE, FUN, GREEK, KC_RGUI, KC_RALT, KC_RCTL ), /* Dvorak @@ -646,31 +660,31 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Punc * ,-----------------------------------------------------------------------------------. - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | ` | + * | ~ | ! | @ | # | $ | % | ^ | & | * | ≤ | ≥ | ` | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | * | \ | - | = | / | | ( | ) | < | > | | + * | | * | \ | - | = | / | ≠ | ( | ) | < | > | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | & | ^ | | | _ | + | ? | | [ | ] | { | } | : | + * | & | ^ | | | _ | + | ? | ± | [ | ] | { | } | : | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ [_PUNC] = KEYMAP( - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, - KC_GRV, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, XXXXXXX, KC_LPRN, KC_RPRN, KC_LABK, KC_RABK, _______, - KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, XXXXXXX, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_COLN, + 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, KC_COLN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), /* Num * ,-----------------------------------------------------------------------------------. - * | ~ | ! | @ | # | $ | % | A | 7 | 8 | 9 | D | ` | + * | ~ | ! | @ | # | $ | % | A | 7 | 8 | 9 | D | | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | * | \ | - | = | / | B | 4 | 5 | 6 | E | | + * | ` | * | \ | - | = | / | B | 4 | 5 | 6 | E | | * |------+------+------+------+------+------|------+------+------+------+------+------| * | & | ^ | | | _ | + | ? | C | 1 | 2 | 3 | F | : | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | x | 0 | , | . | | | + * | | | | | | | | 0 | , | . | x | | * `-----------------------------------------------------------------------------------' */ [_NUM] = KEYMAP( @@ -734,6 +748,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), +/* Empty + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_EMPTY] = KEYMAP( + 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, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + /* Emoji * ,-----------------------------------------------------------------------------------. * | | | | | | | | | | | | | @@ -749,7 +781,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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), - X(POO), X(EYES), _______,X(HUNRD), X(SKULL),X(HORNS), X(HALO), X(FEAR),X(YUMMY),_______,X(DISAP),X(NOEVK) + X(POO), X(EYES), X(HUNRD),_______, X(SKULL),X(HORNS), X(HALO), X(FEAR),_______,X(YUMMY),X(DISAP),X(NOEVK) ), /* GUI @@ -788,6 +820,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______ ), + }; void persistant_default_layer_set(uint16_t default_layer) { @@ -831,6 +864,16 @@ uint32_t layer_state_set_kb(uint32_t state) } else { state &= ~(1UL<<_PUNC); } + + // turn on emoji layer if empty and greek layer are on + if ( + (state & ((1UL<<_EMPTY) | (1UL<<_GREEKU))) == ((1UL<<_EMPTY) | (1UL<<_GREEKU)) + || (state & ((1UL<<_EMPTY) | (1UL<<_GREEKL))) == ((1UL<<_EMPTY) | (1UL<<_GREEKL)) + ) { + state |= (1UL<<_EMOJI); + } else { + state &= ~(1UL<<_EMOJI); + } return state; } diff --git a/keyboards/handwired/promethium/promethium.c b/keyboards/handwired/promethium/promethium.c index 62e2281fa..4943f8c9f 100644 --- a/keyboards/handwired/promethium/promethium.c +++ b/keyboards/handwired/promethium/promethium.c @@ -36,3 +36,7 @@ void led_set_kb(uint8_t usb_led) { led_set_user(usb_led); } +__attribute__ ((weak)) +void led_set_user(uint8_t usb_led) { +} + diff --git a/keyboards/handwired/promethium/promethium.h b/keyboards/handwired/promethium/promethium.h index caad5258e..260f140c5 100644 --- a/keyboards/handwired/promethium/promethium.h +++ b/keyboards/handwired/promethium/promethium.h @@ -1,107 +1,10 @@ #ifndef PROMETHIUM_H #define PROMETHIUM_H -#include "quantum.h" +#include "stdint.h" -#define PS2_INIT_DELAY 2000 -#define BATTERY_PIN 9 -#define BATTERY_POLL 30000 -#define MAX_VOLTAGE 4.2 -#define MIN_VOLTAGE 3.2 - -#define KEYMAP( \ - 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, \ - k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c \ -) \ -{ \ - {k11, k12, k13, k14, k15, k16}, \ - {k21, k22, k23, k24, k25, k26}, \ - {k31, k32, k33, k34, k35, k36}, \ - {k41, k42, k43, k44, k45, k46}, \ - {k17, k18, k19, k1a, k1b, k1c}, \ - {k27, k28, k29, k2a, k2b, k2c}, \ - {k37, k38, k39, k3a, k3b, k3c}, \ - {k47, k48, k49, k4a, k4b, k4c} \ -} - - - -enum led_sequence { - LED_IND_BLUETOOTH, - LED_IND_USB, - LED_IND_BATTERY, - - LED_IND_FUN, - LED_IND_NUM, - LED_IND_EMOJI, - - LED_BKSP, - LED_ENT, - LED_RSFT, - LED_RCTL, - - LED_RGUI, - LED_SLSH, - LED_SCLN, - LED_P, - - LED_O, - LED_L, - LED_DOT, - LED_RALT, - - LED_EMOJI, - LED_COMM, - LED_K, - LED_I, - - LED_U, - LED_J, - LED_M, - LED_FUN, - - LED_RSPC, - LED_N, - LED_HH, - LED_Y, - - LED_TRACKPOINT3, - LED_TRACKPOINT2, - LED_TRACKPOINT1, - - LED_LSPC, - LED_B, - LED_G, - LED_T, - - LED_R, - LED_F, - LED_V, - LED_NUM, - - LED_PUNC, - LED_C, - LED_D, - LED_E, - - LED_W, - LED_S, - LED_X, - LED_LALT, - - LED_LGUI, - LED_Z, - LED_A, - LED_Q, - - LED_TAB, - LED_ESC, - LED_LSFT, - LED_LCTL, -}; +void battery_poll(uint8_t level); +void led_set_kb(uint8_t usb_led); +void led_set_user(uint8_t usb_led); #endif - -void battery_poll(uint8_t level); \ No newline at end of file -- cgit v1.2.3 From ac04fe03015c875f2d796f573ed42aeb9eebb267 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Wed, 15 Feb 2017 19:40:33 +0700 Subject: Added README for my keymap --- .../handwired/promethium/keymaps/priyadi/README.md | 44 ++++++++++++++++++++++ .../handwired/promethium/keymaps/priyadi/readme.md | 0 2 files changed, 44 insertions(+) create mode 100644 keyboards/handwired/promethium/keymaps/priyadi/README.md delete mode 100644 keyboards/handwired/promethium/keymaps/priyadi/readme.md diff --git a/keyboards/handwired/promethium/keymaps/priyadi/README.md b/keyboards/handwired/promethium/keymaps/priyadi/README.md new file mode 100644 index 000000000..37c2be6f9 --- /dev/null +++ b/keyboards/handwired/promethium/keymaps/priyadi/README.md @@ -0,0 +1,44 @@ +Priyadi Keymap for Planck-like Keyboards +======================================== + +Main layer modifications from default Planck layout: + +* Enter moved to quotes position +* Quotes moved to semicolon position. +* QWERTZ style colon & semicolon. shift-. = : shift-, = ; This is done in hardware, no layout switching needed in software. +* < & > occupied precious real estate, and so they are moved down to punctuation layer. +* Right-shift on Enter position. +* Removed arrow keys, they are on another layer now. +* Put Ctrl-Alt-Super and Super-AltGr-Ctrl in left & right corners. +* Lower & Raise is now called Num and Fun. +* OS & Left keys become another thumb modifier: Empty & Greek (Empty because I used this for another use and my muscle memory is not adapted to it yet) + +On Promethium, Trackpoint is enabled on PD2 and PD2. We impersonate a Thinkpad keyboard to be able to use Thinkpad driver on Windows (still needs verification). + +AltGr & Compose dual use key. Tap for Compose (mapped to Scroll Lock in hardware) and press for AltGr. + +Supported layouts: QWERTY, DVORAK, Colemak, Workman, Norman. Switchable from SYS layer. In DVORAK, semicolon is replaced by /? key. + +Num activates NUM layer: hexkeypad on the right side and most punctuation on the left side. Hexkeypad is optimized for C-style hex, IPv6, HTML RGB triplets, etc. + +Fun activates FUN layer: arrow cluster on right home row, F-numbers on left side. + +Pressing Num+Fun activates PUNC layer: same punctuations as NUM layer on the left side, parens on the right side. + +Greek activates either GREEKU or GREEKL layer, depending whether shift is pressed or not. Shift state changes are also taken into account when the layer is active. + +Greek+Empty activates EMOJI layer. The whole keyboard now outputs emojis! + +Pressing both spacebars (spacekeys, actually) activates GUI layer. QWERTYUIOP switches to a virtual desktop. J & L switches virtual desktop to the left or right. S & F behaves like Alt-Tab and Alt-Shift-Tab. This works by sending Alt press when entering the layer, and Alt release when other than S or F keys are pressed. + +Pressing both Ctrls activates SYS layer for configuring the keyboard. + +On Promethium, USB or Bluetooth output is detected on startup. If USB is connected, then USB is used initially. SYS-U and SYS-B switch output to USB or Bluetooth at runtime. Current active output is indicated with LEDs. + +SYS-W, SYS-L, SYS-M switch Unicode input method. SYS-Q, SYS-D, SYS-C, SYS-K, SYS-N switch to QWERTY, DVORAK, Colemak, Workman and Norman, respectively. + +On Planck, SYS-A (mnemonic: audio) toggles faux clicky: use buzzer to emit clicks on key presses and releases. + +On Promethium there are 6 indicator LEDs, and under switch LEDs on each switches, including Trackpoint buttons. Totaling 57 LEDs. Output is limited to 0xF for each LEDs to conserve power. SYS-G (mnemonic: glow) toggles various backlighting modes. + +On Promethium, there's a LED to indicate battery level. Hue indicates level: green is full, red is empty. \ No newline at end of file diff --git a/keyboards/handwired/promethium/keymaps/priyadi/readme.md b/keyboards/handwired/promethium/keymaps/priyadi/readme.md deleted file mode 100644 index e69de29bb..000000000 -- cgit v1.2.3 From 69ea10f9a9407415d8cbb5575a08bd73d5ddd7f9 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Wed, 15 Feb 2017 11:25:33 -0500 Subject: adds layer tap toggle --- quantum/keymap_common.c | 3 +++ quantum/quantum_keycodes.h | 13 +++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index 54b872d49..002eabd85 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c @@ -119,6 +119,9 @@ action_t action_for_key(uint8_t layer, keypos_t key) mod = keycode & 0xFF; action.code = ACTION_MODS_ONESHOT(mod); break; + case QK_LAYER_TAP_TOGGLE ... QK_LAYER_TAP_TOGGLE_MAX: + action.code = ACTION_LAYER_TAP_TOGGLE(keycode & 0xFF); + break; case QK_MOD_TAP ... QK_MOD_TAP_MAX: action.code = ACTION_MODS_TAP_KEY((keycode >> 0x8) & 0x1F, keycode & 0xFF); break; diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index cc7a5013f..f36c8044e 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -41,16 +41,18 @@ enum quantum_keycodes { #endif QK_TAP_DANCE = 0x5700, QK_TAP_DANCE_MAX = 0x57FF, -#ifdef UNICODEMAP_ENABLE - QK_UNICODE_MAP = 0x5800, - QK_UNICODE_MAP_MAX = 0x5BFF, -#endif + QK_LAYER_TAP_TOGGLE = 0x5800, + QK_LAYER_TAP_TOGGLE_MAX = 0x58FF, QK_MOD_TAP = 0x6000, QK_MOD_TAP_MAX = 0x7FFF, #ifdef UNICODE_ENABLE QK_UNICODE = 0x8000, QK_UNICODE_MAX = 0xFFFF, #endif +#ifdef UNICODEMAP_ENABLE + QK_UNICODE_MAP = 0x8000, + QK_UNICODE_MAP_MAX = 0x83FF, +#endif // Loose keycodes - to be used directly @@ -304,6 +306,9 @@ enum quantum_keycodes { // One-shot mod #define OSM(mod) (mod | QK_ONE_SHOT_MOD) +// Layer tap-toggle +#define TT(layer) (layer | QK_LAYER_TAP_TOGGLE) + // M-od, T-ap - 256 keycode max #define MT(mod, kc) (kc | QK_MOD_TAP | ((mod & 0x1F) << 8)) -- cgit v1.2.3 From 6788cbd76291e1f3103a350598f7bf5d523a7310 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Wed, 15 Feb 2017 12:39:58 -0500 Subject: give error if both unicode/map are enabled --- quantum/quantum_keycodes.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index f36c8044e..63b626926 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -45,6 +45,9 @@ enum quantum_keycodes { QK_LAYER_TAP_TOGGLE_MAX = 0x58FF, QK_MOD_TAP = 0x6000, QK_MOD_TAP_MAX = 0x7FFF, +#if defined(UNICODEMAP_ENABLE) && defined(UNICODE_ENABLE) + #error "Cannot enable both UNICODEMAP && UNICODE" +#endif #ifdef UNICODE_ENABLE QK_UNICODE = 0x8000, QK_UNICODE_MAX = 0xFFFF, -- cgit v1.2.3 From cbabb4d417ef58f5d484dc256b637f61619efaa8 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Wed, 15 Feb 2017 16:36:31 -0500 Subject: split up unicode systems into different files --- build_keyboard.mk | 4 +- quantum/process_keycode/process_ucis.c | 133 ++++++++++++++++++ quantum/process_keycode/process_ucis.h | 34 +++++ quantum/process_keycode/process_unicode.c | 200 --------------------------- quantum/process_keycode/process_unicode.h | 36 ----- quantum/process_keycode/process_unicodemap.c | 54 ++++++++ quantum/process_keycode/process_unicodemap.h | 8 ++ quantum/quantum.c | 13 ++ quantum/quantum.h | 10 +- 9 files changed, 253 insertions(+), 239 deletions(-) create mode 100644 quantum/process_keycode/process_ucis.c create mode 100644 quantum/process_keycode/process_ucis.h create mode 100644 quantum/process_keycode/process_unicodemap.c create mode 100644 quantum/process_keycode/process_unicodemap.h diff --git a/build_keyboard.mk b/build_keyboard.mk index c8e82cf0e..9d2eaec1f 100644 --- a/build_keyboard.mk +++ b/build_keyboard.mk @@ -168,12 +168,12 @@ endif ifeq ($(strip $(UCIS_ENABLE)), yes) OPT_DEFS += -DUCIS_ENABLE - UNICODE_ENABLE = yes + SRC += $(QUANTUM_DIR)/process_keycode/process_ucis.c endif ifeq ($(strip $(UNICODEMAP_ENABLE)), yes) OPT_DEFS += -DUNICODEMAP_ENABLE - UNICODE_ENABLE = yes + SRC += $(QUANTUM_DIR)/process_keycode/process_unicodemap.c endif ifeq ($(strip $(UNICODE_ENABLE)), yes) diff --git a/quantum/process_keycode/process_ucis.c b/quantum/process_keycode/process_ucis.c new file mode 100644 index 000000000..4ad2533b0 --- /dev/null +++ b/quantum/process_keycode/process_ucis.c @@ -0,0 +1,133 @@ +#include "process_ucis.h" + +qk_ucis_state_t qk_ucis_state; + +void qk_ucis_start(void) { + qk_ucis_state.count = 0; + qk_ucis_state.in_progress = true; + + qk_ucis_start_user(); +} + +__attribute__((weak)) +void qk_ucis_start_user(void) { + unicode_input_start(); + register_hex(0x2328); + unicode_input_finish(); +} + +static bool is_uni_seq(char *seq) { + uint8_t i; + + for (i = 0; seq[i]; i++) { + uint16_t code; + if (('1' <= seq[i]) && (seq[i] <= '0')) + code = seq[i] - '1' + KC_1; + else + code = seq[i] - 'a' + KC_A; + + if (i > qk_ucis_state.count || qk_ucis_state.codes[i] != code) + return false; + } + + return (qk_ucis_state.codes[i] == KC_ENT || + qk_ucis_state.codes[i] == KC_SPC); +} + +__attribute__((weak)) +void qk_ucis_symbol_fallback (void) { + for (uint8_t i = 0; i < qk_ucis_state.count - 1; i++) { + uint8_t code = qk_ucis_state.codes[i]; + register_code(code); + unregister_code(code); + wait_ms(UNICODE_TYPE_DELAY); + } +} + +void register_ucis(const char *hex) { + for(int i = 0; hex[i]; i++) { + uint8_t kc = 0; + char c = hex[i]; + + switch (c) { + case '0': + kc = KC_0; + break; + case '1' ... '9': + kc = c - '1' + KC_1; + break; + case 'a' ... 'f': + kc = c - 'a' + KC_A; + break; + case 'A' ... 'F': + kc = c - 'A' + KC_A; + break; + } + + if (kc) { + register_code (kc); + unregister_code (kc); + wait_ms (UNICODE_TYPE_DELAY); + } + } +} + +bool process_ucis (uint16_t keycode, keyrecord_t *record) { + uint8_t i; + + if (!qk_ucis_state.in_progress) + return true; + + if (qk_ucis_state.count >= UCIS_MAX_SYMBOL_LENGTH && + !(keycode == KC_BSPC || keycode == KC_ESC || keycode == KC_SPC || keycode == KC_ENT)) { + return false; + } + + if (!record->event.pressed) + return true; + + qk_ucis_state.codes[qk_ucis_state.count] = keycode; + qk_ucis_state.count++; + + if (keycode == KC_BSPC) { + if (qk_ucis_state.count >= 2) { + qk_ucis_state.count -= 2; + return true; + } else { + qk_ucis_state.count--; + return false; + } + } + + if (keycode == KC_ENT || keycode == KC_SPC || keycode == KC_ESC) { + bool symbol_found = false; + + for (i = qk_ucis_state.count; i > 0; i--) { + register_code (KC_BSPC); + unregister_code (KC_BSPC); + wait_ms(UNICODE_TYPE_DELAY); + } + + if (keycode == KC_ESC) { + qk_ucis_state.in_progress = false; + return false; + } + + unicode_input_start(); + for (i = 0; ucis_symbol_table[i].symbol; i++) { + if (is_uni_seq (ucis_symbol_table[i].symbol)) { + symbol_found = true; + register_ucis(ucis_symbol_table[i].code + 2); + break; + } + } + if (!symbol_found) { + qk_ucis_symbol_fallback(); + } + unicode_input_finish(); + + qk_ucis_state.in_progress = false; + return false; + } + return true; +} \ No newline at end of file diff --git a/quantum/process_keycode/process_ucis.h b/quantum/process_keycode/process_ucis.h new file mode 100644 index 000000000..520db8042 --- /dev/null +++ b/quantum/process_keycode/process_ucis.h @@ -0,0 +1,34 @@ +#ifndef PROCESS_UCIS_H +#define PROCESS_UCIS_H + +#include "quantum.h" + +#ifndef UCIS_MAX_SYMBOL_LENGTH +#define UCIS_MAX_SYMBOL_LENGTH 32 +#endif + +typedef struct { + char *symbol; + char *code; +} qk_ucis_symbol_t; + +typedef struct { + uint8_t count; + uint16_t codes[UCIS_MAX_SYMBOL_LENGTH]; + bool in_progress:1; +} qk_ucis_state_t; + +extern qk_ucis_state_t qk_ucis_state; + +#define UCIS_TABLE(...) {__VA_ARGS__, {NULL, NULL}} +#define UCIS_SYM(name, code) {name, #code} + +extern const qk_ucis_symbol_t ucis_symbol_table[]; + +void qk_ucis_start(void); +void qk_ucis_start_user(void); +void qk_ucis_symbol_fallback (void); +void register_ucis(const char *hex); +bool process_ucis (uint16_t keycode, keyrecord_t *record); + +#endif diff --git a/quantum/process_keycode/process_unicode.c b/quantum/process_keycode/process_unicode.c index 9d01a592d..898e168a3 100644 --- a/quantum/process_keycode/process_unicode.c +++ b/quantum/process_keycode/process_unicode.c @@ -4,18 +4,6 @@ static uint8_t input_mode; uint8_t mods; -__attribute__((weak)) -uint16_t hex_to_keycode(uint8_t hex) -{ - if (hex == 0x0) { - return KC_0; - } else if (hex < 0xA) { - return KC_1 + (hex - 0x1); - } else { - return KC_A + (hex - 0xA); - } -} - void set_unicode_input_mode(uint8_t os_target) { input_mode = os_target; @@ -108,191 +96,3 @@ bool process_unicode(uint16_t keycode, keyrecord_t *record) { return true; } -#ifdef UNICODEMAP_ENABLE -__attribute__((weak)) -const uint32_t PROGMEM unicode_map[] = { -}; - -void register_hex32(uint32_t hex) { - uint8_t onzerostart = 1; - for(int i = 7; i >= 0; i--) { - if (i <= 3) { - onzerostart = 0; - } - uint8_t digit = ((hex >> (i*4)) & 0xF); - if (digit == 0) { - if (onzerostart == 0) { - register_code(hex_to_keycode(digit)); - unregister_code(hex_to_keycode(digit)); - } - } else { - register_code(hex_to_keycode(digit)); - unregister_code(hex_to_keycode(digit)); - onzerostart = 0; - } - } -} - -__attribute__((weak)) -void unicode_map_input_error() {} - -bool process_unicode_map(uint16_t keycode, keyrecord_t *record) { - if ((keycode & QK_UNICODE_MAP) == QK_UNICODE_MAP && record->event.pressed) { - const uint32_t* map = unicode_map; - uint16_t index = keycode - QK_UNICODE_MAP; - uint32_t code = pgm_read_dword_far(&map[index]); - if (code > 0xFFFF && code <= 0x10ffff && input_mode == UC_OSX) { - // Convert to UTF-16 surrogate pair - code -= 0x10000; - uint32_t lo = code & 0x3ff; - uint32_t hi = (code & 0xffc00) >> 10; - unicode_input_start(); - register_hex32(hi + 0xd800); - register_hex32(lo + 0xdc00); - unicode_input_finish(); - } else if ((code > 0x10ffff && input_mode == UC_OSX) || (code > 0xFFFFF && input_mode == UC_LNX)) { - // when character is out of range supported by the OS - unicode_map_input_error(); - } else { - unicode_input_start(); - register_hex32(code); - unicode_input_finish(); - } - } - return true; -} -#endif - -#ifdef UCIS_ENABLE -qk_ucis_state_t qk_ucis_state; - -void qk_ucis_start(void) { - qk_ucis_state.count = 0; - qk_ucis_state.in_progress = true; - - qk_ucis_start_user(); -} - -__attribute__((weak)) -void qk_ucis_start_user(void) { - unicode_input_start(); - register_hex(0x2328); - unicode_input_finish(); -} - -static bool is_uni_seq(char *seq) { - uint8_t i; - - for (i = 0; seq[i]; i++) { - uint16_t code; - if (('1' <= seq[i]) && (seq[i] <= '0')) - code = seq[i] - '1' + KC_1; - else - code = seq[i] - 'a' + KC_A; - - if (i > qk_ucis_state.count || qk_ucis_state.codes[i] != code) - return false; - } - - return (qk_ucis_state.codes[i] == KC_ENT || - qk_ucis_state.codes[i] == KC_SPC); -} - -__attribute__((weak)) -void qk_ucis_symbol_fallback (void) { - for (uint8_t i = 0; i < qk_ucis_state.count - 1; i++) { - uint8_t code = qk_ucis_state.codes[i]; - register_code(code); - unregister_code(code); - wait_ms(UNICODE_TYPE_DELAY); - } -} - -void register_ucis(const char *hex) { - for(int i = 0; hex[i]; i++) { - uint8_t kc = 0; - char c = hex[i]; - - switch (c) { - case '0': - kc = KC_0; - break; - case '1' ... '9': - kc = c - '1' + KC_1; - break; - case 'a' ... 'f': - kc = c - 'a' + KC_A; - break; - case 'A' ... 'F': - kc = c - 'A' + KC_A; - break; - } - - if (kc) { - register_code (kc); - unregister_code (kc); - wait_ms (UNICODE_TYPE_DELAY); - } - } -} - -bool process_ucis (uint16_t keycode, keyrecord_t *record) { - uint8_t i; - - if (!qk_ucis_state.in_progress) - return true; - - if (qk_ucis_state.count >= UCIS_MAX_SYMBOL_LENGTH && - !(keycode == KC_BSPC || keycode == KC_ESC || keycode == KC_SPC || keycode == KC_ENT)) { - return false; - } - - if (!record->event.pressed) - return true; - - qk_ucis_state.codes[qk_ucis_state.count] = keycode; - qk_ucis_state.count++; - - if (keycode == KC_BSPC) { - if (qk_ucis_state.count >= 2) { - qk_ucis_state.count -= 2; - return true; - } else { - qk_ucis_state.count--; - return false; - } - } - - if (keycode == KC_ENT || keycode == KC_SPC || keycode == KC_ESC) { - bool symbol_found = false; - - for (i = qk_ucis_state.count; i > 0; i--) { - register_code (KC_BSPC); - unregister_code (KC_BSPC); - wait_ms(UNICODE_TYPE_DELAY); - } - - if (keycode == KC_ESC) { - qk_ucis_state.in_progress = false; - return false; - } - - unicode_input_start(); - for (i = 0; ucis_symbol_table[i].symbol; i++) { - if (is_uni_seq (ucis_symbol_table[i].symbol)) { - symbol_found = true; - register_ucis(ucis_symbol_table[i].code + 2); - break; - } - } - if (!symbol_found) { - qk_ucis_symbol_fallback(); - } - unicode_input_finish(); - - qk_ucis_state.in_progress = false; - return false; - } - return true; -} -#endif diff --git a/quantum/process_keycode/process_unicode.h b/quantum/process_keycode/process_unicode.h index f17cfa6cf..7ed9e54d5 100644 --- a/quantum/process_keycode/process_unicode.h +++ b/quantum/process_keycode/process_unicode.h @@ -21,42 +21,6 @@ void register_hex(uint16_t hex); bool process_unicode(uint16_t keycode, keyrecord_t *record); -#ifdef UNICODEMAP_ENABLE -void unicode_map_input_error(void); -bool process_unicode_map(uint16_t keycode, keyrecord_t *record); -#endif - -#ifdef UCIS_ENABLE -#ifndef UCIS_MAX_SYMBOL_LENGTH -#define UCIS_MAX_SYMBOL_LENGTH 32 -#endif - -typedef struct { - char *symbol; - char *code; -} qk_ucis_symbol_t; - -typedef struct { - uint8_t count; - uint16_t codes[UCIS_MAX_SYMBOL_LENGTH]; - bool in_progress:1; -} qk_ucis_state_t; - -extern qk_ucis_state_t qk_ucis_state; - -#define UCIS_TABLE(...) {__VA_ARGS__, {NULL, NULL}} -#define UCIS_SYM(name, code) {name, #code} - -extern const qk_ucis_symbol_t ucis_symbol_table[]; - -void qk_ucis_start(void); -void qk_ucis_start_user(void); -void qk_ucis_symbol_fallback (void); -void register_ucis(const char *hex); -bool process_ucis (uint16_t keycode, keyrecord_t *record); - -#endif - #define UC_BSPC UC(0x0008) #define UC_SPC UC(0x0020) diff --git a/quantum/process_keycode/process_unicodemap.c b/quantum/process_keycode/process_unicodemap.c new file mode 100644 index 000000000..b8cdeaa97 --- /dev/null +++ b/quantum/process_keycode/process_unicodemap.c @@ -0,0 +1,54 @@ +#include "process_unicode_map.h" + +__attribute__((weak)) +const uint32_t PROGMEM unicode_map[] = { +}; + +void register_hex32(uint32_t hex) { + uint8_t onzerostart = 1; + for(int i = 7; i >= 0; i--) { + if (i <= 3) { + onzerostart = 0; + } + uint8_t digit = ((hex >> (i*4)) & 0xF); + if (digit == 0) { + if (onzerostart == 0) { + register_code(hex_to_keycode(digit)); + unregister_code(hex_to_keycode(digit)); + } + } else { + register_code(hex_to_keycode(digit)); + unregister_code(hex_to_keycode(digit)); + onzerostart = 0; + } + } +} + +__attribute__((weak)) +void unicode_map_input_error() {} + +bool process_unicode_map(uint16_t keycode, keyrecord_t *record) { + if ((keycode & QK_UNICODE_MAP) == QK_UNICODE_MAP && record->event.pressed) { + const uint32_t* map = unicode_map; + uint16_t index = keycode - QK_UNICODE_MAP; + uint32_t code = pgm_read_dword_far(&map[index]); + if (code > 0xFFFF && code <= 0x10ffff && input_mode == UC_OSX) { + // Convert to UTF-16 surrogate pair + code -= 0x10000; + uint32_t lo = code & 0x3ff; + uint32_t hi = (code & 0xffc00) >> 10; + unicode_input_start(); + register_hex32(hi + 0xd800); + register_hex32(lo + 0xdc00); + unicode_input_finish(); + } else if ((code > 0x10ffff && input_mode == UC_OSX) || (code > 0xFFFFF && input_mode == UC_LNX)) { + // when character is out of range supported by the OS + unicode_map_input_error(); + } else { + unicode_input_start(); + register_hex32(code); + unicode_input_finish(); + } + } + return true; +} \ No newline at end of file diff --git a/quantum/process_keycode/process_unicodemap.h b/quantum/process_keycode/process_unicodemap.h new file mode 100644 index 000000000..291bd8de0 --- /dev/null +++ b/quantum/process_keycode/process_unicodemap.h @@ -0,0 +1,8 @@ +#ifndef PROCESS_UNICODEMAP_H +#define PROCESS_UNICODEMAP_H + +#include "quantum.h" + +void unicode_map_input_error(void); +bool process_unicode_map(uint16_t keycode, keyrecord_t *record); +#endif \ No newline at end of file diff --git a/quantum/quantum.c b/quantum/quantum.c index 2088c10c9..4a6d0355f 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -972,6 +972,19 @@ void send_nibble(uint8_t number) { } } + +__attribute__((weak)) +uint16_t hex_to_keycode(uint8_t hex) +{ + if (hex == 0x0) { + return KC_0; + } else if (hex < 0xA) { + return KC_1 + (hex - 0x1); + } else { + return KC_A + (hex - 0xA); + } +} + void api_send_unicode(uint32_t unicode) { #ifdef API_ENABLE uint8_t chunk[4]; diff --git a/quantum/quantum.h b/quantum/quantum.h index 18f072189..580d51202 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -56,6 +56,14 @@ extern uint32_t default_layer_state; #include "process_unicode.h" #endif +#ifdef UCIS_ENABLE + #include "process_ucis.h" +#endif + +#ifdef UNICODEMAP_ENABLE + #include "process_unicodemap.h" +#endif + #include "process_tap_dance.h" #ifdef PRINTING_ENABLE @@ -117,7 +125,7 @@ void send_dword(uint32_t number); void send_word(uint16_t number); void send_byte(uint8_t number); void send_nibble(uint8_t number); - +uint16_t hex_to_keycode(uint8_t hex); void led_set_user(uint8_t usb_led); void led_set_kb(uint8_t usb_led); -- cgit v1.2.3 From 09add35e7f0b17f720862bc9b0f8478763937328 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Wed, 15 Feb 2017 17:09:35 -0500 Subject: add unicode common file, get names right --- build_keyboard.mk | 3 + quantum/process_keycode/process_ucis.h | 1 + quantum/process_keycode/process_unicode.c | 85 --------------- quantum/process_keycode/process_unicode.h | 124 +-------------------- quantum/process_keycode/process_unicode_common.h | 130 +++++++++++++++++++++++ quantum/process_keycode/process_unicodemap.c | 2 +- quantum/process_keycode/process_unicodemap.h | 1 + 7 files changed, 137 insertions(+), 209 deletions(-) create mode 100644 quantum/process_keycode/process_unicode_common.h diff --git a/build_keyboard.mk b/build_keyboard.mk index 9d2eaec1f..4a6fc0980 100644 --- a/build_keyboard.mk +++ b/build_keyboard.mk @@ -168,16 +168,19 @@ endif ifeq ($(strip $(UCIS_ENABLE)), yes) OPT_DEFS += -DUCIS_ENABLE + SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c SRC += $(QUANTUM_DIR)/process_keycode/process_ucis.c endif ifeq ($(strip $(UNICODEMAP_ENABLE)), yes) OPT_DEFS += -DUNICODEMAP_ENABLE + SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c SRC += $(QUANTUM_DIR)/process_keycode/process_unicodemap.c endif ifeq ($(strip $(UNICODE_ENABLE)), yes) OPT_DEFS += -DUNICODE_ENABLE + SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c SRC += $(QUANTUM_DIR)/process_keycode/process_unicode.c endif diff --git a/quantum/process_keycode/process_ucis.h b/quantum/process_keycode/process_ucis.h index 520db8042..4332f57b3 100644 --- a/quantum/process_keycode/process_ucis.h +++ b/quantum/process_keycode/process_ucis.h @@ -2,6 +2,7 @@ #define PROCESS_UCIS_H #include "quantum.h" +#include "process_unicode_common.h" #ifndef UCIS_MAX_SYMBOL_LENGTH #define UCIS_MAX_SYMBOL_LENGTH 32 diff --git a/quantum/process_keycode/process_unicode.c b/quantum/process_keycode/process_unicode.c index 898e168a3..ccae6fdca 100644 --- a/quantum/process_keycode/process_unicode.c +++ b/quantum/process_keycode/process_unicode.c @@ -1,91 +1,6 @@ #include "process_unicode.h" #include "action_util.h" -static uint8_t input_mode; -uint8_t mods; - -void set_unicode_input_mode(uint8_t os_target) -{ - input_mode = os_target; -} - -uint8_t get_unicode_input_mode(void) { - return input_mode; -} - -__attribute__((weak)) -void unicode_input_start (void) { - // save current mods - mods = keyboard_report->mods; - - // unregister all mods to start from clean state - if (mods & MOD_BIT(KC_LSFT)) unregister_code(KC_LSFT); - if (mods & MOD_BIT(KC_RSFT)) unregister_code(KC_RSFT); - if (mods & MOD_BIT(KC_LCTL)) unregister_code(KC_LCTL); - if (mods & MOD_BIT(KC_RCTL)) unregister_code(KC_RCTL); - if (mods & MOD_BIT(KC_LALT)) unregister_code(KC_LALT); - if (mods & MOD_BIT(KC_RALT)) unregister_code(KC_RALT); - if (mods & MOD_BIT(KC_LGUI)) unregister_code(KC_LGUI); - if (mods & MOD_BIT(KC_RGUI)) unregister_code(KC_RGUI); - - switch(input_mode) { - case UC_OSX: - register_code(KC_LALT); - break; - case UC_LNX: - register_code(KC_LCTL); - register_code(KC_LSFT); - register_code(KC_U); - unregister_code(KC_U); - unregister_code(KC_LSFT); - unregister_code(KC_LCTL); - break; - case UC_WIN: - register_code(KC_LALT); - register_code(KC_PPLS); - unregister_code(KC_PPLS); - break; - case UC_WINC: - register_code(KC_RALT); - unregister_code(KC_RALT); - register_code(KC_U); - unregister_code(KC_U); - } - wait_ms(UNICODE_TYPE_DELAY); -} - -__attribute__((weak)) -void unicode_input_finish (void) { - switch(input_mode) { - case UC_OSX: - case UC_WIN: - unregister_code(KC_LALT); - break; - case UC_LNX: - register_code(KC_SPC); - unregister_code(KC_SPC); - break; - } - - // reregister previously set mods - if (mods & MOD_BIT(KC_LSFT)) register_code(KC_LSFT); - if (mods & MOD_BIT(KC_RSFT)) register_code(KC_RSFT); - if (mods & MOD_BIT(KC_LCTL)) register_code(KC_LCTL); - if (mods & MOD_BIT(KC_RCTL)) register_code(KC_RCTL); - if (mods & MOD_BIT(KC_LALT)) register_code(KC_LALT); - if (mods & MOD_BIT(KC_RALT)) register_code(KC_RALT); - if (mods & MOD_BIT(KC_LGUI)) register_code(KC_LGUI); - if (mods & MOD_BIT(KC_RGUI)) register_code(KC_RGUI); -} - -void register_hex(uint16_t hex) { - for(int i = 3; i >= 0; i--) { - uint8_t digit = ((hex >> (i*4)) & 0xF); - register_code(hex_to_keycode(digit)); - unregister_code(hex_to_keycode(digit)); - } -} - bool process_unicode(uint16_t keycode, keyrecord_t *record) { if (keycode > QK_UNICODE && record->event.pressed) { uint16_t unicode = keycode & 0x7FFF; diff --git a/quantum/process_keycode/process_unicode.h b/quantum/process_keycode/process_unicode.h index 7ed9e54d5..4c21f11eb 100644 --- a/quantum/process_keycode/process_unicode.h +++ b/quantum/process_keycode/process_unicode.h @@ -2,130 +2,8 @@ #define PROCESS_UNICODE_H #include "quantum.h" - -#define UC_OSX 0 // Mac OS X -#define UC_LNX 1 // Linux -#define UC_WIN 2 // Windows 'HexNumpad' -#define UC_BSD 3 // BSD (not implemented) -#define UC_WINC 4 // WinCompose https://github.com/samhocevar/wincompose - -#ifndef UNICODE_TYPE_DELAY -#define UNICODE_TYPE_DELAY 10 -#endif - -void set_unicode_input_mode(uint8_t os_target); -uint8_t get_unicode_input_mode(void); -void unicode_input_start(void); -void unicode_input_finish(void); -void register_hex(uint16_t hex); +#include "process_unicode_common.h" bool process_unicode(uint16_t keycode, keyrecord_t *record); -#define UC_BSPC UC(0x0008) - -#define UC_SPC UC(0x0020) - -#define UC_EXLM UC(0x0021) -#define UC_DQUT UC(0x0022) -#define UC_HASH UC(0x0023) -#define UC_DLR UC(0x0024) -#define UC_PERC UC(0x0025) -#define UC_AMPR UC(0x0026) -#define UC_QUOT UC(0x0027) -#define UC_LPRN UC(0x0028) -#define UC_RPRN UC(0x0029) -#define UC_ASTR UC(0x002A) -#define UC_PLUS UC(0x002B) -#define UC_COMM UC(0x002C) -#define UC_DASH UC(0x002D) -#define UC_DOT UC(0x002E) -#define UC_SLSH UC(0x002F) - -#define UC_0 UC(0x0030) -#define UC_1 UC(0x0031) -#define UC_2 UC(0x0032) -#define UC_3 UC(0x0033) -#define UC_4 UC(0x0034) -#define UC_5 UC(0x0035) -#define UC_6 UC(0x0036) -#define UC_7 UC(0x0037) -#define UC_8 UC(0x0038) -#define UC_9 UC(0x0039) - -#define UC_COLN UC(0x003A) -#define UC_SCLN UC(0x003B) -#define UC_LT UC(0x003C) -#define UC_EQL UC(0x003D) -#define UC_GT UC(0x003E) -#define UC_QUES UC(0x003F) -#define UC_AT UC(0x0040) - -#define UC_A UC(0x0041) -#define UC_B UC(0x0042) -#define UC_C UC(0x0043) -#define UC_D UC(0x0044) -#define UC_E UC(0x0045) -#define UC_F UC(0x0046) -#define UC_G UC(0x0047) -#define UC_H UC(0x0048) -#define UC_I UC(0x0049) -#define UC_J UC(0x004A) -#define UC_K UC(0x004B) -#define UC_L UC(0x004C) -#define UC_M UC(0x004D) -#define UC_N UC(0x004E) -#define UC_O UC(0x004F) -#define UC_P UC(0x0050) -#define UC_Q UC(0x0051) -#define UC_R UC(0x0052) -#define UC_S UC(0x0053) -#define UC_T UC(0x0054) -#define UC_U UC(0x0055) -#define UC_V UC(0x0056) -#define UC_W UC(0x0057) -#define UC_X UC(0x0058) -#define UC_Y UC(0x0059) -#define UC_Z UC(0x005A) - -#define UC_LBRC UC(0x005B) -#define UC_BSLS UC(0x005C) -#define UC_RBRC UC(0x005D) -#define UC_CIRM UC(0x005E) -#define UC_UNDR UC(0x005F) - -#define UC_GRV UC(0x0060) - -#define UC_a UC(0x0061) -#define UC_b UC(0x0062) -#define UC_c UC(0x0063) -#define UC_d UC(0x0064) -#define UC_e UC(0x0065) -#define UC_f UC(0x0066) -#define UC_g UC(0x0067) -#define UC_h UC(0x0068) -#define UC_i UC(0x0069) -#define UC_j UC(0x006A) -#define UC_k UC(0x006B) -#define UC_l UC(0x006C) -#define UC_m UC(0x006D) -#define UC_n UC(0x006E) -#define UC_o UC(0x006F) -#define UC_p UC(0x0070) -#define UC_q UC(0x0071) -#define UC_r UC(0x0072) -#define UC_s UC(0x0073) -#define UC_t UC(0x0074) -#define UC_u UC(0x0075) -#define UC_v UC(0x0076) -#define UC_w UC(0x0077) -#define UC_x UC(0x0078) -#define UC_y UC(0x0079) -#define UC_z UC(0x007A) - -#define UC_LCBR UC(0x007B) -#define UC_PIPE UC(0x007C) -#define UC_RCBR UC(0x007D) -#define UC_TILD UC(0x007E) -#define UC_DEL UC(0x007F) - #endif diff --git a/quantum/process_keycode/process_unicode_common.h b/quantum/process_keycode/process_unicode_common.h new file mode 100644 index 000000000..171ecbca1 --- /dev/null +++ b/quantum/process_keycode/process_unicode_common.h @@ -0,0 +1,130 @@ +#ifndef PROCESS_UNICODE_COMMON_H +#define PROCESS_UNICODE_COMMON_H + +#include "quantum.h" + +#ifndef UNICODE_TYPE_DELAY +#define UNICODE_TYPE_DELAY 10 +#endif + +void set_unicode_input_mode(uint8_t os_target); +uint8_t get_unicode_input_mode(void); +void unicode_input_start(void); +void unicode_input_finish(void); +void register_hex(uint16_t hex); + + +#define UC_OSX 0 // Mac OS X +#define UC_LNX 1 // Linux +#define UC_WIN 2 // Windows 'HexNumpad' +#define UC_BSD 3 // BSD (not implemented) +#define UC_WINC 4 // WinCompose https://github.com/samhocevar/wincompose + +#define UC_BSPC UC(0x0008) + +#define UC_SPC UC(0x0020) + +#define UC_EXLM UC(0x0021) +#define UC_DQUT UC(0x0022) +#define UC_HASH UC(0x0023) +#define UC_DLR UC(0x0024) +#define UC_PERC UC(0x0025) +#define UC_AMPR UC(0x0026) +#define UC_QUOT UC(0x0027) +#define UC_LPRN UC(0x0028) +#define UC_RPRN UC(0x0029) +#define UC_ASTR UC(0x002A) +#define UC_PLUS UC(0x002B) +#define UC_COMM UC(0x002C) +#define UC_DASH UC(0x002D) +#define UC_DOT UC(0x002E) +#define UC_SLSH UC(0x002F) + +#define UC_0 UC(0x0030) +#define UC_1 UC(0x0031) +#define UC_2 UC(0x0032) +#define UC_3 UC(0x0033) +#define UC_4 UC(0x0034) +#define UC_5 UC(0x0035) +#define UC_6 UC(0x0036) +#define UC_7 UC(0x0037) +#define UC_8 UC(0x0038) +#define UC_9 UC(0x0039) + +#define UC_COLN UC(0x003A) +#define UC_SCLN UC(0x003B) +#define UC_LT UC(0x003C) +#define UC_EQL UC(0x003D) +#define UC_GT UC(0x003E) +#define UC_QUES UC(0x003F) +#define UC_AT UC(0x0040) + +#define UC_A UC(0x0041) +#define UC_B UC(0x0042) +#define UC_C UC(0x0043) +#define UC_D UC(0x0044) +#define UC_E UC(0x0045) +#define UC_F UC(0x0046) +#define UC_G UC(0x0047) +#define UC_H UC(0x0048) +#define UC_I UC(0x0049) +#define UC_J UC(0x004A) +#define UC_K UC(0x004B) +#define UC_L UC(0x004C) +#define UC_M UC(0x004D) +#define UC_N UC(0x004E) +#define UC_O UC(0x004F) +#define UC_P UC(0x0050) +#define UC_Q UC(0x0051) +#define UC_R UC(0x0052) +#define UC_S UC(0x0053) +#define UC_T UC(0x0054) +#define UC_U UC(0x0055) +#define UC_V UC(0x0056) +#define UC_W UC(0x0057) +#define UC_X UC(0x0058) +#define UC_Y UC(0x0059) +#define UC_Z UC(0x005A) + +#define UC_LBRC UC(0x005B) +#define UC_BSLS UC(0x005C) +#define UC_RBRC UC(0x005D) +#define UC_CIRM UC(0x005E) +#define UC_UNDR UC(0x005F) + +#define UC_GRV UC(0x0060) + +#define UC_a UC(0x0061) +#define UC_b UC(0x0062) +#define UC_c UC(0x0063) +#define UC_d UC(0x0064) +#define UC_e UC(0x0065) +#define UC_f UC(0x0066) +#define UC_g UC(0x0067) +#define UC_h UC(0x0068) +#define UC_i UC(0x0069) +#define UC_j UC(0x006A) +#define UC_k UC(0x006B) +#define UC_l UC(0x006C) +#define UC_m UC(0x006D) +#define UC_n UC(0x006E) +#define UC_o UC(0x006F) +#define UC_p UC(0x0070) +#define UC_q UC(0x0071) +#define UC_r UC(0x0072) +#define UC_s UC(0x0073) +#define UC_t UC(0x0074) +#define UC_u UC(0x0075) +#define UC_v UC(0x0076) +#define UC_w UC(0x0077) +#define UC_x UC(0x0078) +#define UC_y UC(0x0079) +#define UC_z UC(0x007A) + +#define UC_LCBR UC(0x007B) +#define UC_PIPE UC(0x007C) +#define UC_RCBR UC(0x007D) +#define UC_TILD UC(0x007E) +#define UC_DEL UC(0x007F) + +#endif \ No newline at end of file diff --git a/quantum/process_keycode/process_unicodemap.c b/quantum/process_keycode/process_unicodemap.c index b8cdeaa97..37f10df86 100644 --- a/quantum/process_keycode/process_unicodemap.c +++ b/quantum/process_keycode/process_unicodemap.c @@ -1,4 +1,4 @@ -#include "process_unicode_map.h" +#include "process_unicodemap.h" __attribute__((weak)) const uint32_t PROGMEM unicode_map[] = { diff --git a/quantum/process_keycode/process_unicodemap.h b/quantum/process_keycode/process_unicodemap.h index 291bd8de0..64a7a0109 100644 --- a/quantum/process_keycode/process_unicodemap.h +++ b/quantum/process_keycode/process_unicodemap.h @@ -2,6 +2,7 @@ #define PROCESS_UNICODEMAP_H #include "quantum.h" +#include "process_unicode_common.h" void unicode_map_input_error(void); bool process_unicode_map(uint16_t keycode, keyrecord_t *record); -- cgit v1.2.3 From 1bb574fe48bf73af4f3a4dadcff62599fd5dbb9a Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Wed, 15 Feb 2017 17:09:47 -0500 Subject: add unicode common file, get names right --- quantum/process_keycode/process_unicode_common.c | 86 ++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 quantum/process_keycode/process_unicode_common.c diff --git a/quantum/process_keycode/process_unicode_common.c b/quantum/process_keycode/process_unicode_common.c new file mode 100644 index 000000000..1a9d470c9 --- /dev/null +++ b/quantum/process_keycode/process_unicode_common.c @@ -0,0 +1,86 @@ +#include "process_unicode_common.h" + +static uint8_t input_mode; +uint8_t mods; + +void set_unicode_input_mode(uint8_t os_target) +{ + input_mode = os_target; +} + +uint8_t get_unicode_input_mode(void) { + return input_mode; +} + +__attribute__((weak)) +void unicode_input_start (void) { + // save current mods + mods = keyboard_report->mods; + + // unregister all mods to start from clean state + if (mods & MOD_BIT(KC_LSFT)) unregister_code(KC_LSFT); + if (mods & MOD_BIT(KC_RSFT)) unregister_code(KC_RSFT); + if (mods & MOD_BIT(KC_LCTL)) unregister_code(KC_LCTL); + if (mods & MOD_BIT(KC_RCTL)) unregister_code(KC_RCTL); + if (mods & MOD_BIT(KC_LALT)) unregister_code(KC_LALT); + if (mods & MOD_BIT(KC_RALT)) unregister_code(KC_RALT); + if (mods & MOD_BIT(KC_LGUI)) unregister_code(KC_LGUI); + if (mods & MOD_BIT(KC_RGUI)) unregister_code(KC_RGUI); + + switch(input_mode) { + case UC_OSX: + register_code(KC_LALT); + break; + case UC_LNX: + register_code(KC_LCTL); + register_code(KC_LSFT); + register_code(KC_U); + unregister_code(KC_U); + unregister_code(KC_LSFT); + unregister_code(KC_LCTL); + break; + case UC_WIN: + register_code(KC_LALT); + register_code(KC_PPLS); + unregister_code(KC_PPLS); + break; + case UC_WINC: + register_code(KC_RALT); + unregister_code(KC_RALT); + register_code(KC_U); + unregister_code(KC_U); + } + wait_ms(UNICODE_TYPE_DELAY); +} + +__attribute__((weak)) +void unicode_input_finish (void) { + switch(input_mode) { + case UC_OSX: + case UC_WIN: + unregister_code(KC_LALT); + break; + case UC_LNX: + register_code(KC_SPC); + unregister_code(KC_SPC); + break; + } + + // reregister previously set mods + if (mods & MOD_BIT(KC_LSFT)) register_code(KC_LSFT); + if (mods & MOD_BIT(KC_RSFT)) register_code(KC_RSFT); + if (mods & MOD_BIT(KC_LCTL)) register_code(KC_LCTL); + if (mods & MOD_BIT(KC_RCTL)) register_code(KC_RCTL); + if (mods & MOD_BIT(KC_LALT)) register_code(KC_LALT); + if (mods & MOD_BIT(KC_RALT)) register_code(KC_RALT); + if (mods & MOD_BIT(KC_LGUI)) register_code(KC_LGUI); + if (mods & MOD_BIT(KC_RGUI)) register_code(KC_RGUI); +} + +void register_hex(uint16_t hex) { + for(int i = 3; i >= 0; i--) { + uint8_t digit = ((hex >> (i*4)) & 0xF); + register_code(hex_to_keycode(digit)); + unregister_code(hex_to_keycode(digit)); + } +} \ No newline at end of file -- cgit v1.2.3 From c2a9acffd712145dc8b924005feb060c5ac3e2ff Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Wed, 15 Feb 2017 17:39:51 -0500 Subject: publicise variables --- quantum/process_keycode/process_unicode_common.c | 3 --- quantum/process_keycode/process_unicode_common.h | 4 +++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/quantum/process_keycode/process_unicode_common.c b/quantum/process_keycode/process_unicode_common.c index 1a9d470c9..baeee6d08 100644 --- a/quantum/process_keycode/process_unicode_common.c +++ b/quantum/process_keycode/process_unicode_common.c @@ -1,8 +1,5 @@ #include "process_unicode_common.h" -static uint8_t input_mode; -uint8_t mods; - void set_unicode_input_mode(uint8_t os_target) { input_mode = os_target; diff --git a/quantum/process_keycode/process_unicode_common.h b/quantum/process_keycode/process_unicode_common.h index 171ecbca1..9c26cfb07 100644 --- a/quantum/process_keycode/process_unicode_common.h +++ b/quantum/process_keycode/process_unicode_common.h @@ -7,13 +7,15 @@ #define UNICODE_TYPE_DELAY 10 #endif +static uint8_t input_mode; +uint8_t mods; + void set_unicode_input_mode(uint8_t os_target); uint8_t get_unicode_input_mode(void); void unicode_input_start(void); void unicode_input_finish(void); void register_hex(uint16_t hex); - #define UC_OSX 0 // Mac OS X #define UC_LNX 1 // Linux #define UC_WIN 2 // Windows 'HexNumpad' -- cgit v1.2.3 From f89499e255afbe5f8adeae5e71367f3d358af527 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Wed, 15 Feb 2017 18:14:07 -0500 Subject: unique variable name --- quantum/process_keycode/process_unicode_common.c | 36 ++++++++++++------------ quantum/process_keycode/process_unicode_common.h | 2 +- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/quantum/process_keycode/process_unicode_common.c b/quantum/process_keycode/process_unicode_common.c index baeee6d08..d924c364a 100644 --- a/quantum/process_keycode/process_unicode_common.c +++ b/quantum/process_keycode/process_unicode_common.c @@ -12,17 +12,17 @@ uint8_t get_unicode_input_mode(void) { __attribute__((weak)) void unicode_input_start (void) { // save current mods - mods = keyboard_report->mods; + unicode_mods = keyboard_report->mods; // unregister all mods to start from clean state - if (mods & MOD_BIT(KC_LSFT)) unregister_code(KC_LSFT); - if (mods & MOD_BIT(KC_RSFT)) unregister_code(KC_RSFT); - if (mods & MOD_BIT(KC_LCTL)) unregister_code(KC_LCTL); - if (mods & MOD_BIT(KC_RCTL)) unregister_code(KC_RCTL); - if (mods & MOD_BIT(KC_LALT)) unregister_code(KC_LALT); - if (mods & MOD_BIT(KC_RALT)) unregister_code(KC_RALT); - if (mods & MOD_BIT(KC_LGUI)) unregister_code(KC_LGUI); - if (mods & MOD_BIT(KC_RGUI)) unregister_code(KC_RGUI); + if (unicode_mods & MOD_BIT(KC_LSFT)) unregister_code(KC_LSFT); + if (unicode_mods & MOD_BIT(KC_RSFT)) unregister_code(KC_RSFT); + if (unicode_mods & MOD_BIT(KC_LCTL)) unregister_code(KC_LCTL); + if (unicode_mods & MOD_BIT(KC_RCTL)) unregister_code(KC_RCTL); + if (unicode_mods & MOD_BIT(KC_LALT)) unregister_code(KC_LALT); + if (unicode_mods & MOD_BIT(KC_RALT)) unregister_code(KC_RALT); + if (unicode_mods & MOD_BIT(KC_LGUI)) unregister_code(KC_LGUI); + if (unicode_mods & MOD_BIT(KC_RGUI)) unregister_code(KC_RGUI); switch(input_mode) { case UC_OSX: @@ -63,15 +63,15 @@ void unicode_input_finish (void) { break; } - // reregister previously set mods - if (mods & MOD_BIT(KC_LSFT)) register_code(KC_LSFT); - if (mods & MOD_BIT(KC_RSFT)) register_code(KC_RSFT); - if (mods & MOD_BIT(KC_LCTL)) register_code(KC_LCTL); - if (mods & MOD_BIT(KC_RCTL)) register_code(KC_RCTL); - if (mods & MOD_BIT(KC_LALT)) register_code(KC_LALT); - if (mods & MOD_BIT(KC_RALT)) register_code(KC_RALT); - if (mods & MOD_BIT(KC_LGUI)) register_code(KC_LGUI); - if (mods & MOD_BIT(KC_RGUI)) register_code(KC_RGUI); + // reregister previously set unicode_mods + if (unicode_mods & MOD_BIT(KC_LSFT)) register_code(KC_LSFT); + if (unicode_mods & MOD_BIT(KC_RSFT)) register_code(KC_RSFT); + if (unicode_mods & MOD_BIT(KC_LCTL)) register_code(KC_LCTL); + if (unicode_mods & MOD_BIT(KC_RCTL)) register_code(KC_RCTL); + if (unicode_mods & MOD_BIT(KC_LALT)) register_code(KC_LALT); + if (unicode_mods & MOD_BIT(KC_RALT)) register_code(KC_RALT); + if (unicode_mods & MOD_BIT(KC_LGUI)) register_code(KC_LGUI); + if (unicode_mods & MOD_BIT(KC_RGUI)) register_code(KC_RGUI); } void register_hex(uint16_t hex) { diff --git a/quantum/process_keycode/process_unicode_common.h b/quantum/process_keycode/process_unicode_common.h index 9c26cfb07..aa233db22 100644 --- a/quantum/process_keycode/process_unicode_common.h +++ b/quantum/process_keycode/process_unicode_common.h @@ -8,7 +8,7 @@ #endif static uint8_t input_mode; -uint8_t mods; +uint8_t unicode_mods; void set_unicode_input_mode(uint8_t os_target); uint8_t get_unicode_input_mode(void); -- cgit v1.2.3 From 58823b4e0324f5b2861fc5a0f74f6faa3673f5dc Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Wed, 15 Feb 2017 23:20:35 -0500 Subject: fix weirdness with arm and mods --- quantum/process_keycode/process_unicode_common.c | 38 +++++++++++++----------- quantum/process_keycode/process_unicode_common.h | 1 - 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/quantum/process_keycode/process_unicode_common.c b/quantum/process_keycode/process_unicode_common.c index d924c364a..31bc3b7ab 100644 --- a/quantum/process_keycode/process_unicode_common.c +++ b/quantum/process_keycode/process_unicode_common.c @@ -1,5 +1,7 @@ #include "process_unicode_common.h" +uint8_t mods; + void set_unicode_input_mode(uint8_t os_target) { input_mode = os_target; @@ -12,17 +14,17 @@ uint8_t get_unicode_input_mode(void) { __attribute__((weak)) void unicode_input_start (void) { // save current mods - unicode_mods = keyboard_report->mods; + mods = keyboard_report->mods; // unregister all mods to start from clean state - if (unicode_mods & MOD_BIT(KC_LSFT)) unregister_code(KC_LSFT); - if (unicode_mods & MOD_BIT(KC_RSFT)) unregister_code(KC_RSFT); - if (unicode_mods & MOD_BIT(KC_LCTL)) unregister_code(KC_LCTL); - if (unicode_mods & MOD_BIT(KC_RCTL)) unregister_code(KC_RCTL); - if (unicode_mods & MOD_BIT(KC_LALT)) unregister_code(KC_LALT); - if (unicode_mods & MOD_BIT(KC_RALT)) unregister_code(KC_RALT); - if (unicode_mods & MOD_BIT(KC_LGUI)) unregister_code(KC_LGUI); - if (unicode_mods & MOD_BIT(KC_RGUI)) unregister_code(KC_RGUI); + if (mods & MOD_BIT(KC_LSFT)) unregister_code(KC_LSFT); + if (mods & MOD_BIT(KC_RSFT)) unregister_code(KC_RSFT); + if (mods & MOD_BIT(KC_LCTL)) unregister_code(KC_LCTL); + if (mods & MOD_BIT(KC_RCTL)) unregister_code(KC_RCTL); + if (mods & MOD_BIT(KC_LALT)) unregister_code(KC_LALT); + if (mods & MOD_BIT(KC_RALT)) unregister_code(KC_RALT); + if (mods & MOD_BIT(KC_LGUI)) unregister_code(KC_LGUI); + if (mods & MOD_BIT(KC_RGUI)) unregister_code(KC_RGUI); switch(input_mode) { case UC_OSX: @@ -63,15 +65,15 @@ void unicode_input_finish (void) { break; } - // reregister previously set unicode_mods - if (unicode_mods & MOD_BIT(KC_LSFT)) register_code(KC_LSFT); - if (unicode_mods & MOD_BIT(KC_RSFT)) register_code(KC_RSFT); - if (unicode_mods & MOD_BIT(KC_LCTL)) register_code(KC_LCTL); - if (unicode_mods & MOD_BIT(KC_RCTL)) register_code(KC_RCTL); - if (unicode_mods & MOD_BIT(KC_LALT)) register_code(KC_LALT); - if (unicode_mods & MOD_BIT(KC_RALT)) register_code(KC_RALT); - if (unicode_mods & MOD_BIT(KC_LGUI)) register_code(KC_LGUI); - if (unicode_mods & MOD_BIT(KC_RGUI)) register_code(KC_RGUI); + // reregister previously set mods + if (mods & MOD_BIT(KC_LSFT)) register_code(KC_LSFT); + if (mods & MOD_BIT(KC_RSFT)) register_code(KC_RSFT); + if (mods & MOD_BIT(KC_LCTL)) register_code(KC_LCTL); + if (mods & MOD_BIT(KC_RCTL)) register_code(KC_RCTL); + if (mods & MOD_BIT(KC_LALT)) register_code(KC_LALT); + if (mods & MOD_BIT(KC_RALT)) register_code(KC_RALT); + if (mods & MOD_BIT(KC_LGUI)) register_code(KC_LGUI); + if (mods & MOD_BIT(KC_RGUI)) register_code(KC_RGUI); } void register_hex(uint16_t hex) { diff --git a/quantum/process_keycode/process_unicode_common.h b/quantum/process_keycode/process_unicode_common.h index aa233db22..1f25eae7d 100644 --- a/quantum/process_keycode/process_unicode_common.h +++ b/quantum/process_keycode/process_unicode_common.h @@ -8,7 +8,6 @@ #endif static uint8_t input_mode; -uint8_t unicode_mods; void set_unicode_input_mode(uint8_t os_target); uint8_t get_unicode_input_mode(void); -- cgit v1.2.3 From af942f2e57023a469d2f617839b3b7cb7eec798a Mon Sep 17 00:00:00 2001 From: Nicholas Keene Date: Wed, 15 Feb 2017 22:33:04 -0600 Subject: The Ordinary Layout is the best one, the one you are looking for. Really. Check it out. --- keyboards/ergodox/keymaps/ordinary/keymap.c | 46 ++++++++++++++------- .../ergodox/keymaps/ordinary/ordinary-symbol.png | Bin 89582 -> 90642 bytes .../ergodox/keymaps/ordinary/ordinary-symbol.txt | 12 +++--- keyboards/ergodox/keymaps/ordinary/readme.md | 14 +++---- 4 files changed, 43 insertions(+), 29 deletions(-) diff --git a/keyboards/ergodox/keymaps/ordinary/keymap.c b/keyboards/ergodox/keymaps/ordinary/keymap.c index b79f0f064..8f17ee276 100644 --- a/keyboards/ergodox/keymaps/ordinary/keymap.c +++ b/keyboards/ergodox/keymaps/ordinary/keymap.c @@ -19,7 +19,9 @@ #define RSpec 15 // right special-shift key #define NotEq 16 // != macro -#define Point 17 // -> macro +#define GrtEq 17 // >= macro +#define LesEq 18 // <= macro +#define DeRef 19 // -> macro #define MUL 20 // mouse up left #define MUR 21 // mouse up right @@ -71,7 +73,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ,F(LMdia) ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_LBRC ,M(LSymb) ,LT(RBASE, KC_A),KC_S ,KC_D ,LT(RBASE, KC_F) ,KC_G ,KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,LSFT(KC_TAB) -,KC_SCLN ,MEH_T(KC_NO) ,ALL_T(KC_NO),KC_LALT,KC_LGUI +,KC_LCTL ,MEH_T(KC_NO) ,ALL_T(KC_NO),KC_LALT,KC_LGUI ,KC_HOME,KC_END ,KC_PGUP ,KC_BSPC,KC_DEL ,KC_PGDN @@ -100,9 +102,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | ; | & | * | < | > | | 0 | . | = | + | Enter | * `-----------------------------------' `-----------------------------------' * ,-------------. ,-------------. - * ||||||||||||||| ||||||||||||||| + * | |||| | |||| | | |||| | |||| | * ,------|------|------| |------+------+------. - * | Plus | Equal|||||||| |||||||| Under| Dash | + * | Plus | Equal| |||| | | |||| | Under| Dash | * | | |------| |------| Score| | * | + | = | != | | -> | _ | - | * `--------------------' `--------------------' @@ -113,8 +115,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ,KC_TRNS ,KC_EXLM ,KC_AT ,KC_LCBR ,KC_RCBR ,KC_AMPR ,LSFT(KC_COMM) ,KC_TRNS ,KC_HASH ,KC_DLR ,KC_LPRN ,KC_RPRN ,KC_GRV ,KC_TRNS ,KC_PERC ,KC_CIRC ,KC_LBRC ,KC_RBRC ,KC_TILD ,KC_TAB -,KC_LCTL ,KC_AMPR ,KC_ASTR ,LSFT(KC_COMM),LSFT(KC_DOT) - ,KC_NO ,KC_NO +,KC_SCLN ,KC_AMPR ,KC_ASTR ,LSFT(KC_COMM),LSFT(KC_DOT) + ,M(GrtEq),M(LesEq) ,KC_NO ,KC_PLUS ,KC_EQL ,M(NotEq) // right hand @@ -125,21 +127,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ,KC_0 ,KC_DOT ,KC_EQL,KC_PLUS ,KC_ENT ,KC_NO ,KC_NO ,KC_NO - ,M(Point) ,LSFT(KC_MINS),KC_MINS + ,M(DeRef) ,LSFT(KC_MINS),KC_MINS ), /******* Media Layer ******************************************************************************************************* * * ,---------------------------------------------------------------. ,---------------------------------------------------------------. - * | | F11 | F12 | F13 | F14 | F15 | Esc | | | F16 | F17 | F18 | F19 | F20 | | + * | | F11 | F12 | F13 | F14 | F15 | Esc | | |||| | F16 | F17 | F18 | F19 | F20 | | * |------+---------+---------+---------+---------+----------------| |------+---------+---------+---------+---------+---------+------| * | |Shut Down|MouseUpLf|Mouse Up |MouseUpRg|Volume Up|Scroll| |Scroll|PrintScrn| Home | Up | PgUp | Mail | | * |------+---------+---------+---------+---------+---------| Up | | Up |---------+---------+---------+---------+---------+------| * | | Sleep |MouseLeft|MouseDown|MouseRght|Volume Dn|------| |------| Num Lock| Left | Down | Right | MyComp | | * |------+---------+---------+---------+---------+---------|Scroll| |Scroll|---------+---------+---------+---------+---------+------| - * | | |MouseDnLf|MouseDown|MouseDnRg| Mute | Down | | Down | | End | Down | PgDn | | | + * | | |||| |MouseDnLf|MouseDown|MouseDnRg| Mute | Down | | Down | |||| | End | Down | PgDn | |||| | | * `------+---------+---------+---------+---------+----------------' `----------------+---------+---------+---------+---------+------' - * | | | MClick | LClick | R Click| | Insert | Del | | | | + * | ||| | |||| | MClick | LClick | R Click| | Insert | Del | |||| | |||| | ||| | * `---------------------------------------------' `---------------------------------------------' * ,-------------. ,-------------. * | Stop |Refrsh| | Prev | Next | @@ -219,7 +221,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------------+------+------+------+------+-------------| |------+------+------+------+------+------+------------| * | \| | P | O | I | U | Y | ] | | [ | T | R | E | W | Q | Tab | * |------------+------+------+------+------+------| | | |------+------+------+------+------+------------| - * | | ; | L | K | J | H |------| |------| G | F | D | S | A | '" | + * | '" | ; | L | K | J | H |------| |------| G | F | D | S | A | | * |------------+------+------+------+------+------| Tab | |Shift |------+------+------+------+------+------------| * | Capitals | / | . | , | M | N | | | -Tab | B | V | C | X | Z | Capitals | * `------------+------+------+------+------+-------------' `-------------+------+------+------+------+------------' @@ -237,7 +239,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // left hand KC_EQL ,KC_0 ,KC_9 ,KC_8 ,KC_7 ,KC_6 ,KC_MINS ,KC_BSLS ,KC_P ,KC_O ,KC_I ,KC_U ,KC_Y ,KC_RBRC -,KC_NO ,LT(RBASE, KC_SCLN) ,KC_L ,KC_K ,LT(RBASE, KC_J) ,KC_H +,KC_QUOT ,LT(RBASE, KC_SCLN) ,KC_L ,KC_K ,LT(RBASE, KC_J) ,KC_H ,KC_RSFT ,KC_SLSH ,KC_DOT ,KC_COMM,KC_M ,KC_N ,KC_TAB ,KC_RCTL ,MEH_T(KC_NO),ALL_T(KC_NO),KC_RALT,KC_RGUI ,KC_LEFT ,KC_RGHT @@ -246,7 +248,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // right hand ,KC_ESC ,KC_5 ,KC_4 ,KC_3 ,KC_2 ,KC_1 ,KC_GRV ,KC_LBRC ,KC_T ,KC_R ,KC_E ,KC_W ,KC_Q ,KC_TAB - ,KC_G ,LT(RBASE, KC_F),KC_D ,KC_S ,LT(RBASE, KC_A) ,F(LSymb) + ,KC_G ,LT(RBASE, KC_F),KC_D ,KC_S ,LT(RBASE, KC_A) ,KC_NO ,LSFT(KC_TAB),KC_B ,KC_V ,KC_C ,KC_X ,KC_Z ,KC_LSFT ,KC_LGUI,KC_LALT,KC_HYPR ,KC_MEH,KC_LCTL ,KC_HOME ,KC_END @@ -390,13 +392,25 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case NotEq: if (record->event.pressed) { - return MACRO( I(30), T(EXLM), T(EQL), END ); // + return MACRO( I(10), D(LSFT), T(EXLM), U(LSFT), T(EQL), END ); // != } break; - case Point: + case GrtEq: if (record->event.pressed) { - return MACRO( I(30), T(MINS), T(DOT), END ); // + return MACRO( I(10), D(LSFT), T(COMM), U(LSFT), T(EQL), END ); // <= + } + break; + + case LesEq: + if (record->event.pressed) { + return MACRO( I(10), D(LSFT), T(DOT), U(LSFT), T(EQL), END ); // >= + } + break; + + case DeRef: + if (record->event.pressed) { + return MACRO( I(10), T(MINS), D(LSFT), T(DOT), U(LSFT), END ); // -> } break; diff --git a/keyboards/ergodox/keymaps/ordinary/ordinary-symbol.png b/keyboards/ergodox/keymaps/ordinary/ordinary-symbol.png index 8cd92cee1..1277f7483 100644 Binary files a/keyboards/ergodox/keymaps/ordinary/ordinary-symbol.png and b/keyboards/ergodox/keymaps/ordinary/ordinary-symbol.png differ diff --git a/keyboards/ergodox/keymaps/ordinary/ordinary-symbol.txt b/keyboards/ergodox/keymaps/ordinary/ordinary-symbol.txt index f64503ecb..65eca9d6a 100644 --- a/keyboards/ergodox/keymaps/ordinary/ordinary-symbol.txt +++ b/keyboards/ergodox/keymaps/ordinary/ordinary-symbol.txt @@ -16,12 +16,12 @@ [{y:-0.875,x:5.5,c:"#bbddbb"},"~",{x:6.5},"\\"], [{y:-0.875,c:"#c6c600",t:"#9e0000",w:1.5},"Capitals\n\n\n\n\n\nShift",{c:"#bbddbb",t:"#000000"},"%",{x:14.5,c:"#89b087"},"-",{c:"#c6c600",t:"#9e0000",w:1.5},"\n\nCapitals\n\n\n\n\nShift"], [{y:-0.375,x:3.5,c:"#bbddbb",t:"#000000"},"<",{x:10.5,c:"#89b087"},"."], -[{y:-0.875,x:2.5,c:"#bbddbb"},"*",{x:1,a:5},">",{x:8.5,c:"#89b087",a:4},"0",{x:1},"="], +[{y:-0.875,x:2.5,c:"#bbddbb"},"*",{x:1},">",{x:8.5,c:"#89b087"},"0",{x:1},"="], [{y:-0.75,x:0.5,c:"#bbddbb"},";","&",{x:14.5,c:"#89b087"},"+","Enter"], -[{r:30,rx:6.5,ry:4.25,y:-1,x:1,c:"#737373",a:7},"",""], -[{c:"#bbddbb",h:2},"+",{h:2},"=",{c:"#737373"},""], -[{x:2,c:"#bbddbb"},"!="], -[{r:-30,rx:13,y:-1,x:-3,c:"#737373"},"",""], +[{r:30,rx:6.5,ry:4.25,y:-1,x:1,c:"#bbddbb"},"<=",">="], +[{a:7,h:2},"+",{h:2},"=",{c:"#737373"},""], +[{x:2,c:"#bbddbb",a:4},"!="], +[{r:-30,rx:13,y:-1,x:-3,c:"#737373",a:7},"",""], [{x:-3},"",{c:"#bbddbb",h:2},"_",{h:2},"-"], -[{x:-3},"->"] +[{x:-3,a:4},"->"] diff --git a/keyboards/ergodox/keymaps/ordinary/readme.md b/keyboards/ergodox/keymaps/ordinary/readme.md index 313b726ba..927356892 100644 --- a/keyboards/ergodox/keymaps/ordinary/readme.md +++ b/keyboards/ergodox/keymaps/ordinary/readme.md @@ -10,13 +10,13 @@ no rights reserved, use for any purposes, credit me if you are a nice person ## The Base Layout ## -* *White Keys* are all the normal characters and symbols in all the normal locations (except for the brackets). -* *Modifier Keys* are light yellow and in the traditional locationn at the bottom of the keyboard: Control, Option, Command, plus Hyper and Meh. -* *Shift Keys* are dark yellow, found on the outsides of the keyboard. Capitals Shift (traditional shift) is found in the usual place and above that is found Symbol Shift, Media Shift, and Special Shift (Shift Lock). +* *White Keys* are all the normal characters and symbols in all the normal locations (except for the brackets, and who touch-types brackets?). +* *Modifier Keys* are light yellow and in the traditional locationn at the bottom of the keyboard: Control, Option, Command, plus Hyper and Meh. Modifier keys are only found on the base layout. +* *Shift Keys* are dark yellow, found on the outsides of the keyboard. Capitals Shift (traditional Shift) is found in the usual place and above that are Symbol Shift, Media Shift, and Special Shift (Shift Lock). * Several of the shift keys double for entry of characters which would typically be in those locations. * *Thumb Keys* shown in orange are for text navigation and manipulation. * The keys under pinky fingers and index fingers will *reverse* the keyboard layout. -* *Escape* is red and it is always found in that location no matter what. +* *Escape* is red and it is always found in that location (*except* when the layout is reversed). ![Ordinary base layout](ordinary-base.png) @@ -26,18 +26,18 @@ The Forward Tab and Backward Tab keys are in their locations mostly because I en #### Reversing The Base Layout #### -The Ordinary Layout can be used to perform one-handed chorded text input. If you hold down the key under either index finger or either pinky finger (A, F, J and Semicolon), the whole base layout reverses order. Most keys are _mirrored_ but the delete keys are merely *translated* to preserve directionality. Pro-tip: This feature is particularly handly for bringing the Enter key to the left hand when the right hand is using the mouse. +The Ordinary Layout can be used to perform one-handed chorded text input. If you hold down the key under either index finger or either pinky finger (A, F, J and Semicolon), the whole base layout reverses order. Most keys are _mirrored_ but the delete keys, home/end, and left/right arrow keys are merely *translated* to preserve directionality. Pro-tip: This feature is particularly handly for bringing the Enter key to the left hand when the right hand is using the mouse. ## The Symbols Layer ## * *Symbols* shown in light green. All kinds of brackets are available on this layer. Ampersand and Pipe justapose each other. Pipe, slash, and backslash are arranged in a column. * *F-Keys* are bright green and overlay the row of numerals. This layer has F1-F10, higher *F-Keys* are on the Symbols layer. * *Number pad* in dark green under the right hand includes all four arithmetic operations in the same order found on most number pads and features an Enter key. The keycodes emitted here are normal numeric keycodes, not the number-pad specific keycodes emitted by most number pads so that NumLock is not needed. +* The dark gray keys do nothing in case you bump them by accident. ![Ordinary symbol layout](ordinary-symbol.png) The Symbols Layer is based on the Coder Layer from the default Ergodox EZ layout. I slightly rearranged the symbols, added some symbols, expanded the number pad, and straightened out the F-Keys. It's very handy to have the symbols directly underneath the normal typing keys. -* The dark gray keys do nothing in case you bump them by accident. ## The Media Layer ## @@ -85,7 +85,7 @@ The Escape and Backspace special sequences are so useful why not have a few more ## Errata ## -Some of the symbols on the Symbols layer are produced by the keyboard by "capitalizing" another symbol (such as *!* from *1*) so when you type that key you will notice the Capitals Shift red LED turn on. +Some of the symbols on the Symbols layer are produced by the keyboard by "capitalizing" another character (such as *!* from *1*) so when you type that key you will notice the Capitals Shift red LED turn on. **** -- cgit v1.2.3 From 7606f784ddd2f276827ed2131d8d4f12047d7f4f Mon Sep 17 00:00:00 2001 From: Nicholas Keene Date: Wed, 15 Feb 2017 23:02:30 -0600 Subject: This is the best layout, really, come look --- keyboards/ergodox/keymaps/ordinary/keymap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/ergodox/keymaps/ordinary/keymap.c b/keyboards/ergodox/keymaps/ordinary/keymap.c index 8f17ee276..1dfdf7e62 100644 --- a/keyboards/ergodox/keymaps/ordinary/keymap.c +++ b/keyboards/ergodox/keymaps/ordinary/keymap.c @@ -96,8 +96,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | ! | @ | { | } | & | < | | > | | | 7 | 8 | 9 | / | | * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| * | | # | $ | ( | ) | ` |------| |------| / | 4 | 5 | 6 | * | | - * |-----------+------+------+------+------+------| Tab | | Shift|------+------+------+------+------+-----------| - * | | % | ^ | [ | ] | ~ | | | -Tab| \ | 1 | 2 | 3 | - | | + * |-----------+------+------+------+------+------| ' | | " |------+------+------+------+------+-----------| + * | | % | ^ | [ | ] | ~ | | | | \ | 1 | 2 | 3 | - | | * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' * | ; | & | * | < | > | | 0 | . | = | + | Enter | * `-----------------------------------' `-----------------------------------' @@ -114,7 +114,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_ESC ,KC_TRNS ,KC_EXLM ,KC_AT ,KC_LCBR ,KC_RCBR ,KC_AMPR ,LSFT(KC_COMM) ,KC_TRNS ,KC_HASH ,KC_DLR ,KC_LPRN ,KC_RPRN ,KC_GRV -,KC_TRNS ,KC_PERC ,KC_CIRC ,KC_LBRC ,KC_RBRC ,KC_TILD ,KC_TAB +,KC_TRNS ,KC_PERC ,KC_CIRC ,KC_LBRC ,KC_RBRC ,KC_TILD ,KC_QUOT ,KC_SCLN ,KC_AMPR ,KC_ASTR ,LSFT(KC_COMM),LSFT(KC_DOT) ,M(GrtEq),M(LesEq) ,KC_NO @@ -123,7 +123,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ,KC_MINS ,KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_TRNS ,LSFT(KC_DOT),KC_PIPE ,KC_7 ,KC_8 ,KC_9 ,KC_SLSH ,KC_TRNS ,KC_SLSH ,KC_4 ,KC_5 ,KC_6 ,KC_ASTR ,KC_TRNS - ,LSFT(KC_TAB),KC_BSLS ,KC_1 ,KC_2 ,KC_3 ,KC_MINS ,KC_TRNS + ,LSFT(KC_QUOT),KC_BSLS ,KC_1 ,KC_2 ,KC_3 ,KC_MINS ,KC_TRNS ,KC_0 ,KC_DOT ,KC_EQL,KC_PLUS ,KC_ENT ,KC_NO ,KC_NO ,KC_NO -- cgit v1.2.3 From d99f03a1a60877ac18bfcceb3e9aff3796a4464b Mon Sep 17 00:00:00 2001 From: Nicholas Keene Date: Wed, 15 Feb 2017 23:11:04 -0600 Subject: The Ordinary Layout has all the keys in the right places. --- keyboards/ergodox/keymaps/ordinary/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/ergodox/keymaps/ordinary/readme.md b/keyboards/ergodox/keymaps/ordinary/readme.md index 927356892..e13cb7ec8 100644 --- a/keyboards/ergodox/keymaps/ordinary/readme.md +++ b/keyboards/ergodox/keymaps/ordinary/readme.md @@ -30,7 +30,7 @@ The Ordinary Layout can be used to perform one-handed chorded text input. If you ## The Symbols Layer ## -* *Symbols* shown in light green. All kinds of brackets are available on this layer. Ampersand and Pipe justapose each other. Pipe, slash, and backslash are arranged in a column. +* *Symbols* shown in light green. All kinds of brackets are available on this layer. Ampersand and Pipe juxtapose each other. Pipe, slash, and backslash are arranged in a column. * *F-Keys* are bright green and overlay the row of numerals. This layer has F1-F10, higher *F-Keys* are on the Symbols layer. * *Number pad* in dark green under the right hand includes all four arithmetic operations in the same order found on most number pads and features an Enter key. The keycodes emitted here are normal numeric keycodes, not the number-pad specific keycodes emitted by most number pads so that NumLock is not needed. * The dark gray keys do nothing in case you bump them by accident. -- cgit v1.2.3 From 15dc540cac293b6f2e1433b701408c89e72c52ec Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Thu, 16 Feb 2017 10:06:02 -0500 Subject: ignore PRs in versioning --- util/travis_compiled_push.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index de2481ce5..582c45ff7 100644 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -7,7 +7,7 @@ rev=$(git rev-parse --short HEAD) git config --global user.name "Travis CI" git config --global user.email "jack.humb+travis.ci@gmail.com" -if [[ "$TRAVIS_BRANCH" == "master" ]] ; then +if [[ "$TRAVIS_BRANCH" == "master" ]] && [[ "$TRAVIS_PULL_REQUEST" == "false"]] ; then increment_version () { -- cgit v1.2.3 From 1ac5dc9e524444ef98cfab1d9822151a6bfb9621 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Thu, 16 Feb 2017 11:37:46 -0500 Subject: fix travis and reduce warnings --- quantum/audio/voices.c | 1 + quantum/process_keycode/process_unicode_common.h | 1 + util/travis_compiled_push.sh | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/quantum/audio/voices.c b/quantum/audio/voices.c index 8326e91ea..c2edb75f0 100644 --- a/quantum/audio/voices.c +++ b/quantum/audio/voices.c @@ -24,6 +24,7 @@ void voice_deiterate() { float voice_envelope(float frequency) { // envelope_index ranges from 0 to 0xFFFF, which is preserved at 880.0 Hz + __attribute__ ((unused)) uint16_t compensated_index = (uint16_t)((float)envelope_index * (880.0 / frequency)); switch (voice) { diff --git a/quantum/process_keycode/process_unicode_common.h b/quantum/process_keycode/process_unicode_common.h index 1f25eae7d..864693cdd 100644 --- a/quantum/process_keycode/process_unicode_common.h +++ b/quantum/process_keycode/process_unicode_common.h @@ -7,6 +7,7 @@ #define UNICODE_TYPE_DELAY 10 #endif +__attribute__ ((unused)) static uint8_t input_mode; void set_unicode_input_mode(uint8_t os_target); diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index 582c45ff7..58334cb1f 100644 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -7,7 +7,7 @@ rev=$(git rev-parse --short HEAD) git config --global user.name "Travis CI" git config --global user.email "jack.humb+travis.ci@gmail.com" -if [[ "$TRAVIS_BRANCH" == "master" ]] && [[ "$TRAVIS_PULL_REQUEST" == "false"]] ; then +if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]] ; then increment_version () { -- cgit v1.2.3 From 96a8e2d5f52c4f9d4c774f820139be726894e70d Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Thu, 16 Feb 2017 23:53:09 +0700 Subject: reposition ins and del key --- .../handwired/promethium/keymaps/priyadi/README.md | 2 +- .../handwired/promethium/keymaps/priyadi/keymap.c | 28 ++++++++++++---------- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/README.md b/keyboards/handwired/promethium/keymaps/priyadi/README.md index 37c2be6f9..ddeaed939 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/README.md +++ b/keyboards/handwired/promethium/keymaps/priyadi/README.md @@ -13,7 +13,7 @@ Main layer modifications from default Planck layout: * Lower & Raise is now called Num and Fun. * OS & Left keys become another thumb modifier: Empty & Greek (Empty because I used this for another use and my muscle memory is not adapted to it yet) -On Promethium, Trackpoint is enabled on PD2 and PD2. We impersonate a Thinkpad keyboard to be able to use Thinkpad driver on Windows (still needs verification). +On Promethium, Trackpoint is enabled on PD2 and PD3. We impersonate a Thinkpad keyboard to be able to use Thinkpad driver on Windows (still needs verification). AltGr & Compose dual use key. Tap for Compose (mapped to Scroll Lock in hardware) and press for AltGr. diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 2c43f9884..4b9491fae 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -54,6 +54,10 @@ along with this program. If not, see . #undef KC_RALT #define KC_RALT MT(MOD_RALT, KC_SLCK) +// dual use right-shift & del key +#undef KC_RSFT +#define KC_RSFT MT(MOD_RSFT, KC_DEL) + bool capslock = false; #ifdef DOUBLESPACE_LAYER_ENABLE bool lspace_active = false; @@ -664,16 +668,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+-------------+------+------+------+------+------| * | | * | \ | - | = | / | ≠ | ( | ) | < | > | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | & | ^ | | | _ | + | ? | ± | [ | ] | { | } | : | + * | & | ^ | | | _ | + | ? | ± | [ | ] | { | } | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | + * | | | | | | | | | | : | | * `-----------------------------------------------------------------------------------' */ [_PUNC] = KEYMAP( 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, KC_COLN, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, X(PLMIN),KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_COLN, _______ ), /* Num @@ -682,23 +686,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+-------------+------+------+------+------+------| * | ` | * | \ | - | = | / | B | 4 | 5 | 6 | E | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | & | ^ | | | _ | + | ? | C | 1 | 2 | 3 | F | : | + * | & | ^ | | | _ | + | ? | C | 1 | 2 | 3 | F | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | 0 | , | . | x | | + * | | | x | | | | | 0 | , | . | : | | * `-----------------------------------------------------------------------------------' */ [_NUM] = KEYMAP( KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, S(KC_A), KC_7, KC_8, KC_9, 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_1, KC_2, KC_3, S(KC_F), KC_COLN, - _______, _______, _______, _______, _______, _______, _______, FUN0 , KC_COMM, KC_DOT, KC_X, _______ + KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, S(KC_C), KC_1, KC_2, KC_3, S(KC_F), _______, + _______, _______, KC_X, _______, _______, _______, _______, FUN0 , KC_COMM, KC_DOT, KC_COLN, _______ ), /* Func * ,-----------------------------------------------------------------------------------. - * | | F1 | F2 | F3 | F4 | | | PgUp | Up | PgDn | PgUp | Del | + * | | F1 | F2 | F3 | F4 | Ins | | PgUp | Up | PgDn | PgUp | | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | F5 | F6 | F7 | F8 |PrtSc | | Left | Down | Right| PgDn | Ins | + * | | F5 | F6 | F7 | F8 |PrtSc | | Left | Down | Right| PgDn | | * |------+------+------+------+------+------|------+------+------+------+------+------| * | | F9 | F10 | F11 | F12 | | | | Home | End | | | * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -706,8 +710,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_FUN] = KEYMAP( - XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, KC_DEL, - XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, KC_PSCR, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_INS, + XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_INS, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, _______, + XXXXXXX, 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, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_END, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), -- cgit v1.2.3 From e5bd81f0a68948a87ad5279bc2c41a4876466023 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Thu, 16 Feb 2017 23:56:47 +0700 Subject: Fix integer overflow --- keyboards/handwired/promethium/keymaps/priyadi/keymap.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 4b9491fae..8f712ccfe 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -51,12 +51,10 @@ along with this program. If not, see . #define KC_WWWF KC_WWW_FORWARD // hybrid right-alt & scroll lock (mapped to Compose in OS) -#undef KC_RALT -#define KC_RALT MT(MOD_RALT, KC_SLCK) +#define C_RALT MT(MOD_RALT, KC_SLCK) // dual use right-shift & del key -#undef KC_RSFT -#define KC_RSFT MT(MOD_RSFT, KC_DEL) +#define C_RSFT MT(MOD_RSFT, KC_DEL) bool capslock = false; #ifdef DOUBLESPACE_LAYER_ENABLE @@ -575,8 +573,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = KEYMAP( 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, - KC_LCTL, KC_LALT, KC_LGUI, EMPTY, NUM, LSPACE, RSPACE, FUN, GREEK, KC_RGUI, KC_RALT, KC_RCTL + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, C_RSFT, + KC_LCTL, KC_LALT, KC_LGUI, EMPTY, NUM, LSPACE, RSPACE, FUN, GREEK, KC_RGUI, C_RALT, KC_RCTL ), /* Dvorak -- cgit v1.2.3 From 49e72632d2200fc3bf71d5ced2aa43058da3b2e0 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Thu, 16 Feb 2017 13:13:38 -0500 Subject: remove more warnings --- keyboards/ergodox/keymaps/coderkun_neo2/keymap.c | 2 ++ keyboards/ergodox/keymaps/twey/keymap.c | 1 + keyboards/planck/keymaps/cbbrowne/config.h | 4 +++ keyboards/planck/keymaps/unicode/keymap.c | 45 +++++++++++++++--------- quantum/keymap_extras/keymap_french.h | 4 ++- 5 files changed, 39 insertions(+), 17 deletions(-) diff --git a/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c b/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c index b62b14449..aaf75d58f 100644 --- a/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c +++ b/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c @@ -312,6 +312,8 @@ uint16_t hex_to_keycode(uint8_t hex) return NEO_E; case 0xF: return NEO_F; + default: + return KC_NO; } } } diff --git a/keyboards/ergodox/keymaps/twey/keymap.c b/keyboards/ergodox/keymaps/twey/keymap.c index 5deacd63f..1ecbce466 100644 --- a/keyboards/ergodox/keymaps/twey/keymap.c +++ b/keyboards/ergodox/keymaps/twey/keymap.c @@ -205,6 +205,7 @@ void matrix_init_user(void) { // Runs constantly in the background, in a loop. void matrix_scan_user(void) { + __attribute__ ((unused)) uint32_t layer0 = layer_state & (1UL << 0), layer1 = layer_state & (1UL << 1), layer2 = layer_state & (1UL << 2), diff --git a/keyboards/planck/keymaps/cbbrowne/config.h b/keyboards/planck/keymaps/cbbrowne/config.h index bd15fd5a2..3a4ee907f 100644 --- a/keyboards/planck/keymaps/cbbrowne/config.h +++ b/keyboards/planck/keymaps/cbbrowne/config.h @@ -1,8 +1,12 @@ #ifndef CONFIG_USER_H #define CONFIG_USER_H +#ifndef NO_DEBUG #define NO_DEBUG +#endif +#ifndef NO_PRINT #define NO_PRINT +#endif #include "../../config.h" diff --git a/keyboards/planck/keymaps/unicode/keymap.c b/keyboards/planck/keymaps/unicode/keymap.c index d73e7e09d..1b4ca8ed7 100644 --- a/keyboards/planck/keymaps/unicode/keymap.c +++ b/keyboards/planck/keymaps/unicode/keymap.c @@ -195,24 +195,20 @@ const uint16_t PROGMEM fn_actions[] = { }; #ifdef AUDIO_ENABLE -float tone_startup[][2] = { - {440.0*pow(2.0,(31)/12.0), 12}, - {440.0*pow(2.0,(28)/12.0), 8}, - {440.0*pow(2.0,(19)/12.0), 8}, - {440.0*pow(2.0,(24)/12.0), 8}, - {440.0*pow(2.0,(28)/12.0), 20} -}; +float tone_startup[][2] = SONG(STARTUP_SOUND); float tone_qwerty[][2] = SONG(QWERTY_SOUND); float tone_dvorak[][2] = SONG(DVORAK_SOUND); float tone_colemak[][2] = SONG(COLEMAK_SOUND); float tone_plover[][2] = SONG(PLOVER_SOUND); float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND); +float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); -float goodbye[][2] = SONG(GOODBYE_SOUND); +float tone_goodbye[][2] = SONG(GOODBYE_SOUND); #endif + void persistant_default_layer_set(uint16_t default_layer) { eeconfig_update_default_layer(default_layer); default_layer_set(default_layer); @@ -309,18 +305,35 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) }; void matrix_init_user(void) { - #ifdef AUDIO_ENABLE - _delay_ms(20); // stops the tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); - #endif + #ifdef AUDIO_ENABLE + startup_user(); + #endif } #ifdef AUDIO_ENABLE -void play_goodbye_tone() + +void startup_user() { - PLAY_NOTE_ARRAY(goodbye, false, 0); - _delay_ms(150); + _delay_ms(20); // gets rid of tick + PLAY_NOTE_ARRAY(tone_startup, false, 0); +} + +void shutdown_user() +{ + PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + _delay_ms(150); + stop_all_notes(); +} + +void music_on_user(void) +{ + music_scale_user(); } -#endif +void music_scale_user(void) +{ + PLAY_NOTE_ARRAY(music_scale, false, 0); +} + +#endif diff --git a/quantum/keymap_extras/keymap_french.h b/quantum/keymap_extras/keymap_french.h index 834c69650..401bbdf64 100644 --- a/quantum/keymap_extras/keymap_french.h +++ b/quantum/keymap_extras/keymap_french.h @@ -4,7 +4,9 @@ #include "keymap.h" // Alt gr +#ifndef ALGR #define ALGR(kc) RALT(kc) +#endif #define NO_ALGR KC_RALT // Normal characters @@ -72,7 +74,7 @@ #define FR_PIPE ALGR(KC_6) #define FR_GRV ALGR(KC_7) #define FR_BSLS ALGR(KC_8) -#define FR_CIRC ALGR(KC_9) +#define FR_CCIRC ALGR(KC_9) #define FR_AT ALGR(KC_0) #define FR_RBRC ALGR(FR_RPRN) #define FR_RCBR ALGR(FR_EQL) -- cgit v1.2.3 From 334edc3c7d594674a44bc66e70fb08e45b27e644 Mon Sep 17 00:00:00 2001 From: Stephen Tudor Date: Thu, 16 Feb 2017 14:32:24 -0500 Subject: Add smt keymap for Let's Split (based on serial) --- keyboards/lets_split/keymaps/smt/config.h | 34 +++++ keyboards/lets_split/keymaps/smt/keymap.c | 213 ++++++++++++++++++++++++++++++ 2 files changed, 247 insertions(+) create mode 100644 keyboards/lets_split/keymaps/smt/config.h create mode 100644 keyboards/lets_split/keymaps/smt/keymap.c diff --git a/keyboards/lets_split/keymaps/smt/config.h b/keyboards/lets_split/keymaps/smt/config.h new file mode 100644 index 000000000..ba271d1ac --- /dev/null +++ b/keyboards/lets_split/keymaps/smt/config.h @@ -0,0 +1,34 @@ +/* +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 . +*/ + + +#define USE_SERIAL + +#define MASTER_LEFT +// #define _MASTER_RIGHT +// #define EE_HANDS + + +#ifdef SUBPROJECT_rev1 + #include "../../rev1/config.h" +#endif +#ifdef SUBPROJECT_rev2 + #include "../../rev2/config.h" +#endif +#ifdef SUBPROJECT_rev2fliphalf + #include "../../rev2fliphalf/config.h" +#endif diff --git a/keyboards/lets_split/keymaps/smt/keymap.c b/keyboards/lets_split/keymaps/smt/keymap.c new file mode 100644 index 000000000..5ba5417a9 --- /dev/null +++ b/keyboards/lets_split/keymaps/smt/keymap.c @@ -0,0 +1,213 @@ +#include "lets_split.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 _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + ADJUST, +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = KEYMAP( \ + ALL_T(KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + SFT_T(KC_ESC), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT), \ + MEH_T(KC_GRV), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = KEYMAP( \ + ALL_T(KC_TAB), KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ + CTL_T(KC_ESC), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + SFT_T(KC_ESC), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT), \ + MEH_T(KC_GRV), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | - | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = KEYMAP( \ + ALL_T(KC_TAB), KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ + CTL_T(KC_ESC), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \ + SFT_T(KC_ESC), KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_T(KC_ENT), \ + MEH_T(KC_GRV), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | $ | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | Home |PageUp| + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | End |PageDn| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = KEYMAP( \ + KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ + KC_DLR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_4, KC_5, KC_6, KC_HOME, KC_PGUP, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, KC_END, KC_PGDN, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | _ | ? | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | - | / | = | [ | ] | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = KEYMAP( \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ + _______, _______, _______, _______, _______, _______, KC_UNDS, KC_QUES, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ + _______, _______, _______, _______, _______, _______, KC_MINS, KC_SLSH, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Reset| + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = KEYMAP( \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +#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 persistant_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 + persistant_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_colemak, false, 0); + #endif + persistant_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + #endif + persistant_default_layer_set(1UL<<_DVORAK); + } + 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; +} -- cgit v1.2.3 From 33bc4c070c2d592ba706ba89ff6786699bc9133f Mon Sep 17 00:00:00 2001 From: Stephen Tudor Date: Thu, 16 Feb 2017 14:32:46 -0500 Subject: Update smt Planck keymap --- keyboards/planck/keymaps/smt/keymap.c | 98 +++++++++++++++++++++++------------ 1 file changed, 64 insertions(+), 34 deletions(-) diff --git a/keyboards/planck/keymaps/smt/keymap.c b/keyboards/planck/keymaps/smt/keymap.c index 51e5a40bf..afc82b49f 100644 --- a/keyboards/planck/keymaps/smt/keymap.c +++ b/keyboards/planck/keymaps/smt/keymap.c @@ -11,15 +11,17 @@ extern keymap_config_t keymap_config; // 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 _DVORAK 0 -#define _QWERTY 1 -#define _LOWER 2 -#define _RAISE 3 +#define _QWERTY 0 +#define _COLEMAK 1 +#define _DVORAK 2 +#define _LOWER 3 +#define _RAISE 4 #define _ADJUST 16 enum planck_keycodes { - DVORAK = SAFE_RANGE, - QWERTY, + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, LOWER, RAISE, BACKLIT @@ -31,40 +33,58 @@ enum planck_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Dvorak +/* Qwerty * ,-----------------------------------------------------------------------------------. - * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | O | E | U | I | D | H | T | N | S | - | + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * | ` | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_DVORAK] = { - {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC}, - {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS}, - {SFT_T(KC_ESC), KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_T(KC_ENT)}, - {ALL_T(KC_GRV), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +[_QWERTY] = { + {ALL_T(KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, + {CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {SFT_T(KC_ESC), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT)}, + {MEH_T(KC_GRV), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} }, -/* Qwerty +/* Colemak * ,-----------------------------------------------------------------------------------. - * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * | Esc | A | R | S | T | D | H | N | E | I | O | " | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * | ` | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = { - {_______, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, - {_______, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {_______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +[_COLEMAK] = { + {ALL_T(KC_TAB), KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, + {CTL_T(KC_ESC), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, + {SFT_T(KC_ESC), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT)}, + {MEH_T(KC_GRV), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | - | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = { + {ALL_T(KC_TAB), KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC}, + {CTL_T(KC_ESC), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS}, + {SFT_T(KC_ESC), KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_T(KC_ENT)}, + {MEH_T(KC_GRV), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} }, /* Lower @@ -107,7 +127,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | | Reset| | | | | | | | | | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | |Aud on|Audoff|AGnorm|AGswap|Dvorak|Qwerty| | | | + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | * |------+------+------+------+------+------|------+------+------+------+------+------| * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -116,7 +136,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_ADJUST] = { {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, - {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, DVORAK, QWERTY, _______, _______, _______}, + {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______}, {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} } @@ -128,6 +148,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { float tone_startup[][2] = SONG(STARTUP_SOUND); float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); float tone_dvorak[][2] = SONG(DVORAK_SOUND); float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); @@ -142,21 +163,30 @@ void persistant_default_layer_set(uint16_t default_layer) { bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case DVORAK: + case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + PLAY_NOTE_ARRAY(tone_qwerty, false, 0); #endif - persistant_default_layer_set(1UL<<_DVORAK); + persistant_default_layer_set(1UL<<_QWERTY); } return false; break; - case QWERTY: + case COLEMAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_NOTE_ARRAY(tone_colemak, false, 0); #endif - persistant_default_layer_set(1UL<<_QWERTY); + persistant_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + #endif + persistant_default_layer_set(1UL<<_DVORAK); } return false; break; -- cgit v1.2.3 From cbef63d8fa5b7a55de24b7fd6cb147bbecfee160 Mon Sep 17 00:00:00 2001 From: skullY Date: Thu, 16 Feb 2017 13:27:32 -0800 Subject: Rework the clueboard keymaps a bit. --- keyboards/clueboard/keymaps/caps_fn/keymap.c | 83 ++++++++++++++++++ keyboards/clueboard/keymaps/caps_fn/layout.png | Bin 0 -> 112289 bytes keyboards/clueboard/keymaps/caps_fn/readme.md | 15 ++++ keyboards/clueboard/keymaps/default/keymap.c | 93 ++++++++------------- keyboards/clueboard/keymaps/default/layout.png | Bin 0 -> 112442 bytes keyboards/clueboard/keymaps/default/readme.md | 17 ++++ keyboards/clueboard/keymaps/mac_optimized/keymap.c | 83 ++++++++++++++++++ .../clueboard/keymaps/mac_optimized/layout.png | Bin 0 -> 107368 bytes .../clueboard/keymaps/mac_optimized/readme.md | 15 ++++ keyboards/clueboard/keymaps/max/Makefile | 49 ----------- keyboards/clueboard/keymaps/max/keymap.c | 85 ------------------- keyboards/clueboard/keymaps/maximised/keymap.c | 47 +++++++++++ keyboards/clueboard/keymaps/maximised/layout.png | Bin 0 -> 111157 bytes keyboards/clueboard/keymaps/maximised/readme.md | 14 ++++ keyboards/clueboard/keymaps/mouse_keys/keymap.c | 83 ++++++++++++++++++ keyboards/clueboard/keymaps/mouse_keys/layout.png | Bin 0 -> 143816 bytes keyboards/clueboard/keymaps/mouse_keys/readme.md | 16 ++++ keyboards/clueboard/keymaps/shift_fn/keymap.c | 83 ++++++++++++++++++ keyboards/clueboard/keymaps/shift_fn/layout.png | Bin 0 -> 107234 bytes keyboards/clueboard/keymaps/shift_fn/readme.md | 17 ++++ keyboards/clueboard/keymaps/skully/keymap.c | 90 +++++++------------- keyboards/clueboard/keymaps/skully/layout.png | Bin 0 -> 111676 bytes keyboards/clueboard/keymaps/skully/readme.md | 11 +++ .../clueboard/keymaps/unix_optimized/keymap.c | 83 ++++++++++++++++++ .../clueboard/keymaps/unix_optimized/layout.png | Bin 0 -> 111171 bytes .../clueboard/keymaps/unix_optimized/readme.md | 15 ++++ keyboards/clueboard/keymaps/win_optimized/keymap.c | 83 ++++++++++++++++++ .../clueboard/keymaps/win_optimized/layout.png | Bin 0 -> 110405 bytes .../clueboard/keymaps/win_optimized/readme.md | 17 ++++ keyboards/clueboard/rules.mk | 10 +-- 30 files changed, 752 insertions(+), 257 deletions(-) create mode 100644 keyboards/clueboard/keymaps/caps_fn/keymap.c create mode 100644 keyboards/clueboard/keymaps/caps_fn/layout.png create mode 100644 keyboards/clueboard/keymaps/caps_fn/readme.md create mode 100644 keyboards/clueboard/keymaps/default/layout.png create mode 100644 keyboards/clueboard/keymaps/default/readme.md create mode 100644 keyboards/clueboard/keymaps/mac_optimized/keymap.c create mode 100644 keyboards/clueboard/keymaps/mac_optimized/layout.png create mode 100644 keyboards/clueboard/keymaps/mac_optimized/readme.md delete mode 100644 keyboards/clueboard/keymaps/max/Makefile delete mode 100644 keyboards/clueboard/keymaps/max/keymap.c create mode 100644 keyboards/clueboard/keymaps/maximised/keymap.c create mode 100644 keyboards/clueboard/keymaps/maximised/layout.png create mode 100644 keyboards/clueboard/keymaps/maximised/readme.md create mode 100644 keyboards/clueboard/keymaps/mouse_keys/keymap.c create mode 100644 keyboards/clueboard/keymaps/mouse_keys/layout.png create mode 100644 keyboards/clueboard/keymaps/mouse_keys/readme.md create mode 100644 keyboards/clueboard/keymaps/shift_fn/keymap.c create mode 100644 keyboards/clueboard/keymaps/shift_fn/layout.png create mode 100644 keyboards/clueboard/keymaps/shift_fn/readme.md create mode 100644 keyboards/clueboard/keymaps/skully/layout.png create mode 100644 keyboards/clueboard/keymaps/unix_optimized/keymap.c create mode 100644 keyboards/clueboard/keymaps/unix_optimized/layout.png create mode 100644 keyboards/clueboard/keymaps/unix_optimized/readme.md create mode 100644 keyboards/clueboard/keymaps/win_optimized/keymap.c create mode 100644 keyboards/clueboard/keymaps/win_optimized/layout.png create mode 100644 keyboards/clueboard/keymaps/win_optimized/readme.md diff --git a/keyboards/clueboard/keymaps/caps_fn/keymap.c b/keyboards/clueboard/keymaps/caps_fn/keymap.c new file mode 100644 index 000000000..37f00e8d8 --- /dev/null +++ b/keyboards/clueboard/keymaps/caps_fn/keymap.c @@ -0,0 +1,83 @@ +#include "clueboard.h" + +// Helpful defines +#define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) +#define _______ KC_TRNS + +// 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 _BL 0 +#define _FL 1 +#define _CL 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: Base Layer (Default Layer) + */ +[_BL] = KEYMAP( + F(0), 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_GRV, KC_BSPC, 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_PGDN, \ + 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_NUHS, KC_ENT, \ + 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_RO, KC_RSFT, KC_UP, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _FL: Function Layer + */ +[_FL] = 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_DEL, BL_STEP, \ + _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ + _______, _______, _______, _______, _______,_______, _______, _______, _______, MO(_FL), KC_HOME, KC_PGDN, KC_END), + + /* Keymap _CL: Control layer + */ +[_CL] = KEYMAP( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ + _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), +}; + +/* This is a list of user defined functions. F(N) corresponds to item N + of this list. + */ +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_FUNCTION(0), // Calls action_function() +}; + +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { + static uint8_t mods_pressed; + + switch (id) { + case 0: + /* Handle the combined Grave/Esc key + */ + mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed + + if (record->event.pressed) { + /* The key is being pressed. + */ + if (mods_pressed) { + add_key(KC_GRV); + send_keyboard_report(); + } else { + add_key(KC_ESC); + send_keyboard_report(); + } + } else { + /* The key is being released. + */ + if (mods_pressed) { + del_key(KC_GRV); + send_keyboard_report(); + } else { + del_key(KC_ESC); + send_keyboard_report(); + } + } + break; + } +} diff --git a/keyboards/clueboard/keymaps/caps_fn/layout.png b/keyboards/clueboard/keymaps/caps_fn/layout.png new file mode 100644 index 000000000..a5bd57adb Binary files /dev/null and b/keyboards/clueboard/keymaps/caps_fn/layout.png differ diff --git a/keyboards/clueboard/keymaps/caps_fn/readme.md b/keyboards/clueboard/keymaps/caps_fn/readme.md new file mode 100644 index 000000000..74ad01fca --- /dev/null +++ b/keyboards/clueboard/keymaps/caps_fn/readme.md @@ -0,0 +1,15 @@ +``` + ___ _____ _ _ _ __ __ _ __ +|__ \ / ____| | | | | | / / / /(_) / / + ||) | | | | |_ _ ___| |__ ___ __ _ _ __ __| | / /_ / /_ / / + |/ / | | | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / / + |_| | |____| | |_| | __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _ + (_) \_____|_|\__,_|\___|_.__/ \___/ \__,_|_| \__,_| \___/ \___/_/ (_) +``` + +![Clueboard Layout Image](layout.png) + +# Caps Fn Layout + +This is the default layout except that Caps Lock acts like Caps Lock when +tapped but Fn when held. diff --git a/keyboards/clueboard/keymaps/default/keymap.c b/keyboards/clueboard/keymaps/default/keymap.c index 01f158bf0..37f00e8d8 100644 --- a/keyboards/clueboard/keymaps/default/keymap.c +++ b/keyboards/clueboard/keymaps/default/keymap.c @@ -1,7 +1,8 @@ #include "clueboard.h" -// Used for SHIFT_ESC -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) +// Helpful defines +#define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) +#define _______ KC_TRNS // 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. @@ -9,21 +10,10 @@ // entirely and just use numbers. #define _BL 0 #define _FL 1 -#define _RS 2 +#define _CL 2 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Keymap _BL: (Base Layer) Default Layer - * ,--------------------------------------------------------------------------. ,----. - * |Esc~| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| BS| |PGUP| - * |--------------------------------------------------------------------------| |----| - * | Tab| Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |PGDN| - * |--------------------------------------------------------------------------| `----' - * |Capslck| A| S| D| F| G| H| J| K| L| ;| '| # | Ent| - * |-----------------------------------------------------------------------------. - * |Shift| BS| Z| X| C| V| B| N| M| ,| .| /| BS|Shift| UP| - * |------------------------------------------------------------------------|----|----. - * | Ctrl| Gui| Alt| MHen| Space| Space| Hen| Alt| Ctrl| _FL|LEFT|DOWN|RGHT| - * `----------------------------------------------------------------------------------' + /* Keymap _BL: Base Layer (Default Layer) */ [_BL] = KEYMAP( F(0), 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_GRV, KC_BSPC, KC_PGUP, \ @@ -33,61 +23,44 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), /* Keymap _FL: Function Layer - * ,--------------------------------------------------------------------------. ,----. - * | `| F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12| | Del| |BLIN| - * |--------------------------------------------------------------------------| |----| - * | | | | | | | | |PScr|SLck|Paus| | | | |BLDE| - * |--------------------------------------------------------------------------| `----' - * | | | _RS| | | | | | | | | | | | - * |-----------------------------------------------------------------------------. - * | | | | | | | | | | | | | | |PGUP| - * |------------------------------------------------------------------------|----|----. - * | | | | | | | | | | _FL|HOME|PGDN| END| - * `----------------------------------------------------------------------------------' */ [_FL] = 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_DEL, BL_STEP, \ - KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PSCR,KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, MO(_RS),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,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_FL), KC_HOME, KC_PGDN, KC_END), + 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_DEL, BL_STEP, \ + _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ + _______, _______, _______, _______, _______,_______, _______, _______, _______, MO(_FL), KC_HOME, KC_PGDN, KC_END), - /* Keymap _RS: Reset layer - * ,--------------------------------------------------------------------------. ,----. - * | | | | | | | | | | | | | | | | | | - * |--------------------------------------------------------------------------| |----| - * | | | | |RESET| | | | | | | | | | | | - * |--------------------------------------------------------------------------| `----' - * | | | _RS| | | | | | | | | | | | - * |-----------------------------------------------------------------------------. - * | | | | | | | | | | | | | | | | - * |------------------------------------------------------------------------|----|----. - * | | | | | | | | | | _FL| | | | - * `----------------------------------------------------------------------------------' + /* Keymap _CL: Control layer */ -[_RS] = 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, RGB_TOG, RGB_VAI, \ - KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAD, \ - KC_TRNS, KC_TRNS, MO(_RS),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - MO(_FL), 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(_FL), RGB_SAI, \ - KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, RGB_MOD, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUD, RGB_SAD, RGB_HUI), -}; - -enum function_id { - SHIFT_ESC, +[_CL] = KEYMAP( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ + _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), }; +/* This is a list of user defined functions. F(N) corresponds to item N + of this list. + */ const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), + [0] = ACTION_FUNCTION(0), // Calls action_function() }; void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; + static uint8_t mods_pressed; + switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; + case 0: + /* Handle the combined Grave/Esc key + */ + mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed + if (record->event.pressed) { - if (shift_esc_shift_mask) { + /* The key is being pressed. + */ + if (mods_pressed) { add_key(KC_GRV); send_keyboard_report(); } else { @@ -95,7 +68,9 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } else { - if (shift_esc_shift_mask) { + /* The key is being released. + */ + if (mods_pressed) { del_key(KC_GRV); send_keyboard_report(); } else { diff --git a/keyboards/clueboard/keymaps/default/layout.png b/keyboards/clueboard/keymaps/default/layout.png new file mode 100644 index 000000000..cd318163e Binary files /dev/null and b/keyboards/clueboard/keymaps/default/layout.png differ diff --git a/keyboards/clueboard/keymaps/default/readme.md b/keyboards/clueboard/keymaps/default/readme.md new file mode 100644 index 000000000..cede17ee1 --- /dev/null +++ b/keyboards/clueboard/keymaps/default/readme.md @@ -0,0 +1,17 @@ +``` + ___ _____ _ _ _ __ __ _ __ +|__ \ / ____| | | | | | / / / /(_) / / + ||) | | | | |_ _ ___| |__ ___ __ _ _ __ __| | / /_ / /_ / / + |/ / | | | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / / + |_| | |____| | |_| | __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _ + (_) \_____|_|\__,_|\___|_.__/ \___/ \__,_|_| \__,_| \___/ \___/_/ (_) +``` + +![Clueboard Layout Image](layout.png) + +# Default Clueboard Layout + +This is the default layout that comes flashed on every Clueboard. For the most +part it's a straightforward and easy to follow layout. The only unusual key is +the key in the upper left, which sends Escape normally, but Grave when any of +the Ctrl, Alt, or GUI modifiers are held down. diff --git a/keyboards/clueboard/keymaps/mac_optimized/keymap.c b/keyboards/clueboard/keymaps/mac_optimized/keymap.c new file mode 100644 index 000000000..59f7ff243 --- /dev/null +++ b/keyboards/clueboard/keymaps/mac_optimized/keymap.c @@ -0,0 +1,83 @@ +#include "clueboard.h" + +// Helpful defines +#define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) +#define _______ KC_TRNS + +// 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 _BL 0 +#define _FL 1 +#define _CL 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: Base Layer (Default Layer) + */ +[_BL] = KEYMAP( + F(0), 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_GRV, KC_BSPC, 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_PGDN, \ + 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_NUHS, KC_ENT, \ + 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_RO, KC_RSFT, KC_UP, \ + KC_LCTL, KC_LALT, KC_LGUI,KC_MHEN, KC_SPC, KC_SPC, KC_HENK, KC_RGUI, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _FL: Function Layer + */ +[_FL] = 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_DEL, BL_STEP, \ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, _______, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ + _______, _______, _______, _______, _______,_______, _______, _______, _______, MO(_FL), KC_HOME, KC_PGDN, KC_END), + + /* Keymap _CL: Control layer + */ +[_CL] = KEYMAP( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ + _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), +}; + +/* This is a list of user defined functions. F(N) corresponds to item N + of this list. + */ +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_FUNCTION(0), // Calls action_function() +}; + +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { + static uint8_t mods_pressed; + + switch (id) { + case 0: + /* Handle the combined Grave/Esc key + */ + mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed + + if (record->event.pressed) { + /* The key is being pressed. + */ + if (mods_pressed) { + add_key(KC_GRV); + send_keyboard_report(); + } else { + add_key(KC_ESC); + send_keyboard_report(); + } + } else { + /* The key is being released. + */ + if (mods_pressed) { + del_key(KC_GRV); + send_keyboard_report(); + } else { + del_key(KC_ESC); + send_keyboard_report(); + } + } + break; + } +} diff --git a/keyboards/clueboard/keymaps/mac_optimized/layout.png b/keyboards/clueboard/keymaps/mac_optimized/layout.png new file mode 100644 index 000000000..e84ba54ea Binary files /dev/null and b/keyboards/clueboard/keymaps/mac_optimized/layout.png differ diff --git a/keyboards/clueboard/keymaps/mac_optimized/readme.md b/keyboards/clueboard/keymaps/mac_optimized/readme.md new file mode 100644 index 000000000..940e09125 --- /dev/null +++ b/keyboards/clueboard/keymaps/mac_optimized/readme.md @@ -0,0 +1,15 @@ +``` + ___ _____ _ _ _ __ __ _ __ +|__ \ / ____| | | | | | / / / /(_) / / + ||) | | | | |_ _ ___| |__ ___ __ _ _ __ __| | / /_ / /_ / / + |/ / | | | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / / + |_| | |____| | |_| | __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _ + (_) \_____|_|\__,_|\___|_.__/ \___/ \__,_|_| \__,_| \___/ \___/_/ (_) +``` + +![Clueboard Layout Image](layout.png) + +# Default Clueboard Layout for Mac + +This is the default Clueboard layout with Alt and GUI switched to match Mac +conventions. diff --git a/keyboards/clueboard/keymaps/max/Makefile b/keyboards/clueboard/keymaps/max/Makefile deleted file mode 100644 index 950dadf84..000000000 --- a/keyboards/clueboard/keymaps/max/Makefile +++ /dev/null @@ -1,49 +0,0 @@ -#---------------------------------------------------------------------------- -# On command line: -# -# make all = Make software. -# -# make clean = Clean out built project files. -# -# make coff = Convert ELF to AVR COFF. -# -# make extcoff = Convert ELF to AVR Extended COFF. -# -# make program = Download the hex file to the device. -# Please customize your programmer settings(PROGRAM_CMD) -# -# make teensy = Download the hex file to the device, using teensy_loader_cli. -# (must have teensy_loader_cli installed). -# -# make dfu = Download the hex file to the device, using dfu-programmer (must -# have dfu-programmer installed). -# -# make flip = Download the hex file to the device, using Atmel FLIP (must -# have Atmel FLIP installed). -# -# make dfu-ee = Download the eeprom file to the device, using dfu-programmer -# (must have dfu-programmer installed). -# -# make flip-ee = Download the eeprom file to the device, using Atmel FLIP -# (must have Atmel FLIP installed). -# -# make debug = Start either simulavr or avarice as specified for debugging, -# with avr-gdb or avr-insight as the front end for debugging. -# -# make filename.s = Just compile filename.c into the assembler code only. -# -# make filename.i = Create a preprocessed source file for use in submitting -# bug reports to the GCC project. -# -# To rebuild project do "make clean" then "make all". -#---------------------------------------------------------------------------- - -# Build Options -# change to "no" to disable the options, or define them in the makefile.mk in -# the appropriate keymap folder that will get included automatically -# -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. - -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/clueboard/keymaps/max/keymap.c b/keyboards/clueboard/keymaps/max/keymap.c deleted file mode 100644 index 193809840..000000000 --- a/keyboards/clueboard/keymaps/max/keymap.c +++ /dev/null @@ -1,85 +0,0 @@ -#include "clueboard.h" - -// Used for SHIFT_ESC -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) - -// 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 _BL 0 -#define _FL 1 -#define _RS 2 - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Keymap _BL: (Base Layer) Default Layer - * ,--------------------------------------------------------------------------. ,----. - * | Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| ~| BS| |PgUp| - * |--------------------------------------------------------------------------| |----| - * | Tab| Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |PgDn| - * |--------------------------------------------------------------------------| `----' - * |Capslck| A| S| D| F| G| H| J| K| L| ;| '| # | Ent| - * |-----------------------------------------------------------------------------. - * |Shift| BS| Z| X| C| V| B| N| M| ,| .| /| BS|Shift| Up| - * |------------------------------------------------------------------------|----|----. - * | Ctrl| Alt| Gui| MHen| Space| Space| Hen| Gui| Alt| Ctrl|Left|Down|Rght| - * `----------------------------------------------------------------------------------' - */ -[_BL] = KEYMAP( - KC_ESC, 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_GRV, KC_BSPC, 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_PGDN, \ - 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_NUHS, KC_ENT, \ - MO(_FL), KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FL), KC_UP, \ - KC_LCTL, KC_LALT, KC_LGUI,KC_MHEN, KC_SPC, KC_SPC, KC_HENK, KC_RGUI, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), - - /* Keymap _FL: Function Layer - * ,--------------------------------------------------------------------------. ,----. - * | `| F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12| | Del| |BLIN| - * |--------------------------------------------------------------------------| |----| - * | | | | | | | | |PScr|SLck|Paus| | | | |BLDE| - * |--------------------------------------------------------------------------| `----' - * | | | _RS| | | | | | | | | | | | - * |-----------------------------------------------------------------------------. - * | | | | | | | | | | | | | | |PGUP| - * |------------------------------------------------------------------------|----|----. - * | | | | | | | | | | _FL|HOME|PGDN| END| - * `----------------------------------------------------------------------------------' - */ -[_FL] = 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_DEL, BL_STEP, \ - KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, MO(_RS),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - MO(_FL), 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(_FL), KC_PGUP, \ - KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END), - - /* Keymap _RS: Reset/Underlight layer - * ,--------------------------------------------------------------------------. ,----. - * | | | | | | | | | | | | | | | | | | - * |--------------------------------------------------------------------------| |----| - * | | | | |RESET| | | | | | | | | | | | - * |--------------------------------------------------------------------------| `----' - * | | | _RS| | | | | | | | | | | | - * |-----------------------------------------------------------------------------. - * | | | | | | | | | | | | | | | | - * |------------------------------------------------------------------------|----|----. - * | | | | | | | | | | _FL| | | | - * `----------------------------------------------------------------------------------' - */ -[_RS] = 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, RGB_TOG, RGB_VAI, \ - KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAD, \ - KC_TRNS, KC_TRNS, MO(_RS),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - MO(_FL), 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(_FL), RGB_SAI, \ - KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, RGB_MOD, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUD, RGB_SAD, RGB_HUI), -}; - -/*enum function_id { -};*/ - -const uint16_t PROGMEM fn_actions[] = { -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - switch (id) { - } -} diff --git a/keyboards/clueboard/keymaps/maximised/keymap.c b/keyboards/clueboard/keymaps/maximised/keymap.c new file mode 100644 index 000000000..ebaefa669 --- /dev/null +++ b/keyboards/clueboard/keymaps/maximised/keymap.c @@ -0,0 +1,47 @@ +#include "clueboard.h" + +// Helpful defines +#define _______ KC_TRNS + +// 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 _BL 0 +#define _FL 1 +#define _CL 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: Base Layer (Default Layer) + */ +[_BL] = KEYMAP( + KC_ESC, 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_GRV, KC_BSPC, 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_PGDN, \ + 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_NUHS, KC_ENT, \ + MO(_FL), KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FL), KC_UP, \ + KC_LCTL, KC_LALT, KC_LGUI,KC_MHEN, KC_SPC, KC_SPC, KC_HENK, KC_RGUI, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _FL: Function Layer + */ +[_FL] = 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_DEL, BL_STEP, \ + _______, _______, _______,_______,_______,_______,_______,_______,_______,KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), KC_PGUP, \ + _______, _______, _______,_______, _______,_______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END), + + /* Keymap _CL: Reset/Underlight layer + */ +[_CL] = KEYMAP( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ + _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), +}; + +const uint16_t PROGMEM fn_actions[] = { +}; + +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { +}; diff --git a/keyboards/clueboard/keymaps/maximised/layout.png b/keyboards/clueboard/keymaps/maximised/layout.png new file mode 100644 index 000000000..bdc5d7623 Binary files /dev/null and b/keyboards/clueboard/keymaps/maximised/layout.png differ diff --git a/keyboards/clueboard/keymaps/maximised/readme.md b/keyboards/clueboard/keymaps/maximised/readme.md new file mode 100644 index 000000000..b95d1750f --- /dev/null +++ b/keyboards/clueboard/keymaps/maximised/readme.md @@ -0,0 +1,14 @@ +``` + ___ _____ _ _ _ __ __ _ __ +|__ \ / ____| | | | | | / / / /(_) / / + ||) | | | | |_ _ ___| |__ ___ __ _ _ __ __| | / /_ / /_ / / + |/ / | | | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / / + |_| | |____| | |_| | __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _ + (_) \_____|_|\__,_|\___|_.__/ \___/ \__,_|_| \__,_| \___/ \___/_/ (_) +``` + +![Clueboard Layout Image](layout.png) + +# Maximised Clueboard Layout + +This layout is intended for a board with one or both shifts split. The outside key on the split shift is an Fn, while the inside is shift. The bottom row has all the mods on both sides, optimised for a Mac. diff --git a/keyboards/clueboard/keymaps/mouse_keys/keymap.c b/keyboards/clueboard/keymaps/mouse_keys/keymap.c new file mode 100644 index 000000000..37f00e8d8 --- /dev/null +++ b/keyboards/clueboard/keymaps/mouse_keys/keymap.c @@ -0,0 +1,83 @@ +#include "clueboard.h" + +// Helpful defines +#define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) +#define _______ KC_TRNS + +// 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 _BL 0 +#define _FL 1 +#define _CL 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: Base Layer (Default Layer) + */ +[_BL] = KEYMAP( + F(0), 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_GRV, KC_BSPC, 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_PGDN, \ + 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_NUHS, KC_ENT, \ + 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_RO, KC_RSFT, KC_UP, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _FL: Function Layer + */ +[_FL] = 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_DEL, BL_STEP, \ + _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ + _______, _______, _______, _______, _______,_______, _______, _______, _______, MO(_FL), KC_HOME, KC_PGDN, KC_END), + + /* Keymap _CL: Control layer + */ +[_CL] = KEYMAP( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ + _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), +}; + +/* This is a list of user defined functions. F(N) corresponds to item N + of this list. + */ +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_FUNCTION(0), // Calls action_function() +}; + +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { + static uint8_t mods_pressed; + + switch (id) { + case 0: + /* Handle the combined Grave/Esc key + */ + mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed + + if (record->event.pressed) { + /* The key is being pressed. + */ + if (mods_pressed) { + add_key(KC_GRV); + send_keyboard_report(); + } else { + add_key(KC_ESC); + send_keyboard_report(); + } + } else { + /* The key is being released. + */ + if (mods_pressed) { + del_key(KC_GRV); + send_keyboard_report(); + } else { + del_key(KC_ESC); + send_keyboard_report(); + } + } + break; + } +} diff --git a/keyboards/clueboard/keymaps/mouse_keys/layout.png b/keyboards/clueboard/keymaps/mouse_keys/layout.png new file mode 100644 index 000000000..52e5c4581 Binary files /dev/null and b/keyboards/clueboard/keymaps/mouse_keys/layout.png differ diff --git a/keyboards/clueboard/keymaps/mouse_keys/readme.md b/keyboards/clueboard/keymaps/mouse_keys/readme.md new file mode 100644 index 000000000..97ac6dfa2 --- /dev/null +++ b/keyboards/clueboard/keymaps/mouse_keys/readme.md @@ -0,0 +1,16 @@ +``` + ___ _____ _ _ _ __ __ _ __ +|__ \ / ____| | | | | | / / / /(_) / / + ||) | | | | |_ _ ___| |__ ___ __ _ _ __ __| | / /_ / /_ / / + |/ / | | | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / / + |_| | |____| | |_| | __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _ + (_) \_____|_|\__,_|\___|_.__/ \___/ \__,_|_| \__,_| \___/ \___/_/ (_) +``` + +![Clueboard Layout Image](layout.png) + +# MouseKeys Layout + +This layout adds a mouse layer. When you hold down the spacebar the arrow keys +will move your mouse cursor. You can click using the 3 mods to the left of the +arrow keys, or the 3 keys under your primary fingers on the home row. diff --git a/keyboards/clueboard/keymaps/shift_fn/keymap.c b/keyboards/clueboard/keymaps/shift_fn/keymap.c new file mode 100644 index 000000000..f21b9b589 --- /dev/null +++ b/keyboards/clueboard/keymaps/shift_fn/keymap.c @@ -0,0 +1,83 @@ +#include "clueboard.h" + +// Helpful defines +#define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) +#define _______ KC_TRNS + +// 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 _BL 0 +#define _FL 1 +#define _CL 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: Base Layer (Default Layer) + */ +[_BL] = KEYMAP( + F(0), 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_GRV, KC_BSPC, 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_PGDN, \ + 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_NUHS, KC_ENT, \ + 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_RO, KC_RSFT, KC_UP, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _FL: Function Layer + */ +[_FL] = KEYMAP( + S(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, S(KC_GRV), KC_DEL, BL_STEP, \ + S(KC_TAB), S(KC_Q), S(KC_W),S(KC_E),S(KC_R),S(KC_T), S(KC_Y), S(KC_U),S(KC_I),S(KC_O), S(KC_P), S(KC_LBRC),S(KC_RBRC),S(KC_BSLS), S(KC_PGDN), \ + S(KC_LCTL),S(KC_A), MO(_CL),S(KC_D),S(KC_F),S(KC_G), S(KC_H), S(KC_J),S(KC_K),S(KC_L), S(KC_SCLN),S(KC_QUOT),S(KC_NUHS),S(KC_ENT), \ + MO(_FL), S(KC_NUBS),S(KC_Z),S(KC_X),S(KC_C),S(KC_V), S(KC_B), S(KC_N),S(KC_M),S(KC_COMM),S(KC_DOT), S(KC_SLSH),S(KC_RO), KC_RSFT, KC_PGUP, \ + KC_LCTL, KC_LALT, KC_LGUI,MO(_FL), S(KC_SPC),S(KC_SPC), MO(_FL), KC_RGUI, KC_RALT, KC_RCTL, KC_HOME, KC_PGDN, KC_END), + + /* Keymap _CL: Control layer + */ +[_CL] = KEYMAP( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ + _______, _______, _______,_______, RGB_MOD,RGB_MOD, _______, _______, _______, _______, RGB_HUD,RGB_SAD,RGB_HUI), +}; + +/* This is a list of user defined functions. F(N) corresponds to item N + of this list. + */ +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_FUNCTION(0), // Calls action_function() +}; + +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { + static uint8_t mods_pressed; + + switch (id) { + case 0: + /* Handle the combined Grave/Esc key + */ + mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed + + if (record->event.pressed) { + /* The key is being pressed. + */ + if (mods_pressed) { + add_key(KC_GRV); + send_keyboard_report(); + } else { + add_key(KC_ESC); + send_keyboard_report(); + } + } else { + /* The key is being released. + */ + if (mods_pressed) { + del_key(KC_GRV); + send_keyboard_report(); + } else { + del_key(KC_ESC); + send_keyboard_report(); + } + } + break; + } +} diff --git a/keyboards/clueboard/keymaps/shift_fn/layout.png b/keyboards/clueboard/keymaps/shift_fn/layout.png new file mode 100644 index 000000000..66d85410c Binary files /dev/null and b/keyboards/clueboard/keymaps/shift_fn/layout.png differ diff --git a/keyboards/clueboard/keymaps/shift_fn/readme.md b/keyboards/clueboard/keymaps/shift_fn/readme.md new file mode 100644 index 000000000..369f556f8 --- /dev/null +++ b/keyboards/clueboard/keymaps/shift_fn/readme.md @@ -0,0 +1,17 @@ +``` + ___ _____ _ _ _ __ __ _ __ +|__ \ / ____| | | | | | / / / /(_) / / + ||) | | | | |_ _ ___| |__ ___ __ _ _ __ __| | / /_ / /_ / / + |/ / | | | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / / + |_| | |____| | |_| | __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _ + (_) \_____|_|\__,_|\___|_.__/ \___/ \__,_|_| \__,_| \___/ \___/_/ (_) +``` + +![Clueboard Layout Image](layout.png) + +# Shift Fn Clueboard Layout + +This is an experimental layout. It makes the left shift key a dual roll key. +For most keys it acts as a shift key, but for some keys it activates an +alternate function instead. Primarily I use this to access the F-keys under +the number rows. diff --git a/keyboards/clueboard/keymaps/skully/keymap.c b/keyboards/clueboard/keymaps/skully/keymap.c index df6f054e0..295090352 100644 --- a/keyboards/clueboard/keymaps/skully/keymap.c +++ b/keyboards/clueboard/keymaps/skully/keymap.c @@ -1,7 +1,8 @@ #include "clueboard.h" -// Used for SHIFT_ESC -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) +// Helpful defines +#define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) +#define _______ KC_TRNS // 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. @@ -9,21 +10,10 @@ // entirely and just use numbers. #define _BL 0 #define _FL 1 -#define _RS 2 +#define _CL 2 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Keymap _BL: (Base Layer) Default Layer - * ,--------------------------------------------------------------------------. ,----. - * |Esc~| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| BS| |PGUP| - * |--------------------------------------------------------------------------| |----| - * | Tab| Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |PGDN| - * |--------------------------------------------------------------------------| `----' - * |Capslck| A| S| D| F| G| H| J| K| L| ;| '| # | Ent| - * |-----------------------------------------------------------------------------. - * |Shift| BS| Z| X| C| V| B| N| M| ,| .| /| BS|Shift| UP| - * |------------------------------------------------------------------------|----|----. - * | Ctrl| Gui| Alt| MHen| Space| Space| Hen| Alt| Ctrl| _FL|LEFT|DOWN|RGHT| - * `----------------------------------------------------------------------------------' + /* Keymap _BL: Base Layer (Default Layer) */ [_BL] = KEYMAP( F(0), 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_GRV, KC_BSPC, KC_PGUP, \ @@ -33,61 +23,41 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL,KC_LALT,KC_LGUI,MO(_FL), KC_SPC, KC_SPC, MO(_FL), KC_RGUI, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), /* Keymap _FL: Function Layer - * ,--------------------------------------------------------------------------. ,----. - * | `| F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12| | Del| |BLIN| - * |--------------------------------------------------------------------------| |----| - * | | | | | | | | |PScr|SLck|Paus| | | | |BLDE| - * |--------------------------------------------------------------------------| `----' - * | | | _RS| | | | | | | | | | | | - * |-----------------------------------------------------------------------------. - * | | | | | | | | | | | | | | |PGUP| - * |------------------------------------------------------------------------|----|----. - * | | | | | | | | | | _FL|HOME|PGDN| END| - * `----------------------------------------------------------------------------------' */ [_FL] = 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_DEL, BL_STEP, \ - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PSCR,KC_SLCK,KC_PAUS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, \ - KC_TRNS,KC_TRNS,MO(_RS),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,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_PGUP, \ - KC_TRNS,KC_TRNS,KC_TRNS,MO(_FL), KC_TRNS,KC_TRNS, MO(_FL),KC_TRNS,KC_TRNS,MO(_FL),KC_HOME,KC_PGDN,KC_END), + 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_DEL, BL_STEP, \ + _______,_______,_______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK,KC_PAUS,_______,_______,_______, _______, \ + _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, KC_PGUP, \ + _______,_______,_______,MO(_FL), _______,_______, MO(_FL),_______,_______,MO(_FL),KC_HOME,KC_PGDN,KC_END), - /* Keymap _RS: Reset layer - * ,--------------------------------------------------------------------------. ,----. - * | | | | | | | | | | | | | | | | | | - * |--------------------------------------------------------------------------| |----| - * | | | | |RESET| | | | | | | | | | | | - * |--------------------------------------------------------------------------| `----' - * | | | _RS| | | | | | | | | | | | - * |-----------------------------------------------------------------------------. - * | | | | | | | | | | | | | | | | - * |------------------------------------------------------------------------|----|----. - * | | | | | | | | | | _FL| | | | - * `----------------------------------------------------------------------------------' + /* Keymap _CL: Control layer */ -[_RS] = 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, KC_TRNS, \ - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,RESET, 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(_RS),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,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, KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,MO(_FL),KC_TRNS, KC_TRNS, KC_TRNS), -}; - -enum function_id { - SHIFT_ESC, +[_CL] = KEYMAP( + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ + _______,_______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ + _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ + _______,_______,_______,_______, _______,_______, _______,_______,_______,MO(_FL),_______, _______, _______), }; const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), + [0] = ACTION_FUNCTION(0), }; void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; + static uint8_t mods_pressed; + switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; + case 0: + /* Handle the combined Grave/Esc key + */ + mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed + if (record->event.pressed) { - if (shift_esc_shift_mask) { + /* The key is being pressed. + */ + if (mods_pressed) { add_key(KC_GRV); send_keyboard_report(); } else { @@ -95,7 +65,9 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } else { - if (shift_esc_shift_mask) { + /* The key is being released. + */ + if (mods_pressed) { del_key(KC_GRV); send_keyboard_report(); } else { diff --git a/keyboards/clueboard/keymaps/skully/layout.png b/keyboards/clueboard/keymaps/skully/layout.png new file mode 100644 index 000000000..64854aaef Binary files /dev/null and b/keyboards/clueboard/keymaps/skully/layout.png differ diff --git a/keyboards/clueboard/keymaps/skully/readme.md b/keyboards/clueboard/keymaps/skully/readme.md index c1182123d..08255dfbc 100644 --- a/keyboards/clueboard/keymaps/skully/readme.md +++ b/keyboards/clueboard/keymaps/skully/readme.md @@ -1,3 +1,14 @@ +``` + ___ _____ _ _ _ __ __ _ __ +|__ \ / ____| | | | | | / / / /(_) / / + ||) | | | | |_ _ ___| |__ ___ __ _ _ __ __| | / /_ / /_ / / + |/ / | | | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / / + |_| | |____| | |_| | __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _ + (_) \_____|_|\__,_|\___|_.__/ \___/ \__,_|_| \__,_| \___/ \___/_/ (_) +``` + +![Clueboard Layout Image](layout.png) + # skullY's Clueboard Layout This layout is what I (@skullydazed) use on my personal Clueboards. I mostly use it for programming, CAD, and general typing. diff --git a/keyboards/clueboard/keymaps/unix_optimized/keymap.c b/keyboards/clueboard/keymaps/unix_optimized/keymap.c new file mode 100644 index 000000000..9fbd77240 --- /dev/null +++ b/keyboards/clueboard/keymaps/unix_optimized/keymap.c @@ -0,0 +1,83 @@ +#include "clueboard.h" + +// Helpful defines +#define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) +#define _______ KC_TRNS + +// 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 _BL 0 +#define _FL 1 +#define _CL 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: Base Layer (Default Layer) + */ +[_BL] = KEYMAP( + F(0), 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_GRV, KC_BSPC, 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_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, KC_NUHS, KC_ENT, \ + 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_RO, KC_RSFT, KC_UP, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC, KC_SPC, KC_HENK, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _FL: Function Layer + */ +[_FL] = 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_DEL, KC_INS, \ + _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, KC_DEL, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ + _______, _______, _______, _______, _______,_______, _______, _______, _______, MO(_FL), KC_HOME, KC_PGDN, KC_END), + + /* Keymap _CL: Control layer + */ +[_CL] = KEYMAP( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ + _______, _______, _______,_______, RGB_MOD,RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD,RGB_HUI), +}; + +/* This is a list of user defined functions. F(N) corresponds to item N + of this list. + */ +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_FUNCTION(0), // Calls action_function() +}; + +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { + static uint8_t mods_pressed; + + switch (id) { + case 0: + /* Handle the combined Grave/Esc key + */ + mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed + + if (record->event.pressed) { + /* The key is being pressed. + */ + if (mods_pressed) { + add_key(KC_GRV); + send_keyboard_report(); + } else { + add_key(KC_ESC); + send_keyboard_report(); + } + } else { + /* The key is being released. + */ + if (mods_pressed) { + del_key(KC_GRV); + send_keyboard_report(); + } else { + del_key(KC_ESC); + send_keyboard_report(); + } + } + break; + } +} diff --git a/keyboards/clueboard/keymaps/unix_optimized/layout.png b/keyboards/clueboard/keymaps/unix_optimized/layout.png new file mode 100644 index 000000000..ea7d30e35 Binary files /dev/null and b/keyboards/clueboard/keymaps/unix_optimized/layout.png differ diff --git a/keyboards/clueboard/keymaps/unix_optimized/readme.md b/keyboards/clueboard/keymaps/unix_optimized/readme.md new file mode 100644 index 000000000..3510e138b --- /dev/null +++ b/keyboards/clueboard/keymaps/unix_optimized/readme.md @@ -0,0 +1,15 @@ +``` + ___ _____ _ _ _ __ __ _ __ +|__ \ / ____| | | | | | / / / /(_) / / + ||) | | | | |_ _ ___| |__ ___ __ _ _ __ __| | / /_ / /_ / / + |/ / | | | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / / + |_| | |____| | |_| | __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _ + (_) \_____|_|\__,_|\___|_.__/ \___/ \__,_|_| \__,_| \___/ \___/_/ (_) +``` + +![Clueboard Layout Image](layout.png) + +# Default Clueboard Layout + +This is the default layout except that Caps Lock has been changed to Control +and Insert and Delete have been put into the Fn layer. diff --git a/keyboards/clueboard/keymaps/win_optimized/keymap.c b/keyboards/clueboard/keymaps/win_optimized/keymap.c new file mode 100644 index 000000000..a85f0824f --- /dev/null +++ b/keyboards/clueboard/keymaps/win_optimized/keymap.c @@ -0,0 +1,83 @@ +#include "clueboard.h" + +// Helpful defines +#define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) +#define _______ KC_TRNS + +// 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 _BL 0 +#define _FL 1 +#define _CL 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: Base Layer (Default Layer) + */ +[_BL] = KEYMAP( + F(0), 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_GRV, 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_NUHS, KC_ENT, \ + 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_RO, KC_RSFT, KC_UP, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _FL: Function Layer + */ +[_FL] = 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_DEL, BL_STEP, \ + _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ + _______, _______, _______, _______, _______,_______, _______, _______, _______, MO(_FL), KC_HOME, KC_PGDN, KC_END), + + /* Keymap _CL: Control layer + */ +[_CL] = KEYMAP( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ + _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), +}; + +/* This is a list of user defined functions. F(N) corresponds to item N + of this list. + */ +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_FUNCTION(0), // Calls action_function() +}; + +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { + static uint8_t mods_pressed; + + switch (id) { + case 0: + /* Handle the combined Grave/Esc key + */ + mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed + + if (record->event.pressed) { + /* The key is being pressed. + */ + if (mods_pressed) { + add_key(KC_GRV); + send_keyboard_report(); + } else { + add_key(KC_ESC); + send_keyboard_report(); + } + } else { + /* The key is being released. + */ + if (mods_pressed) { + del_key(KC_GRV); + send_keyboard_report(); + } else { + del_key(KC_ESC); + send_keyboard_report(); + } + } + break; + } +} diff --git a/keyboards/clueboard/keymaps/win_optimized/layout.png b/keyboards/clueboard/keymaps/win_optimized/layout.png new file mode 100644 index 000000000..7d8c82da7 Binary files /dev/null and b/keyboards/clueboard/keymaps/win_optimized/layout.png differ diff --git a/keyboards/clueboard/keymaps/win_optimized/readme.md b/keyboards/clueboard/keymaps/win_optimized/readme.md new file mode 100644 index 000000000..cede17ee1 --- /dev/null +++ b/keyboards/clueboard/keymaps/win_optimized/readme.md @@ -0,0 +1,17 @@ +``` + ___ _____ _ _ _ __ __ _ __ +|__ \ / ____| | | | | | / / / /(_) / / + ||) | | | | |_ _ ___| |__ ___ __ _ _ __ __| | / /_ / /_ / / + |/ / | | | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / / + |_| | |____| | |_| | __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _ + (_) \_____|_|\__,_|\___|_.__/ \___/ \__,_|_| \__,_| \___/ \___/_/ (_) +``` + +![Clueboard Layout Image](layout.png) + +# Default Clueboard Layout + +This is the default layout that comes flashed on every Clueboard. For the most +part it's a straightforward and easy to follow layout. The only unusual key is +the key in the upper left, which sends Escape normally, but Grave when any of +the Ctrl, Alt, or GUI modifiers are held down. diff --git a/keyboards/clueboard/rules.mk b/keyboards/clueboard/rules.mk index 3909fbd5c..7ce096ba8 100644 --- a/keyboards/clueboard/rules.mk +++ b/keyboards/clueboard/rules.mk @@ -90,14 +90,14 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096 # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE ?= no # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +EXTRAKEY_ENABLE ?= no # Audio control and System control(+450) CONSOLE_ENABLE ?= yes # Console for debug(+400) -COMMAND_ENABLE ?= yes # Commands for debug and configuration +COMMAND_ENABLE ?= yes # Commands for debug and configuration NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work AUDIO_ENABLE ?= no -RGBLIGHT_ENABLE ?= no # Enable keyboard underlight functionality +RGBLIGHT_ENABLE ?= yes # Enable keyboard underlight functionality MIDI_ENABLE ?= no # MIDI controls UNICODE_ENABLE ?= no # Unicode -BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID \ No newline at end of file +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID -- cgit v1.2.3 From 1d87df5262331bee3cd27995ba17b035db2bef42 Mon Sep 17 00:00:00 2001 From: skullY Date: Thu, 16 Feb 2017 14:04:04 -0800 Subject: Add the mouse_keys layout --- keyboards/clueboard/keymaps/mouse_keys/Makefile | 1 + keyboards/clueboard/keymaps/mouse_keys/keymap.c | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 keyboards/clueboard/keymaps/mouse_keys/Makefile diff --git a/keyboards/clueboard/keymaps/mouse_keys/Makefile b/keyboards/clueboard/keymaps/mouse_keys/Makefile new file mode 100644 index 000000000..6c605daec --- /dev/null +++ b/keyboards/clueboard/keymaps/mouse_keys/Makefile @@ -0,0 +1 @@ +MOUSEKEY_ENABLE = yes diff --git a/keyboards/clueboard/keymaps/mouse_keys/keymap.c b/keyboards/clueboard/keymaps/mouse_keys/keymap.c index 37f00e8d8..a9c5cebd0 100644 --- a/keyboards/clueboard/keymaps/mouse_keys/keymap.c +++ b/keyboards/clueboard/keymaps/mouse_keys/keymap.c @@ -11,6 +11,7 @@ #define _BL 0 #define _FL 1 #define _CL 2 +#define _ML 3 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) @@ -39,6 +40,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), + + /* Keymap _ML: Mouse layer + */ + [_ML] = KEYMAP( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, _______, \ + _______, _______, KC_BTN3,KC_BTN2,KC_BTN1,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_MS_U, \ + _______, _______, _______,_______, LT(_ML, KC_SPC),LT(_ML, KC_SPC), _______, KC_BTN1, KC_BTN2, KC_BTN3, KC_MS_L, KC_MS_D,KC_MS_R), }; /* This is a list of user defined functions. F(N) corresponds to item N -- cgit v1.2.3 From d168822477a495091076aa2a36f0c5f7900d9c8a Mon Sep 17 00:00:00 2001 From: Stanley Lai Date: Sat, 18 Feb 2017 20:56:17 -0800 Subject: Updated XD60 readme and photos to reflect v2 PCB --- keyboards/xd60/arrow-cluster.JPG | Bin 1875718 -> 0 bytes keyboards/xd60/readme.md | 8 ++++++-- keyboards/xd60/top-view.JPG | Bin 2092542 -> 0 bytes keyboards/xd60/xd60.jpg | Bin 0 -> 2466209 bytes 4 files changed, 6 insertions(+), 2 deletions(-) delete mode 100644 keyboards/xd60/arrow-cluster.JPG delete mode 100644 keyboards/xd60/top-view.JPG create mode 100644 keyboards/xd60/xd60.jpg diff --git a/keyboards/xd60/arrow-cluster.JPG b/keyboards/xd60/arrow-cluster.JPG deleted file mode 100644 index aa03dc08e..000000000 Binary files a/keyboards/xd60/arrow-cluster.JPG and /dev/null differ diff --git a/keyboards/xd60/readme.md b/keyboards/xd60/readme.md index 393ea5d68..224498caa 100644 --- a/keyboards/xd60/readme.md +++ b/keyboards/xd60/readme.md @@ -1,7 +1,6 @@ # QMK Firmware for XIUDI's 60% XD60 PCB -![Top View of XD60 Keyboard, with DSA Dolch keycaps](./top-view.JPG) -![Angled View of XD60 Keyboard Arrow Cluster, with DSA Dolch keycaps](./arrow-cluster.JPG) +![Top View of a pair of XD60 Keyboard](./xd60.JPG) ## Quantum MK Firmware For the full Quantum feature list, see [the parent readme.md](/readme.md). @@ -9,5 +8,10 @@ For the full Quantum feature list, see [the parent readme.md](/readme.md). ## Additional Notes The XD60 is essentially a GH60 rev. C, with support for a right-hand arrow cluster. Includes full compatibility with GH60 expansion boards. Board also supports in-switch LEDs (two-pin, single colour), as well as WS2182 LED strips for underglow lighting. Default keymap included, matching configuration on sale page. +Version 2 PCBs include 6 soldered on RGB underglow LEDs on the bottom, and are labelled "XD60v2" on the top. They are otherwise identical to v1 PCBs. + +## Known Issues +In-switch backlight LEDs seem to only support 1 brightness level. + ## Build To build the default keymap, simply run `make xd60-default`. diff --git a/keyboards/xd60/top-view.JPG b/keyboards/xd60/top-view.JPG deleted file mode 100644 index 613759b4d..000000000 Binary files a/keyboards/xd60/top-view.JPG and /dev/null differ diff --git a/keyboards/xd60/xd60.jpg b/keyboards/xd60/xd60.jpg new file mode 100644 index 000000000..11654f0fd Binary files /dev/null and b/keyboards/xd60/xd60.jpg differ -- cgit v1.2.3 From db1e9a469a8dda068a913fe570c86a1fefc1b4cd Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Sun, 19 Feb 2017 00:11:55 -0500 Subject: helps to save before committing --- quantum/quantum.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/quantum/quantum.c b/quantum/quantum.c index 761ba37f3..582f8920b 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -7,14 +7,12 @@ #define TAPPING_TERM 200 #endif -<<<<<<< HEAD #include "backlight.h" extern backlight_config_t backlight_config; -======= + #ifdef FAUXCLICKY_ENABLE #include "fauxclicky.h" #endif ->>>>>>> 49e72632d2200fc3bf71d5ced2aa43058da3b2e0 static void do_code16 (uint16_t code, void (*f) (uint8_t)) { switch (code) { -- cgit v1.2.3 From 76b1f392abb2a0cf4a7fa14a01818998f4de4d39 Mon Sep 17 00:00:00 2001 From: Stanley Lai Date: Sat, 18 Feb 2017 21:47:11 -0800 Subject: XD60: Added BL_TOGG back to keymap, with 6 backlight steps --- keyboards/xd60/config.h | 7 ++----- keyboards/xd60/keymaps/stanleylai/keymap.c | 4 ++-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/keyboards/xd60/config.h b/keyboards/xd60/config.h index d3052b403..4bbaec882 100644 --- a/keyboards/xd60/config.h +++ b/keyboards/xd60/config.h @@ -46,12 +46,9 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3 } #define UNUSED_PINS -/* Backlight Setup - * Only 1 level, since XD60's backlight implementation doesn't seem compatible with QMK for variable brightness - * Use BL_STEP to toggle LEDs instead, as BL_TOGG can be inconsistent (depending on current level) - */ +/* Backlight Setup */ #define BACKLIGHT_PIN F5 -#define BACKLIGHT_LEVELS 1 +#define BACKLIGHT_LEVELS 6 /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/xd60/keymaps/stanleylai/keymap.c b/keyboards/xd60/keymaps/stanleylai/keymap.c index 4d3032a10..feb2cd1b6 100644 --- a/keyboards/xd60/keymaps/stanleylai/keymap.c +++ b/keyboards/xd60/keymaps/stanleylai/keymap.c @@ -21,8 +21,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // 2: RGB Layer 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, \ - BL_STEP, RGB_TOG, RGB_MOD, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, BL_TOGG, BL_STEP, 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, RGB_TOG, RGB_MOD, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ KC_NO, RGB_HUI, RGB_SAI, RGB_VAI, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ KC_NO, KC_NO, RGB_HUD, RGB_SAD, RGB_VAD,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, F(1), KC_NO, KC_NO, \ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), -- cgit v1.2.3 From 5ae1411fc387a682d3e22f5cddfe1102e3312af5 Mon Sep 17 00:00:00 2001 From: Gabriel Young Date: Thu, 16 Feb 2017 20:49:02 -0800 Subject: Expand MIDI key codes --- quantum/quantum_keycodes.h | 114 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 113 insertions(+), 1 deletion(-) diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 63b626926..3728fa366 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -107,10 +107,122 @@ enum quantum_keycodes { MUV_IN, MUV_DE, - // Midi mode on/off +#ifdef MIDI_ENABLE + // Midi MIDI_ON, MIDI_OFF, + MIDI_TONE_MIN, + + MI_C = MIDI_TONE_MIN, + MI_Cs, + MI_Db = MI_Cs, + MI_D, + MI_Ds, + MI_Eb = MI_Ds, + MI_E, + MI_F, + MI_Fs, + MI_Gb = MI_Fs, + MI_G, + MI_Gs, + MI_Ab = MI_Gs, + MI_A, + MI_As, + MI_Bb = MI_As, + MI_B, + + MI_C_1, + MI_Cs_1, + MI_Db_1 = MI_Cs_1, + MI_D_1, + MI_Ds_1, + MI_Eb_1 = MI_Ds_1, + MI_E_1, + MI_F_1, + MI_Fs_1, + MI_Gb_1 = MI_Fs_1, + MI_G_1, + MI_Gs_1, + MI_Ab_1 = MI_Gs_1, + MI_A_1, + MI_As_1, + MI_Bb_1 = MI_As_1, + MI_B_1, + + MI_C_2, + MI_Cs_2, + MI_Db_2 = MI_Cs_2, + MI_D_2, + MI_Ds_2, + MI_Eb_2 = MI_Ds_2, + MI_E_2, + MI_F_2, + MI_Fs_2, + MI_Gb_2 = MI_Fs_2, + MI_G_2, + MI_Gs_2, + MI_Ab_2 = MI_Gs_2, + MI_A_2, + MI_As_2, + MI_Bb_2 = MI_As_2, + MI_B_2, + + MIDI_TONE_MAX = MI_B_2, + + MIDI_OCTAVE_MIN, + MI_OCT_N2 = MIDI_OCTAVE_MIN, + MI_OCT_N1, + MI_OCT_0, + MI_OCT_1, + MI_OCT_2, + MI_OCT_3, + MI_OCT_4, + MI_OCT_5, + MI_OCT_6, + MI_OCT_7, + MIDI_OCTAVE_MAX = MI_OCT_7, + MI_OCTD, // octave down + MI_OCTU, // octave up + + MIDI_VELOCITY_MIN, + MI_VEL_1 = MIDI_VELOCITY_MIN, + MI_VEL_2, + MI_VEL_3, + MI_VEL_5, + MI_VEL_6, + MI_VEL_7, + MI_VEL_8, + MI_VEL_9, + MI_VEL_10, + MIDI_VELOCITY_MAX = MI_VEL_10, + MI_VELD, // velocity down + MI_VELU, // velocity up + + MIDI_CHANNEL_MIN, + MI_CH1 = MIDI_CHANNEL_MIN, + MI_CH2, + MI_CH3, + MI_CH4, + MI_CH5, + MI_CH6, + MI_CH7, + MI_CH8, + MI_CH9, + MI_CH10, + MI_CH11, + MI_CH12, + MI_CH13, + MI_CH14, + MI_CH15, + MI_CH16, + MIDI_CHANNEL_MAX = MI_CH16, + MI_CHD, // previous channel + MI_CHU, // next channel + + MI_SUS, // sustain +#endif + // Backlight functionality BL_0, BL_1, -- cgit v1.2.3 From e405ab4bc6ff47d189d99c4d51aadf60a642d82a Mon Sep 17 00:00:00 2001 From: Gabriel Young Date: Sat, 18 Feb 2017 03:12:13 -0800 Subject: initial implementation of polyphony using variable length array of notes on --- quantum/process_keycode/process_midi.c | 199 ++++++++++++++++++++++++++++++++- quantum/process_keycode/process_midi.h | 3 + quantum/quantum_keycodes.h | 1 + tmk_core/protocol/lufa/lufa.c | 13 ++- tmk_core/protocol/lufa/lufa.h | 2 +- 5 files changed, 211 insertions(+), 7 deletions(-) diff --git a/quantum/process_keycode/process_midi.c b/quantum/process_keycode/process_midi.c index 577dad43a..bc48b3905 100644 --- a/quantum/process_keycode/process_midi.c +++ b/quantum/process_keycode/process_midi.c @@ -1,10 +1,204 @@ #include "process_midi.h" +#if 0 bool midi_activated = false; uint8_t midi_starting_note = 0x0C; int midi_offset = 7; +#endif + +typedef union { + uint16_t raw; + struct { + uint8_t octave :4; + uint8_t velocity :4; + uint8_t channel :4; + }; +} midi_config_t; + +midi_config_t midi_config; + +#define MIDI_INVALID_NOTE 0xFF + +#if 0 +typedef struct { + uint64_t low; + uint64_t high; +} uint128_t; + +#if 0 +static void right_shift_uint128_t(uint128_t* val, uint8_t shift) +{ + uint64_t high_mask = ~0 >> (64 - shift); + uint64_t high_bits = (val->high & high_mask) << (64 - shift); + val->high = val->high >> shift; + val->low = (val->low >> shift) | high_bits; +} +#endif + +static uint64_t left_shift_uint64_t(uint64_t val, uint8_t shift) +{ + dprintf("left_shift_uint64_t(val, %c) ...\n", val, shift); + while (shift > 16u) { + dprintf(" left_shift_uint64_t: val=?, shift=%c\n", val, shift); + val <<= 16; + shift -= 16; + } + dprintf(" left_shift_uint64_t: val=?, shift=%c\n", val, shift); + val <<= shift; + return val; +} + +static void set_bit_uint128_t(uint128_t* val, uint8_t shift) +{ + uint64_t x = 1u; + + if (shift < 64) + { + x = left_shift_uint64_t(x, shift); + dprintf("x: %d\n", x); + dprintf("set_bit_uint128_t (%d): 0x%016X%016X\n", shift, 0, x); + val->low = val->low | left_shift_uint64_t(1u, shift); + } + else + { + x = left_shift_uint64_t(x, shift - 64); + dprintf("set_bit_uint128_t (%d): 0x%016X%016X\n", shift, x, 0); + val->high = val->high | left_shift_uint64_t(1u, shift - 64); + } +} + +static void clear_bit_uint128_t(uint128_t* val, uint8_t shift) +{ + if (shift < 64) + { + val->low = val->low & ~left_shift_uint64_t(1u, shift); + } + else + { + val->high = val->high & ~left_shift_uint64_t(1u, shift - 64); + } +} -bool process_midi(uint16_t keycode, keyrecord_t *record) { +static bool is_bit_set_uint128_t(const uint128_t* val, uint8_t shift) +{ + if (shift < 64) + { + return !!(val->low & (1u << shift)); + } + else + { + return !!(val->high & (1u << (shift - 64))); + } +} + +uint128_t note_status = { 0, 0 }; +#endif + + +#define MIDI_MAX_NOTES_ON 10 + +typedef struct { + uint8_t note; + uint8_t tone; +} midi_notes_on_array_entry_t; + +typedef struct { + uint8_t length; + midi_notes_on_array_entry_t values[MIDI_MAX_NOTES_ON]; +} midi_notes_on_array_t; + +static midi_notes_on_array_t notes_on; + +inline uint8_t compute_velocity(uint8_t setting) +{ + return (setting + 1) * (128 / (MIDI_VELOCITY_MAX - MIDI_VELOCITY_MIN + 1)); +} + +void midi_init(void) +{ + midi_config.octave = MI_OCT_0 - MIDI_OCTAVE_MIN; + midi_config.velocity = (MIDI_VELOCITY_MAX - MIDI_VELOCITY_MIN); + midi_config.channel = 0; + notes_on.length = 0; +} + +bool process_midi(uint16_t keycode, keyrecord_t *record) +{ + switch (keycode) { + case MIDI_TONE_MIN ... MIDI_TONE_MAX: + { + uint8_t channel = midi_config.channel; + uint8_t tone = keycode - MIDI_TONE_MIN; + uint8_t velocity = compute_velocity(midi_config.velocity); + if (record->event.pressed && notes_on.length < MIDI_MAX_NOTES_ON) { + uint8_t note = 12 * midi_config.octave + tone; + midi_send_noteon(&midi_device, channel, note, velocity); + dprintf("midi noteon channel:%d note:%d velocity:%d\n", channel, note, velocity); + notes_on.values[notes_on.length].note = note; + notes_on.values[notes_on.length].tone = tone; + notes_on.length++; + } + else { + for (uint8_t i = 0; i < notes_on.length; i++) { + uint8_t note = notes_on.values[i].note; + if (tone == notes_on.values[i].tone) { + midi_send_noteoff(&midi_device, channel, note, velocity); + dprintf("midi noteoff channel:%d note:%d velocity:%d\n", channel, note, velocity); + + for (uint8_t j=i; j < notes_on.length - 1; j++) + { + notes_on.values[j] = notes_on.values[j + 1]; + } + + notes_on.length--; + break; + } + } + } + return false; + } + case MIDI_OCTAVE_MIN ... MIDI_OCTAVE_MAX: + if (record->event.pressed) + midi_config.octave = keycode - MIDI_OCTAVE_MIN; + return false; + case MI_OCTD: + if (record->event.pressed && midi_config.octave > 0) + midi_config.octave--; + return false; + case MI_OCTU: + if (record->event.pressed && midi_config.octave < (MIDI_OCTAVE_MAX - MIDI_OCTAVE_MIN)) + midi_config.octave++; + return false; + case MIDI_VELOCITY_MIN ... MIDI_VELOCITY_MAX: + if (record->event.pressed) + midi_config.velocity = keycode - MIDI_VELOCITY_MIN; + return false; + case MI_VELD: + if (record->event.pressed && midi_config.velocity > 0) + midi_config.velocity--; + return false; + case MI_VELU: + if (record->event.pressed) + midi_config.velocity++; + return false; + case MIDI_CHANNEL_MIN ... MIDI_CHANNEL_MAX: + if (record->event.pressed) + midi_config.channel = keycode - MIDI_CHANNEL_MIN; + return false; + case MI_CHD: + if (record->event.pressed) + midi_config.channel--; + return false; + case MI_CHU: + if (record->event.pressed) + midi_config.channel++; + return false; + case MI_SUS: + //TODO + return false; + }; + +#if 0 if (keycode == MI_ON && record->event.pressed) { midi_activated = true; #ifdef AUDIO_ENABLE @@ -64,5 +258,6 @@ bool process_midi(uint16_t keycode, keyrecord_t *record) { if (keycode < 0xFF) // ignores all normal keycodes, but lets RAISE, LOWER, etc through return false; } - return true; +#endif + return true; } diff --git a/quantum/process_keycode/process_midi.h b/quantum/process_keycode/process_midi.h index acd4fc1b1..b0e0aeb83 100644 --- a/quantum/process_keycode/process_midi.h +++ b/quantum/process_keycode/process_midi.h @@ -2,6 +2,9 @@ #define PROCESS_MIDI_H #include "quantum.h" +#include "midi.h" + +void midi_init(void); bool process_midi(uint16_t keycode, keyrecord_t *record); diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 3728fa366..a024a9639 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -189,6 +189,7 @@ enum quantum_keycodes { MI_VEL_1 = MIDI_VELOCITY_MIN, MI_VEL_2, MI_VEL_3, + MI_VEL_4, MI_VEL_5, MI_VEL_6, MI_VEL_7, diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index ba49284c9..fb60658df 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -1101,16 +1101,21 @@ void cc_callback(MidiDevice * device, uint8_t chan, uint8_t num, uint8_t val); void sysex_callback(MidiDevice * device, uint16_t start, uint8_t length, uint8_t * data); + +void setup_midi(void) +{ + midi_init(); + midi_device_init(&midi_device); + midi_device_set_send_func(&midi_device, usb_send_func); + midi_device_set_pre_input_process_func(&midi_device, usb_get_midi); +} #endif int main(void) __attribute__ ((weak)); int main(void) { - #ifdef MIDI_ENABLE - midi_device_init(&midi_device); - midi_device_set_send_func(&midi_device, usb_send_func); - midi_device_set_pre_input_process_func(&midi_device, usb_get_midi); + setup_midi(); #endif setup_mcu(); diff --git a/tmk_core/protocol/lufa/lufa.h b/tmk_core/protocol/lufa/lufa.h index a049fd43c..a51573786 100644 --- a/tmk_core/protocol/lufa/lufa.h +++ b/tmk_core/protocol/lufa/lufa.h @@ -49,7 +49,7 @@ #include #include "host.h" #ifdef MIDI_ENABLE - #include "midi.h" + #include "process_midi.h" #endif #ifdef __cplusplus extern "C" { -- cgit v1.2.3 From f2b2e05f126403c8a6f0fc3d542beddac7974e9b Mon Sep 17 00:00:00 2001 From: Gabriel Young Date: Sat, 18 Feb 2017 03:13:43 -0800 Subject: clean up commented code --- quantum/process_keycode/process_midi.c | 137 --------------------------------- 1 file changed, 137 deletions(-) diff --git a/quantum/process_keycode/process_midi.c b/quantum/process_keycode/process_midi.c index bc48b3905..acaae7c30 100644 --- a/quantum/process_keycode/process_midi.c +++ b/quantum/process_keycode/process_midi.c @@ -19,82 +19,6 @@ midi_config_t midi_config; #define MIDI_INVALID_NOTE 0xFF -#if 0 -typedef struct { - uint64_t low; - uint64_t high; -} uint128_t; - -#if 0 -static void right_shift_uint128_t(uint128_t* val, uint8_t shift) -{ - uint64_t high_mask = ~0 >> (64 - shift); - uint64_t high_bits = (val->high & high_mask) << (64 - shift); - val->high = val->high >> shift; - val->low = (val->low >> shift) | high_bits; -} -#endif - -static uint64_t left_shift_uint64_t(uint64_t val, uint8_t shift) -{ - dprintf("left_shift_uint64_t(val, %c) ...\n", val, shift); - while (shift > 16u) { - dprintf(" left_shift_uint64_t: val=?, shift=%c\n", val, shift); - val <<= 16; - shift -= 16; - } - dprintf(" left_shift_uint64_t: val=?, shift=%c\n", val, shift); - val <<= shift; - return val; -} - -static void set_bit_uint128_t(uint128_t* val, uint8_t shift) -{ - uint64_t x = 1u; - - if (shift < 64) - { - x = left_shift_uint64_t(x, shift); - dprintf("x: %d\n", x); - dprintf("set_bit_uint128_t (%d): 0x%016X%016X\n", shift, 0, x); - val->low = val->low | left_shift_uint64_t(1u, shift); - } - else - { - x = left_shift_uint64_t(x, shift - 64); - dprintf("set_bit_uint128_t (%d): 0x%016X%016X\n", shift, x, 0); - val->high = val->high | left_shift_uint64_t(1u, shift - 64); - } -} - -static void clear_bit_uint128_t(uint128_t* val, uint8_t shift) -{ - if (shift < 64) - { - val->low = val->low & ~left_shift_uint64_t(1u, shift); - } - else - { - val->high = val->high & ~left_shift_uint64_t(1u, shift - 64); - } -} - -static bool is_bit_set_uint128_t(const uint128_t* val, uint8_t shift) -{ - if (shift < 64) - { - return !!(val->low & (1u << shift)); - } - else - { - return !!(val->high & (1u << (shift - 64))); - } -} - -uint128_t note_status = { 0, 0 }; -#endif - - #define MIDI_MAX_NOTES_ON 10 typedef struct { @@ -198,66 +122,5 @@ bool process_midi(uint16_t keycode, keyrecord_t *record) return false; }; -#if 0 - if (keycode == MI_ON && record->event.pressed) { - midi_activated = true; -#ifdef AUDIO_ENABLE - music_scale_user(); -#endif - return false; - } - - if (keycode == MI_OFF && record->event.pressed) { - midi_activated = false; - midi_send_cc(&midi_device, 0, 0x7B, 0); - return false; - } - - if (midi_activated) { - if (record->event.key.col == (MATRIX_COLS - 1) && record->event.key.row == (MATRIX_ROWS - 1)) { - if (record->event.pressed) { - midi_starting_note++; // Change key - midi_send_cc(&midi_device, 0, 0x7B, 0); - } - return false; - } - if (record->event.key.col == (MATRIX_COLS - 2) && record->event.key.row == (MATRIX_ROWS - 1)) { - if (record->event.pressed) { - midi_starting_note--; // Change key - midi_send_cc(&midi_device, 0, 0x7B, 0); - } - return false; - } - if (record->event.key.col == (MATRIX_COLS - 3) && record->event.key.row == (MATRIX_ROWS - 1) && record->event.pressed) { - midi_offset++; // Change scale - midi_send_cc(&midi_device, 0, 0x7B, 0); - return false; - } - if (record->event.key.col == (MATRIX_COLS - 4) && record->event.key.row == (MATRIX_ROWS - 1) && record->event.pressed) { - midi_offset--; // Change scale - midi_send_cc(&midi_device, 0, 0x7B, 0); - return false; - } - // basic - // uint8_t note = (midi_starting_note + SCALE[record->event.key.col + midi_offset])+12*(MATRIX_ROWS - record->event.key.row); - // advanced - // uint8_t note = (midi_starting_note + record->event.key.col + midi_offset)+12*(MATRIX_ROWS - record->event.key.row); - // guitar - uint8_t note = (midi_starting_note + record->event.key.col + midi_offset)+5*(MATRIX_ROWS - record->event.key.row); - // violin - // uint8_t note = (midi_starting_note + record->event.key.col + midi_offset)+7*(MATRIX_ROWS - record->event.key.row); - - if (record->event.pressed) { - // midi_send_noteon(&midi_device, record->event.key.row, midi_starting_note + SCALE[record->event.key.col], 127); - midi_send_noteon(&midi_device, 0, note, 127); - } else { - // midi_send_noteoff(&midi_device, record->event.key.row, midi_starting_note + SCALE[record->event.key.col], 127); - midi_send_noteoff(&midi_device, 0, note, 127); - } - - if (keycode < 0xFF) // ignores all normal keycodes, but lets RAISE, LOWER, etc through - return false; - } -#endif return true; } -- cgit v1.2.3 From a4163466cb09144a96e2ea7bc697af1af8a5e770 Mon Sep 17 00:00:00 2001 From: Gabriel Young Date: Sat, 18 Feb 2017 03:40:49 -0800 Subject: Alternative version with a tone array tone array: text data bss dec hex filename 0 25698 0 25698 6462 satan_newsboytko.hex 0x6480 bytes written into 0x7000 bytes memory (89.73%). note on array: text data bss dec hex filename 0 25802 0 25802 64ca satan_newsboytko.hex 0x6500 bytes written into 0x7000 bytes memory (90.18%). --- quantum/process_keycode/process_midi.c | 109 +++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) diff --git a/quantum/process_keycode/process_midi.c b/quantum/process_keycode/process_midi.c index acaae7c30..4fbb28816 100644 --- a/quantum/process_keycode/process_midi.c +++ b/quantum/process_keycode/process_midi.c @@ -19,6 +19,10 @@ midi_config_t midi_config; #define MIDI_INVALID_NOTE 0xFF +#define MIDI_USE_NOTE_ON_ARRAY + +#ifdef MIDI_USE_NOTE_ON_ARRAY + #define MIDI_MAX_NOTES_ON 10 typedef struct { @@ -33,6 +37,15 @@ typedef struct { static midi_notes_on_array_t notes_on; +#else + +#define MIDI_TONE_COUNT (MIDI_TONE_MAX - MIDI_TONE_MIN + 1) +static uint8_t tone_status[MIDI_TONE_COUNT]; + +#endif + + + inline uint8_t compute_velocity(uint8_t setting) { return (setting + 1) * (128 / (MIDI_VELOCITY_MAX - MIDI_VELOCITY_MIN + 1)); @@ -43,7 +56,14 @@ void midi_init(void) midi_config.octave = MI_OCT_0 - MIDI_OCTAVE_MIN; midi_config.velocity = (MIDI_VELOCITY_MAX - MIDI_VELOCITY_MIN); midi_config.channel = 0; + #ifdef MIDI_USE_NOTE_ON_ARRAY notes_on.length = 0; + #else + for (uint8_t i = 0; i < MIDI_TONE_COUNT; i++) + { + tone_status[i] = MIDI_INVALID_NOTE; + } + #endif } bool process_midi(uint16_t keycode, keyrecord_t *record) @@ -54,15 +74,31 @@ bool process_midi(uint16_t keycode, keyrecord_t *record) uint8_t channel = midi_config.channel; uint8_t tone = keycode - MIDI_TONE_MIN; uint8_t velocity = compute_velocity(midi_config.velocity); + #ifdef MIDI_USE_NOTE_ON_ARRAY if (record->event.pressed && notes_on.length < MIDI_MAX_NOTES_ON) { + #else + if (record->event.pressed) { + #endif uint8_t note = 12 * midi_config.octave + tone; midi_send_noteon(&midi_device, channel, note, velocity); dprintf("midi noteon channel:%d note:%d velocity:%d\n", channel, note, velocity); + + #ifdef MIDI_USE_NOTE_ON_ARRAY + notes_on.values[notes_on.length].note = note; notes_on.values[notes_on.length].tone = tone; notes_on.length++; + + #else + + tone_status[tone] = note; + + #endif } else { + + #ifdef MIDI_USE_NOTE_ON_ARRAY + for (uint8_t i = 0; i < notes_on.length; i++) { uint8_t note = notes_on.values[i].note; if (tone == notes_on.values[i].tone) { @@ -78,6 +114,18 @@ bool process_midi(uint16_t keycode, keyrecord_t *record) break; } } + + #else + + uint8_t note = tone_status[tone]; + if (note != MIDI_INVALID_NOTE) + { + midi_send_noteoff(&midi_device, channel, note, velocity); + dprintf("midi noteoff channel:%d note:%d velocity:%d\n", channel, note, velocity); + } + tone_status[tone] = MIDI_INVALID_NOTE; + + #endif } return false; } @@ -122,5 +170,66 @@ bool process_midi(uint16_t keycode, keyrecord_t *record) return false; }; +#if 0 + if (keycode == MI_ON && record->event.pressed) { + midi_activated = true; +#ifdef AUDIO_ENABLE + music_scale_user(); +#endif + return false; + } + + if (keycode == MI_OFF && record->event.pressed) { + midi_activated = false; + midi_send_cc(&midi_device, 0, 0x7B, 0); + return false; + } + + if (midi_activated) { + if (record->event.key.col == (MATRIX_COLS - 1) && record->event.key.row == (MATRIX_ROWS - 1)) { + if (record->event.pressed) { + midi_starting_note++; // Change key + midi_send_cc(&midi_device, 0, 0x7B, 0); + } + return false; + } + if (record->event.key.col == (MATRIX_COLS - 2) && record->event.key.row == (MATRIX_ROWS - 1)) { + if (record->event.pressed) { + midi_starting_note--; // Change key + midi_send_cc(&midi_device, 0, 0x7B, 0); + } + return false; + } + if (record->event.key.col == (MATRIX_COLS - 3) && record->event.key.row == (MATRIX_ROWS - 1) && record->event.pressed) { + midi_offset++; // Change scale + midi_send_cc(&midi_device, 0, 0x7B, 0); + return false; + } + if (record->event.key.col == (MATRIX_COLS - 4) && record->event.key.row == (MATRIX_ROWS - 1) && record->event.pressed) { + midi_offset--; // Change scale + midi_send_cc(&midi_device, 0, 0x7B, 0); + return false; + } + // basic + // uint8_t note = (midi_starting_note + SCALE[record->event.key.col + midi_offset])+12*(MATRIX_ROWS - record->event.key.row); + // advanced + // uint8_t note = (midi_starting_note + record->event.key.col + midi_offset)+12*(MATRIX_ROWS - record->event.key.row); + // guitar + uint8_t note = (midi_starting_note + record->event.key.col + midi_offset)+5*(MATRIX_ROWS - record->event.key.row); + // violin + // uint8_t note = (midi_starting_note + record->event.key.col + midi_offset)+7*(MATRIX_ROWS - record->event.key.row); + + if (record->event.pressed) { + // midi_send_noteon(&midi_device, record->event.key.row, midi_starting_note + SCALE[record->event.key.col], 127); + midi_send_noteon(&midi_device, 0, note, 127); + } else { + // midi_send_noteoff(&midi_device, record->event.key.row, midi_starting_note + SCALE[record->event.key.col], 127); + midi_send_noteoff(&midi_device, 0, note, 127); + } + + if (keycode < 0xFF) // ignores all normal keycodes, but lets RAISE, LOWER, etc through + return false; + } +#endif return true; } -- cgit v1.2.3 From f67aefc522dd8b72711e7fc5280e1cae1470d1c5 Mon Sep 17 00:00:00 2001 From: Gabriel Young Date: Sat, 18 Feb 2017 03:43:30 -0800 Subject: remove disabled code --- quantum/process_keycode/process_midi.c | 129 --------------------------------- 1 file changed, 129 deletions(-) diff --git a/quantum/process_keycode/process_midi.c b/quantum/process_keycode/process_midi.c index 4fbb28816..2ce7418ea 100644 --- a/quantum/process_keycode/process_midi.c +++ b/quantum/process_keycode/process_midi.c @@ -1,11 +1,5 @@ #include "process_midi.h" -#if 0 -bool midi_activated = false; -uint8_t midi_starting_note = 0x0C; -int midi_offset = 7; -#endif - typedef union { uint16_t raw; struct { @@ -19,33 +13,9 @@ midi_config_t midi_config; #define MIDI_INVALID_NOTE 0xFF -#define MIDI_USE_NOTE_ON_ARRAY - -#ifdef MIDI_USE_NOTE_ON_ARRAY - -#define MIDI_MAX_NOTES_ON 10 - -typedef struct { - uint8_t note; - uint8_t tone; -} midi_notes_on_array_entry_t; - -typedef struct { - uint8_t length; - midi_notes_on_array_entry_t values[MIDI_MAX_NOTES_ON]; -} midi_notes_on_array_t; - -static midi_notes_on_array_t notes_on; - -#else - #define MIDI_TONE_COUNT (MIDI_TONE_MAX - MIDI_TONE_MIN + 1) static uint8_t tone_status[MIDI_TONE_COUNT]; -#endif - - - inline uint8_t compute_velocity(uint8_t setting) { return (setting + 1) * (128 / (MIDI_VELOCITY_MAX - MIDI_VELOCITY_MIN + 1)); @@ -74,49 +44,13 @@ bool process_midi(uint16_t keycode, keyrecord_t *record) uint8_t channel = midi_config.channel; uint8_t tone = keycode - MIDI_TONE_MIN; uint8_t velocity = compute_velocity(midi_config.velocity); - #ifdef MIDI_USE_NOTE_ON_ARRAY - if (record->event.pressed && notes_on.length < MIDI_MAX_NOTES_ON) { - #else if (record->event.pressed) { - #endif uint8_t note = 12 * midi_config.octave + tone; midi_send_noteon(&midi_device, channel, note, velocity); dprintf("midi noteon channel:%d note:%d velocity:%d\n", channel, note, velocity); - - #ifdef MIDI_USE_NOTE_ON_ARRAY - - notes_on.values[notes_on.length].note = note; - notes_on.values[notes_on.length].tone = tone; - notes_on.length++; - - #else - tone_status[tone] = note; - - #endif } else { - - #ifdef MIDI_USE_NOTE_ON_ARRAY - - for (uint8_t i = 0; i < notes_on.length; i++) { - uint8_t note = notes_on.values[i].note; - if (tone == notes_on.values[i].tone) { - midi_send_noteoff(&midi_device, channel, note, velocity); - dprintf("midi noteoff channel:%d note:%d velocity:%d\n", channel, note, velocity); - - for (uint8_t j=i; j < notes_on.length - 1; j++) - { - notes_on.values[j] = notes_on.values[j + 1]; - } - - notes_on.length--; - break; - } - } - - #else - uint8_t note = tone_status[tone]; if (note != MIDI_INVALID_NOTE) { @@ -124,8 +58,6 @@ bool process_midi(uint16_t keycode, keyrecord_t *record) dprintf("midi noteoff channel:%d note:%d velocity:%d\n", channel, note, velocity); } tone_status[tone] = MIDI_INVALID_NOTE; - - #endif } return false; } @@ -170,66 +102,5 @@ bool process_midi(uint16_t keycode, keyrecord_t *record) return false; }; -#if 0 - if (keycode == MI_ON && record->event.pressed) { - midi_activated = true; -#ifdef AUDIO_ENABLE - music_scale_user(); -#endif - return false; - } - - if (keycode == MI_OFF && record->event.pressed) { - midi_activated = false; - midi_send_cc(&midi_device, 0, 0x7B, 0); - return false; - } - - if (midi_activated) { - if (record->event.key.col == (MATRIX_COLS - 1) && record->event.key.row == (MATRIX_ROWS - 1)) { - if (record->event.pressed) { - midi_starting_note++; // Change key - midi_send_cc(&midi_device, 0, 0x7B, 0); - } - return false; - } - if (record->event.key.col == (MATRIX_COLS - 2) && record->event.key.row == (MATRIX_ROWS - 1)) { - if (record->event.pressed) { - midi_starting_note--; // Change key - midi_send_cc(&midi_device, 0, 0x7B, 0); - } - return false; - } - if (record->event.key.col == (MATRIX_COLS - 3) && record->event.key.row == (MATRIX_ROWS - 1) && record->event.pressed) { - midi_offset++; // Change scale - midi_send_cc(&midi_device, 0, 0x7B, 0); - return false; - } - if (record->event.key.col == (MATRIX_COLS - 4) && record->event.key.row == (MATRIX_ROWS - 1) && record->event.pressed) { - midi_offset--; // Change scale - midi_send_cc(&midi_device, 0, 0x7B, 0); - return false; - } - // basic - // uint8_t note = (midi_starting_note + SCALE[record->event.key.col + midi_offset])+12*(MATRIX_ROWS - record->event.key.row); - // advanced - // uint8_t note = (midi_starting_note + record->event.key.col + midi_offset)+12*(MATRIX_ROWS - record->event.key.row); - // guitar - uint8_t note = (midi_starting_note + record->event.key.col + midi_offset)+5*(MATRIX_ROWS - record->event.key.row); - // violin - // uint8_t note = (midi_starting_note + record->event.key.col + midi_offset)+7*(MATRIX_ROWS - record->event.key.row); - - if (record->event.pressed) { - // midi_send_noteon(&midi_device, record->event.key.row, midi_starting_note + SCALE[record->event.key.col], 127); - midi_send_noteon(&midi_device, 0, note, 127); - } else { - // midi_send_noteoff(&midi_device, record->event.key.row, midi_starting_note + SCALE[record->event.key.col], 127); - midi_send_noteoff(&midi_device, 0, note, 127); - } - - if (keycode < 0xFF) // ignores all normal keycodes, but lets RAISE, LOWER, etc through - return false; - } -#endif return true; } -- cgit v1.2.3 From 7c5e510fe2e57d1b3c0f98612f1f89d413c07525 Mon Sep 17 00:00:00 2001 From: Gabriel Young Date: Sat, 18 Feb 2017 04:25:17 -0800 Subject: add support for pedal cc messages --- quantum/process_keycode/process_midi.c | 61 ++++++++++++++++++++++++++++------ quantum/quantum_keycodes.h | 11 +++--- 2 files changed, 57 insertions(+), 15 deletions(-) diff --git a/quantum/process_keycode/process_midi.c b/quantum/process_keycode/process_midi.c index 2ce7418ea..f7a8b6650 100644 --- a/quantum/process_keycode/process_midi.c +++ b/quantum/process_keycode/process_midi.c @@ -62,43 +62,84 @@ bool process_midi(uint16_t keycode, keyrecord_t *record) return false; } case MIDI_OCTAVE_MIN ... MIDI_OCTAVE_MAX: - if (record->event.pressed) + if (record->event.pressed) { midi_config.octave = keycode - MIDI_OCTAVE_MIN; + dprintf("midi octave %d\n", midi_config.octave); + } return false; case MI_OCTD: - if (record->event.pressed && midi_config.octave > 0) + if (record->event.pressed && midi_config.octave > 0) { midi_config.octave--; + dprintf("midi octave %d\n", midi_config.octave); + } return false; case MI_OCTU: - if (record->event.pressed && midi_config.octave < (MIDI_OCTAVE_MAX - MIDI_OCTAVE_MIN)) + if (record->event.pressed && midi_config.octave < (MIDI_OCTAVE_MAX - MIDI_OCTAVE_MIN)) { midi_config.octave++; + dprintf("midi octave %d\n", midi_config.octave); + } return false; case MIDI_VELOCITY_MIN ... MIDI_VELOCITY_MAX: - if (record->event.pressed) + if (record->event.pressed) { midi_config.velocity = keycode - MIDI_VELOCITY_MIN; + dprintf("midi velocity %d\n", midi_config.velocity); + } return false; case MI_VELD: - if (record->event.pressed && midi_config.velocity > 0) + if (record->event.pressed && midi_config.velocity > 0) { midi_config.velocity--; + dprintf("midi velocity %d\n", midi_config.velocity); + } return false; case MI_VELU: - if (record->event.pressed) + if (record->event.pressed) { midi_config.velocity++; + dprintf("midi velocity %d\n", midi_config.velocity); + } return false; case MIDI_CHANNEL_MIN ... MIDI_CHANNEL_MAX: - if (record->event.pressed) + if (record->event.pressed) { midi_config.channel = keycode - MIDI_CHANNEL_MIN; + dprintf("midi channel %d\n", midi_config.channel); + } return false; case MI_CHD: - if (record->event.pressed) + if (record->event.pressed) { midi_config.channel--; + dprintf("midi channel %d\n", midi_config.channel); + } return false; case MI_CHU: - if (record->event.pressed) + if (record->event.pressed) { midi_config.channel++; + dprintf("midi channel %d\n", midi_config.channel); + } + return false; + case MI_OFF: + if (record->event.pressed) { + midi_send_cc(&midi_device, midi_config.channel, 0x7B, 0); + dprintf("midi off\n"); + } return false; case MI_SUS: - //TODO + midi_send_cc(&midi_device, midi_config.channel, 0x40, record->event.pressed ? 127 : 0); + dprintf("midi sustain %d\n", record->event.pressed); + return false; + case MI_PORT: + midi_send_cc(&midi_device, midi_config.channel, 0x41, record->event.pressed ? 127 : 0); + dprintf("midi portamento %d\n", record->event.pressed); + return false; + case MI_SOST: + midi_send_cc(&midi_device, midi_config.channel, 0x42, record->event.pressed ? 127 : 0); + dprintf("midi sostenuto %d\n", record->event.pressed); + return false; + case MI_SOFT: + midi_send_cc(&midi_device, midi_config.channel, 0x43, record->event.pressed ? 127 : 0); + dprintf("midi soft %d\n", record->event.pressed); + return false; + case MI_LEG: + midi_send_cc(&midi_device, midi_config.channel, 0x43, record->event.pressed ? 127 : 0); + dprintf("midi legato %d\n", record->event.pressed); return false; }; diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index a024a9639..f2b9509b5 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -109,8 +109,6 @@ enum quantum_keycodes { #ifdef MIDI_ENABLE // Midi - MIDI_ON, - MIDI_OFF, MIDI_TONE_MIN, @@ -221,7 +219,13 @@ enum quantum_keycodes { MI_CHD, // previous channel MI_CHU, // next channel + MI_OFF, // all notes off + MI_SUS, // sustain + MI_PORT, // portamento + MI_SOST, // sostenuto + MI_SOFT, // soft + MI_LEG, // legato #endif // Backlight functionality @@ -394,9 +398,6 @@ enum quantum_keycodes { #define BL_ON BL_9 #define BL_OFF BL_0 -#define MI_ON MIDI_ON -#define MI_OFF MIDI_OFF - // GOTO layer - 16 layers max // when: // ON_PRESS = 1 -- cgit v1.2.3 From dd8f8e6baeb1549735403edf2a2f04f07edb4bf2 Mon Sep 17 00:00:00 2001 From: Gabriel Young Date: Sat, 18 Feb 2017 05:32:55 -0800 Subject: implement modulation --- quantum/process_keycode/process_midi.c | 58 +++++++++- quantum/process_keycode/process_midi.h | 201 +-------------------------------- quantum/quantum_keycodes.h | 6 +- tmk_core/protocol/lufa/lufa.c | 2 +- 4 files changed, 61 insertions(+), 206 deletions(-) diff --git a/quantum/process_keycode/process_midi.c b/quantum/process_keycode/process_midi.c index f7a8b6650..d09aa0b38 100644 --- a/quantum/process_keycode/process_midi.c +++ b/quantum/process_keycode/process_midi.c @@ -1,4 +1,5 @@ #include "process_midi.h" +#include "timer.h" typedef union { uint16_t raw; @@ -6,6 +7,7 @@ typedef union { uint8_t octave :4; uint8_t velocity :4; uint8_t channel :4; + uint8_t modulation_interval :4; }; } midi_config_t; @@ -16,6 +18,10 @@ midi_config_t midi_config; #define MIDI_TONE_COUNT (MIDI_TONE_MAX - MIDI_TONE_MIN + 1) static uint8_t tone_status[MIDI_TONE_COUNT]; +static uint8_t midi_modulation; +static int8_t midi_modulation_step; +static uint16_t midi_modulation_timer; + inline uint8_t compute_velocity(uint8_t setting) { return (setting + 1) * (128 / (MIDI_VELOCITY_MAX - MIDI_VELOCITY_MIN + 1)); @@ -26,14 +32,40 @@ void midi_init(void) midi_config.octave = MI_OCT_0 - MIDI_OCTAVE_MIN; midi_config.velocity = (MIDI_VELOCITY_MAX - MIDI_VELOCITY_MIN); midi_config.channel = 0; - #ifdef MIDI_USE_NOTE_ON_ARRAY - notes_on.length = 0; - #else + midi_config.modulation_interval = 8; + for (uint8_t i = 0; i < MIDI_TONE_COUNT; i++) { tone_status[i] = MIDI_INVALID_NOTE; } - #endif + + midi_modulation = 0; + midi_modulation_step = 0; + midi_modulation_timer = 0; +} + +void midi_task(void) +{ + if (timer_elapsed(midi_modulation_timer) < midi_config.modulation_interval) + return; + midi_modulation_timer = timer_read(); + + if (midi_modulation_step != 0) + { + dprintf("midi modulation %d\n", midi_modulation); + midi_send_cc(&midi_device, midi_config.channel, 0x1, midi_modulation); + + if (midi_modulation_step < 0 && midi_modulation < -midi_modulation_step) { + midi_modulation = 0; + midi_modulation_step = 0; + return; + } + + midi_modulation += midi_modulation_step; + + if (midi_modulation > 127) + midi_modulation = 127; + } } bool process_midi(uint16_t keycode, keyrecord_t *record) @@ -141,6 +173,24 @@ bool process_midi(uint16_t keycode, keyrecord_t *record) midi_send_cc(&midi_device, midi_config.channel, 0x43, record->event.pressed ? 127 : 0); dprintf("midi legato %d\n", record->event.pressed); return false; + case MI_MOD: + midi_modulation_step = record->event.pressed ? 1 : -1; + return false; + case MI_MODSD: + if (record->event.pressed) { + midi_config.modulation_interval++; + // prevent overflow + if (midi_config.modulation_interval == 0) + midi_config.modulation_interval--; + dprintf("midi modulation interval %d\n", midi_config.modulation_interval); + } + return false; + case MI_MODSU: + if (record->event.pressed && midi_config.modulation_interval > 0) { + midi_config.modulation_interval--; + dprintf("midi modulation interval %d\n", midi_config.modulation_interval); + } + return false; }; return true; diff --git a/quantum/process_keycode/process_midi.h b/quantum/process_keycode/process_midi.h index b0e0aeb83..66ce60b0e 100644 --- a/quantum/process_keycode/process_midi.h +++ b/quantum/process_keycode/process_midi.h @@ -5,206 +5,7 @@ #include "midi.h" void midi_init(void); - +void midi_task(void); bool process_midi(uint16_t keycode, keyrecord_t *record); -#define MIDI(n) ((n) | 0x6000) -#define MIDI12 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000 - -#define CHNL(note, channel) (note + (channel << 8)) - -#define SCALE (int8_t []){ 0 + (12*0), 2 + (12*0), 4 + (12*0), 5 + (12*0), 7 + (12*0), 9 + (12*0), 11 + (12*0), \ - 0 + (12*1), 2 + (12*1), 4 + (12*1), 5 + (12*1), 7 + (12*1), 9 + (12*1), 11 + (12*1), \ - 0 + (12*2), 2 + (12*2), 4 + (12*2), 5 + (12*2), 7 + (12*2), 9 + (12*2), 11 + (12*2), \ - 0 + (12*3), 2 + (12*3), 4 + (12*3), 5 + (12*3), 7 + (12*3), 9 + (12*3), 11 + (12*3), \ - 0 + (12*4), 2 + (12*4), 4 + (12*4), 5 + (12*4), 7 + (12*4), 9 + (12*4), 11 + (12*4), } - -#define N_CN1 (0x600C + (12 * -1) + 0 ) -#define N_CN1S (0x600C + (12 * -1) + 1 ) -#define N_DN1F (0x600C + (12 * -1) + 1 ) -#define N_DN1 (0x600C + (12 * -1) + 2 ) -#define N_DN1S (0x600C + (12 * -1) + 3 ) -#define N_EN1F (0x600C + (12 * -1) + 3 ) -#define N_EN1 (0x600C + (12 * -1) + 4 ) -#define N_FN1 (0x600C + (12 * -1) + 5 ) -#define N_FN1S (0x600C + (12 * -1) + 6 ) -#define N_GN1F (0x600C + (12 * -1) + 6 ) -#define N_GN1 (0x600C + (12 * -1) + 7 ) -#define N_GN1S (0x600C + (12 * -1) + 8 ) -#define N_AN1F (0x600C + (12 * -1) + 8 ) -#define N_AN1 (0x600C + (12 * -1) + 9 ) -#define N_AN1S (0x600C + (12 * -1) + 10) -#define N_BN1F (0x600C + (12 * -1) + 10) -#define N_BN1 (0x600C + (12 * -1) + 11) -#define N_C0 (0x600C + (12 * 0) + 0 ) -#define N_C0S (0x600C + (12 * 0) + 1 ) -#define N_D0F (0x600C + (12 * 0) + 1 ) -#define N_D0 (0x600C + (12 * 0) + 2 ) -#define N_D0S (0x600C + (12 * 0) + 3 ) -#define N_E0F (0x600C + (12 * 0) + 3 ) -#define N_E0 (0x600C + (12 * 0) + 4 ) -#define N_F0 (0x600C + (12 * 0) + 5 ) -#define N_F0S (0x600C + (12 * 0) + 6 ) -#define N_G0F (0x600C + (12 * 0) + 6 ) -#define N_G0 (0x600C + (12 * 0) + 7 ) -#define N_G0S (0x600C + (12 * 0) + 8 ) -#define N_A0F (0x600C + (12 * 0) + 8 ) -#define N_A0 (0x600C + (12 * 0) + 9 ) -#define N_A0S (0x600C + (12 * 0) + 10) -#define N_B0F (0x600C + (12 * 0) + 10) -#define N_B0 (0x600C + (12 * 0) + 11) -#define N_C1 (0x600C + (12 * 1) + 0 ) -#define N_C1S (0x600C + (12 * 1) + 1 ) -#define N_D1F (0x600C + (12 * 1) + 1 ) -#define N_D1 (0x600C + (12 * 1) + 2 ) -#define N_D1S (0x600C + (12 * 1) + 3 ) -#define N_E1F (0x600C + (12 * 1) + 3 ) -#define N_E1 (0x600C + (12 * 1) + 4 ) -#define N_F1 (0x600C + (12 * 1) + 5 ) -#define N_F1S (0x600C + (12 * 1) + 6 ) -#define N_G1F (0x600C + (12 * 1) + 6 ) -#define N_G1 (0x600C + (12 * 1) + 7 ) -#define N_G1S (0x600C + (12 * 1) + 8 ) -#define N_A1F (0x600C + (12 * 1) + 8 ) -#define N_A1 (0x600C + (12 * 1) + 9 ) -#define N_A1S (0x600C + (12 * 1) + 10) -#define N_B1F (0x600C + (12 * 1) + 10) -#define N_B1 (0x600C + (12 * 1) + 11) -#define N_C2 (0x600C + (12 * 2) + 0 ) -#define N_C2S (0x600C + (12 * 2) + 1 ) -#define N_D2F (0x600C + (12 * 2) + 1 ) -#define N_D2 (0x600C + (12 * 2) + 2 ) -#define N_D2S (0x600C + (12 * 2) + 3 ) -#define N_E2F (0x600C + (12 * 2) + 3 ) -#define N_E2 (0x600C + (12 * 2) + 4 ) -#define N_F2 (0x600C + (12 * 2) + 5 ) -#define N_F2S (0x600C + (12 * 2) + 6 ) -#define N_G2F (0x600C + (12 * 2) + 6 ) -#define N_G2 (0x600C + (12 * 2) + 7 ) -#define N_G2S (0x600C + (12 * 2) + 8 ) -#define N_A2F (0x600C + (12 * 2) + 8 ) -#define N_A2 (0x600C + (12 * 2) + 9 ) -#define N_A2S (0x600C + (12 * 2) + 10) -#define N_B2F (0x600C + (12 * 2) + 10) -#define N_B2 (0x600C + (12 * 2) + 11) -#define N_C3 (0x600C + (12 * 3) + 0 ) -#define N_C3S (0x600C + (12 * 3) + 1 ) -#define N_D3F (0x600C + (12 * 3) + 1 ) -#define N_D3 (0x600C + (12 * 3) + 2 ) -#define N_D3S (0x600C + (12 * 3) + 3 ) -#define N_E3F (0x600C + (12 * 3) + 3 ) -#define N_E3 (0x600C + (12 * 3) + 4 ) -#define N_F3 (0x600C + (12 * 3) + 5 ) -#define N_F3S (0x600C + (12 * 3) + 6 ) -#define N_G3F (0x600C + (12 * 3) + 6 ) -#define N_G3 (0x600C + (12 * 3) + 7 ) -#define N_G3S (0x600C + (12 * 3) + 8 ) -#define N_A3F (0x600C + (12 * 3) + 8 ) -#define N_A3 (0x600C + (12 * 3) + 9 ) -#define N_A3S (0x600C + (12 * 3) + 10) -#define N_B3F (0x600C + (12 * 3) + 10) -#define N_B3 (0x600C + (12 * 3) + 11) -#define N_C4 (0x600C + (12 * 4) + 0 ) -#define N_C4S (0x600C + (12 * 4) + 1 ) -#define N_D4F (0x600C + (12 * 4) + 1 ) -#define N_D4 (0x600C + (12 * 4) + 2 ) -#define N_D4S (0x600C + (12 * 4) + 3 ) -#define N_E4F (0x600C + (12 * 4) + 3 ) -#define N_E4 (0x600C + (12 * 4) + 4 ) -#define N_F4 (0x600C + (12 * 4) + 5 ) -#define N_F4S (0x600C + (12 * 4) + 6 ) -#define N_G4F (0x600C + (12 * 4) + 6 ) -#define N_G4 (0x600C + (12 * 4) + 7 ) -#define N_G4S (0x600C + (12 * 4) + 8 ) -#define N_A4F (0x600C + (12 * 4) + 8 ) -#define N_A4 (0x600C + (12 * 4) + 9 ) -#define N_A4S (0x600C + (12 * 4) + 10) -#define N_B4F (0x600C + (12 * 4) + 10) -#define N_B4 (0x600C + (12 * 4) + 11) -#define N_C5 (0x600C + (12 * 5) + 0 ) -#define N_C5S (0x600C + (12 * 5) + 1 ) -#define N_D5F (0x600C + (12 * 5) + 1 ) -#define N_D5 (0x600C + (12 * 5) + 2 ) -#define N_D5S (0x600C + (12 * 5) + 3 ) -#define N_E5F (0x600C + (12 * 5) + 3 ) -#define N_E5 (0x600C + (12 * 5) + 4 ) -#define N_F5 (0x600C + (12 * 5) + 5 ) -#define N_F5S (0x600C + (12 * 5) + 6 ) -#define N_G5F (0x600C + (12 * 5) + 6 ) -#define N_G5 (0x600C + (12 * 5) + 7 ) -#define N_G5S (0x600C + (12 * 5) + 8 ) -#define N_A5F (0x600C + (12 * 5) + 8 ) -#define N_A5 (0x600C + (12 * 5) + 9 ) -#define N_A5S (0x600C + (12 * 5) + 10) -#define N_B5F (0x600C + (12 * 5) + 10) -#define N_B5 (0x600C + (12 * 5) + 11) -#define N_C6 (0x600C + (12 * 6) + 0 ) -#define N_C6S (0x600C + (12 * 6) + 1 ) -#define N_D6F (0x600C + (12 * 6) + 1 ) -#define N_D6 (0x600C + (12 * 6) + 2 ) -#define N_D6S (0x600C + (12 * 6) + 3 ) -#define N_E6F (0x600C + (12 * 6) + 3 ) -#define N_E6 (0x600C + (12 * 6) + 4 ) -#define N_F6 (0x600C + (12 * 6) + 5 ) -#define N_F6S (0x600C + (12 * 6) + 6 ) -#define N_G6F (0x600C + (12 * 6) + 6 ) -#define N_G6 (0x600C + (12 * 6) + 7 ) -#define N_G6S (0x600C + (12 * 6) + 8 ) -#define N_A6F (0x600C + (12 * 6) + 8 ) -#define N_A6 (0x600C + (12 * 6) + 9 ) -#define N_A6S (0x600C + (12 * 6) + 10) -#define N_B6F (0x600C + (12 * 6) + 10) -#define N_B6 (0x600C + (12 * 6) + 11) -#define N_C7 (0x600C + (12 * 7) + 0 ) -#define N_C7S (0x600C + (12 * 7) + 1 ) -#define N_D7F (0x600C + (12 * 7) + 1 ) -#define N_D7 (0x600C + (12 * 7) + 2 ) -#define N_D7S (0x600C + (12 * 7) + 3 ) -#define N_E7F (0x600C + (12 * 7) + 3 ) -#define N_E7 (0x600C + (12 * 7) + 4 ) -#define N_F7 (0x600C + (12 * 7) + 5 ) -#define N_F7S (0x600C + (12 * 7) + 6 ) -#define N_G7F (0x600C + (12 * 7) + 6 ) -#define N_G7 (0x600C + (12 * 7) + 7 ) -#define N_G7S (0x600C + (12 * 7) + 8 ) -#define N_A7F (0x600C + (12 * 7) + 8 ) -#define N_A7 (0x600C + (12 * 7) + 9 ) -#define N_A7S (0x600C + (12 * 7) + 10) -#define N_B7F (0x600C + (12 * 7) + 10) -#define N_B7 (0x600C + (12 * 7) + 11) -#define N_C8 (0x600C + (12 * 8) + 0 ) -#define N_C8S (0x600C + (12 * 8) + 1 ) -#define N_D8F (0x600C + (12 * 8) + 1 ) -#define N_D8 (0x600C + (12 * 8) + 2 ) -#define N_D8S (0x600C + (12 * 8) + 3 ) -#define N_E8F (0x600C + (12 * 8) + 3 ) -#define N_E8 (0x600C + (12 * 8) + 4 ) -#define N_F8 (0x600C + (12 * 8) + 5 ) -#define N_F8S (0x600C + (12 * 8) + 6 ) -#define N_G8F (0x600C + (12 * 8) + 6 ) -#define N_G8 (0x600C + (12 * 8) + 7 ) -#define N_G8S (0x600C + (12 * 8) + 8 ) -#define N_A8F (0x600C + (12 * 8) + 8 ) -#define N_A8 (0x600C + (12 * 8) + 9 ) -#define N_A8S (0x600C + (12 * 8) + 10) -#define N_B8F (0x600C + (12 * 8) + 10) -#define N_B8 (0x600C + (12 * 8) + 11) -#define N_C8 (0x600C + (12 * 8) + 0 ) -#define N_C8S (0x600C + (12 * 8) + 1 ) -#define N_D8F (0x600C + (12 * 8) + 1 ) -#define N_D8 (0x600C + (12 * 8) + 2 ) -#define N_D8S (0x600C + (12 * 8) + 3 ) -#define N_E8F (0x600C + (12 * 8) + 3 ) -#define N_E8 (0x600C + (12 * 8) + 4 ) -#define N_F8 (0x600C + (12 * 8) + 5 ) -#define N_F8S (0x600C + (12 * 8) + 6 ) -#define N_G8F (0x600C + (12 * 8) + 6 ) -#define N_G8 (0x600C + (12 * 8) + 7 ) -#define N_G8S (0x600C + (12 * 8) + 8 ) -#define N_A8F (0x600C + (12 * 8) + 8 ) -#define N_A8 (0x600C + (12 * 8) + 9 ) -#define N_A8S (0x600C + (12 * 8) + 10) -#define N_B8F (0x600C + (12 * 8) + 10) -#define N_B8 (0x600C + (12 * 8) + 11) - #endif \ No newline at end of file diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index f2b9509b5..4423d25ef 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -224,8 +224,12 @@ enum quantum_keycodes { MI_SUS, // sustain MI_PORT, // portamento MI_SOST, // sostenuto - MI_SOFT, // soft + MI_SOFT, // soft pedal MI_LEG, // legato + + MI_MOD, // modulation + MI_MODSD, // decrease modulation speed + MI_MODSU, // increase modulation speed #endif // Backlight functionality diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index fb60658df..bd2498057 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -1180,7 +1180,7 @@ int main(void) #ifdef MIDI_ENABLE midi_device_process(&midi_device); - // MIDI_Task(); + midi_task(); #endif #if defined(RGBLIGHT_ANIMATIONS) & defined(RGBLIGHT_ENABLE) -- cgit v1.2.3 From 5e6097f0154403dccb9b5658390c84441aa509bc Mon Sep 17 00:00:00 2001 From: Gabriel Young Date: Sat, 18 Feb 2017 06:19:48 -0800 Subject: add keycodes for transpose range --- quantum/process_keycode/process_midi.c | 37 +++++++++++++++++++++++++++------- quantum/quantum_keycodes.h | 18 +++++++++++++++++ 2 files changed, 48 insertions(+), 7 deletions(-) diff --git a/quantum/process_keycode/process_midi.c b/quantum/process_keycode/process_midi.c index d09aa0b38..4d60aefb1 100644 --- a/quantum/process_keycode/process_midi.c +++ b/quantum/process_keycode/process_midi.c @@ -2,12 +2,13 @@ #include "timer.h" typedef union { - uint16_t raw; + uint32_t raw; struct { - uint8_t octave :4; - uint8_t velocity :4; - uint8_t channel :4; - uint8_t modulation_interval :4; + uint8_t octave :4; + int8_t transpose :4; + uint8_t velocity :4; + uint8_t channel :4; + uint8_t modulation_interval :4; }; } midi_config_t; @@ -29,7 +30,8 @@ inline uint8_t compute_velocity(uint8_t setting) void midi_init(void) { - midi_config.octave = MI_OCT_0 - MIDI_OCTAVE_MIN; + midi_config.octave = MI_OCT_2 - MIDI_OCTAVE_MIN; + midi_config.transpose = 0; midi_config.velocity = (MIDI_VELOCITY_MAX - MIDI_VELOCITY_MIN); midi_config.channel = 0; midi_config.modulation_interval = 8; @@ -77,7 +79,7 @@ bool process_midi(uint16_t keycode, keyrecord_t *record) uint8_t tone = keycode - MIDI_TONE_MIN; uint8_t velocity = compute_velocity(midi_config.velocity); if (record->event.pressed) { - uint8_t note = 12 * midi_config.octave + tone; + uint8_t note = 12 * midi_config.octave + tone + midi_config.transpose; midi_send_noteon(&midi_device, channel, note, velocity); dprintf("midi noteon channel:%d note:%d velocity:%d\n", channel, note, velocity); tone_status[tone] = note; @@ -111,6 +113,27 @@ bool process_midi(uint16_t keycode, keyrecord_t *record) dprintf("midi octave %d\n", midi_config.octave); } return false; + case MIDI_TRANSPOSE_MIN ... MIDI_TRANSPOSE_MAX: + if (record->event.pressed) { + midi_config.transpose = keycode - MI_TRNS_0; + dprintf("midi transpose %d\n", midi_config.transpose); + } + return false; + case MI_TRNSD: + if (record->event.pressed && midi_config.transpose > (MIDI_TRANSPOSE_MIN - MI_TRNS_0)) { + midi_config.transpose--; + dprintf("midi transpose %d\n", midi_config.transpose); + } + return false; + case MI_TRNSU: + if (record->event.pressed && midi_config.transpose < (MIDI_TRANSPOSE_MAX - MI_TRNS_0)) { + const bool positive = midi_config.transpose > 0; + midi_config.transpose++; + if (positive && midi_config.transpose < 0) + midi_config.transpose--; + dprintf("midi transpose %d\n", midi_config.transpose); + } + return false; case MIDI_VELOCITY_MIN ... MIDI_VELOCITY_MAX: if (record->event.pressed) { midi_config.velocity = keycode - MIDI_VELOCITY_MIN; diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 4423d25ef..30cc9abdb 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -183,6 +183,24 @@ enum quantum_keycodes { MI_OCTD, // octave down MI_OCTU, // octave up + MIDI_TRANSPOSE_MIN, + MI_TRNS_N6 = MIDI_TRANSPOSE_MIN, + MI_TRNS_N5, + MI_TRNS_N4, + MI_TRNS_N3, + MI_TRNS_N2, + MI_TRNS_N1, + MI_TRNS_0, + MI_TRNS_1, + MI_TRNS_2, + MI_TRNS_3, + MI_TRNS_4, + MI_TRNS_5, + MI_TRNS_6, + MIDI_TRANSPOSE_MAX = MI_TRNS_6, + MI_TRNSD, // transpose down + MI_TRNSU, // transpose up + MIDI_VELOCITY_MIN, MI_VEL_1 = MIDI_VELOCITY_MIN, MI_VEL_2, -- cgit v1.2.3 From ae0752dff552a07fb52e08c7057979959959d247 Mon Sep 17 00:00:00 2001 From: Gabriel Young Date: Sat, 18 Feb 2017 21:07:07 -0800 Subject: expose midi_config --- quantum/process_keycode/process_midi.c | 23 ++++++----------------- quantum/process_keycode/process_midi.h | 18 ++++++++++++++++++ 2 files changed, 24 insertions(+), 17 deletions(-) diff --git a/quantum/process_keycode/process_midi.c b/quantum/process_keycode/process_midi.c index 4d60aefb1..9190fa047 100644 --- a/quantum/process_keycode/process_midi.c +++ b/quantum/process_keycode/process_midi.c @@ -1,22 +1,6 @@ #include "process_midi.h" #include "timer.h" -typedef union { - uint32_t raw; - struct { - uint8_t octave :4; - int8_t transpose :4; - uint8_t velocity :4; - uint8_t channel :4; - uint8_t modulation_interval :4; - }; -} midi_config_t; - -midi_config_t midi_config; - -#define MIDI_INVALID_NOTE 0xFF - -#define MIDI_TONE_COUNT (MIDI_TONE_MAX - MIDI_TONE_MIN + 1) static uint8_t tone_status[MIDI_TONE_COUNT]; static uint8_t midi_modulation; @@ -70,6 +54,11 @@ void midi_task(void) } } +uint8_t midi_compute_note(uint16_t keycode) +{ + return 12 * midi_config.octave + (keycode - MIDI_TONE_MIN) + midi_config.transpose; +} + bool process_midi(uint16_t keycode, keyrecord_t *record) { switch (keycode) { @@ -79,7 +68,7 @@ bool process_midi(uint16_t keycode, keyrecord_t *record) uint8_t tone = keycode - MIDI_TONE_MIN; uint8_t velocity = compute_velocity(midi_config.velocity); if (record->event.pressed) { - uint8_t note = 12 * midi_config.octave + tone + midi_config.transpose; + uint8_t note = midi_compute_note(keycode); midi_send_noteon(&midi_device, channel, note, velocity); dprintf("midi noteon channel:%d note:%d velocity:%d\n", channel, note, velocity); tone_status[tone] = note; diff --git a/quantum/process_keycode/process_midi.h b/quantum/process_keycode/process_midi.h index 66ce60b0e..ffd41579f 100644 --- a/quantum/process_keycode/process_midi.h +++ b/quantum/process_keycode/process_midi.h @@ -4,8 +4,26 @@ #include "quantum.h" #include "midi.h" +typedef union { + uint32_t raw; + struct { + uint8_t octave :4; + int8_t transpose :4; + uint8_t velocity :4; + uint8_t channel :4; + uint8_t modulation_interval :4; + }; +} midi_config_t; + +midi_config_t midi_config; + void midi_init(void); void midi_task(void); bool process_midi(uint16_t keycode, keyrecord_t *record); +#define MIDI_INVALID_NOTE 0xFF +#define MIDI_TONE_COUNT (MIDI_TONE_MAX - MIDI_TONE_MIN + 1) + +uint8_t midi_compute_note(uint16_t keycode); + #endif \ No newline at end of file -- cgit v1.2.3 From d1fe24ad9f85768774ae50465c71f3757a33cc00 Mon Sep 17 00:00:00 2001 From: Gabriel Young Date: Sun, 19 Feb 2017 17:18:05 -0800 Subject: Allow customization of the number of tone keycodes and add example keymap --- keyboards/satan/keymaps/midi/Makefile | 21 +++++++++ keyboards/satan/keymaps/midi/config.h | 11 +++++ keyboards/satan/keymaps/midi/keymap.c | 60 ++++++++++++++++++++++++ keyboards/satan/keymaps/midi/readme.md | 1 + quantum/quantum_keycodes.h | 84 ++++++++++++++++++++++++++++++++++ quantum/template/config.h | 3 ++ 6 files changed, 180 insertions(+) create mode 100644 keyboards/satan/keymaps/midi/Makefile create mode 100644 keyboards/satan/keymaps/midi/config.h create mode 100644 keyboards/satan/keymaps/midi/keymap.c create mode 100644 keyboards/satan/keymaps/midi/readme.md diff --git a/keyboards/satan/keymaps/midi/Makefile b/keyboards/satan/keymaps/midi/Makefile new file mode 100644 index 000000000..5cbda96ce --- /dev/null +++ b/keyboards/satan/keymaps/midi/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 = no # 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 = yes # Enable keyboard backlight functionality +MIDI_ENABLE = yes # 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/satan/keymaps/midi/config.h b/keyboards/satan/keymaps/midi/config.h new file mode 100644 index 000000000..e345d40c9 --- /dev/null +++ b/keyboards/satan/keymaps/midi/config.h @@ -0,0 +1,11 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here + +/* override number of MIDI tone keycodes (each octave adds 12 bytes) */ +#define MIDI_TONE_KEYCODE_OCTAVES 2 + +#endif \ No newline at end of file diff --git a/keyboards/satan/keymaps/midi/keymap.c b/keyboards/satan/keymaps/midi/keymap.c new file mode 100644 index 000000000..ac9725933 --- /dev/null +++ b/keyboards/satan/keymaps/midi/keymap.c @@ -0,0 +1,60 @@ +#include "satan.h" + +// 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 _BL 0 +#define _ML 1 + +// readability +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: (Base Layer) Default Layer + * ,-----------------------------------------------------------. + * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | + * |-----------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | + * |-----------------------------------------------------------| + * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return | + * |-----------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | + * |-----------------------------------------------------------| + * |Ctrl|Gui |Alt | Space |Alt |Gui |FN |Ctrl | + * `-----------------------------------------------------------' + */ +[_BL] = KEYMAP_ANSI( + KC_ESC, 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_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_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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, \ + KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, TG(_ML), KC_RCTL), + +/* Keymap _ML: MIDI Layer + * ,------------------------------------------------------------------------. + * | Exit | | | | | | | | | | | | | | + * |------------------------------------------------------------------------| + * | Ch+ | | C# | D# | | F# | G# | A# | | C# | D# | | | | + * |------------------------------------------------------------------------| + * | Mod | C | D | E | F | G | A | B | C | D | E | F |>>OnStage| + * |------------------------------------------------------------------------| + * | Sustain |Oct-|Oct+|Mod-|Mod+| | | |Tns-|Tns+|Tns0| Sustain | + * |------------------------------------------------------------------------| + * | | | | All notes off | | | | | + * `------------------------------------------------------------------------' + * + * Foot switches: + * ,--------. ,--------. + * | | | | + * | | | | + * `--------' `--------' + */ +[_ML] = KEYMAP_ANSI( + TG(_ML), MI_VEL_1, MI_VEL_2, MI_VEL_3, MI_VEL_4, MI_VEL_5, MI_VEL_6, MI_VEL_7, MI_VEL_8, MI_VEL_9, MI_VEL_10, XXXXXXX, XXXXXXX, XXXXXXX, \ + MI_CHU, XXXXXXX, MI_Cs, MI_Ds, XXXXXXX, MI_Fs, MI_Gs, MI_As, XXXXXXX, MI_Cs_1, MI_Ds_1, XXXXXXX, XXXXXXX, XXXXXXX, \ + MI_MOD, MI_C, MI_D, MI_E, MI_F, MI_G, MI_A, MI_B, MI_C_1, MI_D_1, MI_E_1, MI_F_1, _______, \ + MI_SUS, MI_OCTD, MI_OCTU, MI_MODSD, MI_MODSU, XXXXXXX, XXXXXXX, XXXXXXX, MI_TRNSD, MI_TRNSU, MI_TRNS_0, MI_SUS, \ + _______, _______, _______, MI_OFF, _______, _______, _______, _______), +}; \ No newline at end of file diff --git a/keyboards/satan/keymaps/midi/readme.md b/keyboards/satan/keymaps/midi/readme.md new file mode 100644 index 000000000..87844a854 --- /dev/null +++ b/keyboards/satan/keymaps/midi/readme.md @@ -0,0 +1 @@ +# Satan GH60 layout demonstrating MIDI key mapping diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 30cc9abdb..6d1438051 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -2,6 +2,12 @@ #ifndef QUANTUM_KEYCODES_H #define QUANTUM_KEYCODES_H +#ifdef MIDI_ENABLE +#ifndef MIDI_TONE_KEYCODE_OCTAVES +#define MIDI_TONE_KEYCODE_OCTAVES 3 +#endif +#endif + enum quantum_keycodes { // Ranges used in shortucuts - not to be used directly QK_TMK = 0x0000, @@ -112,6 +118,7 @@ enum quantum_keycodes { MIDI_TONE_MIN, +#if MIDI_TONE_KEYCODE_OCTAVES > 0 MI_C = MIDI_TONE_MIN, MI_Cs, MI_Db = MI_Cs, @@ -129,7 +136,9 @@ enum quantum_keycodes { MI_As, MI_Bb = MI_As, MI_B, +#endif +#if MIDI_TONE_KEYCODE_OCTAVES > 1 MI_C_1, MI_Cs_1, MI_Db_1 = MI_Cs_1, @@ -147,7 +156,9 @@ enum quantum_keycodes { MI_As_1, MI_Bb_1 = MI_As_1, MI_B_1, +#endif +#if MIDI_TONE_KEYCODE_OCTAVES > 2 MI_C_2, MI_Cs_2, MI_Db_2 = MI_Cs_2, @@ -165,8 +176,81 @@ enum quantum_keycodes { MI_As_2, MI_Bb_2 = MI_As_2, MI_B_2, +#endif +#if MIDI_TONE_KEYCODE_OCTAVES > 3 + MI_C_3, + MI_Cs_3, + MI_Db_3 = MI_Cs_3, + MI_D_3, + MI_Ds_3, + MI_Eb_3 = MI_Ds_3, + MI_E_3, + MI_F_3, + MI_Fs_3, + MI_Gb_3 = MI_Fs_3, + MI_G_3, + MI_Gs_3, + MI_Ab_3 = MI_Gs_3, + MI_A_3, + MI_As_3, + MI_Bb_3 = MI_As_3, + MI_B_3, +#endif + +#if MIDI_TONE_KEYCODE_OCTAVES > 4 + MI_C_4, + MI_Cs_4, + MI_Db_4 = MI_Cs_4, + MI_D_4, + MI_Ds_4, + MI_Eb_4 = MI_Ds_4, + MI_E_4, + MI_F_4, + MI_Fs_4, + MI_Gb_4 = MI_Fs_4, + MI_G_4, + MI_Gs_4, + MI_Ab_4 = MI_Gs_4, + MI_A_4, + MI_As_4, + MI_Bb_4 = MI_As_4, + MI_B_4, +#endif + +#if MIDI_TONE_KEYCODE_OCTAVES > 5 + MI_C_5, + MI_Cs_5, + MI_Db_5 = MI_Cs_5, + MI_D_5, + MI_Ds_5, + MI_Eb_5 = MI_Ds_5, + MI_E_5, + MI_F_5, + MI_Fs_5, + MI_Gb_5 = MI_Fs_5, + MI_G_5, + MI_Gs_5, + MI_Ab_5 = MI_Gs_5, + MI_A_5, + MI_As_5, + MI_Bb_5 = MI_As_5, + MI_B_5, +#endif + +#if MIDI_TONE_KEYCODE_OCTAVES > 5 + MIDI_TONE_MAX = MI_B_5, +#elif MIDI_TONE_KEYCODE_OCTAVES > 4 + MIDI_TONE_MAX = MI_B_4, +#elif MIDI_TONE_KEYCODE_OCTAVES > 3 + MIDI_TONE_MAX = MI_B_3, +#elif MIDI_TONE_KEYCODE_OCTAVES > 2 MIDI_TONE_MAX = MI_B_2, +#elif MIDI_TONE_KEYCODE_OCTAVES > 1 + MIDI_TONE_MAX = MI_B_1, +#elif MIDI_TONE_KEYCODE_OCTAVES > 0 + MIDI_TONE_MAX = MI_B, +#endif MIDI_OCTAVE_MIN, MI_OCT_N2 = MIDI_OCTAVE_MIN, diff --git a/quantum/template/config.h b/quantum/template/config.h index c61c4a618..d0bee0d89 100644 --- a/quantum/template/config.h +++ b/quantum/template/config.h @@ -159,4 +159,7 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION +/* override number of MIDI tone keycodes (each octave adds 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + #endif -- cgit v1.2.3 From ed15973a3ffff6e18e62f81654632b97961f18d2 Mon Sep 17 00:00:00 2001 From: Gabriel Young Date: Sun, 19 Feb 2017 17:45:08 -0800 Subject: Document size added by MIDI_ENABLE (~3800 bytes according to my experiments) satan/keymaps/midi MIDI_ENABLE = no text data bss dec hex filename 0 17080 0 17080 42b8 satan_midi.hex MIDI_ENABLE = yes #define MIDI_TONE_KEYCODE_OCTAVES 3 // default text data bss dec hex filename 0 20846 0 20846 516e satan_midi.hex MIDI_ENABLE = yes #define MIDI_TONE_KEYCODE_OCTAVES 2 // fewer octaves text data bss dec hex filename 0 20846 0 20846 516e satan_midi.hex --- keyboards/satan/keymaps/midi/Makefile | 2 +- keyboards/satan/keymaps/midi/config.h | 2 +- keyboards/satan/keymaps/midi/keymap.c | 2 ++ quantum/process_keycode/process_midi.c | 2 ++ quantum/template/config.h | 2 +- quantum/template/keymaps/default/Makefile | 2 +- 6 files changed, 8 insertions(+), 4 deletions(-) diff --git a/keyboards/satan/keymaps/midi/Makefile b/keyboards/satan/keymaps/midi/Makefile index 5cbda96ce..4e2d9d2f7 100644 --- a/keyboards/satan/keymaps/midi/Makefile +++ b/keyboards/satan/keymaps/midi/Makefile @@ -9,7 +9,7 @@ CONSOLE_ENABLE = no # 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 = yes # Enable keyboard backlight functionality -MIDI_ENABLE = yes # MIDI controls +MIDI_ENABLE = yes # MIDI support (+3800) AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/satan/keymaps/midi/config.h b/keyboards/satan/keymaps/midi/config.h index e345d40c9..0dbdb5cbc 100644 --- a/keyboards/satan/keymaps/midi/config.h +++ b/keyboards/satan/keymaps/midi/config.h @@ -5,7 +5,7 @@ // place overrides here -/* override number of MIDI tone keycodes (each octave adds 12 bytes) */ +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ #define MIDI_TONE_KEYCODE_OCTAVES 2 #endif \ No newline at end of file diff --git a/keyboards/satan/keymaps/midi/keymap.c b/keyboards/satan/keymaps/midi/keymap.c index ac9725933..004690f41 100644 --- a/keyboards/satan/keymaps/midi/keymap.c +++ b/keyboards/satan/keymaps/midi/keymap.c @@ -32,6 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, \ KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, TG(_ML), KC_RCTL), +#ifdef MIDI_ENABLE /* Keymap _ML: MIDI Layer * ,------------------------------------------------------------------------. * | Exit | | | | | | | | | | | | | | @@ -57,4 +58,5 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { MI_MOD, MI_C, MI_D, MI_E, MI_F, MI_G, MI_A, MI_B, MI_C_1, MI_D_1, MI_E_1, MI_F_1, _______, \ MI_SUS, MI_OCTD, MI_OCTU, MI_MODSD, MI_MODSU, XXXXXXX, XXXXXXX, XXXXXXX, MI_TRNSD, MI_TRNSU, MI_TRNS_0, MI_SUS, \ _______, _______, _______, MI_OFF, _______, _______, _______, _______), +#endif }; \ No newline at end of file diff --git a/quantum/process_keycode/process_midi.c b/quantum/process_keycode/process_midi.c index 9190fa047..5530ea97c 100644 --- a/quantum/process_keycode/process_midi.c +++ b/quantum/process_keycode/process_midi.c @@ -1,3 +1,5 @@ +#define MIDI_TONE_KEYCODE_OCTAVES 2 + #include "process_midi.h" #include "timer.h" diff --git a/quantum/template/config.h b/quantum/template/config.h index d0bee0d89..cd6dfa2c6 100644 --- a/quantum/template/config.h +++ b/quantum/template/config.h @@ -159,7 +159,7 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* override number of MIDI tone keycodes (each octave adds 12 bytes) */ +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 #endif diff --git a/quantum/template/keymaps/default/Makefile b/quantum/template/keymaps/default/Makefile index f4671a9d1..24442db37 100644 --- a/quantum/template/keymaps/default/Makefile +++ b/quantum/template/keymaps/default/Makefile @@ -9,7 +9,7 @@ CONSOLE_ENABLE = no # 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 +MIDI_ENABLE = no # MIDI support (+3800) AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -- cgit v1.2.3 From 64eecfc5303788bd82bf2fb466ec4a6f1bd0c028 Mon Sep 17 00:00:00 2001 From: Gabriel Young Date: Sun, 19 Feb 2017 22:23:06 -0800 Subject: fix typos in keymap --- keyboards/satan/keymaps/midi/keymap.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/keyboards/satan/keymaps/midi/keymap.c b/keyboards/satan/keymaps/midi/keymap.c index 004690f41..397fe097b 100644 --- a/keyboards/satan/keymaps/midi/keymap.c +++ b/keyboards/satan/keymaps/midi/keymap.c @@ -22,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-----------------------------------------------------------| * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | * |-----------------------------------------------------------| - * |Ctrl|Gui |Alt | Space |Alt |Gui |FN |Ctrl | + * |Ctrl|Gui |Alt | Space |Alt |Gui |Midi|Ctrl | * `-----------------------------------------------------------' */ [_BL] = KEYMAP_ANSI( @@ -39,18 +39,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------------------------------------------------------------------------| * | Ch+ | | C# | D# | | F# | G# | A# | | C# | D# | | | | * |------------------------------------------------------------------------| - * | Mod | C | D | E | F | G | A | B | C | D | E | F |>>OnStage| + * | Mod | C | D | E | F | G | A | B | C | D | E | F | | * |------------------------------------------------------------------------| * | Sustain |Oct-|Oct+|Mod-|Mod+| | | |Tns-|Tns+|Tns0| Sustain | * |------------------------------------------------------------------------| * | | | | All notes off | | | | | * `------------------------------------------------------------------------' - * - * Foot switches: - * ,--------. ,--------. - * | | | | - * | | | | - * `--------' `--------' */ [_ML] = KEYMAP_ANSI( TG(_ML), MI_VEL_1, MI_VEL_2, MI_VEL_3, MI_VEL_4, MI_VEL_5, MI_VEL_6, MI_VEL_7, MI_VEL_8, MI_VEL_9, MI_VEL_10, XXXXXXX, XXXXXXX, XXXXXXX, \ -- cgit v1.2.3 From 77f93636757d32f4e2ce6d7295f3d6293af3b462 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Tue, 21 Feb 2017 03:24:32 +0700 Subject: Only process Fnumber on key release, and only when layer is still active --- keyboards/handwired/promethium/keymaps/priyadi/keymap.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 8f712ccfe..cf486b39f 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -1046,6 +1046,16 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; #endif + // only process Fnumber on key release, and only when layer switcher is still pressed. + // this is to avoid accidental presses + case KC_F1 ... KC_F12: + if (!record->event.pressed && layer == _FUN) { + register_code(keycode); + unregister_code(keycode); + } + return false; + break; + // layer switcher // case GREEK: -- cgit v1.2.3 From b306f83c6b5ef671917bbc3789297e7344bede99 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Tue, 21 Feb 2017 04:00:05 +0700 Subject: Move del back to fun+backspce --- keyboards/handwired/promethium/keymaps/priyadi/keymap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index cf486b39f..0c39da824 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -54,7 +54,7 @@ along with this program. If not, see . #define C_RALT MT(MOD_RALT, KC_SLCK) // dual use right-shift & del key -#define C_RSFT MT(MOD_RSFT, KC_DEL) +// #define C_RSFT MT(MOD_RSFT, KC_DEL) bool capslock = false; #ifdef DOUBLESPACE_LAYER_ENABLE @@ -573,7 +573,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = KEYMAP( 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, C_RSFT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_LCTL, KC_LALT, KC_LGUI, EMPTY, NUM, LSPACE, RSPACE, FUN, GREEK, KC_RGUI, C_RALT, KC_RCTL ), @@ -708,7 +708,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_FUN] = KEYMAP( - XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_INS, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, _______, + XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_INS, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, KC_DEL, XXXXXXX, 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, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_END, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -- cgit v1.2.3 From b9fce164906195d8fa6eff4b1e5e080b43b63b30 Mon Sep 17 00:00:00 2001 From: Nathan Kessler Date: Mon, 20 Feb 2017 22:31:40 -0500 Subject: Add dvorak_emacs_software layout for ergodox --- .../ergodox/keymaps/dvorak_emacs_software/keymap.c | 166 +++++++++++++++++++++ .../keymaps/dvorak_emacs_software/readme.md | 74 +++++++++ 2 files changed, 240 insertions(+) create mode 100755 keyboards/ergodox/keymaps/dvorak_emacs_software/keymap.c create mode 100644 keyboards/ergodox/keymaps/dvorak_emacs_software/readme.md diff --git a/keyboards/ergodox/keymaps/dvorak_emacs_software/keymap.c b/keyboards/ergodox/keymaps/dvorak_emacs_software/keymap.c new file mode 100755 index 000000000..a2bc15c99 --- /dev/null +++ b/keyboards/ergodox/keymaps/dvorak_emacs_software/keymap.c @@ -0,0 +1,166 @@ +#include "ergodox.h" +#include "keymap_dvorak.h" +#include "debug.h" +#include "action_layer.h" + +/****************************************************************************************** + * DVORAK LAYOUT (see http://djelibeibi.unex.es/dvorak/) + * Layer 1: auxiliary keys + * Layer 2: full qwerty layout + *****************************************************************************************/ + +// LAYERS +#define BASE 0 // dvorak layout (default) +#define AUX 1 // auxiliary keys + +// MACROS +/* #define OBRACE 0 // key { or shift */ +/* #define CBRACE 1 // key } or shift */ +/* #define OBRACK 2 // key [ or left alt */ +/* #define CBRACK 3 // key ] or left alt */ +/* #define CAPS 4 // caps lock */ + +// LEDS +#define USB_LED_NUM_LOCK 0 +#define USB_LED_CAPS_LOCK 1 +#define USB_LED_SCROLL_LOCK 2 +#define USB_LED_COMPOSE 3 +#define USB_LED_KANA 4 + +// TIMERS +#define KEY_TAP_FAST 85 +#define KEY_TAP_SLOW 95 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Base layer + * Keys with double values (like Esc/Ctrl) correspond to the 'tapped' key and the 'held' key, respectively + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | Esc | | Esc | 6 | 7 | 8 | 9 | 0 | = / + | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | ~ |" / ' |, / < |. / > | P | Y | [ | | ] | F | G | C | H | L | / / ? | + * |--------+------+------+------+------+------| { | | } |------+------+------+------+------+--------| + * | Tab | A | O | E |U/LSft| I/L1 |------| |------| D/L1|R/RSft| T | N | S | - / _ | + * |--------+------+------+------+------+------| LGUI | | LGUI |------+------+------+------+------+--------| + * | {/LSft |; / : | Q | J | K | X | | | | B | M | W | V | Z | }/RSft | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | ~L1 | | ~L1 | | | \ / || | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | HOME | END | | LEFT | RIGHT| + * ,------|------|------| |------+--------+------. + * | BSPC | DEL | PGUP | | UP | SPACE |RETURN| + * | / | / |------| |------| / | / | + * | LCTL | LALT |PGDWN | | DOWN | LALT | LCTL | + * `--------------------' `----------------------' + * + */ +[BASE] = KEYMAP( + // left hand + KC_NO, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, + KC_TILD, DV_QUOT, DV_COMM,DV_DOT, DV_P, DV_Y, DV_LBRC, + KC_TAB, DV_A, DV_O, DV_E, SFT_T(DV_U), LT(AUX, DV_I), + SFT_T(DV_LBRC), DV_SCLN, DV_Q, DV_J, DV_K, DV_X, KC_LGUI, + KC_NO, KC_NO, KC_NO, KC_NO, MO(AUX), + KC_HOME, KC_END, + KC_PGUP, + CTL_T(KC_BSPC), ALT_T(KC_DEL), KC_PGDN, + // right hand + KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, DV_EQL, + DV_RBRC, DV_F, DV_G, DV_C, DV_R, DV_L, DV_SLSH, + LT(AUX, DV_D), SFT_T(DV_H), DV_T, DV_N, DV_S, DV_MINS, + KC_LGUI, DV_B, DV_M, DV_W, DV_V, DV_Z, SFT_T(DV_RBRC), + MO(AUX), KC_NO, KC_NO, KC_BSLS, KC_NO, + KC_LEFT, KC_RIGHT, + KC_UP, + KC_DOWN, ALT_T(KC_ENT), CTL_T(KC_SPC) + ), +/* Keymap 1: Aux layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | VolUp | | | | | | SLEEP | PWR | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | VolDn | F1 | F2 | F3 | F4 | | | | | | 7 | 8 | 9 | * | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | F5 | F6 | F7 | F8 | TRANS|------| |------|TRANS | 4 | 5 | 6 | + | | + * |--------+------+------+------+------+------| | |PSCR |------+-----aan+------+------+------+--------| + * | TRANS | F9 | F10 | F11 | F12 | | | | | | 1 | 2 | 3 | / | TRANS | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |CTRL-S|CTRL-Z|CTRL-X|CTRL-C| TRANS| | TRANS| . | 0 | = | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | TRANS| TRANS| | TRANS| TRANS| + * ,------|------|------| |------+------+------. + * | | | TRANS| | TRANS| | | + * |TRANS |TRANS |------| |------| TRANS| TRANS| + * | | | TRANS| | TRANS| | | + * `--------------------' `--------------------' + */ +[AUX] = KEYMAP( + // left hand + KC_VOLU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_SLEP, + KC_VOLD, KC_F1, KC_F2, KC_F3, KC_F4, KC_NO, KC_NO, + KC_NO , KC_F5, KC_F6, KC_F7, KC_F8, KC_TRNS, + KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, + LCTL(DV_S), LCTL(DV_Z), LCTL(DV_X), LCTL(DV_C), KC_TRNS, + KC_TRNS , KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + KC_PWR, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_7, KC_8, KC_9, KC_PAST, KC_NO, + KC_TRNS, KC_4, KC_5, KC_6, KC_PPLS, KC_NO, + KC_PSCR, KC_NO, KC_1, KC_2, KC_3, KC_PSLS, KC_TRNS, + KC_TRNS,KC_DOT, KC_0, KC_PEQL, KC_NO, + KC_TRNS , KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_LAYER_TAP_TOGGLE(AUX) // FN1 - Momentary Layer 1 (Aux) +}; + + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + default: + // none + break; + } +} diff --git a/keyboards/ergodox/keymaps/dvorak_emacs_software/readme.md b/keyboards/ergodox/keymaps/dvorak_emacs_software/readme.md new file mode 100644 index 000000000..0e1e94ffe --- /dev/null +++ b/keyboards/ergodox/keymaps/dvorak_emacs_software/readme.md @@ -0,0 +1,74 @@ +# Ergodox Dvorak Layout with emacs binding in mind - software version + +This configuration is the same as the dvorak_emacs layout, but using a sofware dvorak configuration +instead of a firmware configuration. This layout is for those who run their computer in dvorak mode. + + * Control & Alt key on the thumbs (activated if pressed with another key). + * In the same way, "U" and "R" are the shift modifier if pressed with another key. + * "I" and "D" set the layer 1 for the auxiliary keys if pressed with another key. + * Software layout set to english. + +## Keymap Layers + - L0: dvorak with some customizations (see layout below) + - L1: auxiliary keys (includes function keys, numpad...) + + +### Keymap 0: Base layer +Keys with double values (like U/LSft) correspond to the 'tapped' key and the 'held' key, respectively + +

+
+,--------------------------------------------------.           ,--------------------------------------------------.
+|        |   1  |   2  |   3  |   4  |   5  |  Esc |           |  Esc |   6  |   7  |   8  |   9  |   0  |   =    |
+|--------|------|------|------|------|-------------|           |------|------|------|------|------|------|--------|
+|   ~    |  '   |   ,  |   .  |   P  |   Y  |   [  |           |   ]  |   F  |   G  |   C  |   H  |   L  |   /    |
+|--------|------|------|------|------|------|   {  |           |   }  |------|------|------|------|------|--------|
+|  Tab   |   A  |   O  |   E  |U/LSft| I/L1 |------|           |------|  D/L1|R/RSft|   T  |   N  |   S  |   -    |
+|--------|------|------|------|------|------| LGUI |           | LGUI |------|------|------|------|------|--------|
+| {/LSft |   ;  |   Q  |   J  |   K  |   X  |      |           |      |   B  |   M  |   W  |   V  |   Z  | }/RSft |
+`--------|------|------|------|------|-------------'           `-------------|------|------|------|------|--------'
+  |      |      |      |      | ~L1  |                                       | ~L1  |      |      |   \  |      |
+  `----------------------------------'                                       `----------------------------------'
+                                       ,-------------.       ,-------------.
+                                       | HOME |  END |       | LEFT | RIGHT|
+                                ,------|------|------|       |------|--------|------.
+                                | BSPC |  DEL | PGUP |       |  UP  | SPACE  |RETURN|
+                                |  /   |  /   |------|       |------|   /    |  /   |
+                                | LCTL | LALT |PGDWN |       | DOWN | LALT   | LCTL |
+                                `--------------------'       `----------------------'
+
+
+ +### Keymap 1: Aux layer + +

+
+,--------------------------------------------------.           ,--------------------------------------------------.
+|  VolUp |      |      |      |      |      | SLEEP            | PWR  |      |      |      |      |      |        |
+|--------|------|------|------|------|-------------|           |------|------|------|------|------|------|--------|
+|  VolDn |  F1  |  F2  |  F3  |  F4  |      |      |           |      |      |   7  |   8  |   9  |   *  |        |
+|--------|------|------|------|------|------|      |           |      |------|------|------|------|------|--------|
+|        |  F5  |  F6  |  F7  |  F8  | TRANS|------|           |------|TRANS |   4  |   5  |   6  |   +  |        |
+|--------|------|------|------|------|------|      |           |PSCR  |------|------|------|------|------|--------|
+|  TRANS |  F9  |  F10 |  F11 |  F12 |      |      |           |      |      |   1  |   2  |   3  |   /  |  TRANS |
+`--------|------|------|------|------|-------------'           `-------------|------|------|------|------|--------'
+  |CTRL-S|CTRL-Z|CTRL-X|CTRL-C| TRANS|                                       | TRANS|    . |   0  |   =  |      |
+  `----------------------------------'                                       `----------------------------------'
+                                       ,-------------.       ,-------------.
+                                       | TRANS| TRANS|       | TRANS| TRANS|
+                                ,------|------|------|       |------|------|------.
+                                |      |      | TRANS|       | TRANS|      |      |
+                                |TRANS |TRANS |------|       |------| TRANS| TRANS|
+                                |      |      | TRANS|       | TRANS|      |      |
+                                `--------------------'       `--------------------'
+
+
+ + + +## Generation of .hex file +> In the "qmk_firmware/keyboards/ergodox" directory. + +> Execute "make dvorak_emacs". Then the hex file "ergodox_ez_dvorak_emacs.hex" is in the root directory : "qmk_firmware". + +> Flash with `teensy_loader` binary -- cgit v1.2.3 From 57623805e8d73aa14adae1e76d5338911dfc31b2 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Tue, 21 Feb 2017 16:36:35 +0700 Subject: Move caps to FUN layer; add Pause key --- keyboards/handwired/promethium/keymaps/priyadi/keymap.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 0c39da824..aed5a81ee 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -700,17 +700,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | | F1 | F2 | F3 | F4 | Ins | | PgUp | Up | PgDn | PgUp | | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | F5 | F6 | F7 | F8 |PrtSc | | Left | Down | Right| PgDn | | + * | Caps | F5 | F6 | F7 | F8 |PrtSc | | Left | Down | Right| PgDn | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F9 | F10 | F11 | F12 | | | | Home | End | | | + * | | F9 | F10 | F11 | F12 |Pause | | | Home | End | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ [_FUN] = KEYMAP( XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_INS, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, KC_DEL, - XXXXXXX, 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, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_END, XXXXXXX, _______, + 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, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), @@ -935,7 +935,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #endif // handle greek layer shift - // handle both shift = capslock case KC_LSFT: case KC_RSFT: ; @@ -949,13 +948,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { layer_off(_GREEKU); } } - } else { - if (record->event.pressed) { - if (lshift ^ rshift) { // if only one shift was pressed - register_code(KC_CAPS); - unregister_code(KC_CAPS); - } - } } return true; break; -- cgit v1.2.3 From 3dab8a60fca182376d1df07d3f1e25882aa57be4 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Tue, 21 Feb 2017 16:40:38 +0700 Subject: added pause, prtsc & ins to list of keys to be processed on release --- keyboards/handwired/promethium/keymaps/priyadi/keymap.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index aed5a81ee..cf7c67339 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -1039,9 +1039,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #endif // only process Fnumber on key release, and only when layer switcher is still pressed. - // this is to avoid accidental presses + // this is to avoid accidental presses on potentially destructive keys case KC_F1 ... KC_F12: - if (!record->event.pressed && layer == _FUN) { + case KC_PAUS: + case KC_PSCR: + case KC_INS: + if (!record->event.pressed && layer == _FUN) { // key released and still in FUN layer register_code(keycode); unregister_code(keycode); } -- cgit v1.2.3 From 1316ca67af42dac619ddcf70b5fc3c9bfd8db4d2 Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Tue, 21 Feb 2017 23:07:22 +0000 Subject: added hotkey cluster --- keyboards/planck/keymaps/callum/keymap.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index 2acd988ea..e1841dbd8 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -14,7 +14,7 @@ extern keymap_config_t keymap_config; #define _FUNC 4 #define ENDASH LALT(KC_MINS) #define POUND LALT(KC_3) - +#define H(X) LALT(LCTL(X)) enum planck_keycodes { MOVE = SAFE_RANGE, @@ -48,19 +48,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* MOVE * ,-----------------------------------------------------------------------------------. - * | Esc | | Home | Up | End | | | Home | Up | End | | Esc | + * | H(3) | H(F1)| H(F2)| H(F3)| H(F4)| H(F5)| | Home | Up | End | | Esc | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Del | Caps | Left | Down | Right| | | Left | Down | Right| Caps | Del | + * | H(4) | H(F6)| H(F7)| H(F8)| H(F9)|H(F10)| | Left | Down | Right| Caps | Del | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | Pg Up| Pg Dn| | | Pg Dn| Pg Up| | | | + * | |H(F11)|H(F12)| H(0) | H(1) | H(2) | | Pg Dn| Pg Up| | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ [_MOVE] = { - {KC_ESC, XXXXXXX, KC_HOME, KC_UP, KC_END, XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_END, XXXXXXX, KC_ESC }, - {KC_DEL, KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_CAPS, KC_DEL }, - {_______, XXXXXXX, XXXXXXX, KC_PGUP, KC_PGDN, XXXXXXX, XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, XXXXXXX, _______}, + {H(KC_3), H(KC_F1),H(KC_F2),H(KC_F3),H(KC_F4),H(KC_F5),XXXXXXX, KC_HOME, KC_UP, KC_END, XXXXXXX, KC_ESC }, + {H(KC_4), H(KC_F6),H(KC_F7),H(KC_F8),H(KC_F9),H(KC_F10),XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_CAPS, KC_DEL }, + {_______, H(KC_F11),H(KC_F12),H(KC_0),H(KC_1),H(KC_2), XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, XXXXXXX, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} }, -- cgit v1.2.3 From b06961c38ba66b351c4e3beed7f0c4b5750b6e8f Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Wed, 22 Feb 2017 12:26:13 +0000 Subject: updated readme --- keyboards/planck/keymaps/callum/readme.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/keyboards/planck/keymaps/callum/readme.md b/keyboards/planck/keymaps/callum/readme.md index 71e200b9d..1f8f92257 100644 --- a/keyboards/planck/keymaps/callum/readme.md +++ b/keyboards/planck/keymaps/callum/readme.md @@ -6,7 +6,7 @@ This is a layout for the grid planck, built with a few ideals in mind: - The hands should never need to leave the home position. The usual culprit for this is the arrow cluster, so the arrow cluster should be as close to home as possible. - There should be two of every modifier (one on each side), otherwise certain long key combinations become hard to make. -We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow cluster and other movement keys; a `SYMB` layer, with numbers and symbols; a `FUNC` layer, with function keys and media keys; and a `MOUSE` layer, with mouse emulation. The `MOUSE` layer is activated by holding the Move and Symb keys simultaniously. +We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow cluster, a hotkey cluster, and other movement keys; a `SYMB` layer, with numbers and symbols; a `FUNC` layer, with function keys and media keys; and a `MOUSE` layer, with mouse emulation. The `MOUSE` layer is activated by holding the Move and Symb keys simultaniously. ``` /* BASE @@ -23,11 +23,11 @@ We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow c /* MOVE * ,-----------------------------------------------------------------------------------. - * | Esc | | Home | Up | End | | | Home | Up | End | | Esc | + * | H(3) | H(F1)| H(F2)| H(F3)| H(F4)| H(F5)| | Home | Up | End | | Esc | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Del | Caps | Left | Down | Right| | | Left | Down | Right| Caps | Del | + * | H(4) | H(F6)| H(F7)| H(F8)| H(F9)|H(F10)| | Left | Down | Right| Caps | Del | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | Pg Up| Pg Dn| | | Pg Dn| Pg Up| | | | + * | |H(F11)|H(F12)| H(0) | H(1) | H(2) | | Pg Dn| Pg Up| | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' @@ -68,4 +68,4 @@ We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow c * | | | | | Prev | Mute | Play | Next | | | | | * `-----------------------------------------------------------------------------------' */ - ``` +``` -- cgit v1.2.3 From 296b927e7740f23fc91f84ebac6ca0c85c654028 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Thu, 23 Feb 2017 18:10:00 +0700 Subject: Fix UNICODE_MAP input_mode problem --- quantum/process_keycode/process_unicodemap.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/quantum/process_keycode/process_unicodemap.c b/quantum/process_keycode/process_unicodemap.c index 37f10df86..68a593a18 100644 --- a/quantum/process_keycode/process_unicodemap.c +++ b/quantum/process_keycode/process_unicodemap.c @@ -1,25 +1,26 @@ #include "process_unicodemap.h" +#include "process_unicode_common.h" __attribute__((weak)) const uint32_t PROGMEM unicode_map[] = { }; void register_hex32(uint32_t hex) { - uint8_t onzerostart = 1; + bool onzerostart = true; for(int i = 7; i >= 0; i--) { if (i <= 3) { - onzerostart = 0; + onzerostart = false; } uint8_t digit = ((hex >> (i*4)) & 0xF); if (digit == 0) { - if (onzerostart == 0) { + if (!onzerostart) { register_code(hex_to_keycode(digit)); unregister_code(hex_to_keycode(digit)); } } else { register_code(hex_to_keycode(digit)); unregister_code(hex_to_keycode(digit)); - onzerostart = 0; + onzerostart = false; } } } @@ -28,6 +29,7 @@ __attribute__((weak)) void unicode_map_input_error() {} bool process_unicode_map(uint16_t keycode, keyrecord_t *record) { + uint8_t input_mode = get_unicode_input_mode(); if ((keycode & QK_UNICODE_MAP) == QK_UNICODE_MAP && record->event.pressed) { const uint32_t* map = unicode_map; uint16_t index = keycode - QK_UNICODE_MAP; -- cgit v1.2.3 From af29d0d0941ccc2aa67788b6eb1cb21116f39412 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Thu, 23 Feb 2017 18:10:00 +0700 Subject: Fix UNICODE_MAP input_mode problem --- quantum/process_keycode/process_unicodemap.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/quantum/process_keycode/process_unicodemap.c b/quantum/process_keycode/process_unicodemap.c index 37f10df86..68a593a18 100644 --- a/quantum/process_keycode/process_unicodemap.c +++ b/quantum/process_keycode/process_unicodemap.c @@ -1,25 +1,26 @@ #include "process_unicodemap.h" +#include "process_unicode_common.h" __attribute__((weak)) const uint32_t PROGMEM unicode_map[] = { }; void register_hex32(uint32_t hex) { - uint8_t onzerostart = 1; + bool onzerostart = true; for(int i = 7; i >= 0; i--) { if (i <= 3) { - onzerostart = 0; + onzerostart = false; } uint8_t digit = ((hex >> (i*4)) & 0xF); if (digit == 0) { - if (onzerostart == 0) { + if (!onzerostart) { register_code(hex_to_keycode(digit)); unregister_code(hex_to_keycode(digit)); } } else { register_code(hex_to_keycode(digit)); unregister_code(hex_to_keycode(digit)); - onzerostart = 0; + onzerostart = false; } } } @@ -28,6 +29,7 @@ __attribute__((weak)) void unicode_map_input_error() {} bool process_unicode_map(uint16_t keycode, keyrecord_t *record) { + uint8_t input_mode = get_unicode_input_mode(); if ((keycode & QK_UNICODE_MAP) == QK_UNICODE_MAP && record->event.pressed) { const uint32_t* map = unicode_map; uint16_t index = keycode - QK_UNICODE_MAP; -- cgit v1.2.3 From d0b4dcc82ce1dd8549c2f7416bf79f4d0c0f23a7 Mon Sep 17 00:00:00 2001 From: Phong Nguyen Date: Sat, 25 Feb 2017 19:49:03 +0700 Subject: Removes redundant {} which cause build failure when DEBUG_ACTION is set --- tmk_core/common/action_tapping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmk_core/common/action_tapping.c b/tmk_core/common/action_tapping.c index e16e11be7..ff78d7f2a 100644 --- a/tmk_core/common/action_tapping.c +++ b/tmk_core/common/action_tapping.c @@ -257,7 +257,7 @@ bool process_tapping(keyrecord_t *keyp) return true; } } else { - if (!IS_NOEVENT(event)) debug("Tapping: other key just after tap.\n") {}; + if (!IS_NOEVENT(event)) debug("Tapping: other key just after tap.\n"); process_record(keyp); return true; } -- cgit v1.2.3 From 525be99ee938aa6e48448d7dd6ea6e6fe50bb36d Mon Sep 17 00:00:00 2001 From: Gabriel Young Date: Sat, 25 Feb 2017 15:02:43 -0800 Subject: Split MIDI functionality into MIDI_BASIC and MIDI_ADVANCED MIDI_ENABLE = no text data bss dec hex filename 0 17080 0 17080 42b8 satan_midi.hex MIDI_ENABLE = yes MIDI_BASIC undefined MIDI_ADVANCED undefined text data bss dec hex filename 0 19494 0 19494 4c26 satan_midi.hex MIDI_ENABLE = yes #define MIDI_BASIC MIDI_ADVANCED undefined text data bss dec hex filename 0 19788 0 19788 4d4c satan_midi.hex MIDI_ENABLE = yes MIDI_BASIC undefined #define MIDI_ADVANCED text data bss dec hex filename 0 20846 0 20846 516e satan_midi.hex MIDI_ENABLE = yes #define MIDI_BASIC #define MIDI_ADVANCED text data bss dec hex filename 0 21140 0 21140 5294 satan_midi.hex --- build_keyboard.mk | 1 + keyboards/satan/keymaps/midi/config.h | 17 ++++++++++++++++- keyboards/satan/keymaps/midi/keymap.c | 4 ++-- quantum/process_keycode/process_midi.c | 9 ++++++--- quantum/process_keycode/process_music.c | 22 ++++++++++++++++++++++ quantum/quantum.c | 4 ++-- quantum/quantum_keycodes.h | 13 ++++++++++--- quantum/template/config.h | 17 +++++++++++++++++ tmk_core/protocol/lufa/lufa.c | 4 ++++ 9 files changed, 80 insertions(+), 11 deletions(-) diff --git a/build_keyboard.mk b/build_keyboard.mk index 4a6fc0980..eea8d5919 100644 --- a/build_keyboard.mk +++ b/build_keyboard.mk @@ -141,6 +141,7 @@ endif ifeq ($(strip $(MIDI_ENABLE)), yes) OPT_DEFS += -DMIDI_ENABLE + SRC += $(QUANTUM_DIR)/process_keycode/process_music.c SRC += $(QUANTUM_DIR)/process_keycode/process_midi.c endif diff --git a/keyboards/satan/keymaps/midi/config.h b/keyboards/satan/keymaps/midi/config.h index 0dbdb5cbc..59250b49e 100644 --- a/keyboards/satan/keymaps/midi/config.h +++ b/keyboards/satan/keymaps/midi/config.h @@ -3,7 +3,22 @@ #include "../../config.h" -// place overrides here +/* + * MIDI options + */ + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +#define MIDI_ADVANCED /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ #define MIDI_TONE_KEYCODE_OCTAVES 2 diff --git a/keyboards/satan/keymaps/midi/keymap.c b/keyboards/satan/keymaps/midi/keymap.c index 397fe097b..349391c3b 100644 --- a/keyboards/satan/keymaps/midi/keymap.c +++ b/keyboards/satan/keymaps/midi/keymap.c @@ -32,7 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, \ KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, TG(_ML), KC_RCTL), -#ifdef MIDI_ENABLE +#if defined(MIDI_ENABLE) && defined(MIDI_ADVANCED) /* Keymap _ML: MIDI Layer * ,------------------------------------------------------------------------. * | Exit | | | | | | | | | | | | | | @@ -51,6 +51,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { MI_CHU, XXXXXXX, MI_Cs, MI_Ds, XXXXXXX, MI_Fs, MI_Gs, MI_As, XXXXXXX, MI_Cs_1, MI_Ds_1, XXXXXXX, XXXXXXX, XXXXXXX, \ MI_MOD, MI_C, MI_D, MI_E, MI_F, MI_G, MI_A, MI_B, MI_C_1, MI_D_1, MI_E_1, MI_F_1, _______, \ MI_SUS, MI_OCTD, MI_OCTU, MI_MODSD, MI_MODSU, XXXXXXX, XXXXXXX, XXXXXXX, MI_TRNSD, MI_TRNSU, MI_TRNS_0, MI_SUS, \ - _______, _______, _______, MI_OFF, _______, _______, _______, _______), + _______, _______, _______, MI_ALLOFF, _______, _______, _______, _______), #endif }; \ No newline at end of file diff --git a/quantum/process_keycode/process_midi.c b/quantum/process_keycode/process_midi.c index 5530ea97c..161f04a24 100644 --- a/quantum/process_keycode/process_midi.c +++ b/quantum/process_keycode/process_midi.c @@ -1,6 +1,7 @@ -#define MIDI_TONE_KEYCODE_OCTAVES 2 - #include "process_midi.h" + +#if defined(MIDI_ENABLE) && defined(MIDI_ADVANCED) + #include "timer.h" static uint8_t tone_status[MIDI_TONE_COUNT]; @@ -161,7 +162,7 @@ bool process_midi(uint16_t keycode, keyrecord_t *record) dprintf("midi channel %d\n", midi_config.channel); } return false; - case MI_OFF: + case MI_ALLOFF: if (record->event.pressed) { midi_send_cc(&midi_device, midi_config.channel, 0x7B, 0); dprintf("midi off\n"); @@ -209,3 +210,5 @@ bool process_midi(uint16_t keycode, keyrecord_t *record) return true; } + +#endif // MIDI_ADVANCED diff --git a/quantum/process_keycode/process_music.c b/quantum/process_keycode/process_music.c index 1e2648bff..ac906b628 100644 --- a/quantum/process_keycode/process_music.c +++ b/quantum/process_keycode/process_music.c @@ -17,6 +17,7 @@ static uint16_t music_sequence_interval = 100; bool process_music(uint16_t keycode, keyrecord_t *record) { + #ifdef AUDIO_ENABLE if (keycode == AU_ON && record->event.pressed) { audio_on(); return false; @@ -38,6 +39,7 @@ bool process_music(uint16_t keycode, keyrecord_t *record) { } return false; } + #endif // AUDIO_ENABLE if (keycode == MU_ON && record->event.pressed) { music_on(); @@ -61,6 +63,7 @@ bool process_music(uint16_t keycode, keyrecord_t *record) { return false; } + #ifdef AUDIO_ENABLE if (keycode == MUV_IN && record->event.pressed) { voice_iterate(); music_scale_user(); @@ -72,11 +75,14 @@ bool process_music(uint16_t keycode, keyrecord_t *record) { music_scale_user(); return false; } + #endif // AUDIO_ENABLE if (music_activated) { if (keycode == KC_LCTL && record->event.pressed) { // Start recording + #ifdef AUDIO_ENABLE stop_all_notes(); + #endif music_sequence_recording = true; music_sequence_recorded = false; music_sequence_playing = false; @@ -85,7 +91,9 @@ bool process_music(uint16_t keycode, keyrecord_t *record) { } if (keycode == KC_LALT && record->event.pressed) { // Stop recording/playing + #ifdef AUDIO_ENABLE stop_all_notes(); + #endif if (music_sequence_recording) { // was recording music_sequence_recorded = true; } @@ -95,7 +103,9 @@ bool process_music(uint16_t keycode, keyrecord_t *record) { } if (keycode == KC_LGUI && record->event.pressed && music_sequence_recorded) { // Start playing + #ifdef AUDIO_ENABLE stop_all_notes(); + #endif music_sequence_recording = false; music_sequence_playing = true; music_sequence_position = 0; @@ -116,6 +126,7 @@ bool process_music(uint16_t keycode, keyrecord_t *record) { } #define MUSIC_MODE_GUITAR + #ifdef AUDIO_ENABLE #ifdef MUSIC_MODE_CHROMATIC float freq = ((float)220.0)*pow(2.0, -5.0)*pow(2.0,(music_starting_note + record->event.key.col + music_offset)/12.0+(MATRIX_ROWS - record->event.key.row)); #elif defined(MUSIC_MODE_GUITAR) @@ -125,15 +136,20 @@ bool process_music(uint16_t keycode, keyrecord_t *record) { #else float freq = ((float)220.0)*pow(2.0, -5.0)*pow(2.0,(music_starting_note + SCALE[record->event.key.col + music_offset])/12.0+(MATRIX_ROWS - record->event.key.row)); #endif + #endif // AUDIO_ENABLE if (record->event.pressed) { + #ifdef AUDIO_ENABLE play_note(freq, 0xF); if (music_sequence_recording) { music_sequence[music_sequence_count] = freq; music_sequence_count++; } + #endif } else { + #ifdef AUDIO_ENABLE stop_note(freq); + #endif } if (keycode < 0xFF) // ignores all normal keycodes, but lets RAISE, LOWER, etc through @@ -161,15 +177,19 @@ void music_on(void) { void music_off(void) { music_activated = 0; + #ifdef AUDIO_ENABLE stop_all_notes(); + #endif } __attribute__ ((weak)) void music_on_user() {} +#ifdef AUDIO_ENABLE __attribute__ ((weak)) void audio_on_user() {} +#endif __attribute__ ((weak)) void music_scale_user() {} @@ -178,8 +198,10 @@ void matrix_scan_music(void) { if (music_sequence_playing) { if ((music_sequence_timer == 0) || (timer_elapsed(music_sequence_timer) > music_sequence_interval)) { music_sequence_timer = timer_read(); + #ifdef AUDIO_ENABLE stop_note(music_sequence[(music_sequence_position - 1 < 0)?(music_sequence_position - 1 + music_sequence_count):(music_sequence_position - 1)]); play_note(music_sequence[music_sequence_position], 0xF); + #endif music_sequence_position = (music_sequence_position + 1) % music_sequence_count; } } diff --git a/quantum/quantum.c b/quantum/quantum.c index 4a6d0355f..83fa87708 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -150,10 +150,10 @@ bool process_record_quantum(keyrecord_t *record) { if (!( process_record_kb(keycode, record) && - #ifdef MIDI_ENABLE + #if defined(MIDI_ENABLE) && defined(MIDI_ADVANCED) process_midi(keycode, record) && #endif - #ifdef AUDIO_ENABLE + #if defined(AUDIO_ENABLE) || (defined(MIDI_ENABLE) && defined(MIDI_BASIC)) process_music(keycode, record) && #endif #ifdef TAP_DANCE_ENABLE diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 6d1438051..3b82b7208 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -2,7 +2,7 @@ #ifndef QUANTUM_KEYCODES_H #define QUANTUM_KEYCODES_H -#ifdef MIDI_ENABLE +#if defined(MIDI_ENABLE) && defined(MIDI_ADVANCED) #ifndef MIDI_TONE_KEYCODE_OCTAVES #define MIDI_TONE_KEYCODE_OCTAVES 3 #endif @@ -116,6 +116,12 @@ enum quantum_keycodes { #ifdef MIDI_ENABLE // Midi +#ifdef MIDI_BASIC + MI_ON, // send midi notes when music mode is enabled + MI_OFF, // don't send midi notes when music mode is enabled +#endif + +#ifdef MIDI_ADVANCED MIDI_TONE_MIN, #if MIDI_TONE_KEYCODE_OCTAVES > 0 @@ -321,7 +327,7 @@ enum quantum_keycodes { MI_CHD, // previous channel MI_CHU, // next channel - MI_OFF, // all notes off + MI_ALLOFF, // all notes off MI_SUS, // sustain MI_PORT, // portamento @@ -332,7 +338,8 @@ enum quantum_keycodes { MI_MOD, // modulation MI_MODSD, // decrease modulation speed MI_MODSU, // increase modulation speed -#endif +#endif // MIDI_ADVANCED +#endif // MIDI_ENABLE // Backlight functionality BL_0, diff --git a/quantum/template/config.h b/quantum/template/config.h index cd6dfa2c6..54db4f242 100644 --- a/quantum/template/config.h +++ b/quantum/template/config.h @@ -159,6 +159,23 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION +/* + * MIDI options + */ + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index bd2498057..651a0f347 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -1104,7 +1104,9 @@ void sysex_callback(MidiDevice * device, void setup_midi(void) { +#ifdef MIDI_ADVANCED midi_init(); +#endif midi_device_init(&midi_device); midi_device_set_send_func(&midi_device, usb_send_func); midi_device_set_pre_input_process_func(&midi_device, usb_get_midi); @@ -1180,8 +1182,10 @@ int main(void) #ifdef MIDI_ENABLE midi_device_process(&midi_device); +#ifdef MIDI_ADVANCED midi_task(); #endif +#endif #if defined(RGBLIGHT_ANIMATIONS) & defined(RGBLIGHT_ENABLE) rgblight_task(); -- cgit v1.2.3 From 1000799d1ef594bf9f48076986ec300ef9e536db Mon Sep 17 00:00:00 2001 From: Gabriel Young Date: Sat, 25 Feb 2017 19:25:33 -0800 Subject: Factor basic note processing into respective processors --- build_keyboard.mk | 1 + quantum/process_keycode/process_audio.c | 62 +++++++++++++++ quantum/process_keycode/process_audio.h | 11 +++ quantum/process_keycode/process_midi.c | 28 ++++++- quantum/process_keycode/process_midi.h | 13 ++- quantum/process_keycode/process_music.c | 137 ++++++++++++++------------------ quantum/process_keycode/process_music.h | 5 +- quantum/quantum.c | 3 + quantum/quantum.h | 7 +- 9 files changed, 184 insertions(+), 83 deletions(-) create mode 100644 quantum/process_keycode/process_audio.c create mode 100644 quantum/process_keycode/process_audio.h diff --git a/build_keyboard.mk b/build_keyboard.mk index eea8d5919..07dfe85b4 100644 --- a/build_keyboard.mk +++ b/build_keyboard.mk @@ -157,6 +157,7 @@ endif ifeq ($(strip $(AUDIO_ENABLE)), yes) OPT_DEFS += -DAUDIO_ENABLE SRC += $(QUANTUM_DIR)/process_keycode/process_music.c + SRC += $(QUANTUM_DIR)/process_keycode/process_audio.c SRC += $(QUANTUM_DIR)/audio/audio.c SRC += $(QUANTUM_DIR)/audio/voices.c SRC += $(QUANTUM_DIR)/audio/luts.c diff --git a/quantum/process_keycode/process_audio.c b/quantum/process_keycode/process_audio.c new file mode 100644 index 000000000..5b5da546e --- /dev/null +++ b/quantum/process_keycode/process_audio.c @@ -0,0 +1,62 @@ +#include "process_audio.h" +#include "audio.h" + +static float compute_freq_for_midi_note(uint8_t note) +{ + // https://en.wikipedia.org/wiki/MIDI_tuning_standard + return pow(2.0, (note - 69) / 12.0) * 440.0f; +} + +bool process_audio(uint16_t keycode, keyrecord_t *record) { + + if (keycode == AU_ON && record->event.pressed) { + audio_on(); + return false; + } + + if (keycode == AU_OFF && record->event.pressed) { + audio_off(); + return false; + } + + if (keycode == AU_TOG && record->event.pressed) { + if (is_audio_on()) + { + audio_off(); + } + else + { + audio_on(); + } + return false; + } + + if (keycode == MUV_IN && record->event.pressed) { + voice_iterate(); + music_scale_user(); + return false; + } + + if (keycode == MUV_DE && record->event.pressed) { + voice_deiterate(); + music_scale_user(); + return false; + } + + return true +} + +void process_audio_noteon(uint8_t note) { + play_note(compute_freq_for_midi_note(note), 0xF); +} + +void process_audio_noteoff(uint8_t note) { + stop_note(compute_freq_for_midi_note(note)); +} + +void process_audio_stop_all_notes(void) { + stop_all_notes(); +} + +__attribute__ ((weak)) +void audio_on_user() {} \ No newline at end of file diff --git a/quantum/process_keycode/process_audio.h b/quantum/process_keycode/process_audio.h new file mode 100644 index 000000000..59a17725a --- /dev/null +++ b/quantum/process_keycode/process_audio.h @@ -0,0 +1,11 @@ +#ifndef PROCESS_AUDIO_H +#define PROCESS_AUDIO_H + +bool process_audio(uint16_t keycode, keyrecord_t *record); +void process_audio_noteon(uint8_t note); +void process_audio_noteoff(uint8_t note); +void process_audio_stop_all_notes(void); + +void audio_on_user(void); + +#endif \ No newline at end of file diff --git a/quantum/process_keycode/process_midi.c b/quantum/process_keycode/process_midi.c index 161f04a24..214bba902 100644 --- a/quantum/process_keycode/process_midi.c +++ b/quantum/process_keycode/process_midi.c @@ -1,6 +1,28 @@ #include "process_midi.h" -#if defined(MIDI_ENABLE) && defined(MIDI_ADVANCED) +#ifdef MIDI_ENABLE +#include "midi.h" + +#ifdef MIDI_BASIC + +void process_midi_basic_noteon(uint8_t note) +{ + midi_send_noteon(&midi_device, 0, note, 128); +} + +void process_midi_basic_noteoff(uint8_t note) +{ + midi_send_noteoff(&midi_device, 0, note, 0); +} + +void process_midi_basic_stop_all_notes(void) +{ + midi_send_cc(&midi_device, 0, 0x7B, 0); +} + +#endif // MIDI_BASIC + +#ifdef MIDI_ADVANCED #include "timer.h" @@ -165,7 +187,7 @@ bool process_midi(uint16_t keycode, keyrecord_t *record) case MI_ALLOFF: if (record->event.pressed) { midi_send_cc(&midi_device, midi_config.channel, 0x7B, 0); - dprintf("midi off\n"); + dprintf("midi all notes off\n"); } return false; case MI_SUS: @@ -212,3 +234,5 @@ bool process_midi(uint16_t keycode, keyrecord_t *record) } #endif // MIDI_ADVANCED + +#endif // MIDI_ENABLE diff --git a/quantum/process_keycode/process_midi.h b/quantum/process_keycode/process_midi.h index ffd41579f..0f559ec23 100644 --- a/quantum/process_keycode/process_midi.h +++ b/quantum/process_keycode/process_midi.h @@ -2,8 +2,16 @@ #define PROCESS_MIDI_H #include "quantum.h" -#include "midi.h" +#ifdef MIDI_ENABLE + +#ifdef MIDI_BASIC +void process_midi_basic_noteon(uint8_t note); +void process_midi_basic_noteoff(uint8_t note); +void process_midi_basic_stop_all_notes(void); +#endif + +#ifdef MIDI_ADVANCED typedef union { uint32_t raw; struct { @@ -25,5 +33,8 @@ bool process_midi(uint16_t keycode, keyrecord_t *record); #define MIDI_TONE_COUNT (MIDI_TONE_MAX - MIDI_TONE_MIN + 1) uint8_t midi_compute_note(uint16_t keycode); +#endif // MIDI_ADVANCED + +#endif // MIDI_ENABLE #endif \ No newline at end of file diff --git a/quantum/process_keycode/process_music.c b/quantum/process_keycode/process_music.c index ac906b628..a1e270df1 100644 --- a/quantum/process_keycode/process_music.c +++ b/quantum/process_keycode/process_music.c @@ -1,5 +1,14 @@ #include "process_music.h" +#ifdef AUDIO_ENABLE +#include "process_audio.h" +#endif +#if defined(MIDI_ENABLE) && defined(MIDI_BASIC) +#include "process_midi.h" +#endif + +#if defined(AUDIO_ENABLE) || (defined(MIDI_ENABLE) && defined(MIDI_BASIC)) + bool music_activated = false; uint8_t music_starting_note = 0x0C; int music_offset = 7; @@ -8,38 +17,41 @@ int music_offset = 7; static bool music_sequence_recording = false; static bool music_sequence_recorded = false; static bool music_sequence_playing = false; -static float music_sequence[16] = {0}; +static uint8_t music_sequence[16] = {0}; static uint8_t music_sequence_count = 0; static uint8_t music_sequence_position = 0; static uint16_t music_sequence_timer = 0; static uint16_t music_sequence_interval = 100; -bool process_music(uint16_t keycode, keyrecord_t *record) { +static void music_noteon(uint8_t note) { + #ifdef AUDIO_ENABLE + process_audio_noteon(note); + #endif + #if defined(MIDI_ENABLE) && defined(MIDI_BASIC) + process_midi_basic_noteon(note); + #endif +} - #ifdef AUDIO_ENABLE - if (keycode == AU_ON && record->event.pressed) { - audio_on(); - return false; - } +static void music_noteoff(uint8_t note) { + #ifdef AUDIO_ENABLE + process_audio_noteoff(note); + #endif + #if defined(MIDI_ENABLE) && defined(MIDI_BASIC) + process_midi_basic_noteoff(note); + #endif +} - if (keycode == AU_OFF && record->event.pressed) { - audio_off(); - return false; - } +static void music_all_notes_off(void) { + #ifdef AUDIO_ENABLE + process_audio_stop_all_notes(); + #endif + #if defined(MIDI_ENABLE) && defined(MIDI_BASIC) + process_midi_basic_stop_all_notes(); + #endif +} - if (keycode == AU_TOG && record->event.pressed) { - if (is_audio_on()) - { - audio_off(); - } - else - { - audio_on(); - } - return false; - } - #endif // AUDIO_ENABLE +bool process_music(uint16_t keycode, keyrecord_t *record) { if (keycode == MU_ON && record->event.pressed) { music_on(); @@ -63,26 +75,10 @@ bool process_music(uint16_t keycode, keyrecord_t *record) { return false; } - #ifdef AUDIO_ENABLE - if (keycode == MUV_IN && record->event.pressed) { - voice_iterate(); - music_scale_user(); - return false; - } - - if (keycode == MUV_DE && record->event.pressed) { - voice_deiterate(); - music_scale_user(); - return false; - } - #endif // AUDIO_ENABLE - if (music_activated) { if (keycode == KC_LCTL && record->event.pressed) { // Start recording - #ifdef AUDIO_ENABLE - stop_all_notes(); - #endif + music_all_notes_off(); music_sequence_recording = true; music_sequence_recorded = false; music_sequence_playing = false; @@ -91,9 +87,7 @@ bool process_music(uint16_t keycode, keyrecord_t *record) { } if (keycode == KC_LALT && record->event.pressed) { // Stop recording/playing - #ifdef AUDIO_ENABLE - stop_all_notes(); - #endif + music_all_notes_off(); if (music_sequence_recording) { // was recording music_sequence_recorded = true; } @@ -103,9 +97,7 @@ bool process_music(uint16_t keycode, keyrecord_t *record) { } if (keycode == KC_LGUI && record->event.pressed && music_sequence_recorded) { // Start playing - #ifdef AUDIO_ENABLE - stop_all_notes(); - #endif + music_all_notes_off(); music_sequence_recording = false; music_sequence_playing = true; music_sequence_position = 0; @@ -124,32 +116,27 @@ bool process_music(uint16_t keycode, keyrecord_t *record) { music_sequence_interval+=10; return false; } + #define MUSIC_MODE_GUITAR - #ifdef AUDIO_ENABLE #ifdef MUSIC_MODE_CHROMATIC - float freq = ((float)220.0)*pow(2.0, -5.0)*pow(2.0,(music_starting_note + record->event.key.col + music_offset)/12.0+(MATRIX_ROWS - record->event.key.row)); + uint8_t note = (music_starting_note + record->event.key.col + music_offset - 3)+12*(MATRIX_ROWS - record->event.key.row); #elif defined(MUSIC_MODE_GUITAR) - float freq = ((float)220.0)*pow(2.0, -5.0)*pow(2.0,(music_starting_note + record->event.key.col + music_offset)/12.0+(float)(MATRIX_ROWS - record->event.key.row + 7)*5.0/12); + uint8_t note = (music_starting_note + record->event.key.col + music_offset + 32)+5*(MATRIX_ROWS - record->event.key.row); #elif defined(MUSIC_MODE_VIOLIN) - float freq = ((float)220.0)*pow(2.0, -5.0)*pow(2.0,(music_starting_note + record->event.key.col + music_offset)/12.0+(float)(MATRIX_ROWS - record->event.key.row + 5)*7.0/12); + uint8_t note = (music_starting_note + record->event.key.col + music_offset + 32)+7*(MATRIX_ROWS - record->event.key.row); #else - float freq = ((float)220.0)*pow(2.0, -5.0)*pow(2.0,(music_starting_note + SCALE[record->event.key.col + music_offset])/12.0+(MATRIX_ROWS - record->event.key.row)); + uint8_t note = (music_starting_note + SCALE[record->event.key.col + music_offset] - 3)+12*(MATRIX_ROWS - record->event.key.row); #endif - #endif // AUDIO_ENABLE if (record->event.pressed) { - #ifdef AUDIO_ENABLE - play_note(freq, 0xF); + music_noteon(note); if (music_sequence_recording) { - music_sequence[music_sequence_count] = freq; + music_sequence[music_sequence_count] = note; music_sequence_count++; } - #endif } else { - #ifdef AUDIO_ENABLE - stop_note(freq); - #endif + music_noteoff(note); } if (keycode < 0xFF) // ignores all normal keycodes, but lets RAISE, LOWER, etc through @@ -177,32 +164,26 @@ void music_on(void) { void music_off(void) { music_activated = 0; - #ifdef AUDIO_ENABLE - stop_all_notes(); - #endif + music_all_notes_off(); } - -__attribute__ ((weak)) -void music_on_user() {} - -#ifdef AUDIO_ENABLE -__attribute__ ((weak)) -void audio_on_user() {} -#endif - -__attribute__ ((weak)) -void music_scale_user() {} - void matrix_scan_music(void) { if (music_sequence_playing) { if ((music_sequence_timer == 0) || (timer_elapsed(music_sequence_timer) > music_sequence_interval)) { music_sequence_timer = timer_read(); - #ifdef AUDIO_ENABLE - stop_note(music_sequence[(music_sequence_position - 1 < 0)?(music_sequence_position - 1 + music_sequence_count):(music_sequence_position - 1)]); - play_note(music_sequence[music_sequence_position], 0xF); - #endif + uint8_t prev_note = music_sequence[(music_sequence_position - 1 < 0)?(music_sequence_position - 1 + music_sequence_count):(music_sequence_position - 1)]; + uint8_t next_note = music_sequence[music_sequence_position]; + music_noteoff(prev_note); + music_noteon(next_note); music_sequence_position = (music_sequence_position + 1) % music_sequence_count; } } } + +__attribute__ ((weak)) +void music_on_user() {} + +__attribute__ ((weak)) +void music_scale_user() {} + +#endif // defined(AUDIO_ENABLE) || (defined(MIDI_ENABLE) && defined(MIDI_BASIC)) \ No newline at end of file diff --git a/quantum/process_keycode/process_music.h b/quantum/process_keycode/process_music.h index 318b3e387..69913b276 100644 --- a/quantum/process_keycode/process_music.h +++ b/quantum/process_keycode/process_music.h @@ -3,6 +3,8 @@ #include "quantum.h" +#if defined(AUDIO_ENABLE) || (defined(MIDI_ENABLE) && defined(MIDI_BASIC)) + bool process_music(uint16_t keycode, keyrecord_t *record); bool is_music_on(void); @@ -10,7 +12,6 @@ void music_toggle(void); void music_on(void); void music_off(void); -void audio_on_user(void); void music_on_user(void); void music_scale_user(void); @@ -24,4 +25,6 @@ void matrix_scan_music(void); 0 + (12*4), 2 + (12*4), 4 + (12*4), 5 + (12*4), 7 + (12*4), 9 + (12*4), 11 + (12*4), } #endif +#endif // defined(AUDIO_ENABLE) || (defined(MIDI_ENABLE) && defined(MIDI_BASIC)) + #endif \ No newline at end of file diff --git a/quantum/quantum.c b/quantum/quantum.c index 83fa87708..7a27a568a 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -153,6 +153,9 @@ bool process_record_quantum(keyrecord_t *record) { #if defined(MIDI_ENABLE) && defined(MIDI_ADVANCED) process_midi(keycode, record) && #endif + #ifdef AUDIO_ENABLE + process_audio(keycode, record) && + #endif #if defined(AUDIO_ENABLE) || (defined(MIDI_ENABLE) && defined(MIDI_BASIC)) process_music(keycode, record) && #endif diff --git a/quantum/quantum.h b/quantum/quantum.h index 580d51202..77732d43f 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -35,11 +35,16 @@ extern uint32_t default_layer_state; #ifdef MIDI_ENABLE #include +#ifdef MIDI_ADVANCED #include "process_midi.h" #endif +#endif // MIDI_ENABLE #ifdef AUDIO_ENABLE - #include "audio.h" + #include "process_audio.h" +#endif + +#if defined(AUDIO_ENABLE) || (defined(MIDI_ENABLE) && defined(MIDI_BASIC)) #include "process_music.h" #endif -- cgit v1.2.3 From ea14ed122fb5c1b3be5f5d6edda9b39b151692e5 Mon Sep 17 00:00:00 2001 From: Gabriel Young Date: Sat, 25 Feb 2017 19:37:33 -0800 Subject: Add basic layer to sample MIDI keycap --- keyboards/satan/keymaps/midi/keymap.c | 23 ++++++++++++++++++++++- quantum/process_keycode/process_audio.c | 2 +- quantum/process_keycode/process_music.c | 3 ++- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/keyboards/satan/keymaps/midi/keymap.c b/keyboards/satan/keymaps/midi/keymap.c index 349391c3b..8378b4e4b 100644 --- a/keyboards/satan/keymaps/midi/keymap.c +++ b/keyboards/satan/keymaps/midi/keymap.c @@ -33,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, TG(_ML), KC_RCTL), #if defined(MIDI_ENABLE) && defined(MIDI_ADVANCED) -/* Keymap _ML: MIDI Layer +/* Keymap _ML: MIDI Layer (Advanced) * ,------------------------------------------------------------------------. * | Exit | | | | | | | | | | | | | | * |------------------------------------------------------------------------| @@ -52,5 +52,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { MI_MOD, MI_C, MI_D, MI_E, MI_F, MI_G, MI_A, MI_B, MI_C_1, MI_D_1, MI_E_1, MI_F_1, _______, \ MI_SUS, MI_OCTD, MI_OCTU, MI_MODSD, MI_MODSU, XXXXXXX, XXXXXXX, XXXXXXX, MI_TRNSD, MI_TRNSU, MI_TRNS_0, MI_SUS, \ _______, _______, _______, MI_ALLOFF, _______, _______, _______, _______), +#elif defined(MIDI_ENABLE) && defined(MIDI_BASIC) +/* Keymap _ML: MIDI Layer (Advanced) + * ,------------------------------------------------------------------------. + * | Exit | | | | | | | | | | | | | | + * |------------------------------------------------------------------------| + * | | | | | | | | | | | | | | | + * |------------------------------------------------------------------------| + * | | | | | | | | | | | | | | + * |------------------------------------------------------------------------| + * | |MuOn|MuOf|MiOn|MiOf| | | | | | | | + * |------------------------------------------------------------------------| + * | | | | | | | | | + * `------------------------------------------------------------------------' + */ + +[_ML] = KEYMAP_ANSI( + TG(_ML), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______), #endif }; \ No newline at end of file diff --git a/quantum/process_keycode/process_audio.c b/quantum/process_keycode/process_audio.c index 5b5da546e..d45242c9e 100644 --- a/quantum/process_keycode/process_audio.c +++ b/quantum/process_keycode/process_audio.c @@ -28,7 +28,7 @@ bool process_audio(uint16_t keycode, keyrecord_t *record) { { audio_on(); } - return false; + return false; } if (keycode == MUV_IN && record->event.pressed) { diff --git a/quantum/process_keycode/process_music.c b/quantum/process_keycode/process_music.c index a1e270df1..43bcf973e 100644 --- a/quantum/process_keycode/process_music.c +++ b/quantum/process_keycode/process_music.c @@ -142,7 +142,8 @@ bool process_music(uint16_t keycode, keyrecord_t *record) { if (keycode < 0xFF) // ignores all normal keycodes, but lets RAISE, LOWER, etc through return false; } - return true; + + return true; } bool is_music_on(void) { -- cgit v1.2.3 From a64ae1066250d3aafb6e9670bf617237ec4338e7 Mon Sep 17 00:00:00 2001 From: Gabriel Young Date: Sat, 25 Feb 2017 20:41:13 -0800 Subject: Update existing keymaps Update existing keymaps to enable MIDI_BASIC functionality. Also added an option MIDI_ENABLE_STRICT to be strict about keycode use (which also reduces memory footprint at runtime) --- keyboards/planck/keymaps/dbroqua/config.h | 29 +++++++++++++++++++++++ keyboards/planck/keymaps/default/config.h | 29 +++++++++++++++++++++++ keyboards/planck/keymaps/experimental/config.h | 23 ++++++++++++++++++ keyboards/planck/keymaps/impossible/config.h | 29 +++++++++++++++++++++++ keyboards/planck/keymaps/jeebak/config.h | 29 +++++++++++++++++++++++ keyboards/planck/keymaps/jhenahan/config.h | 23 ++++++++++++++++++ keyboards/planck/keymaps/premek/config.h | 29 +++++++++++++++++++++++ keyboards/planck/keymaps/sgoodwin/config.h | 29 +++++++++++++++++++++++ keyboards/planck/keymaps/smt/config.h | 29 +++++++++++++++++++++++ keyboards/planck/keymaps/thermal_printer/config.h | 23 ++++++++++++++++++ keyboards/planck/keymaps/unicode/config.h | 29 +++++++++++++++++++++++ keyboards/planck/keymaps/xyverz/config.h | 29 +++++++++++++++++++++++ keyboards/preonic/keymaps/CMD-Preonic/config.h | 29 +++++++++++++++++++++++ keyboards/preonic/keymaps/default/config.h | 29 +++++++++++++++++++++++ keyboards/preonic/keymaps/smt/config.h | 29 +++++++++++++++++++++++ keyboards/satan/keymaps/midi/config.h | 3 +++ keyboards/subatomic/keymaps/default/config.h | 29 +++++++++++++++++++++++ quantum/process_keycode/process_audio.c | 4 ++-- quantum/process_keycode/process_music.c | 2 +- quantum/process_keycode/process_music.h | 1 + quantum/quantum.c | 4 ++-- quantum/quantum_keycodes.h | 28 +++++++++++----------- quantum/template/config.h | 3 +++ 23 files changed, 472 insertions(+), 19 deletions(-) create mode 100644 keyboards/planck/keymaps/dbroqua/config.h create mode 100644 keyboards/planck/keymaps/default/config.h create mode 100644 keyboards/planck/keymaps/impossible/config.h create mode 100644 keyboards/planck/keymaps/jeebak/config.h create mode 100644 keyboards/planck/keymaps/premek/config.h create mode 100644 keyboards/planck/keymaps/sgoodwin/config.h create mode 100644 keyboards/planck/keymaps/smt/config.h create mode 100644 keyboards/planck/keymaps/unicode/config.h create mode 100644 keyboards/planck/keymaps/xyverz/config.h create mode 100644 keyboards/preonic/keymaps/CMD-Preonic/config.h create mode 100644 keyboards/preonic/keymaps/default/config.h create mode 100644 keyboards/preonic/keymaps/smt/config.h create mode 100644 keyboards/subatomic/keymaps/default/config.h diff --git a/keyboards/planck/keymaps/dbroqua/config.h b/keyboards/planck/keymaps/dbroqua/config.h new file mode 100644 index 000000000..4c6158199 --- /dev/null +++ b/keyboards/planck/keymaps/dbroqua/config.h @@ -0,0 +1,29 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +#endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/default/config.h b/keyboards/planck/keymaps/default/config.h new file mode 100644 index 000000000..4c6158199 --- /dev/null +++ b/keyboards/planck/keymaps/default/config.h @@ -0,0 +1,29 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +#endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/experimental/config.h b/keyboards/planck/keymaps/experimental/config.h index cc093bee4..492490ca1 100644 --- a/keyboards/planck/keymaps/experimental/config.h +++ b/keyboards/planck/keymaps/experimental/config.h @@ -14,4 +14,27 @@ #define RGBLIGHT_HUE_STEP 10 #define RGBLIGHT_SAT_STEP 17 +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + #endif diff --git a/keyboards/planck/keymaps/impossible/config.h b/keyboards/planck/keymaps/impossible/config.h new file mode 100644 index 000000000..4c6158199 --- /dev/null +++ b/keyboards/planck/keymaps/impossible/config.h @@ -0,0 +1,29 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +#endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/jeebak/config.h b/keyboards/planck/keymaps/jeebak/config.h new file mode 100644 index 000000000..4c6158199 --- /dev/null +++ b/keyboards/planck/keymaps/jeebak/config.h @@ -0,0 +1,29 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +#endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/jhenahan/config.h b/keyboards/planck/keymaps/jhenahan/config.h index cd3adc41c..1e42b92b9 100644 --- a/keyboards/planck/keymaps/jhenahan/config.h +++ b/keyboards/planck/keymaps/jhenahan/config.h @@ -6,4 +6,27 @@ #define FORCE_NKRO #define WORKMAN_SOUND COLEMAK_SOUND +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + #endif diff --git a/keyboards/planck/keymaps/premek/config.h b/keyboards/planck/keymaps/premek/config.h new file mode 100644 index 000000000..4c6158199 --- /dev/null +++ b/keyboards/planck/keymaps/premek/config.h @@ -0,0 +1,29 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +#endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/sgoodwin/config.h b/keyboards/planck/keymaps/sgoodwin/config.h new file mode 100644 index 000000000..4c6158199 --- /dev/null +++ b/keyboards/planck/keymaps/sgoodwin/config.h @@ -0,0 +1,29 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +#endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/smt/config.h b/keyboards/planck/keymaps/smt/config.h new file mode 100644 index 000000000..4c6158199 --- /dev/null +++ b/keyboards/planck/keymaps/smt/config.h @@ -0,0 +1,29 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +#endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/thermal_printer/config.h b/keyboards/planck/keymaps/thermal_printer/config.h index 430b6493c..bcd098930 100644 --- a/keyboards/planck/keymaps/thermal_printer/config.h +++ b/keyboards/planck/keymaps/thermal_printer/config.h @@ -20,4 +20,27 @@ sei(); \ } while(0) +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + #endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/unicode/config.h b/keyboards/planck/keymaps/unicode/config.h new file mode 100644 index 000000000..4c6158199 --- /dev/null +++ b/keyboards/planck/keymaps/unicode/config.h @@ -0,0 +1,29 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +#endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/xyverz/config.h b/keyboards/planck/keymaps/xyverz/config.h new file mode 100644 index 000000000..4c6158199 --- /dev/null +++ b/keyboards/planck/keymaps/xyverz/config.h @@ -0,0 +1,29 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +#endif \ No newline at end of file diff --git a/keyboards/preonic/keymaps/CMD-Preonic/config.h b/keyboards/preonic/keymaps/CMD-Preonic/config.h new file mode 100644 index 000000000..4c6158199 --- /dev/null +++ b/keyboards/preonic/keymaps/CMD-Preonic/config.h @@ -0,0 +1,29 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +#endif \ No newline at end of file diff --git a/keyboards/preonic/keymaps/default/config.h b/keyboards/preonic/keymaps/default/config.h new file mode 100644 index 000000000..4c6158199 --- /dev/null +++ b/keyboards/preonic/keymaps/default/config.h @@ -0,0 +1,29 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +#endif \ No newline at end of file diff --git a/keyboards/preonic/keymaps/smt/config.h b/keyboards/preonic/keymaps/smt/config.h new file mode 100644 index 000000000..4c6158199 --- /dev/null +++ b/keyboards/preonic/keymaps/smt/config.h @@ -0,0 +1,29 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +#endif \ No newline at end of file diff --git a/keyboards/satan/keymaps/midi/config.h b/keyboards/satan/keymaps/midi/config.h index 59250b49e..8e10b04ec 100644 --- a/keyboards/satan/keymaps/midi/config.h +++ b/keyboards/satan/keymaps/midi/config.h @@ -7,6 +7,9 @@ * MIDI options */ +/* Prevent use of disabled MIDI features in the keymap */ +#define MIDI_ENABLE_STRICT 1 + /* enable basic MIDI features: - MIDI notes can be sent when in Music mode is on */ diff --git a/keyboards/subatomic/keymaps/default/config.h b/keyboards/subatomic/keymaps/default/config.h new file mode 100644 index 000000000..4c6158199 --- /dev/null +++ b/keyboards/subatomic/keymaps/default/config.h @@ -0,0 +1,29 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +#endif \ No newline at end of file diff --git a/quantum/process_keycode/process_audio.c b/quantum/process_keycode/process_audio.c index d45242c9e..71c0297ee 100644 --- a/quantum/process_keycode/process_audio.c +++ b/quantum/process_keycode/process_audio.c @@ -1,5 +1,5 @@ -#include "process_audio.h" #include "audio.h" +#include "process_audio.h" static float compute_freq_for_midi_note(uint8_t note) { @@ -43,7 +43,7 @@ bool process_audio(uint16_t keycode, keyrecord_t *record) { return false; } - return true + return true; } void process_audio_noteon(uint8_t note) { diff --git a/quantum/process_keycode/process_music.c b/quantum/process_keycode/process_music.c index 43bcf973e..4b86b91f0 100644 --- a/quantum/process_keycode/process_music.c +++ b/quantum/process_keycode/process_music.c @@ -42,7 +42,7 @@ static void music_noteoff(uint8_t note) { #endif } -static void music_all_notes_off(void) { +void music_all_notes_off(void) { #ifdef AUDIO_ENABLE process_audio_stop_all_notes(); #endif diff --git a/quantum/process_keycode/process_music.h b/quantum/process_keycode/process_music.h index 69913b276..a36514a44 100644 --- a/quantum/process_keycode/process_music.h +++ b/quantum/process_keycode/process_music.h @@ -14,6 +14,7 @@ void music_off(void); void music_on_user(void); void music_scale_user(void); +void music_all_notes_off(void); void matrix_scan_music(void); diff --git a/quantum/quantum.c b/quantum/quantum.c index 7a27a568a..a4a12061b 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -95,8 +95,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { void reset_keyboard(void) { clear_keyboard(); -#ifdef AUDIO_ENABLE - stop_all_notes(); +#if defined(AUDIO_ENABLE) || (defined(MIDI_ENABLE) && defined(MIDI_ENABLE_BASIC)) + music_all_notes_off(); shutdown_user(); #endif wait_ms(250); diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 3b82b7208..56228f276 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -1,8 +1,11 @@ - #ifndef QUANTUM_KEYCODES_H #define QUANTUM_KEYCODES_H -#if defined(MIDI_ENABLE) && defined(MIDI_ADVANCED) +#ifndef MIDI_ENABLE_STRICT +#define MIDI_ENABLE_STRICT 0 +#endif + +#if !MIDI_ENABLE_STRICT || (defined(MIDI_ENABLE) && defined(MIDI_ADVANCED)) #ifndef MIDI_TONE_KEYCODE_OCTAVES #define MIDI_TONE_KEYCODE_OCTAVES 3 #endif @@ -113,18 +116,16 @@ enum quantum_keycodes { MUV_IN, MUV_DE, -#ifdef MIDI_ENABLE // Midi - -#ifdef MIDI_BASIC +#if !MIDI_ENABLE_STRICT || (defined(MIDI_ENABLE) && defined(MIDI_BASIC)) MI_ON, // send midi notes when music mode is enabled MI_OFF, // don't send midi notes when music mode is enabled #endif -#ifdef MIDI_ADVANCED +#if !MIDI_ENABLE_STRICT || (defined(MIDI_ENABLE) && defined(MIDI_ADVANCED)) MIDI_TONE_MIN, -#if MIDI_TONE_KEYCODE_OCTAVES > 0 +#if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 0 MI_C = MIDI_TONE_MIN, MI_Cs, MI_Db = MI_Cs, @@ -144,7 +145,7 @@ enum quantum_keycodes { MI_B, #endif -#if MIDI_TONE_KEYCODE_OCTAVES > 1 +#if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 1 MI_C_1, MI_Cs_1, MI_Db_1 = MI_Cs_1, @@ -164,7 +165,7 @@ enum quantum_keycodes { MI_B_1, #endif -#if MIDI_TONE_KEYCODE_OCTAVES > 2 +#if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 2 MI_C_2, MI_Cs_2, MI_Db_2 = MI_Cs_2, @@ -184,7 +185,7 @@ enum quantum_keycodes { MI_B_2, #endif -#if MIDI_TONE_KEYCODE_OCTAVES > 3 +#if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 3 MI_C_3, MI_Cs_3, MI_Db_3 = MI_Cs_3, @@ -204,7 +205,7 @@ enum quantum_keycodes { MI_B_3, #endif -#if MIDI_TONE_KEYCODE_OCTAVES > 4 +#if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 4 MI_C_4, MI_Cs_4, MI_Db_4 = MI_Cs_4, @@ -224,7 +225,7 @@ enum quantum_keycodes { MI_B_4, #endif -#if MIDI_TONE_KEYCODE_OCTAVES > 5 +#if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 5 MI_C_5, MI_Cs_5, MI_Db_5 = MI_Cs_5, @@ -244,7 +245,7 @@ enum quantum_keycodes { MI_B_5, #endif -#if MIDI_TONE_KEYCODE_OCTAVES > 5 +#if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 5 MIDI_TONE_MAX = MI_B_5, #elif MIDI_TONE_KEYCODE_OCTAVES > 4 MIDI_TONE_MAX = MI_B_4, @@ -339,7 +340,6 @@ enum quantum_keycodes { MI_MODSD, // decrease modulation speed MI_MODSU, // increase modulation speed #endif // MIDI_ADVANCED -#endif // MIDI_ENABLE // Backlight functionality BL_0, diff --git a/quantum/template/config.h b/quantum/template/config.h index 54db4f242..7393097e1 100644 --- a/quantum/template/config.h +++ b/quantum/template/config.h @@ -163,6 +163,9 @@ along with this program. If not, see . * MIDI options */ +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + /* enable basic MIDI features: - MIDI notes can be sent when in Music mode is on */ -- cgit v1.2.3 From b911e1966f6e9077df01c01d77b4e2018b582eb0 Mon Sep 17 00:00:00 2001 From: Gabriel Young Date: Sat, 25 Feb 2017 21:13:47 -0800 Subject: Fix redundant process_music.c in sources --- build_keyboard.mk | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/build_keyboard.mk b/build_keyboard.mk index 07dfe85b4..82464d583 100644 --- a/build_keyboard.mk +++ b/build_keyboard.mk @@ -23,9 +23,9 @@ ifdef master MASTER = $(master) endif -ifeq ($(MASTER),right) +ifeq ($(MASTER),right) OPT_DEFS += -DMASTER_IS_ON_RIGHT -else +else ifneq ($(MASTER),left) $(error MASTER does not have a valid value(left/right)) endif @@ -38,7 +38,7 @@ KEYBOARD_C := $(KEYBOARD_PATH)/$(KEYBOARD).c ifneq ("$(wildcard $(KEYBOARD_C))","") include $(KEYBOARD_PATH)/rules.mk -else +else $(error "$(KEYBOARD_C)" does not exist) endif @@ -49,7 +49,7 @@ ifneq ($(SUBPROJECT),) ifneq ("$(wildcard $(SUBPROJECT_C))","") OPT_DEFS += -DSUBPROJECT_$(SUBPROJECT) include $(SUBPROJECT_PATH)/rules.mk - else + else $(error "$(SUBPROJECT_PATH)/$(SUBPROJECT).c" does not exist) endif endif @@ -83,7 +83,7 @@ ifneq ($(SUBPROJECT),) endif endif -# Save the defines and includes here, so we don't include any keymap specific ones +# Save the defines and includes here, so we don't include any keymap specific ones PROJECT_DEFS := $(OPT_DEFS) PROJECT_INC := $(VPATH) $(EXTRAINCDIRS) $(SUBPROJECT_PATH) $(KEYBOARD_PATH) PROJECT_CONFIG := $(CONFIG_H) @@ -139,12 +139,27 @@ ifeq ($(strip $(API_SYSEX_ENABLE)), yes) MIDI_ENABLE=yes endif +MUSIC_ENABLE := 0 + +ifeq ($(strip $(AUDIO_ENABLE)), yes) + OPT_DEFS += -DAUDIO_ENABLE + MUSIC_ENABLE := 1 + SRC += $(QUANTUM_DIR)/process_keycode/process_audio.c + SRC += $(QUANTUM_DIR)/audio/audio.c + SRC += $(QUANTUM_DIR)/audio/voices.c + SRC += $(QUANTUM_DIR)/audio/luts.c +endif + ifeq ($(strip $(MIDI_ENABLE)), yes) OPT_DEFS += -DMIDI_ENABLE - SRC += $(QUANTUM_DIR)/process_keycode/process_music.c + MUSIC_ENABLE := 1 SRC += $(QUANTUM_DIR)/process_keycode/process_midi.c endif +ifeq ($(MUSIC_ENABLE), 1) + SRC += $(QUANTUM_DIR)/process_keycode/process_music.c +endif + ifeq ($(strip $(COMBO_ENABLE)), yes) OPT_DEFS += -DCOMBO_ENABLE SRC += $(QUANTUM_DIR)/process_keycode/process_combo.c @@ -154,15 +169,6 @@ ifeq ($(strip $(VIRTSER_ENABLE)), yes) OPT_DEFS += -DVIRTSER_ENABLE endif -ifeq ($(strip $(AUDIO_ENABLE)), yes) - OPT_DEFS += -DAUDIO_ENABLE - SRC += $(QUANTUM_DIR)/process_keycode/process_music.c - SRC += $(QUANTUM_DIR)/process_keycode/process_audio.c - SRC += $(QUANTUM_DIR)/audio/audio.c - SRC += $(QUANTUM_DIR)/audio/voices.c - SRC += $(QUANTUM_DIR)/audio/luts.c -endif - ifeq ($(strip $(FAUXCLICKY_ENABLE)), yes) OPT_DEFS += -DFAUXCLICKY_ENABLE SRC += $(QUANTUM_DIR)/fauxclicky.c @@ -252,7 +258,7 @@ endif OUTPUTS := $(KEYMAP_OUTPUT) $(KEYBOARD_OUTPUT) $(KEYMAP_OUTPUT)_SRC := $(SRC) -$(KEYMAP_OUTPUT)_DEFS := $(OPT_DEFS) -DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYMAP=\"$(KEYMAP)\" +$(KEYMAP_OUTPUT)_DEFS := $(OPT_DEFS) -DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYMAP=\"$(KEYMAP)\" $(KEYMAP_OUTPUT)_INC := $(VPATH) $(EXTRAINCDIRS) $(KEYMAP_OUTPUT)_CONFIG := $(CONFIG_H) $(KEYBOARD_OUTPUT)_SRC := $(CHIBISRC) -- cgit v1.2.3 From 976c856966841cd0be6e514c6365c73164f5b96d Mon Sep 17 00:00:00 2001 From: Gabriel Young Date: Sat, 25 Feb 2017 21:38:35 -0800 Subject: Update size estimates in the Makefile MIDI_ENABLE = no text data bss dec hex filename 0 17080 0 17080 42b8 satan_midi.hex MIDI_ENABLE = yes MIDI_BASIC undefined MIDI_ADVANCED undefined text data bss dec hex filename 0 19494 0 19494 4c26 satan_midi.hex +2414 bytes (vs. MIDI_ENABLE = no) MIDI_ENABLE = yes 0 20846 0 20846 516e satan_midi.hex +1352 bytes (vs. MIDI_ENABLE = yes, MIDI_BASIC off, MIDI_ADVANCED off) MIDI_ENABLE = yes #define MIDI_BASIC #define MIDI_ADVANCED text data bss dec hex filename 0 21292 0 21292 532c satan_midi.hex +1798 bytes (vs. MIDI_ENABLE = yes, MIDI_BASIC off, MIDI_ADVANCED off) Conclusion: +2400 to 4200, depending on config --- keyboards/satan/keymaps/midi/Makefile | 2 +- quantum/template/rules.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/satan/keymaps/midi/Makefile b/keyboards/satan/keymaps/midi/Makefile index 4e2d9d2f7..89c34b394 100644 --- a/keyboards/satan/keymaps/midi/Makefile +++ b/keyboards/satan/keymaps/midi/Makefile @@ -9,7 +9,7 @@ CONSOLE_ENABLE = no # 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 = yes # Enable keyboard backlight functionality -MIDI_ENABLE = yes # MIDI support (+3800) +MIDI_ENABLE = yes # MIDI support (+2400 to 4200, depending on config) AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/quantum/template/rules.mk b/quantum/template/rules.mk index bad3387bf..a1f9377d8 100644 --- a/quantum/template/rules.mk +++ b/quantum/template/rules.mk @@ -61,7 +61,7 @@ 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 ?= no # USB Nkey Rollover BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE ?= no # MIDI controls +MIDI_ENABLE ?= no # MIDI support (+2400 to 4200, depending on config) UNICODE_ENABLE ?= no # Unicode BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE ?= no # Audio output on port C6 -- cgit v1.2.3 From 138b89e1a169290b783548085c64f8dd13cc4175 Mon Sep 17 00:00:00 2001 From: Date: Mon, 27 Feb 2017 00:16:55 +0100 Subject: Add colemak_programmer --- .../ergodox/keymaps/colemak_programmer/Makefile | 1 + .../colemak_programmer/colemak_programmer_001.jpg | Bin 0 -> 301259 bytes .../colemak_programmer/colemak_programmer_002.jpg | Bin 0 -> 235864 bytes .../ergodox/keymaps/colemak_programmer/keymap.c | 256 +++++++++++++++++++++ .../ergodox/keymaps/colemak_programmer/readme.md | 21 ++ 5 files changed, 278 insertions(+) create mode 100644 keyboards/ergodox/keymaps/colemak_programmer/Makefile create mode 100644 keyboards/ergodox/keymaps/colemak_programmer/colemak_programmer_001.jpg create mode 100644 keyboards/ergodox/keymaps/colemak_programmer/colemak_programmer_002.jpg create mode 100644 keyboards/ergodox/keymaps/colemak_programmer/keymap.c create mode 100644 keyboards/ergodox/keymaps/colemak_programmer/readme.md diff --git a/keyboards/ergodox/keymaps/colemak_programmer/Makefile b/keyboards/ergodox/keymaps/colemak_programmer/Makefile new file mode 100644 index 000000000..91b77c77a --- /dev/null +++ b/keyboards/ergodox/keymaps/colemak_programmer/Makefile @@ -0,0 +1 @@ +TAP_DANCE_ENABLE = no \ No newline at end of file diff --git a/keyboards/ergodox/keymaps/colemak_programmer/colemak_programmer_001.jpg b/keyboards/ergodox/keymaps/colemak_programmer/colemak_programmer_001.jpg new file mode 100644 index 000000000..de24d9373 Binary files /dev/null and b/keyboards/ergodox/keymaps/colemak_programmer/colemak_programmer_001.jpg differ diff --git a/keyboards/ergodox/keymaps/colemak_programmer/colemak_programmer_002.jpg b/keyboards/ergodox/keymaps/colemak_programmer/colemak_programmer_002.jpg new file mode 100644 index 000000000..15f8ec8c4 Binary files /dev/null and b/keyboards/ergodox/keymaps/colemak_programmer/colemak_programmer_002.jpg differ diff --git a/keyboards/ergodox/keymaps/colemak_programmer/keymap.c b/keyboards/ergodox/keymaps/colemak_programmer/keymap.c new file mode 100644 index 000000000..1caccc5c2 --- /dev/null +++ b/keyboards/ergodox/keymaps/colemak_programmer/keymap.c @@ -0,0 +1,256 @@ +#include "ergodox.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * MEH: Alt+Control+Shift + * HYPER: Alt+Control+Shift+Gui + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ` ~ | 1 ! | 2 @ | 3 # | 4 $ | 5 % | 6 ^ | | 7 & | 8 * | 9 ( | 0 ) | - _ | = + | Backsp | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | TAB | Q | W | F | P | G |TG(3) | |TG(4) | J | L | U | Y | ; : | ' " | + * |--------+------+------+------+------+------|F-lck | |N-lck |------+------+------+------+------+--------| + * | CAPS | A | R | S | T | D |------| |------| H | N | E | I | O | ENT | + * |--------+------+------+------+------+------| MEH | | MEH |------+------+------+------+------+--------| + * | Shift | Z | X | C | V | B | | | | K | M | , < | . > | UP | Shift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | LCTL | LCTL | LGUI | LALT | LGUI | | RALT | RCTL | LEFT | DOWN | RIGHT| + * `----------------------------------' `----------------------------------' + * ,--------------. ,--------------. + * | Esc | App | | Ins | Del | + * ,------|------|-------| |------+-------+------. + * | | | Home | | PgUp | | | + * | MO(2)| MO(4)|-------| |------| Space |Space | + * |symbol|N-Lock| End | | PgDn | | | + * `---------------------' `---------------------' + */ +[0] = KEYMAP( // layer 0 : default + // left hand + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, TG(3), + KC_CAPS, KC_A, KC_R, KC_S, KC_T, KC_D, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MEH, + KC_LCTL, KC_LCTL, KC_LGUI, KC_LALT, KC_LGUI, + + KC_ESC, KC_APP, + KC_HOME, + MO(2), MO(4), KC_END, + + // right hand + KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + TG(4), KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_QUOT, + KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT, + KC_MEH, KC_K, KC_M, KC_COMM, KC_DOT, KC_UP, KC_RSFT, + KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT, + + KC_INS, KC_DEL, + KC_PGUP, + KC_PGDN, KC_SPC, KC_SPC + ), + +/* Keymap 1: QWERTY layer (games) + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | Q | W | E | R | T | | | | Y | U | I | O | P | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | A | S | D | F | G |------| |------| H | J | K | L | ; | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | Z | X | C | V | B | | | | N | M | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+--------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `----------------------' + */ +[1] = KEYMAP( // layer 1: QWERTY layer (games) + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TRNS, + KC_TRNS, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_TRNS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_TRNS, + KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_TRNS, + KC_TRNS, KC_N, KC_M, 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 + ), + +/* Keymap 2: Symbol Layer +* +* ,--------------------------------------------------. ,--------------------------------------------------. +* | | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | | +* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| +* | | | | + | < | % | # | DF(1)| | | & | [ | ] | \ | : | " | +* |--------+------+------+------+------+------|QWERTY| | |------+------+------+------+------+--------| +* | | ! | - | > | = | @ |------| |------| * | { | } | / | ? | | +* |--------+------+------+------+------+------| DF(0)| | |------+------+------+------+------+--------| +* | | NUBS | NUHS | / | $ | ^ |COLEMAK | | | | ( | ) | | | | +* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' +* | | | | | | | | | | | | +* `----------------------------------' `----------------------------------' +* ,-------------. ,-------------. +* | | | | | | +* ,------|------|------| |------+------+------. +* | | | | | | | | +* | | |------| |------| | | +* | | | | | | | | +* `--------------------' `--------------------' +*/ +// SYMBOLS +[2] = KEYMAP( + // left hand + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + KC_TRNS, KC_PIPE, KC_PLUS, KC_LT, KC_PERC, KC_HASH, DF(1), + KC_LBRC, KC_EXCLAIM, KC_MINUS, KC_GT, KC_EQUAL, KC_AT, + KC_TRNS, KC_NUBS, KC_NUHS, KC_SLSH, KC_DOLLAR, KC_CIRC, DF(0), + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + + // right hand + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, + KC_TRNS, KC_AMPERSAND, KC_LBRC, KC_RBRC, KC_BSLS, KC_COLN, KC_DQT, + KC_ASTERISK, KC_LCBR, KC_RCBR, KC_SLSH, KC_QUES, KC_TRNS, + KC_TRNS, KC_PIPE, KC_LPRN, KC_RPRN, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), + +/* Keymap 3: + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | HYPR | | HYPR | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------ |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// F-keys +[3] = KEYMAP( + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HYPR, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + + // right hand + 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_HYPR, 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, KC_TRNS, KC_TRNS +), +/* Keymap 4: Numlock + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | RESET | | | |P-SCRE|S-LOCK|PAUSE | |NLOCK | CALC | = | / | * | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | Vol+ | 7 | 8 | 9 | - | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| Vol- | 4 | 5 | 6 | + | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | HYPR | | HYPR | Mute | 1 | 2 | 3 |Enter | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | 0 | . | RCTL | RCTL | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------ |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[4] = KEYMAP( + RESET, KC_LSFT, KC_LSFT, KC_SYSREQ, KC_PSCR, KC_SLCK, KC_PAUSE, + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HYPR, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + + // right hand + KC_NLCK, KC_CALC, KC_PEQL, KC_PSLS, KC_PAST, KC_LSFT, KC_TRNS, + KC_TRNS, KC_VOLU, KC_P7, KC_P8, KC_P9, KC_PMNS, KC_TRNS, + KC_VOLD, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_TRNS, + KC_HYPR, KC_MUTE, KC_P1, KC_P2, KC_P3, KC_PENT, KC_TRNS, + KC_TRNS, KC_P0, KC_PDOT, KC_RCTL, KC_RCTL, + + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), + +}; + + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + static uint8_t state; + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + + //reduce LED on time to 1/6th because LEDs are too strong + if (++state < 6) return; + state = 0; + + //bit 1: default layer 1 - QWERTY + if (default_layer_state & (1UL << 1)) ergodox_right_led_1_on(); + + uint8_t layer = biton32(layer_state); + + //layer 2 : Symbols (& Fs) + //if (layer == 2) ergodox_right_led_2_on(); + + //layer 3 : F-lock + if (layer == 3) ergodox_right_led_2_on(); + + //layer 4 : Num-lock + if (layer == 4) ergodox_right_led_3_on(); +}; diff --git a/keyboards/ergodox/keymaps/colemak_programmer/readme.md b/keyboards/ergodox/keymaps/colemak_programmer/readme.md new file mode 100644 index 000000000..fae5e3553 --- /dev/null +++ b/keyboards/ergodox/keymaps/colemak_programmer/readme.md @@ -0,0 +1,21 @@ +# ErgoDox EZ colemak_programmer + +## Features + +* Qwerty and colemak 2 in 1 + * Use DF() macro to swap the bottom layer so it behaves literally as collemak or qwerty + * Graphical creator did not allow this so I had to use TO(0) and TO(1) on the picture +* Symbol layer programmers friendly + * Not only symbols are easy to access but common combination are easy too: ->, =>, !=, etc. +* Windows and Mac + * The extra repeated Win key is very handy on Mac +* Numlock + +I came to this layout after several iterations. It is not the ultimate best ergonomic layout but it is the best if you switch back and forth between ergodox and laptops. + +## Notes +* The Quote and Enter can be swapped +* If you use sculpted key caps try turning the bottom key 180 degrees so it became very comfortable to type with thumb. + +![Default](colemak_programer_001.jpg) +![Default](colemak_programer_002.jpg) \ No newline at end of file -- cgit v1.2.3 From bbbd49a1754c9b8cf2f69ca427fa5fe5630644f4 Mon Sep 17 00:00:00 2001 From: Date: Mon, 27 Feb 2017 00:27:57 +0100 Subject: Ammend readme.md --- keyboards/ergodox/keymaps/colemak_programmer/readme.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/keyboards/ergodox/keymaps/colemak_programmer/readme.md b/keyboards/ergodox/keymaps/colemak_programmer/readme.md index fae5e3553..db0cc5777 100644 --- a/keyboards/ergodox/keymaps/colemak_programmer/readme.md +++ b/keyboards/ergodox/keymaps/colemak_programmer/readme.md @@ -17,5 +17,7 @@ I came to this layout after several iterations. It is not the ultimate best ergo * The Quote and Enter can be swapped * If you use sculpted key caps try turning the bottom key 180 degrees so it became very comfortable to type with thumb. -![Default](colemak_programer_001.jpg) -![Default](colemak_programer_002.jpg) \ No newline at end of file +Alternatively view the [graphical creator version](http://configure.ergodox-ez.com/keyboard_layouts/kmevwm/edit) but beware it is not the same due to the creator limitations. + +![Default](colemak_programmer_001.jpg) +![Default](colemak_programmer_002.jpg) \ No newline at end of file -- cgit v1.2.3 From c370c1e1f3c27027c0a6513d34a749a1a88603fc Mon Sep 17 00:00:00 2001 From: Gunther Gruber Date: Mon, 27 Feb 2017 09:48:58 +0100 Subject: guni keymap --- keyboard/ergodox_ez/keymaps/guni/keymap.c | 176 ++++++++++++++++++++++++++++++ 1 file changed, 176 insertions(+) create mode 100644 keyboard/ergodox_ez/keymaps/guni/keymap.c diff --git a/keyboard/ergodox_ez/keymaps/guni/keymap.c b/keyboard/ergodox_ez/keymaps/guni/keymap.c new file mode 100644 index 000000000..fc8567e68 --- /dev/null +++ b/keyboard/ergodox_ez/keymaps/guni/keymap.c @@ -0,0 +1,176 @@ +#include "ergodox_ez.h" +#include "debug.h" +#include "action_layer.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + KEYMAP( // layer 0 : default + // left hand + KC_EQL , KC_1, KC_2, KC_3, KC_4, KC_5, KC_LBRC, + KC_FN25 , KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HOME, + KC_FN27 , KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PGUP, + KC_LGUI , KC_GRV,KC_LEFT,KC_RGHT,KC_LALT, + KC_NO , KC_NO , + KC_NO , + KC_BSPC,KC_DEL ,KC_FN23, + // right hand + KC_RBRC , KC_6, KC_7 , KC_8, KC_9, KC_0, KC_MINS, + KC_END , KC_Y, KC_U , KC_I, KC_O, KC_P, KC_FN28, + KC_H , KC_J, KC_K , KC_L, KC_SCLN,KC_FN30, + KC_PGDN , KC_N, KC_M , KC_COMM,KC_DOT, KC_SLSH,KC_FN29, + KC_RALT , KC_DOWN,KC_UP, KC_NO ,KC_RGUI, + KC_NO , KC_NO, + KC_NO , + KC_FN29,KC_ENT ,KC_SPC + ), + + KEYMAP( // layer 1 : function and symbol keys + // left hand + KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, + KC_TRNS,KC_AT,KC_UNDS ,KC_LBRC,KC_RBRC,KC_CIRC ,KC_TRNS, + KC_TRNS,KC_BSLS,KC_SLSH,KC_LCBR ,KC_RCBR ,KC_ASTR, + KC_TRNS,KC_HASH ,KC_DLR ,KC_PIPE ,KC_TILD ,KC_GRV ,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_FN1, + // right hand + KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, + KC_TRNS,KC_EXLM,LSFT(KC_COMM),LSFT(KC_DOT),KC_EQL,KC_AMPR, KC_TRNS, + LSFT(KC_SLSH),KC_LPRN,KC_RPRN,KC_MINS,LSFT(KC_SCLN),KC_TRNS, + KC_TRNS,KC_PLUS,LSFT(KC_5),LSFT(KC_QUOT),KC_QUOT,KC_SCLN,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS + ), + + KEYMAP( // layer 2: navigation + // left hand + KC_NO,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_PGUP,KC_HOME,KC_UP ,KC_END,KC_NO ,KC_TRNS, + KC_TRNS,KC_PGDN,KC_LEFT,KC_DOWN,KC_RGHT,KC_NO, + KC_TRNS,KC_NO, KC_NO, KC_NO, KC_NO,KC_NO,KC_NO, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_FN1 , + // right hand + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS ,KC_TRNS, KC_HOME, KC_TRNS, KC_TRNS, KC_END ,KC_TRNS, + KC_NO, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT,KC_TRNS, + KC_TRNS,KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PGUP,KC_TRNS, + KC_LEFT, KC_DOWN,KC_RGHT,KC_PGDN,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS + ), + KEYMAP( // layer 3 : teensy bootloader functions + // left hand + KC_FN0, 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,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,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_FN1 , + // right hand + 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,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,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS + ), + + + KEYMAP( // layer 4: numpad + // left hand + 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,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,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + // right hand + KC_TRNS,KC_NLCK,KC_PSLS,KC_PAST,KC_PAST,KC_PMNS,KC_BSPC, + KC_TRNS,KC_NO, KC_P7, KC_P8, KC_P9, KC_PMNS,KC_BSPC, + KC_NO, KC_P4, KC_P5, KC_P6, KC_PPLS,KC_PENT, + KC_TRNS,KC_NO, KC_P1, KC_P2, KC_P3, KC_PPLS,KC_PENT, + KC_P0, KC_PDOT,KC_SLSH,KC_PENT,KC_PENT, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS + ), + +}; + +/* id for user defined functions */ +enum function_id { + TEENSY_KEY, +}; + +/* + * Fn action definition + */ +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_FUNCTION(TEENSY_KEY), // FN0 - Teensy key + [1] = ACTION_LAYER_SET(0, ON_PRESS), + //[11] = ACTION_MODS_KEY(MOD_LSFT, KC_COMM), + //[12] = ACTION_MODS_KEY(MOD_LSFT, KC_DOT), + + //[14] = ACTION_MODS_KEY(MOD_LSFT, KC_SLSH), + //[17] = ACTION_MODS_KEY(MOD_LSFT, KC_SCLN), + //[20] = ACTION_MODS_KEY(MOD_LSFT, KC_5), + //[21] = ACTION_MODS_KEY(MOD_LSFT, KC_QUOT), + [23] = ACTION_LAYER_SET(3, ON_PRESS), + [24] = ACTION_LAYER_SET(2, ON_PRESS), + [25] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_TAB), + [26] = ACTION_LAYER_SET(1, ON_PRESS), + [27] = ACTION_LAYER_TAP_KEY(1, KC_CAPS), + [28] = ACTION_MODS_TAP_KEY(MOD_RCTL,KC_BSLS), + //[29] = ACTION_LAYER_TOGGLE(4), + [29] = ACTION_MODS_TAP_KEY(MOD_RSFT,KC_ESC), + [30] = ACTION_LAYER_TAP_KEY(1, KC_QUOT), + [31] = ACTION_LAYER_MOMENTARY(2), + //[] = ACTION_LAYER_TAP_KEY(4, KC_S), +}; + + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; + +// Runs just one time when the keyboard initializes. +void * matrix_init_user(void) { + +}; + + +void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) +{ + + if (id == TEENSY_KEY) { + clear_keyboard(); + print("\n\nJump to bootloader... "); + _delay_ms(250); + bootloader_jump(); // should not return + print("not supported.\n"); + } +} -- cgit v1.2.3 From 38cf08697b571e5efd55428a4682e248295091fb Mon Sep 17 00:00:00 2001 From: Gunther Gruber Date: Mon, 27 Feb 2017 09:55:24 +0100 Subject: small changes in guni.c keymap to work with new qmk_firmware packet --- keyboard/ergodox_ez/keymaps/guni/keymap.c | 176 ----------------------------- keyboards/ergodox/keymaps/guni/keymap.c | 177 ++++++++++++++++++++++++++++++ 2 files changed, 177 insertions(+), 176 deletions(-) delete mode 100644 keyboard/ergodox_ez/keymaps/guni/keymap.c create mode 100644 keyboards/ergodox/keymaps/guni/keymap.c diff --git a/keyboard/ergodox_ez/keymaps/guni/keymap.c b/keyboard/ergodox_ez/keymaps/guni/keymap.c deleted file mode 100644 index fc8567e68..000000000 --- a/keyboard/ergodox_ez/keymaps/guni/keymap.c +++ /dev/null @@ -1,176 +0,0 @@ -#include "ergodox_ez.h" -#include "debug.h" -#include "action_layer.h" - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - KEYMAP( // layer 0 : default - // left hand - KC_EQL , KC_1, KC_2, KC_3, KC_4, KC_5, KC_LBRC, - KC_FN25 , KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HOME, - KC_FN27 , KC_A, KC_S, KC_D, KC_F, KC_G, - KC_LSFT , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PGUP, - KC_LGUI , KC_GRV,KC_LEFT,KC_RGHT,KC_LALT, - KC_NO , KC_NO , - KC_NO , - KC_BSPC,KC_DEL ,KC_FN23, - // right hand - KC_RBRC , KC_6, KC_7 , KC_8, KC_9, KC_0, KC_MINS, - KC_END , KC_Y, KC_U , KC_I, KC_O, KC_P, KC_FN28, - KC_H , KC_J, KC_K , KC_L, KC_SCLN,KC_FN30, - KC_PGDN , KC_N, KC_M , KC_COMM,KC_DOT, KC_SLSH,KC_FN29, - KC_RALT , KC_DOWN,KC_UP, KC_NO ,KC_RGUI, - KC_NO , KC_NO, - KC_NO , - KC_FN29,KC_ENT ,KC_SPC - ), - - KEYMAP( // layer 1 : function and symbol keys - // left hand - KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, - KC_TRNS,KC_AT,KC_UNDS ,KC_LBRC,KC_RBRC,KC_CIRC ,KC_TRNS, - KC_TRNS,KC_BSLS,KC_SLSH,KC_LCBR ,KC_RCBR ,KC_ASTR, - KC_TRNS,KC_HASH ,KC_DLR ,KC_PIPE ,KC_TILD ,KC_GRV ,KC_TRNS, - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, - KC_TRNS,KC_TRNS, - KC_TRNS, - KC_TRNS,KC_TRNS,KC_FN1, - // right hand - KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, - KC_TRNS,KC_EXLM,LSFT(KC_COMM),LSFT(KC_DOT),KC_EQL,KC_AMPR, KC_TRNS, - LSFT(KC_SLSH),KC_LPRN,KC_RPRN,KC_MINS,LSFT(KC_SCLN),KC_TRNS, - KC_TRNS,KC_PLUS,LSFT(KC_5),LSFT(KC_QUOT),KC_QUOT,KC_SCLN,KC_TRNS, - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, - KC_TRNS,KC_TRNS, - KC_TRNS, - KC_TRNS,KC_TRNS,KC_TRNS - ), - - KEYMAP( // layer 2: navigation - // left hand - KC_NO,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, - KC_TRNS,KC_PGUP,KC_HOME,KC_UP ,KC_END,KC_NO ,KC_TRNS, - KC_TRNS,KC_PGDN,KC_LEFT,KC_DOWN,KC_RGHT,KC_NO, - KC_TRNS,KC_NO, KC_NO, KC_NO, KC_NO,KC_NO,KC_NO, - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, - KC_TRNS,KC_TRNS, - KC_TRNS, - KC_TRNS,KC_TRNS,KC_FN1 , - // right hand - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, - KC_TRNS ,KC_TRNS, KC_HOME, KC_TRNS, KC_TRNS, KC_END ,KC_TRNS, - KC_NO, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT,KC_TRNS, - KC_TRNS,KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PGUP,KC_TRNS, - KC_LEFT, KC_DOWN,KC_RGHT,KC_PGDN,KC_TRNS, - KC_TRNS,KC_TRNS, - KC_TRNS, - KC_TRNS,KC_TRNS,KC_TRNS - ), - KEYMAP( // layer 3 : teensy bootloader functions - // left hand - KC_FN0, 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,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,KC_TRNS, - KC_TRNS,KC_TRNS, - KC_TRNS, - KC_TRNS,KC_TRNS,KC_FN1 , - // right hand - 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,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,KC_TRNS,KC_TRNS, - KC_TRNS,KC_TRNS, - KC_TRNS, - KC_TRNS,KC_TRNS,KC_TRNS - ), - - - KEYMAP( // layer 4: numpad - // left hand - 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,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,KC_TRNS,KC_TRNS, - KC_TRNS,KC_TRNS, - KC_TRNS, - KC_TRNS,KC_TRNS,KC_TRNS, - // right hand - KC_TRNS,KC_NLCK,KC_PSLS,KC_PAST,KC_PAST,KC_PMNS,KC_BSPC, - KC_TRNS,KC_NO, KC_P7, KC_P8, KC_P9, KC_PMNS,KC_BSPC, - KC_NO, KC_P4, KC_P5, KC_P6, KC_PPLS,KC_PENT, - KC_TRNS,KC_NO, KC_P1, KC_P2, KC_P3, KC_PPLS,KC_PENT, - KC_P0, KC_PDOT,KC_SLSH,KC_PENT,KC_PENT, - KC_TRNS,KC_TRNS, - KC_TRNS, - KC_TRNS,KC_TRNS,KC_TRNS - ), - -}; - -/* id for user defined functions */ -enum function_id { - TEENSY_KEY, -}; - -/* - * Fn action definition - */ -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(TEENSY_KEY), // FN0 - Teensy key - [1] = ACTION_LAYER_SET(0, ON_PRESS), - //[11] = ACTION_MODS_KEY(MOD_LSFT, KC_COMM), - //[12] = ACTION_MODS_KEY(MOD_LSFT, KC_DOT), - - //[14] = ACTION_MODS_KEY(MOD_LSFT, KC_SLSH), - //[17] = ACTION_MODS_KEY(MOD_LSFT, KC_SCLN), - //[20] = ACTION_MODS_KEY(MOD_LSFT, KC_5), - //[21] = ACTION_MODS_KEY(MOD_LSFT, KC_QUOT), - [23] = ACTION_LAYER_SET(3, ON_PRESS), - [24] = ACTION_LAYER_SET(2, ON_PRESS), - [25] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_TAB), - [26] = ACTION_LAYER_SET(1, ON_PRESS), - [27] = ACTION_LAYER_TAP_KEY(1, KC_CAPS), - [28] = ACTION_MODS_TAP_KEY(MOD_RCTL,KC_BSLS), - //[29] = ACTION_LAYER_TOGGLE(4), - [29] = ACTION_MODS_TAP_KEY(MOD_RSFT,KC_ESC), - [30] = ACTION_LAYER_TAP_KEY(1, KC_QUOT), - [31] = ACTION_LAYER_MOMENTARY(2), - //[] = ACTION_LAYER_TAP_KEY(4, KC_S), -}; - - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; - -// Runs just one time when the keyboard initializes. -void * matrix_init_user(void) { - -}; - - -void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) -{ - - if (id == TEENSY_KEY) { - clear_keyboard(); - print("\n\nJump to bootloader... "); - _delay_ms(250); - bootloader_jump(); // should not return - print("not supported.\n"); - } -} diff --git a/keyboards/ergodox/keymaps/guni/keymap.c b/keyboards/ergodox/keymaps/guni/keymap.c new file mode 100644 index 000000000..f33829b8a --- /dev/null +++ b/keyboards/ergodox/keymaps/guni/keymap.c @@ -0,0 +1,177 @@ +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" +#include "bootloader.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + KEYMAP( // layer 0 : default + // left hand + KC_EQL , KC_1, KC_2, KC_3, KC_4, KC_5, KC_LBRC, + KC_FN25 , KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HOME, + KC_FN27 , KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PGUP, + KC_LGUI , KC_GRV,KC_LEFT,KC_RGHT,KC_LALT, + KC_NO , KC_NO , + KC_NO , + KC_BSPC,KC_DEL ,KC_FN23, + // right hand + KC_RBRC , KC_6, KC_7 , KC_8, KC_9, KC_0, KC_MINS, + KC_END , KC_Y, KC_U , KC_I, KC_O, KC_P, KC_FN28, + KC_H , KC_J, KC_K , KC_L, KC_SCLN,KC_FN30, + KC_PGDN , KC_N, KC_M , KC_COMM,KC_DOT, KC_SLSH,KC_FN29, + KC_RALT , KC_DOWN,KC_UP, KC_NO ,KC_RGUI, + KC_NO , KC_NO, + KC_NO , + KC_FN29,KC_ENT ,KC_SPC + ), + + KEYMAP( // layer 1 : function and symbol keys + // left hand + KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, + KC_TRNS,KC_AT,KC_UNDS ,KC_LBRC,KC_RBRC,KC_CIRC ,KC_TRNS, + KC_TRNS,KC_BSLS,KC_SLSH,KC_LCBR ,KC_RCBR ,KC_ASTR, + KC_TRNS,KC_HASH ,KC_DLR ,KC_PIPE ,KC_TILD ,KC_GRV ,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_FN1, + // right hand + KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, + KC_TRNS,KC_EXLM,LSFT(KC_COMM),LSFT(KC_DOT),KC_EQL,KC_AMPR, KC_TRNS, + LSFT(KC_SLSH),KC_LPRN,KC_RPRN,KC_MINS,LSFT(KC_SCLN),KC_TRNS, + KC_TRNS,KC_PLUS,LSFT(KC_5),LSFT(KC_QUOT),KC_QUOT,KC_SCLN,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS + ), + + KEYMAP( // layer 2: navigation + // left hand + KC_NO,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_PGUP,KC_HOME,KC_UP ,KC_END,KC_NO ,KC_TRNS, + KC_TRNS,KC_PGDN,KC_LEFT,KC_DOWN,KC_RGHT,KC_NO, + KC_TRNS,KC_NO, KC_NO, KC_NO, KC_NO,KC_NO,KC_NO, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_FN1 , + // right hand + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS ,KC_TRNS, KC_HOME, KC_TRNS, KC_TRNS, KC_END ,KC_TRNS, + KC_NO, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT,KC_TRNS, + KC_TRNS,KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PGUP,KC_TRNS, + KC_LEFT, KC_DOWN,KC_RGHT,KC_PGDN,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS + ), + KEYMAP( // layer 3 : teensy bootloader functions + // left hand + KC_FN0, 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,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,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_FN1 , + // right hand + 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,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,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS + ), + + + KEYMAP( // layer 4: numpad + // left hand + 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,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,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + // right hand + KC_TRNS,KC_NLCK,KC_PSLS,KC_PAST,KC_PAST,KC_PMNS,KC_BSPC, + KC_TRNS,KC_NO, KC_P7, KC_P8, KC_P9, KC_PMNS,KC_BSPC, + KC_NO, KC_P4, KC_P5, KC_P6, KC_PPLS,KC_PENT, + KC_TRNS,KC_NO, KC_P1, KC_P2, KC_P3, KC_PPLS,KC_PENT, + KC_P0, KC_PDOT,KC_SLSH,KC_PENT,KC_PENT, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS + ), + +}; + +/* id for user defined functions */ +enum function_id { + TEENSY_KEY, +}; + +/* + * Fn action definition + */ +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_FUNCTION(TEENSY_KEY), // FN0 - Teensy key + [1] = ACTION_LAYER_SET(0, ON_PRESS), + //[11] = ACTION_MODS_KEY(MOD_LSFT, KC_COMM), + //[12] = ACTION_MODS_KEY(MOD_LSFT, KC_DOT), + + //[14] = ACTION_MODS_KEY(MOD_LSFT, KC_SLSH), + //[17] = ACTION_MODS_KEY(MOD_LSFT, KC_SCLN), + //[20] = ACTION_MODS_KEY(MOD_LSFT, KC_5), + //[21] = ACTION_MODS_KEY(MOD_LSFT, KC_QUOT), + [23] = ACTION_LAYER_SET(3, ON_PRESS), + [24] = ACTION_LAYER_SET(2, ON_PRESS), + [25] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_TAB), + [26] = ACTION_LAYER_SET(1, ON_PRESS), + [27] = ACTION_LAYER_TAP_KEY(1, KC_CAPS), + [28] = ACTION_MODS_TAP_KEY(MOD_RCTL,KC_BSLS), + //[29] = ACTION_LAYER_TOGGLE(4), + [29] = ACTION_MODS_TAP_KEY(MOD_RSFT,KC_ESC), + [30] = ACTION_LAYER_TAP_KEY(1, KC_QUOT), + [31] = ACTION_LAYER_MOMENTARY(2), + //[] = ACTION_LAYER_TAP_KEY(4, KC_S), +}; + + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + + +void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) +{ + + if (id == TEENSY_KEY) { + clear_keyboard(); + print("\n\nJump to bootloader... "); + _delay_ms(250); + bootloader_jump(); // should not return + print("not supported.\n"); + } +} -- cgit v1.2.3 From e12b1a237cd4e9ce4191efb13987871a91b5916e Mon Sep 17 00:00:00 2001 From: John M Daly Date: Mon, 27 Feb 2017 21:42:25 -0500 Subject: Add initial version of TheVan Keyboards Roadkit Firmware --- keyboards/roadkit/Makefile | 3 + keyboards/roadkit/config.h | 162 ++++++++++++++++++++++++++++ keyboards/roadkit/keymaps/default/Makefile | 21 ++++ keyboards/roadkit/keymaps/default/config.h | 8 ++ keyboards/roadkit/keymaps/default/keymap.c | 49 +++++++++ keyboards/roadkit/keymaps/default/readme.md | 1 + keyboards/roadkit/keymaps/singles/Makefile | 21 ++++ keyboards/roadkit/keymaps/singles/config.h | 8 ++ keyboards/roadkit/keymaps/singles/keymap.c | 61 +++++++++++ keyboards/roadkit/keymaps/singles/readme.md | 3 + keyboards/roadkit/readme.md | 32 ++++++ keyboards/roadkit/roadkit.c | 28 +++++ keyboards/roadkit/roadkit.h | 33 ++++++ keyboards/roadkit/rules.mk | 69 ++++++++++++ 14 files changed, 499 insertions(+) create mode 100644 keyboards/roadkit/Makefile create mode 100644 keyboards/roadkit/config.h create mode 100644 keyboards/roadkit/keymaps/default/Makefile create mode 100644 keyboards/roadkit/keymaps/default/config.h create mode 100644 keyboards/roadkit/keymaps/default/keymap.c create mode 100644 keyboards/roadkit/keymaps/default/readme.md create mode 100644 keyboards/roadkit/keymaps/singles/Makefile create mode 100644 keyboards/roadkit/keymaps/singles/config.h create mode 100644 keyboards/roadkit/keymaps/singles/keymap.c create mode 100644 keyboards/roadkit/keymaps/singles/readme.md create mode 100644 keyboards/roadkit/readme.md create mode 100644 keyboards/roadkit/roadkit.c create mode 100644 keyboards/roadkit/roadkit.h create mode 100644 keyboards/roadkit/rules.mk diff --git a/keyboards/roadkit/Makefile b/keyboards/roadkit/Makefile new file mode 100644 index 000000000..4e2a6f00f --- /dev/null +++ b/keyboards/roadkit/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif \ No newline at end of file diff --git a/keyboards/roadkit/config.h b/keyboards/roadkit/config.h new file mode 100644 index 000000000..9596f7f3b --- /dev/null +++ b/keyboards/roadkit/config.h @@ -0,0 +1,162 @@ +/* +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 0xFEAE +#define PRODUCT_ID 0x8846 +#define DEVICE_VER 0x0001 +#define MANUFACTURER TheVan Keyboards +#define PRODUCT Roadkit Micro +#define DESCRIPTION keyboard firmware for Roadkit Micro + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 4 + +/* + * 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 { F0, F5, D7, B4 } +#define MATRIX_COL_PINS { F1, F4, D6, D4 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/roadkit/keymaps/default/Makefile b/keyboards/roadkit/keymaps/default/Makefile new file mode 100644 index 000000000..f4671a9d1 --- /dev/null +++ b/keyboards/roadkit/keymaps/default/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 = no # 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 \ No newline at end of file diff --git a/keyboards/roadkit/keymaps/default/config.h b/keyboards/roadkit/keymaps/default/config.h new file mode 100644 index 000000000..df06a2620 --- /dev/null +++ b/keyboards/roadkit/keymaps/default/config.h @@ -0,0 +1,8 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here + +#endif \ No newline at end of file diff --git a/keyboards/roadkit/keymaps/default/keymap.c b/keyboards/roadkit/keymaps/default/keymap.c new file mode 100644 index 000000000..3fc18915a --- /dev/null +++ b/keyboards/roadkit/keymaps/default/keymap.c @@ -0,0 +1,49 @@ +#include "roadkit.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 _NP 0 + +// Macro name shortcuts +#define NUMPAD M(_NP) + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_NP] = /* Numpad */ + KEYMAP(KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, \ + KC_KP_4, KC_KP_5, KC_KP_6, \ + KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_ENTER, \ + KC_KP_0, KC_KP_DOT), +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +void persistant_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + switch(id) { + case _NP: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_NP); + } + break; + } + return MACRO_NONE; +}; diff --git a/keyboards/roadkit/keymaps/default/readme.md b/keyboards/roadkit/keymaps/default/readme.md new file mode 100644 index 000000000..5984a71d1 --- /dev/null +++ b/keyboards/roadkit/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for roadkit diff --git a/keyboards/roadkit/keymaps/singles/Makefile b/keyboards/roadkit/keymaps/singles/Makefile new file mode 100644 index 000000000..f4671a9d1 --- /dev/null +++ b/keyboards/roadkit/keymaps/singles/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 = no # 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 \ No newline at end of file diff --git a/keyboards/roadkit/keymaps/singles/config.h b/keyboards/roadkit/keymaps/singles/config.h new file mode 100644 index 000000000..df06a2620 --- /dev/null +++ b/keyboards/roadkit/keymaps/singles/config.h @@ -0,0 +1,8 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here + +#endif \ No newline at end of file diff --git a/keyboards/roadkit/keymaps/singles/keymap.c b/keyboards/roadkit/keymaps/singles/keymap.c new file mode 100644 index 000000000..5ee7a752b --- /dev/null +++ b/keyboards/roadkit/keymaps/singles/keymap.c @@ -0,0 +1,61 @@ +#include "roadkit.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 _NP 0 +#define _L1 1 + +// Macro name shortcuts +#define NUMPAD M(_NP) +#define LAYER1 M(_L1) + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_NP] = /* Numpad */ + SINGLES_KEYMAP(KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, \ + KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_MINUS, \ + KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_ENTER, \ + KC_KP_0, KC_KP_DOT, TG(_L1), KC_BSPC), + [_L1] = /* LAYER 1 */ + SINGLES_KEYMAP(KC_NUMLOCK, KC_TRNS, KC_TRNS, KC_VOLU, \ + KC_TRNS, KC_UP, KC_TRNS, KC_VOLD, \ + KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +void persistant_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + switch(id) { + case _L1: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_L1); + } + break; + case _NP: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_NP); + } + break; + } + return MACRO_NONE; +}; diff --git a/keyboards/roadkit/keymaps/singles/readme.md b/keyboards/roadkit/keymaps/singles/readme.md new file mode 100644 index 000000000..48ea4a8b3 --- /dev/null +++ b/keyboards/roadkit/keymaps/singles/readme.md @@ -0,0 +1,3 @@ +# The singles keymap for roadkit + +This keymap has a base layer with numpad functionality, and then a second layer with some additional keys. The user is encouraged to develop their own keymap using this as a starting point. diff --git a/keyboards/roadkit/readme.md b/keyboards/roadkit/readme.md new file mode 100644 index 000000000..d7480a165 --- /dev/null +++ b/keyboards/roadkit/readme.md @@ -0,0 +1,32 @@ +roadkit keyboard firmware +====================== + +## Quantum MK Firmware + +For the full Quantum feature list, see [the QMK Wiki](https://github.com/qmk/qmk_firmware/wiki). + +## Building + +Download or clone the whole firmware and navigate to the `keyboards/roadkit` folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex. You can then use the programmer of your choice to program your .hex file. + +Depending on which keymap you would like to use, you will have to compile slightly differently. + +### Default + +To build with the default keymap, simply run `make default`. For the roadkit, the default layout is a standard numpad layout. + +### Singles + +The singles layout for the roadkit corresponds to the configuration where only 1u keys are used and there are 16 of them on the board. To build the singles keymap, run `make singles`. + +### Other Keymaps + +Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files. + +To build the firmware binary hex file with a keymap just do `make` with a keymap like this: + +``` +$ make [default|jack|] +``` + +Keymaps follow the format **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/` diff --git a/keyboards/roadkit/roadkit.c b/keyboards/roadkit/roadkit.c new file mode 100644 index 000000000..26e0c51ec --- /dev/null +++ b/keyboards/roadkit/roadkit.c @@ -0,0 +1,28 @@ +#include "roadkit.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/roadkit/roadkit.h b/keyboards/roadkit/roadkit.h new file mode 100644 index 000000000..b10e5740f --- /dev/null +++ b/keyboards/roadkit/roadkit.h @@ -0,0 +1,33 @@ +#ifndef ROADKIT_H +#define ROADKIT_H + +#include "quantum.h" + +// This is a shortcut to help you visually see your layout. +#define KEYMAP( \ + K00, K01, K02, K03, \ + K10, K11, K12, \ + K20, K21, K22, K23, \ + K30, K32 \ +) \ +{ \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, KC_NO }, \ + { K20, K21, K22, K23 }, \ + { K30, KC_NO, K32, KC_NO } \ +} + +#define SINGLES_KEYMAP( \ + K00, K01, K02, K03, \ + K10, K11, K12, K13, \ + K20, K21, K22, K23, \ + K30, K31, K32, K33 \ +) \ +{ \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { K20, K21, K22, K23 }, \ + { K30, K31, K32, K33 } \ +} + +#endif diff --git a/keyboards/roadkit/rules.mk b/keyboards/roadkit/rules.mk new file mode 100644 index 000000000..dbba6bace --- /dev/null +++ b/keyboards/roadkit/rules.mk @@ -0,0 +1,69 @@ + + +# 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 ?= yes # 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 +# 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 ?= no # Enable keyboard backlight functionality on B7 by default +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 -- cgit v1.2.3 From 18ba21aa3123719461e007fd124074bb6c78960f Mon Sep 17 00:00:00 2001 From: Chris Helming Date: Tue, 28 Feb 2017 11:27:23 -0500 Subject: Update default maps for missing keys --- keyboards/planck/keymaps/default/keymap.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/keyboards/planck/keymaps/default/keymap.c b/keyboards/planck/keymaps/default/keymap.c index 1b1b998b2..d149019fe 100644 --- a/keyboards/planck/keymaps/default/keymap.c +++ b/keyboards/planck/keymaps/default/keymap.c @@ -102,16 +102,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+-------------+------+------+------+------+------| * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter | + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ [_LOWER] = { - {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC}, - {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, - {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_HOME, KC_END, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} + {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC}, + {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} }, /* Raise @@ -120,7 +120,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+-------------+------+------+------+------+------| * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter | + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' @@ -138,7 +138,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+-------------+------+------+------+------+------| * | | S | T | P | H | * | * | F | P | L | T | D | * |------+------+------+------+------+------|------+------+------+------+------+------| - * |TogOut| S | K | W | R | * | * | R | B | G | S | Z | + * | | S | K | W | R | * | * | R | B | G | S | Z | * |------+------+------+------+------+------+------+------+------+------+------+------| * | Exit | | | A | O | | E | U | | | | * `-----------------------------------------------------------------------------------' @@ -163,7 +163,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_ADJUST] = { - {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, + {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL }, {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______}, {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -- cgit v1.2.3 From 71971e818f272196c29a80b4ce9a6ae3ac5b09bd Mon Sep 17 00:00:00 2001 From: folkert4 Date: Tue, 28 Feb 2017 17:49:42 -0500 Subject: Various QOL changes: Removed some unneeded keys from raise and lower layers moved the + and = signs, backspace is now more intuitive moved all the Function keys to CUSTOM layer added ctrl alt del to CUSTOM layer simplified the layout picture greatly --- .../planck/keymaps/espynn/keyboard-layout.jpg | Bin 52908 -> 53129 bytes keyboards/planck/keymaps/espynn/keymap.c | 22 ++-- keyboards/planck/keymaps/espynn/layout.json | 131 ++++++++++++--------- keyboards/planck/keymaps/espynn/readme.md | 12 +- 4 files changed, 95 insertions(+), 70 deletions(-) diff --git a/keyboards/planck/keymaps/espynn/keyboard-layout.jpg b/keyboards/planck/keymaps/espynn/keyboard-layout.jpg index 55e5396bf..c5e438f6a 100644 Binary files a/keyboards/planck/keymaps/espynn/keyboard-layout.jpg and b/keyboards/planck/keymaps/espynn/keyboard-layout.jpg differ diff --git a/keyboards/planck/keymaps/espynn/keymap.c b/keyboards/planck/keymaps/espynn/keymap.c index 4a3fe32b8..a24ad9d48 100644 --- a/keyboards/planck/keymaps/espynn/keymap.c +++ b/keyboards/planck/keymaps/espynn/keymap.c @@ -60,7 +60,7 @@ const uint16_t PROGMEM fn_actions[] = { [7] = ACTION_MODS_KEY(MOD_LCTL, KC_UNDS), }; -// This config can be found at Keyboard layout editor site: http://goo.gl/zjXL2l +// This config can be found at Keyboard layout editor site: https://goo.gl/cF7uIO const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = { /* QWERTY */ {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, @@ -69,22 +69,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {KC_LCTL, KC_ESC, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} }, [_LOWER] = { /* LOWER */ - {KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LPRN, KC_RPRN, KC_LCBR, KC_RCBR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, + {KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_TRNS}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_UNDS, KC_LPRN, KC_RPRN, KC_LCBR, KC_RCBR, KC_MINS, KC_TRNS, KC_TRNS, KC_TRNS}, {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_QUOT, KC_DQT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, {KC_TRNS, ZM_NRM, ZM_IN, ZM_OUT, KC_TRNS, KC_PGDN, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} }, [_RAISE] = { /* RAISE */ - {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LCBR, KC_LCBR, KC_BSLS, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_PIPE, KC_GRV, KC_TILD, KC_LBRC, KC_LBRC, KC_TRNS, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGUP, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} + {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_UNDS, KC_TRNS}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_EQL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PLUS, KC_TRNS, KC_TRNS, KC_TRNS}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_PIPE, KC_GRV, KC_TILD, S(KC_COMM), S(KC_DOT), KC_BSLS, KC_TRNS}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGUP, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} }, [_CUSTOM] = { /* CUSTOM */ - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, CUS4, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, CUS0, CUS3, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, - {KC_TRNS, KC_TRNS, CUT, COPY, PASTE, CUS1, CUS5, CUS2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, - {BL, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} + {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_TRNS}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, CUS0, CUS3, CUS4, KC_TRNS, KC_F12, KC_TRNS}, + {KC_TRNS, KC_TRNS, CUT, COPY, PASTE, CUS1, CUS5, CUS2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, + {BL, RESET, LALT(LCTL(KC_DEL)), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} } }; diff --git a/keyboards/planck/keymaps/espynn/layout.json b/keyboards/planck/keymaps/espynn/layout.json index 38ccc3452..ccdf2afde 100644 --- a/keyboards/planck/keymaps/espynn/layout.json +++ b/keyboards/planck/keymaps/espynn/layout.json @@ -3,6 +3,7 @@ "backcolor": "#858585", "name": "Planck 40%", "author": "James Folkert", + "notes": "# Espynn's keymap for Planck Ortholinear 40% Mechanical Keyboard\nAdded several custom functions to the keymap from the \"ab\" map. Special thanks to \"mollat\" for demonstration of macros in their keymap.c\n \n\n![Layout](keyboard-layout.png \"Practical Keymap\")\n\n* Online keyboard layout editor: http://goo.gl/mlLAFZ\n\n# Notes\n* Front legend text is the custom layer (both raise and lower)\n* Holding is denoted by down arrow, for example, right shift is an enter button when tapped, shift when held\n* Simultaneous RAISE+LOWER enters CUSTOM layer. Several custom keymaps are here\n* I disregarded the advice of Jack and used macros for passwords. I accept my fate.\n* RAISE and LOWER also acts as PgUp and PgDn when tapped.\n* [CapsLock] also acts as [Ctrl] key when you press and hold. It is convenient for GNU Emacs users. (not sure if this works)\n* Bracket/ paran/ brace keys are placed in the center of the keyboard for programmer's convenience.", "background": { "name": "Aluminium brushed", "style": "background-image: url('/bg/metal/aluminum_texture1642.jpg');" @@ -19,41 +20,49 @@ 2, 2, 0, - 2 + 0 ] }, - "F1\n1\n\n!\n\n\n\n\n\n", - "F2\n2\n\n@\n\n\n\n\n\nQ", - "F3\n3\n\n#\n\n\n\n\n\nW", - "F4\n4\n\n$\n\n\n\n\n\nE", - "F5\n5\n\n%\n\n\n\n\n\nR", - "F6\n6\n\n^\n\n\n\n\n\nT", - "F7\n6\n\n&\n\n\n\n\n\nY", - "F8\n8\n\n*\nMacro4\n\n\n\n\nU", - "F9\n9\n\n(\n\n\n\n\n\nI", + "!\n1\n\n\nF1\n\n\n\n\n", + "@\n2\n\n\nF2\n\n\n\n\nQ", + "#\n3\n\n\nF3\n\n\n\n\nW", + "$\n4\n\n\nF4\n\n\n\n\nE", + "%\n5\n\n\nF5\n\n\n\n\nR", + "^\n6\n\n\nF6\n\n\n\n\nT", + "&\n7\n\n\nF7\n\n\n\n\nY", + "*\n8\n\n\nF8\n\n\n\n\nU", + "(\n9\n\n\nF9\n\n\n\n\nI", { "fa": [ + 2, 0, 0, - 0, - 2 + 0 ] }, - "F10\n0\n\n)\n\n\n\n\n\nO", + ")\n0\n\n\nF10\n\n\n\n\nO", { "fa": [ 2, 2, 0, - 2 + 0, + 0, + 0, + 0, + 0, + 0 ] }, - "F11\n-\n\n_\n\n\n\n\n\nP", - "F12\n=\n\n+\n\n\n\n\n\n" + "_\n-\n\n\nF11\n\n\n\n\nP", + { + "a": 7, + "f": 3 + }, + "" ], [ { - "a": 7, "f": 3 }, "", @@ -66,12 +75,12 @@ }, "S", { + "a": 4, "f": 3 }, - "D", + "=\n_\n\n\n\n\n\n\n\nD", { "t": "#ff0000", - "a": 4, "f": 3 }, "\n(\n\n\n\n\n\n\n\nF", @@ -93,24 +102,21 @@ "t": "#000000", "f": 3 }, - "{\n\n\n\n\n\n\n\n\nK", + "+\n-\n\n\nMacro4\n\n\n\n\nK", { + "a": 7, "f": 3 }, - "{\n\n\n\n\n\n\n\n\nL", + "L", { + "a": 6, "fa": [ 2, 2, - 2, - 2, - 0, - 0, - 0, 2 ] }, - "\\\n\n|\n\n\n\n\n:\n\n;", + "\n\n:\n\nF12\n\n\n\n;", { "a": 7, "fa": [ @@ -141,66 +147,79 @@ "fa": [ 2, 2, - 2, - 2 + 0, + 0 ] }, - "\\\n[\n|\n{\nPaste\n\n\n\n\nV", - "|\n]\n\n}\nMacro1\n\n\n\n\nB", - "`\n'\n~\n\"\nMacro5\n\n\n\n\nN", + "\\\n[\n\n\nPaste\n\n\n\n\nV", + "|\n]\n\n\nMacro1\n\n\n\n\nB", + "`\n'\n\n\nMacro5\n\n\n\n\nN", "~\n\"\n\n\nMacro2\n\n\n\n\nM", { "fa": [ 2, 2, - 2, - 2, 0, 0, 0, - 1 + 0, + 0, + 2 ] }, - "[\n\n{\n\n\n\n\n<\n\n,", - "[\n\n{\n\n\n\n\n\n\n.", + "<\n\n\n\n\n\n\n<\n\n,", { - "a": 6 + "fa": [ + 2, + 2, + 0 + ] }, - "\n\n?\n\n\n\n\n\n/", + ">\n\n\n\n\n\n\n>\n\n.", { - "a": 4, "fa": [ + 0, 2, - 2, + 0, + 0, + 0, + 0, + 0, + 2 + ] + }, + "\\\n\n\n\n\n\n\n?\n\n/", + { + "fa": [ + 0, 2, 0, 0, 0, 0, - 1, - 9, - 0 + 0, + 2, + 9 ] }, "\n\n\nShift\n\n\n\n\n\n\nShift" ], [ { - "a": 7, - "f": 3 + "a": 7 }, "Ctrl\n\n\n\nBLight", { "a": 4, "fa": [ - 2, + 0, 1, - 2, 0, 0, 0, 0, - 1, + 0, + 2, 9, 9 ] @@ -208,29 +227,29 @@ "\nZNorm\n\n\nRESET\n\n\n\n\n", { "fa": [ - 2, + 0, 1, - 2, 0, 0, 0, 0, - 1, + 0, + 2, 9, 6 ] }, - "\nZIn\n\n\n\n\n\n\n\n", + "\nZIn\n\n\nc.a.del\n\n\n\n\n", { "fa": [ - 2, + 0, 1, - 2, 0, 0, 0, 0, - 1, + 0, + 2, 9, 9 ] diff --git a/keyboards/planck/keymaps/espynn/readme.md b/keyboards/planck/keymaps/espynn/readme.md index 8882f4601..ea84cf955 100644 --- a/keyboards/planck/keymaps/espynn/readme.md +++ b/keyboards/planck/keymaps/espynn/readme.md @@ -3,7 +3,7 @@ Created by James Folkert: https://twitter.com/trekloFsemaJ Added several custom functions to the keymap from the "ab" map. Special thanks to "mollat" for demonstration of macros in their keymap.c -![Layout](keyboard-layout.png "Practical Keymap") +![Layout](keyboard-layout.jpg "Practical Keymap") * Online keyboard layout editor: http://www.keyboard-layout-editor.com/ @@ -14,5 +14,11 @@ Added several custom functions to the keymap from the "ab" map. Special thanks t * I disregarded the advice of Jack and used macros for passwords. I accept my fate. These have been abstracted to macros 2, 3, and 4 * add your mobile and email to the keymap before make * RAISE and LOWER also acts as PgUp and PgDn when tapped. -* [CapsLock] also acts as [Ctrl] key when you press and hold. It is convenient for GNU Emacs users. (not sure if this works) -* Bracket/ paran/ brace keys are placed in the center of the keyboard for programmer's convenience. \ No newline at end of file +* Bracket/ paran/ brace keys are placed in the center of the keyboard for programmer's convenience. + +## changes +* Removed some unneeded keys from raise and lower layers +* moved the + and = signs, backspace is now more intuitive +* moved all the Function keys to CUSTOM layer +* added ctrl alt del to CUSTOM layer +* simplified the layout picture greatly \ No newline at end of file -- cgit v1.2.3 From 748401e5c180e91181bc10a80491d7d5568c008a Mon Sep 17 00:00:00 2001 From: milestogo Date: Tue, 28 Feb 2017 21:53:42 -0800 Subject: keymap and C6 audio testing --- .../MS-sculpt-mobile/keymaps/milestogo/Makefile | 2 +- .../MS-sculpt-mobile/keymaps/milestogo/config.h | 1 - .../MS-sculpt-mobile/keymaps/milestogo/keymap.c | 150 +++++++++++++++++---- 3 files changed, 125 insertions(+), 28 deletions(-) diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/Makefile b/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/Makefile index a82d80dee..1209ad781 100644 --- a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/Makefile +++ b/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/Makefile @@ -10,7 +10,7 @@ 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 +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. diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/config.h b/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/config.h index 8893d122e..aaf0077b1 100644 --- a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/config.h +++ b/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/config.h @@ -4,5 +4,4 @@ #include "../../config.h" // place overrides here - #endif diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/keymap.c b/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/keymap.c index 0551fbde7..244d52dc5 100644 --- a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/keymap.c +++ b/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/keymap.c @@ -1,11 +1,26 @@ #include "MS-sculpt-mobile.h" +#include "action_layer.h" + +#ifdef AUDIO_ENABLE + #include "audio.h" +#endif #define _QWR 0 -#define _CDH 1 -#define _SYM 2 -#define _MOV 3 -#define _NUM 4 -#define _TRAN 9 +#define _CDH 2 +#define _SYM 3 +#define _MOV 4 +#define _TRAN 5 + + +enum layer_keycodes { +QWR, +CDH, +SYM, +MOV, +NUM, +TRAN +}; + // Shorter spacing #define XXXX KC_NO @@ -15,31 +30,36 @@ /* Fn Keys */ #define TT_SYM MO(_SYM) -#define TO_CDH TG(_CDH) #define TT_MOV KC_FN2 #define TT_NUM MO(_NUM) #define SSFT ACTION_MODS_ONESHOT(MOD_LSFT) +enum macro_keycodes { +DHPASTE=1, +VIBRK, +TO_CDH, +}; + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* QWERTY * -* |ESC | F1 | F2 | F3 | F4 | F5 | F6 | f7 | F8 | F9 | F10| F11| F12|Vol-|Vol+|Mute| +* |ESC | F1 | F2 | F3 | F4 | F5 | F6 | f7 | F8 | F9 | F10| F11| F12|Vol-|Vol+|_CDH| * -------------------------------------------------------------------------------' -* | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |Bakspace| Del | -* -------------------------------------------------------------------------- -* | tab | q | w | e | r | t | y | u | i | o | p | [ | ] | \ | | +* | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |Bakspace| Del| +* --------------------------------------------------------------------------- +* | tab | q | w | e | r | t | y | u | i | o | p | [ | ] | \ | | * -------------------------------------------------------------------------------' -* | caps | a | s | d | f | g | h | j | k | l | ; | ' | enter |PgUp| +* |Bak/Mov| a | s | d | f | g | h | j | k | l | ; | ' | enter |PgUp| * -------------------------------------------------------------------------------- * |Lsft | z | x | c | v | b | n | m | , | . | / | Rsft| Up| PgDn| * --------------------------------------------------------------------------------- -* |Lctl |Lgui |Lalt | Space |Ralt | FN | Rctl |Left|Down|Rght| +* |Lctl |Lgui |Lalt | Space/Sym | GUI | Sym | Rctl |Left|Down|Rght| * --------------------------------------------------------------------------------- */ [_QWR] = KEYMAP( \ - 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_VOLD, KC_VOLU, TO_CDH,\ + 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_VOLD, KC_VOLU, CDH,\ KC_ESC, KC_1, KC_2, KC_3 ,KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQL, KC_BSPC, KC_DEL,\ 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,\ TT_MOV, 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,\ @@ -48,29 +68,46 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_CDH] = KEYMAP (\ - ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, QWR, \ KC_ESC, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, ____, ____, ____,\ TT_MOV, KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, ____,\ - KC_LSFT, KC_Z, KC_X, KC_C, M(1), KC_V, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, ____, ____,\ + KC_LSFT, KC_Z, KC_X, KC_C, M(DHPASTE), KC_V, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, ____, ____,\ ____, ____, ____ , KC_FN1, ____, ____, ____, ____, ____, ____ ), + +/* SYM +* +* |ESC | F1 | F2 | F3 | F4 | F5 | F6 | f7 | F8 | F9 | F10| F11| F12|Vol-|Vol+|_CDH| +* -------------------------------------------------------------------------------' +* | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |Bakspace|Del | +* -------------------------------------------------------------------------- +* | ESC: | ^ | { | } | @ | % | | [ | ( | ) | _ | [ | ] | \ | | +* -------------------------------------------------------------------------------' +* |Bak/Mov| ! | # | 0 | = | | * | - | 1 | + | ] | ` | enter |PgUp| +* -------------------------------------------------------------------------------- +* |Lsft | ; | ~ | : | ~ | "|"| $ | ~ | | | / | Rsft| Up| PgDn| +* --------------------------------------------------------------------------------- +* |Lctl |Lgui |Lalt | Space/Sym | GUI | Sym | Rctl |Left|Down|Rght| +* --------------------------------------------------------------------------------- +*/ + [_SYM] = KEYMAP (\ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ - ____, KC_CIRC, KC_LCBR, KC_RCBR,KC_AT, KC_PERC, ____, KC_LBRC,KC_LPRN,KC_RPRN,KC_UNDS, ____, ____, ____,\ - ____, KC_EXLM, KC_HASH, KC_0, KC_EQL, ____, KC_ASTR,KC_MINS,KC_1, KC_PLUS,KC_RBRC, KC_GRV, ____, ____,\ - ____, ____, ____, ____, KC_TILDE, KC_PIPE, KC_DLR, ____, ____, ____, ____, ____, ____, ____,\ + M(VIBRK), KC_CIRC, KC_LCBR, KC_RCBR,KC_AT, KC_PERC, ____, KC_LBRC,KC_LPRN,KC_RPRN,KC_UNDS, ____, ____, ____,\ + ____, KC_EXLM, KC_HASH, KC_0, KC_EQL, ____, KC_ASTR,KC_MINS,KC_1, KC_PLUS,KC_RBRC, KC_GRV, ____, ____,\ + ____, KC_SCLN, KC_TILDE, KC_COLN, KC_TILDE, KC_PIPE, KC_DLR, KC_TILDE,____, ____, KC_SLSH, ____, ____, ____,\ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____ ), [_MOV] = KEYMAP (\ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ - ____, ____, RGUI(KC_TAB), ____, ____, RCTL(KC_B), ____, ____, ____, ____, ____, ____, ____, ____, \ - ____, RCTL(KC_A), KC_S, RCTL(KC_K), RCTL(KC_E), ____, KC_LEFT,KC_DOWN, KC_UP, KC_RIGHT, ____, ____,____,____,\ + ____, ____,RGUI(KC_TAB), ____, ____, RCTL(KC_B), ____, ____, KC_UP, ____, ____, ____, ____, ____, \ + ____, RCTL(KC_A), KC_S, RCTL(KC_K), RCTL(KC_E), ____, ____, KC_LEFT,KC_DOWN, KC_RIGHT, ____, ____,____,____,\ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____ ), @@ -88,9 +125,54 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM fn_actions[] = { [1] = ACTION_LAYER_TAP_KEY(_SYM,KC_SPACE), -[2] = ACTION_LAYER_TAP_KEY(_MOV,KC_BSPC), +[2] = ACTION_LAYER_TAP_KEY(_MOV,KC_BSPC) }; +#ifdef AUDIO_ENABLE + +float tone_startup[][2] = SONG(STARTUP_SOUND); +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +#endif + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWR: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + #endif + layer_off(_CDH); + } + return false; + break; + + case CDH: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_colemak, false, 0); + #endif + layer_on(_CDH); + } + return false; + break; + + case SYM: + if (record->event.pressed) { + layer_on(_SYM); + } else { + layer_off(_SYM); + } + return false; + break; + + } + return true; + +} + + const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function @@ -104,7 +186,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) break; - case 1 : + case DHPASTE: if(keyboard_report->mods & MOD_BIT(KC_LGUI) ) { if (record->event.pressed) { clear_keyboard_but_mods(); @@ -121,12 +203,29 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) } break; - + case VIBRK: // vi esc: + if (record->event.pressed) { + return MACRO( T(E),D(LSFT),T(SCLN),U(LSFT), END ); + } + break; } + + return MACRO_NONE; }; +#ifdef AUDIO_ENABLE + + +void startup_user() +{ + _delay_ms(20); // gets rid of tick + PLAY_NOTE_ARRAY(tone_startup, false, 0); +} +#endif + + void matrix_init_user(void) { } @@ -135,10 +234,9 @@ void matrix_scan_user(void) { } -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} void led_set_user(uint8_t usb_led) { } + + -- cgit v1.2.3 From 0834c520c0c4adf0d4f59f4b149116b95726aec6 Mon Sep 17 00:00:00 2001 From: milestogo Date: Tue, 28 Feb 2017 21:54:35 -0800 Subject: missed config.h stuck modifiers change --- keyboards/handwired/MS-sculpt-mobile/config.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/keyboards/handwired/MS-sculpt-mobile/config.h b/keyboards/handwired/MS-sculpt-mobile/config.h index 1ac40f996..d85c5c623 100644 --- a/keyboards/handwired/MS-sculpt-mobile/config.h +++ b/keyboards/handwired/MS-sculpt-mobile/config.h @@ -24,7 +24,7 @@ along with this program. If not, see . #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x6060 #define DEVICE_VER 0x0001 -#define MANUFACTURER Microsoft+abit +#define MANUFACTURER Microsoftplus #define PRODUCT sculpt mobile #define DESCRIPTION 6000 @@ -44,7 +44,7 @@ along with this program. If not, see . /* 0 1 2 3 4 5 6 7 */ #define MATRIX_ROW_PINS { F7,F6,F4,F5,F3,F2,F1,F0} /* A B C D E F G H I J K L M N O P Q R */ -#define MATRIX_COL_PINS { B7, D0, D1, D2, D3, D4, D5, D6, D7, E0,E1,C1, C0, C3, C2, C5, C4,C6} +#define MATRIX_COL_PINS { B7, D0, D1, D2, D3, D4, D5, D6, D7, E0,E1,C1, C0, C3, C2, C5, C4,C7} #define UNUSED_PINS { B6,B5,B4,B3,B2,B1,B0 } @@ -96,4 +96,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION +#define PREVENT_STUCK_MODIFIERS + #endif -- cgit v1.2.3 From b80c97b712de41871be1a25a30d6ec838ea9eda3 Mon Sep 17 00:00:00 2001 From: milestogo Date: Tue, 28 Feb 2017 23:27:49 -0800 Subject: clean up babblepaste --- keyboards/handwired/MS-sculpt-mobile/babblePaste.c | 468 ++++++++++++++++++++ keyboards/handwired/MS-sculpt-mobile/babblePaste.h | 72 +++ .../handwired/MS-sculpt-mobile/babblePaste.txt | 489 +++++++++++++++++++++ 3 files changed, 1029 insertions(+) create mode 100644 keyboards/handwired/MS-sculpt-mobile/babblePaste.c create mode 100644 keyboards/handwired/MS-sculpt-mobile/babblePaste.h create mode 100644 keyboards/handwired/MS-sculpt-mobile/babblePaste.txt diff --git a/keyboards/handwired/MS-sculpt-mobile/babblePaste.c b/keyboards/handwired/MS-sculpt-mobile/babblePaste.c new file mode 100644 index 000000000..00e8416f4 --- /dev/null +++ b/keyboards/handwired/MS-sculpt-mobile/babblePaste.c @@ -0,0 +1,468 @@ +/* A library to output the right key shortcut in any common app. +Given a global variable babble_mode to show the environment and a +key that calls the paste macro, do the right type of paste. +Setting the context is done by another macro, or TBD interaction with the host. + +Huge thanks to https://en.wikipedia.org/wiki/Table_of_keyboard_shortcuts +and https://github.com/qmk/qmk_firmware/blob/master/keyboards/planck/keymaps/jeebak/keymap.c +*/ + +#include "babblePaste.h" +#include "action_layer.h" + +// GLOBAL variable. Sets startup default if no eeppom +char babble_mode = MAC_MODE ; + + +const static macro_t *babblePaste (keyrecord_t *record, uint16_t shortcut) { + + switch(babble_mode) { + +#ifdef MS_MODE + case MS_MODE: + switch(shortcut) { + + case BABL_DEL_RIGHT_1C: + return (static macro_t *) MACRO( D(DEL), END ); + case BABL_DEL_LEFT_WORD: + return MACRO( D(LCTRL), T(BSPACE), U(LCTRL), END ); + case BABL_DEL_RIGHT_WORD: + return MACRO( D(LCTRL), T(DEL), U(LCTRL), END ); + case BABL_GO_LEFT_1C: + return MACRO( T(LEFT), END ); + case BABL_GO_RIGHT_1C: + return MACRO( T(RIGHT), END ); + case BABL_GO_LEFT_WORD: + return MACRO( D(LCTRL), T(LEFT), U(LCTRL), END ); + case BABL_GO_RIGHT_WORD: + return MACRO( D(LCTRL), T(RIGHT), U(LCTRL), END ); + case BABL_GO_START_LINE: + return MACRO( T(HOME), END ); + case BABL_GO_START_DOC: + return MACRO( D(LCTRL),T(HOME), U(LCTRL),END ); + case BABL_GO_END_LINE: + return MACRO( T(END), END ); + case BABL_GO_END_DOC: + return MACRO( D(LCTRL),T(END), U(LCTRL),END ); + case BABL_GO_NEXT_LINE: + return MACRO( T(DOWN), END ); + case BABL_GO_PREV_LINE: + return MACRO( T(UP), END ); + case BABL_PGDN: + return MACRO( T(PGDN), END ); + case BABL_PGUP: + return MACRO( T(PGUP), END ); +#ifndef BABL_MOVEMENTONLY + case BABL_UNDO: + return MACRO( D(LCTRL), T(Z), U(LCTRL), END ); + case BABL_REDO: + return MACRO( D(LCTRL), T(Y), U(LCTRL), END ); + case BABL_CUT: + return MACRO( D(LCTRL), T(X), U(LCTRL), END ); + case BABL_COPY: + return MACRO( D(LCTRL), T(C), U(LCTRL), END ); + case BABL_PASTE: + return MACRO( D(LCTRL), T(V), U(LCTRL), END ); + case BABL_SELECT_ALL: + return MACRO( D(LCTRL), T(A), U(LCTRL), END ); + case BABL_UNDO: + return MACRO( D(LCTRL), T(Z), U(LCTRL), END ); + case BABL_REDO: + return MACRO( D(LCTRL), T(Y), U(LCTRL), END ); + case BABL_CUT: + return MACRO( D(LCTRL), T(X), U(LCTRL), END ); + case BABL_COPY: + return MACRO( D(LCTRL), T(C), U(LCTRL), END ); + case BABL_PASTE: + return MACRO( D(LCTRL), T(V), U(LCTRL), END ); + case BABL_SELECT_ALL: + return MACRO( D(LCTRL), T(A), U(LCTRL), END ); + case BABL_FIND: + return MACRO( D(LCTRL),T(F), U(LCTRL),END ); + case BABL_FIND_NEXT: + return MACRO( T(F3),END ); + case BABL_FIND_REPLACE: + return MACRO( D(LCTRL),T(H), U(LCTRL),END ); + case BABL_RUNAPP: + return MACRO( D(LGUI),T(R), U(LGUI),END ); + case BABL_SWITCH_APP_NEXT: + return MACRO( D(LALT),T(TAB), U(LALT),END ); + case BABL_SWITCH_APP_LAST: + return MACRO( D(LSFT),D(LALT),T(TAB), U(LALT), U(LSFT),END ); + case BABL_CLOSE_APP: + return MACRO( D(LALT),T(F4), U(LALT),END ); + case BABL_HELP: + return MACRO( T(F1),END ); +#endif + break; + + return MACRO_NONE; + } + +#endif +#ifdef LINUX_MODE + case LINUX_MODE: + switch(shortcut) { + + case BABL_DEL_RIGHT_1C: + return MACRO( D(DEL), END ); + case BABL_DEL_LEFT_WORD: + return MACRO( D(LCTRL), T(BSPACE), U(LCTRL), END ); + case BABL_DEL_RIGHT_WORD: + return MACRO( D(LCTRL), T(DEL), U(LCTRL), END ); + case BABL_GO_LEFT_1C: + return MACRO( T(LEFT), END ); + case BABL_GO_RIGHT_1C: + return MACRO( T(RIGHT), END ); + case BABL_GO_LEFT_WORD: + return MACRO( D(LCTRL), T(LEFT), U(LCTRL), END ); + case BABL_GO_RIGHT_WORD: + return MACRO( D(LCTRL), T(RIGHT), U(LCTRL), END ); + case BABL_GO_START_LINE: + return MACRO( T(HOME), END ); + case BABL_GO_START_DOC: + return MACRO( D(LCTRL),T(HOME), U(LCTRL),END ); + case BABL_GO_END_LINE: + return MACRO( T(END), END ); + case BABL_GO_END_DOC: + return MACRO( D(LCTRL),T(END), U(LCTRL),END ); + case BABL_GO_NEXT_LINE: + return MACRO( T(DOWN), END ); + case BABL_GO_PREV_LINE: + return MACRO( T(UP), END ); + case BABL_PGDN: + return MACRO( T(PGDN), END ); + case BABL_PGUP: + return MACRO( T(PGUP), END ); +#ifndef BABL_MOVEMENTONLY + case BABL_UNDO: + return MACRO( D(LCTRL), T(Z), U(LCTRL), END ); + case BABL_REDO: + return MACRO( D(LCTRL), T(Y), U(LCTRL), END ); + case BABL_CUT: + return MACRO( D(LCTRL), T(X), U(LCTRL), END ); + case BABL_COPY: + return MACRO( D(LCTRL), T(C), U(LCTRL), END ); + case BABL_PASTE: + return MACRO( D(LCTRL), T(V), U(LCTRL), END ); + case BABL_SELECT_ALL: + return MACRO( D(LCTRL), T(A), U(LCTRL), END ); + + case BABL_FIND: + return MACRO( D(LCTRL),T(F), U(LCTRL),END ); + case BABL_FIND_NEXT: + /* return MACRO( T(F3),END ); KDE */ + return MACRO( D(LCTRL),T(G), U(LCTRL),END ); // Gnome*/ + case BABL_FIND_REPLACE: + /* return MACRO( D(LCTRL),T(R), U(LCTRL),END ); KDE */ + return MACRO( D(LCTRL),T(H), U(LCTRL),END ); // Gnome*/ + case BABL_RUNAPP: + return MACRO( D(LALT),T(F2), U(LALT),END ); + case BABL_SWITCH_APP_NEXT: + return MACRO( D(LCTL),T(TAB), U(LCTL),END ); + case BABL_SWITCH_APP_LAST: + return MACRO( D(LSFT),D(LCTL),T(TAB), U(LCTL), U(LSFT),END ); + case BABL_CLOSE_APP: + return MACRO( D(LALT),T(F4), U(LALT),END ); + case BABL_HELP: + return MACRO_NONE; +#endif + break; + + return MACRO_NONE; + } + +#endif + +#ifdef MAC_MODE + case MAC_MODE: + switch(shortcut) { + + + case BABL_DEL_RIGHT_1C: + return MACRO( D(DEL), END ); + case BABL_DEL_LEFT_WORD: + return MACRO( D(LALT), T(BSPACE), U(LALT), END ); + case BABL_DEL_RIGHT_WORD: + return MACRO( D(LALT), T(DEL), U(LALT), END ); + case BABL_GO_LEFT_1C: + return MACRO( T(LEFT), END ); + case BABL_GO_RIGHT_1C: + return MACRO( T(RIGHT), END ); + case BABL_GO_LEFT_WORD: + return MACRO( D(LALT), T(LEFT), U(LALT), END ); + case BABL_GO_RIGHT_WORD: + return MACRO( D(LALT), T(RIGHT), U(LALT), END ); + case BABL_GO_START_LINE: + return MACRO( D(LGUI), T(LEFT), U(LGUI), END ); + case BABL_GO_START_DOC: + return MACRO( D(LGUI),T(UP), U(LGUI),END ); + case BABL_GO_END_LINE: + return MACRO( D(LGUI), T(RIGHT), U(LGUI), END ); + case BABL_GO_END_DOC: + return MACRO( D(LGUI),T(DOWN), U(LGUI),END ); + case BABL_GO_NEXT_LINE: + return MACRO( T(DOWN), END ); + case BABL_GO_PREV_LINE: + return MACRO( T(UP), END ); + case BABL_PGDN: + return MACRO( D(LALT), T(DOWN), U(LALT), END ); + case BABL_PGUP: + return MACRO( D(LALT), T(UP), U(LALT), END ); +#ifndef BABL_MOVEMENTONLY + case BABL_UNDO: + return MACRO( D(LGUI), T(Z), U(LGUI), END ); + case BABL_REDO: + return MACRO( D(LSFT),D(LGUI), T(Z), U(LSFT),U(LGUI), END ); + case BABL_CUT: + return MACRO( D(LGUI), T(X), U(LGUI), END ); + case BABL_COPY: + return MACRO( D(LGUI), T(C), U(LGUI), END ); + case BABL_PASTE: + return MACRO( D(LGUI), T(V), U(LGUI), END ); + case BABL_SELECT_ALL: + return MACRO( D(LGUI), T(A), U(LGUI), END ); + case BABL_FIND: + return MACRO( D(LGUI),T(F), U(LGUI),END ); + case BABL_FIND_NEXT: + return MACRO( D(LGUI),T(G), U(LGUI),END ); + case BABL_FIND_REPLACE: + return MACRO( D(LGUI),T(F), U(LGUI),END ); + case BABL_RUNAPP: + return MACRO( D(LGUI),T(R), U(LGUI),END ); + case BABL_SWITCH_APP_NEXT: + return MACRO( D(LGUI),T(TAB), U(LGUI),END ); + case BABL_SWITCH_APP_LAST: + return MACRO( D(LSFT),D(LGUI),T(TAB), U(LGUI), U(LSFT),END ); + case BABL_CLOSE_APP: + return MACRO( D(LGUI),T(Q), U(LGUI),END ); + case BABL_HELP: + return MACRO( D(LSFT),D(LGUI),T(SLASH), U(LGUI), U(LSFT),END ); +#endif + break; + + return MACRO_NONE; + } + +#endif + +#ifdef EMACS_MODE + case EMACS_MODE: + switch(shortcut) { +//probably should allow meta to not be ALT + + case BABL_DEL_RIGHT_1C: + return MACRO( D(LCTL), T(D), U(LCTL),END ); + case BABL_DEL_LEFT_WORD: + return MACRO( D(LCTL), T(BSPACE), U(LCTL), END ); + case BABL_DEL_RIGHT_WORD: + return MACRO( D(LALT), T(D), U(LALT), END ); + case BABL_GO_LEFT_1C: + return MACRO( T(LEFT), END ); + case BABL_GO_RIGHT_1C: + return MACRO( T(RIGHT), END ); + case BABL_GO_LEFT_WORD: + return MACRO( D(LALT), T(B), U(LALT), END ); + case BABL_GO_RIGHT_WORD: + return MACRO( D(LALT), T(F), U(LALT), END ); + case BABL_GO_START_LINE: + return MACRO( D(LCTRL), T(A), U(LCTRL), END ); + case BABL_GO_START_DOC: + return MACRO( D(LALT), D(LSFT), T(COMM),U(LSFT), U(LALT) ,END ); + case BABL_GO_END_LINE: + return MACRO( D(LCTRL), T(E), U(LCTRL), END ); + case BABL_GO_END_DOC: + return MACRO( D(LALT), D(LSFT), T(DOT),U(LSFT), U(LALT) ,END ); + case BABL_GO_NEXT_LINE: + return MACRO( D(LCTRL), T(N), U(LCTRL), END ); + case BABL_GO_PREV_LINE: + return MACRO( D(LCTRL), T(P), U(LCTRL), END ); + case BABL_PGDN: + return MACRO(D(LCTRL), T(V), U(LCTRL), END ); + case BABL_PGUP: + return MACRO( D(LALT), T(V), U(LALT), END ); +#ifndef BABL_MOVEMENTONLY + case BABL_UNDO: + return MACRO( D(LCTL), T(X), U(LCTL),T(C), END ); + case BABL_REDO: + return MACRO( D(LCTL), T(X), U(LCTL),T(C), END ); // arguably + case BABL_CUT: + return MACRO( D(LCTL), T(W), U(LCTL), END ); + case BABL_COPY: + return MACRO( D(LALT), T(W), U(LALT), END ); //really? + case BABL_PASTE: + return MACRO( D(LCTL), T(Y), U(LCTL), END ); + case BABL_SELECT_ALL: + return MACRO(D(LCTL), T(X), U(LCTL),T(H), END ); + case BABL_FIND: + return MACRO( D(LCTRL), T(S), U(LCTRL),END ); + case BABL_FIND_NEXT: + return MACRO( D(LCTRL), T(S), U(LCTRL),END ); + case BABL_FIND_REPLACE: + return MACRO( D(LALT),D(LSFT), T(5),U(LSFT), U(LALT), END ); + case BABL_RUNAPP: + return MACRO( D(LALT), T(X), U(LALT),T(S),T(H),T(E),T(L),T(L),END );// arguably + case BABL_SWITCH_APP_NEXT: + return MACRO( D(LCTL), T(X), U(LCTL),T(RIGHT), END ); // arguably + case BABL_SWITCH_APP_LAST: + return MACRO( D(LCTL), T(X), U(LCTL),T(LEFT), END ); // arguably + case BABL_CLOSE_APP: + return MACRO(D(LCTL), T(X), U(LCTL),T(C),END ); + case BABL_HELP: + return MACRO( D(LCTL),T(H), U(LCTL),T(A),END); // start search in help +#endif + break; + + return MACRO_NONE; + } + +#endif +#ifdef VI_MODE + case VI_MODE: + switch(shortcut) { +//assume esc is already called + + case BABL_DEL_RIGHT_1C: + return MACRO( T(X),END ); + case BABL_DEL_LEFT_WORD: + return MACRO( T(D),T(G),T(E),END ); + case BABL_DEL_RIGHT_WORD: + return MACRO( T(D),T(W),END ); + case BABL_GO_LEFT_1C: + return MACRO( T(H), END ); + case BABL_GO_RIGHT_1C: + return MACRO( T(L), END ); + case BABL_GO_LEFT_WORD: + return MACRO( T(B),END ); + case BABL_GO_RIGHT_WORD: + return MACRO( T(W), END ); + case BABL_GO_START_LINE: + return MACRO( D(LSFT), T(6),U(LSFT), END ); //^ + case BABL_GO_START_DOC: + return MACRO( T(G),T(G) ,END ); + case BABL_GO_END_LINE: + return MACRO( D(LSFT), T(4),U(LSFT) , END ); //$ + case BABL_GO_END_DOC: + return MACRO( D(LSFT), T(G),U(LSFT),END ); + case BABL_GO_NEXT_LINE: + return MACRO( T(J), END ); + case BABL_GO_PREV_LINE: + return MACRO( T(K), END ); + case BABL_PGDN: + return MACRO(D(LCTRL), T(F), U(LCTRL), END ); + case BABL_PGUP: + return MACRO( D(LCTRL), T(B), U(LCTRL), END ); +#ifndef BABL_MOVEMENTONLY + case BABL_UNDO: + return MACRO( T(U), END ); + case BABL_REDO: + return MACRO( D(LCTL), T(R), U(LCTL), END ); + case BABL_CUT: + return MACRO( T(X), END ); + case BABL_COPY: + return MACRO( T(Y),END ); + case BABL_PASTE: + return MACRO( T(P), END ); + case BABL_SELECT_ALL: + return MACRO( D(LSFT), T(SCLN),U(LSFT),D(LSFT), T(5),U(LSFT),T(Y), END ); // wrong but helpful? + case BABL_FIND: + return MACRO( T(SLASH),END ); + case BABL_FIND_NEXT: + return MACRO( T(N),END ); + case BABL_FIND_REPLACE: + return MACRO( D(LALT),D(LSFT), T(5),U(LSFT), U(LALT), END ); + case BABL_RUNAPP: + return MACRO_NONE; + case BABL_SWITCH_APP_NEXT: + return MACRO_NONE; + case BABL_SWITCH_APP_LAST: + return MACRO_NONE; + case BABL_CLOSE_APP: + return MACRO(D(LSFT), T(SCLN),U(LSFT), T(Q), D(RSFT), T(1),U(RSFT), END ); + case BABL_HELP: + return MACRO(D(LSFT), T(SCLN),U(LSFT),T(H),END); // start search in help + break; +#endif + return MACRO_NONE; + } + +#endif +#ifdef READMUX_MODE +// Readline command line editing + tmux windowing +// I havent decided how much to do readline and how much tmux + case READMUX_MODE: + switch(shortcut) { + + case BABL_DEL_RIGHT_1C: + return MACRO( D(LCTL), T(D), U(LCTL),END ); + case BABL_DEL_LEFT_WORD: + return MACRO( D(LCTL), T(W), U(LCTL), END ); + case BABL_DEL_RIGHT_WORD: + return MACRO( D(LALT), T(D), U(LALT), END ); + case BABL_GO_LEFT_1C: + return MACRO( T(LEFT), END ); + case BABL_GO_RIGHT_1C: + return MACRO( T(RIGHT), END ); + case BABL_GO_LEFT_WORD: + return MACRO( D(LALT), T(B), U(LALT), END ); + case BABL_GO_RIGHT_WORD: + return MACRO( D(LALT), T(F), U(LALT), END ); + case BABL_GO_START_LINE: + return MACRO( D(LCTRL), T(A), U(LCTRL), END ); + case BABL_GO_START_DOC: + return MACRO_NONE; // tmux? + case BABL_GO_END_LINE: + return MACRO( D(LCTRL), T(E), U(LCTRL), END ); + case BABL_GO_END_DOC: + return MACRO_NONE; // tmux? + case BABL_GO_NEXT_LINE: + return MACRO( D(LCTRL), T(N), U(LCTRL), END ); + case BABL_GO_PREV_LINE: + return MACRO( D(LCTRL), T(P), U(LCTRL), END ); + case BABL_PGDN: + return MACRO( T(PGDN), END ); + case BABL_PGUP: + return MACRO( T(PGUP), END ); +#ifndef BABL_MOVEMENTONLY + case BABL_UNDO: + return MACRO( D(LALT), T(R), U(LALT) , END ); + case BABL_REDO: + return MACRO( D(LCTL), T(X), U(LCTL),T(C), END ); // arguably + case BABL_CUT: + return MACRO( D(LCTL), T(K), U(LCTL), END ); // wrong half the time + case BABL_COPY: + return MACRO_NONE; + case BABL_PASTE: + return MACRO( D(LCTL), T(Y), U(LCTL), END ); + case BABL_SELECT_ALL: + return MACRO(D(LCTL), T(A), T(K), T(Y), U(LCTL) , END ); + case BABL_FIND: + return MACRO( D(LCTRL), T(R), U(LCTRL), END ); // search history + case BABL_FIND_NEXT: + eturn MACRO( D(LCTRL), T(S), U(LCTRL), END ); + case BABL_FIND_REPLACE: + return MACRO_NONE; // tmux? + case BABL_RUNAPP: + return MACRO( D(LCTRL), T(B), U(LCTRL), T(C),END ); //tmux + case BABL_SWITCH_APP_NEXT: + return MACRO( D(LCTRL), T(B), U(LCTRL), T(N),END ); //tmux + case BABL_SWITCH_APP_LAST: + return MACRO( D(LCTRL), T(B), U(LCTRL), T(P),END ); //tmux + case BABL_CLOSE_APP: + return MACRO( D(LCTRL), T(B), U(LCTRL), T(D),END); // usually what I want + break; + case BABL_HELP: + return MACRO_NONE; +#endif + break; + + return MACRO_NONE; + } + +#endif + return MACRO_NONE; + } + + +} + diff --git a/keyboards/handwired/MS-sculpt-mobile/babblePaste.h b/keyboards/handwired/MS-sculpt-mobile/babblePaste.h new file mode 100644 index 000000000..63b79a205 --- /dev/null +++ b/keyboards/handwired/MS-sculpt-mobile/babblePaste.h @@ -0,0 +1,72 @@ +/* A library to output the right key shortcut in any common app. +Given a global variable babble_mode to show the environment and a +key that calls the paste macro, do the right type of paste. + +Setting the bable_mode is done by another macro, or TBD interaction with the host. + +Huge thanks to https://en.wikipedia.org/wiki/Table_of_keyboard_shortcuts +and jeebak & algernon's keymap +*/ +#ifndef _babblePaste_h_included__ +#define _babblePaste_h_included__ + + +/* Add this to your config.h +// Uncomment any modes you want. +// Windows. +//#define MS_MODE 0 +//#define MAC_MODE 1 +//aka gnome+KDE +//#define LINUX_MODE 2 +//#define EMACS_MODE 3 +//#define VI_MODE 4 +//#define WORDSTAR_MODE 5 +// Readline and tmux +//#define READMUX 6 +*/ + +/* Macros handled by babblepaste. Most should be available for all platforms. */ +enum { + + // Movement + BABL_DEL_RIGHT_1C=200, + BABL_DEL_LEFT_WORD, + BABL_DEL_RIGHT_WORD, + BABL_GO_LEFT_1C, + BABL_GO_RIGHT_1C, + BABL_GO_LEFT_WORD, + BABL_GO_RIGHT_WORD, + BABL_GO_START_LINE, + BABL_GO_END_LINE, + BABL_GO_START_DOC, + BABL_GO_END_DOC, + BABL_GO_NEXT_LINE, + BABL_GO_PREV_LINE, + BABL_PGDN, + BABL_PGUP, +#ifndef BABL_MOVEMENTONLY + // Cut & Paste + BABL_UNDO, + BABL_REDO, + BABL_CUT, + BABL_COPY, + BABL_PASTE, + BABL_SELECT_ALL, + // GUI or app + BABL_FIND, + BABL_FIND_NEXT, + BABL_FIND_REPLACE, + BABL_RUNAPP, + BABL_SWITCH_APP_NEXT, + BABL_SWITCH_APP_LAST, // previous + BABL_CLOSE_APP, + BABL_HELP +#endif +}; + + + + +//static macro_t *babblePaste(keyrecord_t *record, uint16_t shortcut) + + #endif \ No newline at end of file diff --git a/keyboards/handwired/MS-sculpt-mobile/babblePaste.txt b/keyboards/handwired/MS-sculpt-mobile/babblePaste.txt new file mode 100644 index 000000000..6170ec7af --- /dev/null +++ b/keyboards/handwired/MS-sculpt-mobile/babblePaste.txt @@ -0,0 +1,489 @@ +/* A library to output the right key shortcut in any common app. +Given a global variable babble_mode to show the environment and a +key that calls the paste macro, do the right type of paste. +Setting the context is done by another macro, or TBD interaction with the host. + +Huge thanks to https://en.wikipedia.org/wiki/Table_of_keyboard_shortcuts +and https://github.com/qmk/qmk_firmware/blob/master/keyboards/planck/keymaps/jeebak/keymap.c +*/ + +#include "eeconfig.h" + + +// Comment out anything you will never use. +// Windows. +#define MS_MODE 0 +#define MAC_MODE 1 +//aka gnome+KDE +#define LINUX_MODE 2 +#define EMACS_MODE 3 +#define VI_MODE 4 +//#define WORDSTAR_MODE 5 +// Readline and tmux +#define READMUX 6 + +// GLOBAL variable. Sets startup default if no eeppom +char babble_mode = MAC_MODE ; + + +/* minimum set required for babble: + // Cut & Paste + BABL_UNDO + BABL_REDO + BABL_CUT + BABL_COPY + BABL_PASTE + BABL_SELECT_ALL + + // Movement + BABL_DEL_RIGHT_1C + BABL_DEL_RIGHT_1C + BABL_DEL_LEFT_WORD + BABL_DEL_RIGHT_WORD + BABL_GO_LEFT_1C + BABL_GO_LEFT_WORD + BABL_GO_RIGHT_WORD + BABL_GOTO_START_LINE + BABL_GOTO_START_DOC + BABL_GOTO_END_LINE + BABL_GOTO_END_DOC + BABL_GOTO_NEXT_LINE // down arrow will do. + BABL_GOTO_PREV_LINE // up arrow will do. + BABL_PGDN + BABL_PGUP + + // GUI + BABL_FIND + BABL_FIND_NEXT + BABL_FIND_REPLACE + BABL_RUNAPP + BABL_SWITCH_NEXT + BABL_SWITCH_LAST // previous + BABL_CLOSE_APP + BABL_HELP +*/ + + + + +static macro_t *babblePaste (keyrecord_t *record, uint16_t shortcut) { + + switch(babble_mode) { + +#ifdef MS_MODE + case MS_MODE: + switch(shortcut) { + + case BABL_UNDO: + return MACRO( D(LCTRL), T(Z), U(LCTRL), END ); + case BABL_REDO: + return MACRO( D(LCTRL), T(Y), U(LCTRL), END ); + case BABL_CUT: + return MACRO( D(LCTRL), T(X), U(LCTRL), END ); + case BABL_COPY: + return MACRO( D(LCTRL), T(C), U(LCTRL), END ); + case BABL_PASTE: + return MACRO( D(LCTRL), T(V), U(LCTRL), END ); + case BABL_SELECT_ALL: + return MACRO( D(LCTRL), T(A), U(LCTRL), END ); + case BABL_DEL_RIGHT_1C: + return MACRO( D(DEL), END ); + case BABL_DEL_LEFT_WORD: + return MACRO( D(LCTRL), T(BSPACE), U(LCTRL), END ); + case BABL_DEL_RIGHT_WORD: + return MACRO( D(LCTRL), T(DEL), U(LCTRL), END ); + case BABL_GO_LEFT_1C: + return MACRO( T(LEFT), END ); + case BABL_GO_RIGHT_1C: + return MACRO( T(RIGHT), END ); + case BABL_GO_LEFT_WORD: + return MACRO( D(LCTRL), T(LEFT), U(LCTRL), END ); + case BABL_GO_RIGHT_WORD: + return MACRO( D(LCTRL), T(RIGHT), U(LCTRL), END ); + case BABL_GOTO_START_LINE: + return MACRO( T(HOME), END ); + case BABL_GOTO_START_DOC: + return MACRO( D(LCTRL),T(HOME), U(LCTRL),END ); + case BABL_GOTO_END_LINE: + return MACRO( T(END), END ); + case BABL_GOTO_END_DOC: + return MACRO( D(LCTRL),T(END), U(LCTRL),END ); + case BABL_GOTO_NEXT_LINE: + return MACRO( T(DOWN), END ); + case BABL_GOTO_PREV_LINE: + return MACRO( T(UP), END ); + case BABL_PGDN: + return MACRO( T(PGDN), END ); + case BABL_PGUP: + return MACRO( T(PGUP), END ); + case BABL_FIND: + return MACRO( D(LCTRL),T(F), U(LCTRL),END ); + case BABL_FIND_NEXT: + return MACRO( T(F3),END ); + case BABL_FIND_REPLACE: + return MACRO( D(LCTRL),T(H), U(LCTRL),END ); + case BABL_RUNAPP: + return MACRO( D(LGUI),T(R), U(LGUI),END ); + case BABL_SWITCH_APP_NEXT: + return MACRO( D(LALT),T(TAB), U(LALT),END ); + case BABL_SWITCH_APP_LAST: + return MACRO( D(LSFT),D(LALT),T(TAB), U(LALT), U(LSFT),END ); + case BABL_CLOSE_APP: + return MACRO( D(LALT),T(F4), U(LALT),END ); + case BABL_HELP: + return MACRO( T(F1),END ); + break; + + return MACRO_NONE; + } + +#endif +#ifdef LINUX_MODE + case LINUX_MODE: + switch(shortcut) { + + case BABL_UNDO: + return MACRO( D(LCTRL), T(Z), U(LCTRL), END ); + case BABL_REDO: + return MACRO( D(LCTRL), T(Y), U(LCTRL), END ); + case BABL_CUT: + return MACRO( D(LCTRL), T(X), U(LCTRL), END ); + case BABL_COPY: + return MACRO( D(LCTRL), T(C), U(LCTRL), END ); + case BABL_PASTE: + return MACRO( D(LCTRL), T(V), U(LCTRL), END ); + case BABL_SELECT_ALL: + return MACRO( D(LCTRL), T(A), U(LCTRL), END ); + case BABL_DEL_RIGHT_1C: + return MACRO( D(DEL), END ); + case BABL_DEL_LEFT_WORD: + return MACRO( D(LCTRL), T(BSPACE), U(LCTRL), END ); + case BABL_DEL_RIGHT_WORD: + return MACRO( D(LCTRL), T(DEL), U(LCTRL), END ); + case BABL_GO_LEFT_1C: + return MACRO( T(LEFT), END ); + case BABL_GO_RIGHT_1C: + return MACRO( T(RIGHT), END ); + case BABL_GO_LEFT_WORD: + return MACRO( D(LCTRL), T(LEFT), U(LCTRL), END ); + case BABL_GO_RIGHT_WORD: + return MACRO( D(LCTRL), T(RIGHT), U(LCTRL), END ); + case BABL_GOTO_START_LINE: + return MACRO( T(HOME), END ); + case BABL_GOTO_START_DOC: + return MACRO( D(LCTRL),T(HOME), U(LCTRL),END ); + case BABL_GOTO_END_LINE: + return MACRO( T(END), END ); + case BABL_GOTO_END_DOC: + return MACRO( D(LCTRL),T(END), U(LCTRL),END ); + case BABL_GOTO_NEXT_LINE: + return MACRO( T(DOWN), END ); + case BABL_GOTO_PREV_LINE: + return MACRO( T(UP), END ); + case BABL_PGDN: + return MACRO( T(PGDN), END ); + case BABL_PGUP: + return MACRO( T(PGUP), END ); + case BABL_FIND: + return MACRO( D(LCTRL),T(F), U(LCTRL),END ); + case BABL_FIND_NEXT: + /* return MACRO( T(F3),END ); KDE */ + return MACRO( D(LCTRL),T(G), U(LCTRL),END ); // Gnome*/ + case BABL_FIND_REPLACE: + /* return MACRO( D(LCTRL),T(R), U(LCTRL),END ); KDE */ + return MACRO( D(LCTRL),T(H), U(LCTRL),END ); // Gnome*/ + case BABL_RUNAPP: + return MACRO( D(LALT),T(F2), U(LALT),END ); + case BABL_SWITCH_APP_NEXT: + return MACRO( D(LCTL),T(TAB), U(LCTL),END ); + case BABL_SWITCH_APP_LAST: + return MACRO( D(LSFT),D(LCTL),T(TAB), U(LCTL), U(LSFT),END ); + case BABL_CLOSE_APP: + return MACRO( D(LALT),T(F4), U(LALT),END ); + case BABL_HELP: + return MACRO_NONE; + break; + + return MACRO_NONE; + } + +#endif + + + +#ifdef MAC_MODE + case MAC_MODE: + switch(shortcut) { + + case BABL_UNDO: + return MACRO( D(LGUI), T(Z), U(LGUI), END ); + case BABL_REDO: + return MACRO( D(LSFT),D(LGUI), T(Z), U(LSFT),U(LGUI), END ); + case BABL_CUT: + return MACRO( D(LGUI), T(X), U(LGUI), END ); + case BABL_COPY: + return MACRO( D(LGUI), T(C), U(LGUI), END ); + case BABL_PASTE: + return MACRO( D(LGUI), T(V), U(LGUI), END ); + case BABL_SELECT_ALL: + return MACRO( D(LGUI), T(A), U(LGUI), END ); + case BABL_DEL_RIGHT_1C: + return MACRO( D(DEL), END ); + case BABL_DEL_LEFT_WORD: + return MACRO( D(LALT), T(BSPACE), U(LALT), END ); + case BABL_DEL_RIGHT_WORD: + return MACRO( D(LALT), T(DEL), U(LALT), END ); + case BABL_GO_LEFT_1C: + return MACRO( T(LEFT), END ); + case BABL_GO_RIGHT_1C: + return MACRO( T(RIGHT), END ); + case BABL_GO_LEFT_WORD: + return MACRO( D(LALT), T(LEFT), U(LALT), END ); + case BABL_GO_RIGHT_WORD: + return MACRO( D(LALT), T(RIGHT), U(LALT), END ); + case BABL_GOTO_START_LINE: + return MACRO( D(LGUI), T(LEFT), U(LGUI), END ); + case BABL_GOTO_START_DOC: + return MACRO( D(LGUI),T(UP), U(LGUI),END ); + case BABL_GOTO_END_LINE: + return MACRO( D(LGUI), T(RIGHT), U(LGUI), END ); + case BABL_GOTO_END_DOC: + return MACRO( D(LGUI),T(DOWN), U(LGUI),END ); + case BABL_GOTO_NEXT_LINE: + return MACRO( T(DOWN), END ); + case BABL_GOTO_PREV_LINE: + return MACRO( T(UP), END ); + case BABL_PGDN: + return MACRO( D(LALT), T(DOWN), U(LALT), END ); + case BABL_PGUP: + return MACRO( D(LALT), T(UP), U(LALT), END ); + case BABL_FIND: + return MACRO( D(LGUI),T(F), U(LGUI),END ); + case BABL_FIND_NEXT: + return MACRO( D(LGUI),T(G), U(LGUI),END ); + case BABL_FIND_REPLACE: + return MACRO( D(LGUI),T(F), U(LGUI),END ); + case BABL_RUNAPP: + return MACRO( D(LGUI),T(R), U(LGUI),END ); + case BABL_SWITCH_APP_NEXT: + return MACRO( D(LGUI),T(TAB), U(LGUI),END ); + case BABL_SWITCH_APP_LAST: + return MACRO( D(LSFT),D(LGUI),T(TAB), U(LGUI), U(LSFT),END ); + case BABL_CLOSE_APP: + return MACRO( D(LGUI),T(Q), U(LGUI),END ); + case BABL_HELP: + return MACRO( D(LSFT),D(LGUI),T(SLASH), U(LGUI), U(LSFT),END ); + break; + + return MACRO_NONE; + } + +#endif + +#ifdef EMACS_MODE + case EMACS_MODE: + switch(shortcut) { +//probably should allow meta to not be ALT + case BABL_UNDO: + return MACRO( D(LCTL), T(X), U(LCTL),T(C), END ); + case BABL_REDO: + return MACRO( D(LCTL), T(X), U(LCTL),T(C), END ); // arguably + case BABL_CUT: + return MACRO( D(LCTL), T(W), U(LCTL), END ); + case BABL_COPY: + return MACRO( D(LALT), T(W), U(LALT), END ); + case BABL_PASTE: + return MACRO( D(LCTL), T(Y), U(LCTL), END ); + case BABL_SELECT_ALL: + return MACRO(D(LCTL), T(X), U(LCTL),T(H), END ); + case BABL_DEL_RIGHT_1C: + return MACRO( D(LCTL), T(D), U(LCTL),END ); + case BABL_DEL_LEFT_WORD: + return MACRO( D(LCTL), T(BSPACE), U(LCTL), END ); + case BABL_DEL_RIGHT_WORD: + return MACRO( D(LALT), T(D), U(LALT), END ); + case BABL_GO_LEFT_1C: + return MACRO( T(LEFT), END ); + case BABL_GO_RIGHT_1C: + return MACRO( T(RIGHT), END ); + case BABL_GO_LEFT_WORD: + return MACRO( D(LALT), T(B), U(LALT), END ); + case BABL_GO_RIGHT_WORD: + return MACRO( D(LALT), T(F), U(LALT), END ); + case BABL_GOTO_START_LINE: + return MACRO( D(LCTRL), T(A), U(LCTRL), END ); + case BABL_GOTO_START_DOC: + return MACRO( D(LALT), D(LSFT), T(COMM),U(LSFT), U(LALT) ,END ); + case BABL_GOTO_END_LINE: + return MACRO( D(LCTRL), T(E), U(LCTRL), END ); + case BABL_GOTO_END_DOC: + return MACRO( D(LALT), D(LSFT), T(DOT),U(LSFT), U(LALT) ,END ); + case BABL_GOTO_NEXT_LINE: + return MACRO( D(LCTRL), T(N), U(LCTRL), END ); + case BABL_GOTO_PREV_LINE: + rreturn MACRO( D(LCTRL), T(P), U(LCTRL), END ); + case BABL_PGDN: + return MACRO(D(LCTRL), T(V), U(LCTRL), END ); + case BABL_PGUP: + return MACRO( D(LALT), T(V), U(LALT), END ); + case BABL_FIND: + return MACRO( D(LCTRL), T(S), U(LCTRL),END ); + case BABL_FIND_NEXT: + return MACRO( D(LCTRL), T(S), U(LCTRL),END ); + case BABL_FIND_REPLACE: + return MACRO( D(LALT),D(LSFT), T(5),U(LSFT), U(LALT), END ); + case BABL_RUNAPP: + return MACRO( D(LALT), T(X), U(LALT),T(S),T(H),T(E),T(L),T(L),END );// arguably + case BABL_SWITCH_APP_NEXT: + return MACRO( D(LCTL), T(X), U(LCTL),T(RIGHT), END ); // arguably + case BABL_SWITCH_APP_LAST: + return MACRO( D(LCTL), T(X), U(LCTL),T(LEFT), END ); // arguably + case BABL_CLOSE_APP: + return MACRO(D(LCTL), T(X), U(LCTL),T(C),END ); + case BABL_HELP: + return MACRO( D(LCTL),T(H), U(LCTL),T(A),END); // start search in help + break; + + return MACRO_NONE; + } + +#endif +#ifdef VI_MODE + case VI_MODE: + switch(shortcut) { +//assume esc is already called + case BABL_UNDO: + return MACRO( T(U), END ); + case BABL_REDO: + return MACRO( D(LCTL), T(R), U(LCTL), END ); + case BABL_CUT: + return MACRO( T(X), END ); + case BABL_COPY: + return MACRO( T(Y),END ); + case BABL_PASTE: + return MACRO( T(P), END ); + case BABL_SELECT_ALL: + return MACRO( T(COLN),T(PERC),T(Y), END ); // wrong but helpful? + case BABL_DEL_RIGHT_1C: + return MACRO( T(X),END ); + case BABL_DEL_LEFT_WORD: + return MACRO( T(D),T(G),T(E),END ); + case BABL_DEL_RIGHT_WORD: + return MACRO( T(D),T(W),END ); + case BABL_GO_LEFT_1C: + return MACRO( T(H), END ); + case BABL_GO_RIGHT_1C: + return MACRO( T(L), END ); + case BABL_GO_LEFT_WORD: + return MACRO( T(B),END ); + case BABL_GO_RIGHT_WORD: + return MACRO( T(W), END ); + case BABL_GOTO_START_LINE: + return MACRO( T(CIRC), END ); + case BABL_GOTO_START_DOC: + return MACRO( T(G),T(G) ,END ); + case BABL_GOTO_END_LINE: + return MACRO( T(DLR), END ); + case BABL_GOTO_END_DOC: + return MACRO( D(LSFT), T(G),U(LSFT), ,END ); + case BABL_GOTO_NEXT_LINE: + return MACRO( T(J), END ); + case BABL_GOTO_PREV_LINE: + rreturn MACRO( T(K), END ); + case BABL_PGDN: + return MACRO(D(LCTRL), T(F), U(LCTRL), END ); + case BABL_PGUP: + return MACRO( D(LCTRL), T(B), U(LCTRL), END ); + case BABL_FIND: + return MACRO( T(SLASH),END ); + case BABL_FIND_NEXT: + return MACRO( T(N),END ); + case BABL_FIND_REPLACE: + return MACRO( D(LALT),D(LSFT), T(5),U(LSFT), U(LALT), END ); + case BABL_RUNAPP: + return MACRO_NONE; + case BABL_SWITCH_APP_NEXT: + return MACRO_NONE; + case BABL_SWITCH_APP_LAST: + return MACRO_NONE; + case BABL_CLOSE_APP: + return MACRO(T(COLN), T(Q), T(EXLM),END ); + case BABL_HELP: + return MACRO(T(COLN),T(H),END); // start search in help + break; + + return MACRO_NONE; + } + +#endif +#ifdef READMUX_MODE +// I havent decided how much to do bash and how much tmux + case READMUX_MODE: + switch(shortcut) { + case BABL_UNDO: + return MACRO( D(LALT), T(R), U(LALT) , END ); + case BABL_REDO: + return MACRO( D(LCTL), T(X), U(LCTL),T(C), END ); // arguably + case BABL_CUT: + return MACRO( D(LCTL), T(K), U(LCTL), END ); // wrong half the time + case BABL_COPY: + return MACRO_NONE; + case BABL_PASTE: + return MACRO( D(LCTL), T(Y), U(LCTL), END ); + case BABL_SELECT_ALL: + return MACRO(D(LCTL), T(A), T(K), T(Y), U(LCTL) , END ); // should this be tmux all? + case BABL_DEL_RIGHT_1C: + return MACRO( D(LCTL), T(D), U(LCTL),END ); + case BABL_DEL_LEFT_WORD: + return MACRO( D(LCTL), T(W), U(LCTL), END ); + case BABL_DEL_RIGHT_WORD: + return MACRO( D(LALT), T(D), U(LALT), END ); + case BABL_GO_LEFT_1C: + return MACRO( T(LEFT), END ); + case BABL_GO_RIGHT_1C: + return MACRO( T(RIGHT), END ); + case BABL_GO_LEFT_WORD: + return MACRO( D(LALT), T(B), U(LALT), END ); + case BABL_GO_RIGHT_WORD: + return MACRO( D(LALT), T(F), U(LALT), END ); + case BABL_GOTO_START_LINE: + return MACRO( D(LCTRL), T(A), U(LCTRL), END ); + case BABL_GOTO_START_DOC: + return MACRO_NONE; // tmux? + case BABL_GOTO_END_LINE: + return MACRO( D(LCTRL), T(E), U(LCTRL), END ); + case BABL_GOTO_END_DOC: + return MACRO_NONE; // tmux? + case BABL_GOTO_NEXT_LINE: + return MACRO( D(LCTRL), T(N), U(LCTRL), END ); + case BABL_GOTO_PREV_LINE: + return MACRO( D(LCTRL), T(P), U(LCTRL), END ); + case BABL_PGDN: + return MACRO( T(PGDN), END ); + case BABL_PGUP: + return MACRO( T(PGUP), END ); + case BABL_FIND: + return MACRO( D(LCTRL), T(R), U(LCTRL), END ); // search history + case BABL_FIND_NEXT: + eturn MACRO( D(LCTRL), T(S), U(LCTRL), END ); + case BABL_FIND_REPLACE: + return MACRO_NONE; // tmux? + case BABL_RUNAPP: + return MACRO( D(LCTRL), T(B), U(LCTRL), T(C),END ); //tmux + case BABL_SWITCH_APP_NEXT: + return MACRO( D(LCTRL), T(B), U(LCTRL), T(N),END ); //tmux + case BABL_SWITCH_APP_LAST: + return MACRO( D(LCTRL), T(B), U(LCTRL), T(P),END ); //tmux + case BABL_CLOSE_APP: + return MACRO( D(LCTRL), T(B), U(LCTRL), T(D),END); // usually what I want + break; + case BABL_HELP: + return MACRO_NONE; + break; + + return MACRO_NONE; + } + +#endif + return MACRO_NONE; +} \ No newline at end of file -- cgit v1.2.3 From a8a49276220ab6b91b0d8e40282c2ae5cb87444e Mon Sep 17 00:00:00 2001 From: Eric Dodd Date: Wed, 1 Mar 2017 21:39:19 -0500 Subject: gh60 spacefn --- keyboards/gh60/keymaps/unxmaal/Makefile | 112 +++++++++++ keyboards/gh60/keymaps/unxmaal/README.md | 20 ++ keyboards/gh60/keymaps/unxmaal/WS2812-wiring.jpg | Bin 0 -> 1038926 bytes keyboards/gh60/keymaps/unxmaal/config.h | 190 +++++++++++++++++++ keyboards/gh60/keymaps/unxmaal/keymap.c | 228 +++++++++++++++++++++++ 5 files changed, 550 insertions(+) create mode 100644 keyboards/gh60/keymaps/unxmaal/Makefile create mode 100644 keyboards/gh60/keymaps/unxmaal/README.md create mode 100644 keyboards/gh60/keymaps/unxmaal/WS2812-wiring.jpg create mode 100644 keyboards/gh60/keymaps/unxmaal/config.h create mode 100644 keyboards/gh60/keymaps/unxmaal/keymap.c diff --git a/keyboards/gh60/keymaps/unxmaal/Makefile b/keyboards/gh60/keymaps/unxmaal/Makefile new file mode 100644 index 000000000..c73cf1141 --- /dev/null +++ b/keyboards/gh60/keymaps/unxmaal/Makefile @@ -0,0 +1,112 @@ +#---------------------------------------------------------------------------- +# On command line: +# +# make all = Make software. +# +# make clean = Clean out built project files. +# +# make coff = Convert ELF to AVR COFF. +# +# make extcoff = Convert ELF to AVR Extended COFF. +# +# make program = Download the hex file to the device. +# Please customize your programmer settings(PROGRAM_CMD) +# +# make teensy = Download the hex file to the device, using teensy_loader_cli. +# (must have teensy_loader_cli installed). +# +# make dfu = Download the hex file to the device, using dfu-programmer (must +# have dfu-programmer installed). +# +# make flip = Download the hex file to the device, using Atmel FLIP (must +# have Atmel FLIP installed). +# +# make dfu-ee = Download the eeprom file to the device, using dfu-programmer +# (must have dfu-programmer installed). +# +# make flip-ee = Download the eeprom file to the device, using Atmel FLIP +# (must have Atmel FLIP installed). +# +# make debug = Start either simulavr or avarice as specified for debugging, +# with avr-gdb or avr-insight as the front end for debugging. +# +# make filename.s = Just compile filename.c into the assembler code only. +# +# make filename.i = Create a preprocessed source file for use in submitting +# bug reports to the GCC project. +# +# To rebuild project do "make clean" then "make all". +#---------------------------------------------------------------------------- + +# 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 +# comment out to disable the options. +# +BOOTMAGIC_ENABLE ?= yes # 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 +KEYBOARD_LOCK_ENABLE ?= yes # Allow locking of keyboard via magic key +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +# SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend +NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +# BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality +# MIDI_ENABLE ?= YES # MIDI controls +# UNICODE_ENABLE ?= YES # Unicode +# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE ?= yes # Enable RGB Underglow + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif + diff --git a/keyboards/gh60/keymaps/unxmaal/README.md b/keyboards/gh60/keymaps/unxmaal/README.md new file mode 100644 index 000000000..52bf97ef4 --- /dev/null +++ b/keyboards/gh60/keymaps/unxmaal/README.md @@ -0,0 +1,20 @@ +Unxmaal's GH60 Layout +===================== +* Mostly stolen from /u/robotmaxtron + +##Quantum MK Firmware +For the full Quantum feature list, see the parent readme.md. + +* Standard Mac ANSI layout +* Spacebar acts as space when tapped, Fn when held +* Menu acts as menu when tapped, Fn2 when held +* Layer1: + * Top row = `~, F1-F12, Del + * JKIL = arrow cluster +* Layer2: + * Top row = media controls + * JKIL = PgDn/Up/Home/Insert + * Backspace = Reset + +### Additional Credits +Keymap has been based on various keymaps available from the QMK Repo for the GH60-SATAN and KC60 keyboards. diff --git a/keyboards/gh60/keymaps/unxmaal/WS2812-wiring.jpg b/keyboards/gh60/keymaps/unxmaal/WS2812-wiring.jpg new file mode 100644 index 000000000..4ab8cc31a Binary files /dev/null and b/keyboards/gh60/keymaps/unxmaal/WS2812-wiring.jpg differ diff --git a/keyboards/gh60/keymaps/unxmaal/config.h b/keyboards/gh60/keymaps/unxmaal/config.h new file mode 100644 index 000000000..bb218d6fd --- /dev/null +++ b/keyboards/gh60/keymaps/unxmaal/config.h @@ -0,0 +1,190 @@ +/* +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 geekhack +#define PRODUCT GH60 +#define DESCRIPTION t.m.k. keyboard firmware for GH60 + +/* 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 } +// Rev A +// #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B0, B5, B4, D7, D6, B3 } +// Rev B/C +#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 3 + +/* 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 + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * RGB Underglow + * These settings are for the F4 by default: + * + * + * #define ws2812_PORTREG PORTF + * #define ws2812_DDRREG DDRF + * #define ws2812_pin PF4 + * #define RGBLED_NUM 14 // Number of LEDs + * #define RGBLIGHT_HUE_STEP 10 + * #define RGBLIGHT_SAT_STEP 17 + * #define RGBLIGHT_VAL_STEP 17 + * + * The firmware supports 5 different light effects, and the color (hue, saturation, brightness) can be customized in most effects. + * To control the underglow, you need to modify your keymap file to assign those functions to some keys/key combinations. + * For details, please check this keymap. keyboard/planck/keymaps/yang/keymap.c +*/ + +/* Deprecated code below +#define ws2812_PORTREG PORTF +#define ws2812_DDRREG DDRF +#define ws2812_pin PF4 +*/ +#define RGB_DI_PIN F4 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 8 // Number of LEDs +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif diff --git a/keyboards/gh60/keymaps/unxmaal/keymap.c b/keyboards/gh60/keymaps/unxmaal/keymap.c new file mode 100644 index 000000000..7c9bd6a6d --- /dev/null +++ b/keyboards/gh60/keymaps/unxmaal/keymap.c @@ -0,0 +1,228 @@ +#include "gh60.h" +#include "action_layer.h" + +#define _BL 0 +#define _AL 1 +#define _FL 2 +#define _UL 3 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ANSI Base, Mac style + * ,-----------------------------------------------------------------------------. + * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| = | Backsp | + * |-----------------------------------------------------------------------------| + * |Tab | Q | W | E | R | T | Y | U | I| O| P| [| ]| \| + * |-----------------------------------------------------------------------------| + * |Caps/Fn | A| S| D| F| G| H| J| K| L| ;| '| Enter | + * |-----------------------------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /| Shift | + * |-----------------------------------------------------------------------------| + * |Fn|Alt |Gui | Space(tapped), Fn(held) |Gui |Alt |Menu(tapped, Fn2(held)|Ctrl| + * `-----------------------------------------------------------------------------' + */ + [_BL] = KEYMAP( + KC_ESC,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_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_LCTL,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_RSFT, \ + MO(1),KC_LALT,KC_LGUI, LT(1,KC_SPACE), KC_NO, KC_RGUI, KC_RALT, LT(2,KC_MENU), KC_RCTL), + + /* + * Pok3r style arrow cluster + * ,-----------------------------------------------------------. + * |`~ | F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12|DEL | + * |-----------------------------------------------------------| + * | | | | | | | | |Up| | | | | | + * |-----------------------------------------------------------| + * | | | | | | | |Left|Down|Right| | | | + * |-----------------------------------------------------------| + * | | | | | | | | | | | | | + * |-----------------------------------------------------------| + * | | | | | | | | | + * `-----------------------------------------------------------' + */ + [_AL] = 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_DELETE, \ + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_UP,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_LEFT,KC_DOWN,KC_RGHT,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,KC_TRNS,KC_TRNS,KC_TRNS, \ + KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS), + + + /* + * Secondary function layer + * ,-------------------------------------------------------------. + * | | | | | | | | RW|Play|FF| Mute| Vol Down | Vol up |Reset | + * |-------------------------------------------------------------| + * | | | | | | | | | |PgUp| | | | | + * |-------------------------------------------------------------| + * | | | | | | | |Home|PgDown|End| | | | + * |-------------------------------------------------------------| + * | | | | | | | | | | | | | + * |-------------------------------------------------------------| + * | | | | | | | | | + * `-------------------------------------------------------------' + */ + [_FL] = KEYMAP( + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_MPRV,KC_MPLY,KC_MNXT,KC_MUTE,KC_VOLD,KC_VOLU,RESET, \ + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PGUP,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \ + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_HOME,KC_TRNS,KC_HOME,KC_PGDN,KC_END,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,KC_TRNS,KC_TRNS, \ + KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS), + + /* + * Locking layer for controlling the underglow. + * NOTE: currently unused. + * + * ,-----------------------------------------------------------. + * | | | | | | | | | | | | | | | + * |-----------------------------------------------------------| + * | | | | | | | | | | | | | | | + * |-----------------------------------------------------------| + * | |On|Mode| | | | | | | | | | | + * |-----------------------------------------------------------| + * | | |Hue+|Hue-|Sat+|Sat-|Val+|Val-| | | | | + * |-----------------------------------------------------------| + * | | | | | | | | | + * `-----------------------------------------------------------' + */ + [_UL] = 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,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,F(4),F(5),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,F(6),F(7),F(8),F(9),F(10),F(11),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), +}; + +enum function_id { + RGBLED_TOGGLE, + RGBLED_STEP_MODE, + RGBLED_INCREASE_HUE, + RGBLED_DECREASE_HUE, + RGBLED_INCREASE_SAT, + RGBLED_DECREASE_SAT, + RGBLED_INCREASE_VAL, + RGBLED_DECREASE_VAL, + SHIFT_ESC, +}; + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_MOMENTARY(2), // Momentary Fn overlay + [1] = ACTION_LAYER_TOGGLE(1), // Toggle Arrow Layer overlay + [2] = ACTION_LAYER_TAP_KEY(2, KC_CAPS), // Tap to toggle caps lock and hold to activate function layer + [3] = ACTION_LAYER_TOGGLE(3), // Toggle Underglow Layer overlay + [4] = ACTION_FUNCTION(RGBLED_TOGGLE), //Turn on/off underglow + [5] = ACTION_FUNCTION(RGBLED_STEP_MODE), // Change underglow mode + [6] = ACTION_FUNCTION(RGBLED_INCREASE_HUE), + [7] = ACTION_FUNCTION(RGBLED_DECREASE_HUE), + [8] = ACTION_FUNCTION(RGBLED_INCREASE_SAT), + [9] = ACTION_FUNCTION(RGBLED_DECREASE_SAT), + [10] = ACTION_FUNCTION(RGBLED_INCREASE_VAL), + [11] = ACTION_FUNCTION(RGBLED_DECREASE_VAL), + [12] = ACTION_FUNCTION(SHIFT_ESC), + [13] = ACTION_LAYER_TAP_KEY(1, KC_SPACE), +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; + +void matrix_scan_user(void) { + +// Layer LED indicators +// ESC led on when in function layer, WASD cluster leds enabled when on arrow cluster + uint32_t layer = layer_state; + if (layer & (1<<1)) { + gh60_wasd_leds_on(); + } else { + gh60_wasd_leds_off(); + } + + if (layer & (1<<2)) { + gh60_esc_led_on(); + } else { + gh60_esc_led_off(); + } +}; + +#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) + +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { + switch (id) { + case RGBLED_TOGGLE: + //led operations + if (record->event.pressed) { + rgblight_toggle(); + } + break; + case RGBLED_INCREASE_HUE: + if (record->event.pressed) { + rgblight_increase_hue(); + } + break; + case RGBLED_DECREASE_HUE: + if (record->event.pressed) { + rgblight_decrease_hue(); + } + break; + case RGBLED_INCREASE_SAT: + if (record->event.pressed) { + rgblight_increase_sat(); + } + break; + case RGBLED_DECREASE_SAT: + if (record->event.pressed) { + rgblight_decrease_sat(); + } + break; + case RGBLED_INCREASE_VAL: + if (record->event.pressed) { + rgblight_increase_val(); + } + break; + case RGBLED_DECREASE_VAL: + if (record->event.pressed) { + rgblight_decrease_val(); + } + break; + case RGBLED_STEP_MODE: + if (record->event.pressed) { + rgblight_step(); + } + break; + static uint8_t shift_esc_shift_mask; + // Shift + ESC = ~ + case SHIFT_ESC: + shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; + if (record->event.pressed) { + if (shift_esc_shift_mask) { + add_key(KC_GRV); + send_keyboard_report(); + } else { + add_key(KC_ESC); + send_keyboard_report(); + } + } else { + if (shift_esc_shift_mask) { + del_key(KC_GRV); + send_keyboard_report(); + } else { + del_key(KC_ESC); + send_keyboard_report(); + } + } + break; + } +}; -- cgit v1.2.3 From d35809a98289597fd437479422489118f78653ac Mon Sep 17 00:00:00 2001 From: Eric Dodd Date: Wed, 1 Mar 2017 21:40:13 -0500 Subject: gh60 satan spacefn --- keyboards/satan/keymaps/unxmaal/Makefile | 21 ++++++ keyboards/satan/keymaps/unxmaal/README.md | 20 +++++ keyboards/satan/keymaps/unxmaal/keymap.c | 119 ++++++++++++++++++++++++++++++ 3 files changed, 160 insertions(+) create mode 100644 keyboards/satan/keymaps/unxmaal/Makefile create mode 100644 keyboards/satan/keymaps/unxmaal/README.md create mode 100644 keyboards/satan/keymaps/unxmaal/keymap.c diff --git a/keyboards/satan/keymaps/unxmaal/Makefile b/keyboards/satan/keymaps/unxmaal/Makefile new file mode 100644 index 000000000..ee94a67b4 --- /dev/null +++ b/keyboards/satan/keymaps/unxmaal/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 = no # 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 = yes # 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 = yes # 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/satan/keymaps/unxmaal/README.md b/keyboards/satan/keymaps/unxmaal/README.md new file mode 100644 index 000000000..50ad0cf1f --- /dev/null +++ b/keyboards/satan/keymaps/unxmaal/README.md @@ -0,0 +1,20 @@ +Unxmaal's GH60 Satan Layout +===================== +* Mostly stolen from /u/robotmaxtron + +##Quantum MK Firmware +For the full Quantum feature list, see the parent readme.md. + +* Standard Mac ANSI layout +* Spacebar acts as space when tapped, Fn when held +* Menu acts as menu when tapped, Fn2 when held +* Layer1: + * Top row = `~, F1-F12, Del + * JKIL = arrow cluster +* Layer2: + * Top row = media controls + * JKIL = PgDn/Up/Home/Insert + * Backspace = Reset + +### Additional Credits +Keymap has been based on various keymaps available from the QMK Repo for the GH60-SATAN and KC60 keyboards. \ No newline at end of file diff --git a/keyboards/satan/keymaps/unxmaal/keymap.c b/keyboards/satan/keymaps/unxmaal/keymap.c new file mode 100644 index 000000000..657602de0 --- /dev/null +++ b/keyboards/satan/keymaps/unxmaal/keymap.c @@ -0,0 +1,119 @@ +#include "satan.h" + + +// Used for SHIFT_ESC +#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) + +// 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 _BL 0 +#define _AL 1 +#define _FL 2 + +#define _______ KC_TRNS + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ANSI Base, Mac style + * ,-----------------------------------------------------------------------------. + * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| = | Backsp | + * |-----------------------------------------------------------------------------| + * |Tab | Q | W | E | R | T | Y | U | I| O| P| [| ]| \| + * |-----------------------------------------------------------------------------| + * |Caps/Fn | A| S| D| F| G| H| J| K| L| ;| '| Enter | + * |-----------------------------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /| Shift | + * |-----------------------------------------------------------------------------| + * |Fn|Alt |Gui | Space(tapped), Fn(held) |Gui |Alt |Menu(tapped, Fn2(held)|Ctrl| + * `-----------------------------------------------------------------------------' + */ +[_BL] = KEYMAP_ANSI( + KC_ESC, 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_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_LCTL, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + MO(_AL), KC_LALT,KC_LGUI, LT(_AL,KC_SPACE), KC_RGUI, KC_RALT, LT(_FL,KC_MENU), KC_RCTL), + /* + * Pok3r style arrow cluster + * ,-----------------------------------------------------------. + * |`~ | F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12|DEL | + * |-----------------------------------------------------------| + * | | | | | | | | |Up| | | | | | + * |-----------------------------------------------------------| + * | | | | | | | |Left|Down|Right| | | | + * |-----------------------------------------------------------| + * | | | | | | | | | | | | | + * |-----------------------------------------------------------| + * | | | | | | | | | + * `-----------------------------------------------------------' + */ +[_AL] = KEYMAP_ANSI( + 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_DELETE, \ + KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_UP,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_LEFT,KC_DOWN,KC_RGHT,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, \ + KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS), + /* Keymap _FL: Function Layer + * ,-----------------------------------------------------------. + * | | | | | | | | | | | | | | RESET| + * |-----------------------------------------------------------| + * | | | | | | | | | | | |BL-|BL+|BL | + * |-----------------------------------------------------------| + * | | | | | | | | | | | | | + * |-----------------------------------------------------------| + * | | RGB on|RGB step|Hue+|Hue- |Sat+|Sat-|Val+| Val-| | | | + * |-----------------------------------------------------------| + * | | | | | | | | | + * `-----------------------------------------------------------' + */ +[_FL] = KEYMAP_ANSI( + #ifdef RGBLIGHT_ENABLE + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,RESET, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, BL_DEC,BL_INC, BL_TOGG, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ + _______,RGB_TOG,RGB_MOD,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD,_______,_______,_______, \ + _______,_______,_______, _______, _______,_______,_______, _______), + #else + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,RESET, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, BL_DEC, BL_INC,BL_TOGG, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ + _______,_______,_______, _______, _______,_______,_______,_______), + #endif +}; + +enum function_id { + SHIFT_ESC, +}; + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_FUNCTION(SHIFT_ESC), +}; + +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { + static uint8_t shift_esc_shift_mask; + switch (id) { + case SHIFT_ESC: + shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; + if (record->event.pressed) { + if (shift_esc_shift_mask) { + add_key(KC_GRV); + send_keyboard_report(); + } else { + add_key(KC_ESC); + send_keyboard_report(); + } + } else { + if (shift_esc_shift_mask) { + del_key(KC_GRV); + send_keyboard_report(); + } else { + del_key(KC_ESC); + send_keyboard_report(); + } + } + break; + } +} -- cgit v1.2.3 From 61459ab5ba75ba4176589098b659a7a1d5eaf669 Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Thu, 2 Mar 2017 11:40:25 +0000 Subject: moar hotkeys --- keyboards/planck/keymaps/callum/keymap.c | 14 +++++++------- keyboards/planck/keymaps/callum/readme.md | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index e1841dbd8..aede27df7 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -48,19 +48,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* MOVE * ,-----------------------------------------------------------------------------------. - * | H(3) | H(F1)| H(F2)| H(F3)| H(F4)| H(F5)| | Home | Up | End | | Esc | + * | H(3) | H(F1)| H(F2)| H(F3)| H(F4)| H(F5)| H(8) | Home | Up | End | H(7) | Esc | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | H(4) | H(F6)| H(F7)| H(F8)| H(F9)|H(F10)| | Left | Down | Right| Caps | Del | + * | H(4) | H(F6)| H(F7)| H(F8)| H(F9)|H(F10)| H(9) | Left | Down | Right| Caps | Del | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | |H(F11)|H(F12)| H(0) | H(1) | H(2) | | Pg Dn| Pg Up| | | | + * | |H(F11)|H(F12)| H(0) | H(1) | H(2) | H(A) | Pg Dn| Pg Up| H(5) | H(6) | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ [_MOVE] = { - {H(KC_3), H(KC_F1),H(KC_F2),H(KC_F3),H(KC_F4),H(KC_F5),XXXXXXX, KC_HOME, KC_UP, KC_END, XXXXXXX, KC_ESC }, - {H(KC_4), H(KC_F6),H(KC_F7),H(KC_F8),H(KC_F9),H(KC_F10),XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_CAPS, KC_DEL }, - {_______, H(KC_F11),H(KC_F12),H(KC_0),H(KC_1),H(KC_2), XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, XXXXXXX, _______}, + {H(KC_3), H(KC_F1),H(KC_F2),H(KC_F3),H(KC_F4),H(KC_F5),H(KC_8), KC_HOME, KC_UP, KC_END, H(KC_7), KC_ESC }, + {H(KC_4), H(KC_F6),H(KC_F7),H(KC_F8),H(KC_F9),H(KC_F10),H(KC_9),KC_LEFT, KC_DOWN, KC_RGHT, KC_CAPS, KC_DEL }, + {_______, H(KC_F11),H(KC_F12),H(KC_0),H(KC_1),H(KC_2), H(KC_A), KC_PGDN, KC_PGUP, H(KC_5), H(KC_6), _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} }, @@ -114,7 +114,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_FUNC] = { {RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_VOLU}, {XXXXXXX, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_VOLD}, - {_______, KC_F21, KC_F22, KC_F23, KC_F24, XXXXXXX, XXXXXXX, KC_POWER, XXXXXXX, XXXXXXX, XXXXXXX, _______}, + {_______, KC_F21, KC_F22, KC_F23, KC_F24, XXXXXXX, XXXXXXX, KC_POWER,XXXXXXX, XXXXXXX, XXXXXXX, _______}, {_______, _______, _______, _______, KC_MPRV, KC_MUTE, KC_MPLY, KC_MNXT, _______, _______, _______, _______} } diff --git a/keyboards/planck/keymaps/callum/readme.md b/keyboards/planck/keymaps/callum/readme.md index 1f8f92257..4d4e5cdd7 100644 --- a/keyboards/planck/keymaps/callum/readme.md +++ b/keyboards/planck/keymaps/callum/readme.md @@ -6,7 +6,7 @@ This is a layout for the grid planck, built with a few ideals in mind: - The hands should never need to leave the home position. The usual culprit for this is the arrow cluster, so the arrow cluster should be as close to home as possible. - There should be two of every modifier (one on each side), otherwise certain long key combinations become hard to make. -We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow cluster, a hotkey cluster, and other movement keys; a `SYMB` layer, with numbers and symbols; a `FUNC` layer, with function keys and media keys; and a `MOUSE` layer, with mouse emulation. The `MOUSE` layer is activated by holding the Move and Symb keys simultaniously. +We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow cluster, other movement keys, and hotkeys; a `SYMB` layer, with numbers and symbols; a `FUNC` layer, with function keys and media keys; and a `MOUSE` layer, with mouse emulation. The `MOUSE` layer is activated by holding the Move and Symb keys simultaniously. ``` /* BASE @@ -23,11 +23,11 @@ We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow c /* MOVE * ,-----------------------------------------------------------------------------------. - * | H(3) | H(F1)| H(F2)| H(F3)| H(F4)| H(F5)| | Home | Up | End | | Esc | + * | H(3) | H(F1)| H(F2)| H(F3)| H(F4)| H(F5)| H(8) | Home | Up | End | H(7) | Esc | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | H(4) | H(F6)| H(F7)| H(F8)| H(F9)|H(F10)| | Left | Down | Right| Caps | Del | + * | H(4) | H(F6)| H(F7)| H(F8)| H(F9)|H(F10)| H(9) | Left | Down | Right| Caps | Del | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | |H(F11)|H(F12)| H(0) | H(1) | H(2) | | Pg Dn| Pg Up| | | | + * | |H(F11)|H(F12)| H(0) | H(1) | H(2) | H(A) | Pg Dn| Pg Up| H(5) | H(6) | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' -- cgit v1.2.3 From d11962aeb27c73b87f8154d7f2cee747c8858d09 Mon Sep 17 00:00:00 2001 From: Gabriel Young Date: Thu, 2 Mar 2017 11:40:06 -0800 Subject: fix 'stop_all_notes' naming to be more consistent --- quantum/process_keycode/process_audio.c | 2 +- quantum/process_keycode/process_audio.h | 2 +- quantum/process_keycode/process_midi.c | 2 +- quantum/process_keycode/process_midi.h | 2 +- quantum/process_keycode/process_music.c | 4 ++-- quantum/template/keymaps/default/Makefile | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/quantum/process_keycode/process_audio.c b/quantum/process_keycode/process_audio.c index 71c0297ee..0b6380ed3 100644 --- a/quantum/process_keycode/process_audio.c +++ b/quantum/process_keycode/process_audio.c @@ -54,7 +54,7 @@ void process_audio_noteoff(uint8_t note) { stop_note(compute_freq_for_midi_note(note)); } -void process_audio_stop_all_notes(void) { +void process_audio_all_notes_off(void) { stop_all_notes(); } diff --git a/quantum/process_keycode/process_audio.h b/quantum/process_keycode/process_audio.h index 59a17725a..7ac15b733 100644 --- a/quantum/process_keycode/process_audio.h +++ b/quantum/process_keycode/process_audio.h @@ -4,7 +4,7 @@ bool process_audio(uint16_t keycode, keyrecord_t *record); void process_audio_noteon(uint8_t note); void process_audio_noteoff(uint8_t note); -void process_audio_stop_all_notes(void); +void process_audio_all_notes_off(void); void audio_on_user(void); diff --git a/quantum/process_keycode/process_midi.c b/quantum/process_keycode/process_midi.c index 214bba902..700c6ce8e 100644 --- a/quantum/process_keycode/process_midi.c +++ b/quantum/process_keycode/process_midi.c @@ -15,7 +15,7 @@ void process_midi_basic_noteoff(uint8_t note) midi_send_noteoff(&midi_device, 0, note, 0); } -void process_midi_basic_stop_all_notes(void) +void process_midi_all_notes_off(void) { midi_send_cc(&midi_device, 0, 0x7B, 0); } diff --git a/quantum/process_keycode/process_midi.h b/quantum/process_keycode/process_midi.h index 0f559ec23..58b7650c6 100644 --- a/quantum/process_keycode/process_midi.h +++ b/quantum/process_keycode/process_midi.h @@ -8,7 +8,7 @@ #ifdef MIDI_BASIC void process_midi_basic_noteon(uint8_t note); void process_midi_basic_noteoff(uint8_t note); -void process_midi_basic_stop_all_notes(void); +void process_midi_all_notes_off(void); #endif #ifdef MIDI_ADVANCED diff --git a/quantum/process_keycode/process_music.c b/quantum/process_keycode/process_music.c index 4b86b91f0..f89a04ee3 100644 --- a/quantum/process_keycode/process_music.c +++ b/quantum/process_keycode/process_music.c @@ -44,10 +44,10 @@ static void music_noteoff(uint8_t note) { void music_all_notes_off(void) { #ifdef AUDIO_ENABLE - process_audio_stop_all_notes(); + process_audio_all_notes_off(); #endif #if defined(MIDI_ENABLE) && defined(MIDI_BASIC) - process_midi_basic_stop_all_notes(); + process_midi_all_notes_off(); #endif } diff --git a/quantum/template/keymaps/default/Makefile b/quantum/template/keymaps/default/Makefile index 24442db37..29f11bbc7 100644 --- a/quantum/template/keymaps/default/Makefile +++ b/quantum/template/keymaps/default/Makefile @@ -9,7 +9,7 @@ CONSOLE_ENABLE = no # 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 support (+3800) +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -- cgit v1.2.3 From 0734f569409974624b40735fcd498dac9adba2d2 Mon Sep 17 00:00:00 2001 From: Gabriel Young Date: Thu, 2 Mar 2017 12:28:12 -0800 Subject: add debug messages to audio --- quantum/audio/audio.c | 322 +++++++++++++++++++++++++------------------------- 1 file changed, 164 insertions(+), 158 deletions(-) diff --git a/quantum/audio/audio.c b/quantum/audio/audio.c index 2a315fd16..e1e81fd2b 100644 --- a/quantum/audio/audio.c +++ b/quantum/audio/audio.c @@ -89,15 +89,15 @@ void audio_init() } audio_config.raw = eeconfig_read_audio(); - // Set port PC6 (OC3A and /OC4A) as output + // Set port PC6 (OC3A and /OC4A) as output DDRC |= _BV(PORTC6); DISABLE_AUDIO_COUNTER_3_ISR; - // TCCR3A / TCCR3B: Timer/Counter #3 Control Registers - // Compare Output Mode (COM3An) = 0b00 = Normal port operation, OC3A disconnected from PC6 - // Waveform Generation Mode (WGM3n) = 0b1110 = Fast PWM Mode 14 (Period = ICR3, Duty Cycle = OCR3A) - // Clock Select (CS3n) = 0b010 = Clock / 8 + // TCCR3A / TCCR3B: Timer/Counter #3 Control Registers + // Compare Output Mode (COM3An) = 0b00 = Normal port operation, OC3A disconnected from PC6 + // Waveform Generation Mode (WGM3n) = 0b1110 = Fast PWM Mode 14 (Period = ICR3, Duty Cycle = OCR3A) + // Clock Select (CS3n) = 0b010 = Clock / 8 TCCR3A = (0 << COM3A1) | (0 << COM3A0) | (1 << WGM31) | (0 << WGM30); TCCR3B = (1 << WGM33) | (1 << WGM32) | (0 << CS32) | (1 << CS31) | (0 << CS30); @@ -106,6 +106,8 @@ void audio_init() void stop_all_notes() { + dprintf("audio stop all notes"); + if (!audio_initialized) { audio_init(); } @@ -128,6 +130,8 @@ void stop_all_notes() void stop_note(float freq) { + dprintf("audio stop note freq=%d", (int)freq); + if (playing_note) { if (!audio_initialized) { audio_init(); @@ -183,159 +187,161 @@ float vibrato(float average_freq) { ISR(TIMER3_COMPA_vect) { - float freq; - - if (playing_note) { - if (voices > 0) { - if (polyphony_rate > 0) { - if (voices > 1) { - voice_place %= voices; - if (place++ > (frequencies[voice_place] / polyphony_rate / CPU_PRESCALER)) { - voice_place = (voice_place + 1) % voices; - place = 0.0; - } - } - - #ifdef VIBRATO_ENABLE - if (vibrato_strength > 0) { - freq = vibrato(frequencies[voice_place]); - } else { - freq = frequencies[voice_place]; - } - #else - freq = frequencies[voice_place]; - #endif - } else { - if (glissando) { - if (frequency != 0 && frequency < frequencies[voices - 1] && frequency < frequencies[voices - 1] * pow(2, -440/frequencies[voices - 1]/12/2)) { - frequency = frequency * pow(2, 440/frequency/12/2); - } else if (frequency != 0 && frequency > frequencies[voices - 1] && frequency > frequencies[voices - 1] * pow(2, 440/frequencies[voices - 1]/12/2)) { - frequency = frequency * pow(2, -440/frequency/12/2); - } else { - frequency = frequencies[voices - 1]; - } - } else { - frequency = frequencies[voices - 1]; - } - - #ifdef VIBRATO_ENABLE - if (vibrato_strength > 0) { - freq = vibrato(frequency); - } else { - freq = frequency; - } - #else - freq = frequency; - #endif - } - - if (envelope_index < 65535) { - envelope_index++; - } - - freq = voice_envelope(freq); - - if (freq < 30.517578125) { - freq = 30.52; - } - - TIMER_3_PERIOD = (uint16_t)(((float)F_CPU) / (freq * CPU_PRESCALER)); - TIMER_3_DUTY_CYCLE = (uint16_t)((((float)F_CPU) / (freq * CPU_PRESCALER)) * note_timbre); - } - } - - if (playing_notes) { - if (note_frequency > 0) { - #ifdef VIBRATO_ENABLE - if (vibrato_strength > 0) { - freq = vibrato(note_frequency); - } else { - freq = note_frequency; - } - #else - freq = note_frequency; - #endif - - if (envelope_index < 65535) { - envelope_index++; - } - freq = voice_envelope(freq); - - TIMER_3_PERIOD = (uint16_t)(((float)F_CPU) / (freq * CPU_PRESCALER)); - TIMER_3_DUTY_CYCLE = (uint16_t)((((float)F_CPU) / (freq * CPU_PRESCALER)) * note_timbre); - } else { - TIMER_3_PERIOD = 0; - TIMER_3_DUTY_CYCLE = 0; - } - - note_position++; - bool end_of_note = false; - if (TIMER_3_PERIOD > 0) { - end_of_note = (note_position >= (note_length / TIMER_3_PERIOD * 0xFFFF)); - } else { - end_of_note = (note_position >= (note_length * 0x7FF)); - } - - if (end_of_note) { - current_note++; - if (current_note >= notes_count) { - if (notes_repeat) { - current_note = 0; - } else { - DISABLE_AUDIO_COUNTER_3_ISR; - DISABLE_AUDIO_COUNTER_3_OUTPUT; - playing_notes = false; - return; - } - } - if (!note_resting && (notes_rest > 0)) { - note_resting = true; - note_frequency = 0; - note_length = notes_rest; - current_note--; - } else { - note_resting = false; - envelope_index = 0; - note_frequency = (*notes_pointer)[current_note][0]; - note_length = ((*notes_pointer)[current_note][1] / 4) * (((float)note_tempo) / 100); - } - - note_position = 0; - } - } - - if (!audio_config.enable) { - playing_notes = false; - playing_note = false; - } + float freq; + + if (playing_note) { + if (voices > 0) { + if (polyphony_rate > 0) { + if (voices > 1) { + voice_place %= voices; + if (place++ > (frequencies[voice_place] / polyphony_rate / CPU_PRESCALER)) { + voice_place = (voice_place + 1) % voices; + place = 0.0; + } + } + + #ifdef VIBRATO_ENABLE + if (vibrato_strength > 0) { + freq = vibrato(frequencies[voice_place]); + } else { + freq = frequencies[voice_place]; + } + #else + freq = frequencies[voice_place]; + #endif + } else { + if (glissando) { + if (frequency != 0 && frequency < frequencies[voices - 1] && frequency < frequencies[voices - 1] * pow(2, -440/frequencies[voices - 1]/12/2)) { + frequency = frequency * pow(2, 440/frequency/12/2); + } else if (frequency != 0 && frequency > frequencies[voices - 1] && frequency > frequencies[voices - 1] * pow(2, 440/frequencies[voices - 1]/12/2)) { + frequency = frequency * pow(2, -440/frequency/12/2); + } else { + frequency = frequencies[voices - 1]; + } + } else { + frequency = frequencies[voices - 1]; + } + + #ifdef VIBRATO_ENABLE + if (vibrato_strength > 0) { + freq = vibrato(frequency); + } else { + freq = frequency; + } + #else + freq = frequency; + #endif + } + + if (envelope_index < 65535) { + envelope_index++; + } + + freq = voice_envelope(freq); + + if (freq < 30.517578125) { + freq = 30.52; + } + + TIMER_3_PERIOD = (uint16_t)(((float)F_CPU) / (freq * CPU_PRESCALER)); + TIMER_3_DUTY_CYCLE = (uint16_t)((((float)F_CPU) / (freq * CPU_PRESCALER)) * note_timbre); + } + } + + if (playing_notes) { + if (note_frequency > 0) { + #ifdef VIBRATO_ENABLE + if (vibrato_strength > 0) { + freq = vibrato(note_frequency); + } else { + freq = note_frequency; + } + #else + freq = note_frequency; + #endif + + if (envelope_index < 65535) { + envelope_index++; + } + freq = voice_envelope(freq); + + TIMER_3_PERIOD = (uint16_t)(((float)F_CPU) / (freq * CPU_PRESCALER)); + TIMER_3_DUTY_CYCLE = (uint16_t)((((float)F_CPU) / (freq * CPU_PRESCALER)) * note_timbre); + } else { + TIMER_3_PERIOD = 0; + TIMER_3_DUTY_CYCLE = 0; + } + + note_position++; + bool end_of_note = false; + if (TIMER_3_PERIOD > 0) { + end_of_note = (note_position >= (note_length / TIMER_3_PERIOD * 0xFFFF)); + } else { + end_of_note = (note_position >= (note_length * 0x7FF)); + } + + if (end_of_note) { + current_note++; + if (current_note >= notes_count) { + if (notes_repeat) { + current_note = 0; + } else { + DISABLE_AUDIO_COUNTER_3_ISR; + DISABLE_AUDIO_COUNTER_3_OUTPUT; + playing_notes = false; + return; + } + } + if (!note_resting && (notes_rest > 0)) { + note_resting = true; + note_frequency = 0; + note_length = notes_rest; + current_note--; + } else { + note_resting = false; + envelope_index = 0; + note_frequency = (*notes_pointer)[current_note][0]; + note_length = ((*notes_pointer)[current_note][1] / 4) * (((float)note_tempo) / 100); + } + + note_position = 0; + } + } + + if (!audio_config.enable) { + playing_notes = false; + playing_note = false; + } } void play_note(float freq, int vol) { + dprintf("audio play note freq=%d vol=%d", (int)freq, vol); + if (!audio_initialized) { audio_init(); } - if (audio_config.enable && voices < 8) { - DISABLE_AUDIO_COUNTER_3_ISR; + if (audio_config.enable && voices < 8) { + DISABLE_AUDIO_COUNTER_3_ISR; - // Cancel notes if notes are playing - if (playing_notes) - stop_all_notes(); + // Cancel notes if notes are playing + if (playing_notes) + stop_all_notes(); - playing_note = true; + playing_note = true; - envelope_index = 0; + envelope_index = 0; - if (freq > 0) { - frequencies[voices] = freq; - volumes[voices] = vol; - voices++; - } + if (freq > 0) { + frequencies[voices] = freq; + volumes[voices] = vol; + voices++; + } ENABLE_AUDIO_COUNTER_3_ISR; ENABLE_AUDIO_COUNTER_3_OUTPUT; - } + } } @@ -346,37 +352,37 @@ void play_notes(float (*np)[][2], uint16_t n_count, bool n_repeat, float n_rest) audio_init(); } - if (audio_config.enable) { + if (audio_config.enable) { - DISABLE_AUDIO_COUNTER_3_ISR; + DISABLE_AUDIO_COUNTER_3_ISR; - // Cancel note if a note is playing - if (playing_note) - stop_all_notes(); + // Cancel note if a note is playing + if (playing_note) + stop_all_notes(); - playing_notes = true; + playing_notes = true; - notes_pointer = np; - notes_count = n_count; - notes_repeat = n_repeat; - notes_rest = n_rest; + notes_pointer = np; + notes_count = n_count; + notes_repeat = n_repeat; + notes_rest = n_rest; - place = 0; - current_note = 0; + place = 0; + current_note = 0; note_frequency = (*notes_pointer)[current_note][0]; note_length = ((*notes_pointer)[current_note][1] / 4) * (((float)note_tempo) / 100); - note_position = 0; + note_position = 0; ENABLE_AUDIO_COUNTER_3_ISR; ENABLE_AUDIO_COUNTER_3_OUTPUT; - } + } } bool is_playing_notes(void) { - return playing_notes; + return playing_notes; } bool is_audio_on(void) { -- cgit v1.2.3 From 515b4dd1f7c941f9e96790f7433015fc9bd385bf Mon Sep 17 00:00:00 2001 From: "Trevor Joynson (trevorj)" Date: Thu, 2 Mar 2017 18:21:45 -0800 Subject: Allow to specify serial to dfu-util flash --- tmk_core/chibios.mk | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tmk_core/chibios.mk b/tmk_core/chibios.mk index 062a712bd..eb0c40138 100644 --- a/tmk_core/chibios.mk +++ b/tmk_core/chibios.mk @@ -143,8 +143,13 @@ MCUFLAGS = -mcpu=$(MCU) DEBUG = gdb +DFU_ARGS = +ifneq ("$(SERIAL)","") + DFU_ARGS += -S $(SERIAL) +endif + # List any extra directories to look for libraries here. EXTRALIBDIRS = $(RULESPATH)/ld dfu-util: $(BUILD_DIR)/$(TARGET).bin sizeafter - dfu-util -D $(BUILD_DIR)/$(TARGET).bin \ No newline at end of file + dfu-util $(DFU_ARGS) -D $(BUILD_DIR)/$(TARGET).bin -- cgit v1.2.3 From 2f677c24a8fcf936e92a0a5acfbbf95b5f47fdb7 Mon Sep 17 00:00:00 2001 From: milestogo Date: Mon, 6 Mar 2017 00:16:44 -0800 Subject: working with preprocessor macros for babblepaste --- keyboards/handwired/MS-sculpt-mobile/babblePaste.c | 609 ++++++++------------- keyboards/handwired/MS-sculpt-mobile/babblePaste.h | 57 +- .../MS-sculpt-mobile/keymaps/milestogo/config.h | 20 + .../MS-sculpt-mobile/keymaps/milestogo/keymap.c | 136 +++-- keyboards/handwired/MS-sculpt-mobile/rules.mk | 4 + 5 files changed, 395 insertions(+), 431 deletions(-) diff --git a/keyboards/handwired/MS-sculpt-mobile/babblePaste.c b/keyboards/handwired/MS-sculpt-mobile/babblePaste.c index 00e8416f4..93ff486e0 100644 --- a/keyboards/handwired/MS-sculpt-mobile/babblePaste.c +++ b/keyboards/handwired/MS-sculpt-mobile/babblePaste.c @@ -8,242 +8,159 @@ and https://github.com/qmk/qmk_firmware/blob/master/keyboards/planck/keymaps/jee */ #include "babblePaste.h" -#include "action_layer.h" +#include "action_macro.h" -// GLOBAL variable. Sets startup default if no eeppom -char babble_mode = MAC_MODE ; +#ifdef USE_BABLPASTE +// GLOBAL variable to determine mode. Sets startup default if no eeppom +uint8_t babble_mode =0 ; -const static macro_t *babblePaste (keyrecord_t *record, uint16_t shortcut) { + +// Today I learned that the preprocessor can not create a switch statement label from an argument +// And else statements have problems, see https://gcc.gnu.org/onlinedocs/gcc-3.0.1/cpp_3.html#SEC15 +#define BABLM(ent, macro...) \ + if ( ent == shortcut ) \ + { action_macro_play( MACRO(macro)); return MACRO_NONE; } - switch(babble_mode) { - + +const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) { +/* this function runs the appropriate babblepaste macro, given +the global babble_mode, and a shortcut from the ENUM in babblePaste.h +TODO, the pointers in this function should be stored in a PROGMEM array, not ram. +But that requires even more clever preprocessor foo. +*/ + + if ( shortcut < BABL_START_NUM || \ + shortcut >= (BABL_START_NUM + BABL_NUM_MACROS ) ) { + return MACRO_NONE; + } + + + switch(babble_mode) { + #ifdef MS_MODE - case MS_MODE: - switch(shortcut) { - - case BABL_DEL_RIGHT_1C: - return (static macro_t *) MACRO( D(DEL), END ); - case BABL_DEL_LEFT_WORD: - return MACRO( D(LCTRL), T(BSPACE), U(LCTRL), END ); - case BABL_DEL_RIGHT_WORD: - return MACRO( D(LCTRL), T(DEL), U(LCTRL), END ); - case BABL_GO_LEFT_1C: - return MACRO( T(LEFT), END ); - case BABL_GO_RIGHT_1C: - return MACRO( T(RIGHT), END ); - case BABL_GO_LEFT_WORD: - return MACRO( D(LCTRL), T(LEFT), U(LCTRL), END ); - case BABL_GO_RIGHT_WORD: - return MACRO( D(LCTRL), T(RIGHT), U(LCTRL), END ); - case BABL_GO_START_LINE: - return MACRO( T(HOME), END ); - case BABL_GO_START_DOC: - return MACRO( D(LCTRL),T(HOME), U(LCTRL),END ); - case BABL_GO_END_LINE: - return MACRO( T(END), END ); - case BABL_GO_END_DOC: - return MACRO( D(LCTRL),T(END), U(LCTRL),END ); - case BABL_GO_NEXT_LINE: - return MACRO( T(DOWN), END ); - case BABL_GO_PREV_LINE: - return MACRO( T(UP), END ); - case BABL_PGDN: - return MACRO( T(PGDN), END ); - case BABL_PGUP: - return MACRO( T(PGUP), END ); + + case MS_MODE: + BABLM( BABL_DEL_RIGHT_1C, T(DEL), END ); + BABLM( BABL_DEL_LEFT_WORD, D(LCTRL), T(BSPACE), U(LCTRL), END ); + BABLM( BABL_DEL_RIGHT_WORD,D(LCTRL), T(DEL), U(LCTRL), END ); + BABLM( BABL_GO_LEFT_1C, T(LEFT), END ); + BABLM( BABL_GO_RIGHT_1C , T(RIGHT), END ); + BABLM( BABL_GO_LEFT_WORD, D(LCTRL), T(LEFT), U(LCTRL), END ); + BABLM( BABL_GO_RIGHT_WORD, D(LCTRL), T(RIGHT), U(LCTRL), END ); + BABLM( BABL_GO_START_LINE, T(HOME), END ); + BABLM( BABL_GO_START_DOC, D(LCTRL),T(HOME), U(LCTRL),END ); + BABLM( BABL_GO_END_LINE, T(END), END ); + BABLM( BABL_GO_END_DOC, D(LCTRL),T(END), U(LCTRL),END ); + BABLM( BABL_GO_NEXT_LINE, T(DOWN), END ); + BABLM( BABL_GO_PREV_LINE, T(UP), END ); + BABLM( BABL_PGDN, T(PGDN), END ); + BABLM( BABL_PGUP, T(PGUP), END ); #ifndef BABL_MOVEMENTONLY - case BABL_UNDO: - return MACRO( D(LCTRL), T(Z), U(LCTRL), END ); - case BABL_REDO: - return MACRO( D(LCTRL), T(Y), U(LCTRL), END ); - case BABL_CUT: - return MACRO( D(LCTRL), T(X), U(LCTRL), END ); - case BABL_COPY: - return MACRO( D(LCTRL), T(C), U(LCTRL), END ); - case BABL_PASTE: - return MACRO( D(LCTRL), T(V), U(LCTRL), END ); - case BABL_SELECT_ALL: - return MACRO( D(LCTRL), T(A), U(LCTRL), END ); - case BABL_UNDO: - return MACRO( D(LCTRL), T(Z), U(LCTRL), END ); - case BABL_REDO: - return MACRO( D(LCTRL), T(Y), U(LCTRL), END ); - case BABL_CUT: - return MACRO( D(LCTRL), T(X), U(LCTRL), END ); - case BABL_COPY: - return MACRO( D(LCTRL), T(C), U(LCTRL), END ); - case BABL_PASTE: - return MACRO( D(LCTRL), T(V), U(LCTRL), END ); - case BABL_SELECT_ALL: - return MACRO( D(LCTRL), T(A), U(LCTRL), END ); - case BABL_FIND: - return MACRO( D(LCTRL),T(F), U(LCTRL),END ); - case BABL_FIND_NEXT: - return MACRO( T(F3),END ); - case BABL_FIND_REPLACE: - return MACRO( D(LCTRL),T(H), U(LCTRL),END ); - case BABL_RUNAPP: - return MACRO( D(LGUI),T(R), U(LGUI),END ); - case BABL_SWITCH_APP_NEXT: - return MACRO( D(LALT),T(TAB), U(LALT),END ); - case BABL_SWITCH_APP_LAST: - return MACRO( D(LSFT),D(LALT),T(TAB), U(LALT), U(LSFT),END ); - case BABL_CLOSE_APP: - return MACRO( D(LALT),T(F4), U(LALT),END ); - case BABL_HELP: - return MACRO( T(F1),END ); + BABLM( BABL_UNDO, D(LCTRL), T(Z), U(LCTRL), END ); + BABLM( BABL_REDO, D(LCTRL), T(Y), U(LCTRL), END ); + BABLM( BABL_CUT, D(LCTRL), T(X), U(LCTRL), END ); + BABLM( BABL_COPY, D(LCTRL), T(C), U(LCTRL), END ); + BABLM( BABL_PASTE, D(LCTRL), T(V), U(LCTRL), END ); + BABLM( BABL_SELECT_ALL, D(LCTRL), T(A), U(LCTRL), END ); + BABLM( BABL_UNDO, D(LCTRL), T(Z), U(LCTRL), END ); + BABLM( BABL_REDO, D(LCTRL), T(Y), U(LCTRL), END ); + BABLM( BABL_CUT, D(LCTRL), T(X), U(LCTRL), END ); + BABLM( BABL_COPY, D(LCTRL), T(C), U(LCTRL), END ); + BABLM( BABL_PASTE, D(LCTRL), T(V), U(LCTRL), END ); + BABLM( BABL_SELECT_ALL, D(LCTRL), T(A), U(LCTRL), END ); + BABLM( BABL_FIND, D(LCTRL),T(F), U(LCTRL),END ); + BABLM( BABL_FIND_NEXT, T(F3),END ); + BABLM( BABL_FIND_REPLACE, D(LCTRL),T(H), U(LCTRL),END ); + BABLM( BABL_RUNAPP, D(LGUI),T(R), U(LGUI),END ); + BABLM( BABL_SWITCH_APP_NEXT, D(LALT),T(TAB), U(LALT),END ); + BABLM( BABL_SWITCH_APP_LAST, D(LSFT),D(LALT),T(TAB), U(LALT), U(LSFT),END ); + BABLM( BABL_CLOSE_APP, D(LALT),T(F4), U(LALT),END ); + BABLM( BABL_HELP, T(F1),END ); #endif - break; - - return MACRO_NONE; - } - -#endif + + + return MACRO_NONE; + + +#endif /* MS_MODE*/ + + #ifdef LINUX_MODE case LINUX_MODE: - switch(shortcut) { - - case BABL_DEL_RIGHT_1C: - return MACRO( D(DEL), END ); - case BABL_DEL_LEFT_WORD: - return MACRO( D(LCTRL), T(BSPACE), U(LCTRL), END ); - case BABL_DEL_RIGHT_WORD: - return MACRO( D(LCTRL), T(DEL), U(LCTRL), END ); - case BABL_GO_LEFT_1C: - return MACRO( T(LEFT), END ); - case BABL_GO_RIGHT_1C: - return MACRO( T(RIGHT), END ); - case BABL_GO_LEFT_WORD: - return MACRO( D(LCTRL), T(LEFT), U(LCTRL), END ); - case BABL_GO_RIGHT_WORD: - return MACRO( D(LCTRL), T(RIGHT), U(LCTRL), END ); - case BABL_GO_START_LINE: - return MACRO( T(HOME), END ); - case BABL_GO_START_DOC: - return MACRO( D(LCTRL),T(HOME), U(LCTRL),END ); - case BABL_GO_END_LINE: - return MACRO( T(END), END ); - case BABL_GO_END_DOC: - return MACRO( D(LCTRL),T(END), U(LCTRL),END ); - case BABL_GO_NEXT_LINE: - return MACRO( T(DOWN), END ); - case BABL_GO_PREV_LINE: - return MACRO( T(UP), END ); - case BABL_PGDN: - return MACRO( T(PGDN), END ); - case BABL_PGUP: - return MACRO( T(PGUP), END ); + + BABLM( BABL_DEL_RIGHT_1C , D(DEL), END ); + BABLM( BABL_DEL_LEFT_WORD , D(LCTRL), T(BSPACE), U(LCTRL), END ); + BABLM( BABL_DEL_RIGHT_WORD , D(LCTRL), T(DEL), U(LCTRL), END ); + BABLM( BABL_GO_LEFT_1C , T(LEFT), END ); + BABLM( BABL_GO_RIGHT_1C , T(RIGHT), END ); + BABLM( BABL_GO_LEFT_WORD , D(LCTRL), T(LEFT), U(LCTRL), END ); + BABLM( BABL_GO_RIGHT_WORD , D(LCTRL), T(RIGHT), U(LCTRL), END ); + BABLM( BABL_GO_START_LINE , T(HOME), END ); + BABLM( BABL_GO_START_DOC , D(LCTRL),T(HOME), U(LCTRL),END ); + BABLM( BABL_GO_END_LINE , T(END), END ); + BABLM( BABL_GO_END_DOC , D(LCTRL),T(END), U(LCTRL),END ); + BABLM( BABL_GO_NEXT_LINE , T(DOWN), END ); + BABLM( BABL_GO_PREV_LINE , T(UP), END ); + BABLM( BABL_PGDN , T(PGDN), END ); + BABLM( BABL_PGUP , T(PGUP), END ); #ifndef BABL_MOVEMENTONLY - case BABL_UNDO: - return MACRO( D(LCTRL), T(Z), U(LCTRL), END ); - case BABL_REDO: - return MACRO( D(LCTRL), T(Y), U(LCTRL), END ); - case BABL_CUT: - return MACRO( D(LCTRL), T(X), U(LCTRL), END ); - case BABL_COPY: - return MACRO( D(LCTRL), T(C), U(LCTRL), END ); - case BABL_PASTE: - return MACRO( D(LCTRL), T(V), U(LCTRL), END ); - case BABL_SELECT_ALL: - return MACRO( D(LCTRL), T(A), U(LCTRL), END ); - - case BABL_FIND: - return MACRO( D(LCTRL),T(F), U(LCTRL),END ); - case BABL_FIND_NEXT: - /* return MACRO( T(F3),END ); KDE */ - return MACRO( D(LCTRL),T(G), U(LCTRL),END ); // Gnome*/ - case BABL_FIND_REPLACE: - /* return MACRO( D(LCTRL),T(R), U(LCTRL),END ); KDE */ - return MACRO( D(LCTRL),T(H), U(LCTRL),END ); // Gnome*/ - case BABL_RUNAPP: - return MACRO( D(LALT),T(F2), U(LALT),END ); - case BABL_SWITCH_APP_NEXT: - return MACRO( D(LCTL),T(TAB), U(LCTL),END ); - case BABL_SWITCH_APP_LAST: - return MACRO( D(LSFT),D(LCTL),T(TAB), U(LCTL), U(LSFT),END ); - case BABL_CLOSE_APP: - return MACRO( D(LALT),T(F4), U(LALT),END ); - case BABL_HELP: - return MACRO_NONE; + BABLM( BABL_UNDO , D(LCTRL), T(Z), U(LCTRL), END ); + BABLM( BABL_REDO , D(LCTRL), T(Y), U(LCTRL), END ); + BABLM( BABL_CUT , D(LCTRL), T(X), U(LCTRL), END ); + BABLM( BABL_COPY , D(LCTRL), T(C), U(LCTRL), END ); + BABLM( BABL_PASTE , D(LCTRL), T(V), U(LCTRL), END ); + BABLM( BABL_SELECT_ALL, D(LCTRL), T(A), U(LCTRL), END ); + BABLM( BABL_FIND, D(LCTRL),T(F), U(LCTRL),END ); + /* BABLM(BABL_FIND_NEXT , T(F3),END ); KDE */ + BABLM( BABL_FIND_NEXT, D(LCTRL),T(G), U(LCTRL),END ); // Gnome*/ + /* BABLM( , D(LCTRL),T(R), U(LCTRL),END ); KDE */ + BABLM( BABL_FIND_REPLACE, D(LCTRL),T(H), U(LCTRL),END ); // Gnome*/ + BABLM( BABL_RUNAPP, D(LALT),T(F2), U(LALT),END ); + BABLM( BABL_SWITCH_APP_NEXT, D(LCTL),T(TAB), U(LCTL),END ); + BABLM( BABL_SWITCH_APP_LAST, D(LSFT),D(LCTL),T(TAB), U(LCTL), U(LSFT),END ); + BABLM( BABL_CLOSE_APP, D(LALT),T(F4), U(LALT),END ); + BABLM( BABL_HELP, END ); #endif - break; - return MACRO_NONE; - } #endif #ifdef MAC_MODE case MAC_MODE: - switch(shortcut) { - - - case BABL_DEL_RIGHT_1C: - return MACRO( D(DEL), END ); - case BABL_DEL_LEFT_WORD: - return MACRO( D(LALT), T(BSPACE), U(LALT), END ); - case BABL_DEL_RIGHT_WORD: - return MACRO( D(LALT), T(DEL), U(LALT), END ); - case BABL_GO_LEFT_1C: - return MACRO( T(LEFT), END ); - case BABL_GO_RIGHT_1C: - return MACRO( T(RIGHT), END ); - case BABL_GO_LEFT_WORD: - return MACRO( D(LALT), T(LEFT), U(LALT), END ); - case BABL_GO_RIGHT_WORD: - return MACRO( D(LALT), T(RIGHT), U(LALT), END ); - case BABL_GO_START_LINE: - return MACRO( D(LGUI), T(LEFT), U(LGUI), END ); - case BABL_GO_START_DOC: - return MACRO( D(LGUI),T(UP), U(LGUI),END ); - case BABL_GO_END_LINE: - return MACRO( D(LGUI), T(RIGHT), U(LGUI), END ); - case BABL_GO_END_DOC: - return MACRO( D(LGUI),T(DOWN), U(LGUI),END ); - case BABL_GO_NEXT_LINE: - return MACRO( T(DOWN), END ); - case BABL_GO_PREV_LINE: - return MACRO( T(UP), END ); - case BABL_PGDN: - return MACRO( D(LALT), T(DOWN), U(LALT), END ); - case BABL_PGUP: - return MACRO( D(LALT), T(UP), U(LALT), END ); + BABLM( BABL_DEL_RIGHT_1C , D(DEL), END ); + BABLM( BABL_DEL_LEFT_WORD , D(LALT), T(BSPACE), U(LALT), END ); + BABLM( BABL_DEL_RIGHT_WORD, D(LALT), T(DEL), U(LALT), END ); + BABLM( BABL_GO_LEFT_1C , T(LEFT), END ); + BABLM( BABL_GO_RIGHT_1C, T(RIGHT), END ); + BABLM( BABL_GO_LEFT_WORD , D(LALT), T(LEFT), U(LALT), END ); + BABLM( BABL_GO_RIGHT_WORD , D(LALT), T(RIGHT), U(LALT), END ); + BABLM( BABL_GO_START_LINE , D(LGUI), T(LEFT), U(LGUI), END ); + BABLM( BABL_GO_START_DOC , D(LGUI),T(UP), U(LGUI),END ); + BABLM( BABL_GO_END_LINE , D(LGUI), T(RIGHT), U(LGUI), END ); + BABLM( BABL_GO_END_DOC , D(LGUI),T(DOWN), U(LGUI),END ); + BABLM( BABL_GO_NEXT_LINE , T(DOWN), END ); + BABLM( BABL_GO_PREV_LINE , T(UP), END ); + BABLM( BABL_PGDN , D(LALT),T(DOWN), U(LALT), END ); + BABLM( BABL_PGUP , D(LALT),T(UP), U(LALT), END ); #ifndef BABL_MOVEMENTONLY - case BABL_UNDO: - return MACRO( D(LGUI), T(Z), U(LGUI), END ); - case BABL_REDO: - return MACRO( D(LSFT),D(LGUI), T(Z), U(LSFT),U(LGUI), END ); - case BABL_CUT: - return MACRO( D(LGUI), T(X), U(LGUI), END ); - case BABL_COPY: - return MACRO( D(LGUI), T(C), U(LGUI), END ); - case BABL_PASTE: - return MACRO( D(LGUI), T(V), U(LGUI), END ); - case BABL_SELECT_ALL: - return MACRO( D(LGUI), T(A), U(LGUI), END ); - case BABL_FIND: - return MACRO( D(LGUI),T(F), U(LGUI),END ); - case BABL_FIND_NEXT: - return MACRO( D(LGUI),T(G), U(LGUI),END ); - case BABL_FIND_REPLACE: - return MACRO( D(LGUI),T(F), U(LGUI),END ); - case BABL_RUNAPP: - return MACRO( D(LGUI),T(R), U(LGUI),END ); - case BABL_SWITCH_APP_NEXT: - return MACRO( D(LGUI),T(TAB), U(LGUI),END ); - case BABL_SWITCH_APP_LAST: - return MACRO( D(LSFT),D(LGUI),T(TAB), U(LGUI), U(LSFT),END ); - case BABL_CLOSE_APP: - return MACRO( D(LGUI),T(Q), U(LGUI),END ); - case BABL_HELP: - return MACRO( D(LSFT),D(LGUI),T(SLASH), U(LGUI), U(LSFT),END ); + BABLM( BABL_UNDO , D(1), D(LGUI), T(Z), U(LGUI), END ); + BABLM( BABL_REDO , D(LSFT),D(LGUI), T(Z), U(LSFT),U(LGUI), END ); + BABLM( BABL_CUT , D(LGUI), T(X), U(LGUI), END ); + BABLM( BABL_COPY , D(LGUI), T(C), U(LGUI), END ); + BABLM( BABL_PASTE , D(LGUI), T(V), U(LGUI), END ); + BABLM( BABL_SELECT_ALL , D(LGUI), T(A), U(LGUI), END ); + BABLM( BABL_FIND , D(LGUI),T(F), U(LGUI),END ); + BABLM( BABL_FIND_NEXT, D(LGUI),T(G), U(LGUI),END ); + BABLM( BABL_FIND_REPLACE, D(LGUI),T(F), U(LGUI),END ); + BABLM( BABL_RUNAPP , D(LGUI),T(R), U(LGUI),END ); + BABLM( BABL_SWITCH_APP_NEXT , D(LGUI),T(TAB), U(LGUI),END ); + BABLM( BABL_SWITCH_APP_LAST , D(LSFT),D(LGUI),T(TAB), U(LGUI), U(LSFT),END ); + BABLM( BABL_CLOSE_APP , D(LGUI),T(Q), U(LGUI),END ); + BABLM( BABL_HELP , D(LSFT),D(LGUI),T(SLASH), U(LGUI), U(LSFT),END ); #endif - break; - + return MACRO_NONE; - } - #endif #ifdef EMACS_MODE @@ -252,64 +169,64 @@ const static macro_t *babblePaste (keyrecord_t *record, uint16_t shortcut) { //probably should allow meta to not be ALT case BABL_DEL_RIGHT_1C: - return MACRO( D(LCTL), T(D), U(LCTL),END ); + BABLM( , D(LCTL), T(D), U(LCTL),END ); case BABL_DEL_LEFT_WORD: - return MACRO( D(LCTL), T(BSPACE), U(LCTL), END ); + BABLM( , D(LCTL), T(BSPACE), U(LCTL), END ); case BABL_DEL_RIGHT_WORD: - return MACRO( D(LALT), T(D), U(LALT), END ); + BABLM( , D(LALT), T(D), U(LALT), END ); case BABL_GO_LEFT_1C: - return MACRO( T(LEFT), END ); + BABLM( , T(LEFT), END ); case BABL_GO_RIGHT_1C: - return MACRO( T(RIGHT), END ); + BABLM( , T(RIGHT), END ); case BABL_GO_LEFT_WORD: - return MACRO( D(LALT), T(B), U(LALT), END ); + BABLM( , D(LALT), T(B), U(LALT), END ); case BABL_GO_RIGHT_WORD: - return MACRO( D(LALT), T(F), U(LALT), END ); + BABLM( , D(LALT), T(F), U(LALT), END ); case BABL_GO_START_LINE: - return MACRO( D(LCTRL), T(A), U(LCTRL), END ); + BABLM( , D(LCTRL), T(A), U(LCTRL), END ); case BABL_GO_START_DOC: - return MACRO( D(LALT), D(LSFT), T(COMM),U(LSFT), U(LALT) ,END ); + BABLM( , D(LALT), D(LSFT), T(COMM),U(LSFT), U(LALT) ,END ); case BABL_GO_END_LINE: - return MACRO( D(LCTRL), T(E), U(LCTRL), END ); + BABLM( , D(LCTRL), T(E), U(LCTRL), END ); case BABL_GO_END_DOC: - return MACRO( D(LALT), D(LSFT), T(DOT),U(LSFT), U(LALT) ,END ); + BABLM( , D(LALT), D(LSFT), T(DOT),U(LSFT), U(LALT) ,END ); case BABL_GO_NEXT_LINE: - return MACRO( D(LCTRL), T(N), U(LCTRL), END ); + BABLM( , D(LCTRL), T(N), U(LCTRL), END ); case BABL_GO_PREV_LINE: - return MACRO( D(LCTRL), T(P), U(LCTRL), END ); + BABLM( , D(LCTRL), T(P), U(LCTRL), END ); case BABL_PGDN: - return MACRO(D(LCTRL), T(V), U(LCTRL), END ); + BABLM( ,D(LCTRL), T(V), U(LCTRL), END ); case BABL_PGUP: - return MACRO( D(LALT), T(V), U(LALT), END ); + BABLM( , D(LALT), T(V), U(LALT), END ); #ifndef BABL_MOVEMENTONLY case BABL_UNDO: - return MACRO( D(LCTL), T(X), U(LCTL),T(C), END ); + BABLM( , D(LCTL), T(X), U(LCTL),T(C), END ); case BABL_REDO: - return MACRO( D(LCTL), T(X), U(LCTL),T(C), END ); // arguably + BABLM( , D(LCTL), T(X), U(LCTL),T(C), END ); // arguably case BABL_CUT: - return MACRO( D(LCTL), T(W), U(LCTL), END ); + BABLM( , D(LCTL), T(W), U(LCTL), END ); case BABL_COPY: - return MACRO( D(LALT), T(W), U(LALT), END ); //really? + BABLM( , D(LALT), T(W), U(LALT), END ); //really? case BABL_PASTE: - return MACRO( D(LCTL), T(Y), U(LCTL), END ); + BABLM( , D(LCTL), T(Y), U(LCTL), END ); case BABL_SELECT_ALL: - return MACRO(D(LCTL), T(X), U(LCTL),T(H), END ); + BABLM( ,D(LCTL), T(X), U(LCTL),T(H), END ); case BABL_FIND: - return MACRO( D(LCTRL), T(S), U(LCTRL),END ); + BABLM( , D(LCTRL), T(S), U(LCTRL),END ); case BABL_FIND_NEXT: - return MACRO( D(LCTRL), T(S), U(LCTRL),END ); + BABLM( , D(LCTRL), T(S), U(LCTRL),END ); case BABL_FIND_REPLACE: - return MACRO( D(LALT),D(LSFT), T(5),U(LSFT), U(LALT), END ); + BABLM( , D(LALT),D(LSFT), T(5),U(LSFT), U(LALT), END ); case BABL_RUNAPP: - return MACRO( D(LALT), T(X), U(LALT),T(S),T(H),T(E),T(L),T(L),END );// arguably + BABLM( , D(LALT), T(X), U(LALT),T(S),T(H),T(E),T(L),T(L),END );// arguably case BABL_SWITCH_APP_NEXT: - return MACRO( D(LCTL), T(X), U(LCTL),T(RIGHT), END ); // arguably + BABLM( , D(LCTL), T(X), U(LCTL),T(RIGHT), END ); // arguably case BABL_SWITCH_APP_LAST: - return MACRO( D(LCTL), T(X), U(LCTL),T(LEFT), END ); // arguably + BABLM( , D(LCTL), T(X), U(LCTL),T(LEFT), END ); // arguably case BABL_CLOSE_APP: - return MACRO(D(LCTL), T(X), U(LCTL),T(C),END ); + BABLM( ,D(LCTL), T(X), U(LCTL),T(C),END ); case BABL_HELP: - return MACRO( D(LCTL),T(H), U(LCTL),T(A),END); // start search in help + BABLM( , D(LCTL),T(H), U(LCTL),T(A),END); // start search in help #endif break; @@ -319,150 +236,90 @@ const static macro_t *babblePaste (keyrecord_t *record, uint16_t shortcut) { #endif #ifdef VI_MODE case VI_MODE: - switch(shortcut) { //assume esc is already called - case BABL_DEL_RIGHT_1C: - return MACRO( T(X),END ); - case BABL_DEL_LEFT_WORD: - return MACRO( T(D),T(G),T(E),END ); - case BABL_DEL_RIGHT_WORD: - return MACRO( T(D),T(W),END ); - case BABL_GO_LEFT_1C: - return MACRO( T(H), END ); - case BABL_GO_RIGHT_1C: - return MACRO( T(L), END ); - case BABL_GO_LEFT_WORD: - return MACRO( T(B),END ); - case BABL_GO_RIGHT_WORD: - return MACRO( T(W), END ); - case BABL_GO_START_LINE: - return MACRO( D(LSFT), T(6),U(LSFT), END ); //^ - case BABL_GO_START_DOC: - return MACRO( T(G),T(G) ,END ); - case BABL_GO_END_LINE: - return MACRO( D(LSFT), T(4),U(LSFT) , END ); //$ - case BABL_GO_END_DOC: - return MACRO( D(LSFT), T(G),U(LSFT),END ); - case BABL_GO_NEXT_LINE: - return MACRO( T(J), END ); - case BABL_GO_PREV_LINE: - return MACRO( T(K), END ); - case BABL_PGDN: - return MACRO(D(LCTRL), T(F), U(LCTRL), END ); - case BABL_PGUP: - return MACRO( D(LCTRL), T(B), U(LCTRL), END ); + BABLM( BABL_DEL_RIGHT_1C , T(X),END ); + BABLM( BABL_DEL_LEFT_WORD , T(D),T(G),T(E),END ); + BABLM( BABL_DEL_RIGHT_WORD , T(D),T(W),END ); + BABLM( BABL_GO_LEFT_1C , T(H), END ); + BABLM( BABL_GO_RIGHT_1C , T(L), END ); + BABLM( BABL_GO_LEFT_WORD , T(B),END ); + BABLM( BABL_GO_RIGHT_WORD , T(W), END ); + BABLM( BABL_GO_START_LINE , D(LSFT), T(6),U(LSFT), END ); //^ + BABLM( BABL_GO_START_DOC , T(G),T(G) ,END ); + BABLM( BABL_GO_END_LINE , D(LSFT), T(4),U(LSFT) , END ); //$ + BABLM( BABL_GO_END_DOC , D(LSFT), T(G),U(LSFT),END ); + BABLM( BABL_GO_NEXT_LINE , T(J), END ); + BABLM( BABL_GO_PREV_LINE, T(K), END ); + BABLM( BABL_PGDN ,D(LCTRL), T(F), U(LCTRL), END ); + BABLM( BABL_PGUP , D(LCTRL), T(B), U(LCTRL), END ); #ifndef BABL_MOVEMENTONLY - case BABL_UNDO: - return MACRO( T(U), END ); - case BABL_REDO: - return MACRO( D(LCTL), T(R), U(LCTL), END ); - case BABL_CUT: - return MACRO( T(X), END ); - case BABL_COPY: - return MACRO( T(Y),END ); - case BABL_PASTE: - return MACRO( T(P), END ); - case BABL_SELECT_ALL: - return MACRO( D(LSFT), T(SCLN),U(LSFT),D(LSFT), T(5),U(LSFT),T(Y), END ); // wrong but helpful? - case BABL_FIND: - return MACRO( T(SLASH),END ); - case BABL_FIND_NEXT: - return MACRO( T(N),END ); - case BABL_FIND_REPLACE: - return MACRO( D(LALT),D(LSFT), T(5),U(LSFT), U(LALT), END ); - case BABL_RUNAPP: - return MACRO_NONE; - case BABL_SWITCH_APP_NEXT: - return MACRO_NONE; - case BABL_SWITCH_APP_LAST: - return MACRO_NONE; - case BABL_CLOSE_APP: - return MACRO(D(LSFT), T(SCLN),U(LSFT), T(Q), D(RSFT), T(1),U(RSFT), END ); - case BABL_HELP: - return MACRO(D(LSFT), T(SCLN),U(LSFT),T(H),END); // start search in help - break; + BABLM( BABL_UNDO , T(U), END ); + BABLM( BABL_REDO , D(LCTL), T(R), U(LCTL), END ); + BABLM( BABL_CUT , T(X), END ); + BABLM( BABL_COPY , T(Y),END ); + BABLM( BABL_PASTE , T(P), END ); + BABLM( BABL_SELECT_ALL , D(LSFT), T(SCLN),U(LSFT),D(LSFT), T(5),U(LSFT),T(Y), END ); // wrong but helpful? + BABLM( BABL_FIND , T(SLASH),END ); + BABLM( BABL_FIND_NEXT , T(N),END ); + BABLM( BABL_FIND_REPLACE , D(LALT),D(LSFT), T(5),U(LSFT), U(LALT), END ); + BABLM( BABL_RUNAPP,END ); + BABLM( BABL_SWITCH_APP_NEXT ,END ); + BABLM( BABL_SWITCH_APP_LAST ,END ); + BABLM(BABL_CLOSE_APP, D(LSFT), T(SCLN),U(LSFT), T(Q), D(RSFT), T(1),U(RSFT), END ); + BABLM(BABL_HELP, D(LSFT), T(SCLN),U(LSFT),T(H),END); // start search in help #endif - return MACRO_NONE; - } - + return MACRO_NONE; #endif + + + + #ifdef READMUX_MODE // Readline command line editing + tmux windowing // I havent decided how much to do readline and how much tmux - case READMUX_MODE: - switch(shortcut) { - - case BABL_DEL_RIGHT_1C: - return MACRO( D(LCTL), T(D), U(LCTL),END ); - case BABL_DEL_LEFT_WORD: - return MACRO( D(LCTL), T(W), U(LCTL), END ); - case BABL_DEL_RIGHT_WORD: - return MACRO( D(LALT), T(D), U(LALT), END ); - case BABL_GO_LEFT_1C: - return MACRO( T(LEFT), END ); - case BABL_GO_RIGHT_1C: - return MACRO( T(RIGHT), END ); - case BABL_GO_LEFT_WORD: - return MACRO( D(LALT), T(B), U(LALT), END ); - case BABL_GO_RIGHT_WORD: - return MACRO( D(LALT), T(F), U(LALT), END ); - case BABL_GO_START_LINE: - return MACRO( D(LCTRL), T(A), U(LCTRL), END ); - case BABL_GO_START_DOC: - return MACRO_NONE; // tmux? - case BABL_GO_END_LINE: - return MACRO( D(LCTRL), T(E), U(LCTRL), END ); - case BABL_GO_END_DOC: - return MACRO_NONE; // tmux? - case BABL_GO_NEXT_LINE: - return MACRO( D(LCTRL), T(N), U(LCTRL), END ); - case BABL_GO_PREV_LINE: - return MACRO( D(LCTRL), T(P), U(LCTRL), END ); - case BABL_PGDN: - return MACRO( T(PGDN), END ); - case BABL_PGUP: - return MACRO( T(PGUP), END ); + case READMUX_MODE: + BABLM( BABL_DEL_RIGHT_1C , D(LCTL), T(D), U(LCTL),END ); + BABLM( BABL_DEL_LEFT_WORD , D(LCTL), T(W), U(LCTL), END ); + BABLM( BABL_DEL_RIGHT_WORD , D(LALT), T(D), U(LALT), END ); + BABLM( BABL_GO_LEFT_1C , T(LEFT), END ); + BABLM( BABL_GO_RIGHT_1C , T(RIGHT), END ); + BABLM( BABL_GO_LEFT_WORD , D(LALT), T(B), U(LALT), END ); + BABLM( BABL_GO_RIGHT_WORD , D(LALT), T(F), U(LALT), END ); + BABLM( BABL_GO_START_LINE , D(LCTRL), T(A), U(LCTRL), END ); + BABLM( BABL_GO_START_DOC ,END );// tmux? + BABLM( BABL_GO_END_LINE , D(LCTRL), T(E), U(LCTRL), END ); + BABLM( BABL_GO_END_DOC ,END ); // tmux? + BABLM( BABL_GO_NEXT_LINE , D(LCTRL), T(N), U(LCTRL), END ); + BABLM( BABL_GO_PREV_LINE , D(LCTRL), T(P), U(LCTRL), END ); + BABLM( BABL_PGDN , T(PGDN), END ); + BABLM( BABL_PGUP , T(PGUP), END ); #ifndef BABL_MOVEMENTONLY - case BABL_UNDO: - return MACRO( D(LALT), T(R), U(LALT) , END ); - case BABL_REDO: - return MACRO( D(LCTL), T(X), U(LCTL),T(C), END ); // arguably - case BABL_CUT: - return MACRO( D(LCTL), T(K), U(LCTL), END ); // wrong half the time - case BABL_COPY: - return MACRO_NONE; - case BABL_PASTE: - return MACRO( D(LCTL), T(Y), U(LCTL), END ); - case BABL_SELECT_ALL: - return MACRO(D(LCTL), T(A), T(K), T(Y), U(LCTL) , END ); - case BABL_FIND: - return MACRO( D(LCTRL), T(R), U(LCTRL), END ); // search history - case BABL_FIND_NEXT: - eturn MACRO( D(LCTRL), T(S), U(LCTRL), END ); - case BABL_FIND_REPLACE: - return MACRO_NONE; // tmux? - case BABL_RUNAPP: - return MACRO( D(LCTRL), T(B), U(LCTRL), T(C),END ); //tmux - case BABL_SWITCH_APP_NEXT: - return MACRO( D(LCTRL), T(B), U(LCTRL), T(N),END ); //tmux - case BABL_SWITCH_APP_LAST: - return MACRO( D(LCTRL), T(B), U(LCTRL), T(P),END ); //tmux - case BABL_CLOSE_APP: - return MACRO( D(LCTRL), T(B), U(LCTRL), T(D),END); // usually what I want - break; - case BABL_HELP: - return MACRO_NONE; + BABLM( BABL_UNDO , D(LALT), T(R), U(LALT) , END ); + BABLM( BABL_REDO , D(LCTL), T(X), U(LCTL),T(C), END ); // arguably + BABLM( BABL_CUT , D(LCTL), T(K), U(LCTL), END ); // wrong half the time + BABLM( BABL_COPY ,END ); + BABLM( BABL_PASTE , D(LCTL), T(Y), U(LCTL), END ); + BABLM( BABL_SELECT_ALL ,D(LCTL), T(A), T(K), T(Y), U(LCTL) , END ); + BABLM( BABL_FIND , D(LCTRL), T(R), U(LCTRL), END ); // search history + BABLM(BABL_FIND_NEXT, D(LCTRL), T(S), U(LCTRL), END ); + BABLM( BABL_FIND_REPLACE ,END ); + BABLM( BABL_RUNAPP , D(LCTRL), T(B), U(LCTRL), T(C),END ); //tmux + BABLM( BABL_SWITCH_APP_NEXT , D(LCTRL), T(B), U(LCTRL), T(N),END ); //tmux + BABLM( BABL_SWITCH_APP_LAST , D(LCTRL), T(B), U(LCTRL), T(P),END ); //tmux + BABLM( BABL_CLOSE_APP , D(LCTRL), T(B), U(LCTRL), T(D),END); // usually what I want + BABLM( BABL_HELP ,END ); #endif - break; - - return MACRO_NONE; - } + + return MACRO_NONE; #endif - return MACRO_NONE; - } + default: + return MACRO_NONE; + } } + +#endif \ No newline at end of file diff --git a/keyboards/handwired/MS-sculpt-mobile/babblePaste.h b/keyboards/handwired/MS-sculpt-mobile/babblePaste.h index 63b79a205..313fa80ec 100644 --- a/keyboards/handwired/MS-sculpt-mobile/babblePaste.h +++ b/keyboards/handwired/MS-sculpt-mobile/babblePaste.h @@ -9,27 +9,39 @@ and jeebak & algernon's keymap */ #ifndef _babblePaste_h_included__ #define _babblePaste_h_included__ +#include "action_layer.h" +#ifdef USE_BABLPASTE -/* Add this to your config.h -// Uncomment any modes you want. -// Windows. -//#define MS_MODE 0 +/* *************************** + +// Uncomment any modes you want. Whatever mode = 0 will be the default on boot + +//#define MS_MODE 0 // Windows. //#define MAC_MODE 1 -//aka gnome+KDE -//#define LINUX_MODE 2 +//#define LINUX_MODE 2 //aka gnome+KDE //#define EMACS_MODE 3 //#define VI_MODE 4 //#define WORDSTAR_MODE 5 -// Readline and tmux -//#define READMUX 6 -*/ +//#define READMUX 6 // Readline and tmux +****************************/ + + +// Uncomment if you need more free flash space +// It removes everything but cursor movement +//#define BABL_MOVEMENTONLY -/* Macros handled by babblepaste. Most should be available for all platforms. */ + +// Define starting number for BABL macros in the macro range. +// Probably can start the default even lower +#define BABL_START_NUM 50 + +/* Macros handled by babblepaste. Most should be available for all platforms. +Whatever isn't defined will NOP */ enum { // Movement - BABL_DEL_RIGHT_1C=200, + BABL_DEL_RIGHT_1C= BABL_START_NUM, BABL_DEL_LEFT_WORD, BABL_DEL_RIGHT_WORD, BABL_GO_LEFT_1C, @@ -64,9 +76,26 @@ enum { #endif }; +// How many macros/ how many array elements? +#define BABL_NUM_MACROS 28 +/* from action_macro.h +typedef uint8_t macro_t; + +#define MACRO_NONE (macro_t*)0 +#define MACRO(...) ({ static const macro_t __m[] PROGMEM = { __VA_ARGS__ }; &__m[0]; }) +#define MACRO_GET(p) pgm_read_byte(p) + +#define BABL_MSTART (entry, os, macro...) ( const macro_t bablDict[entry][os] PROGMEM = { macro... }; ) + +*/ + +const macro_t *babblePaste(keyrecord_t *record, uint8_t shortcut); + +macro_t* switch_babble_mode( uint8_t id); + + +#endif +#endif -//static macro_t *babblePaste(keyrecord_t *record, uint16_t shortcut) - - #endif \ No newline at end of file diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/config.h b/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/config.h index aaf0077b1..7ad1b0f0f 100644 --- a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/config.h +++ b/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/config.h @@ -3,5 +3,25 @@ #include "../../config.h" +#define USE_BABLPASTE + +#ifdef USE_BABLPASTE +//define BabblePaste maps +// Windows. +//#define MS_MODE 1 +#define MAC_MODE 0 +//aka gnome+KDE +//#define LINUX_MODE 2 +//#define EMACS_MODE 3 +//#define VI_MODE 4 +//#define WORDSTAR_MODE 5 +// Readline and tmux +#define READMUX_MODE 6 +#endif + +// Uncomment if you need more free flash space +// It removes everything but cursor movement +//#define BABL_MOVEMENTONLY + // place overrides here #endif diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/keymap.c b/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/keymap.c index 244d52dc5..3a162db86 100644 --- a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/keymap.c +++ b/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/keymap.c @@ -1,5 +1,7 @@ #include "MS-sculpt-mobile.h" #include "action_layer.h" +#include "action_util.h" +#include "babblePaste.h" #ifdef AUDIO_ENABLE #include "audio.h" @@ -12,6 +14,13 @@ #define _TRAN 5 + + +// adjust babblemode default +extern uint8_t babble_mode; + + + enum layer_keycodes { QWR, CDH, @@ -37,7 +46,11 @@ TRAN enum macro_keycodes { DHPASTE=1, VIBRK, -TO_CDH, +B_LNX, +B_WIN, +B_MAC, +B_VI, +B_READ , }; @@ -71,8 +84,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, QWR, \ KC_ESC, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, ____, ____, ____,\ - TT_MOV, KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, ____,\ - KC_LSFT, KC_Z, KC_X, KC_C, M(DHPASTE), KC_V, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, ____, ____,\ + TT_MOV, KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, KC_2,\ + KC_LSFT, KC_Z, KC_X, KC_C, M(DHPASTE), KC_V, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, ____, KC_1,\ ____, ____, ____ , KC_FN1, ____, ____, ____, ____, ____, ____ ), @@ -86,9 +99,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * -------------------------------------------------------------------------- * | ESC: | ^ | { | } | @ | % | | [ | ( | ) | _ | [ | ] | \ | | * -------------------------------------------------------------------------------' -* |Bak/Mov| ! | # | 0 | = | | * | - | 1 | + | ] | ` | enter |PgUp| +* |Bak/Mov| ! | # | 0 | = | { | } | - | 1 | + | ] | ` | enter |PgUp| * -------------------------------------------------------------------------------- -* |Lsft | ; | ~ | : | ~ | "|"| $ | ~ | | | / | Rsft| Up| PgDn| +* |Lsft | ; | ~ | : | ~ | "|"| $ | * | | . | / | Rsft| Up| PgDn| * --------------------------------------------------------------------------------- * |Lctl |Lgui |Lalt | Space/Sym | GUI | Sym | Rctl |Left|Down|Rght| * --------------------------------------------------------------------------------- @@ -98,16 +111,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ M(VIBRK), KC_CIRC, KC_LCBR, KC_RCBR,KC_AT, KC_PERC, ____, KC_LBRC,KC_LPRN,KC_RPRN,KC_UNDS, ____, ____, ____,\ - ____, KC_EXLM, KC_HASH, KC_0, KC_EQL, ____, KC_ASTR,KC_MINS,KC_1, KC_PLUS,KC_RBRC, KC_GRV, ____, ____,\ - ____, KC_SCLN, KC_TILDE, KC_COLN, KC_TILDE, KC_PIPE, KC_DLR, KC_TILDE,____, ____, KC_SLSH, ____, ____, ____,\ + ____, KC_EXLM, KC_HASH, KC_0, KC_EQL, KC_LCBR, KC_RCBR,KC_MINS,KC_1, KC_PLUS,KC_RBRC, KC_GRV, ____, ____,\ + ____, KC_SCLN, KC_TILDE, KC_COLN, KC_TILDE, KC_PIPE, KC_DLR, KC_ASTR, ____, KC_DOT , KC_SLSH, ____, ____, ____,\ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____ ), [_MOV] = KEYMAP (\ - ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ - ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ - ____, ____,RGUI(KC_TAB), ____, ____, RCTL(KC_B), ____, ____, KC_UP, ____, ____, ____, ____, ____, \ - ____, RCTL(KC_A), KC_S, RCTL(KC_K), RCTL(KC_E), ____, ____, KC_LEFT,KC_DOWN, KC_RIGHT, ____, ____,____,____,\ + ____, M(B_WIN),M(B_MAC),M(B_READ), M(B_VI), ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ + ____, M(BABL_UNDO), ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ + ____, ____,RGUI(KC_TAB), ____, ____, RCTL(KC_B), ____, M(BABL_DEL_LEFT_WORD), KC_UP, M(BABL_DEL_RIGHT_WORD), ____, ____, ____, ____, \ + ____, RCTL(KC_A), KC_S, RCTL(KC_K), RCTL(KC_E), ____, M(BABL_GO_START_LINE), KC_LEFT,KC_DOWN, KC_RIGHT, M(BABL_GO_END_LINE), ____,____,____,\ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____ ), @@ -122,7 +135,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; - const uint16_t PROGMEM fn_actions[] = { [1] = ACTION_LAYER_TAP_KEY(_SYM,KC_SPACE), [2] = ACTION_LAYER_TAP_KEY(_MOV,KC_BSPC) @@ -171,10 +183,21 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } - - + const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + +/* If this is in the range of BABL macros, call a separate function */ +#ifdef USE_BABLPASTE + if( id >= BABL_START_NUM && id < (BABL_START_NUM + BABL_NUM_MACROS ) ) { + if (record->event.pressed) { // is there a case where this isn't desired? + + babblePaste ( record, id ); + return MACRO_NONE; + } + } +#endif + // MACRODOWN only works in this function switch(id) { case 0: @@ -185,49 +208,72 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) } break; - - case DHPASTE: - if(keyboard_report->mods & MOD_BIT(KC_LGUI) ) { - if (record->event.pressed) { - clear_keyboard_but_mods(); - register_code(KC_V); - } else { - unregister_code(KC_V); - } - }else { - if (record->event.pressed) { - register_code(KC_D); + /* Colemak mod-dh moves the D key to the qwerty V position + This hack makes apple-V_position do what I mean */ + case DHPASTE: + if(keyboard_report->mods & MOD_BIT(KC_LGUI) ) { + if (record->event.pressed) { + clear_keyboard_but_mods(); + register_code(KC_V); + } else { + unregister_code(KC_V); + } + } else { + if (record->event.pressed) { + register_code(KC_D); } else { - unregister_code(KC_D); - } - } + unregister_code(KC_D); + } + } break; case VIBRK: // vi esc: if (record->event.pressed) { - return MACRO( T(E),D(LSFT),T(SCLN),U(LSFT), END ); + return MACRO( T(ESC),D(LSFT),T(SCLN),U(LSFT), END ); } break; - } - return MACRO_NONE; -}; + +#ifdef USE_BABLPASTE -#ifdef AUDIO_ENABLE +#ifdef LINUX_MODE + case B_LNX: + return switch_babble_mode(LINUX_MODE); +#endif +#ifdef MS_MODE + case B_WIN: + return switch_babble_mode(MS_MODE); +#endif +#ifdef MAC_MODE + case B_MAC: + return switch_babble_mode(MAC_MODE); +#endif +#ifdef VI_MODE + case B_VI: + return switch_babble_mode(VI_MODE); +#endif +#ifdef READMUX_MODE + case B_READ: + return switch_babble_mode(READMUX_MODE); +#endif +#endif -void startup_user() -{ - _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); -} -#endif + default: + return MACRO_NONE; + } -void matrix_init_user(void) { +return MACRO_NONE; +}; + + + + +void matrix_init_user(void) { } void matrix_scan_user(void) { @@ -240,3 +286,11 @@ void led_set_user(uint8_t usb_led) { } +macro_t* switch_babble_mode( uint8_t id) { + babble_mode= id; + return MACRO_NONE; //less typing above +} + + + + diff --git a/keyboards/handwired/MS-sculpt-mobile/rules.mk b/keyboards/handwired/MS-sculpt-mobile/rules.mk index cb9d5813c..34ac78da8 100644 --- a/keyboards/handwired/MS-sculpt-mobile/rules.mk +++ b/keyboards/handwired/MS-sculpt-mobile/rules.mk @@ -1,5 +1,9 @@ #CFLAGS=-D ASTAR +## Project specific files +SRC= babblePaste.c + + ifdef ASTAR OPT_DEFS += -DBOOTLOADER_SIZE=4096 MCU = atmega32u4 -- cgit v1.2.3 From 08cba6c09b505340ec6c1932df4b17aab1816d97 Mon Sep 17 00:00:00 2001 From: Joshua Colbeck Date: Tue, 7 Mar 2017 09:43:08 -0600 Subject: Fixed minor error in ergodox infinity section. --- keyboards/ergodox/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/ergodox/readme.md b/keyboards/ergodox/readme.md index 45b3354c1..5e50548be 100644 --- a/keyboards/ergodox/readme.md +++ b/keyboards/ergodox/readme.md @@ -100,7 +100,7 @@ for the left and right halves seperately. To flash them: - Install the firmware with `sudo make infinity-keymapname-dfu-util` - - Build left hand firmware with `make infinity-keymapname MASTER=right` + - Build right hand firmware with `make infinity-keymapname MASTER=right` - Plug in the right hand keyboard only. -- cgit v1.2.3 From 1023a47be6b91282b92b9a44f4492aa88375bf8e Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Wed, 22 Feb 2017 16:51:25 -0500 Subject: Copy CMD60 as starting point and rename files --- keyboards/handwired/magicforce68/README.md | 35 +++++ keyboards/handwired/magicforce68/config.h | 162 +++++++++++++++++++++ .../magicforce68/keymaps/default/keymap.c | 66 +++++++++ keyboards/handwired/magicforce68/magicforce68.c | 8 + keyboards/handwired/magicforce68/magicforce68.h | 20 +++ keyboards/handwired/magicforce68/rules.mk | 73 ++++++++++ 6 files changed, 364 insertions(+) create mode 100644 keyboards/handwired/magicforce68/README.md create mode 100644 keyboards/handwired/magicforce68/config.h create mode 100644 keyboards/handwired/magicforce68/keymaps/default/keymap.c create mode 100644 keyboards/handwired/magicforce68/magicforce68.c create mode 100644 keyboards/handwired/magicforce68/magicforce68.h create mode 100644 keyboards/handwired/magicforce68/rules.mk diff --git a/keyboards/handwired/magicforce68/README.md b/keyboards/handwired/magicforce68/README.md new file mode 100644 index 000000000..83e371543 --- /dev/null +++ b/keyboards/handwired/magicforce68/README.md @@ -0,0 +1,35 @@ +CMD60 keyboard firmware +====================== + +##CMD60 + +This layout has been designed to optimize use of the left-hand, and it focussed specifically on programmers who work +with text editors like SublimeText and Atom. It utilizes the power of Space_fn, and features a caps lock swap for Fn2 +and enter key on tap. These features allow you to keep your right hand on the mouse more and should enable you to +achieve a higher level of productivity if you take the time to learn its function layers. + +## Quantum MK Firmware + +For the full Quantum feature list, see [the parent readme.md](/doc/readme.md). + +## Building + +Download or clone the whole firmware and navigate to the keyboards/handwired/CMD60 folder. +Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use +the Teensy Loader to program your .hex file. + +Depending on which keymap you would like to use, you will have to compile slightly differently. + +### Default + +To build with the default keymap, simply run `make`. + +### Other Keymaps + +To build the firmware binary hex file with a keymap just do `make` with `keymap` option like: + +``` +$ make keymap=[default|jack|] +``` + +Keymaps follow the format **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/` diff --git a/keyboards/handwired/magicforce68/config.h b/keyboards/handwired/magicforce68/config.h new file mode 100644 index 000000000..9671b66ba --- /dev/null +++ b/keyboards/handwired/magicforce68/config.h @@ -0,0 +1,162 @@ +/* +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 Hexwire +#define PRODUCT Magicforce 68 +#define DESCRIPTION Advanced Programming Keeb Layout + +/* 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 { F0, F4, F5, F6, F7 } +#define MATRIX_COL_PINS { B0, B1, B2, B3, B7, D0, D1, D2, D3, C6, D7, B4, B5, B6 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/handwired/magicforce68/keymaps/default/keymap.c b/keyboards/handwired/magicforce68/keymaps/default/keymap.c new file mode 100644 index 000000000..9f9cbcd66 --- /dev/null +++ b/keyboards/handwired/magicforce68/keymaps/default/keymap.c @@ -0,0 +1,66 @@ +#include "CMD60.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = KEYMAP( /* CMD60 - QWERTY */ + KC_ESC, 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_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, \ + LT(3, KC_ENT), 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_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, KC_NO, KC_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, LT(2, KC_SPC), MO(3), MO(4), MO(5), TG(1) \ + ), + [1] = KEYMAP( /* CMD60 - GameMode */ + 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, 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_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, \ + KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_RSFT, \ + KC_TRNS, KC_NO, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ), + [2] = KEYMAP( /* CMD60 - Arrows */ + 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_DEL, \ + KC_TRNS, KC_BSPC, KC_UP, KC_DEL, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC, KC_UP, KC_DEL, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, \ + KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ), + [3] = KEYMAP( /* CMD60 - Functions */ + 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_DEL, \ + KC_AUDIO_MUTE, KC_BSPC, KC_PGUP, KC_DEL, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_UP, KC_PGDN, KC_TRNS, KC_PAUSE, KC_SLCK, KC_PSCREEN, \ + KC_TRNS, KC_HOME, KC_PGDN, KC_END, KC_TRNS, KC_TRNS, KC_HOME, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_INSERT, KC_NO, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ), + [4] = KEYMAP( /* CMD60 - Mouse */ + KC_SYSTEM_SLEEP, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_TRNS, KC_NO, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_WH_UP, KC_MS_BTN3, KC_MS_WH_DOWN, KC_NO, KC_NO, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ), + [5] = KEYMAP( /* CMD60 - Media */ + KC_SYSTEM_WAKE, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_AUDIO_MUTE, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MEDIA_PREV_TRACK, KC_MEDIA_NEXT_TRACK, KC_MEDIA_PLAY_PAUSE, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_WWW_BACK, KC_WWW_FORWARD, KC_NO, KC_NO, KC_WWW_REFRESH, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ), +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; diff --git a/keyboards/handwired/magicforce68/magicforce68.c b/keyboards/handwired/magicforce68/magicforce68.c new file mode 100644 index 000000000..84b1007e2 --- /dev/null +++ b/keyboards/handwired/magicforce68/magicforce68.c @@ -0,0 +1,8 @@ +#include "magicforce68.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} diff --git a/keyboards/handwired/magicforce68/magicforce68.h b/keyboards/handwired/magicforce68/magicforce68.h new file mode 100644 index 000000000..de465a828 --- /dev/null +++ b/keyboards/handwired/magicforce68/magicforce68.h @@ -0,0 +1,20 @@ +#ifndef MAGICFORCE68_H +#define MAGICFORCE68_H + +#include "quantum.h" + +#define KEYMAP( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ + K40, K41, K42, K45, K4A, K4B, K4C, K4D \ + ) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ + { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, KC_NO,K4A, K4B, K4C, K4D } \ +} + +#endif \ No newline at end of file diff --git a/keyboards/handwired/magicforce68/rules.mk b/keyboards/handwired/magicforce68/rules.mk new file mode 100644 index 000000000..711759917 --- /dev/null +++ b/keyboards/handwired/magicforce68/rules.mk @@ -0,0 +1,73 @@ + +# MCU name +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=512 + + +# 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 ?= yes # Console for debug(+400) +COMMAND_ENABLE ?= yes # 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 ?= no # USB Nkey Rollover +BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default +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 + +ifndef QUANTUM_DIR + include ../../../Makefile +endif + + -- cgit v1.2.3 From 6ee823a821d9c89a67c53f65ecf4d745223694a0 Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Sun, 26 Feb 2017 10:16:24 -0500 Subject: Add rule for flashing microcontroller using avrdude --- keyboards/handwired/magicforce68/rules.mk | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/keyboards/handwired/magicforce68/rules.mk b/keyboards/handwired/magicforce68/rules.mk index 711759917..e897ef252 100644 --- a/keyboards/handwired/magicforce68/rules.mk +++ b/keyboards/handwired/magicforce68/rules.mk @@ -70,4 +70,14 @@ ifndef QUANTUM_DIR include ../../../Makefile endif +avrdude: build + ls /dev/tty* > /tmp/1; \ + echo "Reset your Pro Micro now"; \ + while [[ -z $$USB ]]; do \ + sleep 1; \ + ls /dev/tty* > /tmp/2; \ + USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \ + done; \ + avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex +.PHONY: avrdude -- cgit v1.2.3 From f3aef727e174279e69d8d5831d859d00802eb8c4 Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Tue, 7 Mar 2017 11:41:10 -0500 Subject: Set pinout and layout --- keyboards/handwired/magicforce68/config.h | 6 +- .../magicforce68/keymaps/default/keymap.c | 90 ++++++++++++---------- keyboards/handwired/magicforce68/magicforce68.h | 20 ++--- 3 files changed, 61 insertions(+), 55 deletions(-) diff --git a/keyboards/handwired/magicforce68/config.h b/keyboards/handwired/magicforce68/config.h index 9671b66ba..8a49b0935 100644 --- a/keyboards/handwired/magicforce68/config.h +++ b/keyboards/handwired/magicforce68/config.h @@ -30,7 +30,7 @@ along with this program. If not, see . /* key matrix size */ #define MATRIX_ROWS 5 -#define MATRIX_COLS 14 +#define MATRIX_COLS 15 /* * Keyboard Matrix Assignments @@ -42,8 +42,8 @@ along with this program. If not, see . * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) * */ -#define MATRIX_ROW_PINS { F0, F4, F5, F6, F7 } -#define MATRIX_COL_PINS { B0, B1, B2, B3, B7, D0, D1, D2, D3, C6, D7, B4, B5, B6 } +#define MATRIX_ROW_PINS { F0, F1, F4, F5, F6 } +#define MATRIX_COL_PINS { B2, B0, D3, D2, D1, D0, D4, C6, D7, E6, B4, B5, B6, B7, D6 } #define UNUSED_PINS /* COL2ROW or ROW2COL */ diff --git a/keyboards/handwired/magicforce68/keymaps/default/keymap.c b/keyboards/handwired/magicforce68/keymaps/default/keymap.c index 9f9cbcd66..628249c2d 100644 --- a/keyboards/handwired/magicforce68/keymaps/default/keymap.c +++ b/keyboards/handwired/magicforce68/keymaps/default/keymap.c @@ -1,52 +1,58 @@ -#include "CMD60.h" +#include "magicforce68.h" + +#define _QWERTY 0 +#define _FN1 1 +#define _FN2 2 +#define KC_ KC_TRNS const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = KEYMAP( /* CMD60 - QWERTY */ - KC_ESC, 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_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, \ - LT(3, KC_ENT), 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_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, KC_NO, KC_RSFT, \ - KC_LCTL, KC_LGUI, KC_LALT, LT(2, KC_SPC), MO(3), MO(4), MO(5), TG(1) \ - ), - [1] = KEYMAP( /* CMD60 - GameMode */ - 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, 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_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, \ - KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_RSFT, \ - KC_TRNS, KC_NO, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ - ), - [2] = KEYMAP( /* CMD60 - Arrows */ - 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_DEL, \ - KC_TRNS, KC_BSPC, KC_UP, KC_DEL, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC, KC_UP, KC_DEL, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, \ - KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ - ), - [3] = KEYMAP( /* CMD60 - Functions */ - 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_DEL, \ - KC_AUDIO_MUTE, KC_BSPC, KC_PGUP, KC_DEL, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_UP, KC_PGDN, KC_TRNS, KC_PAUSE, KC_SLCK, KC_PSCREEN, \ - KC_TRNS, KC_HOME, KC_PGDN, KC_END, KC_TRNS, KC_TRNS, KC_HOME, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_INSERT, KC_NO, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + [_QWERTY] = KEYMAP( + /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */ + ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,EQL , BSPC , INS ,PGUP, + /*|----`----`----`----`----`----`----`----`----`----`----`----`----`--------| |----`----| */ + TAB , Q , W , E , R , T , Y , U , I , O , P ,LBRC,RBRC, BSLS , DEL ,PGDN, + /*|------`----`----`----`----`----`----`----`----`----`----`----`----`------| `----`----' */ + FN0 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT, ENTER , + /*|-------`----`----`----`----`----`----`----`----`----`----`----`----------| ,----. */ + LSFT , Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, RSFT , UP , + /*|---------`----`----`----`----`----`----`----`----`----`----`-------------.--|----|----. */ + LCTL ,LGUI ,LALT , SPACE , FN1 ,RALT ,RCTL , LEFT,DOWN,RGHT + /*`-----+-----+-----+------------------------------+------+-----+-----' `----+----+----' */ ), - [4] = KEYMAP( /* CMD60 - Mouse */ - KC_SYSTEM_SLEEP, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_TRNS, KC_NO, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_WH_UP, KC_MS_BTN3, KC_MS_WH_DOWN, KC_NO, KC_NO, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ - ), - [5] = KEYMAP( /* CMD60 - Media */ - KC_SYSTEM_WAKE, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_AUDIO_MUTE, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MEDIA_PREV_TRACK, KC_MEDIA_NEXT_TRACK, KC_MEDIA_PLAY_PAUSE, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_WWW_BACK, KC_WWW_FORWARD, KC_NO, KC_NO, KC_WWW_REFRESH, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + + [_FN1] = KEYMAP( + /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */ + GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC , VOLU,HOME, + /*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| |ins-`pgup| */ + , , , UP , , , , , , , , , , , VOLD,END, + /*|tab---`-q--`-w--`-e--`-r--`-t--`-y--`-u--`-i--`-o--`-p--`-{--`-}--`--|---| `del-`pgdn' */ + , ,LEFT,DOWN,RGHT, , , , , , , , , + /*|caps---`-a--`-s--`-d--`-f--`-g--`-h--`-j--`-k--`-l--`-;--`-'--`----enter-| ,----. */ + , , , , , , ,MUTE, , , , , MUTE, + /*|shift----`-z--`-x--`-c--`-v--`-b--`-n--`-m--`-,--`-.--`-/--`-------shift-.--|-up-|----. */ + , , , , , , , MPRV,MPLY,MNXT + /*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' `left+down+rght' */ ), + + [_FN2] = KEYMAP( + /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */ + GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC , VOLU,HOME, + /*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| |ins-`pgup| */ + , , , UP , , , , 7 , 8 , 9 , , , , , VOLD,END, + /*|tab---`-q--`-w--`-e--`-r--`-t--`-y--`-u--`-i--`-o--`-p--`-{--`-}--`--|---| `del-`pgdn' */ + , ,LEFT,DOWN,RGHT, , , 4 , 5 , 6 , , , , + /*|caps---`-a--`-s--`-d--`-f--`-g--`-h--`-j--`-k--`-l--`-;--`-'--`----enter-| ,----. */ + , , , , , , 0 , 1 , 2 , 3 , , , MUTE, + /*|shift----`-z--`-x--`-c--`-v--`-b--`-n--`-m--`-,--`-.--`-/--`-------shift-.--|-up-|----. */ + , , , , , , , MPRV,MPLY,MNXT + /*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' `left+down+rght' */ + ) }; const uint16_t PROGMEM fn_actions[] = { - + [0] = LT(KC_FN2, KC_GRV), + [1] = MO(_FN1), + [2] = MO(_FN2), }; diff --git a/keyboards/handwired/magicforce68/magicforce68.h b/keyboards/handwired/magicforce68/magicforce68.h index de465a828..cfcdce38d 100644 --- a/keyboards/handwired/magicforce68/magicforce68.h +++ b/keyboards/handwired/magicforce68/magicforce68.h @@ -4,17 +4,17 @@ #include "quantum.h" #define KEYMAP( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ - K40, K41, K42, K45, K4A, K4B, K4C, K4D \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K2E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K3E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3C, K3D, \ + K40, K41, K42, K45, K49, K4A, K4B, K4C, K4D, K4E \ ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ - { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, KC_NO,K4A, K4B, K4C, K4D } \ + { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, KC_##K09, KC_##K0A, KC_##K0B, KC_##K0C, KC_##K0D, KC_##K0E }, \ + { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K1A, KC_##K1B, KC_##K1C, KC_##K1D, KC_##K1E }, \ + { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K2A, KC_##K2B, KC_##K2C, KC_NO, KC_##K2E }, \ + { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39, KC_##K3A, KC_NO, KC_##K3C, KC_##K3D, KC_##K3E }, \ + { KC_##K40, KC_##K41, KC_##K42, KC_NO, KC_NO, KC_##K45, KC_NO, KC_NO, KC_NO, KC_##K49, KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D, KC_##K4E } \ } #endif \ No newline at end of file -- cgit v1.2.3 From 2cd2ac02d1c215167a1d82d675dc7cab1d5d90be Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Tue, 7 Mar 2017 12:19:29 -0500 Subject: Add readme file --- keyboards/handwired/magicforce68/README.md | 39 +++++++-------------- keyboards/handwired/magicforce68/wiring-layout.png | Bin 0 -> 73739 bytes 2 files changed, 12 insertions(+), 27 deletions(-) create mode 100644 keyboards/handwired/magicforce68/wiring-layout.png diff --git a/keyboards/handwired/magicforce68/README.md b/keyboards/handwired/magicforce68/README.md index 83e371543..4f0ccecf9 100644 --- a/keyboards/handwired/magicforce68/README.md +++ b/keyboards/handwired/magicforce68/README.md @@ -1,35 +1,20 @@ -CMD60 keyboard firmware -====================== +Magicforce 68 Handwired +======================= -##CMD60 +This firmware is for a Magicforce 68 that's had its PCB removed and is handwired with an Arduino Micro. NOTE: The Arduino Micro is different than the Arduino *Pro* Micro. -This layout has been designed to optimize use of the left-hand, and it focussed specifically on programmers who work -with text editors like SublimeText and Atom. It utilizes the power of Space_fn, and features a caps lock swap for Fn2 -and enter key on tap. These features allow you to keep your right hand on the mouse more and should enable you to -achieve a higher level of productivity if you take the time to learn its function layers. +## Wiring Layout -## Quantum MK Firmware +![Wiring Layout](wiring-layout.png) -For the full Quantum feature list, see [the parent readme.md](/doc/readme.md). +## Pinout -## Building +The following pins are used: +- Columns 1-15: B2, B0, D3, D2, D1, D0, D4, C6, D7, E6, B4, B5, B6, B7, D6 +- Rows 1-5: F0, F1, F4, F5, F6 -Download or clone the whole firmware and navigate to the keyboards/handwired/CMD60 folder. -Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use -the Teensy Loader to program your .hex file. +## Compiling and loading the firmware -Depending on which keymap you would like to use, you will have to compile slightly differently. +To build the firmware, run `make`. -### Default - -To build with the default keymap, simply run `make`. - -### Other Keymaps - -To build the firmware binary hex file with a keymap just do `make` with `keymap` option like: - -``` -$ make keymap=[default|jack|] -``` - -Keymaps follow the format **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/` +To flash the firemware onto the microcontroller, run `make avrdude`, and press the reset button. diff --git a/keyboards/handwired/magicforce68/wiring-layout.png b/keyboards/handwired/magicforce68/wiring-layout.png new file mode 100644 index 000000000..816b10b2b Binary files /dev/null and b/keyboards/handwired/magicforce68/wiring-layout.png differ -- cgit v1.2.3 From 38a83700c3c21326e691452c4dc002d398812679 Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Tue, 7 Mar 2017 12:29:48 -0500 Subject: Update description --- keyboards/handwired/magicforce68/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/handwired/magicforce68/config.h b/keyboards/handwired/magicforce68/config.h index 8a49b0935..1e2b7d3e7 100644 --- a/keyboards/handwired/magicforce68/config.h +++ b/keyboards/handwired/magicforce68/config.h @@ -26,7 +26,7 @@ along with this program. If not, see . #define DEVICE_VER 0x0001 #define MANUFACTURER Hexwire #define PRODUCT Magicforce 68 -#define DESCRIPTION Advanced Programming Keeb Layout +#define DESCRIPTION Handwired Magicforce 68 /* key matrix size */ #define MATRIX_ROWS 5 -- cgit v1.2.3 From a9959783c0a190410307e3e6cc1be4c024e9cddd Mon Sep 17 00:00:00 2001 From: stites Date: Tue, 7 Mar 2017 11:45:47 -0500 Subject: Add freebsd support in "util/install_dependencies.sh" A simple addition to the `install_dependencies` script which remaps the debian dependencies to their freebsd package-names. After a recursive clone and using gmake, I can successfully build all firmware from the root directory (minus some warnings generated by gcc-4.9.4 which I can procure on request). however there is a problem running tests. --- util/install_dependencies.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/util/install_dependencies.sh b/util/install_dependencies.sh index 936a86593..1b73a8b3b 100755 --- a/util/install_dependencies.sh +++ b/util/install_dependencies.sh @@ -92,4 +92,23 @@ elif [[ -n "$(type -P zypper)" ]]; then # TODO: The avr and eabi tools are not available as default packages, so we need # another way to install them +elif [[ -n "$(type -P pkg)" ]]; then + # FreeBSD + pkg update + pkg install -y \ + git \ + wget \ + gmake \ + gcc \ + zip \ + unzip \ + avr-binutils \ + avr-gcc \ + avr-libc \ + dfu-programmer \ + dfu-util \ + arm-none-eabi-gcc \ + arm-none-eabi-binutils \ + arm-none-eabi-newlib \ + diffutils fi -- cgit v1.2.3 From 1968ec4c24137eb413a80ae5031e09c09bad4138 Mon Sep 17 00:00:00 2001 From: Ole Anders Date: Tue, 7 Mar 2017 19:40:18 +0100 Subject: changed definitions on keymap.c in admiral strokers Made a few changes to my own keymaps. (organisation) --- keyboards/satan/keymaps/admiralStrokers/keymap.c | 213 ++++++++++++----------- 1 file changed, 109 insertions(+), 104 deletions(-) diff --git a/keyboards/satan/keymaps/admiralStrokers/keymap.c b/keyboards/satan/keymaps/admiralStrokers/keymap.c index 487deb086..97a0f225d 100644 --- a/keyboards/satan/keymaps/admiralStrokers/keymap.c +++ b/keyboards/satan/keymaps/admiralStrokers/keymap.c @@ -1,117 +1,117 @@ #include "satan.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // general keydefs - #define norm 0 // Default layer - #define elev 1 // Layer directional keys - #define supr 2 // F-keys and mediakeys - #define spac 3 - #define FNO1 4 // - #define FNO2 5 // - #define FNO3 6 // - #define MAC0 M(0) // - #define MAC1 M(1) // - #define MAC2 M(2) // - #define MAC3 M(3) // - #define MAC4 M(4) // - #define MAC5 M(5) // - #define MAC6 M(6) // - #define MAC7 M(7) // - #define MAC8 M(8) // - #define MAC9 M(9) // - #define GRAV KC_GRV // - #define MEDI F(FNO1)// +#define norm 0 // Default layer +#define elev 1 // Layer directional keys +#define supr 2 // F-keys and mediakeys +#define spac 3 +#define FNO1 4 // +#define FNO2 5 // +#define FNO3 6 // +#define MAC0 M(0) // +#define MAC1 M(1) // +#define MAC2 M(2) // +#define MAC3 M(3) // +#define MAC4 M(4) // +#define MAC5 M(5) // +#define MAC6 M(6) // +#define MAC7 M(7) // +#define MAC8 M(8) // +#define MAC9 M(9) // +#define GRAV KC_GRV // +#define MEDI F(FNO1)// // General shortenings - #define ESCA KC_ESC - #define MINS KC_MINS - #define EQUL KC_EQL - #define BSPC KC_BSPC - #define DELE KC_DEL - #define LBRC KC_LBRC - #define RBRC KC_RBRC - #define ALTR KC_RALT - #define SCLN KC_SCLN - #define QUOT KC_QUOT - #define NUHS KC_NUHS - #define ENTE KC_ENT - #define NUBS KC_NUBS // Less/ greater sign - #define COMM KC_COMM // Comma - #define FSTO KC_DOT // Full stop - #define SLSH KC_SLSH - #define ALTL KC_LALT - #define GUIL KC_LGUI - #define GUIR KC_RGUI - #define MENO KC_MENU +#define ESCA KC_ESC +#define MINS KC_MINS +#define EQUL KC_EQL +#define BSPC KC_BSPC +#define DELE KC_DEL +#define LBRC KC_LBRC +#define RBRC KC_RBRC +#define ALTR KC_RALT +#define SCLN KC_SCLN +#define QUOT KC_QUOT +#define NUHS KC_NUHS +#define ENTE KC_ENT +#define NUBS KC_NUBS // Less/ greater sign +#define COMM KC_COMM // Comma +#define FSTO KC_DOT // Full stop +#define SLSH KC_SLSH +#define ALTL KC_LALT +#define GUIL KC_LGUI +#define GUIR KC_RGUI +#define MENO KC_MENU // The F-row/layer: - #define FK01 KC_F1 - #define FK02 KC_F2 - #define FK03 KC_F3 - #define FK04 KC_F4 - #define FK05 KC_F5 - #define FK06 KC_F6 - #define FK07 KC_F7 - #define FK08 KC_F8 - #define FK09 KC_F9 - #define FK10 KC_F10 - #define FK11 KC_F11 - #define FK12 KC_F12 - #define FK13 KC_F13 - #define FK14 KC_F14 +#define FK01 KC_F1 +#define FK02 KC_F2 +#define FK03 KC_F3 +#define FK04 KC_F4 +#define FK05 KC_F5 +#define FK06 KC_F6 +#define FK07 KC_F7 +#define FK08 KC_F8 +#define FK09 KC_F9 +#define FK10 KC_F10 +#define FK11 KC_F11 +#define FK12 KC_F12 +#define FK13 KC_F13 +#define FK14 KC_F14 // Special Actions and Media Keys - #define INSE KC_INS // Insert here - #define HOME KC_HOME // Go to beginning of line - #define ENDI KC_END // go to end of line - #define PSCR KC_PSCR // Print Screen - #define SLCK KC_SLCK // go to end of line - #define PGDN KC_PGDN // go to end of line - #define PGUP KC_PGUP // go to end of line - #define PLPS KC_MPLY // Play/Pause - #define PAUS KC_PAUS // Pause button - #define MUTE KC_MUTE // Mute sound - #define VOLU KC_VOLU // Volume increase - #define VOLD KC_VOLD // Volume decrease - #define MNXT KC_MNXT // next track - #define MPRV KC_MPRV // prev track - #define MSTP KC_MSTP // stop playing - #define MSEL KC_MSEL // Select media (Start playing it) - #define MAIL KC_MAIL // Open default mail app - #define CALC KC_CALC // Open default calculator app - #define MYCM KC_MYCM // Open default file manager - //#define LILO KC_XXXXXX // Reserved for later - //#define LIHI KC_XXXXXX // Reserved for later +#define INSE KC_INS // Insert here +#define HOME KC_HOME // Go to beginning of line +#define ENDI KC_END // go to end of line +#define PSCR KC_PSCR // Print Screen +#define SLCK KC_SLCK // go to end of line +#define PGDN KC_PGDN // go to end of line +#define PGUP KC_PGUP // go to end of line +#define PLPS KC_MPLY // Play/Pause +#define PAUS KC_PAUS // Pause button +#define MUTE KC_MUTE // Mute sound +#define VOLU KC_VOLU // Volume increase +#define VOLD KC_VOLD // Volume decrease +#define MNXT KC_MNXT // next track +#define MPRV KC_MPRV // prev track +#define MSTP KC_MSTP // stop playing +#define MSEL KC_MSEL // Select media (Start playing it) +#define MAIL KC_MAIL // Open default mail app +#define CALC KC_CALC // Open default calculator app +#define MYCM KC_MYCM // Open default file manager +//#define LILO KC_XXXXXX // Reserved for later +//#define LIHI KC_XXXXXX // Reserved for later // dual-role shortcuts - #define DUTB LT(elev, KC_TAB) // `tabs` layer on hold and tab on tap - #define DUSP LT(spac, KC_SPACE) // `spce` layer on hold and space on tap - #define LOCK LGUI(KC_L) // lock computer (win) +#define DUTB LT(elev, KC_TAB) // `tabs` layer on hold and tab on tap +#define DUSP LT(spac, KC_SPACE) // `spce` layer on hold and space on tap +#define LOCK LGUI(KC_L) // lock computer (win) // Space Admiral Strokers - #define SADL MAC0 // Hold for lshift and { on tap - #define SADR MAC1 // Hold for rshift and } on tap - #define CADL MAC2 // Hold for lctrl and [ on tap - #define CADR MAC3 // Hold for rctrl and ] on tap +#define SADL MAC0 // Hold for lshift and { on tap +#define SADR MAC1 // Hold for rshift and } on tap +#define CADL MAC2 // Hold for lctrl and [ on tap +#define CADR MAC3 // Hold for rctrl and ] on tap // arrow cluster duality bottom right corner - #define ARLF ALT_T(KC_LEFT) // Left arrow - #define ARRT CTL_T(KC_RIGHT)// Right arrow - #define ARUP SFT_T(KC_UP) // Up arrow - #define ARDN GUI_T(KC_DOWN) // Down arrow +#define ARLF ALT_T(KC_LEFT) // Left arrow +#define ARRT CTL_T(KC_RIGHT)// Right arrow +#define ARUP SFT_T(KC_UP) // Up arrow +#define ARDN GUI_T(KC_DOWN) // Down arrow // brackets - #define NOCL RALT(KC_7) // [ - #define NOCR RALT(KC_0) // ] - #define NOPL LSFT(KC_8) // ( - #define NOPR LSFT(KC_9) // ) - #define NOAL KC_NUBS // < - #define NOAR LSFT(KC_NUBS) // > - #define NOBL RALT(KC_8) // [ - #define NOBR RALT(KC_9) // ] +#define NOCL RALT(KC_7) // [ +#define NOCR RALT(KC_0) // ] +#define NOPL LSFT(KC_8) // ( +#define NOPR LSFT(KC_9) // ) +#define NOAL KC_NUBS // < +#define NOAR LSFT(KC_NUBS) // > +#define NOBL RALT(KC_8) // [ +#define NOBR RALT(KC_9) // ] // increase readability - #define XXXX KC_TRNS - #define DEAD KC_NO - #define SCAN KC_TRNS // Scandinavian keys, the Row 5 key 5 is actually Row 1 key 15 on the PCB +#define XXXX KC_TRNS +#define DEAD KC_NO +#define SCAN KC_TRNS // Scandinavian keys, the Row 5 key 5 is actually Row 1 key 15 on the PCB [ norm ] = KEYMAP( // Normal scandinavian mapping (danish has QUOT and SCLN wapped) GRAV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, MINS, EQUL, BSPC, DELE,\ @@ -143,40 +143,45 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function - static uint16_t key_timer; + static uint16_t key_timer; + bool checkTime(){ + return (timer_elapsed(key_timer) < 150) ? true : false; + } + + switch(id) { case 0: //MAC0 - Hold for lshift and { on tap if (record->event.pressed) { key_timer = timer_read(); return MACRO(D(LSFT), END ); } else { - return (timer_elapsed(key_timer) < 150) ? MACRO(U(LSFT),D(RALT),T(7),U(RALT),END): MACRO(U(LSFT),END); + return checktime() ? MACRO(U(LSFT),D(RALT),T(7),U(RALT),END): MACRO(U(LSFT),END); }; break; case 1: //MAC1 - Hold for rshift and } on tap if (record->event.pressed) { key_timer = timer_read(); return MACRO(D(RSFT), END ); } else { - return (timer_elapsed(key_timer) < 150) ? MACRO(U(RSFT),D(RALT),T(0),U(RALT),END): MACRO(U(RSFT),END); + return checktime() ? MACRO(U(RSFT),D(RALT),T(0),U(RALT),END): MACRO(U(RSFT),END); }; break; case 2: //MAC2 - Hold for lctrl and [ on tap if (record->event.pressed) { key_timer = timer_read(); return MACRO(D(LCTL), END ); - } else {return (timer_elapsed(key_timer) < 150) ? MACRO(U(LCTL),D(RALT),T(8),U(RALT),END):MACRO(U(LCTL),END); + } else {return checktime() ? MACRO(U(LCTL),D(RALT),T(8),U(RALT),END):MACRO(U(LCTL),END); }; break; case 3: //MAC3 - Hold for rctrl and ] on tap if (record->event.pressed) { key_timer = timer_read(); return MACRO(D(RCTL), END ); } else { - return (timer_elapsed(key_timer) < 150) ? MACRO(U(RCTL),D(RALT),T(9),U(RALT),END):MACRO(U(RCTL),END); + return checktime() ? MACRO(U(RCTL),D(RALT),T(9),U(RALT),END):MACRO(U(RCTL),END); }; break; - case 4: //MAC4 + case 4: //MAC4 reserved for later. if (record->event.pressed) { } else { }; break; - case 5: //MAC5 + case 5: //MAC5 reserved for later. if (record->event.pressed) { } else { }; break; - case 6: //MAC6 + case 6: //MAC6 reserved for later. if (record->event.pressed) { } else { }; break; } return MACRO_NONE; }; -- cgit v1.2.3 From 7042af702057d4d129f1517712fab7f28e75b2f3 Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Tue, 7 Mar 2017 23:06:41 -0500 Subject: Add Makefile --- keyboards/handwired/magicforce68/Makefile | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 keyboards/handwired/magicforce68/Makefile diff --git a/keyboards/handwired/magicforce68/Makefile b/keyboards/handwired/magicforce68/Makefile new file mode 100644 index 000000000..191c6bb66 --- /dev/null +++ b/keyboards/handwired/magicforce68/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../../Makefile +endif \ No newline at end of file -- cgit v1.2.3 From 3d082382b20ab338bb7f41b33329daffc994169a Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Tue, 7 Mar 2017 23:08:44 -0500 Subject: Fix function layer actions --- keyboards/handwired/magicforce68/keymaps/default/keymap.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/keyboards/handwired/magicforce68/keymaps/default/keymap.c b/keyboards/handwired/magicforce68/keymaps/default/keymap.c index 628249c2d..22553f714 100644 --- a/keyboards/handwired/magicforce68/keymaps/default/keymap.c +++ b/keyboards/handwired/magicforce68/keymaps/default/keymap.c @@ -4,6 +4,8 @@ #define _FN1 1 #define _FN2 2 #define KC_ KC_TRNS +#define KC_X0 LT(_FN2, KC_GRV) +#define KC_X1 MO(_FN1) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = KEYMAP( @@ -12,11 +14,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /*|----`----`----`----`----`----`----`----`----`----`----`----`----`--------| |----`----| */ TAB , Q , W , E , R , T , Y , U , I , O , P ,LBRC,RBRC, BSLS , DEL ,PGDN, /*|------`----`----`----`----`----`----`----`----`----`----`----`----`------| `----`----' */ - FN0 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT, ENTER , + X0 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT, ENTER , /*|-------`----`----`----`----`----`----`----`----`----`----`----`----------| ,----. */ LSFT , Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, RSFT , UP , /*|---------`----`----`----`----`----`----`----`----`----`----`-------------.--|----|----. */ - LCTL ,LGUI ,LALT , SPACE , FN1 ,RALT ,RCTL , LEFT,DOWN,RGHT + LCTL ,LGUI ,LALT , SPACE , X1 ,RALT ,RCTL , LEFT,DOWN,RGHT /*`-----+-----+-----+------------------------------+------+-----+-----' `----+----+----' */ ), @@ -49,13 +51,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -const uint16_t PROGMEM fn_actions[] = { - [0] = LT(KC_FN2, KC_GRV), - [1] = MO(_FN1), - [2] = MO(_FN2), -}; - - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function -- cgit v1.2.3 From 01980c96e9c1e8ab5aad0e89d03c0e15417712c8 Mon Sep 17 00:00:00 2001 From: milestogo Date: Wed, 8 Mar 2017 01:06:25 -0800 Subject: added browser babble, removed code from keymap --- keyboards/handwired/MS-sculpt-mobile/babblePaste.c | 408 +++++++++++++-------- keyboards/handwired/MS-sculpt-mobile/babblePaste.h | 151 +++++++- .../MS-sculpt-mobile/keymaps/milestogo/config.h | 13 +- .../MS-sculpt-mobile/keymaps/milestogo/keymap.c | 78 ++-- 4 files changed, 438 insertions(+), 212 deletions(-) diff --git a/keyboards/handwired/MS-sculpt-mobile/babblePaste.c b/keyboards/handwired/MS-sculpt-mobile/babblePaste.c index 93ff486e0..491a79333 100644 --- a/keyboards/handwired/MS-sculpt-mobile/babblePaste.c +++ b/keyboards/handwired/MS-sculpt-mobile/babblePaste.c @@ -15,6 +15,13 @@ and https://github.com/qmk/qmk_firmware/blob/master/keyboards/planck/keymaps/jee // GLOBAL variable to determine mode. Sets startup default if no eeppom uint8_t babble_mode =0 ; +// small function that we might also want to call from a keymap. + +macro_t* switch_babble_mode( uint8_t id) { + babble_mode= id; + return MACRO_NONE; //less typing above +} + // Today I learned that the preprocessor can not create a switch statement label from an argument // And else statements have problems, see https://gcc.gnu.org/onlinedocs/gcc-3.0.1/cpp_3.html#SEC15 @@ -23,63 +30,80 @@ uint8_t babble_mode =0 ; { action_macro_play( MACRO(macro)); return MACRO_NONE; } -const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) { /* this function runs the appropriate babblepaste macro, given the global babble_mode, and a shortcut from the ENUM in babblePaste.h TODO, the pointers in this function should be stored in a PROGMEM array, not ram. But that requires even more clever preprocessor foo. */ - +const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) { +/* if ( shortcut < BABL_START_NUM || \ shortcut >= (BABL_START_NUM + BABL_NUM_MACROS ) ) { return MACRO_NONE; } - - +*/ switch(babble_mode) { - -#ifdef MS_MODE + + +#ifdef MS_MODE + if ( BABL_WINDOWS == shortcut ) { return switch_babble_mode(MS_MODE); } + case MS_MODE: - BABLM( BABL_DEL_RIGHT_1C, T(DEL), END ); - BABLM( BABL_DEL_LEFT_WORD, D(LCTRL), T(BSPACE), U(LCTRL), END ); - BABLM( BABL_DEL_RIGHT_WORD,D(LCTRL), T(DEL), U(LCTRL), END ); BABLM( BABL_GO_LEFT_1C, T(LEFT), END ); BABLM( BABL_GO_RIGHT_1C , T(RIGHT), END ); - BABLM( BABL_GO_LEFT_WORD, D(LCTRL), T(LEFT), U(LCTRL), END ); - BABLM( BABL_GO_RIGHT_WORD, D(LCTRL), T(RIGHT), U(LCTRL), END ); + BABLM( BABL_GO_LEFT_WORD, D(LCTL), T(LEFT), U(LCTL), END ); + BABLM( BABL_GO_RIGHT_WORD, D(LCTL), T(RIGHT), U(LCTL), END ); BABLM( BABL_GO_START_LINE, T(HOME), END ); - BABLM( BABL_GO_START_DOC, D(LCTRL),T(HOME), U(LCTRL),END ); BABLM( BABL_GO_END_LINE, T(END), END ); - BABLM( BABL_GO_END_DOC, D(LCTRL),T(END), U(LCTRL),END ); + BABLM( BABL_GO_START_DOC, D(LCTL),T(HOME), U(LCTL),END ); + BABLM( BABL_GO_END_DOC, D(LCTL),T(END), U(LCTL),END ); BABLM( BABL_GO_NEXT_LINE, T(DOWN), END ); BABLM( BABL_GO_PREV_LINE, T(UP), END ); BABLM( BABL_PGDN, T(PGDN), END ); BABLM( BABL_PGUP, T(PGUP), END ); + BABLM( BABL_DEL_RIGHT_1C, T(DEL), END ); + BABLM( BABL_DEL_LEFT_WORD, D(LCTL), T(BSPACE), U(LCTL), END ); + BABLM( BABL_DEL_RIGHT_WORD, D(LCTL), T(DEL), U(LCTL), END ); + BABLM( BABL_DEL_TO_LINE_END, D(RSFT), T(HOME), U(RSFT), T(DEL), END); + BABLM( BABL_DEL_TO_LINE_START, D(RSFT), T(END), U(RSFT), T(DEL), END ); #ifndef BABL_MOVEMENTONLY - BABLM( BABL_UNDO, D(LCTRL), T(Z), U(LCTRL), END ); - BABLM( BABL_REDO, D(LCTRL), T(Y), U(LCTRL), END ); - BABLM( BABL_CUT, D(LCTRL), T(X), U(LCTRL), END ); - BABLM( BABL_COPY, D(LCTRL), T(C), U(LCTRL), END ); - BABLM( BABL_PASTE, D(LCTRL), T(V), U(LCTRL), END ); - BABLM( BABL_SELECT_ALL, D(LCTRL), T(A), U(LCTRL), END ); - BABLM( BABL_UNDO, D(LCTRL), T(Z), U(LCTRL), END ); - BABLM( BABL_REDO, D(LCTRL), T(Y), U(LCTRL), END ); - BABLM( BABL_CUT, D(LCTRL), T(X), U(LCTRL), END ); - BABLM( BABL_COPY, D(LCTRL), T(C), U(LCTRL), END ); - BABLM( BABL_PASTE, D(LCTRL), T(V), U(LCTRL), END ); - BABLM( BABL_SELECT_ALL, D(LCTRL), T(A), U(LCTRL), END ); - BABLM( BABL_FIND, D(LCTRL),T(F), U(LCTRL),END ); + BABLM( BABL_UNDO, D(LCTL), T(Z), U(LCTL), END ); + BABLM( BABL_REDO, D(LCTL), T(Y), U(LCTL), END ); + BABLM( BABL_CUT, D(LCTL), T(X), U(LCTL), END ); + BABLM( BABL_COPY, D(LCTL), T(C), U(LCTL), END ); + BABLM( BABL_PASTE, D(LCTL), T(V), U(LCTL), END ); + BABLM( BABL_SELECT_ALL, D(LCTL), T(A), U(LCTL), END ); + BABLM( BABL_FIND, D(LCTL),T(F), U(LCTL),END ); BABLM( BABL_FIND_NEXT, T(F3),END ); - BABLM( BABL_FIND_REPLACE, D(LCTRL),T(H), U(LCTRL),END ); + BABLM( BABL_FIND_REPLACE, D(LCTL),T(H), U(LCTL),END ); BABLM( BABL_RUNAPP, D(LGUI),T(R), U(LGUI),END ); BABLM( BABL_SWITCH_APP_NEXT, D(LALT),T(TAB), U(LALT),END ); BABLM( BABL_SWITCH_APP_LAST, D(LSFT),D(LALT),T(TAB), U(LALT), U(LSFT),END ); BABLM( BABL_CLOSE_APP, D(LALT),T(F4), U(LALT),END ); BABLM( BABL_HELP, T(F1),END ); +#ifndef BABL_NOBROWSER + BABLM( BABL_BROWSER_NEW_TAB, D(LCTL), T(T), U(LCTL),END ); + BABLM( BABL_BROWSER_CLOSE_TAB, D(LCTL), T(W), U(LCTL),END ); + BABLM( BABL_BROWSER_REOPEN_LAST_TAB, D(LCTL), D(RSFT),T(T), U(RSFT),U(LCTL),END ); + BABLM( BABL_BROWSER_NEXT_TAB, D(LCTL), T(TAB), U(LCTL),END ); + BABLM( BABL_BROWSER_PREV_TAB, D(LCTL), D(RSFT), T(TAB), U(RSFT), U(LCTL),END ); + BABLM( BABL_BROWSER_URL_BAR, D(LCTL), T(L), U(LCTL),END ); + BABLM( BABL_BROWSER_FORWARD, D(LALT), T(RIGHT), U(LALT),END ); + BABLM( BABL_BROWSER_BACK, D(LALT), T(LEFT), U(LALT),END ); + BABLM( BABL_BROWSER_FIND, D(LCTL), T(F), U(LCTL),END ); + BABLM( BABL_BROWSER_BOOKMARK, D(LCTL), T(D), U(LCTL),END ); + //BABLM( BABL_BROWSER_DEV_TOOLS, T(F12), U(LCTL),END ); // EDGE + BABLM( BABL_BROWSER_DEV_TOOLS, D(LCTL), T(T), U(LCTL),END ); // Chrome + // Chrome + BABLM( BABL_BROWSER_RELOAD, D(LCTL), T(F5), U(LCTL),END ); // hard reload w/o cache + BABLM( BABL_BROWSER_FULLSCREEN, T(F11),END ); //command shift F + BABLM( BABL_BROWSER_ZOOM_IN, D(LCTL), D(RSFT), T(EQL), U(RSFT), U(LCTL),END ); // ctr+ + + BABLM( BABL_BROWSER_ZOOM_OUT, D(LCTL), T(MINS), U(LCTL),END ); +#endif #endif - + // Todo, ring bell, flash light, show user this isn't supported return MACRO_NONE; @@ -87,62 +111,87 @@ But that requires even more clever preprocessor foo. #ifdef LINUX_MODE + if ( BABL_LINUX == shortcut ) { return switch_babble_mode(LINUX_MODE); } + case LINUX_MODE: - - BABLM( BABL_DEL_RIGHT_1C , D(DEL), END ); - BABLM( BABL_DEL_LEFT_WORD , D(LCTRL), T(BSPACE), U(LCTRL), END ); - BABLM( BABL_DEL_RIGHT_WORD , D(LCTRL), T(DEL), U(LCTRL), END ); BABLM( BABL_GO_LEFT_1C , T(LEFT), END ); BABLM( BABL_GO_RIGHT_1C , T(RIGHT), END ); - BABLM( BABL_GO_LEFT_WORD , D(LCTRL), T(LEFT), U(LCTRL), END ); - BABLM( BABL_GO_RIGHT_WORD , D(LCTRL), T(RIGHT), U(LCTRL), END ); + BABLM( BABL_GO_LEFT_WORD , D(LCTL), T(LEFT), U(LCTL), END ); + BABLM( BABL_GO_RIGHT_WORD , D(LCTL), T(RIGHT), U(LCTL), END ); BABLM( BABL_GO_START_LINE , T(HOME), END ); - BABLM( BABL_GO_START_DOC , D(LCTRL),T(HOME), U(LCTRL),END ); BABLM( BABL_GO_END_LINE , T(END), END ); - BABLM( BABL_GO_END_DOC , D(LCTRL),T(END), U(LCTRL),END ); + BABLM( BABL_GO_START_DOC , D(LCTL),T(HOME), U(LCTL),END ); + BABLM( BABL_GO_END_DOC , D(LCTL),T(END), U(LCTL),END ); BABLM( BABL_GO_NEXT_LINE , T(DOWN), END ); BABLM( BABL_GO_PREV_LINE , T(UP), END ); BABLM( BABL_PGDN , T(PGDN), END ); BABLM( BABL_PGUP , T(PGUP), END ); + BABLM( BABL_DEL_RIGHT_1C , D(DEL), END ); + BABLM( BABL_DEL_LEFT_WORD , D(LCTL), T(BSPACE), U(LCTL), END ); + BABLM( BABL_DEL_RIGHT_WORD , D(LCTL), T(DEL), U(LCTL), END ); + BABLM( BABL_DEL_TO_LINE_END, D(RSFT), T(HOME), U(RSFT), T(DEL), END); + BABLM( BABL_DEL_TO_LINE_START, D(RSFT), T(END), U(RSFT), T(DEL), END ); #ifndef BABL_MOVEMENTONLY - BABLM( BABL_UNDO , D(LCTRL), T(Z), U(LCTRL), END ); - BABLM( BABL_REDO , D(LCTRL), T(Y), U(LCTRL), END ); - BABLM( BABL_CUT , D(LCTRL), T(X), U(LCTRL), END ); - BABLM( BABL_COPY , D(LCTRL), T(C), U(LCTRL), END ); - BABLM( BABL_PASTE , D(LCTRL), T(V), U(LCTRL), END ); - BABLM( BABL_SELECT_ALL, D(LCTRL), T(A), U(LCTRL), END ); - BABLM( BABL_FIND, D(LCTRL),T(F), U(LCTRL),END ); + BABLM( BABL_UNDO , D(LCTL), T(Z), U(LCTL), END ); + BABLM( BABL_REDO , D(LCTL), T(Y), U(LCTL), END ); + BABLM( BABL_CUT , D(LCTL), T(X), U(LCTL), END ); + BABLM( BABL_COPY , D(LCTL), T(C), U(LCTL), END ); + BABLM( BABL_PASTE , D(LCTL), T(V), U(LCTL), END ); + BABLM( BABL_SELECT_ALL, D(LCTL), T(A), U(LCTL), END ); + BABLM( BABL_FIND, D(LCTL),T(F), U(LCTL),END ); /* BABLM(BABL_FIND_NEXT , T(F3),END ); KDE */ - BABLM( BABL_FIND_NEXT, D(LCTRL),T(G), U(LCTRL),END ); // Gnome*/ - /* BABLM( , D(LCTRL),T(R), U(LCTRL),END ); KDE */ - BABLM( BABL_FIND_REPLACE, D(LCTRL),T(H), U(LCTRL),END ); // Gnome*/ + BABLM( BABL_FIND_NEXT, D(LCTL),T(G), U(LCTL),END ); // Gnome*/ + /* BABLM( , D(LCTL),T(R), U(LCTL),END ); KDE */ + BABLM( BABL_FIND_REPLACE, D(LCTL),T(H), U(LCTL),END ); // Gnome*/ BABLM( BABL_RUNAPP, D(LALT),T(F2), U(LALT),END ); BABLM( BABL_SWITCH_APP_NEXT, D(LCTL),T(TAB), U(LCTL),END ); BABLM( BABL_SWITCH_APP_LAST, D(LSFT),D(LCTL),T(TAB), U(LCTL), U(LSFT),END ); BABLM( BABL_CLOSE_APP, D(LALT),T(F4), U(LALT),END ); - BABLM( BABL_HELP, END ); + //BABLM( BABL_HELP, END ); + +#ifndef BABL_NOBROWSER + BABLM( BABL_BROWSER_NEW_TAB, D(LCTL), T(T), U(LCTL),END ); + BABLM( BABL_BROWSER_CLOSE_TAB, D(LCTL), T(W), U(LCTL),END ); + BABLM( BABL_BROWSER_REOPEN_LAST_TAB, D(LCTL), D(RSFT),T(T), U(RSFT),U(LCTL),END ); + BABLM( BABL_BROWSER_NEXT_TAB, D(LCTL), T(TAB), U(LCTL),END ); + BABLM( BABL_BROWSER_PREV_TAB, D(LCTL), D(RSFT), T(TAB), U(RSFT), U(LCTL),END ); + BABLM( BABL_BROWSER_URL_BAR, D(LCTL), T(L), U(LCTL),END ); + BABLM( BABL_BROWSER_FORWARD, D(LALT), T(RIGHT), U(LALT),END ); + BABLM( BABL_BROWSER_BACK, D(LALT), T(LEFT), U(LALT),END ); + BABLM( BABL_BROWSER_FIND, D(LCTL), T(F), U(LCTL),END ); + BABLM( BABL_BROWSER_BOOKMARK, D(LCTL), T(D), U(LCTL),END ); + BABLM( BABL_BROWSER_DEV_TOOLS, D(LCTL), T(T), U(LCTL),END ); // Chrome + BABLM( BABL_BROWSER_RELOAD, D(LCTL), T(F5), U(LCTL),END ); // hard reload w/o cache + BABLM( BABL_BROWSER_FULLSCREEN, T(F11),END ); //command shift F + BABLM( BABL_BROWSER_ZOOM_IN, D(LCTL), T(PLUS), U(LCTL),END ); + BABLM( BABL_BROWSER_ZOOM_OUT, D(LCTL), T(MINS), U(LCTL),END ); +#endif #endif return MACRO_NONE; #endif #ifdef MAC_MODE + if ( BABL_MAC == shortcut) { return switch_babble_mode(MAC_MODE); } + case MAC_MODE: - BABLM( BABL_DEL_RIGHT_1C , D(DEL), END ); - BABLM( BABL_DEL_LEFT_WORD , D(LALT), T(BSPACE), U(LALT), END ); - BABLM( BABL_DEL_RIGHT_WORD, D(LALT), T(DEL), U(LALT), END ); BABLM( BABL_GO_LEFT_1C , T(LEFT), END ); BABLM( BABL_GO_RIGHT_1C, T(RIGHT), END ); BABLM( BABL_GO_LEFT_WORD , D(LALT), T(LEFT), U(LALT), END ); BABLM( BABL_GO_RIGHT_WORD , D(LALT), T(RIGHT), U(LALT), END ); BABLM( BABL_GO_START_LINE , D(LGUI), T(LEFT), U(LGUI), END ); - BABLM( BABL_GO_START_DOC , D(LGUI),T(UP), U(LGUI),END ); BABLM( BABL_GO_END_LINE , D(LGUI), T(RIGHT), U(LGUI), END ); + BABLM( BABL_GO_START_DOC , D(LGUI),T(UP), U(LGUI),END ); BABLM( BABL_GO_END_DOC , D(LGUI),T(DOWN), U(LGUI),END ); BABLM( BABL_GO_NEXT_LINE , T(DOWN), END ); BABLM( BABL_GO_PREV_LINE , T(UP), END ); BABLM( BABL_PGDN , D(LALT),T(DOWN), U(LALT), END ); BABLM( BABL_PGUP , D(LALT),T(UP), U(LALT), END ); + BABLM( BABL_DEL_RIGHT_1C , D(DEL), END ); + BABLM( BABL_DEL_LEFT_WORD , D(LALT), T(BSPACE), U(LALT), END ); + BABLM( BABL_DEL_RIGHT_WORD, D(LALT), T(DEL), U(LALT), END ); + BABLM( BABL_DEL_TO_LINE_END, D(LCTL), T(K), U(LCTL), END );// there must be another way + BABLM( BABL_DEL_TO_LINE_START, D(LGUI), T(BSPACE), U(LGUI), END ); #ifndef BABL_MOVEMENTONLY BABLM( BABL_UNDO , D(1), D(LGUI), T(Z), U(LGUI), END ); BABLM( BABL_REDO , D(LSFT),D(LGUI), T(Z), U(LSFT),U(LGUI), END ); @@ -158,75 +207,92 @@ But that requires even more clever preprocessor foo. BABLM( BABL_SWITCH_APP_LAST , D(LSFT),D(LGUI),T(TAB), U(LGUI), U(LSFT),END ); BABLM( BABL_CLOSE_APP , D(LGUI),T(Q), U(LGUI),END ); BABLM( BABL_HELP , D(LSFT),D(LGUI),T(SLASH), U(LGUI), U(LSFT),END ); + +#ifndef BABL_NOBROWSER + BABLM( BABL_BROWSER_NEW_TAB, D(LGUI), T(T), U(LGUI),END ); + BABLM( BABL_BROWSER_CLOSE_TAB, D(LGUI), T(W), U(LGUI),END ); + BABLM( BABL_BROWSER_REOPEN_LAST_TAB, D(LGUI), D(RSFT),T(T), U(RSFT),U(LGUI),END ); + BABLM( BABL_BROWSER_NEXT_TAB, D(LGUI),D(LALT), T(RIGHT),U(LALT), U(LGUI),END ); + BABLM( BABL_BROWSER_PREV_TAB, D(LGUI), D(RSFT), T(LEFT), U(RSFT), U(LGUI),END ); + BABLM( BABL_BROWSER_URL_BAR, D(LGUI), T(L), U(LGUI),END ); + BABLM( BABL_BROWSER_FORWARD, D(LGUI), T(RIGHT), U(LGUI),END ); + BABLM( BABL_BROWSER_BACK, D(LGUI), T(LEFT), U(LGUI),END ); + BABLM( BABL_BROWSER_FIND, D(LGUI), T(F), U(LGUI),END ); + BABLM( BABL_BROWSER_BOOKMARK, D(LGUI), T(D), U(LGUI),END ); + //BABLM( BABL_BROWSER_DEV_TOOLS, T(F12), U(LGUI),END ); // EDGE + BABLM( BABL_BROWSER_DEV_TOOLS, D(LGUI), D(LALT), T(I), U(LALT),U(LGUI),END ); // Chrome + // Chrome + BABLM( BABL_BROWSER_RELOAD, D(LGUI), T(R), U(LGUI),END ); // add shift for reload w/o cache + BABLM( BABL_BROWSER_FULLSCREEN, D(LGUI), D(LCTL), T(P), U(LCTL), U(LGUI),END ); //command shift F + BABLM( BABL_BROWSER_ZOOM_IN, D(LGUI), D(RSFT), T(EQL), U(RSFT), U(LGUI),END ); // ctr+ + + BABLM( BABL_BROWSER_ZOOM_OUT, D(LGUI), T(MINS), U(LGUI),END ); +#endif #endif return MACRO_NONE; #endif #ifdef EMACS_MODE + + if ( BABL_EMACS == shortcut ) { return switch_babble_mode(EMACS_MODE); } + case EMACS_MODE: switch(shortcut) { //probably should allow meta to not be ALT - - case BABL_DEL_RIGHT_1C: - BABLM( , D(LCTL), T(D), U(LCTL),END ); - case BABL_DEL_LEFT_WORD: - BABLM( , D(LCTL), T(BSPACE), U(LCTL), END ); - case BABL_DEL_RIGHT_WORD: - BABLM( , D(LALT), T(D), U(LALT), END ); - case BABL_GO_LEFT_1C: - BABLM( , T(LEFT), END ); - case BABL_GO_RIGHT_1C: - BABLM( , T(RIGHT), END ); - case BABL_GO_LEFT_WORD: - BABLM( , D(LALT), T(B), U(LALT), END ); - case BABL_GO_RIGHT_WORD: - BABLM( , D(LALT), T(F), U(LALT), END ); - case BABL_GO_START_LINE: - BABLM( , D(LCTRL), T(A), U(LCTRL), END ); - case BABL_GO_START_DOC: - BABLM( , D(LALT), D(LSFT), T(COMM),U(LSFT), U(LALT) ,END ); - case BABL_GO_END_LINE: - BABLM( , D(LCTRL), T(E), U(LCTRL), END ); - case BABL_GO_END_DOC: - BABLM( , D(LALT), D(LSFT), T(DOT),U(LSFT), U(LALT) ,END ); - case BABL_GO_NEXT_LINE: - BABLM( , D(LCTRL), T(N), U(LCTRL), END ); - case BABL_GO_PREV_LINE: - BABLM( , D(LCTRL), T(P), U(LCTRL), END ); - case BABL_PGDN: - BABLM( ,D(LCTRL), T(V), U(LCTRL), END ); - case BABL_PGUP: - BABLM( , D(LALT), T(V), U(LALT), END ); + + BABLM( BABL_GO_LEFT_1C, T(LEFT), END ); + BABLM( BABL_GO_RIGHT_1C, T(RIGHT), END ); + BABLM( BABL_GO_LEFT_WORD, D(LALT), T(B), U(LALT), END ); + BABLM( BABL_GO_RIGHT_WORD , D(LALT), T(F), U(LALT), END ); + BABLM( BABL_GO_START_LINE , D(LCTL), T(A), U(LCTL), END ); + BABLM( BABL_GO_END_LINE , D(LCTL), T(E), U(LCTL), END ); + BABLM( BABL_GO_START_DOC , D(LALT), D(LSFT), T(COMM),U(LSFT), U(LALT) ,END ); + BABLM( BABL_GO_END_DOC , D(LALT), D(LSFT), T(DOT), U(LSFT), U(LALT) ,END ); + BABLM( BABL_GO_NEXT_LINE , D(LCTL), T(N), U(LCTL), END ); + BABLM( BABL_GO_PREV_LINE , D(LCTL), T(P), U(LCTL), END ); + BABLM( BABL_PGDN , D(LCTL), T(V), U(LCTL), END ); + BABLM( BABL_PGUP , D(LALT), T(V), U(LALT), END ); + BABLM( BABL_DEL_RIGHT_1C, D(LCTL), T(D), U(LCTL),END ); + BABLM( BABL_DEL_LEFT_WORD , D(LCTL), T(BSPACE), U(LCTL), END ); + BABLM( BABL_DEL_RIGHT_WORD , D(LALT), T(D), U(LALT), END ); + BABLM( BABL_DEL_TO_LINE_END, D(LCTL), T(K), U(LCTL), END ); + BABLM( BABL_DEL_TO_LINE_START, T(ESC), T(0), D(LCTL), T(K), U(LCTL), END ); #ifndef BABL_MOVEMENTONLY - case BABL_UNDO: - BABLM( , D(LCTL), T(X), U(LCTL),T(C), END ); - case BABL_REDO: - BABLM( , D(LCTL), T(X), U(LCTL),T(C), END ); // arguably - case BABL_CUT: - BABLM( , D(LCTL), T(W), U(LCTL), END ); - case BABL_COPY: - BABLM( , D(LALT), T(W), U(LALT), END ); //really? - case BABL_PASTE: - BABLM( , D(LCTL), T(Y), U(LCTL), END ); - case BABL_SELECT_ALL: - BABLM( ,D(LCTL), T(X), U(LCTL),T(H), END ); - case BABL_FIND: - BABLM( , D(LCTRL), T(S), U(LCTRL),END ); - case BABL_FIND_NEXT: - BABLM( , D(LCTRL), T(S), U(LCTRL),END ); - case BABL_FIND_REPLACE: - BABLM( , D(LALT),D(LSFT), T(5),U(LSFT), U(LALT), END ); - case BABL_RUNAPP: - BABLM( , D(LALT), T(X), U(LALT),T(S),T(H),T(E),T(L),T(L),END );// arguably - case BABL_SWITCH_APP_NEXT: - BABLM( , D(LCTL), T(X), U(LCTL),T(RIGHT), END ); // arguably - case BABL_SWITCH_APP_LAST: - BABLM( , D(LCTL), T(X), U(LCTL),T(LEFT), END ); // arguably - case BABL_CLOSE_APP: - BABLM( ,D(LCTL), T(X), U(LCTL),T(C),END ); - case BABL_HELP: - BABLM( , D(LCTL),T(H), U(LCTL),T(A),END); // start search in help + BABLM( BABL_UNDO , D(LCTL), T(X), U(LCTL),T(C), END ); + BABLM( BABL_REDO , D(LCTL), T(X), U(LCTL),T(C), END ); // arguably + BABLM( BABL_CUT , D(LCTL), T(W), U(LCTL), END ); + BABLM( BABL_COPY , D(LALT), T(W), U(LALT), END ); //really? + BABLM( BABL_PASTE , D(LCTL), T(Y), U(LCTL), END ); + BABLM( BABL_SELECT_ALL ,D(LCTL), T(X), U(LCTL),T(H), END ); + BABLM( BABL_FIND , D(LCTL), T(S), U(LCTL),END ); + BABLM( BABL_FIND_NEXT , D(LCTL), T(S), U(LCTL),END ); + BABLM( BABL_FIND_REPLACE , D(LALT),D(LSFT), T(5),U(LSFT), U(LALT), END ); + BABLM( BABL_RUNAPP , D(LALT), T(X), U(LALT),T(S),T(H),T(E),T(L),T(L),END );// arguably + BABLM( BABL_SWITCH_APP_NEXT , D(LCTL), T(X), U(LCTL),T(RIGHT), END ); // arguably + BABLM( BABL_SWITCH_APP_LAST , D(LCTL), T(X), U(LCTL),T(LEFT), END ); // arguably + BABLM( BABL_CLOSE_APP , D(LCTL), T(X), U(LCTL),T(C),END ); + BABLM( BABL_HELP , D(LCTL),T(H), U(LCTL),T(A),END); // start search in help +#ifndef BABL_NOBROWSER +/* you get to figure w3 out + BABLM( BABL_BROWSER_NEW_TAB, D(LGUI), T(T), U(LGUI),END ); + BABLM( BABL_BROWSER_CLOSE_TAB, D(LGUI), T(W), U(LGUI),END ); + BABLM( BABL_BROWSER_REOPEN_LAST_TAB, D(LGUI), D(RSFT),T(T), U(RSFT),U(LGUI),END ); + BABLM( BABL_BROWSER_NEXT_TAB, D(LGUI),D(LALT), T(RIGHT),U(LALT), U(LGUI),END ); + BABLM( BABL_BROWSER_PREV_TAB, D(LGUI), D(RSFT), T(LEFT), U(RSFT), U(LGUI),END ); + BABLM( BABL_BROWSER_URL_BAR, D(LGUI), T(L), U(LGUI),END ); + BABLM( BABL_BROWSER_FORWARD, D(LGUI), T(RIGHT), U(LGUI),END ); + BABLM( BABL_BROWSER_BACK, D(LGUI), T(LEFT), U(LGUI),END ); + BABLM( BABL_BROWSER_FIND, D(LGUI), T(F), U(LGUI),END ); + BABLM( BABL_BROWSER_BOOKMARK, D(LGUI), T(D), U(LGUI),END ); + //BABLM( BABL_BROWSER_DEV_TOOLS, T(F12), U(LGUI),END ); // EDGE + BABLM( BABL_BROWSER_DEV_TOOLS, D(LGUI), D(LALT), T(I), U(LALT),U(LGUI),END ); // Chrome + // Chrome + BABLM( BABL_BROWSER_RELOAD, D(LGUI), T(R), U(LGUI),END ); // add shift for reload w/o cache + BABLM( BABL_BROWSER_FULLSCREEN, D(LGUI), D(LCTL), T(P), U(LCTL), U(LGUI),END ); //command shift F + BABLM( BABL_BROWSER_ZOOM_IN, D(LGUI), D(RSFT), T(EQL), U(RSFT), U(LGUI),END ); // ctr+ + + BABLM( BABL_BROWSER_ZOOM_OUT, D(LGUI), T(MINS), U(LGUI),END ); +*/ +#endif #endif break; @@ -234,25 +300,31 @@ But that requires even more clever preprocessor foo. } #endif + + #ifdef VI_MODE + if ( BABL_VI == shortcut ) { return switch_babble_mode(VI_MODE); } case VI_MODE: -//assume esc is already called +// you have to track the modes yourself. Otherwise motion is awful (bell, bell, bell) + - BABLM( BABL_DEL_RIGHT_1C , T(X),END ); - BABLM( BABL_DEL_LEFT_WORD , T(D),T(G),T(E),END ); - BABLM( BABL_DEL_RIGHT_WORD , T(D),T(W),END ); BABLM( BABL_GO_LEFT_1C , T(H), END ); BABLM( BABL_GO_RIGHT_1C , T(L), END ); BABLM( BABL_GO_LEFT_WORD , T(B),END ); BABLM( BABL_GO_RIGHT_WORD , T(W), END ); BABLM( BABL_GO_START_LINE , D(LSFT), T(6),U(LSFT), END ); //^ - BABLM( BABL_GO_START_DOC , T(G),T(G) ,END ); BABLM( BABL_GO_END_LINE , D(LSFT), T(4),U(LSFT) , END ); //$ + BABLM( BABL_GO_START_DOC , T(G),T(G) ,END ); BABLM( BABL_GO_END_DOC , D(LSFT), T(G),U(LSFT),END ); BABLM( BABL_GO_NEXT_LINE , T(J), END ); BABLM( BABL_GO_PREV_LINE, T(K), END ); - BABLM( BABL_PGDN ,D(LCTRL), T(F), U(LCTRL), END ); - BABLM( BABL_PGUP , D(LCTRL), T(B), U(LCTRL), END ); + BABLM( BABL_PGDN ,D(LCTL), T(F), U(LCTL), END ); + BABLM( BABL_PGUP , D(LCTL), T(B), U(LCTL), END ); + BABLM( BABL_DEL_RIGHT_1C , T(X),END ); + BABLM( BABL_DEL_LEFT_WORD , T(D),T(G),T(E),END ); + BABLM( BABL_DEL_RIGHT_WORD , T(D),T(W),END ); + BABLM( BABL_DEL_TO_LINE_END, T(D),D(LSFT), T(4),U(LSFT) ,END ); // d$ + BABLM( BABL_DEL_TO_LINE_START, T(D),D(LSFT), T(6),U(LSFT) ,END ); #ifndef BABL_MOVEMENTONLY BABLM( BABL_UNDO , T(U), END ); BABLM( BABL_REDO , D(LCTL), T(R), U(LCTL), END ); @@ -268,6 +340,27 @@ But that requires even more clever preprocessor foo. BABLM( BABL_SWITCH_APP_LAST ,END ); BABLM(BABL_CLOSE_APP, D(LSFT), T(SCLN),U(LSFT), T(Q), D(RSFT), T(1),U(RSFT), END ); BABLM(BABL_HELP, D(LSFT), T(SCLN),U(LSFT),T(H),END); // start search in help +#ifndef BABL_NOBROWSER +/* you get to figure this out + BABLM( BABL_BROWSER_NEW_TAB, D(LGUI), T(T), U(LGUI),END ); + BABLM( BABL_BROWSER_CLOSE_TAB, D(LGUI), T(W), U(LGUI),END ); + BABLM( BABL_BROWSER_REOPEN_LAST_TAB, D(LGUI), D(RSFT),T(T), U(RSFT),U(LGUI),END ); + BABLM( BABL_BROWSER_NEXT_TAB, D(LGUI),D(LALT), T(RIGHT),U(LALT), U(LGUI),END ); + BABLM( BABL_BROWSER_PREV_TAB, D(LGUI), D(RSFT), T(LEFT), U(RSFT), U(LGUI),END ); + BABLM( BABL_BROWSER_URL_BAR, D(LGUI), T(L), U(LGUI),END ); + BABLM( BABL_BROWSER_FORWARD, D(LGUI), T(RIGHT), U(LGUI),END ); + BABLM( BABL_BROWSER_BACK, D(LGUI), T(LEFT), U(LGUI),END ); + BABLM( BABL_BROWSER_FIND, D(LGUI), T(F), U(LGUI),END ); + BABLM( BABL_BROWSER_BOOKMARK, D(LGUI), T(D), U(LGUI),END ); + //BABLM( BABL_BROWSER_DEV_TOOLS, T(F12), U(LGUI),END ); // EDGE + BABLM( BABL_BROWSER_DEV_TOOLS, D(LGUI), D(LALT), T(I), U(LALT),U(LGUI),END ); // Chrome + // Chrome + BABLM( BABL_BROWSER_RELOAD, D(LGUI), T(R), U(LGUI),END ); // add shift for reload w/o cache + BABLM( BABL_BROWSER_FULLSCREEN, D(LGUI), D(LCTL), T(P), U(LCTL), U(LGUI),END ); //command shift F + BABLM( BABL_BROWSER_ZOOM_IN, D(LGUI), T(PLUS), U(LGUI),END ); + BABLM( BABL_BROWSER_ZOOM_OUT, D(LGUI), T(MINS), U(LGUI),END ); +*/ +#endif #endif return MACRO_NONE; #endif @@ -278,37 +371,62 @@ But that requires even more clever preprocessor foo. #ifdef READMUX_MODE // Readline command line editing + tmux windowing // I havent decided how much to do readline and how much tmux + if ( BABL_READLINE == shortcut ) { switch_babble_mode(READMUX_MODE); return MACRO_NONE; } case READMUX_MODE: - BABLM( BABL_DEL_RIGHT_1C , D(LCTL), T(D), U(LCTL),END ); + + BABLM( BABL_GO_LEFT_1C , T(LEFT), END ); + BABLM( BABL_GO_RIGHT_1C , T(RIGHT), END ); + BABLM( BABL_GO_LEFT_WORD , D(LALT), T(B), U(LALT), END ); + BABLM( BABL_GO_RIGHT_WORD , D(LALT), T(F), U(LALT), END ); + BABLM( BABL_GO_START_LINE , D(LCTL), T(A), U(LCTL), END ); + BABLM( BABL_GO_END_LINE , D(LCTL), T(E), U(LCTL), END ); + //BABLM( BABL_GO_START_DOC ,END );// tmux? + //BABLM( BABL_GO_END_DOC ,END ); // tmux? + BABLM( BABL_GO_NEXT_LINE , D(LCTL), T(N), U(LCTL), END ); + BABLM( BABL_GO_PREV_LINE , D(LCTL), T(P), U(LCTL), END ); + BABLM( BABL_PGDN , T(PGDN), END ); + BABLM( BABL_PGUP , T(PGUP), END ); + BABLM( BABL_DEL_RIGHT_1C , D(LCTL), T(D), U(LCTL),END ); BABLM( BABL_DEL_LEFT_WORD , D(LCTL), T(W), U(LCTL), END ); - BABLM( BABL_DEL_RIGHT_WORD , D(LALT), T(D), U(LALT), END ); - BABLM( BABL_GO_LEFT_1C , T(LEFT), END ); - BABLM( BABL_GO_RIGHT_1C , T(RIGHT), END ); - BABLM( BABL_GO_LEFT_WORD , D(LALT), T(B), U(LALT), END ); - BABLM( BABL_GO_RIGHT_WORD , D(LALT), T(F), U(LALT), END ); - BABLM( BABL_GO_START_LINE , D(LCTRL), T(A), U(LCTRL), END ); - BABLM( BABL_GO_START_DOC ,END );// tmux? - BABLM( BABL_GO_END_LINE , D(LCTRL), T(E), U(LCTRL), END ); - BABLM( BABL_GO_END_DOC ,END ); // tmux? - BABLM( BABL_GO_NEXT_LINE , D(LCTRL), T(N), U(LCTRL), END ); - BABLM( BABL_GO_PREV_LINE , D(LCTRL), T(P), U(LCTRL), END ); - BABLM( BABL_PGDN , T(PGDN), END ); - BABLM( BABL_PGUP , T(PGUP), END ); + BABLM( BABL_DEL_RIGHT_WORD , D(LALT), T(D), U(LALT), END ); + BABLM( BABL_DEL_TO_LINE_END, D(LCTL), T(K), U(LCTL), END ); + BABLM( BABL_DEL_TO_LINE_START, D(LCTL), T(U), U(LCTL), END ); #ifndef BABL_MOVEMENTONLY - BABLM( BABL_UNDO , D(LALT), T(R), U(LALT) , END ); - BABLM( BABL_REDO , D(LCTL), T(X), U(LCTL),T(C), END ); // arguably - BABLM( BABL_CUT , D(LCTL), T(K), U(LCTL), END ); // wrong half the time - BABLM( BABL_COPY ,END ); - BABLM( BABL_PASTE , D(LCTL), T(Y), U(LCTL), END ); - BABLM( BABL_SELECT_ALL ,D(LCTL), T(A), T(K), T(Y), U(LCTL) , END ); - BABLM( BABL_FIND , D(LCTRL), T(R), U(LCTRL), END ); // search history - BABLM(BABL_FIND_NEXT, D(LCTRL), T(S), U(LCTRL), END ); - BABLM( BABL_FIND_REPLACE ,END ); - BABLM( BABL_RUNAPP , D(LCTRL), T(B), U(LCTRL), T(C),END ); //tmux - BABLM( BABL_SWITCH_APP_NEXT , D(LCTRL), T(B), U(LCTRL), T(N),END ); //tmux - BABLM( BABL_SWITCH_APP_LAST , D(LCTRL), T(B), U(LCTRL), T(P),END ); //tmux - BABLM( BABL_CLOSE_APP , D(LCTRL), T(B), U(LCTRL), T(D),END); // usually what I want - BABLM( BABL_HELP ,END ); + BABLM( BABL_UNDO , D(LALT), T(R), U(LALT) , END ); + BABLM( BABL_REDO , D(LCTL), T(X), U(LCTL),T(C), END ); // arguably + BABLM( BABL_CUT , D(LCTL), T(K), U(LCTL), END ); // wrong half the time + //BABLM( BABL_COPY ,END ); + BABLM( BABL_PASTE , D(LCTL), T(Y), U(LCTL), END ); + BABLM( BABL_SELECT_ALL , D(LCTL), T(A), T(K), T(Y), U(LCTL) , END ); + BABLM( BABL_FIND , D(LCTL), T(R), U(LCTL), END ); // search history + BABLM(BABL_FIND_NEXT, D(LCTL), T(S), U(LCTL), END ); + //BABLM( BABL_FIND_REPLACE ,END ); + BABLM( BABL_RUNAPP , D(LCTL), T(B), U(LCTL), T(C),END ); //tmux + BABLM( BABL_SWITCH_APP_NEXT , D(LCTL), T(B), U(LCTL), T(N),END ); //tmux + BABLM( BABL_SWITCH_APP_LAST , D(LCTL), T(B), U(LCTL), T(P),END ); //tmux + BABLM( BABL_CLOSE_APP , D(LCTL), T(B), U(LCTL), T(D),END); // usually what I want + // BABLM( BABL_HELP ,END ); +#ifndef BABL_NOBROWSER +/* Add lynx shortcuts? + BABLM( BABL_BROWSER_NEW_TAB, D(LGUI), T(T), U(LGUI),END ); + BABLM( BABL_BROWSER_CLOSE_TAB, D(LGUI), T(W), U(LGUI),END ); + BABLM( BABL_BROWSER_REOPEN_LAST_TAB, D(LGUI), D(RSFT),T(T), U(RSFT),U(LGUI),END ); + BABLM( BABL_BROWSER_NEXT_TAB, D(LGUI),D(LALT), T(RIGHT),U(LALT), U(LGUI),END ); + BABLM( BABL_BROWSER_PREV_TAB, D(LGUI), D(RSFT), T(LEFT), U(RSFT), U(LGUI),END ); + BABLM( BABL_BROWSER_URL_BAR, D(LGUI), T(L), U(LGUI),END ); + BABLM( BABL_BROWSER_FORWARD, D(LGUI), T(RIGHT), U(LGUI),END ); + BABLM( BABL_BROWSER_BACK, D(LGUI), T(LEFT), U(LGUI),END ); + BABLM( BABL_BROWSER_FIND, D(LGUI), T(F), U(LGUI),END ); + BABLM( BABL_BROWSER_BOOKMARK, D(LGUI), T(D), U(LGUI),END ); + //BABLM( BABL_BROWSER_DEV_TOOLS, T(F12), U(LGUI),END ); // EDGE + BABLM( BABL_BROWSER_DEV_TOOLS, D(LGUI), D(LALT), T(I), U(LALT),U(LGUI),END ); // Chrome + // Chrome + BABLM( BABL_BROWSER_RELOAD, D(LGUI), T(R), U(LGUI),END ); // add shift for reload w/o cache + BABLM( BABL_BROWSER_FULLSCREEN, D(LGUI), D(LCTL), T(P), U(LCTL), U(LGUI),END ); //command shift F + BABLM( BABL_BROWSER_ZOOM_IN, D(LGUI), T(PLUS), U(LGUI),END ); + BABLM( BABL_BROWSER_ZOOM_OUT, D(LGUI), T(MINS), U(LGUI),END ); +*/ +#endif #endif return MACRO_NONE; diff --git a/keyboards/handwired/MS-sculpt-mobile/babblePaste.h b/keyboards/handwired/MS-sculpt-mobile/babblePaste.h index 313fa80ec..67153fb0d 100644 --- a/keyboards/handwired/MS-sculpt-mobile/babblePaste.h +++ b/keyboards/handwired/MS-sculpt-mobile/babblePaste.h @@ -10,6 +10,8 @@ and jeebak & algernon's keymap #ifndef _babblePaste_h_included__ #define _babblePaste_h_included__ #include "action_layer.h" +#include "quantum_keycodes.h" +#include "config.h" #ifdef USE_BABLPASTE @@ -39,23 +41,28 @@ and jeebak & algernon's keymap /* Macros handled by babblepaste. Most should be available for all platforms. Whatever isn't defined will NOP */ enum { - - // Movement - BABL_DEL_RIGHT_1C= BABL_START_NUM, - BABL_DEL_LEFT_WORD, - BABL_DEL_RIGHT_WORD, - BABL_GO_LEFT_1C, +// Movement macros + // left & right + BABL_GO_LEFT_1C= BABL_START_NUM, BABL_GO_RIGHT_1C, - BABL_GO_LEFT_WORD, + BABL_GO_LEFT_WORD, BABL_GO_RIGHT_WORD, BABL_GO_START_LINE, BABL_GO_END_LINE, + // now up & down BABL_GO_START_DOC, BABL_GO_END_DOC, BABL_GO_NEXT_LINE, BABL_GO_PREV_LINE, BABL_PGDN, BABL_PGUP, + // And the delete options + //BABL_DEL_LEFT_1C == backspace, so why bother. + BABL_DEL_RIGHT_1C, // usually = Del + BABL_DEL_LEFT_WORD, + BABL_DEL_RIGHT_WORD, + BABL_DEL_TO_LINE_END, // delete from cursor to end of line + BABL_DEL_TO_LINE_START, // delete from cursor to begining line #ifndef BABL_MOVEMENTONLY // Cut & Paste BABL_UNDO, @@ -64,20 +71,142 @@ enum { BABL_COPY, BABL_PASTE, BABL_SELECT_ALL, - // GUI or app + /* not yet implemented + BABL_SWAP_LAST2C // swap last characters before the cursor + BABL_SWAP_LAST2W // Swap the last two words before the cursor + */ + // find & replace BABL_FIND, BABL_FIND_NEXT, BABL_FIND_REPLACE, + // GUI or app BABL_RUNAPP, BABL_SWITCH_APP_NEXT, BABL_SWITCH_APP_LAST, // previous BABL_CLOSE_APP, - BABL_HELP + BABL_HELP, + +#ifndef BABL_NOBROWSER + BABL_BROWSER_NEW_TAB, + BABL_BROWSER_CLOSE_TAB, + BABL_BROWSER_REOPEN_LAST_TAB, + BABL_BROWSER_NEXT_TAB, + BABL_BROWSER_PREV_TAB, + BABL_BROWSER_URL_BAR, + BABL_BROWSER_FORWARD, + BABL_BROWSER_BACK, + BABL_BROWSER_FIND, + BABL_BROWSER_BOOKMARK, + BABL_BROWSER_DEV_TOOLS, // hard one to remember + BABL_BROWSER_RELOAD, + BABL_BROWSER_FULLSCREEN, + BABL_BROWSER_ZOOM_IN, + BABL_BROWSER_ZOOM_OUT, + +#endif + #endif +// Macros for mode switching +#ifdef MS_MODE + BABL_WINDOWS, +#endif +#ifdef MAC_MODE + BABL_MAC, +#endif +#ifdef LINUX_MODE + BABL_LINUX, +#endif +#ifdef EMACS_MODE + BABL_EMACS, +#endif +#ifdef VI_MODE + BABL_VI, +#endif +#ifdef READMUX_MODE + BABL_READLINE, +#endif + + }; -// How many macros/ how many array elements? -#define BABL_NUM_MACROS 28 +// BUG, used to jump to babble functiion. Surely there is a way to calculate size of enum? +#define BABL_NUM_MACROS 48 + 4 // 48 + # of defined modes. + +/* And all the shorthand keymap ready versions */ +// First the mode switching macros +#ifdef MS_MODE +#define B_WIN M(BABL_WINDOWS) +#endif +#ifdef MAC_MODE +#define B_MAC M(BABL_MAC) +#endif +#ifdef LINUX_MODE +#define B_LNX M(BABL_LINUX) +#endif +#ifdef EMACS_MODE +#define B_EMAX M(BABL_EMACS) +#endif +#ifdef VI_MODE +#define B_VI M(BABL_VI) +#endif +#ifdef READMUX_MODE +#define B_READ M(BABL_READLINE) +#endif + +// and all the movement & action. + +#define B_L1C M(BABL_GO_LEFT_1C) +#define B_R1C M(BABL_GO_RIGHT_1C) +#define B_L1W M(BABL_GO_LEFT_WORD) +#define B_R1W M(BABL_GO_RIGHT_WORD) +#define B_GSOL M(BABL_GO_START_LINE) +#define B_GEOL M(BABL_GO_END_LINE) +#define B_GTOP M(BABL_GO_START_DOC) +#define B_GEND M(BABL_GO_END_DOC) +#define B_DOWN M(BABL_GO_NEXT_LINE) +#define B_UP M(BABL_GO_PREV_LINE) +#define B_PGDN M(BABL_PGDN) +#define B_PGUP M(BABL_PGUP) +//#define B_BKSP M(BABL_DEL_LEFT_1C) == backspace so why bother. +#define B_DEL M(BABL_DEL_RIGHT_1C) // usually = Del +#define B_DLW M(BABL_DEL_LEFT_WORD) +#define B_DRW M(BABL_DEL_RIGHT_WORD) +#define B_DEOL M(BABL_DEL_TO_LINE_END) // delete from cursor to end of line +#define B_DSOL M(BABL_DEL_TO_LINE_START) // delete from cursor to begining line +#define B_UNDO M(BABL_UNDO) +#define B_REDO M(BABL_REDO) +#define B_CUT M(BABL_CUT) +#define B_COPY M(BABL_COPY) +#define B_PAST M(BABL_PASTE) +#define B_SELA M(BABL_SELECT_ALL) +#define B_FIND M(BABL_FIND) +#define B_FINDN M(BABL_FIND_NEXT) +#define B_FINDR M(BABL_FIND_REPLACE) +#define B_RAPP M(BABL_RUNAPP) +#define B_NAPP M(BABL_SWITCH_APP_NEXT) +#define B_PAPP M(BABL_SWITCH_APP_LAST) // previous +#define B_CAPP M(BABL_CLOSE_APP) +#define B_HELP M(BABL_HELP) +#define B_NTAB M(BABL_BROWSER_NEW_TAB) +#define B_CTAB M(BABL_BROWSER_CLOSE_TAB) +#define B_ROTB M(BABL_BROWSER_REOPEN_LAST_TAB) +#define B_NXTB M(BABL_BROWSER_NEXT_TAB) +#define B_PTAB M(BABL_BROWSER_PREV_TAB) +#define B_NURL M(BABL_BROWSER_URL_BAR) +#define B_BFWD M(BABL_BROWSER_FORWARD) +#define B_BBAK M(BABL_BROWSER_BACK) +#define B_BFND M(BABL_BROWSER_FIND) +#define B_BOOK M(BABL_BROWSER_BOOKMARK) +#define B_BDEV M(BABL_BROWSER_DEV_TOOLS) // hard one to remember +#define B_BRLD M(BABL_BROWSER_RELOAD) +#define B_BFUlL M(BABL_BROWSER_FULLSCREEN) +#define B_ZMIN M(BABL_BROWSER_ZOOM_IN) +#define B_ZMOT M(BABL_BROWSER_ZOOM_OUT) + + + + + /* from action_macro.h diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/config.h b/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/config.h index 7ad1b0f0f..9f9b05094 100644 --- a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/config.h +++ b/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/config.h @@ -5,23 +5,28 @@ #define USE_BABLPASTE +// Expect to get errors if you comment a feature out and leave it in your keymap. + #ifdef USE_BABLPASTE //define BabblePaste maps // Windows. -//#define MS_MODE 1 -#define MAC_MODE 0 +#define MS_MODE 0 +#define MAC_MODE 1 //aka gnome+KDE //#define LINUX_MODE 2 //#define EMACS_MODE 3 -//#define VI_MODE 4 +#define VI_MODE 4 //#define WORDSTAR_MODE 5 // Readline and tmux #define READMUX_MODE 6 #endif // Uncomment if you need more free flash space -// It removes everything but cursor movement + +// This removes everything but cursor movement //#define BABL_MOVEMENTONLY +// and this just removes browser shortcuts +//#define BABL_NOBROWSER // place overrides here #endif diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/keymap.c b/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/keymap.c index 3a162db86..a66282547 100644 --- a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/keymap.c +++ b/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/keymap.c @@ -14,13 +14,6 @@ #define _TRAN 5 - - -// adjust babblemode default -extern uint8_t babble_mode; - - - enum layer_keycodes { QWR, CDH, @@ -46,11 +39,6 @@ TRAN enum macro_keycodes { DHPASTE=1, VIBRK, -B_LNX, -B_WIN, -B_MAC, -B_VI, -B_READ , }; @@ -115,24 +103,38 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ____, KC_SCLN, KC_TILDE, KC_COLN, KC_TILDE, KC_PIPE, KC_DLR, KC_ASTR, ____, KC_DOT , KC_SLSH, ____, ____, ____,\ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____ ), +/* +* |ESC | Win| MAC|RdLn| VI | | | | | | | | | | | | +* -------------------------------------------------------------------------------' +* | | | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |Bakspace| Del| +* --------------------------------------------------------------------------- +* | tab | q | w |Find| |pTab |DSOL|DelW| Up |DelW|DEOL| [ | ] | \ | | +* -------------------------------------------------------------------------------' +* |Bak/Mov| a | s | d | |nTab |GSOL| <- | Dwn | -> | EOL | ' | enter |PgUp| +* -------------------------------------------------------------------------------- +* |Lsft |Undo| Cut|Copy|Pste| b | n | m | , | . | / | Rsft| Up| PgDn| +* --------------------------------------------------------------------------------- +* |Lctl |Lgui |Lalt | Space/Sym | GUI | Sym | Rctl |Left|Down|Rght| +* --------------------------------------------------------------------------------- +*/ [_MOV] = KEYMAP (\ - ____, M(B_WIN),M(B_MAC),M(B_READ), M(B_VI), ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ - ____, M(BABL_UNDO), ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ - ____, ____,RGUI(KC_TAB), ____, ____, RCTL(KC_B), ____, M(BABL_DEL_LEFT_WORD), KC_UP, M(BABL_DEL_RIGHT_WORD), ____, ____, ____, ____, \ - ____, RCTL(KC_A), KC_S, RCTL(KC_K), RCTL(KC_E), ____, M(BABL_GO_START_LINE), KC_LEFT,KC_DOWN, KC_RIGHT, M(BABL_GO_END_LINE), ____,____,____,\ - ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ + ____, B_MAC,B_WIN,B_READ, B_VI, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ + ____, ____, B_PAPP, B_NAPP, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ + ____, B_UNDO, ____, B_BFND, ____, B_PTAB, B_DSOL, B_DLW, B_UP, B_DRW, B_DEOL, ____, ____, ____, \ + ____, B_SELA, B_BRLD, ____, ____, B_NXTB, B_GSOL, B_L1C, B_DOWN, B_R1C,B_GEOL, ____, ____, ____,\ + ____, B_UNDO,B_CUT, B_COPY, B_PAST, B_PAST, ____, ____, ____, ____, ____, ____, ____, ____, \ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____ ), [_TRAN] = KEYMAP (\ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ - ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ - ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ - ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ - ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ - ____, ____, ____, ____, ____, ____, ____, ____, ____, ____ -) + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____ +) }; const uint16_t PROGMEM fn_actions[] = { @@ -188,6 +190,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { /* If this is in the range of BABL macros, call a separate function */ +/* Any clever remapping with modifiers should happen here e.g. shift bablkey does opposite*/ #ifdef USE_BABLPASTE if( id >= BABL_START_NUM && id < (BABL_START_NUM + BABL_NUM_MACROS ) ) { if (record->event.pressed) { // is there a case where this isn't desired? @@ -235,31 +238,6 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) - -#ifdef USE_BABLPASTE - -#ifdef LINUX_MODE - case B_LNX: - return switch_babble_mode(LINUX_MODE); -#endif -#ifdef MS_MODE - case B_WIN: - return switch_babble_mode(MS_MODE); -#endif -#ifdef MAC_MODE - case B_MAC: - return switch_babble_mode(MAC_MODE); -#endif -#ifdef VI_MODE - case B_VI: - return switch_babble_mode(VI_MODE); -#endif -#ifdef READMUX_MODE - case B_READ: - return switch_babble_mode(READMUX_MODE); -#endif -#endif - default: return MACRO_NONE; @@ -286,10 +264,6 @@ void led_set_user(uint8_t usb_led) { } -macro_t* switch_babble_mode( uint8_t id) { - babble_mode= id; - return MACRO_NONE; //less typing above -} -- cgit v1.2.3 From 89aba30c7f50aa733262f4add253817e2fb84e8a Mon Sep 17 00:00:00 2001 From: milestogo Date: Wed, 8 Mar 2017 01:25:33 -0800 Subject: fix stupid error w/ mode switch --- keyboards/handwired/MS-sculpt-mobile/babblePaste.c | 38 +++++++++++++++------- keyboards/handwired/MS-sculpt-mobile/babblePaste.h | 10 +++++- keyboards/handwired/MS-sculpt-mobile/config.h | 5 ++- .../MS-sculpt-mobile/keymaps/default/Makefile | 2 +- .../MS-sculpt-mobile/keymaps/milestogo/config.h | 10 +++--- .../MS-sculpt-mobile/keymaps/milestogo/keymap.c | 4 ++- keyboards/handwired/MS-sculpt-mobile/readme.md | 2 +- keyboards/handwired/MS-sculpt-mobile/rules.mk | 5 +-- 8 files changed, 51 insertions(+), 25 deletions(-) diff --git a/keyboards/handwired/MS-sculpt-mobile/babblePaste.c b/keyboards/handwired/MS-sculpt-mobile/babblePaste.c index 491a79333..3a9b86997 100644 --- a/keyboards/handwired/MS-sculpt-mobile/babblePaste.c +++ b/keyboards/handwired/MS-sculpt-mobile/babblePaste.c @@ -19,7 +19,7 @@ uint8_t babble_mode =0 ; macro_t* switch_babble_mode( uint8_t id) { babble_mode= id; - return MACRO_NONE; //less typing above + return MACRO_NONE; //less typing where called } @@ -42,12 +42,32 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) { return MACRO_NONE; } */ - switch(babble_mode) { - - + + +#ifdef MS_MODE + if ( BABL_WINDOWS == shortcut ) { return switch_babble_mode(MS_MODE); } +#endif +#ifdef MAC_MODE + if ( BABL_MAC == shortcut) { return switch_babble_mode(MAC_MODE); } +#endif +#ifdef LINUX_MODE + if ( BABL_LINUX == shortcut ) { return switch_babble_mode(LINUX_MODE); } +#endif + #ifdef READMUX_MODE + if ( BABL_READLINE == shortcut ) { switch_babble_mode(READMUX_MODE); return MACRO_NONE; } +#endif +#ifdef VI_MODE + if ( BABL_VI == shortcut ) { return switch_babble_mode(VI_MODE); } +#endif +#ifdef EMACS_MODE + if ( BABL_EMACS == shortcut ) { return switch_babble_mode(EMACS_MODE); } +#endif + + + + switch(babble_mode) { #ifdef MS_MODE - if ( BABL_WINDOWS == shortcut ) { return switch_babble_mode(MS_MODE); } case MS_MODE: BABLM( BABL_GO_LEFT_1C, T(LEFT), END ); @@ -111,7 +131,6 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) { #ifdef LINUX_MODE - if ( BABL_LINUX == shortcut ) { return switch_babble_mode(LINUX_MODE); } case LINUX_MODE: BABLM( BABL_GO_LEFT_1C , T(LEFT), END ); @@ -172,7 +191,6 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) { #endif #ifdef MAC_MODE - if ( BABL_MAC == shortcut) { return switch_babble_mode(MAC_MODE); } case MAC_MODE: BABLM( BABL_GO_LEFT_1C , T(LEFT), END ); @@ -234,8 +252,6 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) { #ifdef EMACS_MODE - if ( BABL_EMACS == shortcut ) { return switch_babble_mode(EMACS_MODE); } - case EMACS_MODE: switch(shortcut) { //probably should allow meta to not be ALT @@ -303,7 +319,6 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) { #ifdef VI_MODE - if ( BABL_VI == shortcut ) { return switch_babble_mode(VI_MODE); } case VI_MODE: // you have to track the modes yourself. Otherwise motion is awful (bell, bell, bell) @@ -371,7 +386,8 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) { #ifdef READMUX_MODE // Readline command line editing + tmux windowing // I havent decided how much to do readline and how much tmux - if ( BABL_READLINE == shortcut ) { switch_babble_mode(READMUX_MODE); return MACRO_NONE; } + + case READMUX_MODE: BABLM( BABL_GO_LEFT_1C , T(LEFT), END ); diff --git a/keyboards/handwired/MS-sculpt-mobile/babblePaste.h b/keyboards/handwired/MS-sculpt-mobile/babblePaste.h index 67153fb0d..3067c854d 100644 --- a/keyboards/handwired/MS-sculpt-mobile/babblePaste.h +++ b/keyboards/handwired/MS-sculpt-mobile/babblePaste.h @@ -18,6 +18,9 @@ and jeebak & algernon's keymap /* *************************** // Uncomment any modes you want. Whatever mode = 0 will be the default on boot +// Expect to get errors if you comment a feature out and leave it in your keymap. + +#define USE_BABLPASTE //#define MS_MODE 0 // Windows. //#define MAC_MODE 1 @@ -26,6 +29,11 @@ and jeebak & algernon's keymap //#define VI_MODE 4 //#define WORDSTAR_MODE 5 //#define READMUX 6 // Readline and tmux + +// This removes everything but cursor movement +//#define BABL_MOVEMENTONLY +// and this just removes browser shortcuts +//#define BABL_NOBROWSER ****************************/ @@ -130,7 +138,7 @@ enum { }; // BUG, used to jump to babble functiion. Surely there is a way to calculate size of enum? -#define BABL_NUM_MACROS 48 + 4 // 48 + # of defined modes. +#define BABL_NUM_MACROS 48+4 // 48 + # of defined modes. /* And all the shorthand keymap ready versions */ // First the mode switching macros diff --git a/keyboards/handwired/MS-sculpt-mobile/config.h b/keyboards/handwired/MS-sculpt-mobile/config.h index d85c5c623..f89514278 100644 --- a/keyboards/handwired/MS-sculpt-mobile/config.h +++ b/keyboards/handwired/MS-sculpt-mobile/config.h @@ -25,7 +25,6 @@ along with this program. If not, see . #define PRODUCT_ID 0x6060 #define DEVICE_VER 0x0001 #define MANUFACTURER Microsoftplus -#define PRODUCT sculpt mobile #define DESCRIPTION 6000 /* key matrix size */ @@ -33,14 +32,14 @@ along with this program. If not, see . #define MATRIX_COLS 18 #ifdef ASTAR - +#define PRODUCT sculpt mobile astar /*0 1 2 3 4 5 6 7 8 */ #define MATRIX_ROW_PINS {D7, C6, D4, D0, D1, D3, D2, E2} /* A B C D E F G H I J K L M N O P Q R */ #define MATRIX_COL_PINS {B4, B5, E6, B7, B6, D6, C7, F7, F6, F4,F5, F1,F0, D5, B0, B1, B2, B3} #else - +#define PRODUCT sculpt mobile teensypp /* 0 1 2 3 4 5 6 7 */ #define MATRIX_ROW_PINS { F7,F6,F4,F5,F3,F2,F1,F0} /* A B C D E F G H I J K L M N O P Q R */ diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/default/Makefile b/keyboards/handwired/MS-sculpt-mobile/keymaps/default/Makefile index 9d3df5964..8b829218b 100644 --- a/keyboards/handwired/MS-sculpt-mobile/keymaps/default/Makefile +++ b/keyboards/handwired/MS-sculpt-mobile/keymaps/default/Makefile @@ -17,5 +17,5 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend ifndef QUANTUM_DIR - include ../../../../Makefile + include ../../../../../Makefile endif diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/config.h b/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/config.h index 9f9b05094..8cf4202cd 100644 --- a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/config.h +++ b/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/config.h @@ -10,15 +10,15 @@ #ifdef USE_BABLPASTE //define BabblePaste maps // Windows. -#define MS_MODE 0 -#define MAC_MODE 1 +#define MAC_MODE 0 +#define MS_MODE 1 //aka gnome+KDE //#define LINUX_MODE 2 //#define EMACS_MODE 3 -#define VI_MODE 4 -//#define WORDSTAR_MODE 5 +#define VI_MODE 3 // Readline and tmux -#define READMUX_MODE 6 +#define READMUX_MODE 2 +//#define WORDSTAR_MODE 5 #endif // Uncomment if you need more free flash space diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/keymap.c b/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/keymap.c index a66282547..3b2f53a0c 100644 --- a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/keymap.c +++ b/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/keymap.c @@ -104,7 +104,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ____, ____, ____, ____, ____, ____, ____, ____, ____, ____ ), /* -* |ESC | Win| MAC|RdLn| VI | | | | | | | | | | | | +* |ESC | MAC| Win|RdLn| VI | | | | | | | | | | | | * -------------------------------------------------------------------------------' * | | | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |Bakspace| Del| * --------------------------------------------------------------------------- @@ -192,6 +192,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) /* If this is in the range of BABL macros, call a separate function */ /* Any clever remapping with modifiers should happen here e.g. shift bablkey does opposite*/ #ifdef USE_BABLPASTE + if( id >= BABL_START_NUM && id < (BABL_START_NUM + BABL_NUM_MACROS ) ) { if (record->event.pressed) { // is there a case where this isn't desired? @@ -201,6 +202,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) } #endif + // MACRODOWN only works in this function switch(id) { case 0: diff --git a/keyboards/handwired/MS-sculpt-mobile/readme.md b/keyboards/handwired/MS-sculpt-mobile/readme.md index 58029b50d..d435b449f 100644 --- a/keyboards/handwired/MS-sculpt-mobile/readme.md +++ b/keyboards/handwired/MS-sculpt-mobile/readme.md @@ -53,6 +53,6 @@ The Astar mini has all pins exposed , so you can do 18x8 If you want a speaker, LEDs &etc, you'll need to free up a pin. I recommend joining columns R and L to the same pin. -Building - edit rules.mk to set ASTAR=1 or comment it out for teensy2++ +Building - add ASTAR=1 to the compile line or leave out for teensy2++ diff --git a/keyboards/handwired/MS-sculpt-mobile/rules.mk b/keyboards/handwired/MS-sculpt-mobile/rules.mk index 34ac78da8..680389c84 100644 --- a/keyboards/handwired/MS-sculpt-mobile/rules.mk +++ b/keyboards/handwired/MS-sculpt-mobile/rules.mk @@ -1,10 +1,10 @@ -#CFLAGS=-D ASTAR ## Project specific files SRC= babblePaste.c ifdef ASTAR + CFLAGS=-D ASTAR OPT_DEFS += -DBOOTLOADER_SIZE=4096 MCU = atmega32u4 OPT_DEFS += -DCATERINA_BOOTLOADER @@ -40,7 +40,8 @@ BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE ?= no # Audio output on port C6 -USB ?= /dev/cu.usbmodem1421 +USB ?= /dev/cu.usbmodem14141 + upload: build -- cgit v1.2.3 From cd1eb8d24649662dcc1e916634beb481c98173d7 Mon Sep 17 00:00:00 2001 From: Gunther Gruber Date: Wed, 8 Mar 2017 11:13:19 +0100 Subject: added readme file --- keyboards/ergodox/keymaps/guni/readme.txt | 133 ++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 keyboards/ergodox/keymaps/guni/readme.txt diff --git a/keyboards/ergodox/keymaps/guni/readme.txt b/keyboards/ergodox/keymaps/guni/readme.txt new file mode 100644 index 000000000..93ae5f056 --- /dev/null +++ b/keyboards/ergodox/keymaps/guni/readme.txt @@ -0,0 +1,133 @@ +My main layout (Layer 0) is based on qwerty. I tried to fit the layout of the kinesis keyboard onto the ergodox. Furthermore I did some tweaks. +The other layers are seldom used. Except the F Keys and the teensy key. As I own a ergodox I cant press the reset button, so i need a key to send the teensy into reprogram mode. +There is a layer with symbols a numpad. These layers are seldom used. Except the F Keys and the teensy key. As I own a ergodox I need a key to reprogram, because I can't access the reset button. + +I am a linux user and need the esc key and str keys often therefore it is easyly accessed. Switching console str+alt+tab+f2 (layer 2 and 2) is tricky but you get it after a while. +As I live in germany and need to type umlaut frquently, i mapped the CAPS to the meta key, and swapped ' and ". So I can type ö with CAPS o + ¨. no need to press o+SHIFT+' +As a note for linux users i use str+p to get last command, instead of using the cursor keys. + +HOWTO to convert CAPS to Meta-Key and swap ' with " + +* create file with following content +.Xmodmap + clear Lock + keycode 48 = quotedbl apostrophe quotedbl apostrophe + keycode 66 = Multi_key + +* apply with +xmodmap .Xmodmap + +* convert to xkbmap +xkbcomp $DISPLAY $HOME/.xkbmap + +* automatic startup each time you startup x +echo 'xkbcomp $HOME/.xkbmap $DISPLAY' >> ~/.xinitrc + + KEYMAP( // layer 0 : default + // left hand + KC_EQL , KC_1, KC_2, KC_3, KC_4, KC_5, KC_LBRC, + KC_FN25 , KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HOME, + KC_FN27 , KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PGUP, + KC_LGUI , KC_GRV,KC_LEFT,KC_RGHT,KC_LALT, + KC_NO , KC_NO , + KC_NO , + KC_BSPC,KC_DEL ,KC_FN23, + // right hand + KC_RBRC , KC_6, KC_7 , KC_8, KC_9, KC_0, KC_MINS, + KC_END , KC_Y, KC_U , KC_I, KC_O, KC_P, KC_FN28, + KC_H , KC_J, KC_K , KC_L, KC_SCLN,KC_FN30, + KC_PGDN , KC_N, KC_M , KC_COMM,KC_DOT, KC_SLSH,KC_FN29, + KC_RALT , KC_DOWN,KC_UP, KC_NO ,KC_RGUI, + KC_NO , KC_NO, + KC_NO , + KC_FN29,KC_ENT ,KC_SPC + ), + + KEYMAP( // layer 1 : function and symbol keys + // left hand + KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, + KC_TRNS,KC_AT,KC_UNDS ,KC_LBRC,KC_RBRC,KC_CIRC ,KC_TRNS, + KC_TRNS,KC_BSLS,KC_SLSH,KC_LCBR ,KC_RCBR ,KC_ASTR, + KC_TRNS,KC_HASH ,KC_DLR ,KC_PIPE ,KC_TILD ,KC_GRV ,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_FN1, + // right hand + KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, + KC_TRNS,KC_EXLM,LSFT(KC_COMM),LSFT(KC_DOT),KC_EQL,KC_AMPR, KC_TRNS, + LSFT(KC_SLSH),KC_LPRN,KC_RPRN,KC_MINS,LSFT(KC_SCLN),KC_TRNS, + KC_TRNS,KC_PLUS,LSFT(KC_5),LSFT(KC_QUOT),KC_QUOT,KC_SCLN,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS + ), + + KEYMAP( // layer 2: navigation + // left hand + KC_NO,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_PGUP,KC_HOME,KC_UP ,KC_END,KC_NO ,KC_TRNS, + KC_TRNS,KC_PGDN,KC_LEFT,KC_DOWN,KC_RGHT,KC_NO, + KC_TRNS,KC_NO, KC_NO, KC_NO, KC_NO,KC_NO,KC_NO, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_FN1 , + // right hand + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS ,KC_TRNS, KC_HOME, KC_TRNS, KC_TRNS, KC_END ,KC_TRNS, + KC_NO, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT,KC_TRNS, + KC_TRNS,KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PGUP,KC_TRNS, + KC_LEFT, KC_DOWN,KC_RGHT,KC_PGDN,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS + ), + KEYMAP( // layer 3 : teensy bootloader functions + // left hand + KC_FN0, 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,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,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_FN1 , + // right hand + 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,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,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS + ), + + + KEYMAP( // layer 4: numpad + // left hand + 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,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,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + // right hand + KC_TRNS,KC_NLCK,KC_PSLS,KC_PAST,KC_PAST,KC_PMNS,KC_BSPC, + KC_TRNS,KC_NO, KC_P7, KC_P8, KC_P9, KC_PMNS,KC_BSPC, + KC_NO, KC_P4, KC_P5, KC_P6, KC_PPLS,KC_PENT, + KC_TRNS,KC_NO, KC_P1, KC_P2, KC_P3, KC_PPLS,KC_PENT, + KC_P0, KC_PDOT,KC_SLSH,KC_PENT,KC_PENT, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS + ), + +}; + + -- cgit v1.2.3 From 2aa079d93e31403debd467fb4eed98fb98cced0f Mon Sep 17 00:00:00 2001 From: Lukas Stiebig Date: Wed, 8 Mar 2017 20:41:35 +0100 Subject: Left control and alt Use the left control and the left alt key. --- quantum/quantum_keycodes.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 63b626926..903d57f1e 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -183,6 +183,7 @@ enum quantum_keycodes { #define ALTG(kc) (kc | QK_RCTL | QK_RALT) #define SCMD(kc) (kc | QK_LGUI | QK_LSFT) #define SWIN(kc) SCMD(kc) +#define LCA(kc) (kc | QK_LCTL | QK_LALT) #define MOD_HYPR 0xf #define MOD_MEH 0x7 @@ -339,6 +340,7 @@ enum quantum_keycodes { #define ALL_T(kc) MT((MOD_LCTL | MOD_LSFT | MOD_LALT | MOD_LGUI), kc) // see http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/ #define SCMD_T(kc) MT((MOD_LGUI | MOD_LSFT), kc) #define SWIN_T(kc) SCMD_T(kc) +#define LCA_T(kc) MT((MOD_LCTL | MOD_LALT), kc) // Left control and left alt // Dedicated keycode versions for Hyper and Meh, if you want to use them as standalone keys rather than mod-tap #define KC_HYPR HYPR(KC_NO) -- cgit v1.2.3 From 8cc70f4d9dd75e4efb186ec71ee4a3a7a0dd4587 Mon Sep 17 00:00:00 2001 From: Lukas Stiebig Date: Wed, 8 Mar 2017 20:58:55 +0100 Subject: Added german-lukas Added my keymap called germman-lukas. --- keyboards/ergodox/keymaps/german-lukas/keymap.c | 235 ++++++++++++++++++++++++ 1 file changed, 235 insertions(+) create mode 100644 keyboards/ergodox/keymaps/german-lukas/keymap.c diff --git a/keyboards/ergodox/keymaps/german-lukas/keymap.c b/keyboards/ergodox/keymaps/german-lukas/keymap.c new file mode 100644 index 000000000..f6709595e --- /dev/null +++ b/keyboards/ergodox/keymaps/german-lukas/keymap.c @@ -0,0 +1,235 @@ +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" +#include "keymap_german.h" + +// Layer names +#define BASE 0 // default layer +#define SYMB 1 // symbol layer +#define MDIA 2 // media keys +#define SHRT 3 // shortcut layer + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | Caps | 1 | 2 | 3 | 4 | 5 |X ` X| | PRSC | 6 | 7 | 8 | 9 | 0 | ß | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | E | R | T | L1 | | L1 | Z | U | I | O | P | Ü | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Esc | A | S | D | F | G |------| |------| H | J | K | L | Ö | Ä/L2 | + * |--------+------+------+------+------+------| L2 | | L2 |------+------+------+------+------+--------| + * | LShift | Y | X | C | V | B | | | | N | M | , | . | - | RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | LGui | ^ | < | LEFT | RIGHT| | Up | Down | # | + | LCA | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | CTRL | ALT | | Alt |Ctrl/Esc| + * ,------+------+------| |------+--------+------. + * | | | Home | | PgUp | | | + * | Space|Del |------| |------| Bkspc | Enter| + * | | | End | | PgDn | | | + * `--------------------' `----------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[BASE] = KEYMAP( // layer 0 : default + // left hand + KC_CAPS, KC_1, KC_2, KC_3, KC_4, KC_5, DE_ACUT, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, DE_Y, KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), + KC_LGUI, DE_CIRC, DE_LESS, KC_LEFT, KC_RIGHT, + KC_LCTRL, KC_LALT, + KC_HOME, + KC_SPC ,KC_DELT,KC_END, + // right hand + KC_PSCREEN, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + TG(MDIA), DE_Z, KC_U, KC_I, KC_O, KC_P, LT(SHRT,DE_UE), + KC_H, KC_J, KC_K, KC_L, DE_OE, LT(MDIA,DE_AE), + MEH_T(KC_NO), KC_N, KC_M, KC_COMM, KC_DOT, DE_MINS, KC_RSFT, + KC_UP, KC_DOWN, DE_HASH, DE_PLUS, LCA_T(KC_NO), + KC_RALT, KC_RCTRL, + KC_PGUP, + KC_PGDN, KC_BSPC, KC_ENT + ), + +/* Keymap 1: Symbol Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | . | 0 | = | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[SYMB] = KEYMAP( + // left hand + KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + KC_TRNS,DE_EXLM,DE_AT, DE_LCBR,DE_RCBR,DE_PIPE,KC_TRNS, + KC_TRNS,DE_HASH,DE_DLR, DE_LPRN,DE_RPRN,DE_GRV, + KC_TRNS,DE_PERC,DE_CIRC,DE_LBRC,DE_RBRC,DE_TILD,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + // right hand + KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_TRNS, KC_UP, KC_7, KC_8, KC_9, DE_ASTR, KC_F12, + KC_DOWN, KC_4, KC_5, KC_6, DE_PLUS, KC_TRNS, + KC_TRNS, DE_AMPR, KC_1, KC_2, KC_3, DE_BSLS, KC_TRNS, + KC_TRNS,KC_DOT, KC_0, DE_EQL, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), + +/* Keymap 2: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | Lclk | MsUp | Rclk | | | | | |VolDwn| Mute |VolUp | | F12 | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | Btn4 |MsLeft|MsDown|MsRght| Btn5 |------| |------| | Prev | Stop | Play | Next | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | |WhRght|WhDown| WhUp |WhLeft|WhClk | | | |BwSrch|BwBack|BwHome|BwRefr|BwFwd | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | |MsAcl0|MsAcl1|MsAcl2| | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | |Brwser|Brwser| + * | Lclk | Rclk |------| |------|Back |Forwd | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// MEDIA AND MOUSE +[MDIA] = KEYMAP( + // left hand + KC_TRNS, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_TRNS, + KC_TRNS, KC_TRNS, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, KC_TRNS, + KC_TRNS, KC_BTN4, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN5, + KC_TRNS, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, KC_BTN3, KC_TRNS, + KC_TRNS, KC_TRNS, KC_ACL0, KC_ACL1, KC_ACL2, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_BTN1, KC_BTN2, KC_TRNS, + // right hand + KC_TRNS, KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11, + KC_TRNS, KC_TRNS, KC_VOLD, KC_MUTE, KC_VOLU, KC_TRNS, KC_F12, + KC_TRNS, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT, KC_TRNS, + KC_TRNS, KC_WSCH, KC_WBAK, KC_WHOM, KC_WREF, KC_WFWD, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_WBAK, KC_WFWD +), + +/* Keymap 3: Linux shortcuts + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | |LCA-F1|LCA-F2|LCA-F3|LCA-F4|LCA-F5| | | |LCA-F6|LCA-F7|LCA-F8|LCA-F9| | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |LCA-Le| |LCA-Ri| |------| |------| | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | |LCA-Le|LCA-Ri| | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// MEDIA AND MOUSE +[SHRT] = KEYMAP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, LCA(KC_F1), LCA(KC_F2), LCA(KC_F3), LCA(KC_F4), LCA(KC_F5), KC_TRNS, + KC_TRNS, KC_TRNS, LCA(KC_LEFT), KC_TRNS, LCA(KC_RIGHT), KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, LCA(KC_LEFT), LCA(KC_RIGHT), + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, LCA(KC_F6), LCA(KC_F7), LCA(KC_F8), LCA(KC_F9), 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, + LCA(KC_UP), LCA(KC_DOWN), KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + case SYMB: + ergodox_right_led_1_on(); + break; + case MDIA: + ergodox_right_led_2_on(); + break; + case SHRT: + ergodox_right_led_3_on(); + break; + default: + ergodox_board_led_off(); + break; + } + +}; -- cgit v1.2.3 From 2f5143e219c8410cfaeeadb87782b3dc212aa3b9 Mon Sep 17 00:00:00 2001 From: Lukas Stiebig Date: Wed, 8 Mar 2017 21:09:51 +0100 Subject: Corrected the description of the layer Corrected the description of the Shortcuts layer. --- keyboards/ergodox/keymaps/german-lukas/keymap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/keyboards/ergodox/keymaps/german-lukas/keymap.c b/keyboards/ergodox/keymaps/german-lukas/keymap.c index f6709595e..c6e9f2f90 100644 --- a/keyboards/ergodox/keymaps/german-lukas/keymap.c +++ b/keyboards/ergodox/keymaps/german-lukas/keymap.c @@ -162,8 +162,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * `--------------------' `--------------------' */ -// MEDIA AND MOUSE +// Shortcuts [SHRT] = KEYMAP( + // left hand KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, LCA(KC_F1), LCA(KC_F2), LCA(KC_F3), LCA(KC_F4), LCA(KC_F5), KC_TRNS, KC_TRNS, KC_TRNS, LCA(KC_LEFT), KC_TRNS, LCA(KC_RIGHT), KC_TRNS, -- cgit v1.2.3 From 34fa8fd5d3f0c46135f22d5d24b098c9e7117b67 Mon Sep 17 00:00:00 2001 From: Lukas Stiebig Date: Wed, 8 Mar 2017 21:14:16 +0100 Subject: readme Added a readme.md file for the keymap german-lukas. --- keyboards/ergodox/keymaps/german-lukas/README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 keyboards/ergodox/keymaps/german-lukas/README.md diff --git a/keyboards/ergodox/keymaps/german-lukas/README.md b/keyboards/ergodox/keymaps/german-lukas/README.md new file mode 100644 index 000000000..3566b4ee6 --- /dev/null +++ b/keyboards/ergodox/keymaps/german-lukas/README.md @@ -0,0 +1,12 @@ +# About this keymap + +This keymap is based on the qwertz layout. +It has a key for pressing the left control and the left alt key at once. + +Linux makes a difference between AltGr and Control + Alt. Some keybindings are easier to press now. + +Also, I added a layer for pressing Control + Alt + F-Keys very fast. + +# Layer + +Each layer in the *keymap.c*-file has a comment showing the mappings of the layer. -- cgit v1.2.3 From 88e862e4728343fab4ed7e8dc44ae5594b702955 Mon Sep 17 00:00:00 2001 From: Stephen Tudor Date: Wed, 8 Mar 2017 16:00:23 -0500 Subject: Update smt keymaps for consistency --- keyboards/lets_split/keymaps/smt/keymap.c | 52 ++++++----- keyboards/planck/keymaps/smt/keymap.c | 56 ++++++------ keyboards/preonic/keymaps/smt/keymap.c | 143 +++++++++++++++++++----------- keyboards/tv44/keymaps/smt/keymap.c | 24 ++--- 4 files changed, 163 insertions(+), 112 deletions(-) diff --git a/keyboards/lets_split/keymaps/smt/keymap.c b/keyboards/lets_split/keymaps/smt/keymap.c index 5ba5417a9..b7db699fd 100644 --- a/keyboards/lets_split/keymaps/smt/keymap.c +++ b/keyboards/lets_split/keymaps/smt/keymap.c @@ -28,6 +28,12 @@ enum custom_keycodes { #define _______ KC_TRNS #define XXXXXXX KC_NO +// Custom macros +#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl +#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift +#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Alt+Shift) +#define MEH_GRV MEH_T(KC_GRV) // Tap for Backtick, hold for Meh (Ctrl+Alt+Shift) + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -42,10 +48,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_QWERTY] = KEYMAP( \ - ALL_T(KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ - CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ - SFT_T(KC_ESC), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT), \ - MEH_T(KC_GRV), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, \ + MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), /* Colemak @@ -60,10 +66,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_COLEMAK] = KEYMAP( \ - ALL_T(KC_TAB), KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ - CTL_T(KC_ESC), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ - SFT_T(KC_ESC), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT), \ - MEH_T(KC_GRV), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ + CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, \ + MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), /* Dvorak @@ -78,28 +84,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_DVORAK] = KEYMAP( \ - ALL_T(KC_TAB), KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ - CTL_T(KC_ESC), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \ - SFT_T(KC_ESC), KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_T(KC_ENT), \ - MEH_T(KC_GRV), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ + CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \ + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT, \ + MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), /* Lower * ,-----------------------------------------------------------------------------------. * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | $ | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | Home |PageUp| + * | $ | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | End |PageDn| + * | | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ [_LOWER] = KEYMAP( \ - KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ - KC_DLR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_4, KC_5, KC_6, KC_HOME, KC_PGUP, \ - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, KC_END, KC_PGDN, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ALL_T(KC_0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ + CTL_T(KC_DLR), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_4, KC_5, KC_6, _______, _______, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY ), /* Raise @@ -110,14 +116,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | | | | | | | - | / | = | [ | ] | \ | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | Next | Vol- | Vol+ | Play | + * | | | | | | | | | Home |PageDn|PageUp| End | * `-----------------------------------------------------------------------------------' */ [_RAISE] = KEYMAP( \ - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ - _______, _______, _______, _______, _______, _______, KC_UNDS, KC_QUES, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ - _______, _______, _______, _______, _______, _______, KC_MINS, KC_SLSH, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ALL_T(KC_TILD), KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ + _______, _______, _______, _______, _______, _______, KC_UNDS, KC_QUES, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ + _______, _______, _______, _______, _______, _______, KC_MINS, KC_SLSH, KC_EQL, KC_LBRC, KC_RBRC, SFT_T(KC_BSLS), \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END ), /* Adjust (Lower + Raise) diff --git a/keyboards/planck/keymaps/smt/keymap.c b/keyboards/planck/keymaps/smt/keymap.c index afc82b49f..2e1c35547 100644 --- a/keyboards/planck/keymaps/smt/keymap.c +++ b/keyboards/planck/keymaps/smt/keymap.c @@ -31,6 +31,12 @@ enum planck_keycodes { #define _______ KC_TRNS #define XXXXXXX KC_NO +// Custom macros +#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl +#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift +#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Alt+Shift) +#define MEH_GRV MEH_T(KC_GRV) // Tap for Backtick, hold for Meh (Ctrl+Alt+Shift) + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -45,10 +51,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_QWERTY] = { - {ALL_T(KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, - {CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {SFT_T(KC_ESC), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT)}, - {MEH_T(KC_GRV), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} + {HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, + {CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT}, + {MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} }, /* Colemak @@ -63,10 +69,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_COLEMAK] = { - {ALL_T(KC_TAB), KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, - {CTL_T(KC_ESC), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, - {SFT_T(KC_ESC), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT)}, - {MEH_T(KC_GRV), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} + {HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, + {CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT}, + {MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} }, /* Dvorak @@ -81,17 +87,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_DVORAK] = { - {ALL_T(KC_TAB), KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC}, - {CTL_T(KC_ESC), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS}, - {SFT_T(KC_ESC), KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_T(KC_ENT)}, - {MEH_T(KC_GRV), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} + {HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC}, + {CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS}, + {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT}, + {MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} }, /* Lower * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | Home |PageUp| + * | $ | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | Home |PageUp| * |------+------+------+------+------+------|------+------+------+------+------+------| * | | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | End |PageDn| * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -99,10 +105,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_LOWER] = { - {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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_4, KC_5, KC_6, KC_HOME, KC_PGUP}, - {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, KC_END, KC_PGDN}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} + {ALL_T(KC_0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL}, + {CTL_T(KC_DLR), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_4, KC_5, KC_6, _______, _______}, + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} }, /* Raise @@ -113,19 +119,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | | | | | | | - | / | = | [ | ] | \ | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | + * | | | | | | | | | Home |PageDn|PageUp| End | * `-----------------------------------------------------------------------------------' */ [_RAISE] = { - {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, - {_______, _______, _______, _______, _______, _______, KC_UNDS, KC_QUES, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, - {_______, _______, _______, _______, _______, _______, KC_MINS, KC_SLSH, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} + {ALL_T(KC_TILD), KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, + {_______, _______, _______, _______, _______, _______, KC_UNDS, KC_QUES, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, + {_______, _______, _______, _______, _______, _______, KC_MINS, KC_SLSH, KC_EQL, KC_LBRC, KC_RBRC, SFT_T(KC_BSLS)}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END} }, /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. - * | | Reset| | | | | | | | | | Del | + * | | Reset| | | | | | | | | | Reset| * |------+------+------+------+------+-------------+------+------+------+------+------| * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | * |------+------+------+------+------+------|------+------+------+------+------+------| @@ -135,7 +141,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_ADJUST] = { - {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, + {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET}, {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______}, {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} diff --git a/keyboards/preonic/keymaps/smt/keymap.c b/keyboards/preonic/keymaps/smt/keymap.c index ba05d9ad5..690feca47 100644 --- a/keyboards/preonic/keymaps/smt/keymap.c +++ b/keyboards/preonic/keymaps/smt/keymap.c @@ -9,15 +9,17 @@ // 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 _DVORAK 0 -#define _QWERTY 1 -#define _LOWER 2 -#define _RAISE 3 +#define _QWERTY 0 +#define _COLEMAK 1 +#define _DVORAK 2 +#define _LOWER 3 +#define _RAISE 4 #define _ADJUST 16 enum preonic_keycodes { - DVORAK = SAFE_RANGE, - QWERTY, + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, LOWER, RAISE, BACKLIT @@ -27,57 +29,84 @@ enum preonic_keycodes { #define _______ KC_TRNS #define XXXXXXX KC_NO +// Custom macros +#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl +#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift +#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Alt+Shift) +#define MEH_GRV MEH_T(KC_GRV) // Tap for Backtick, hold for Meh (Ctrl+Alt+Shift) + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Dvorak +/* Qwerty * ,-----------------------------------------------------------------------------------. * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | O | E | U | I | D | H | T | N | S | - | + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * | ` | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_DVORAK] = { - {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_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC}, - {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS}, - {SFT_T(KC_ESC), KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_T(KC_ENT)}, - {ALL_T(KC_GRV), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +[_QWERTY] = { + {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, + {HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, + {CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT}, + {MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} }, -/* Qwerty +/* Colemak * ,-----------------------------------------------------------------------------------. * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * | Esc | A | R | S | T | D | H | N | E | I | O | " | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * | ` | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = { - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, _______}, - {_______, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {_______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +[_COLEMAK] = { + {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, + {HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, + {CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT}, + {MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | - | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = { + {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, + {HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC}, + {CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS}, + {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT}, + {MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} }, /* Lower * ,-----------------------------------------------------------------------------------. * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | Home |PageUp| + * | $ | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | Home |PageUp| * |------+------+------+------+------+------|------+------+------+------+------+------| * | | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | End |PageDn| * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -85,11 +114,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_LOWER] = { - {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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL}, - {_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_4, KC_5, KC_6, KC_HOME, KC_PGUP}, - {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, KC_END, KC_PGDN}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} + {ALL_T(KC_GRV), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL}, + {ALL_T(KC_0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL}, + {CTL_T(KC_DLR), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_4, KC_5, KC_6, _______, _______}, + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} }, /* Raise @@ -102,24 +131,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | | | | | | | - | / | = | [ | ] | \ | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | + * | | | | | | | | | Home |PageDn|PageUp| End | * `-----------------------------------------------------------------------------------' */ [_RAISE] = { - {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, - {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, - {_______, _______, _______, _______, _______, _______, KC_UNDS, KC_QUES, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, - {_______, _______, _______, _______, _______, _______, KC_MINS, KC_SLSH, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} + {ALL_T(KC_TILD), KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, + {ALL_T(KC_TILD), KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, + {_______, _______, _______, _______, _______, _______, KC_UNDS, KC_QUES, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, + {_______, _______, _______, _______, _______, _______, KC_MINS, KC_SLSH, KC_EQL, KC_LBRC, KC_RBRC, SFT_T(KC_BSLS)}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END} }, /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | Reset| | | | | | | | | | Del | + * | | Reset| | | | | | | | | | Reset| * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | |Aud on|AudOff|AGnorm|AGswap|Dvorak|Qwerty| | | | + * | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | * |------+------+------+------+------+------|------+------+------+------+------+------| * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -128,8 +157,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_ADJUST] = { {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, DVORAK, QWERTY, _______, _______, _______}, + {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET}, + {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______}, {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} } @@ -145,8 +174,9 @@ float tone_startup[][2] = { {NOTE_B6, 8} }; -float tone_dvorak[][2] = SONG(DVORAK_SOUND); float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); float tone_goodbye[][2] = SONG(GOODBYE_SOUND); @@ -160,21 +190,30 @@ void persistant_default_layer_set(uint16_t default_layer) { bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case DVORAK: + case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + PLAY_NOTE_ARRAY(tone_qwerty, false, 0); #endif - persistant_default_layer_set(1UL<<_DVORAK); + persistant_default_layer_set(1UL<<_QWERTY); } return false; break; - case QWERTY: + case COLEMAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_NOTE_ARRAY(tone_colemak, false, 0); #endif - persistant_default_layer_set(1UL<<_QWERTY); + persistant_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + #endif + persistant_default_layer_set(1UL<<_DVORAK); } return false; break; diff --git a/keyboards/tv44/keymaps/smt/keymap.c b/keyboards/tv44/keymaps/smt/keymap.c index de5ce03e2..532e74de0 100644 --- a/keyboards/tv44/keymaps/smt/keymap.c +++ b/keyboards/tv44/keymaps/smt/keymap.c @@ -32,8 +32,8 @@ enum planck_keycodes { // Custom macros #define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl #define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift -#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper -#define ALT_GRV ALT_T(KC_GRV) // Tap for Backtick, hold for Alt +#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Alt+Shift) +#define ALT_GRV ALT_T(KC_GRV) // Tap for Backtick, hold for Alt (Ctrl+Alt+Shift) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -117,13 +117,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_LOWER] = KEYMAP_TV45( /*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/ - KC_0 , KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL , +ALL_T(KC_0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL , /*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/ - KC_DLR , KC_4, KC_5, KC_6, KC_DOT, KC_PLUS, KC_ASTR, KC_4, KC_5, KC_6, KC_DOT, KC_PGUP , +CTL_T(KC_DLR), KC_4, KC_5, KC_6, KC_DOT, KC_PLUS, KC_ASTR, KC_4, KC_5, KC_6, KC_DOT, KC_PGUP , /*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ - KC_EQL , KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_SLSH, KC_1, KC_2, KC_3, KC_UP, KC_PGDN , +SFT_T(KC_EQL), KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_SLSH, KC_1, KC_2, KC_3, KC_UP, SFT_T(KC_PGDN), /*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ - BACKLIT , _______ , _______ , KC_HOME , KC_END , _______ , KC_LEFT, KC_DOWN, KC_RGHT ), +ALT_T(BACKLIT), _______ , _______ , KC_HOME , KC_END , _______ , KC_LEFT, KC_DOWN, KC_RGHT ), /*`---------+---------------+---------+-------^^^------+-------^^^-------+----------+--------+--------+--------------'*/ /* Raise @@ -139,18 +139,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_RAISE] = KEYMAP_TV45( /*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/ - KC_TILD,KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL , +ALL_T(KC_TILD),KC_EXLM,KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL , /*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/ - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_QUES, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE , +CTL_T(KC_F1), KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_QUES, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE , /*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ - KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MINS, KC_SLSH, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS , + SFT_T(KC_F7), KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MINS, KC_SLSH, KC_EQL, KC_LBRC, KC_RBRC, SFT_T(KC_BSLS), /*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ - BACKLIT , _______ , _______ , KC_MPLY , KC_MNXT , _______ , KC_MUTE, KC_VOLD, KC_VOLU ), +ALT_T(BACKLIT), _______ , _______ , KC_MPLY , KC_MNXT , _______ , KC_MUTE, KC_VOLD, KC_VOLU ), /*`---------+---------------+---------+-------^^^------+-------^^^-------+----------+--------+--------+--------------'*/ /* Adjust (Lower + Raise) * ,---------+------+------+------+------+------+------+------+------+------+------+---------. - * | | Reset| | | | | | | | | | Del | + * | | Reset| | | | | | | | | | Reset | * |---------`------`------`------`------`------`------`------`------`------`------`---------| * | | | | | |AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | * |----------`------`------`------`------`------`------`------`------`------`------`--------| @@ -161,7 +161,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_ADJUST] = KEYMAP_TV45( /*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/ - _______, RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL , + _______, RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET , /*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/ _______ ,_______, _______, _______, _______, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______ , /*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ -- cgit v1.2.3 From b5bfb5104b63766ab9a54509302a3f4b0b1d7b16 Mon Sep 17 00:00:00 2001 From: milestogo Date: Wed, 8 Mar 2017 15:48:39 -0800 Subject: docs for babblepaste --- .../handwired/MS-sculpt-mobile/babblePaste.txt | 586 ++++----------------- .../MS-sculpt-mobile/keymaps/milestogo/keymap.c | 10 +- 2 files changed, 115 insertions(+), 481 deletions(-) diff --git a/keyboards/handwired/MS-sculpt-mobile/babblePaste.txt b/keyboards/handwired/MS-sculpt-mobile/babblePaste.txt index 6170ec7af..cf75e153e 100644 --- a/keyboards/handwired/MS-sculpt-mobile/babblePaste.txt +++ b/keyboards/handwired/MS-sculpt-mobile/babblePaste.txt @@ -1,489 +1,123 @@ -/* A library to output the right key shortcut in any common app. -Given a global variable babble_mode to show the environment and a -key that calls the paste macro, do the right type of paste. -Setting the context is done by another macro, or TBD interaction with the host. + BabblePaste is a library of common macros used to make sure that +you can have one "paste" button on one layer, and it will do the +right thing on any OS or app. Windows=Ctrl-V. Mac = Command-V and so on. -Huge thanks to https://en.wikipedia.org/wiki/Table_of_keyboard_shortcuts -and https://github.com/qmk/qmk_firmware/blob/master/keyboards/planck/keymaps/jeebak/keymap.c -*/ +The babblepaste library looks for the current status in a babble_mode global variable. +To switch modes, run the switch_babble_mode() function, or a pre defined macro. +Currently supported are Windows, OS X, Gnome/kde, Emacs, VI and readline, +across 42+ common macro actions. -#include "eeconfig.h" +###To use the library +1) Paste the following into your config.h. -// Comment out anything you will never use. -// Windows. -#define MS_MODE 0 -#define MAC_MODE 1 -//aka gnome+KDE -#define LINUX_MODE 2 -#define EMACS_MODE 3 -#define VI_MODE 4 -//#define WORDSTAR_MODE 5 +//////Begin////// +#define USE_BABLPASTE 1 + +#ifdef USE_BABLPASTE +/* define BabblePaste maps. Whatever = 0 will be the default. */ +// MAC_MODE 0 +// MS_MODE 1 +// LINUX_MODE 2 +// EMACS_MODE 3 +// VI_MODE 3 // Readline and tmux -#define READMUX 6 +// READMUX_MODE 2 +// WORDSTAR_MODE 5 +#endif -// GLOBAL variable. Sets startup default if no eeppom -char babble_mode = MAC_MODE ; +// Uncomment these to remove options an free up flash space +// This removes everything but cursor movement +// BABL_MOVEMENTONLY +// and this just removes browser shortcuts +// BABL_NOBROWSER +///////End/////// -/* minimum set required for babble: - // Cut & Paste - BABL_UNDO - BABL_REDO - BABL_CUT - BABL_COPY - BABL_PASTE - BABL_SELECT_ALL - - // Movement - BABL_DEL_RIGHT_1C - BABL_DEL_RIGHT_1C - BABL_DEL_LEFT_WORD - BABL_DEL_RIGHT_WORD - BABL_GO_LEFT_1C - BABL_GO_LEFT_WORD - BABL_GO_RIGHT_WORD - BABL_GOTO_START_LINE - BABL_GOTO_START_DOC - BABL_GOTO_END_LINE - BABL_GOTO_END_DOC - BABL_GOTO_NEXT_LINE // down arrow will do. - BABL_GOTO_PREV_LINE // up arrow will do. - BABL_PGDN - BABL_PGUP - - // GUI - BABL_FIND - BABL_FIND_NEXT - BABL_FIND_REPLACE - BABL_RUNAPP - BABL_SWITCH_NEXT - BABL_SWITCH_LAST // previous - BABL_CLOSE_APP - BABL_HELP -*/ +2) Add the following to your keymap in the action_get_macro +//////Begin////// +#ifdef USE_BABLPASTE + if( id >= BABL_START_NUM && id < (BABL_START_NUM + BABL_NUM_MACROS ) ) { + if (record->event.pressed) { // is there a case where this isn't desired? + + babblePaste ( record, id ); + return MACRO_NONE; + } + } +#endif +///////End/////// +3) add Babbelpaste actions to your keymap. See the full list in babblePaste.h, or the +list below +B_L1C // go left 1 char +B_R1C // go Right 1 char + B_L1W //GO_LEFT_1 WORD + B_R1W //BABL_GO_RIGHT_1 WORD + B_GSOL // BABL_GOTO_START of _LINE + B_GEOL // BABL_GOTO_END_LINE + B_GTOP //BABL_GOTO_START_DOC + B_GEND //BABL_GO_END_DOC + B_DOWN //BABL_GO_NEXT_LINE + B_UP // BABL_GO_PREV_LINE + B_PGDN //PGDN + B_PGUP //PGUP +// B_BKSP //backspace so why bother. + B_DEL // DEL_RIGHT_1 Char // usually = Del + B_DLW // DEL_LEFT_ 1 WORD) + B_DRW //DEL_RIGHT_1 WORD + B_DEOL // delete from cursor to end of line + B_DSOL // delete from cursor to begining line + B_UNDO //UNDO + B_REDO // REDO + B_CUT // CUT) + B_COPY // COPY) + B_PAST // PASTE) + B_SELA // SELECT_ALL + B_FIND // FIND) + B_FINDN //FIND_NEXT) + B_FINDR // FIND_REPLACE) + B_RAPP // open application launcher + B_NAPP // switch to next app + B_PAPP // switch to previous app + B_CAPP // CLOSE_APP) + B_HELP // HELP) + B_NTAB // BROWSER_NEW_TAB) + B_CTAB //BROWSER_CLOSE_TAB) + B_ROTB //BROWSER_REOPEN_LAST_TAB) + B_NXTB //BROWSER_NEXT_TAB) + B_PTAB //BROWSER_PREV_TAB) + B_NURL //BROWSER_jump to URL_BAR) + B_BFWD // BROWSER_FORWARD (in history) + B_BBAK //BROWSER_BACK (in history) + B_BFND // BROWSER_FIND) + B_BOOK //BROWSER_New BOOKMARK) + B_BDEV //BROWSER_ Open DEV_TOOLS) // hard one to remember + B_BRLD // BROWSER_RELOAD Page + B_BFUlL // BROWSER_FULLSCREEN) + B_ZMIN // BROWSER_ZOOM_IN) + B_ZMOT //BROWSER_ZOOM_OUT) -static macro_t *babblePaste (keyrecord_t *record, uint16_t shortcut) { - switch(babble_mode) { - -#ifdef MS_MODE - case MS_MODE: - switch(shortcut) { - - case BABL_UNDO: - return MACRO( D(LCTRL), T(Z), U(LCTRL), END ); - case BABL_REDO: - return MACRO( D(LCTRL), T(Y), U(LCTRL), END ); - case BABL_CUT: - return MACRO( D(LCTRL), T(X), U(LCTRL), END ); - case BABL_COPY: - return MACRO( D(LCTRL), T(C), U(LCTRL), END ); - case BABL_PASTE: - return MACRO( D(LCTRL), T(V), U(LCTRL), END ); - case BABL_SELECT_ALL: - return MACRO( D(LCTRL), T(A), U(LCTRL), END ); - case BABL_DEL_RIGHT_1C: - return MACRO( D(DEL), END ); - case BABL_DEL_LEFT_WORD: - return MACRO( D(LCTRL), T(BSPACE), U(LCTRL), END ); - case BABL_DEL_RIGHT_WORD: - return MACRO( D(LCTRL), T(DEL), U(LCTRL), END ); - case BABL_GO_LEFT_1C: - return MACRO( T(LEFT), END ); - case BABL_GO_RIGHT_1C: - return MACRO( T(RIGHT), END ); - case BABL_GO_LEFT_WORD: - return MACRO( D(LCTRL), T(LEFT), U(LCTRL), END ); - case BABL_GO_RIGHT_WORD: - return MACRO( D(LCTRL), T(RIGHT), U(LCTRL), END ); - case BABL_GOTO_START_LINE: - return MACRO( T(HOME), END ); - case BABL_GOTO_START_DOC: - return MACRO( D(LCTRL),T(HOME), U(LCTRL),END ); - case BABL_GOTO_END_LINE: - return MACRO( T(END), END ); - case BABL_GOTO_END_DOC: - return MACRO( D(LCTRL),T(END), U(LCTRL),END ); - case BABL_GOTO_NEXT_LINE: - return MACRO( T(DOWN), END ); - case BABL_GOTO_PREV_LINE: - return MACRO( T(UP), END ); - case BABL_PGDN: - return MACRO( T(PGDN), END ); - case BABL_PGUP: - return MACRO( T(PGUP), END ); - case BABL_FIND: - return MACRO( D(LCTRL),T(F), U(LCTRL),END ); - case BABL_FIND_NEXT: - return MACRO( T(F3),END ); - case BABL_FIND_REPLACE: - return MACRO( D(LCTRL),T(H), U(LCTRL),END ); - case BABL_RUNAPP: - return MACRO( D(LGUI),T(R), U(LGUI),END ); - case BABL_SWITCH_APP_NEXT: - return MACRO( D(LALT),T(TAB), U(LALT),END ); - case BABL_SWITCH_APP_LAST: - return MACRO( D(LSFT),D(LALT),T(TAB), U(LALT), U(LSFT),END ); - case BABL_CLOSE_APP: - return MACRO( D(LALT),T(F4), U(LALT),END ); - case BABL_HELP: - return MACRO( T(F1),END ); - break; - - return MACRO_NONE; - } - -#endif -#ifdef LINUX_MODE - case LINUX_MODE: - switch(shortcut) { - - case BABL_UNDO: - return MACRO( D(LCTRL), T(Z), U(LCTRL), END ); - case BABL_REDO: - return MACRO( D(LCTRL), T(Y), U(LCTRL), END ); - case BABL_CUT: - return MACRO( D(LCTRL), T(X), U(LCTRL), END ); - case BABL_COPY: - return MACRO( D(LCTRL), T(C), U(LCTRL), END ); - case BABL_PASTE: - return MACRO( D(LCTRL), T(V), U(LCTRL), END ); - case BABL_SELECT_ALL: - return MACRO( D(LCTRL), T(A), U(LCTRL), END ); - case BABL_DEL_RIGHT_1C: - return MACRO( D(DEL), END ); - case BABL_DEL_LEFT_WORD: - return MACRO( D(LCTRL), T(BSPACE), U(LCTRL), END ); - case BABL_DEL_RIGHT_WORD: - return MACRO( D(LCTRL), T(DEL), U(LCTRL), END ); - case BABL_GO_LEFT_1C: - return MACRO( T(LEFT), END ); - case BABL_GO_RIGHT_1C: - return MACRO( T(RIGHT), END ); - case BABL_GO_LEFT_WORD: - return MACRO( D(LCTRL), T(LEFT), U(LCTRL), END ); - case BABL_GO_RIGHT_WORD: - return MACRO( D(LCTRL), T(RIGHT), U(LCTRL), END ); - case BABL_GOTO_START_LINE: - return MACRO( T(HOME), END ); - case BABL_GOTO_START_DOC: - return MACRO( D(LCTRL),T(HOME), U(LCTRL),END ); - case BABL_GOTO_END_LINE: - return MACRO( T(END), END ); - case BABL_GOTO_END_DOC: - return MACRO( D(LCTRL),T(END), U(LCTRL),END ); - case BABL_GOTO_NEXT_LINE: - return MACRO( T(DOWN), END ); - case BABL_GOTO_PREV_LINE: - return MACRO( T(UP), END ); - case BABL_PGDN: - return MACRO( T(PGDN), END ); - case BABL_PGUP: - return MACRO( T(PGUP), END ); - case BABL_FIND: - return MACRO( D(LCTRL),T(F), U(LCTRL),END ); - case BABL_FIND_NEXT: - /* return MACRO( T(F3),END ); KDE */ - return MACRO( D(LCTRL),T(G), U(LCTRL),END ); // Gnome*/ - case BABL_FIND_REPLACE: - /* return MACRO( D(LCTRL),T(R), U(LCTRL),END ); KDE */ - return MACRO( D(LCTRL),T(H), U(LCTRL),END ); // Gnome*/ - case BABL_RUNAPP: - return MACRO( D(LALT),T(F2), U(LALT),END ); - case BABL_SWITCH_APP_NEXT: - return MACRO( D(LCTL),T(TAB), U(LCTL),END ); - case BABL_SWITCH_APP_LAST: - return MACRO( D(LSFT),D(LCTL),T(TAB), U(LCTL), U(LSFT),END ); - case BABL_CLOSE_APP: - return MACRO( D(LALT),T(F4), U(LALT),END ); - case BABL_HELP: - return MACRO_NONE; - break; - - return MACRO_NONE; - } - -#endif - - - -#ifdef MAC_MODE - case MAC_MODE: - switch(shortcut) { - - case BABL_UNDO: - return MACRO( D(LGUI), T(Z), U(LGUI), END ); - case BABL_REDO: - return MACRO( D(LSFT),D(LGUI), T(Z), U(LSFT),U(LGUI), END ); - case BABL_CUT: - return MACRO( D(LGUI), T(X), U(LGUI), END ); - case BABL_COPY: - return MACRO( D(LGUI), T(C), U(LGUI), END ); - case BABL_PASTE: - return MACRO( D(LGUI), T(V), U(LGUI), END ); - case BABL_SELECT_ALL: - return MACRO( D(LGUI), T(A), U(LGUI), END ); - case BABL_DEL_RIGHT_1C: - return MACRO( D(DEL), END ); - case BABL_DEL_LEFT_WORD: - return MACRO( D(LALT), T(BSPACE), U(LALT), END ); - case BABL_DEL_RIGHT_WORD: - return MACRO( D(LALT), T(DEL), U(LALT), END ); - case BABL_GO_LEFT_1C: - return MACRO( T(LEFT), END ); - case BABL_GO_RIGHT_1C: - return MACRO( T(RIGHT), END ); - case BABL_GO_LEFT_WORD: - return MACRO( D(LALT), T(LEFT), U(LALT), END ); - case BABL_GO_RIGHT_WORD: - return MACRO( D(LALT), T(RIGHT), U(LALT), END ); - case BABL_GOTO_START_LINE: - return MACRO( D(LGUI), T(LEFT), U(LGUI), END ); - case BABL_GOTO_START_DOC: - return MACRO( D(LGUI),T(UP), U(LGUI),END ); - case BABL_GOTO_END_LINE: - return MACRO( D(LGUI), T(RIGHT), U(LGUI), END ); - case BABL_GOTO_END_DOC: - return MACRO( D(LGUI),T(DOWN), U(LGUI),END ); - case BABL_GOTO_NEXT_LINE: - return MACRO( T(DOWN), END ); - case BABL_GOTO_PREV_LINE: - return MACRO( T(UP), END ); - case BABL_PGDN: - return MACRO( D(LALT), T(DOWN), U(LALT), END ); - case BABL_PGUP: - return MACRO( D(LALT), T(UP), U(LALT), END ); - case BABL_FIND: - return MACRO( D(LGUI),T(F), U(LGUI),END ); - case BABL_FIND_NEXT: - return MACRO( D(LGUI),T(G), U(LGUI),END ); - case BABL_FIND_REPLACE: - return MACRO( D(LGUI),T(F), U(LGUI),END ); - case BABL_RUNAPP: - return MACRO( D(LGUI),T(R), U(LGUI),END ); - case BABL_SWITCH_APP_NEXT: - return MACRO( D(LGUI),T(TAB), U(LGUI),END ); - case BABL_SWITCH_APP_LAST: - return MACRO( D(LSFT),D(LGUI),T(TAB), U(LGUI), U(LSFT),END ); - case BABL_CLOSE_APP: - return MACRO( D(LGUI),T(Q), U(LGUI),END ); - case BABL_HELP: - return MACRO( D(LSFT),D(LGUI),T(SLASH), U(LGUI), U(LSFT),END ); - break; - - return MACRO_NONE; - } - -#endif - -#ifdef EMACS_MODE - case EMACS_MODE: - switch(shortcut) { -//probably should allow meta to not be ALT - case BABL_UNDO: - return MACRO( D(LCTL), T(X), U(LCTL),T(C), END ); - case BABL_REDO: - return MACRO( D(LCTL), T(X), U(LCTL),T(C), END ); // arguably - case BABL_CUT: - return MACRO( D(LCTL), T(W), U(LCTL), END ); - case BABL_COPY: - return MACRO( D(LALT), T(W), U(LALT), END ); - case BABL_PASTE: - return MACRO( D(LCTL), T(Y), U(LCTL), END ); - case BABL_SELECT_ALL: - return MACRO(D(LCTL), T(X), U(LCTL),T(H), END ); - case BABL_DEL_RIGHT_1C: - return MACRO( D(LCTL), T(D), U(LCTL),END ); - case BABL_DEL_LEFT_WORD: - return MACRO( D(LCTL), T(BSPACE), U(LCTL), END ); - case BABL_DEL_RIGHT_WORD: - return MACRO( D(LALT), T(D), U(LALT), END ); - case BABL_GO_LEFT_1C: - return MACRO( T(LEFT), END ); - case BABL_GO_RIGHT_1C: - return MACRO( T(RIGHT), END ); - case BABL_GO_LEFT_WORD: - return MACRO( D(LALT), T(B), U(LALT), END ); - case BABL_GO_RIGHT_WORD: - return MACRO( D(LALT), T(F), U(LALT), END ); - case BABL_GOTO_START_LINE: - return MACRO( D(LCTRL), T(A), U(LCTRL), END ); - case BABL_GOTO_START_DOC: - return MACRO( D(LALT), D(LSFT), T(COMM),U(LSFT), U(LALT) ,END ); - case BABL_GOTO_END_LINE: - return MACRO( D(LCTRL), T(E), U(LCTRL), END ); - case BABL_GOTO_END_DOC: - return MACRO( D(LALT), D(LSFT), T(DOT),U(LSFT), U(LALT) ,END ); - case BABL_GOTO_NEXT_LINE: - return MACRO( D(LCTRL), T(N), U(LCTRL), END ); - case BABL_GOTO_PREV_LINE: - rreturn MACRO( D(LCTRL), T(P), U(LCTRL), END ); - case BABL_PGDN: - return MACRO(D(LCTRL), T(V), U(LCTRL), END ); - case BABL_PGUP: - return MACRO( D(LALT), T(V), U(LALT), END ); - case BABL_FIND: - return MACRO( D(LCTRL), T(S), U(LCTRL),END ); - case BABL_FIND_NEXT: - return MACRO( D(LCTRL), T(S), U(LCTRL),END ); - case BABL_FIND_REPLACE: - return MACRO( D(LALT),D(LSFT), T(5),U(LSFT), U(LALT), END ); - case BABL_RUNAPP: - return MACRO( D(LALT), T(X), U(LALT),T(S),T(H),T(E),T(L),T(L),END );// arguably - case BABL_SWITCH_APP_NEXT: - return MACRO( D(LCTL), T(X), U(LCTL),T(RIGHT), END ); // arguably - case BABL_SWITCH_APP_LAST: - return MACRO( D(LCTL), T(X), U(LCTL),T(LEFT), END ); // arguably - case BABL_CLOSE_APP: - return MACRO(D(LCTL), T(X), U(LCTL),T(C),END ); - case BABL_HELP: - return MACRO( D(LCTL),T(H), U(LCTL),T(A),END); // start search in help - break; - - return MACRO_NONE; - } - -#endif -#ifdef VI_MODE - case VI_MODE: - switch(shortcut) { -//assume esc is already called - case BABL_UNDO: - return MACRO( T(U), END ); - case BABL_REDO: - return MACRO( D(LCTL), T(R), U(LCTL), END ); - case BABL_CUT: - return MACRO( T(X), END ); - case BABL_COPY: - return MACRO( T(Y),END ); - case BABL_PASTE: - return MACRO( T(P), END ); - case BABL_SELECT_ALL: - return MACRO( T(COLN),T(PERC),T(Y), END ); // wrong but helpful? - case BABL_DEL_RIGHT_1C: - return MACRO( T(X),END ); - case BABL_DEL_LEFT_WORD: - return MACRO( T(D),T(G),T(E),END ); - case BABL_DEL_RIGHT_WORD: - return MACRO( T(D),T(W),END ); - case BABL_GO_LEFT_1C: - return MACRO( T(H), END ); - case BABL_GO_RIGHT_1C: - return MACRO( T(L), END ); - case BABL_GO_LEFT_WORD: - return MACRO( T(B),END ); - case BABL_GO_RIGHT_WORD: - return MACRO( T(W), END ); - case BABL_GOTO_START_LINE: - return MACRO( T(CIRC), END ); - case BABL_GOTO_START_DOC: - return MACRO( T(G),T(G) ,END ); - case BABL_GOTO_END_LINE: - return MACRO( T(DLR), END ); - case BABL_GOTO_END_DOC: - return MACRO( D(LSFT), T(G),U(LSFT), ,END ); - case BABL_GOTO_NEXT_LINE: - return MACRO( T(J), END ); - case BABL_GOTO_PREV_LINE: - rreturn MACRO( T(K), END ); - case BABL_PGDN: - return MACRO(D(LCTRL), T(F), U(LCTRL), END ); - case BABL_PGUP: - return MACRO( D(LCTRL), T(B), U(LCTRL), END ); - case BABL_FIND: - return MACRO( T(SLASH),END ); - case BABL_FIND_NEXT: - return MACRO( T(N),END ); - case BABL_FIND_REPLACE: - return MACRO( D(LALT),D(LSFT), T(5),U(LSFT), U(LALT), END ); - case BABL_RUNAPP: - return MACRO_NONE; - case BABL_SWITCH_APP_NEXT: - return MACRO_NONE; - case BABL_SWITCH_APP_LAST: - return MACRO_NONE; - case BABL_CLOSE_APP: - return MACRO(T(COLN), T(Q), T(EXLM),END ); - case BABL_HELP: - return MACRO(T(COLN),T(H),END); // start search in help - break; - - return MACRO_NONE; - } - -#endif -#ifdef READMUX_MODE -// I havent decided how much to do bash and how much tmux - case READMUX_MODE: - switch(shortcut) { - case BABL_UNDO: - return MACRO( D(LALT), T(R), U(LALT) , END ); - case BABL_REDO: - return MACRO( D(LCTL), T(X), U(LCTL),T(C), END ); // arguably - case BABL_CUT: - return MACRO( D(LCTL), T(K), U(LCTL), END ); // wrong half the time - case BABL_COPY: - return MACRO_NONE; - case BABL_PASTE: - return MACRO( D(LCTL), T(Y), U(LCTL), END ); - case BABL_SELECT_ALL: - return MACRO(D(LCTL), T(A), T(K), T(Y), U(LCTL) , END ); // should this be tmux all? - case BABL_DEL_RIGHT_1C: - return MACRO( D(LCTL), T(D), U(LCTL),END ); - case BABL_DEL_LEFT_WORD: - return MACRO( D(LCTL), T(W), U(LCTL), END ); - case BABL_DEL_RIGHT_WORD: - return MACRO( D(LALT), T(D), U(LALT), END ); - case BABL_GO_LEFT_1C: - return MACRO( T(LEFT), END ); - case BABL_GO_RIGHT_1C: - return MACRO( T(RIGHT), END ); - case BABL_GO_LEFT_WORD: - return MACRO( D(LALT), T(B), U(LALT), END ); - case BABL_GO_RIGHT_WORD: - return MACRO( D(LALT), T(F), U(LALT), END ); - case BABL_GOTO_START_LINE: - return MACRO( D(LCTRL), T(A), U(LCTRL), END ); - case BABL_GOTO_START_DOC: - return MACRO_NONE; // tmux? - case BABL_GOTO_END_LINE: - return MACRO( D(LCTRL), T(E), U(LCTRL), END ); - case BABL_GOTO_END_DOC: - return MACRO_NONE; // tmux? - case BABL_GOTO_NEXT_LINE: - return MACRO( D(LCTRL), T(N), U(LCTRL), END ); - case BABL_GOTO_PREV_LINE: - return MACRO( D(LCTRL), T(P), U(LCTRL), END ); - case BABL_PGDN: - return MACRO( T(PGDN), END ); - case BABL_PGUP: - return MACRO( T(PGUP), END ); - case BABL_FIND: - return MACRO( D(LCTRL), T(R), U(LCTRL), END ); // search history - case BABL_FIND_NEXT: - eturn MACRO( D(LCTRL), T(S), U(LCTRL), END ); - case BABL_FIND_REPLACE: - return MACRO_NONE; // tmux? - case BABL_RUNAPP: - return MACRO( D(LCTRL), T(B), U(LCTRL), T(C),END ); //tmux - case BABL_SWITCH_APP_NEXT: - return MACRO( D(LCTRL), T(B), U(LCTRL), T(N),END ); //tmux - case BABL_SWITCH_APP_LAST: - return MACRO( D(LCTRL), T(B), U(LCTRL), T(P),END ); //tmux - case BABL_CLOSE_APP: - return MACRO( D(LCTRL), T(B), U(LCTRL), T(D),END); // usually what I want - break; - case BABL_HELP: - return MACRO_NONE; - break; - - return MACRO_NONE; - } - -#endif - return MACRO_NONE; -} \ No newline at end of file +#### Development notes +-Why a new function? Because it would make the keymap too ugly to put it there. +-Why not return the macro to action_get_macro? Because I kept running into scope problems +and pointers to the wrong type. +-Why not an array of arrays as a lookup instead of a function? That would allow you +to store the lookup table in PROGMEM. True, but that takes more pre-processor skill +than I had. + +-Have you tested this on every platform? No. Submit a patch. + + +### Next steps for someone. +Make it easier to pair macros with modifiers. So key foo will jump to start of line, and +Shift(foo) will jump to the first tab in a browser. + +## Thanks + +Thanks to https://en.wikipedia.org/wiki/Table_of_keyboard_shortcuts +and https://github.com/qmk/qmk_firmware/blob/master/keyboards/planck/keymaps/jeebak/keymap.c +And of course QMK... + diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/keymap.c b/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/keymap.c index 3b2f53a0c..395a9fb47 100644 --- a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/keymap.c +++ b/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/keymap.c @@ -100,7 +100,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ M(VIBRK), KC_CIRC, KC_LCBR, KC_RCBR,KC_AT, KC_PERC, ____, KC_LBRC,KC_LPRN,KC_RPRN,KC_UNDS, ____, ____, ____,\ ____, KC_EXLM, KC_HASH, KC_0, KC_EQL, KC_LCBR, KC_RCBR,KC_MINS,KC_1, KC_PLUS,KC_RBRC, KC_GRV, ____, ____,\ - ____, KC_SCLN, KC_TILDE, KC_COLN, KC_TILDE, KC_PIPE, KC_DLR, KC_ASTR, ____, KC_DOT , KC_SLSH, ____, ____, ____,\ + ____, KC_SCLN, KC_TILDE, KC_COLN, KC_TILDE, KC_PIPE, KC_DLR, KC_ASTR, ____, KC_DOT , KC_SLSH, ____, ____, ____,\ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____ ), /* @@ -108,11 +108,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * -------------------------------------------------------------------------------' * | | | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |Bakspace| Del| * --------------------------------------------------------------------------- -* | tab | q | w |Find| |pTab |DSOL|DelW| Up |DelW|DEOL| [ | ] | \ | | +* | tab | | |Find| |pTab |DSOL|DelW| Up |DelW|DEOL| [ | ] | \ | | * -------------------------------------------------------------------------------' -* |Bak/Mov| a | s | d | |nTab |GSOL| <- | Dwn | -> | EOL | ' | enter |PgUp| +* |Bak/Mov| | | | |nTab |GSOL| <- | Dwn | -> | EOL | ' | enter |PgUp| * -------------------------------------------------------------------------------- -* |Lsft |Undo| Cut|Copy|Pste| b | n | m | , | . | / | Rsft| Up| PgDn| +* |Lsft |Undo| Cut|Copy|Pste| | | | | | / | Rsft| Up| PgDn| * --------------------------------------------------------------------------------- * |Lctl |Lgui |Lalt | Space/Sym | GUI | Sym | Rctl |Left|Down|Rght| * --------------------------------------------------------------------------------- @@ -189,7 +189,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { -/* If this is in the range of BABL macros, call a separate function */ +/* If id is in the range of BABL macros, call the babl function */ /* Any clever remapping with modifiers should happen here e.g. shift bablkey does opposite*/ #ifdef USE_BABLPASTE -- cgit v1.2.3 From 7c7a77d4bf8f35cd7f59119be0e95b5d28063988 Mon Sep 17 00:00:00 2001 From: Erez Zukerman Date: Wed, 8 Mar 2017 19:43:10 -0500 Subject: Tweaks keymap to reset on boot --- keyboards/ergodox/keymaps/reset_eeprom/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/ergodox/keymaps/reset_eeprom/keymap.c b/keyboards/ergodox/keymaps/reset_eeprom/keymap.c index f708454ce..8d6897658 100644 --- a/keyboards/ergodox/keymaps/reset_eeprom/keymap.c +++ b/keyboards/ergodox/keymaps/reset_eeprom/keymap.c @@ -111,7 +111,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // Runs just one time when the keyboard initializes. void matrix_init_user(void) { - + eeconfig_init(); }; -- cgit v1.2.3 From 8d4bc714e4e69dd89b0ef7f1bad60e6ca6c0f791 Mon Sep 17 00:00:00 2001 From: Stephen Tudor Date: Wed, 8 Mar 2017 23:16:58 -0500 Subject: Update smt keymap READMEs --- keyboards/lets_split/keymaps/smt/keymap.c | 108 ++++++++++++++--------------- keyboards/lets_split/keymaps/smt/readme.md | 88 +++++++++++++++++++++++ keyboards/planck/keymaps/smt/keymap.c | 4 +- keyboards/planck/keymaps/smt/readme.md | 79 +++++++++++++-------- keyboards/preonic/keymaps/smt/keymap.c | 4 +- keyboards/preonic/keymaps/smt/readme.md | 77 ++++++++++++-------- 6 files changed, 246 insertions(+), 114 deletions(-) create mode 100644 keyboards/lets_split/keymaps/smt/readme.md diff --git a/keyboards/lets_split/keymaps/smt/keymap.c b/keyboards/lets_split/keymaps/smt/keymap.c index b7db699fd..c4bdb7ebc 100644 --- a/keyboards/lets_split/keymaps/smt/keymap.c +++ b/keyboards/lets_split/keymaps/smt/keymap.c @@ -37,15 +37,15 @@ enum custom_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty - * ,-----------------------------------------------------------------------------------. - * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | S | D | F | G | H | J | K | L | ; | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | ` | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' + * ,-----------------------------------------. ,-----------------------------------------. + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Esc | A | S | D | F | G | | H | J | K | L | ; | " | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | | N | M | , | . | / |Enter | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ` | Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------' `-----------------------------------------' */ [_QWERTY] = KEYMAP( \ HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ @@ -55,15 +55,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), /* Colemak - * ,-----------------------------------------------------------------------------------. - * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | R | S | T | D | H | N | E | I | O | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | ` | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' + * ,-----------------------------------------. ,-----------------------------------------. + * | Tab | Q | W | F | P | G | | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Esc | A | R | S | T | D | | H | N | E | I | O | " | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | | K | M | , | . | / |Enter | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ` | Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------' `-----------------------------------------' */ [_COLEMAK] = KEYMAP( \ HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ @@ -73,15 +73,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), /* Dvorak - * ,-----------------------------------------------------------------------------------. - * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | O | E | U | I | D | H | T | N | S | - | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | ` | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' + * ,-----------------------------------------. ,-----------------------------------------. + * | Tab | " | , | . | P | Y | | F | G | C | R | L | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Esc | A | O | E | U | I | | D | H | T | N | S | - | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ` | Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------' `-----------------------------------------' */ [_DVORAK] = KEYMAP( \ HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ @@ -91,15 +91,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), /* Lower - * ,-----------------------------------------------------------------------------------. - * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | $ | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------------------------------------------------' + * ,-----------------------------------------. ,-----------------------------------------. + * | 0 | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | $ | F1 | F2 | F3 | F4 | F5 | | F6 | 4 | 5 | 6 | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | | F12 | 1 | 2 | 3 | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------' `-----------------------------------------' */ [_LOWER] = KEYMAP( \ ALL_T(KC_0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ @@ -109,15 +109,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), /* Raise - * ,-----------------------------------------------------------------------------------. - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | | | | | _ | ? | + | { | } | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | | - | / | = | [ | ] | \ | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | Home |PageDn|PageUp| End | - * `-----------------------------------------------------------------------------------' + * ,-----------------------------------------. ,-----------------------------------------. + * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | _ | ? | + | { | } | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | - | / | = | [ | ] | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | Home |PageDn|PageUp| End | + * `-----------------------------------------' `-----------------------------------------' */ [_RAISE] = KEYMAP( \ ALL_T(KC_TILD), KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ @@ -127,15 +127,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), /* Adjust (Lower + Raise) - * ,-----------------------------------------------------------------------------------. - * | | Reset| | | | | | | | | | Reset| - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' + * ,-----------------------------------------. ,-----------------------------------------. + * | | Reset| | | | | | | | | | | Reset| + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm| |AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * `-----------------------------------------' `-----------------------------------------' */ [_ADJUST] = KEYMAP( \ _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, \ diff --git a/keyboards/lets_split/keymaps/smt/readme.md b/keyboards/lets_split/keymaps/smt/readme.md new file mode 100644 index 000000000..20bc662f0 --- /dev/null +++ b/keyboards/lets_split/keymaps/smt/readme.md @@ -0,0 +1,88 @@ +# smt's Let's Split keymap + +This keymap is ported from my Planck keymap. + + +## Qwerty + +``` +,-----------------------------------------. ,-----------------------------------------. +| Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| Esc | A | S | D | F | G | | H | J | K | L | ; | " | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| Shift| Z | X | C | V | B | | N | M | , | . | / |Enter | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| ` | Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right | +`-----------------------------------------' `-----------------------------------------' +``` + +## Colemak + +``` +,-----------------------------------------. ,-----------------------------------------. +| Tab | Q | W | F | P | G | | J | L | U | Y | ; | Bksp | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| Esc | A | R | S | T | D | | H | N | E | I | O | " | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| Shift| Z | X | C | V | B | | K | M | , | . | / |Enter | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| ` | Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right | +`-----------------------------------------' `-----------------------------------------' +``` + +## Dvorak + +``` +,-----------------------------------------. ,-----------------------------------------. +| Tab | " | , | . | P | Y | | F | G | C | R | L | Bksp | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| Esc | A | O | E | U | I | | D | H | T | N | S | - | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| Shift| ; | Q | J | K | X | | B | M | W | V | Z |Enter | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| ` | Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right | +`-----------------------------------------' `-----------------------------------------' +``` + +## Lower + +``` +,-----------------------------------------. ,-----------------------------------------. +| 0 | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| $ | F1 | F2 | F3 | F4 | F5 | | F6 | 4 | 5 | 6 | | | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | F7 | F8 | F9 | F10 | F11 | | F12 | 1 | 2 | 3 | | | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | | | | | | | | | Next | Vol- | Vol+ | Play | +`-----------------------------------------' `-----------------------------------------' +``` + +## Raise + +``` +,-----------------------------------------. ,-----------------------------------------. +| ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Del | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | | | | | | | _ | ? | + | { | } | | | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | | | | | | | - | / | = | [ | ] | \ | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | | | | | | | | | Home |PageDn|PageUp| End | +`-----------------------------------------' `-----------------------------------------' +``` + +## Adjust (Lower + Raise) + +``` +,-----------------------------------------. ,-----------------------------------------. +| | Reset| | | | | | | | | | | Reset| +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | | |Aud on|Audoff|AGnorm| |AGswap|Qwerty|Colemk|Dvorak| | | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | | | | | | | | | | | | | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | | | | | | | | | | | | | +`-----------------------------------------' `-----------------------------------------' +``` diff --git a/keyboards/planck/keymaps/smt/keymap.c b/keyboards/planck/keymaps/smt/keymap.c index 2e1c35547..708f699da 100644 --- a/keyboards/planck/keymaps/smt/keymap.c +++ b/keyboards/planck/keymaps/smt/keymap.c @@ -97,9 +97,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | $ | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | Home |PageUp| + * | $ | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | End |PageDn| + * | | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' diff --git a/keyboards/planck/keymaps/smt/readme.md b/keyboards/planck/keymaps/smt/readme.md index 0e955a574..dc7c9cf9f 100644 --- a/keyboards/planck/keymaps/smt/readme.md +++ b/keyboards/planck/keymaps/smt/readme.md @@ -4,49 +4,70 @@ This keymap is primarily based on the default Planck keymap. Notable differences from the default are: -1. **Dvorak by default** +- **[Mod-Tap](https://github.com/jackhumbert/qmk_firmware/wiki#fun-with-modifier-keys) keys** - I happen to type in Dvorak, and prefer that layer to be the default on my keyboard. This is easy enough to switch around with Qwerty, Colemak, or whatever. + - `Esc/Ctrl` -2. **Right Shift** + I am experimenting with using Left Shift as a mod-tap key for Escape, similar to how I use the Enter key. It's set up like this on my Minivan, so in the interest of consistency... - I use both the left and right shift keys when I type. When I want to modify a key with shift, I hold shift with the hand opposite the one typing the key. In the default keymap, Enter is where shift would be on a standard keyboard layout. Oh, muscle memory. + - `Enter/Shift` - Thankfully, QMK supports [mod-tap](https://github.com/jackhumbert/qmk_firmware/wiki#fun-with-modifier-keys) keys, and this allows me to set the Enter key to send a modifier (MOD_LSFT) when held, and KC_ENT when tapped. Awesome! + I use both the left and right shift keys when I type. When I want to modify a key with shift, I hold shift with the hand opposite the one typing the key. In the default keymap, Enter is where shift would be on a standard keyboard layout. Oh, muscle memory. -3. Escape + - `Tab/Hyper` (Super+Ctrl+Shift+Alt) - I am experimenting with using Left Shift as a mod-tap key for Escape, similar to how I use the Enter key. It's set up like this on my Minivan, so in the interest of consistency... + It's great to be able to use Tab as a custom modifier key. I tend to use [Hyper](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/) commands for various OS-specific operations depending on what machine I'm working on. -4. Backtick + - `Backtick/Meh` (Ctrl+Shift+Alt) - I don't currently have LEDs on any of my keyboards, and even if I did, I don't think I would want their controls on a base layer. + Why use backtick in the lower left corner? I use it as my tmux prefix key, so I need to type it more frequently than most people. Putting it on the base layer works well for me. The "Meh" mapping is just a less-cool "Hyper"; the same, just without Super. - So, why use backtick in the lower left corner? I use it as my tmux prefix key, so I need to type it more frequently than most people. Putting it on the base layer works well for me. +- **Swapped responsibilities of "lower" and "raise" layers** -## Dvorak (default) + I prefer to use symbols via the "raise" layer, and numbers via the "lower" layer. + +- **Removed Plover layer** + + I don't intend to use stenography anytime soon, so Plover just didn't have a place in my keymap. + + +## Qwerty ``` ,-----------------------------------------------------------------------------------. -| Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | +| Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | |------+------+------+------+------+-------------+------+------+------+------+------| -| Esc | A | O | E | U | I | D | H | T | N | S | - | +| Esc | A | S | D | F | G | H | J | K | L | ; | " | |------+------+------+------+------+------|------+------+------+------+------+------| -| Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | +| Shift| Z | X | C | V | B | N | M | , | . | / |Enter | |------+------+------+------+------+------+------+------+------+------+------+------| -| ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | +| ` | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | `-----------------------------------------------------------------------------------' ``` -## Qwerty (same as default) +## Colemak ``` ,-----------------------------------------------------------------------------------. -| Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | +| Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | |------+------+------+------+------+-------------+------+------+------+------+------| -| Esc | A | S | D | F | G | H | J | K | L | ; | " | +| Esc | A | R | S | T | D | H | N | E | I | O | " | |------+------+------+------+------+------|------+------+------+------+------+------| -| Shift| Z | X | C | V | B | N | M | , | . | / |Enter | +| Shift| Z | X | C | V | B | K | M | , | . | / |Enter | +|------+------+------+------+------+------+------+------+------+------+------+------| +| ` | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | +`-----------------------------------------------------------------------------------' +``` + +## Dvorak + +``` +,-----------------------------------------------------------------------------------. +| Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | +|------+------+------+------+------+-------------+------+------+------+------+------| +| Esc | A | O | E | U | I | D | H | T | N | S | - | +|------+------+------+------+------+------|------+------+------+------+------+------| +| Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | |------+------+------+------+------+------+------+------+------+------+------+------| | ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | `-----------------------------------------------------------------------------------' @@ -54,15 +75,15 @@ Notable differences from the default are: ## Lower -This is where I put the number row, a numpad cluster, function keys, and some light navigation via Home/End/PageUp/PageDn. Like the "Raise" layer, the top row is redundant to help with Planck compatibility. +This is where I put the number row, a numpad cluster, function keys, and media controls. ``` ,-----------------------------------------------------------------------------------. -| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | +| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | |------+------+------+------+------+-------------+------+------+------+------+------| -| | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | Home |PageUp| +| $ | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | | | |------+------+------+------+------+------|------+------+------+------+------+------| -| | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | End |PageDn| +| | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | | | |------+------+------+------+------+------+------+------+------+------+------+------| | | | | | | | | Next | Vol- | Vol+ | Play | `-----------------------------------------------------------------------------------' @@ -70,7 +91,7 @@ This is where I put the number row, a numpad cluster, function keys, and some li ## Raise -As a developer, it makes the most sense for me to group all the commonly-used symbols that don't fit on the main layer. In particular, having the dual-column of parens-braces-brackets really helps a lot. +As a developer, it makes the most sense for me to group all the commonly-used symbols that don't fit on the main layer. In particular, having the dual-column of parens-braces-brackets really helps a lot. I've also added cursorkeys to correspond to the arrows. I haven't completely filled this layer, which leaves room for future mappings and macros. @@ -82,21 +103,21 @@ I haven't completely filled this layer, which leaves room for future mappings an |------+------+------+------+------+------|------+------+------+------+------+------| | | | | | | | - | / | = | [ | ] | \ | |------+------+------+------+------+------+------+------+------+------+------+------| -| | | | | | | | Next | Vol- | Vol+ | Play | +| | | | | | | | | Home |PageDn|PageUp| End | `-----------------------------------------------------------------------------------' ``` ## Adjust (Lower + Raise) -Utility layer. This is where I'd switch to Qwerty, or ~~fool around with~~ adjust the audio/music settings. +Utility layer. This is where I'd switch between Qwerty and Dvorak, ~~fool around with~~ adjust the audio/music settings, or put the Planck into bootloader mode. ``` ,-----------------------------------------------------------------------------------. -| | Reset| | | | | | | | | | Del | +| | Reset| | | | | | | | | | Reset| |------+------+------+------+------+-------------+------+------+------+------+------| -| | | |Aud on|AudOff|AGnorm|AGswap|Dvorak|Qwerty| | | | +| | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | |------+------+------+------+------+------|------+------+------+------+------+------| -| |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | +| |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | |------+------+------+------+------+------+------+------+------+------+------+------| | | | | | | | | | | | | `-----------------------------------------------------------------------------------' diff --git a/keyboards/preonic/keymaps/smt/keymap.c b/keyboards/preonic/keymaps/smt/keymap.c index 690feca47..a10deb750 100644 --- a/keyboards/preonic/keymaps/smt/keymap.c +++ b/keyboards/preonic/keymaps/smt/keymap.c @@ -106,9 +106,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+------+------+------+------+------| * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | $ | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | Home |PageUp| + * | $ | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | End |PageDn| + * | | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' diff --git a/keyboards/preonic/keymaps/smt/readme.md b/keyboards/preonic/keymaps/smt/readme.md index 016da7b01..2ec2603f3 100644 --- a/keyboards/preonic/keymaps/smt/readme.md +++ b/keyboards/preonic/keymaps/smt/readme.md @@ -4,53 +4,76 @@ This keymap is primarily based on the default Preonic keymap, which in turn is d Notable differences from the default are: -1. **Dvorak by default** +- **[Mod-Tap](https://github.com/jackhumbert/qmk_firmware/wiki#fun-with-modifier-keys) keys** - I happen to type in Dvorak, and prefer that layer to be the default on my keyboard. This is easy enough to switch around with Qwerty, Colemak, or whatever. + - `Esc/Ctrl` -2. **Right Shift** + I am experimenting with using Left Shift as a mod-tap key for Escape, similar to how I use the Enter key. It's set up like this on my Minivan, so in the interest of consistency... - I use both the left and right shift keys when I type. When I want to modify a key with shift, I hold shift with the hand opposite the one typing the key. In the default keymap, Enter is where shift would be on a standard keyboard layout. Oh, muscle memory. + - `Enter/Shift` - Thankfully, QMK supports [mod-tap](https://github.com/jackhumbert/qmk_firmware/wiki#fun-with-modifier-keys) keys, and this allows me to set the Enter key to send a modifier (MOD_LSFT) when held, and KC_ENT when tapped. Awesome! + I use both the left and right shift keys when I type. When I want to modify a key with shift, I hold shift with the hand opposite the one typing the key. In the default keymap, Enter is where shift would be on a standard keyboard layout. Oh, muscle memory. -3. Escape + - `Tab/Hyper` (Super+Ctrl+Shift+Alt) - I am experimenting with using Left Shift as a mod-tap key for Escape, similar to how I use the Enter key. It's set up like this on my Minivan, so in the interest of consistency... + It's great to be able to use Tab as a custom modifier key. I tend to use [Hyper](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/) commands for various OS-specific operations depending on what machine I'm working on. -4. Backtick + - `Backtick/Meh` (Ctrl+Shift+Alt) - I don't currently have LEDs on any of my keyboards, and even if I did, I don't think I would want their controls on a base layer. + Why use backtick in the lower left corner? I use it as my tmux prefix key, so I need to type it more frequently than most people. Putting it on the base layer works well for me. The "Meh" mapping is just a less-cool "Hyper"; the same, just without Super. - So, why use backtick in the lower left corner? I use it as my tmux prefix key, so I need to type it more frequently than most people. Putting it on the base layer works well for me. +- **Swapped responsibilities of "lower" and "raise" layers** -## Dvorak (default) + I prefer to use symbols via the "raise" layer, and numbers via the "lower" layer. + +- **Removed Plover layer** + + I don't intend to use stenography anytime soon, so Plover just didn't have a place in my keymap. + + +## Qwerty ``` ,-----------------------------------------------------------------------------------. | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | |------+------+------+------+------+------+------+------+------+------+------+------| -| Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | +| Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | |------+------+------+------+------+-------------+------+------+------+------+------| -| Esc | A | O | E | U | I | D | H | T | N | S | - | +| Esc | A | S | D | F | G | H | J | K | L | ; | " | |------+------+------+------+------+------|------+------+------+------+------+------| -| Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | +| Shift| Z | X | C | V | B | N | M | , | . | / |Enter | |------+------+------+------+------+------+------+------+------+------+------+------| | ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | `-----------------------------------------------------------------------------------' ``` -## Qwerty (same as default) +## Colemak ``` ,-----------------------------------------------------------------------------------. | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | |------+------+------+------+------+------+------+------+------+------+------+------| -| Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | +| Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | |------+------+------+------+------+-------------+------+------+------+------+------| -| Esc | A | S | D | F | G | H | J | K | L | ; | " | +| Esc | A | R | S | T | D | H | N | E | I | O | " | |------+------+------+------+------+------|------+------+------+------+------+------| -| Shift| Z | X | C | V | B | N | M | , | . | / |Enter | +| Shift| Z | X | C | V | B | K | M | , | . | / |Enter | +|------+------+------+------+------+------+------+------+------+------+------+------| +| ` | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | +`-----------------------------------------------------------------------------------' +``` + +## Dvorak + +``` +,-----------------------------------------------------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | +|------+------+------+------+------+-------------+------+------+------+------+------| +| Esc | A | O | E | U | I | D | H | T | N | S | - | +|------+------+------+------+------+------|------+------+------+------+------+------| +| Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | |------+------+------+------+------+------+------+------+------+------+------+------| | ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | `-----------------------------------------------------------------------------------' @@ -58,17 +81,17 @@ Notable differences from the default are: ## Lower -This is where I put the number row, a numpad cluster, function keys, and some light navigation via Home/End/PageUp/PageDn. Like the "Raise" layer, the top row is redundant to help with Planck compatibility. +This is where I put the number row, a numpad cluster, function keys, and media controls. Like the "Raise" layer, the top row is redundant to help with Planck compatibility. ``` ,-----------------------------------------------------------------------------------. | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | |------+------+------+------+------+------+------+------+------+------+------+------| -| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | +| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | |------+------+------+------+------+-------------+------+------+------+------+------| -| | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | Home |PageUp| +| $ | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | | | |------+------+------+------+------+------|------+------+------+------+------+------| -| | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | End |PageDn| +| | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | | | |------+------+------+------+------+------+------+------+------+------+------+------| | | | | | | | | Next | Vol- | Vol+ | Play | `-----------------------------------------------------------------------------------' @@ -76,7 +99,7 @@ This is where I put the number row, a numpad cluster, function keys, and some li ## Raise -As a developer, it makes the most sense for me to group all the commonly-used symbols that don't fit on the main layer. In particular, having the dual-column of parens-braces-brackets really helps a lot. +As a developer, it makes the most sense for me to group all the commonly-used symbols that don't fit on the main layer. In particular, having the dual-column of parens-braces-brackets really helps a lot. I've also added cursorkeys to correspond to the arrows. I haven't completely filled this layer, which leaves room for future mappings and macros. @@ -90,21 +113,21 @@ I haven't completely filled this layer, which leaves room for future mappings an |------+------+------+------+------+------|------+------+------+------+------+------| | | | | | | | - | / | = | [ | ] | \ | |------+------+------+------+------+------+------+------+------+------+------+------| -| | | | | | | | Next | Vol- | Vol+ | Play | +| | | | | | | | | Home |PageDn|PageUp| End | `-----------------------------------------------------------------------------------' ``` ## Adjust (Lower + Raise) -Utility layer. This is where I'd switch to Qwerty, or ~~fool around with~~ adjust the audio/music settings. +Utility layer. This is where I'd switch between Qwerty and Dvorak, ~~fool around with~~ adjust the audio/music settings, or put the Preonic into bootloader mode. ``` ,-----------------------------------------------------------------------------------. | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | |------+------+------+------+------+------+------+------+------+------+------+------| -| | Reset| | | | | | | | | | Del | +| | Reset| | | | | | | | | | Reset| |------+------+------+------+------+-------------+------+------+------+------+------| -| | | |Aud on|AudOff|AGnorm|AGswap|Dvorak|Qwerty| | | | +| | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | |------+------+------+------+------+------|------+------+------+------+------+------| | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | |------+------+------+------+------+------+------+------+------+------+------+------| -- cgit v1.2.3 From 06e4b3fe1abbc938678a3e3abcddf5658ca5dca2 Mon Sep 17 00:00:00 2001 From: Kevin Hogeland Date: Thu, 9 Mar 2017 02:40:01 -0800 Subject: Colemak layout for Clueboard --- keyboards/clueboard/keymaps/colemak/keymap.c | 83 ++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 keyboards/clueboard/keymaps/colemak/keymap.c diff --git a/keyboards/clueboard/keymaps/colemak/keymap.c b/keyboards/clueboard/keymaps/colemak/keymap.c new file mode 100644 index 000000000..6b1fc7c9c --- /dev/null +++ b/keyboards/clueboard/keymaps/colemak/keymap.c @@ -0,0 +1,83 @@ +#include "clueboard.h" + +// Helpful defines +#define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) +#define _______ KC_TRNS + +// 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 _BL 0 +#define _FL 1 +#define _CL 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: Base Layer (Default Layer) + */ +[_BL] = KEYMAP( + F(0), 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_GRV, KC_BSPC, KC_PGUP, \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ + KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_NUHS, KC_ENT, \ + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ + KC_LCTL, MO(_FL), KC_LGUI,KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RALT, KC_RCTL, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _FL: Function Layer + */ +[_FL] = 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_CAPS, BL_STEP, \ + _______, _______, _______,_______,_______,_______,_______,KC_HOME,KC_PGDN,KC_PGUP, KC_END, _______, _______, _______, _______, \ + KC_DEL, _______, MO(_CL),_______,_______,_______,_______,KC_LEFT,KC_DOWN,KC_UP, KC_RGHT, _______, _______, _______, \ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ + _______, _______, _______,_______, _______,_______, _______, _______, _______, MO(_FL), KC_HOME, KC_PGDN, KC_END), + + /* Keymap _CL: Control layer + */ +[_CL] = KEYMAP( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ + _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), +}; + +/* This is a list of user defined functions. F(N) corresponds to item N + of this list. + */ +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_FUNCTION(0), // Calls action_function() +}; + +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { + static uint8_t mods_pressed; + + switch (id) { + case 0: + /* Handle the combined Grave/Esc key + */ + mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed + + if (record->event.pressed) { + /* The key is being pressed. + */ + if (mods_pressed) { + add_key(KC_GRV); + send_keyboard_report(); + } else { + add_key(KC_ESC); + send_keyboard_report(); + } + } else { + /* The key is being released. + */ + if (mods_pressed) { + del_key(KC_GRV); + send_keyboard_report(); + } else { + del_key(KC_ESC); + send_keyboard_report(); + } + } + break; + } +} -- cgit v1.2.3 From 718b9648061be99a82e6dddfdebd3eb2e5386f19 Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Tue, 7 Mar 2017 13:30:32 -0500 Subject: =?UTF-8?q?Add=20hexwire=20layout=20for=20Let=E2=80=99s=20Split?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- keyboards/lets_split/keymaps/hexwire/config.h | 29 ++++ keyboards/lets_split/keymaps/hexwire/keymap.c | 230 ++++++++++++++++++++++++++ 2 files changed, 259 insertions(+) create mode 100644 keyboards/lets_split/keymaps/hexwire/config.h create mode 100644 keyboards/lets_split/keymaps/hexwire/keymap.c diff --git a/keyboards/lets_split/keymaps/hexwire/config.h b/keyboards/lets_split/keymaps/hexwire/config.h new file mode 100644 index 000000000..cd766cc4f --- /dev/null +++ b/keyboards/lets_split/keymaps/hexwire/config.h @@ -0,0 +1,29 @@ +/* +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 . +*/ + + +#define USE_SERIAL + +#define EE_HANDS + + +#ifdef SUBPROJECT_rev1 + #include "../../rev1/config.h" +#endif +#ifdef SUBPROJECT_rev2 + #include "../../rev2/config.h" +#endif \ No newline at end of file diff --git a/keyboards/lets_split/keymaps/hexwire/keymap.c b/keyboards/lets_split/keymaps/hexwire/keymap.c new file mode 100644 index 000000000..403987dbe --- /dev/null +++ b/keyboards/lets_split/keymaps/hexwire/keymap.c @@ -0,0 +1,230 @@ +#include "lets_split.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 _FN3 5 +#define _FN4 6 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + FN3, + FN4, + ADJUST, +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +#define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen +#define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen +#define KC_CAPP LGUI(LSFT(KC_4)) // Capture portion of screen +#define KC_CPYP LGUI(LSFT(LCTL(KC_4))) // Copy portion of screen + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | - | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | Ctrl | Alt | GUI |Lower |Space | Bksp |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = KEYMAP( \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, \ + MT(MOD_LCTL,KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_LSFT,KC_ENT) , \ + LT(_FN3,KC_GRV), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_BSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | - | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | Ctrl | Alt | GUI |Lower |Space | Bksp |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = KEYMAP( \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_MINS, \ + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ + KC_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_BSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | " | , | . | P | Y | F | G | C | R | L | - | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | Ctrl | Alt | GUI |Lower |Space | Bksp |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = KEYMAP( \ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_MINS, \ + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \ + KC_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_BSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = KEYMAP( \ + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ + KC_DEL, KC_CAPP, KC_LEFT, KC_RGHT, KC_UP, KC_LBRC, KC_RBRC, KC_P4, KC_P5, KC_P6, KC_PLUS, KC_PIPE, \ + _______, KC_CPYP, _______, _______, KC_DOWN, KC_LCBR, KC_RCBR, KC_P1, KC_P2, KC_P3, KC_MINS, _______, \ + _______, _______, _______, _______, _______, _______, KC_DEL, KC_P0, KC_PDOT, _______, _______, _______ \ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = KEYMAP( \ + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \ + KC_DEL, KC_MPRV, KC_MNXT, KC_VOLU, KC_PGUP, KC_UNDS, KC_EQL , KC_HOME, _______, _______, _______, KC_BSLS, \ + _______, KC_MSTP, KC_MPLY, KC_VOLD, KC_PGDN, KC_MINS, KC_PLUS, KC_END, _______, _______, _______, _______, \ + _______, _______, _______, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______ \ +), + +[_FN3] = KEYMAP( \ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_UP, KC_F9, KC_F10, KC_F11, \ + _______, _______, _______, _______, _______, KC_F8, KC_F12, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = KEYMAP( \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + + +}; + +#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 persistant_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 + persistant_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_colemak, false, 0); + #endif + persistant_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + #endif + persistant_default_layer_set(1UL<<_DVORAK); + } + 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; +} \ No newline at end of file -- cgit v1.2.3 From 74c6c3d277bc76c319b5d28d578fbda9009efcbf Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Tue, 7 Mar 2017 15:39:59 -0500 Subject: Convert keymap to compact version --- .../lets_split/keymaps/hexwire/compact_keymap.h | 23 +++ keyboards/lets_split/keymaps/hexwire/keymap.c | 193 +++++++++------------ 2 files changed, 107 insertions(+), 109 deletions(-) create mode 100644 keyboards/lets_split/keymaps/hexwire/compact_keymap.h diff --git a/keyboards/lets_split/keymaps/hexwire/compact_keymap.h b/keyboards/lets_split/keymaps/hexwire/compact_keymap.h new file mode 100644 index 000000000..d9d063fbf --- /dev/null +++ b/keyboards/lets_split/keymaps/hexwire/compact_keymap.h @@ -0,0 +1,23 @@ +#ifndef COMPACT_KEYMAP_H +#define COMPACT_KEYMAP_H + +#define COMPACT_KEYMAP( \ + k00, k01, k02, k03, k04, k05, k45, k44, k43, k42, k41, k40, \ + k10, k11, k12, k13, k14, k15, k55, k54, k53, k52, k51, k50, \ + k20, k21, k22, k23, k24, k25, k65, k64, k63, k62, k61, k60, \ + k30, k31, k32, k33, k34, k35, k75, k74, k73, k72, k71, k70 \ + ) \ + { \ + { KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05 }, \ + { KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15 }, \ + { KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25 }, \ + { KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35 }, \ + { KC_##k40, KC_##k41, KC_##k42, KC_##k43, KC_##k44, KC_##k45 }, \ + { KC_##k50, KC_##k51, KC_##k52, KC_##k53, KC_##k54, KC_##k55 }, \ + { KC_##k60, KC_##k61, KC_##k62, KC_##k63, KC_##k64, KC_##k65 }, \ + { KC_##k70, KC_##k71, KC_##k72, KC_##k73, KC_##k74, KC_##k75 } \ + } + +#define KC_ KC_TRNS + +#endif \ No newline at end of file diff --git a/keyboards/lets_split/keymaps/hexwire/keymap.c b/keyboards/lets_split/keymaps/hexwire/keymap.c index 403987dbe..bae2e687e 100644 --- a/keyboards/lets_split/keymaps/hexwire/keymap.c +++ b/keyboards/lets_split/keymaps/hexwire/keymap.c @@ -1,13 +1,10 @@ #include "lets_split.h" #include "action_layer.h" #include "eeconfig.h" +#include "compact_keymap.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 @@ -28,113 +25,91 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear #define _______ KC_TRNS -#define XXXXXXX KC_NO #define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen #define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen #define KC_CAPP LGUI(LSFT(KC_4)) // Capture portion of screen #define KC_CPYP LGUI(LSFT(LCTL(KC_4))) // Copy portion of screen +#define KC_X0 MT(MOD_LCTL, KC_ESC) +#define KC_X1 LOWER +#define KC_X2 RAISE +#define KC_X3 LT(_FN3, KC_GRV) +#define KC_X4 MT(MOD_LSFT, KC_ENT) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Qwerty - * ,-----------------------------------------------------------------------------------. - * | Tab | Q | W | E | R | T | Y | U | I | O | P | - | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | S | D | F | G | H | J | K | L | ; | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | ` | Ctrl | Alt | GUI |Lower |Space | Bksp |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_QWERTY] = KEYMAP( \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, \ - MT(MOD_LCTL,KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_LSFT,KC_ENT) , \ - LT(_FN3,KC_GRV), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_BSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ -), - -/* Colemak - * ,-----------------------------------------------------------------------------------. - * | Tab | Q | W | F | P | G | J | L | U | Y | ; | - | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | R | S | T | D | H | N | E | I | O | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | ` | Ctrl | Alt | GUI |Lower |Space | Bksp |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_COLEMAK] = KEYMAP( \ - KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_MINS, \ - KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ - KC_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_BSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ -), - -/* Dvorak - * ,-----------------------------------------------------------------------------------. - * | Tab | " | , | . | P | Y | F | G | C | R | L | - | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | O | E | U | I | D | H | T | N | S | / | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | ` | Ctrl | Alt | GUI |Lower |Space | Bksp |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_DVORAK] = KEYMAP( \ - KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_MINS, \ - KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ - KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \ - KC_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_BSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ -), - -/* Lower - * ,-----------------------------------------------------------------------------------. - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------------------------------------------------' - */ -[_LOWER] = KEYMAP( \ - _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ - KC_DEL, KC_CAPP, KC_LEFT, KC_RGHT, KC_UP, KC_LBRC, KC_RBRC, KC_P4, KC_P5, KC_P6, KC_PLUS, KC_PIPE, \ - _______, KC_CPYP, _______, _______, KC_DOWN, KC_LCBR, KC_RCBR, KC_P1, KC_P2, KC_P3, KC_MINS, _______, \ - _______, _______, _______, _______, _______, _______, KC_DEL, KC_P0, KC_PDOT, _______, _______, _______ \ -), - -/* Raise - * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------------------------------------------------' - */ -[_RAISE] = KEYMAP( \ - _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \ - KC_DEL, KC_MPRV, KC_MNXT, KC_VOLU, KC_PGUP, KC_UNDS, KC_EQL , KC_HOME, _______, _______, _______, KC_BSLS, \ - _______, KC_MSTP, KC_MPLY, KC_VOLD, KC_PGDN, KC_MINS, KC_PLUS, KC_END, _______, _______, _______, _______, \ - _______, _______, _______, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______ \ -), - -[_FN3] = KEYMAP( \ - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_UP, KC_F9, KC_F10, KC_F11, \ - _______, _______, _______, _______, _______, KC_F8, KC_F12, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ -), + [_QWERTY] = COMPACT_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + TAB , Q , W , E , R , T , Y , U , I , O , P ,MINS, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + X0 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, X4 , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + X3 ,LCTL,LALT,LGUI, X1 ,SPC , BSPC, X2 ,LEFT,DOWN, UP ,RGHT + //`----+----+----+----+----+----' `----+----+----+----+----+----' + ), + + [_COLEMAK] = COMPACT_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + TAB , Q , W , F , P , G , J , L , U , Y ,SCLN,MINS, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + X0 , A , R , S , T , D , H , N , E , I , O ,QUOT, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + LSFT, Z , X , C , V , B , K , M ,COMM,DOT ,SLSH, X4 , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + X3 ,LCTL,LALT,LGUI, X1 ,SPC , BSPC, X2 ,LEFT,DOWN, UP ,RGHT + //`----+----+----+----+----+----' `----+----+----+----+----+----' + ), + + [_DVORAK] = COMPACT_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,MINS, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + X0 , A , O , E , U , I , D , H , R , N , S ,SLSH, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + LSFT,SCLN, Q , J , K , X , B , M , W , V , Z , X4 , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + X3 ,LCTL,LALT,LGUI, X1 ,SPC , BSPC, X2 ,LEFT,DOWN, UP ,RGHT + //`----+----+----+----+----+----' `----+----+----+----+----+----' + ), + + [_LOWER] = COMPACT_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + DEL ,CAPP,LEFT,RGHT, UP ,LBRC, RBRC, P4 , P5 , P6 ,PLUS,PIPE, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + ,CPYP, , ,DOWN,LCBR, RCBR, P1 , P2 , P3 ,MINS, , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , , , DEL , P0 ,PDOT, , , + //`----+----+----+----+----+----' `----+----+----+----+----+----' + ), + + [_RAISE] = COMPACT_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + DEL ,MPRV,MNXT,VOLU,PGUP,UNDS, EQL ,HOME, , , ,BSLS, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + ,MSTP,MPLY,VOLD,PGDN,MINS, PLUS,END , , , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , ,MUTE, , , , , , , + //`----+----+----+----+----+----' `----+----+----+----+----+----' + ), + + [_FN3] = COMPACT_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , , , , , , , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , , , , , , , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , , , , , , , , + //`----+----+----+----+----+----' `----+----+----+----+----+----' + ), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. @@ -147,12 +122,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = KEYMAP( \ - _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ - _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ -) + [_ADJUST] = KEYMAP( \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ) }; @@ -227,4 +202,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; } return true; -} \ No newline at end of file +} -- cgit v1.2.3 From 3df35f712eca0fddcd3aabf62de7f32d8a5cb11b Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Thu, 9 Mar 2017 09:52:33 -0500 Subject: Add readme for layout --- keyboards/lets_split/keymaps/hexwire/README.md | 108 +++++++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 keyboards/lets_split/keymaps/hexwire/README.md diff --git a/keyboards/lets_split/keymaps/hexwire/README.md b/keyboards/lets_split/keymaps/hexwire/README.md new file mode 100644 index 000000000..2dc044646 --- /dev/null +++ b/keyboards/lets_split/keymaps/hexwire/README.md @@ -0,0 +1,108 @@ +Hexwire's Let's Split Layout +============================ + +### Changes from default layout + +- Main layer + - The right space bar key has been changed to backspace, as I only hit space with my left thumb + - Backtick is at the lower right and also serves goes to the 3rd function layer when held + - Enter key acts as shift when held + - Escape key acts as control when held + - Minus key at upper right +- Lower layer + - Numbers are on the lower layer, to make it easier to use a numpad on the right hand + - Arrow keys + - Straight and curly brackets in the middle two columns + - Screenshot keys for MacOS +- Upper layer + - Symbols are on the upper layer + - Media keys + - Page Up/Down, Home/End +- 3rd function layer + - Function keys + +## Layouts + +### Qwerty + +``` +,----+----+----+----+----+----. ,----+----+----+----+----+----. + TAB , Q , W , E , R , T , Y , U , I , O , P ,MINS, +|----+----+----+----+----+----| |----+----+----+----+----+----| + X0 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT, +|----+----+----+----+----+----| |----+----+----+----+----+----| + LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, X4 , +|----+----+----+----+----+----| |----+----+----+----+----+----| + X3 ,LCTL,LALT,LGUI, X1 ,SPC , BSPC, X2 ,LEFT,DOWN, UP ,RGHT +`----+----+----+----+----+----' `----+----+----+----+----+----' +``` + +### Colemak + +``` +,----+----+----+----+----+----. ,----+----+----+----+----+----. + TAB , Q , W , F , P , G , J , L , U , Y ,SCLN,MINS, +|----+----+----+----+----+----| |----+----+----+----+----+----| + X0 , A , R , S , T , D , H , N , E , I , O ,QUOT, +|----+----+----+----+----+----| |----+----+----+----+----+----| + LSFT, Z , X , C , V , B , K , M ,COMM,DOT ,SLSH, X4 , +|----+----+----+----+----+----| |----+----+----+----+----+----| + X3 ,LCTL,LALT,LGUI, X1 ,SPC , BSPC, X2 ,LEFT,DOWN, UP ,RGHT +`----+----+----+----+----+----' `----+----+----+----+----+----' +``` + +### Dvorak + +``` +,----+----+----+----+----+----. ,----+----+----+----+----+----. + TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,MINS, +|----+----+----+----+----+----| |----+----+----+----+----+----| + X0 , A , O , E , U , I , D , H , R , N , S ,SLSH, +|----+----+----+----+----+----| |----+----+----+----+----+----| + LSFT,SCLN, Q , J , K , X , B , M , W , V , Z , X4 , +|----+----+----+----+----+----| |----+----+----+----+----+----| + X3 ,LCTL,LALT,LGUI, X1 ,SPC , BSPC, X2 ,LEFT,DOWN, UP ,RGHT +`----+----+----+----+----+----' `----+----+----+----+----+----' +``` + +### Lower + +``` +,----+----+----+----+----+----. ,----+----+----+----+----+----. + , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , , +|----+----+----+----+----+----| |----+----+----+----+----+----| + DEL ,CAPP,LEFT,RGHT, UP ,LBRC, RBRC, P4 , P5 , P6 ,PLUS,PIPE, +|----+----+----+----+----+----| |----+----+----+----+----+----| + ,CPYP, , ,DOWN,LCBR, RCBR, P1 , P2 , P3 ,MINS, , +|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , , , DEL , P0 ,PDOT, , , +`----+----+----+----+----+----' `----+----+----+----+----+----' +``` + +### Raise + +``` +,----+----+----+----+----+----. ,----+----+----+----+----+----. + ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, , +|----+----+----+----+----+----| |----+----+----+----+----+----| + DEL ,MPRV,MNXT,VOLU,PGUP,UNDS, EQL ,HOME, , , ,BSLS, +|----+----+----+----+----+----| |----+----+----+----+----+----| + ,MSTP,MPLY,VOLD,PGDN,MINS, PLUS,END , , , , , +|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , ,MUTE, , , , , , , +`----+----+----+----+----+----' `----+----+----+----+----+----' +``` + +### 3rd function layer + +``` +,----+----+----+----+----+----. ,----+----+----+----+----+----. + F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 , +|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , , , , , , , , , +|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , , , , , , , , , +|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , , , , , , , , +`----+----+----+----+----+----' `----+----+----+----+----+----' +``` -- cgit v1.2.3 From a8f872e728cde990f7b272306480eedc96a7f3f7 Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Thu, 9 Mar 2017 09:21:25 -0500 Subject: Initial commit for handwired numpad --- keyboards/handwired/numpad20/Makefile | 3 + keyboards/handwired/numpad20/config.h | 162 +++++++++++++++++++++ .../handwired/numpad20/keymaps/default/keymap.c | 16 ++ keyboards/handwired/numpad20/numpad20.c | 8 + keyboards/handwired/numpad20/numpad20.h | 20 +++ keyboards/handwired/numpad20/rules.mk | 83 +++++++++++ 6 files changed, 292 insertions(+) create mode 100644 keyboards/handwired/numpad20/Makefile create mode 100644 keyboards/handwired/numpad20/config.h create mode 100644 keyboards/handwired/numpad20/keymaps/default/keymap.c create mode 100644 keyboards/handwired/numpad20/numpad20.c create mode 100644 keyboards/handwired/numpad20/numpad20.h create mode 100644 keyboards/handwired/numpad20/rules.mk diff --git a/keyboards/handwired/numpad20/Makefile b/keyboards/handwired/numpad20/Makefile new file mode 100644 index 000000000..191c6bb66 --- /dev/null +++ b/keyboards/handwired/numpad20/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/handwired/numpad20/config.h b/keyboards/handwired/numpad20/config.h new file mode 100644 index 000000000..847f2111f --- /dev/null +++ b/keyboards/handwired/numpad20/config.h @@ -0,0 +1,162 @@ +/* +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 0xBB80 +#define PRODUCT_ID 0x0504 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Hexwire +#define PRODUCT Numpad 20 +#define DESCRIPTION Handwired 4x5 numpad + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 4 + +/* + * 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 { F6, B1, B3, B6, B5 } +#define MATRIX_COL_PINS { D1, D0, F5, F4 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/handwired/numpad20/keymaps/default/keymap.c b/keyboards/handwired/numpad20/keymaps/default/keymap.c new file mode 100644 index 000000000..37031206a --- /dev/null +++ b/keyboards/handwired/numpad20/keymaps/default/keymap.c @@ -0,0 +1,16 @@ +#include "numpad20.h" + +#define KC_ KC_TRNS + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = COMPACT_KEYMAP( + LEFT,RGHT, UP ,DOWN, \ + P7 , P8 , P9 ,PLUS, \ + P4 , P5 , P6 ,MINS, \ + P1 , P2 , P3 , ENT, \ + P0 ,DOT ,RGHT, TAB \ + ) +}; + +const uint16_t PROGMEM fn_actions[] = { +}; diff --git a/keyboards/handwired/numpad20/numpad20.c b/keyboards/handwired/numpad20/numpad20.c new file mode 100644 index 000000000..101cf2cb4 --- /dev/null +++ b/keyboards/handwired/numpad20/numpad20.c @@ -0,0 +1,8 @@ +#include "numpad20.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} diff --git a/keyboards/handwired/numpad20/numpad20.h b/keyboards/handwired/numpad20/numpad20.h new file mode 100644 index 000000000..191979be0 --- /dev/null +++ b/keyboards/handwired/numpad20/numpad20.h @@ -0,0 +1,20 @@ +#ifndef NUMPAD20_H +#define NUMPAD20_H + +#include "quantum.h" + +#define COMPACT_KEYMAP( \ + K00, K01, K02, K03, \ + K10, K11, K12, K13, \ + K20, K21, K22, K23, \ + K30, K31, K32, K33, \ + K40, K41, K42, K43 \ + ) { \ + { KC_##K00, KC_##K01, KC_##K02, KC_##K03 }, \ + { KC_##K10, KC_##K11, KC_##K12, KC_##K13 }, \ + { KC_##K20, KC_##K21, KC_##K22, KC_##K23 }, \ + { KC_##K30, KC_##K31, KC_##K32, KC_##K33 }, \ + { KC_##K40, KC_##K41, KC_##K42, KC_##K43 } \ +} + +#endif \ No newline at end of file diff --git a/keyboards/handwired/numpad20/rules.mk b/keyboards/handwired/numpad20/rules.mk new file mode 100644 index 000000000..e897ef252 --- /dev/null +++ b/keyboards/handwired/numpad20/rules.mk @@ -0,0 +1,83 @@ + +# MCU name +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=512 + + +# 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 ?= yes # Console for debug(+400) +COMMAND_ENABLE ?= yes # 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 ?= no # USB Nkey Rollover +BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default +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 + +ifndef QUANTUM_DIR + include ../../../Makefile +endif + +avrdude: build + ls /dev/tty* > /tmp/1; \ + echo "Reset your Pro Micro now"; \ + while [[ -z $$USB ]]; do \ + sleep 1; \ + ls /dev/tty* > /tmp/2; \ + USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \ + done; \ + avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex + +.PHONY: avrdude -- cgit v1.2.3 From 20a48e0198b02a246dce2b729c14809ccaa471c6 Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Thu, 9 Mar 2017 12:02:05 -0500 Subject: Add handwired 5x13 ortholinear keyboard --- keyboards/handwired/ortho5x13/Makefile | 3 + keyboards/handwired/ortho5x13/config.h | 162 ++++++++++++ .../handwired/ortho5x13/keymaps/default/keymap.c | 289 +++++++++++++++++++++ keyboards/handwired/ortho5x13/ortho5x13.c | 8 + keyboards/handwired/ortho5x13/ortho5x13.h | 36 +++ keyboards/handwired/ortho5x13/rules.mk | 83 ++++++ 6 files changed, 581 insertions(+) create mode 100644 keyboards/handwired/ortho5x13/Makefile create mode 100644 keyboards/handwired/ortho5x13/config.h create mode 100644 keyboards/handwired/ortho5x13/keymaps/default/keymap.c create mode 100644 keyboards/handwired/ortho5x13/ortho5x13.c create mode 100644 keyboards/handwired/ortho5x13/ortho5x13.h create mode 100644 keyboards/handwired/ortho5x13/rules.mk diff --git a/keyboards/handwired/ortho5x13/Makefile b/keyboards/handwired/ortho5x13/Makefile new file mode 100644 index 000000000..191c6bb66 --- /dev/null +++ b/keyboards/handwired/ortho5x13/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/handwired/ortho5x13/config.h b/keyboards/handwired/ortho5x13/config.h new file mode 100644 index 000000000..f85159596 --- /dev/null +++ b/keyboards/handwired/ortho5x13/config.h @@ -0,0 +1,162 @@ +/* +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 0xBB80 +#define PRODUCT_ID 0x050D +#define DEVICE_VER 0x0001 +#define MANUFACTURER Hexwire +#define PRODUCT Ortho 5x13 +#define DESCRIPTION Handwired 5x13 ortholinear keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 13 + +/* + * 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 { D3, D2, D1, D0, D4 } +#define MATRIX_COL_PINS { C6, D7, E6, B4, B5, B6, B2, B3, B1, F7, F6, F5, F4 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/handwired/ortho5x13/keymaps/default/keymap.c b/keyboards/handwired/ortho5x13/keymaps/default/keymap.c new file mode 100644 index 000000000..c1262a83d --- /dev/null +++ b/keyboards/handwired/ortho5x13/keymaps/default/keymap.c @@ -0,0 +1,289 @@ +#include "ortho5x13.h" +#include "action_layer.h" +#include "eeconfig.h" +#ifdef AUDIO_ENABLE + #include "audio.h" +#endif + +// 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 _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + BACKLIT +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +#define KC_L1 LOWER +#define KC_L2 RAISE + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,------------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | + * |------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | + * |------+------+------+------+------+-------------+------+------+------+------+------+------| + * | ` | A | S | D | F | G | H | J | K | L | ; | ' | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | Up | + * |------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Hyper| Ctrl | Alt | GUI |Lower | Space |Raise | Bksp |Shift | Left | Down |Right | + * `------------------------------------------------------------------------------------------' + */ +[_QWERTY] = COMPACT_KEYMAP( + //,----+----+----+----+----+----+----+----+----+----+----+----+----. + ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,EQL , + //|----+----+----+----+----+----+----+----+----+----+----+----+----| + TAB , Q , W , E , R , T , Y , U , I , O , P ,LBRC,RBRC, + //|----+----+----+----+----+----+----+----+----+----+----+----+----| + GRV , A , S , D , F , G , H , J , K , L ,SCLN,QUOT,BSLS, + //|----+----+----+----+----+----+----+----+----+----+----+----+----| + LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH,ENT , UP , + //|----+----+----+----+----+---------+----+----+----+----+----+----| + HYPR,LCTL,LALT,LGUI, L1 , SPACE , L2 ,BSPC,RSFT,LEFT,RGHT,DOWN + //`----+----+----+----+----+---------+----+----+----+----+----+----' + ), + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = { + {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_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL}, + {KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT }, + {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | " | , | . | P | Y | F | G | C | R | L | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = { + {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_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL}, + {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH}, + {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT }, + {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = { + {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC}, + {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, + {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} +}, + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = { + {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_F3, KC_F4, 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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} +}, + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Audoff|Aud on|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Musoff|Mus on| | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = { + {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, COLEMAK, DVORAK, _______, _______}, + {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +} + + +}; + +#ifdef AUDIO_ENABLE +float tone_startup[][2] = { + {NOTE_B5, 20}, + {NOTE_B6, 8}, + {NOTE_DS6, 20}, + {NOTE_B6, 8} +}; + +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); + +float tone_goodbye[][2] = SONG(GOODBYE_SOUND); + +float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); +#endif + +void persistant_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 + persistant_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_colemak, false, 0); + #endif + persistant_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + #endif + persistant_default_layer_set(1UL<<_DVORAK); + } + 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 BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + return false; + break; + } + return true; +}; + +void matrix_init_user(void) { + #ifdef AUDIO_ENABLE + startup_user(); + #endif +} + +#ifdef AUDIO_ENABLE + +void startup_user() +{ + _delay_ms(20); // gets rid of tick + PLAY_NOTE_ARRAY(tone_startup, false, 0); +} + +void shutdown_user() +{ + PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + _delay_ms(150); + stop_all_notes(); +} + +void music_on_user(void) +{ + music_scale_user(); +} + +void music_scale_user(void) +{ + PLAY_NOTE_ARRAY(music_scale, false, 0); +} + +#endif \ No newline at end of file diff --git a/keyboards/handwired/ortho5x13/ortho5x13.c b/keyboards/handwired/ortho5x13/ortho5x13.c new file mode 100644 index 000000000..cf8352cc4 --- /dev/null +++ b/keyboards/handwired/ortho5x13/ortho5x13.c @@ -0,0 +1,8 @@ +#include "ortho5x13.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} diff --git a/keyboards/handwired/ortho5x13/ortho5x13.h b/keyboards/handwired/ortho5x13/ortho5x13.h new file mode 100644 index 000000000..d442212fe --- /dev/null +++ b/keyboards/handwired/ortho5x13/ortho5x13.h @@ -0,0 +1,36 @@ +#ifndef ORTHO5X13_H +#define ORTHO5X13_H + +#include "quantum.h" + +#define KEYMAP( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ + k40, k41, k42, k43, k44, k45, k47, k48, k49, k4a, k4b, k4c \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c }, \ + { k30, k31, k32, k33, k34, k35, k35, k37, k38, k39, k3a, k3b, k3c }, \ + { k40, k41, k42, k43, k44, k45, KC_NO, k47, k48, k49, k4a, k4b, k4c } \ +} + +#define COMPACT_KEYMAP( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ + k40, k41, k42, k43, k44, k45, k47, k48, k49, k4a, k4b, k4c \ +) \ +{ \ + { KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, KC_##k0c }, \ + { KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, KC_##k1c }, \ + { KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, KC_##k2c }, \ + { KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k35, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b, KC_##k3c }, \ + { KC_##k40, KC_##k41, KC_##k42, KC_##k43, KC_##k44, KC_##k45, KC_NO, KC_##k47, KC_##k48, KC_##k49, KC_##k4a, KC_##k4b, KC_##k4c } \ +} + +#endif \ No newline at end of file diff --git a/keyboards/handwired/ortho5x13/rules.mk b/keyboards/handwired/ortho5x13/rules.mk new file mode 100644 index 000000000..e897ef252 --- /dev/null +++ b/keyboards/handwired/ortho5x13/rules.mk @@ -0,0 +1,83 @@ + +# MCU name +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=512 + + +# 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 ?= yes # Console for debug(+400) +COMMAND_ENABLE ?= yes # 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 ?= no # USB Nkey Rollover +BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default +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 + +ifndef QUANTUM_DIR + include ../../../Makefile +endif + +avrdude: build + ls /dev/tty* > /tmp/1; \ + echo "Reset your Pro Micro now"; \ + while [[ -z $$USB ]]; do \ + sleep 1; \ + ls /dev/tty* > /tmp/2; \ + USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \ + done; \ + avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex + +.PHONY: avrdude -- cgit v1.2.3 From 8b09fd8b55f94f3e88609ed2196270ea9b678b5e Mon Sep 17 00:00:00 2001 From: Lukas Stiebig Date: Thu, 9 Mar 2017 19:41:14 +0100 Subject: readme keymap.h to quantum_keycodes.h Changed the quantum/keymap.h to quantum/quantum_keycodes.h because this seems to be the file where they keycodes are defined. --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 21bb79a49..7ce3d0375 100644 --- a/readme.md +++ b/readme.md @@ -35,5 +35,5 @@ This is not a tiny project. While this is the main readme, there are many other * The readme for your own keyboard: This is found under `keyboards//`. So for the ErgoDox EZ, it's [here](keyboards/ergodox/ez/); for the Planck, it's [here](keyboards/planck/) and so on. * The list of possible keycodes you can use in your keymap is actually spread out in a few different places: * [doc/keycode.txt](doc/keycode.txt) - an explanation of those same keycodes. - * [quantum/keymap.h](quantum/keymap.h) - this is where the QMK-specific aliases are all set up. Things like the Hyper and Meh key, the Leader key, and all of the other QMK innovations. These are also explained and documented below, but `keymap.h` is where they're actually defined. + * [quantum/quantum_keycodes.h](quantum/quantum_keycodes.h) - this is where the QMK-specific aliases are all set up. Things like the Hyper and Meh key, the Leader key, and all of the other QMK innovations. These are also explained and documented below, but `quantum_keycodes.h` is where they're actually defined. * The [TMK documentation](doc/TMK_README.md). QMK is based on TMK, and this explains how it works internally. -- cgit v1.2.3 From 5ae0cfeef5134b8ba9d1f2bff0c105d4e18b064c Mon Sep 17 00:00:00 2001 From: Stephen Tudor Date: Thu, 9 Mar 2017 13:58:33 -0500 Subject: Add smt keymap for Satan 'GH60' --- keyboards/satan/keymaps/smt/Makefile | 21 ++++ keyboards/satan/keymaps/smt/keymap.c | 204 ++++++++++++++++++++++++++++++++++ keyboards/satan/keymaps/smt/readme.md | 1 + 3 files changed, 226 insertions(+) create mode 100644 keyboards/satan/keymaps/smt/Makefile create mode 100644 keyboards/satan/keymaps/smt/keymap.c create mode 100644 keyboards/satan/keymaps/smt/readme.md diff --git a/keyboards/satan/keymaps/smt/Makefile b/keyboards/satan/keymaps/smt/Makefile new file mode 100644 index 000000000..2a7ff2779 --- /dev/null +++ b/keyboards/satan/keymaps/smt/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 = no # 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 = yes # 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/satan/keymaps/smt/keymap.c b/keyboards/satan/keymaps/smt/keymap.c new file mode 100644 index 000000000..1dfa9495b --- /dev/null +++ b/keyboards/satan/keymaps/smt/keymap.c @@ -0,0 +1,204 @@ +#include "satan.h" + + +// Used for SHIFT_ESC +#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) + +// 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 + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK +}; + +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +// Custom macros +#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl +#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift +#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Shift+Alt) +#define ALT_GRV ALT_T(KC_GRV) // Tap for Backtick, hold for Alt + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _QWERTY: (Base Layer) Default Layer + * ,-----------------------------------------------------------. + * |Esc~| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | + * |-----------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | + * |-----------------------------------------------------------| + * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return | + * |-----------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | + * |-----------------------------------------------------------| + * |Ctrl|Gui |Alt | Space/Fn |Alt |Gui |Fn |Ctrl | + * `-----------------------------------------------------------' + */ +[_QWERTY] = KEYMAP_ANSI( + F(0), 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, \ + HPR_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, \ + CTL_ESC, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, SFT_ENT, \ + KC_LCTL, KC_LGUI,KC_LALT, LT(_RAISE, KC_SPC), KC_RALT,KC_RGUI,MO(_LOWER),KC_RCTL), + + /* Keymap _COLEMAK: (Base Layer) Default Layer + * ,-----------------------------------------------------------. + * |Esc~| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | + * |-----------------------------------------------------------| + * |Tab | Q| W| F| P| G| J| L| U| Y| ;| [| ]| \ | + * |-----------------------------------------------------------| + * |CAPS | A| R| S| T| D| H| N| E| I| O| '|Return | + * |-----------------------------------------------------------| + * |Shift | Z| X| C| V| B| K| M| ,| .| /|Shift | + * |-----------------------------------------------------------| + * |Ctrl|Gui |Alt | Space/Fn |Alt |Gui |Fn |Ctrl | + * `-----------------------------------------------------------' + */ +[_COLEMAK] = KEYMAP_ANSI( + F(0), 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, \ + HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN,KC_LBRC, KC_RBRC,KC_BSLS, \ + CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O ,KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM,KC_DOT, KC_SLSH, SFT_ENT, \ + KC_LCTL, KC_LGUI,KC_LALT, LT(_RAISE, KC_SPC), KC_RALT,KC_RGUI,MO(_LOWER),KC_RCTL), + + /* Keymap _DVORAK: (Base Layer) Default Layer + * ,-----------------------------------------------------------. + * |Esc~| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| [| ]|Backsp | + * |-----------------------------------------------------------| + * |HypTb| '| ,| .| P| Y| F| G| C| R| L| /| =| \ | + * |-----------------------------------------------------------| + * |CtrlEsc| A| O| E| U| I| D| H| T| N| S| -|Return | + * |-----------------------------------------------------------| + * |Shift | ;| Q| J| K| X| B| M| W| V| Z|ShiftEnter| + * |-----------------------------------------------------------| + * |Ctrl|Gui |Alt | Space/Fn |Alt |Gui |Fn |Ctrl | + * `-----------------------------------------------------------' + */ +[_DVORAK] = KEYMAP_ANSI( + F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC,KC_BSPC, \ + HPR_TAB, KC_QUOT,KC_COMM,KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, \ + CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, \ + KC_LSFT, KC_SCLN,KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT, \ + KC_LCTL, KC_LGUI,KC_LALT, LT(_RAISE, KC_SPC), KC_RALT,KC_RGUI,MO(_LOWER),KC_RCTL), + + /* Keymap _LOWER: Function Layer + * ,-----------------------------------------------------------. + * | | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Delete | + * |-----------------------------------------------------------| + * | |Hom| UP|End| | | | | | | |Vo-|Vo+| | + * |-----------------------------------------------------------| + * | |LFT| DN| RT| | |LFT| DN| UP| RT| |Pg+| | + * |-----------------------------------------------------------| + * | | | | | | | | | | |Pg-| | + * |-----------------------------------------------------------| + * | | |Prev| Play |Next| | | | + * `-----------------------------------------------------------' + */ +[_LOWER] = KEYMAP_ANSI( + 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_DEL, \ + _______,KC_HOME,KC_UP ,KC_END ,_______,_______,_______,_______,_______,_______,_______,KC_VOLD,KC_VOLU,_______, \ + _______,KC_LEFT,KC_DOWN,KC_RGHT,_______,_______,KC_LEFT,KC_DOWN,KC_UP ,KC_RGHT,_______,KC_PGUP ,_______, \ + _______ ,_______,_______,_______,_______,_______,_______,_______,_______,_______,KC_PGDN ,_______, \ + _______,_______,KC_MPRV ,KC_MPLY ,KC_MNXT,_______,_______,_______), + + /* Keymap _RAISE: Function Layer + * ,-----------------------------------------------------------. + * | | | | | | | | | | | | | | RESET | + * |-----------------------------------------------------------| + * | | | | | | | | | | | |BL-|BL+|BL | + * |-----------------------------------------------------------| + * | | | | | | | |QWT|CLM|DVK| | | | + * |-----------------------------------------------------------| + * | | F1|F2 | F3|F4 | F5| F6| F7| F8| | | | + * |-----------------------------------------------------------| + * | | | | | | | | | + * `-----------------------------------------------------------' + */ +[_RAISE] = KEYMAP_ANSI( + #ifdef RGBLIGHT_ENABLE + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,RESET , \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,BL_DEC ,BL_INC ,BL_TOGG, \ + _______,_______,_______,_______,_______,_______,_______,QWERTY ,COLEMAK,DVORAK ,_______,_______ ,_______, \ + _______ ,RGB_TOG,RGB_MOD,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD,_______,_______ ,_______, \ + _______,_______,_______ ,_______ ,_______,_______,_______,_______ + #else + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,RESET , \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,BL_DEC ,BL_INC ,BL_TOGG, \ + _______,_______,_______,_______,_______,_______,_______,QWERTY ,COLEMAK,DVORAK ,_______,_______ ,_______, \ + _______ ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______, \ + _______,_______,_______ ,_______ ,_______,_______,XXXXXXX,_______ + #endif + ) +}; + +void persistant_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) { + persistant_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_DVORAK); + } + return false; + break; + } + return true; +} + +enum function_id { + SHIFT_ESC, +}; + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_FUNCTION(SHIFT_ESC), +}; + +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { + static uint8_t shift_esc_shift_mask; + switch (id) { + case SHIFT_ESC: + shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; + if (record->event.pressed) { + if (shift_esc_shift_mask) { + add_key(KC_GRV); + send_keyboard_report(); + } else { + add_key(KC_ESC); + send_keyboard_report(); + } + } else { + if (shift_esc_shift_mask) { + del_key(KC_GRV); + send_keyboard_report(); + } else { + del_key(KC_ESC); + send_keyboard_report(); + } + } + break; + } +} diff --git a/keyboards/satan/keymaps/smt/readme.md b/keyboards/satan/keymaps/smt/readme.md new file mode 100644 index 000000000..7b706d601 --- /dev/null +++ b/keyboards/satan/keymaps/smt/readme.md @@ -0,0 +1 @@ +# smt's Satan GH60 layout -- cgit v1.2.3 From b19e34c81e3e16dc75a39cdc94300fb116c9254c Mon Sep 17 00:00:00 2001 From: Stephen Tudor Date: Fri, 10 Mar 2017 16:10:05 -0500 Subject: Forsake spacefn in favor of left shift tapdance. Move media controls. --- keyboards/satan/keymaps/smt/keymap.c | 49 ++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/keyboards/satan/keymaps/smt/keymap.c b/keyboards/satan/keymaps/smt/keymap.c index 1dfa9495b..4ac016f21 100644 --- a/keyboards/satan/keymaps/smt/keymap.c +++ b/keyboards/satan/keymaps/smt/keymap.c @@ -24,10 +24,11 @@ enum planck_keycodes { #define XXXXXXX KC_NO // Custom macros +#define ALT_GRV ALT_T(KC_GRV) // Tap for Backtick, hold for Alt #define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl -#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift #define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Shift+Alt) -#define ALT_GRV ALT_T(KC_GRV) // Tap for Backtick, hold for Alt +#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift +#define SFT_RSE TD(KC_LSFT, OS(_RAISE)) // Double-tap for RAISE one-shot, otherwise Left Shift const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _QWERTY: (Base Layer) Default Layer @@ -40,15 +41,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-----------------------------------------------------------| * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | * |-----------------------------------------------------------| - * |Ctrl|Gui |Alt | Space/Fn |Alt |Gui |Fn |Ctrl | + * |Ctrl|Gui |Alt | Space |Alt |Gui |Fn |Ctrl | * `-----------------------------------------------------------' */ [_QWERTY] = KEYMAP_ANSI( F(0), 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, \ HPR_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, \ CTL_ESC, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, SFT_ENT, \ - KC_LCTL, KC_LGUI,KC_LALT, LT(_RAISE, KC_SPC), KC_RALT,KC_RGUI,MO(_LOWER),KC_RCTL), + SFT_RSE, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, SFT_ENT, \ + KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,MO(_LOWER),KC_RCTL), /* Keymap _COLEMAK: (Base Layer) Default Layer * ,-----------------------------------------------------------. @@ -60,15 +61,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-----------------------------------------------------------| * |Shift | Z| X| C| V| B| K| M| ,| .| /|Shift | * |-----------------------------------------------------------| - * |Ctrl|Gui |Alt | Space/Fn |Alt |Gui |Fn |Ctrl | + * |Ctrl|Gui |Alt | Space |Alt |Gui |Fn |Ctrl | * `-----------------------------------------------------------' */ [_COLEMAK] = KEYMAP_ANSI( F(0), 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, \ HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN,KC_LBRC, KC_RBRC,KC_BSLS, \ CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O ,KC_QUOT, KC_ENT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM,KC_DOT, KC_SLSH, SFT_ENT, \ - KC_LCTL, KC_LGUI,KC_LALT, LT(_RAISE, KC_SPC), KC_RALT,KC_RGUI,MO(_LOWER),KC_RCTL), + SFT_RSE, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM,KC_DOT, KC_SLSH, SFT_ENT, \ + KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,MO(_LOWER),KC_RCTL), /* Keymap _DVORAK: (Base Layer) Default Layer * ,-----------------------------------------------------------. @@ -80,35 +81,35 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-----------------------------------------------------------| * |Shift | ;| Q| J| K| X| B| M| W| V| Z|ShiftEnter| * |-----------------------------------------------------------| - * |Ctrl|Gui |Alt | Space/Fn |Alt |Gui |Fn |Ctrl | + * |Ctrl|Gui |Alt | Space |Alt |Gui |Fn |Ctrl | * `-----------------------------------------------------------' */ [_DVORAK] = KEYMAP_ANSI( F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC,KC_BSPC, \ HPR_TAB, KC_QUOT,KC_COMM,KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, \ CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, \ - KC_LSFT, KC_SCLN,KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT, \ - KC_LCTL, KC_LGUI,KC_LALT, LT(_RAISE, KC_SPC), KC_RALT,KC_RGUI,MO(_LOWER),KC_RCTL), + SFT_RSE, KC_SCLN,KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT, \ + KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,MO(_LOWER),KC_RCTL), /* Keymap _LOWER: Function Layer * ,-----------------------------------------------------------. * | | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Delete | * |-----------------------------------------------------------| - * | |Hom| UP|End| | | | | | | |Vo-|Vo+| | + * | |Hom| UP|End| | | | | | | |BL-|BL+|BL | * |-----------------------------------------------------------| - * | |LFT| DN| RT| | |LFT| DN| UP| RT| |Pg+| | + * | |LFT| DN| RT| | |LFT| DN| UP| RT|Vo+|Pg+| | * |-----------------------------------------------------------| - * | | | | | | | | | | |Pg-| | + * | | | |Prv|Ply|Nxt| | | |Vo-|Pg-| | * |-----------------------------------------------------------| - * | | |Prev| Play |Next| | | | + * | | | | | | | | | * `-----------------------------------------------------------' */ [_LOWER] = KEYMAP_ANSI( 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_DEL, \ - _______,KC_HOME,KC_UP ,KC_END ,_______,_______,_______,_______,_______,_______,_______,KC_VOLD,KC_VOLU,_______, \ - _______,KC_LEFT,KC_DOWN,KC_RGHT,_______,_______,KC_LEFT,KC_DOWN,KC_UP ,KC_RGHT,_______,KC_PGUP ,_______, \ - _______ ,_______,_______,_______,_______,_______,_______,_______,_______,_______,KC_PGDN ,_______, \ - _______,_______,KC_MPRV ,KC_MPLY ,KC_MNXT,_______,_______,_______), + _______,KC_HOME,KC_UP ,KC_END ,_______,_______,_______,_______,_______,_______,_______,BL_DEC ,BL_INC ,BL_TOGG, \ + _______,KC_LEFT,KC_DOWN,KC_RGHT,_______,_______,KC_LEFT,KC_DOWN,KC_UP ,KC_RGHT,KC_VOLU,KC_PGUP ,_______, \ + KC_LSFT ,_______,_______,KC_MPRV,KC_MPLY,KC_MNXT,_______,_______,_______,KC_VOLD,KC_PGDN ,_______, \ + _______,_______,_______ ,_______ ,_______,_______,_______,_______), /* Keymap _RAISE: Function Layer * ,-----------------------------------------------------------. @@ -126,15 +127,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_RAISE] = KEYMAP_ANSI( #ifdef RGBLIGHT_ENABLE _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,RESET , \ - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,BL_DEC ,BL_INC ,BL_TOGG, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ _______,_______,_______,_______,_______,_______,_______,QWERTY ,COLEMAK,DVORAK ,_______,_______ ,_______, \ - _______ ,RGB_TOG,RGB_MOD,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD,_______,_______ ,_______, \ - _______,_______,_______ ,_______ ,_______,_______,_______,_______ + KC_LSFT ,RGB_TOG,RGB_MOD,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD,_______,_______ ,_______, \ + _______,_______,_______ ,_______ ,_______,_______,XXXXXXX,_______ #else _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,RESET , \ - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,BL_DEC ,BL_INC ,BL_TOGG, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ _______,_______,_______,_______,_______,_______,_______,QWERTY ,COLEMAK,DVORAK ,_______,_______ ,_______, \ - _______ ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______, \ + KC_LSFT ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______, \ _______,_______,_______ ,_______ ,_______,_______,XXXXXXX,_______ #endif ) -- cgit v1.2.3 From f75c7266a3c30a44e16a831e383baba97fc07eca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dennis=20Tr=C3=BCmper?= Date: Sat, 11 Mar 2017 00:02:39 +0100 Subject: working but some documentation needed --- .../keymaps/neo2_on_qwerz_hardware/keymap.c | 407 +++++++++++++++++++++ .../keymaps/neo2_on_qwerz_hardware/keymap.md | 188 ++++++++++ 2 files changed, 595 insertions(+) create mode 100644 keyboards/ergodox/keymaps/neo2_on_qwerz_hardware/keymap.c create mode 100644 keyboards/ergodox/keymaps/neo2_on_qwerz_hardware/keymap.md diff --git a/keyboards/ergodox/keymaps/neo2_on_qwerz_hardware/keymap.c b/keyboards/ergodox/keymaps/neo2_on_qwerz_hardware/keymap.c new file mode 100644 index 000000000..cfc51a4e4 --- /dev/null +++ b/keyboards/ergodox/keymaps/neo2_on_qwerz_hardware/keymap.c @@ -0,0 +1,407 @@ +#include "ergodox.h" +#include "action_layer.h" +#include "keymap_extras/keymap_german.h" + +#define UM 0 + +#define L0 0 // layer_0 +#define L1 1 // layer_1 +#define L2 2 // layer_2 +#define L3 3 // layer_3 +#define L4 4 // layer_4 +#define L5 5 // layer_5 +#define L6 6 // layer_6 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * .------------------------------------.------------------------------------. + * |ESC | 1 | 2 | 3 | 4 | 5 |ACUT | GRV | 6 | 7 | 8 | 9 | 0 |CIRC | + * !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! + * |TAB | X | V | L | C | W |Print| | K | H | G | F | Q | SS | + * !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + * |MO(1)| U | I | A | E | O |-----!-----! S | N | R | T | D | Y | + * !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + * |LSFT | UE | OE | AE | P | Z |SPACE| | B | M |COMM| DOT| J |RSFT | + * '-----+----+----+----+----+----------'----------+----+----+----+----+-----' + * |LCTL|LGUI|LALT|MO(3)|MO(2)| !MO(2)|MO(3)|APP |RALT|RCTL| + * '------------------------' '------------------------' + * .-----------. .-----------. + * |VOL- |VOL+ | !MUTE |PLAY | + * .-----+-----+-----! !-----+-----+-----. + * ! ! | | ! | ! ! + * ! CTL ! !-ALT-! !-CTL-! ! ALT ! + * |ENTER|MO(1)| TAB | !ESC |MO(3)|SPACE| + * '-----------------' '-----------------' + */ +[L0] = KEYMAP( + KC_ESC, DE_1, DE_2, DE_3, DE_4, DE_5, DE_ACUT, + KC_TAB, DE_X, DE_V, DE_L, DE_C, DE_W, KC_PSCR, + MO(1), DE_U, DE_I, DE_A, DE_E, DE_O, + KC_LSFT, DE_UE, DE_OE, DE_AE, DE_P, DE_Z, KC_SPACE, + KC_LCTL, KC_LGUI, KC_LALT, MO(3), MO(2), + /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_VOLD, KC_VOLU, + /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_TRNS, + /*-*/ /*-*/ /*-*/ /*-*/ CTL_T(KC_ENTER), MO(1), ALT_T(KC_TAB), + DE_GRV, DE_6, DE_7, DE_8, DE_9, DE_0, DE_CIRC, + KC_TRNS, DE_K, DE_H, DE_G, DE_F, DE_Q, DE_SS, + /*-*/ DE_S, DE_N, DE_R, DE_T, DE_D, DE_Y, + KC_TRNS, DE_B, DE_M, DE_COMM, DE_DOT, DE_J, KC_RSFT, + /*-*/ /*-*/ MO(2), MO(3), KC_APP, KC_RALT, KC_RCTL, + KC_MUTE, KC_MPLY, + KC_TRNS, + CTL_T(KC_ESC), MO(3), ALT_T(KC_SPACE) +), +/* + * .------------------------------------.------------------------------------. + * | | | | | | | | | | | | | | | + * !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! + * | |EURO|UNDS|LBRC|RBRC| | | |EXLM|LESS|MORE|EQL |AMPR| | + * !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + * | |BSLS|SLSH|LCBR|RCBR|ASTR|-----!-----!QST |LPRN|RPRN|MINS|COLN| AT | + * !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + * | |HASH|DLR |PIPE|TILD| | | |PLUS|PERC|DQOT|QUOT|SCLN| | + * '-----+----+----+----+----+----------'----------+----+----+----+----+-----' + * | | | | | | ! | | | | | + * '------------------------' '------------------------' + * .-----------. .-----------. + * | | | ! | | + * .-----+-----+-----! !-----+-----+-----. + * ! ! | | ! | ! ! + * ! ! !-----! !-----! ! ! + * | | | | ! | | | + * '-----------------' '-----------------' + */ +[L1] = KEYMAP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, DE_EURO, DE_UNDS, DE_LBRC, DE_RBRC, KC_TRNS, KC_TRNS, + KC_TRNS, DE_BSLS, DE_SLSH, DE_LCBR, DE_RCBR, DE_ASTR, + KC_TRNS, DE_HASH, DE_DLR, DE_PIPE, DE_TILD, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, DE_EXLM, DE_LESS, DE_MORE, DE_EQL, DE_AMPR, KC_TRNS, + /*-*/ DE_QST, DE_LPRN, DE_RPRN, DE_MINS, DE_COLN, DE_AT, + KC_TRNS, DE_PLUS, DE_PERC, DE_DQOT, DE_QUOT, DE_SCLN, KC_TRNS, + /*-*/ /*-*/ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +/* + * .------------------------------------.------------------------------------. + * | | | | | | | | | | | | | | | + * !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! + * | |PGUP|BSPC| UP |DEL |PGDN| | | | 7 | 8 | 9 | | | + * !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + * | |HOME|LEFT|DOWN|RGHT|END |-----!-----! | 4 | 5 | 6 | | | + * !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + * | | | |PREV|NEXT| | | | | 1 | 2 | 3 | | | + * '-----+----+----+----+----+----------'----------+----+----+----+----+-----' + * | | | | | | ! | | | | | + * '------------------------' '------------------------' + * .-----------. .-----------. + * | | | ! | | + * .-----+-----+-----! !-----+-----+-----. + * ! ! | | ! | ! ! + * ! ! !-----! !-----! ! ! + * | | | | ! | | 0 | + * '-----------------' '-----------------' + */ +[L2] = KEYMAP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, KC_TRNS, + KC_TRNS, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, DE_7, DE_8, DE_9, KC_TRNS, KC_TRNS, + /*-*/ KC_TRNS, DE_4, DE_5, DE_6, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, DE_1, DE_2, DE_3, KC_TRNS, KC_TRNS, + /*-*/ /*-*/ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, DE_0 +), +/* + * .------------------------------------.------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | | | | | | | | + * !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! + * | | F7 | F8 | F9 | F10| F11| F12 | | |M_WU|M_CU|M_WD| | | + * !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + * |M_B5 |M_B4|M_B3|M_B2|M_B1| |-----!-----! |M_CL|M_CD|M_CR| | | + * !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + * | | |M_A2|M_A1|M_A0| | | | | | | | | | + * '-----+----+----+----+----+----------'----------+----+----+----+----+-----' + * | | | | | | ! | | | | | + * '------------------------' '------------------------' + * .-----------. .-----------. + * | | | ! | | + * .-----+-----+-----! !-----+-----+-----. + * ! ! | | ! | ! ! + * ! ! !-----! !-----! ! ! + * | | | | ! | | | + * '-----------------' '-----------------' + */ +[L3] = KEYMAP( + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, KC_BTN1, KC_TRNS, + KC_TRNS, KC_TRNS, KC_ACL2, KC_ACL1, KC_ACL0, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_WH_U, KC_MS_U, KC_WH_D, KC_TRNS, KC_TRNS, + /*-*/ KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, 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, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +/* + * .------------------------------------.------------------------------------. + * | | | | | | | | | | | | | | | + * !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! + * | | | | | | | | | | | | | | | + * !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + * | | | | | | |-----!-----! | | | | | | + * !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + * | | | | | | | | | | | | | | | + * '-----+----+----+----+----+----------'----------+----+----+----+----+-----' + * | | | | | | ! | | | | | + * '------------------------' '------------------------' + * .-----------. .-----------. + * | | | ! | | + * .-----+-----+-----! !-----+-----+-----. + * ! ! | | ! | ! ! + * ! ! !-----! !-----! ! ! + * | | | | ! | | | + * '-----------------' '-----------------' + */ +[L4] = 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, 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, 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, + 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, 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, KC_TRNS +), +/* + * .------------------------------------.------------------------------------. + * | | | | | | | | | | | | | | | + * !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! + * | | | | | | | | | | | | | | | + * !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + * | | | | | | |-----!-----! | | | | | | + * !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + * | | | | | | | | | | | | | | | + * '-----+----+----+----+----+----------'----------+----+----+----+----+-----' + * | | | | | | ! | | | | | + * '------------------------' '------------------------' + * .-----------. .-----------. + * | | | ! | | + * .-----+-----+-----! !-----+-----+-----. + * ! ! | | ! | ! ! + * ! ! !-----! !-----! ! ! + * | | | | ! | | | + * '-----------------' '-----------------' + */ +[L5] = 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, 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, 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, + 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, 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, KC_TRNS +), +/* + * .------------------------------------.------------------------------------. + * | | | | | | | | | | | | | | | + * !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! + * | | | | | | | | | | | | | | | + * !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + * | | | | | | |-----!-----! | | | | | | + * !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + * | | | | | | | | | | | | | | | + * '-----+----+----+----+----+----------'----------+----+----+----+----+-----' + * | | | | | | ! | | | | | + * '------------------------' '------------------------' + * .-----------. .-----------. + * | | | ! | | + * .-----+-----+-----! !-----+-----+-----. + * ! ! | | ! | ! ! + * ! ! !-----! !-----! ! ! + * | | | | ! | | | + * '-----------------' '-----------------' + */ +[L6] = 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, 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, 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, + 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, 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, KC_TRNS +), +}; + +const uint16_t PROGMEM fn_actions[] = {}; + +#define UC_MODE_WIN 0 +#define UC_MODE_LINUX 1 +#define UC_MODE_OSX 2 + +// TODO: allow default mode to be configured +static uint16_t unicode_mode = UC_MODE_WIN; + +uint16_t hextokeycode(uint8_t hex) { + if (hex == 0x0) { + return KC_P0; + } + if (hex < 0xA) { + return KC_P1 + (hex - 0x1); + } + return KC_A + (hex - 0xA); +} + +void unicode_action_function(uint16_t hi, uint16_t lo) { + switch (unicode_mode) { + case UC_MODE_WIN: + register_code(KC_LALT); + + register_code(KC_PPLS); + unregister_code(KC_PPLS); + + register_code(hextokeycode((hi & 0xF0) >> 4)); + unregister_code(hextokeycode((hi & 0xF0) >> 4)); + register_code(hextokeycode((hi & 0x0F))); + unregister_code(hextokeycode((hi & 0x0F))); + register_code(hextokeycode((lo & 0xF0) >> 4)); + unregister_code(hextokeycode((lo & 0xF0) >> 4)); + register_code(hextokeycode((lo & 0x0F))); + unregister_code(hextokeycode((lo & 0x0F))); + + unregister_code(KC_LALT); + break; + case UC_MODE_LINUX: + register_code(KC_LCTL); + register_code(KC_LSFT); + + register_code(KC_U); + unregister_code(KC_U); + + register_code(hextokeycode((hi & 0xF0) >> 4)); + unregister_code(hextokeycode((hi & 0xF0) >> 4)); + register_code(hextokeycode((hi & 0x0F))); + unregister_code(hextokeycode((hi & 0x0F))); + register_code(hextokeycode((lo & 0xF0) >> 4)); + unregister_code(hextokeycode((lo & 0xF0) >> 4)); + register_code(hextokeycode((lo & 0x0F))); + unregister_code(hextokeycode((lo & 0x0F))); + + unregister_code(KC_LCTL); + unregister_code(KC_LSFT); + break; + case UC_MODE_OSX: + break; + } +} + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + if (!record->event.pressed) { + return MACRO_NONE; + } + // MACRODOWN only works in this function + switch(id) { + case UM: + unicode_mode = (unicode_mode + 1) % 2; + break; + + + default: + break; + } + return MACRO_NONE; +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + case L1: + ergodox_right_led_1_on(); + break; + case L2: + ergodox_right_led_2_on(); + break; + case L3: + ergodox_right_led_3_on(); + break; + case L4: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + break; + case L5: + ergodox_right_led_1_on(); + ergodox_right_led_3_on(); + break; + // case L6: + // ergodox_right_led_2_on(); + // ergodox_right_led_3_on(); + // break; + // case L7: + // ergodox_right_led_1_on(); + // ergodox_right_led_2_on(); + // ergodox_right_led_3_on(); + // break; + default: + ergodox_board_led_off(); + break; + } +}; diff --git a/keyboards/ergodox/keymaps/neo2_on_qwerz_hardware/keymap.md b/keyboards/ergodox/keymaps/neo2_on_qwerz_hardware/keymap.md new file mode 100644 index 000000000..fdcc86a49 --- /dev/null +++ b/keyboards/ergodox/keymaps/neo2_on_qwerz_hardware/keymap.md @@ -0,0 +1,188 @@ +# ManuNeo Ergodox Keyboard Layout + +Compile this file to a `keymap.c` file using `compile_keymap.py` + + python compile_keymap.py keymaps/german-manuneo/keymap.md + +Tested with python 2.7 and python 3.4 + + +# Layout Config + + { + "layout": "ergodox_ez", + "keymaps_includes": [ + "ergodox.h", + "action_layer.h", + "keymap_common.h", + "keymap_extras/keymap_german.h", + ], + "key_prefixes": ["DE_", "KC_"], + "macros": { + // TODO: implement macros + // "MUC": "", + }, + // TODO: implement default unicode mode + } + + +# Layers + + +## Layer 0 + + .------------------------------------.------------------------------------. + |ESC | 1 | 2 | 3 | 4 | 5 |ACUT | GRV | 6 | 7 | 8 | 9 | 0 |CIRC | + !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! + |TAB | X | V | L | C | W | | | K | H | G | F | Q | SS | + !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + |MO(1)| U | I | A | E | O |-----!-----! S | N | R | T | D | Y | + !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + |LSFT | UE | OE | AE | P | Z |SPACE| | B | M |COMM| DOT| J |RSFT | + '-----+----+----+----+----+----------'----------+----+----+----+----+-----' + |LCTL|LGUI|LCTL|MO(3)|MO(2)| !MO(2)|MO(3)|APP |RALT|RCTL| + '------------------------' '------------------------' + .-----------. .-----------. + | | | ! | | + .-----+-----+-----! !-----+-----+-----. + ! ! | | ! | ! ! + ! ! !-----! !-----! ! ! + |ENTER|MO(3)|LGUI | !RCTL |MO(1)|SPACE| + '-----------------' '-----------------' + + +## Layer 1 + + .------------------------------------.------------------------------------. + | | | | | | | | | | | | | | | + !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! + | |EURO|UNDS|LBRC|RBRC| | | |EXLM|LESS|MORE|EQL |AMPR| | + !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + | |BSLS|SLSH|LCBR|RCBR|ASTR|-----!-----!QST |LPRN|RPRN|MINS|COLN| AT | + !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + | |HASH|DLR |PIPE|TILD| | | |PLUS|PERC|DQOT|QUOT|SCLN| | + '-----+----+----+----+----+----------'----------+----+----+----+----+-----' + | | | | | | ! | | | | | + '------------------------' '------------------------' + .-----------. .-----------. + | | | ! | | + .-----+-----+-----! !-----+-----+-----. + ! ! | | ! | ! ! + ! ! !-----! !-----! ! ! + | | | | ! | | | + '-----------------' '-----------------' + + +## Layer 2 + + .------------------------------------.------------------------------------. + | | | | | | | | | | | | | |PEQL | + !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! + | |PGUP|BSPC| UP |DEL |PGDN| | | | 7 | 8 | 9 |PAST|PSLS | + !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + | |HOME|LEFT|DOWN|RGHT|END |-----!-----! | 4 | 5 | 6 |PMNS| | + !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + | | | | | | | | | | 1 | 2 | 3 |PPLS| | + '-----+----+----+----+----+----------'----------+----+----+----+----+-----' + | | | | | | ! | |PCMM|PDOT|PENT| + '------------------------' '------------------------' + .-----------. .-----------. + | | | ! | | + .-----+-----+-----! !-----+-----+-----. + ! ! | | ! | ! ! + ! ! !-----! !-----! ! ! + | | | | ! | | 0 | + '-----------------' '-----------------' + + + +## Layer 3 + + .------------------------------------.------------------------------------. + | | F1 | F2 | F3 | F4 | F5 | F6 | | | | | | | | + !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! + | | F7 | F8 | F9 | F10| F11| F12 | | | | | | | | + !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + | | | | | | |-----!-----! | | | | | | + !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + | | | | | | | | | | | | | | | + '-----+----+----+----+----+----------'----------+----+----+----+----+-----' + | | | | | | ! | | | | | + '------------------------' '------------------------' + .-----------. .-----------. + | | | ! | | + .-----+-----+-----! !-----+-----+-----. + ! ! | | ! | ! ! + ! ! !-----! !-----! ! ! + | | | | ! | | | + '-----------------' '-----------------' + + +## Layer 4 + + + + .------------------------------------.------------------------------------. + | | | | | | | | | | | | | | | + !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! + | | | | | | | | | | | | | | | + !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + | | | | | | |-----!-----! | | | | | | + !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + | | | | | | | | | | | | | | | + '-----+----+----+----+----+----------'----------+----+----+----+----+-----' + | | | | | | ! | | | | | + '------------------------' '------------------------' + .-----------. .-----------. + | | | ! | | + .-----+-----+-----! !-----+-----+-----. + ! ! | | ! | ! ! + ! ! !-----! !-----! ! ! + | | | | ! | | | + '-----------------' '-----------------' + + +## Layer 5 + + + .------------------------------------.------------------------------------. + | | | | | | | | | | | | | | | + !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! + | | | | | | | | | | | | | | | + !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + | | | | | | |-----!-----! | | | | | | + !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + | | | | | | | | | | | | | | | + '-----+----+----+----+----+----------'----------+----+----+----+----+-----' + | | | | | | ! | | | | | + '------------------------' '------------------------' + .-----------. .-----------. + | | | ! | | + .-----+-----+-----! !-----+-----+-----. + ! ! | | ! | ! ! + ! ! !-----! !-----! ! ! + | | | | ! | | | + '-----------------' '-----------------' + + +## Layer 6 + + .------------------------------------.------------------------------------. + | | | | | | | | | | | | | | | + !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! + | | | | | | | | | | | | | | | + !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + | | | | | | |-----!-----! | | | | | | + !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + | | | | | | | | | | | | | | | + '-----+----+----+----+----+----------'----------+----+----+----+----+-----' + | | | | | | ! | | | | | + '------------------------' '------------------------' + .-----------. .-----------. + | | | ! | | + .-----+-----+-----! !-----+-----+-----. + ! ! | | ! | ! ! + ! ! !-----! !-----! ! ! + | | | | ! | | | + '-----------------' '-----------------' + -- cgit v1.2.3 From 303f5aed41aac700b6cbc5a2ce06a872d5b85d88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dennis=20Tr=C3=BCmper?= Date: Sat, 11 Mar 2017 10:31:22 +0100 Subject: change layer 3 on right thumb back to layer 1 --- keyboards/ergodox/keymaps/neo2_on_qwerz_hardware/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/ergodox/keymaps/neo2_on_qwerz_hardware/keymap.c b/keyboards/ergodox/keymaps/neo2_on_qwerz_hardware/keymap.c index cfc51a4e4..040196600 100644 --- a/keyboards/ergodox/keymaps/neo2_on_qwerz_hardware/keymap.c +++ b/keyboards/ergodox/keymaps/neo2_on_qwerz_hardware/keymap.c @@ -30,7 +30,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * .-----+-----+-----! !-----+-----+-----. * ! ! | | ! | ! ! * ! CTL ! !-ALT-! !-CTL-! ! ALT ! - * |ENTER|MO(1)| TAB | !ESC |MO(3)|SPACE| + * |ENTER|MO(1)| TAB | !ESC |MO(1)|SPACE| * '-----------------' '-----------------' */ [L0] = KEYMAP( @@ -49,7 +49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /*-*/ /*-*/ MO(2), MO(3), KC_APP, KC_RALT, KC_RCTL, KC_MUTE, KC_MPLY, KC_TRNS, - CTL_T(KC_ESC), MO(3), ALT_T(KC_SPACE) + CTL_T(KC_ESC), MO(1), ALT_T(KC_SPACE) ), /* * .------------------------------------.------------------------------------. -- cgit v1.2.3 From edb8fcc8102ae86807b70750e57db0de9d49047c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dennis=20Tr=C3=BCmper?= Date: Sat, 11 Mar 2017 11:44:39 +0100 Subject: update documentation --- .../keymaps/neo2_on_qwerz_hardware/keymap.c | 75 +++++++++--------- .../keymaps/neo2_on_qwerz_hardware/keymap.md | 90 ++++++++++++---------- 2 files changed, 86 insertions(+), 79 deletions(-) diff --git a/keyboards/ergodox/keymaps/neo2_on_qwerz_hardware/keymap.c b/keyboards/ergodox/keymaps/neo2_on_qwerz_hardware/keymap.c index 040196600..ab2464c42 100644 --- a/keyboards/ergodox/keymaps/neo2_on_qwerz_hardware/keymap.c +++ b/keyboards/ergodox/keymaps/neo2_on_qwerz_hardware/keymap.c @@ -5,7 +5,7 @@ #define UM 0 #define L0 0 // layer_0 -#define L1 1 // layer_1 +#define L1 1 // layer_1 #define L2 2 // layer_2 #define L3 3 // layer_3 #define L4 4 // layer_4 @@ -14,24 +14,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* - * .------------------------------------.------------------------------------. - * |ESC | 1 | 2 | 3 | 4 | 5 |ACUT | GRV | 6 | 7 | 8 | 9 | 0 |CIRC | - * !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! - * |TAB | X | V | L | C | W |Print| | K | H | G | F | Q | SS | - * !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! - * |MO(1)| U | I | A | E | O |-----!-----! S | N | R | T | D | Y | - * !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! - * |LSFT | UE | OE | AE | P | Z |SPACE| | B | M |COMM| DOT| J |RSFT | - * '-----+----+----+----+----+----------'----------+----+----+----+----+-----' - * |LCTL|LGUI|LALT|MO(3)|MO(2)| !MO(2)|MO(3)|APP |RALT|RCTL| - * '------------------------' '------------------------' - * .-----------. .-----------. - * |VOL- |VOL+ | !MUTE |PLAY | - * .-----+-----+-----! !-----+-----+-----. - * ! ! | | ! | ! ! - * ! CTL ! !-ALT-! !-CTL-! ! ALT ! - * |ENTER|MO(1)| TAB | !ESC |MO(1)|SPACE| - * '-----------------' '-----------------' + .------------------------------------.------------------------------------. + |ESC | 1 | 2 | 3 | 4 | 5 | ´ | ` | 6 | 7 | 8 | 9 | 0 | ^ | + !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! + |TAB | X | V | L | C | W |Print| | K | H | G | F | Q | ß | + !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + |MO(1)| U | I | A | E | O |-----!-----! S | N | R | T | D | Y | + !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + |LSFT | ü | ö | ä | P | Z |SPACE| | B | M | , | . | J |RSFT | + '-----+----+----+----+----+----------'----------+----+----+----+----+-----' + |LCTL|LGUI|LALT|MO(3)|MO(2)| !MO(2)|MO(3)|APP |RALT|RCTL| + '------------------------' '------------------------' + .-----------. .-----------. + |VOL- |VOL+ | !MUTE |PLAY | + .-----+-----+-----! !-----+-----+-----. + ! ! | | ! | ! ! + ! ! |-----| !-----| ! ! + ! CTL ! ! ALT ! ! CTL ! ! ALT ! + |ENTER|MO(1)| TAB | !ESC |MO(1)|SPACE| + '-----------------' '-----------------' */ [L0] = KEYMAP( KC_ESC, DE_1, DE_2, DE_3, DE_4, DE_5, DE_ACUT, @@ -52,24 +53,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { CTL_T(KC_ESC), MO(1), ALT_T(KC_SPACE) ), /* - * .------------------------------------.------------------------------------. - * | | | | | | | | | | | | | | | - * !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! - * | |EURO|UNDS|LBRC|RBRC| | | |EXLM|LESS|MORE|EQL |AMPR| | - * !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! - * | |BSLS|SLSH|LCBR|RCBR|ASTR|-----!-----!QST |LPRN|RPRN|MINS|COLN| AT | - * !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! - * | |HASH|DLR |PIPE|TILD| | | |PLUS|PERC|DQOT|QUOT|SCLN| | - * '-----+----+----+----+----+----------'----------+----+----+----+----+-----' - * | | | | | | ! | | | | | - * '------------------------' '------------------------' - * .-----------. .-----------. - * | | | ! | | - * .-----+-----+-----! !-----+-----+-----. - * ! ! | | ! | ! ! - * ! ! !-----! !-----! ! ! - * | | | | ! | | | - * '-----------------' '-----------------' + .------------------------------------.------------------------------------. + | | | | | | | | | | | | | | | + !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! + | | € | _ | [ | ] | | | | ! | < | > | = | & | | + !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + | | \ | / | { | } | * |-----!-----! ? | ( | ) | - | : | @ | + !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + | | # | $ | | | ~ | | | | + | % | " | ' | ; | | + '-----+----+----+----+----+----------'----------+----+----+----+----+-----' + | | | | | | ! | | | | | + '------------------------' '------------------------' + .-----------. .-----------. + | | | ! | | + .-----+-----+-----! !-----+-----+-----. + ! ! | | ! | ! ! + ! ! !-----! !-----! ! ! + | | | | ! | | | + '-----------------' '-----------------' */ [L1] = KEYMAP( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/neo2_on_qwerz_hardware/keymap.md b/keyboards/ergodox/keymaps/neo2_on_qwerz_hardware/keymap.md index fdcc86a49..d9fcda966 100644 --- a/keyboards/ergodox/keymaps/neo2_on_qwerz_hardware/keymap.md +++ b/keyboards/ergodox/keymaps/neo2_on_qwerz_hardware/keymap.md @@ -1,54 +1,57 @@ -# ManuNeo Ergodox Keyboard Layout - -Compile this file to a `keymap.c` file using `compile_keymap.py` - - python compile_keymap.py keymaps/german-manuneo/keymap.md +# Neo2 for ErgoDox on QWERTZ +# +# Description +This layout is ment to be used on PCs with DE-de with an additional guest keyboard. E.g. on your PC at work you can use your ergodox with neo but a second keybord is plugged in so your coworkers can enter a few signs if necessary. I live in Germany, so this is my usecase. +# Layers +[Layer0](#layer-0) +Letters, modifiers and volume -Tested with python 2.7 and python 3.4 +[Layer1](#layer-1) +Symbols +[Layer2](#layer-2) +Motion, digits and next/prev Song -# Layout Config +[Layer3](#layer-3) +F1 to F12 and mouse actions - { - "layout": "ergodox_ez", - "keymaps_includes": [ - "ergodox.h", - "action_layer.h", - "keymap_common.h", - "keymap_extras/keymap_german.h", - ], - "key_prefixes": ["DE_", "KC_"], - "macros": { - // TODO: implement macros - // "MUC": "", - }, - // TODO: implement default unicode mode - } +[Layer4](#layer-4) +not used +[Layer5](#layer-5) +not used -# Layers +[Layer6](#layer-6) +not used ## Layer 0 .------------------------------------.------------------------------------. - |ESC | 1 | 2 | 3 | 4 | 5 |ACUT | GRV | 6 | 7 | 8 | 9 | 0 |CIRC | + |ESC | 1 | 2 | 3 | 4 | 5 | ´ | ` | 6 | 7 | 8 | 9 | 0 | ^ | !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! - |TAB | X | V | L | C | W | | | K | H | G | F | Q | SS | + |TAB | X | V | L | C | W |Print| | K | H | G | F | Q | ß | !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! |MO(1)| U | I | A | E | O |-----!-----! S | N | R | T | D | Y | !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! - |LSFT | UE | OE | AE | P | Z |SPACE| | B | M |COMM| DOT| J |RSFT | + |LSFT | ü | ö | ä | P | Z |SPACE| | B | M | , | . | J |RSFT | '-----+----+----+----+----+----------'----------+----+----+----+----+-----' - |LCTL|LGUI|LCTL|MO(3)|MO(2)| !MO(2)|MO(3)|APP |RALT|RCTL| + |LCTL|LGUI|LALT|MO(3)|MO(2)| !MO(2)|MO(3)|APP |RALT|RCTL| '------------------------' '------------------------' .-----------. .-----------. - | | | ! | | + |VOL- |VOL+ | !MUTE |PLAY | .-----+-----+-----! !-----+-----+-----. ! ! | | ! | ! ! - ! ! !-----! !-----! ! ! - |ENTER|MO(3)|LGUI | !RCTL |MO(1)|SPACE| + ! ! |-----| !-----| ! ! + ! CTL ! ! ALT ! ! CTL ! ! ALT ! + |ENTER|MO(1)| TAB | !ESC |MO(1)|SPACE| '-----------------' '-----------------' + +* Left side ESC, TAB, [SymbolLayer], Shift, Ctr, Gui(Windows key), and Alt like normal QWERTZ with neo2. +* Space on right side of left half for mous activity so you don't have to leave the mouse for Space. +* Top row of thumb keys is hard to reach for me, so I put media control on there. +* Thumb keys make use of modifier/tap. E.g. if you tap the Enter key it will be Enter. If you keep it pressed down it will be Ctr. The hold action is written on top of the tap action. +* The small middle thumb keys are not used, es well as the 1.5 sized ones on the left side of the right half. ## Layer 1 @@ -56,11 +59,11 @@ Tested with python 2.7 and python 3.4 .------------------------------------.------------------------------------. | | | | | | | | | | | | | | | !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! - | |EURO|UNDS|LBRC|RBRC| | | |EXLM|LESS|MORE|EQL |AMPR| | + | | € | _ | [ | ] | | | | ! | < | > | = | & | | !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! - | |BSLS|SLSH|LCBR|RCBR|ASTR|-----!-----!QST |LPRN|RPRN|MINS|COLN| AT | + | | \ | / | { | } | * |-----!-----! ? | ( | ) | - | : | @ | !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! - | |HASH|DLR |PIPE|TILD| | | |PLUS|PERC|DQOT|QUOT|SCLN| | + | | # | $ | | | ~ | | | | + | % | " | ' | ; | | '-----+----+----+----+----+----------'----------+----+----+----+----+-----' | | | | | | ! | | | | | '------------------------' '------------------------' @@ -76,15 +79,15 @@ Tested with python 2.7 and python 3.4 ## Layer 2 .------------------------------------.------------------------------------. - | | | | | | | | | | | | | |PEQL | + | | | | | | | | | | | | | | | !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! - | |PGUP|BSPC| UP |DEL |PGDN| | | | 7 | 8 | 9 |PAST|PSLS | + | |PGUP|BSPC| UP |DEL |PGDN| | | | 7 | 8 | 9 | | | !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! - | |HOME|LEFT|DOWN|RGHT|END |-----!-----! | 4 | 5 | 6 |PMNS| | + | |HOME|LEFT|DOWN|RGHT|END |-----!-----! | 4 | 5 | 6 | | | !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! - | | | | | | | | | | 1 | 2 | 3 |PPLS| | + | | | |PREV|NEXT| | | | | 1 | 2 | 3 | | | '-----+----+----+----+----+----------'----------+----+----+----+----+-----' - | | | | | | ! | |PCMM|PDOT|PENT| + | | | | | | ! | | | | | '------------------------' '------------------------' .-----------. .-----------. | | | ! | | @@ -101,11 +104,11 @@ Tested with python 2.7 and python 3.4 .------------------------------------.------------------------------------. | | F1 | F2 | F3 | F4 | F5 | F6 | | | | | | | | !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! - | | F7 | F8 | F9 | F10| F11| F12 | | | | | | | | + | | F7 | F8 | F9 | F10| F11| F12 | | |M_WU|M_CU|M_WD| | | !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! - | | | | | | |-----!-----! | | | | | | + |M_B5 |M_B4|M_B3|M_B2|M_B1| |-----!-----! |M_CL|M_CD|M_CR| | | !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! - | | | | | | | | | | | | | | | + | | |M_A2|M_A1|M_A0| | | | | | | | | | '-----+----+----+----+----+----------'----------+----+----+----+----+-----' | | | | | | ! | | | | | '------------------------' '------------------------' @@ -116,7 +119,10 @@ Tested with python 2.7 and python 3.4 ! ! !-----! !-----! ! ! | | | | ! | | | '-----------------' '-----------------' - +* M_A Mouse acceleration +* M_B Mouse button +* M_C Mouse cursor +* M_W Mouse wheel ## Layer 4 -- cgit v1.2.3 From e3f934ed919f75f27379dcf8b1316fa0ed8e78c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dennis=20Tr=C3=BCmper?= Date: Sat, 11 Mar 2017 12:09:30 +0100 Subject: remove typo from folder name --- .../keymaps/neo2_on_qwertz_hardware/keymap.c | 408 +++++++++++++++++++++ .../keymaps/neo2_on_qwertz_hardware/keymap.md | 194 ++++++++++ .../keymaps/neo2_on_qwerz_hardware/keymap.c | 408 --------------------- .../keymaps/neo2_on_qwerz_hardware/keymap.md | 194 ---------- 4 files changed, 602 insertions(+), 602 deletions(-) create mode 100644 keyboards/ergodox/keymaps/neo2_on_qwertz_hardware/keymap.c create mode 100644 keyboards/ergodox/keymaps/neo2_on_qwertz_hardware/keymap.md delete mode 100644 keyboards/ergodox/keymaps/neo2_on_qwerz_hardware/keymap.c delete mode 100644 keyboards/ergodox/keymaps/neo2_on_qwerz_hardware/keymap.md diff --git a/keyboards/ergodox/keymaps/neo2_on_qwertz_hardware/keymap.c b/keyboards/ergodox/keymaps/neo2_on_qwertz_hardware/keymap.c new file mode 100644 index 000000000..ab2464c42 --- /dev/null +++ b/keyboards/ergodox/keymaps/neo2_on_qwertz_hardware/keymap.c @@ -0,0 +1,408 @@ +#include "ergodox.h" +#include "action_layer.h" +#include "keymap_extras/keymap_german.h" + +#define UM 0 + +#define L0 0 // layer_0 +#define L1 1 // layer_1 +#define L2 2 // layer_2 +#define L3 3 // layer_3 +#define L4 4 // layer_4 +#define L5 5 // layer_5 +#define L6 6 // layer_6 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + .------------------------------------.------------------------------------. + |ESC | 1 | 2 | 3 | 4 | 5 | ´ | ` | 6 | 7 | 8 | 9 | 0 | ^ | + !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! + |TAB | X | V | L | C | W |Print| | K | H | G | F | Q | ß | + !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + |MO(1)| U | I | A | E | O |-----!-----! S | N | R | T | D | Y | + !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + |LSFT | ü | ö | ä | P | Z |SPACE| | B | M | , | . | J |RSFT | + '-----+----+----+----+----+----------'----------+----+----+----+----+-----' + |LCTL|LGUI|LALT|MO(3)|MO(2)| !MO(2)|MO(3)|APP |RALT|RCTL| + '------------------------' '------------------------' + .-----------. .-----------. + |VOL- |VOL+ | !MUTE |PLAY | + .-----+-----+-----! !-----+-----+-----. + ! ! | | ! | ! ! + ! ! |-----| !-----| ! ! + ! CTL ! ! ALT ! ! CTL ! ! ALT ! + |ENTER|MO(1)| TAB | !ESC |MO(1)|SPACE| + '-----------------' '-----------------' + */ +[L0] = KEYMAP( + KC_ESC, DE_1, DE_2, DE_3, DE_4, DE_5, DE_ACUT, + KC_TAB, DE_X, DE_V, DE_L, DE_C, DE_W, KC_PSCR, + MO(1), DE_U, DE_I, DE_A, DE_E, DE_O, + KC_LSFT, DE_UE, DE_OE, DE_AE, DE_P, DE_Z, KC_SPACE, + KC_LCTL, KC_LGUI, KC_LALT, MO(3), MO(2), + /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_VOLD, KC_VOLU, + /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_TRNS, + /*-*/ /*-*/ /*-*/ /*-*/ CTL_T(KC_ENTER), MO(1), ALT_T(KC_TAB), + DE_GRV, DE_6, DE_7, DE_8, DE_9, DE_0, DE_CIRC, + KC_TRNS, DE_K, DE_H, DE_G, DE_F, DE_Q, DE_SS, + /*-*/ DE_S, DE_N, DE_R, DE_T, DE_D, DE_Y, + KC_TRNS, DE_B, DE_M, DE_COMM, DE_DOT, DE_J, KC_RSFT, + /*-*/ /*-*/ MO(2), MO(3), KC_APP, KC_RALT, KC_RCTL, + KC_MUTE, KC_MPLY, + KC_TRNS, + CTL_T(KC_ESC), MO(1), ALT_T(KC_SPACE) +), +/* + .------------------------------------.------------------------------------. + | | | | | | | | | | | | | | | + !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! + | | € | _ | [ | ] | | | | ! | < | > | = | & | | + !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + | | \ | / | { | } | * |-----!-----! ? | ( | ) | - | : | @ | + !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + | | # | $ | | | ~ | | | | + | % | " | ' | ; | | + '-----+----+----+----+----+----------'----------+----+----+----+----+-----' + | | | | | | ! | | | | | + '------------------------' '------------------------' + .-----------. .-----------. + | | | ! | | + .-----+-----+-----! !-----+-----+-----. + ! ! | | ! | ! ! + ! ! !-----! !-----! ! ! + | | | | ! | | | + '-----------------' '-----------------' + */ +[L1] = KEYMAP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, DE_EURO, DE_UNDS, DE_LBRC, DE_RBRC, KC_TRNS, KC_TRNS, + KC_TRNS, DE_BSLS, DE_SLSH, DE_LCBR, DE_RCBR, DE_ASTR, + KC_TRNS, DE_HASH, DE_DLR, DE_PIPE, DE_TILD, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, DE_EXLM, DE_LESS, DE_MORE, DE_EQL, DE_AMPR, KC_TRNS, + /*-*/ DE_QST, DE_LPRN, DE_RPRN, DE_MINS, DE_COLN, DE_AT, + KC_TRNS, DE_PLUS, DE_PERC, DE_DQOT, DE_QUOT, DE_SCLN, KC_TRNS, + /*-*/ /*-*/ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +/* + * .------------------------------------.------------------------------------. + * | | | | | | | | | | | | | | | + * !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! + * | |PGUP|BSPC| UP |DEL |PGDN| | | | 7 | 8 | 9 | | | + * !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + * | |HOME|LEFT|DOWN|RGHT|END |-----!-----! | 4 | 5 | 6 | | | + * !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + * | | | |PREV|NEXT| | | | | 1 | 2 | 3 | | | + * '-----+----+----+----+----+----------'----------+----+----+----+----+-----' + * | | | | | | ! | | | | | + * '------------------------' '------------------------' + * .-----------. .-----------. + * | | | ! | | + * .-----+-----+-----! !-----+-----+-----. + * ! ! | | ! | ! ! + * ! ! !-----! !-----! ! ! + * | | | | ! | | 0 | + * '-----------------' '-----------------' + */ +[L2] = KEYMAP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, KC_TRNS, + KC_TRNS, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, DE_7, DE_8, DE_9, KC_TRNS, KC_TRNS, + /*-*/ KC_TRNS, DE_4, DE_5, DE_6, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, DE_1, DE_2, DE_3, KC_TRNS, KC_TRNS, + /*-*/ /*-*/ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, DE_0 +), +/* + * .------------------------------------.------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | | | | | | | | + * !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! + * | | F7 | F8 | F9 | F10| F11| F12 | | |M_WU|M_CU|M_WD| | | + * !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + * |M_B5 |M_B4|M_B3|M_B2|M_B1| |-----!-----! |M_CL|M_CD|M_CR| | | + * !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + * | | |M_A2|M_A1|M_A0| | | | | | | | | | + * '-----+----+----+----+----+----------'----------+----+----+----+----+-----' + * | | | | | | ! | | | | | + * '------------------------' '------------------------' + * .-----------. .-----------. + * | | | ! | | + * .-----+-----+-----! !-----+-----+-----. + * ! ! | | ! | ! ! + * ! ! !-----! !-----! ! ! + * | | | | ! | | | + * '-----------------' '-----------------' + */ +[L3] = KEYMAP( + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, KC_BTN1, KC_TRNS, + KC_TRNS, KC_TRNS, KC_ACL2, KC_ACL1, KC_ACL0, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_WH_U, KC_MS_U, KC_WH_D, KC_TRNS, KC_TRNS, + /*-*/ KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, 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, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +/* + * .------------------------------------.------------------------------------. + * | | | | | | | | | | | | | | | + * !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! + * | | | | | | | | | | | | | | | + * !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + * | | | | | | |-----!-----! | | | | | | + * !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + * | | | | | | | | | | | | | | | + * '-----+----+----+----+----+----------'----------+----+----+----+----+-----' + * | | | | | | ! | | | | | + * '------------------------' '------------------------' + * .-----------. .-----------. + * | | | ! | | + * .-----+-----+-----! !-----+-----+-----. + * ! ! | | ! | ! ! + * ! ! !-----! !-----! ! ! + * | | | | ! | | | + * '-----------------' '-----------------' + */ +[L4] = 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, 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, 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, + 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, 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, KC_TRNS +), +/* + * .------------------------------------.------------------------------------. + * | | | | | | | | | | | | | | | + * !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! + * | | | | | | | | | | | | | | | + * !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + * | | | | | | |-----!-----! | | | | | | + * !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + * | | | | | | | | | | | | | | | + * '-----+----+----+----+----+----------'----------+----+----+----+----+-----' + * | | | | | | ! | | | | | + * '------------------------' '------------------------' + * .-----------. .-----------. + * | | | ! | | + * .-----+-----+-----! !-----+-----+-----. + * ! ! | | ! | ! ! + * ! ! !-----! !-----! ! ! + * | | | | ! | | | + * '-----------------' '-----------------' + */ +[L5] = 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, 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, 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, + 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, 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, KC_TRNS +), +/* + * .------------------------------------.------------------------------------. + * | | | | | | | | | | | | | | | + * !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! + * | | | | | | | | | | | | | | | + * !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + * | | | | | | |-----!-----! | | | | | | + * !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + * | | | | | | | | | | | | | | | + * '-----+----+----+----+----+----------'----------+----+----+----+----+-----' + * | | | | | | ! | | | | | + * '------------------------' '------------------------' + * .-----------. .-----------. + * | | | ! | | + * .-----+-----+-----! !-----+-----+-----. + * ! ! | | ! | ! ! + * ! ! !-----! !-----! ! ! + * | | | | ! | | | + * '-----------------' '-----------------' + */ +[L6] = 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, 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, 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, + 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, 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, KC_TRNS +), +}; + +const uint16_t PROGMEM fn_actions[] = {}; + +#define UC_MODE_WIN 0 +#define UC_MODE_LINUX 1 +#define UC_MODE_OSX 2 + +// TODO: allow default mode to be configured +static uint16_t unicode_mode = UC_MODE_WIN; + +uint16_t hextokeycode(uint8_t hex) { + if (hex == 0x0) { + return KC_P0; + } + if (hex < 0xA) { + return KC_P1 + (hex - 0x1); + } + return KC_A + (hex - 0xA); +} + +void unicode_action_function(uint16_t hi, uint16_t lo) { + switch (unicode_mode) { + case UC_MODE_WIN: + register_code(KC_LALT); + + register_code(KC_PPLS); + unregister_code(KC_PPLS); + + register_code(hextokeycode((hi & 0xF0) >> 4)); + unregister_code(hextokeycode((hi & 0xF0) >> 4)); + register_code(hextokeycode((hi & 0x0F))); + unregister_code(hextokeycode((hi & 0x0F))); + register_code(hextokeycode((lo & 0xF0) >> 4)); + unregister_code(hextokeycode((lo & 0xF0) >> 4)); + register_code(hextokeycode((lo & 0x0F))); + unregister_code(hextokeycode((lo & 0x0F))); + + unregister_code(KC_LALT); + break; + case UC_MODE_LINUX: + register_code(KC_LCTL); + register_code(KC_LSFT); + + register_code(KC_U); + unregister_code(KC_U); + + register_code(hextokeycode((hi & 0xF0) >> 4)); + unregister_code(hextokeycode((hi & 0xF0) >> 4)); + register_code(hextokeycode((hi & 0x0F))); + unregister_code(hextokeycode((hi & 0x0F))); + register_code(hextokeycode((lo & 0xF0) >> 4)); + unregister_code(hextokeycode((lo & 0xF0) >> 4)); + register_code(hextokeycode((lo & 0x0F))); + unregister_code(hextokeycode((lo & 0x0F))); + + unregister_code(KC_LCTL); + unregister_code(KC_LSFT); + break; + case UC_MODE_OSX: + break; + } +} + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + if (!record->event.pressed) { + return MACRO_NONE; + } + // MACRODOWN only works in this function + switch(id) { + case UM: + unicode_mode = (unicode_mode + 1) % 2; + break; + + + default: + break; + } + return MACRO_NONE; +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + case L1: + ergodox_right_led_1_on(); + break; + case L2: + ergodox_right_led_2_on(); + break; + case L3: + ergodox_right_led_3_on(); + break; + case L4: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + break; + case L5: + ergodox_right_led_1_on(); + ergodox_right_led_3_on(); + break; + // case L6: + // ergodox_right_led_2_on(); + // ergodox_right_led_3_on(); + // break; + // case L7: + // ergodox_right_led_1_on(); + // ergodox_right_led_2_on(); + // ergodox_right_led_3_on(); + // break; + default: + ergodox_board_led_off(); + break; + } +}; diff --git a/keyboards/ergodox/keymaps/neo2_on_qwertz_hardware/keymap.md b/keyboards/ergodox/keymaps/neo2_on_qwertz_hardware/keymap.md new file mode 100644 index 000000000..d9fcda966 --- /dev/null +++ b/keyboards/ergodox/keymaps/neo2_on_qwertz_hardware/keymap.md @@ -0,0 +1,194 @@ +# Neo2 for ErgoDox on QWERTZ +# +# Description +This layout is ment to be used on PCs with DE-de with an additional guest keyboard. E.g. on your PC at work you can use your ergodox with neo but a second keybord is plugged in so your coworkers can enter a few signs if necessary. I live in Germany, so this is my usecase. +# Layers +[Layer0](#layer-0) +Letters, modifiers and volume + +[Layer1](#layer-1) +Symbols + +[Layer2](#layer-2) +Motion, digits and next/prev Song + +[Layer3](#layer-3) +F1 to F12 and mouse actions + +[Layer4](#layer-4) +not used + +[Layer5](#layer-5) +not used + +[Layer6](#layer-6) +not used + + +## Layer 0 + + .------------------------------------.------------------------------------. + |ESC | 1 | 2 | 3 | 4 | 5 | ´ | ` | 6 | 7 | 8 | 9 | 0 | ^ | + !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! + |TAB | X | V | L | C | W |Print| | K | H | G | F | Q | ß | + !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + |MO(1)| U | I | A | E | O |-----!-----! S | N | R | T | D | Y | + !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + |LSFT | ü | ö | ä | P | Z |SPACE| | B | M | , | . | J |RSFT | + '-----+----+----+----+----+----------'----------+----+----+----+----+-----' + |LCTL|LGUI|LALT|MO(3)|MO(2)| !MO(2)|MO(3)|APP |RALT|RCTL| + '------------------------' '------------------------' + .-----------. .-----------. + |VOL- |VOL+ | !MUTE |PLAY | + .-----+-----+-----! !-----+-----+-----. + ! ! | | ! | ! ! + ! ! |-----| !-----| ! ! + ! CTL ! ! ALT ! ! CTL ! ! ALT ! + |ENTER|MO(1)| TAB | !ESC |MO(1)|SPACE| + '-----------------' '-----------------' + +* Left side ESC, TAB, [SymbolLayer], Shift, Ctr, Gui(Windows key), and Alt like normal QWERTZ with neo2. +* Space on right side of left half for mous activity so you don't have to leave the mouse for Space. +* Top row of thumb keys is hard to reach for me, so I put media control on there. +* Thumb keys make use of modifier/tap. E.g. if you tap the Enter key it will be Enter. If you keep it pressed down it will be Ctr. The hold action is written on top of the tap action. +* The small middle thumb keys are not used, es well as the 1.5 sized ones on the left side of the right half. + + +## Layer 1 + + .------------------------------------.------------------------------------. + | | | | | | | | | | | | | | | + !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! + | | € | _ | [ | ] | | | | ! | < | > | = | & | | + !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + | | \ | / | { | } | * |-----!-----! ? | ( | ) | - | : | @ | + !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + | | # | $ | | | ~ | | | | + | % | " | ' | ; | | + '-----+----+----+----+----+----------'----------+----+----+----+----+-----' + | | | | | | ! | | | | | + '------------------------' '------------------------' + .-----------. .-----------. + | | | ! | | + .-----+-----+-----! !-----+-----+-----. + ! ! | | ! | ! ! + ! ! !-----! !-----! ! ! + | | | | ! | | | + '-----------------' '-----------------' + + +## Layer 2 + + .------------------------------------.------------------------------------. + | | | | | | | | | | | | | | | + !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! + | |PGUP|BSPC| UP |DEL |PGDN| | | | 7 | 8 | 9 | | | + !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + | |HOME|LEFT|DOWN|RGHT|END |-----!-----! | 4 | 5 | 6 | | | + !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + | | | |PREV|NEXT| | | | | 1 | 2 | 3 | | | + '-----+----+----+----+----+----------'----------+----+----+----+----+-----' + | | | | | | ! | | | | | + '------------------------' '------------------------' + .-----------. .-----------. + | | | ! | | + .-----+-----+-----! !-----+-----+-----. + ! ! | | ! | ! ! + ! ! !-----! !-----! ! ! + | | | | ! | | 0 | + '-----------------' '-----------------' + + + +## Layer 3 + + .------------------------------------.------------------------------------. + | | F1 | F2 | F3 | F4 | F5 | F6 | | | | | | | | + !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! + | | F7 | F8 | F9 | F10| F11| F12 | | |M_WU|M_CU|M_WD| | | + !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + |M_B5 |M_B4|M_B3|M_B2|M_B1| |-----!-----! |M_CL|M_CD|M_CR| | | + !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + | | |M_A2|M_A1|M_A0| | | | | | | | | | + '-----+----+----+----+----+----------'----------+----+----+----+----+-----' + | | | | | | ! | | | | | + '------------------------' '------------------------' + .-----------. .-----------. + | | | ! | | + .-----+-----+-----! !-----+-----+-----. + ! ! | | ! | ! ! + ! ! !-----! !-----! ! ! + | | | | ! | | | + '-----------------' '-----------------' +* M_A Mouse acceleration +* M_B Mouse button +* M_C Mouse cursor +* M_W Mouse wheel + +## Layer 4 + + + + .------------------------------------.------------------------------------. + | | | | | | | | | | | | | | | + !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! + | | | | | | | | | | | | | | | + !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + | | | | | | |-----!-----! | | | | | | + !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + | | | | | | | | | | | | | | | + '-----+----+----+----+----+----------'----------+----+----+----+----+-----' + | | | | | | ! | | | | | + '------------------------' '------------------------' + .-----------. .-----------. + | | | ! | | + .-----+-----+-----! !-----+-----+-----. + ! ! | | ! | ! ! + ! ! !-----! !-----! ! ! + | | | | ! | | | + '-----------------' '-----------------' + + +## Layer 5 + + + .------------------------------------.------------------------------------. + | | | | | | | | | | | | | | | + !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! + | | | | | | | | | | | | | | | + !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + | | | | | | |-----!-----! | | | | | | + !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + | | | | | | | | | | | | | | | + '-----+----+----+----+----+----------'----------+----+----+----+----+-----' + | | | | | | ! | | | | | + '------------------------' '------------------------' + .-----------. .-----------. + | | | ! | | + .-----+-----+-----! !-----+-----+-----. + ! ! | | ! | ! ! + ! ! !-----! !-----! ! ! + | | | | ! | | | + '-----------------' '-----------------' + + +## Layer 6 + + .------------------------------------.------------------------------------. + | | | | | | | | | | | | | | | + !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! + | | | | | | | | | | | | | | | + !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + | | | | | | |-----!-----! | | | | | | + !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! + | | | | | | | | | | | | | | | + '-----+----+----+----+----+----------'----------+----+----+----+----+-----' + | | | | | | ! | | | | | + '------------------------' '------------------------' + .-----------. .-----------. + | | | ! | | + .-----+-----+-----! !-----+-----+-----. + ! ! | | ! | ! ! + ! ! !-----! !-----! ! ! + | | | | ! | | | + '-----------------' '-----------------' + diff --git a/keyboards/ergodox/keymaps/neo2_on_qwerz_hardware/keymap.c b/keyboards/ergodox/keymaps/neo2_on_qwerz_hardware/keymap.c deleted file mode 100644 index ab2464c42..000000000 --- a/keyboards/ergodox/keymaps/neo2_on_qwerz_hardware/keymap.c +++ /dev/null @@ -1,408 +0,0 @@ -#include "ergodox.h" -#include "action_layer.h" -#include "keymap_extras/keymap_german.h" - -#define UM 0 - -#define L0 0 // layer_0 -#define L1 1 // layer_1 -#define L2 2 // layer_2 -#define L3 3 // layer_3 -#define L4 4 // layer_4 -#define L5 5 // layer_5 -#define L6 6 // layer_6 - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* - .------------------------------------.------------------------------------. - |ESC | 1 | 2 | 3 | 4 | 5 | ´ | ` | 6 | 7 | 8 | 9 | 0 | ^ | - !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! - |TAB | X | V | L | C | W |Print| | K | H | G | F | Q | ß | - !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! - |MO(1)| U | I | A | E | O |-----!-----! S | N | R | T | D | Y | - !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! - |LSFT | ü | ö | ä | P | Z |SPACE| | B | M | , | . | J |RSFT | - '-----+----+----+----+----+----------'----------+----+----+----+----+-----' - |LCTL|LGUI|LALT|MO(3)|MO(2)| !MO(2)|MO(3)|APP |RALT|RCTL| - '------------------------' '------------------------' - .-----------. .-----------. - |VOL- |VOL+ | !MUTE |PLAY | - .-----+-----+-----! !-----+-----+-----. - ! ! | | ! | ! ! - ! ! |-----| !-----| ! ! - ! CTL ! ! ALT ! ! CTL ! ! ALT ! - |ENTER|MO(1)| TAB | !ESC |MO(1)|SPACE| - '-----------------' '-----------------' - */ -[L0] = KEYMAP( - KC_ESC, DE_1, DE_2, DE_3, DE_4, DE_5, DE_ACUT, - KC_TAB, DE_X, DE_V, DE_L, DE_C, DE_W, KC_PSCR, - MO(1), DE_U, DE_I, DE_A, DE_E, DE_O, - KC_LSFT, DE_UE, DE_OE, DE_AE, DE_P, DE_Z, KC_SPACE, - KC_LCTL, KC_LGUI, KC_LALT, MO(3), MO(2), - /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_VOLD, KC_VOLU, - /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_TRNS, - /*-*/ /*-*/ /*-*/ /*-*/ CTL_T(KC_ENTER), MO(1), ALT_T(KC_TAB), - DE_GRV, DE_6, DE_7, DE_8, DE_9, DE_0, DE_CIRC, - KC_TRNS, DE_K, DE_H, DE_G, DE_F, DE_Q, DE_SS, - /*-*/ DE_S, DE_N, DE_R, DE_T, DE_D, DE_Y, - KC_TRNS, DE_B, DE_M, DE_COMM, DE_DOT, DE_J, KC_RSFT, - /*-*/ /*-*/ MO(2), MO(3), KC_APP, KC_RALT, KC_RCTL, - KC_MUTE, KC_MPLY, - KC_TRNS, - CTL_T(KC_ESC), MO(1), ALT_T(KC_SPACE) -), -/* - .------------------------------------.------------------------------------. - | | | | | | | | | | | | | | | - !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! - | | € | _ | [ | ] | | | | ! | < | > | = | & | | - !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! - | | \ | / | { | } | * |-----!-----! ? | ( | ) | - | : | @ | - !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! - | | # | $ | | | ~ | | | | + | % | " | ' | ; | | - '-----+----+----+----+----+----------'----------+----+----+----+----+-----' - | | | | | | ! | | | | | - '------------------------' '------------------------' - .-----------. .-----------. - | | | ! | | - .-----+-----+-----! !-----+-----+-----. - ! ! | | ! | ! ! - ! ! !-----! !-----! ! ! - | | | | ! | | | - '-----------------' '-----------------' - */ -[L1] = KEYMAP( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, DE_EURO, DE_UNDS, DE_LBRC, DE_RBRC, KC_TRNS, KC_TRNS, - KC_TRNS, DE_BSLS, DE_SLSH, DE_LCBR, DE_RCBR, DE_ASTR, - KC_TRNS, DE_HASH, DE_DLR, DE_PIPE, DE_TILD, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, DE_EXLM, DE_LESS, DE_MORE, DE_EQL, DE_AMPR, KC_TRNS, - /*-*/ DE_QST, DE_LPRN, DE_RPRN, DE_MINS, DE_COLN, DE_AT, - KC_TRNS, DE_PLUS, DE_PERC, DE_DQOT, DE_QUOT, DE_SCLN, KC_TRNS, - /*-*/ /*-*/ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS -), -/* - * .------------------------------------.------------------------------------. - * | | | | | | | | | | | | | | | - * !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! - * | |PGUP|BSPC| UP |DEL |PGDN| | | | 7 | 8 | 9 | | | - * !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! - * | |HOME|LEFT|DOWN|RGHT|END |-----!-----! | 4 | 5 | 6 | | | - * !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! - * | | | |PREV|NEXT| | | | | 1 | 2 | 3 | | | - * '-----+----+----+----+----+----------'----------+----+----+----+----+-----' - * | | | | | | ! | | | | | - * '------------------------' '------------------------' - * .-----------. .-----------. - * | | | ! | | - * .-----+-----+-----! !-----+-----+-----. - * ! ! | | ! | ! ! - * ! ! !-----! !-----! ! ! - * | | | | ! | | 0 | - * '-----------------' '-----------------' - */ -[L2] = KEYMAP( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, KC_TRNS, - KC_TRNS, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, - KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, DE_7, DE_8, DE_9, KC_TRNS, KC_TRNS, - /*-*/ KC_TRNS, DE_4, DE_5, DE_6, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, DE_1, DE_2, DE_3, KC_TRNS, KC_TRNS, - /*-*/ /*-*/ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_TRNS, DE_0 -), -/* - * .------------------------------------.------------------------------------. - * | | F1 | F2 | F3 | F4 | F5 | F6 | | | | | | | | - * !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! - * | | F7 | F8 | F9 | F10| F11| F12 | | |M_WU|M_CU|M_WD| | | - * !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! - * |M_B5 |M_B4|M_B3|M_B2|M_B1| |-----!-----! |M_CL|M_CD|M_CR| | | - * !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! - * | | |M_A2|M_A1|M_A0| | | | | | | | | | - * '-----+----+----+----+----+----------'----------+----+----+----+----+-----' - * | | | | | | ! | | | | | - * '------------------------' '------------------------' - * .-----------. .-----------. - * | | | ! | | - * .-----+-----+-----! !-----+-----+-----. - * ! ! | | ! | ! ! - * ! ! !-----! !-----! ! ! - * | | | | ! | | | - * '-----------------' '-----------------' - */ -[L3] = KEYMAP( - KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, - KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, - KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, KC_BTN1, KC_TRNS, - KC_TRNS, KC_TRNS, KC_ACL2, KC_ACL1, KC_ACL0, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_WH_U, KC_MS_U, KC_WH_D, KC_TRNS, KC_TRNS, - /*-*/ KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, 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, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS -), -/* - * .------------------------------------.------------------------------------. - * | | | | | | | | | | | | | | | - * !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! - * | | | | | | | | | | | | | | | - * !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! - * | | | | | | |-----!-----! | | | | | | - * !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! - * | | | | | | | | | | | | | | | - * '-----+----+----+----+----+----------'----------+----+----+----+----+-----' - * | | | | | | ! | | | | | - * '------------------------' '------------------------' - * .-----------. .-----------. - * | | | ! | | - * .-----+-----+-----! !-----+-----+-----. - * ! ! | | ! | ! ! - * ! ! !-----! !-----! ! ! - * | | | | ! | | | - * '-----------------' '-----------------' - */ -[L4] = 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, 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, 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, - 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, 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, KC_TRNS -), -/* - * .------------------------------------.------------------------------------. - * | | | | | | | | | | | | | | | - * !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! - * | | | | | | | | | | | | | | | - * !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! - * | | | | | | |-----!-----! | | | | | | - * !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! - * | | | | | | | | | | | | | | | - * '-----+----+----+----+----+----------'----------+----+----+----+----+-----' - * | | | | | | ! | | | | | - * '------------------------' '------------------------' - * .-----------. .-----------. - * | | | ! | | - * .-----+-----+-----! !-----+-----+-----. - * ! ! | | ! | ! ! - * ! ! !-----! !-----! ! ! - * | | | | ! | | | - * '-----------------' '-----------------' - */ -[L5] = 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, 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, 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, - 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, 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, KC_TRNS -), -/* - * .------------------------------------.------------------------------------. - * | | | | | | | | | | | | | | | - * !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! - * | | | | | | | | | | | | | | | - * !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! - * | | | | | | |-----!-----! | | | | | | - * !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! - * | | | | | | | | | | | | | | | - * '-----+----+----+----+----+----------'----------+----+----+----+----+-----' - * | | | | | | ! | | | | | - * '------------------------' '------------------------' - * .-----------. .-----------. - * | | | ! | | - * .-----+-----+-----! !-----+-----+-----. - * ! ! | | ! | ! ! - * ! ! !-----! !-----! ! ! - * | | | | ! | | | - * '-----------------' '-----------------' - */ -[L6] = 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, 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, 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, - 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, 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, KC_TRNS -), -}; - -const uint16_t PROGMEM fn_actions[] = {}; - -#define UC_MODE_WIN 0 -#define UC_MODE_LINUX 1 -#define UC_MODE_OSX 2 - -// TODO: allow default mode to be configured -static uint16_t unicode_mode = UC_MODE_WIN; - -uint16_t hextokeycode(uint8_t hex) { - if (hex == 0x0) { - return KC_P0; - } - if (hex < 0xA) { - return KC_P1 + (hex - 0x1); - } - return KC_A + (hex - 0xA); -} - -void unicode_action_function(uint16_t hi, uint16_t lo) { - switch (unicode_mode) { - case UC_MODE_WIN: - register_code(KC_LALT); - - register_code(KC_PPLS); - unregister_code(KC_PPLS); - - register_code(hextokeycode((hi & 0xF0) >> 4)); - unregister_code(hextokeycode((hi & 0xF0) >> 4)); - register_code(hextokeycode((hi & 0x0F))); - unregister_code(hextokeycode((hi & 0x0F))); - register_code(hextokeycode((lo & 0xF0) >> 4)); - unregister_code(hextokeycode((lo & 0xF0) >> 4)); - register_code(hextokeycode((lo & 0x0F))); - unregister_code(hextokeycode((lo & 0x0F))); - - unregister_code(KC_LALT); - break; - case UC_MODE_LINUX: - register_code(KC_LCTL); - register_code(KC_LSFT); - - register_code(KC_U); - unregister_code(KC_U); - - register_code(hextokeycode((hi & 0xF0) >> 4)); - unregister_code(hextokeycode((hi & 0xF0) >> 4)); - register_code(hextokeycode((hi & 0x0F))); - unregister_code(hextokeycode((hi & 0x0F))); - register_code(hextokeycode((lo & 0xF0) >> 4)); - unregister_code(hextokeycode((lo & 0xF0) >> 4)); - register_code(hextokeycode((lo & 0x0F))); - unregister_code(hextokeycode((lo & 0x0F))); - - unregister_code(KC_LCTL); - unregister_code(KC_LSFT); - break; - case UC_MODE_OSX: - break; - } -} - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - if (!record->event.pressed) { - return MACRO_NONE; - } - // MACRODOWN only works in this function - switch(id) { - case UM: - unicode_mode = (unicode_mode + 1) % 2; - break; - - - default: - break; - } - return MACRO_NONE; -}; - -// Runs just one time when the keyboard initializes. -void matrix_init_user(void) { - -}; - -// Runs constantly in the background, in a loop. -void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); - - ergodox_board_led_off(); - ergodox_right_led_1_off(); - ergodox_right_led_2_off(); - ergodox_right_led_3_off(); - switch (layer) { - case L1: - ergodox_right_led_1_on(); - break; - case L2: - ergodox_right_led_2_on(); - break; - case L3: - ergodox_right_led_3_on(); - break; - case L4: - ergodox_right_led_1_on(); - ergodox_right_led_2_on(); - break; - case L5: - ergodox_right_led_1_on(); - ergodox_right_led_3_on(); - break; - // case L6: - // ergodox_right_led_2_on(); - // ergodox_right_led_3_on(); - // break; - // case L7: - // ergodox_right_led_1_on(); - // ergodox_right_led_2_on(); - // ergodox_right_led_3_on(); - // break; - default: - ergodox_board_led_off(); - break; - } -}; diff --git a/keyboards/ergodox/keymaps/neo2_on_qwerz_hardware/keymap.md b/keyboards/ergodox/keymaps/neo2_on_qwerz_hardware/keymap.md deleted file mode 100644 index d9fcda966..000000000 --- a/keyboards/ergodox/keymaps/neo2_on_qwerz_hardware/keymap.md +++ /dev/null @@ -1,194 +0,0 @@ -# Neo2 for ErgoDox on QWERTZ -# -# Description -This layout is ment to be used on PCs with DE-de with an additional guest keyboard. E.g. on your PC at work you can use your ergodox with neo but a second keybord is plugged in so your coworkers can enter a few signs if necessary. I live in Germany, so this is my usecase. -# Layers -[Layer0](#layer-0) -Letters, modifiers and volume - -[Layer1](#layer-1) -Symbols - -[Layer2](#layer-2) -Motion, digits and next/prev Song - -[Layer3](#layer-3) -F1 to F12 and mouse actions - -[Layer4](#layer-4) -not used - -[Layer5](#layer-5) -not used - -[Layer6](#layer-6) -not used - - -## Layer 0 - - .------------------------------------.------------------------------------. - |ESC | 1 | 2 | 3 | 4 | 5 | ´ | ` | 6 | 7 | 8 | 9 | 0 | ^ | - !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! - |TAB | X | V | L | C | W |Print| | K | H | G | F | Q | ß | - !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! - |MO(1)| U | I | A | E | O |-----!-----! S | N | R | T | D | Y | - !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! - |LSFT | ü | ö | ä | P | Z |SPACE| | B | M | , | . | J |RSFT | - '-----+----+----+----+----+----------'----------+----+----+----+----+-----' - |LCTL|LGUI|LALT|MO(3)|MO(2)| !MO(2)|MO(3)|APP |RALT|RCTL| - '------------------------' '------------------------' - .-----------. .-----------. - |VOL- |VOL+ | !MUTE |PLAY | - .-----+-----+-----! !-----+-----+-----. - ! ! | | ! | ! ! - ! ! |-----| !-----| ! ! - ! CTL ! ! ALT ! ! CTL ! ! ALT ! - |ENTER|MO(1)| TAB | !ESC |MO(1)|SPACE| - '-----------------' '-----------------' - -* Left side ESC, TAB, [SymbolLayer], Shift, Ctr, Gui(Windows key), and Alt like normal QWERTZ with neo2. -* Space on right side of left half for mous activity so you don't have to leave the mouse for Space. -* Top row of thumb keys is hard to reach for me, so I put media control on there. -* Thumb keys make use of modifier/tap. E.g. if you tap the Enter key it will be Enter. If you keep it pressed down it will be Ctr. The hold action is written on top of the tap action. -* The small middle thumb keys are not used, es well as the 1.5 sized ones on the left side of the right half. - - -## Layer 1 - - .------------------------------------.------------------------------------. - | | | | | | | | | | | | | | | - !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! - | | € | _ | [ | ] | | | | ! | < | > | = | & | | - !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! - | | \ | / | { | } | * |-----!-----! ? | ( | ) | - | : | @ | - !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! - | | # | $ | | | ~ | | | | + | % | " | ' | ; | | - '-----+----+----+----+----+----------'----------+----+----+----+----+-----' - | | | | | | ! | | | | | - '------------------------' '------------------------' - .-----------. .-----------. - | | | ! | | - .-----+-----+-----! !-----+-----+-----. - ! ! | | ! | ! ! - ! ! !-----! !-----! ! ! - | | | | ! | | | - '-----------------' '-----------------' - - -## Layer 2 - - .------------------------------------.------------------------------------. - | | | | | | | | | | | | | | | - !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! - | |PGUP|BSPC| UP |DEL |PGDN| | | | 7 | 8 | 9 | | | - !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! - | |HOME|LEFT|DOWN|RGHT|END |-----!-----! | 4 | 5 | 6 | | | - !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! - | | | |PREV|NEXT| | | | | 1 | 2 | 3 | | | - '-----+----+----+----+----+----------'----------+----+----+----+----+-----' - | | | | | | ! | | | | | - '------------------------' '------------------------' - .-----------. .-----------. - | | | ! | | - .-----+-----+-----! !-----+-----+-----. - ! ! | | ! | ! ! - ! ! !-----! !-----! ! ! - | | | | ! | | 0 | - '-----------------' '-----------------' - - - -## Layer 3 - - .------------------------------------.------------------------------------. - | | F1 | F2 | F3 | F4 | F5 | F6 | | | | | | | | - !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! - | | F7 | F8 | F9 | F10| F11| F12 | | |M_WU|M_CU|M_WD| | | - !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! - |M_B5 |M_B4|M_B3|M_B2|M_B1| |-----!-----! |M_CL|M_CD|M_CR| | | - !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! - | | |M_A2|M_A1|M_A0| | | | | | | | | | - '-----+----+----+----+----+----------'----------+----+----+----+----+-----' - | | | | | | ! | | | | | - '------------------------' '------------------------' - .-----------. .-----------. - | | | ! | | - .-----+-----+-----! !-----+-----+-----. - ! ! | | ! | ! ! - ! ! !-----! !-----! ! ! - | | | | ! | | | - '-----------------' '-----------------' -* M_A Mouse acceleration -* M_B Mouse button -* M_C Mouse cursor -* M_W Mouse wheel - -## Layer 4 - - - - .------------------------------------.------------------------------------. - | | | | | | | | | | | | | | | - !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! - | | | | | | | | | | | | | | | - !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! - | | | | | | |-----!-----! | | | | | | - !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! - | | | | | | | | | | | | | | | - '-----+----+----+----+----+----------'----------+----+----+----+----+-----' - | | | | | | ! | | | | | - '------------------------' '------------------------' - .-----------. .-----------. - | | | ! | | - .-----+-----+-----! !-----+-----+-----. - ! ! | | ! | ! ! - ! ! !-----! !-----! ! ! - | | | | ! | | | - '-----------------' '-----------------' - - -## Layer 5 - - - .------------------------------------.------------------------------------. - | | | | | | | | | | | | | | | - !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! - | | | | | | | | | | | | | | | - !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! - | | | | | | |-----!-----! | | | | | | - !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! - | | | | | | | | | | | | | | | - '-----+----+----+----+----+----------'----------+----+----+----+----+-----' - | | | | | | ! | | | | | - '------------------------' '------------------------' - .-----------. .-----------. - | | | ! | | - .-----+-----+-----! !-----+-----+-----. - ! ! | | ! | ! ! - ! ! !-----! !-----! ! ! - | | | | ! | | | - '-----------------' '-----------------' - - -## Layer 6 - - .------------------------------------.------------------------------------. - | | | | | | | | | | | | | | | - !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! - | | | | | | | | | | | | | | | - !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! - | | | | | | |-----!-----! | | | | | | - !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! - | | | | | | | | | | | | | | | - '-----+----+----+----+----+----------'----------+----+----+----+----+-----' - | | | | | | ! | | | | | - '------------------------' '------------------------' - .-----------. .-----------. - | | | ! | | - .-----+-----+-----! !-----+-----+-----. - ! ! | | ! | ! ! - ! ! !-----! !-----! ! ! - | | | | ! | | | - '-----------------' '-----------------' - -- cgit v1.2.3 From e66b31a648080ec7dde4a265014bf71dfd6a4114 Mon Sep 17 00:00:00 2001 From: Brendan Johan Lee Date: Sat, 11 Mar 2017 12:22:38 +0100 Subject: [deadcyclo layout] Added second unicode layer, more sane layer switches --- .../deadcyclo/images/deadcyclo-base-layout.png | Bin 79488 -> 97053 bytes .../images/deadcyclo-layer-2-media-and-mouse.png | Bin 62258 -> 66254 bytes .../images/deadcyclo-layer-3-navigation.png | Bin 58886 -> 0 bytes .../deadcyclo/images/deadcyclo-layer-3-unicode.png | Bin 0 -> 73624 bytes .../images/deadcyclo-layer-4-unicode-2.png | Bin 0 -> 66132 bytes keyboards/ergodox/keymaps/deadcyclo/keymap.c | 84 ++++++++++++++++----- keyboards/ergodox/keymaps/deadcyclo/readme.md | 9 ++- 7 files changed, 73 insertions(+), 20 deletions(-) delete mode 100644 keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png create mode 100644 keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-unicode.png create mode 100644 keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-4-unicode-2.png diff --git a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-base-layout.png b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-base-layout.png index 2c03af581..273a49778 100644 Binary files a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-base-layout.png and b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-base-layout.png differ diff --git a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-2-media-and-mouse.png b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-2-media-and-mouse.png index a267ff23d..798952aa9 100644 Binary files a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-2-media-and-mouse.png and b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-2-media-and-mouse.png differ diff --git a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png deleted file mode 100644 index c8c90cf5c..000000000 Binary files a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png and /dev/null differ diff --git a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-unicode.png b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-unicode.png new file mode 100644 index 000000000..0c6473abb Binary files /dev/null and b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-unicode.png differ diff --git a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-4-unicode-2.png b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-4-unicode-2.png new file mode 100644 index 000000000..4488e1b37 Binary files /dev/null and b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-4-unicode-2.png differ diff --git a/keyboards/ergodox/keymaps/deadcyclo/keymap.c b/keyboards/ergodox/keymaps/deadcyclo/keymap.c index 5774511cc..243ce94e9 100644 --- a/keyboards/ergodox/keymaps/deadcyclo/keymap.c +++ b/keyboards/ergodox/keymaps/deadcyclo/keymap.c @@ -5,8 +5,9 @@ #define BASE 0 // default layer #define SYMB 1 // symbols -#define MDIA 2 // media keys -#define NAVG 3 // navigation +#define MDIA 2 // media keys and navigation +#define UNI 3 // unicode 1 +#define UNI2 4 // unicode 2 enum macros { RUN @@ -94,11 +95,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,--------------------------------------------------. ,--------------------------------------------------. * | Esc/L3 | 1 | 2 | 3 | 4 | 5 | 6 | | 6 | 7 | 8 | 9 | 0 | - | =/L3 | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Tab/L1 | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \/L1 | + * | Tab/L1 | Q | W | E | R | T | L1 | | L2 | Y | U | I | O | P | \/L1 | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | LCtrl | A | S | D | F | G |------| |------| H | J | K | L |; / L2| ctrl/'| + * | LCtrl | A | S | D | F | G |------| |------| H | J | K | L | ; | ctrl/'| * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| - * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | + * | LShift |Z / L4|X / L2| C | V | B | | | | N | M | , |. / L2|/ / L4| RShift | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * |Grv/L1| UNI |AltShf| Lalt | Ralt | | Lalt | Ralt | LEAD | UNI | ~/L1 | * `----------------------------------' `----------------------------------' @@ -114,25 +115,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Otherwise, it needs KC_* [BASE] = KEYMAP( // layer 0 : default // left hand - LT(NAVG,KC_ESC), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, + LT(UNI,KC_ESC), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, LT(SYMB,KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), - KC_LCTL, LT(MDIA, KC_A), KC_S, KC_D, KC_F, KC_G, - KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, LT(4, KC_Z), LT(MDIA, KC_X), KC_C, KC_V, KC_B, ALL_T(KC_NO), LT(SYMB,KC_GRV),LCTL(LSFT(KC_U)), LALT(KC_LSFT), KC_RALT,KC_LALT, ALT_T(KC_APP), KC_HOME, KC_END, KC_SPC,KC_TAB,KC_LBRC, // right hand - KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, LT(NAVG,KC_EQL), - TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, LT(SYMB, KC_BSLS), - KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),CTL_T(KC_QUOT), - MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, + KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, LT(UNI,KC_EQL), + TG(MDIA), KC_Y, KC_U, KC_I, KC_O, KC_P, LT(SYMB, KC_BSLS), + KC_H, KC_J, KC_K, KC_L, KC_SCLN,CTL_T(KC_QUOT), + MEH_T(KC_NO),KC_N, KC_M, KC_COMM,LT(MDIA, KC_DOT), LT(UNI2, KC_SLSH), KC_RSFT, KC_LALT, KC_RALT,KC_LEAD,LCTL(LSFT(KC_U)), LT(SYMB,KC_TILD), KC_PGUP, KC_INS, KC_PGDN, - KC_RBRC,KC_BSPC, KC_ENT + KC_RBRC,KC_BSPC, KC_ENT ), -/* Keymap 1: Symbol Layer LCTL(LSFT(KC_U)) +/* Keymap 1: Symbol Layer LCTL(LSFT(KC_U)) * * ,--------------------------------------------------. ,--------------------------------------------------. * | | F1 | F2 | F3 | F4 | F5 | F6 | | F6 | F7 | F8 | F9 | F10 | F11 | F12 | @@ -177,13 +178,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 2: Media, mouse and navigation * * ,--------------------------------------------------. ,--------------------------------------------------. - * | | gg(1)| | | | | | | | | | | | | | + * | | gg(1)| gg(2)| gg(3)| gg(4)| gg(5)| gg(6)| | gg(6)| gg(7)| gg(8)| gg(9)| gg(0)| | | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * | | | | MsUp | RUN | | | | | | | Up | | | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | | |MsLeft|MsDown|MsRght| |------| |------| | Left | Down | Right| | Play | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | | | | | | | Prev | Next | | | + * | | | | | | | | | | | Prev | Next | | | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | * `----------------------------------' `----------------------------------' @@ -209,7 +210,7 @@ KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, M(RUN), KC_TRNS, KC_TRNS, F(I3_GO_GROUP_6), F(I3_GO_GROUP_7), F(I3_GO_GROUP_8), F(I3_GO_GROUP_9), F(I3_GO_GROUP_10), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_MPLY, - KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -238,7 +239,7 @@ KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, M(RUN), KC_TRNS, KC_TRNS, * `--------------------' `--------------------' */ // Unicode -[NAVG] = KEYMAP( +[UNI] = KEYMAP( KC_TRNS, UC(0x250c), UC(0x2510), UC(0x2514), UC(0x2518), UC(0x2502), UC(0x2500), KC_TRNS, F(EMOJI_SHRUG), F(EMOJI_YAY), F(EMOJI_HUG), F(EMOJI_SMILE), F(EMOJI_SMILE2), KC_TRNS, KC_TRNS, F(EMOJI_HMM1), F(EMOJI_HMM2), F(EMOJI_BEAR1), F(EMOJI_BEAR2), F(EMOJI_FUU), @@ -257,6 +258,48 @@ KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, M(RUN), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), + +/* Keymap 4: Unicode 2 + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | ¹ | ² | ³ | ⁴ | ⁵ | ⁶ | | ⁶ | ⁷ | ⁸ | ⁹ | ⁰ | ℃ | ™ | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | ₁ | ₂ | ₃ | ₄ | ₅ | ₆ | | ₆ | ₇ | ₈ | ₉ | ₀ | ⁄ | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | ⅞ | ⅝ | ⅜ | ⅛ | ⅚ |------| |------| ⅓ | ⅒ | ⅑ | ⅐ | ¾ | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | ⅗ | ⅖ | ⅕ | ⅔ | | ¼ | ⅙ | ⅘ | ½ | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// Unicode 2 +[UNI2] = KEYMAP( + KC_TRNS, UC(0x00b9), UC(0x00b2), UC(0x00b3), UC(0x2074), UC(0x2075), UC(0x2076), + KC_TRNS, UC(0x2081), UC(0x2082), UC(0x2083), UC(0x2084), UC(0x2085), UC(0x2086), + KC_TRNS, UC(0x215e), UC(0x215d), UC(0x215c), UC(0x215b), UC(0x215a), + KC_TRNS, KC_TRNS, KC_TRNS, UC(0x2157), UC(0x2156), UC(0x2155), UC(0x2154), + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + UC(0x2076), UC(0x2077), UC(0x2078), UC(0x2079), UC(0x2070), UC(0x2103), UC(0x2122), + UC(0x2086), UC(0x2087), UC(0x2088), UC(0x2089), UC(0x2080), UC(0x2044), KC_TRNS, + UC(0x2153), UC(0x2152), UC(0x2151), UC(0x2150), UC(0x00be), KC_TRNS, + UC(0x00bc), UC(0x2159), UC(0x2158), UC(0x00bd), 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 +), }; const uint16_t PROGMEM fn_actions[] = { @@ -506,8 +549,11 @@ void matrix_scan_user(void) { #endif break; case 4: - ergodox_right_led_1_on(); // TODO: Make a fourth layer + ergodox_right_led_1_on(); ergodox_right_led_3_on(); + #ifdef RGBLIGHT_ENABLE + rgblight_setrgb(0xff,0x00,0xff); + #endif break; default: // none diff --git a/keyboards/ergodox/keymaps/deadcyclo/readme.md b/keyboards/ergodox/keymaps/deadcyclo/readme.md index fa41f0ec1..c839f99c9 100644 --- a/keyboards/ergodox/keymaps/deadcyclo/readme.md +++ b/keyboards/ergodox/keymaps/deadcyclo/readme.md @@ -51,10 +51,16 @@ provides standard media control keys, and default arrow keys. ## Layer 3 - Unicode -[![Layer 3 - Unicode](images/deadcyclo-layer-3-navigation.png)](http://www.keyboard-layout-editor.com/#/gists/67d9613dcd873c68693d11863d0fd289) +[![Layer 3 - Unicode](images/deadcyclo-layer-3-unicode.png)](http://www.keyboard-layout-editor.com/#/gists/67d9613dcd873c68693d11863d0fd289) The unicode layer provides keys for directly typing unicode (utf-8) +## Layer 4 - Unicode 2 + +[![Layer 43 - Unicode](images/deadcyclo-layer-4-unicode-2.png)](http://www.keyboard-layout-editor.com/#/gists/7b2241110ab8311d9668a0798f3baf4a) + +The unicode 2 layer provides keys for directly typing unicode (utf-8) + # Changelog - 02.01.2017 Added delete key on second layer @@ -63,6 +69,7 @@ The unicode layer provides keys for directly typing unicode (utf-8) - 24.01.2017 Added unicode keys. Added shrug hug and yay. Moved Navigation to layer 2 - 25.01.2017 Added lots of new emojis and some unicode keys - 27.01.2017 Added new unicode keys and shortcut for ibus unicode composer key (CTRL+SHIFT+U) +- 11.03.2017 Added additional unicode layer. Moved some layer switch keys to more sane locations # TODO -- cgit v1.2.3 From 0d71e631ed5f06b28a83528ed4de3c0f7f90d1ea Mon Sep 17 00:00:00 2001 From: Brendan Johan Lee Date: Sat, 11 Mar 2017 12:27:46 +0100 Subject: [deadcyclo layout] fix an error in layer illustration --- .../images/deadcyclo-layer-2-media-and-mouse.png | Bin 66254 -> 65740 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-2-media-and-mouse.png b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-2-media-and-mouse.png index 798952aa9..5930e38ac 100644 Binary files a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-2-media-and-mouse.png and b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-2-media-and-mouse.png differ -- cgit v1.2.3 From 96bde794d8b922d71f11ec2e7eb1ba0bc0ba8d2d Mon Sep 17 00:00:00 2001 From: James Barrett Date: Sat, 11 Mar 2017 22:09:50 -0800 Subject: Update readme and default layout for TADA68 Add the default function layer mappings for the keyboard. Provide flashing instructions in the readme. --- .gitignore | 1 + keyboards/tada68/keymaps/default/keymap.c | 66 +++++------------------------- keyboards/tada68/keymaps/default/readme.md | 2 + keyboards/tada68/readme.md | 15 ++++++- 4 files changed, 26 insertions(+), 58 deletions(-) diff --git a/.gitignore b/.gitignore index f66a961fd..6029afce4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .dep *.o +*.bin *.eep *.elf *.hex diff --git a/keyboards/tada68/keymaps/default/keymap.c b/keyboards/tada68/keymaps/default/keymap.c index da57c0343..f28116e0a 100644 --- a/keyboards/tada68/keymaps/default/keymap.c +++ b/keyboards/tada68/keymaps/default/keymap.c @@ -1,9 +1,5 @@ #include "tada68.h" - -// Used for SHIFT_ESC -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) - // 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 @@ -36,63 +32,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _FL: Function Layer * ,----------------------------------------------------------------. - * | | | | | | | | | | | | | | RESET| | + * | | F1|F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|Del |Ins | * |----------------------------------------------------------------| - * | | | | | | | | | | | |BL-|BL+|BL | | + * | | |Up | | | | | | | | | | | |Hme | * |----------------------------------------------------------------| - * | | | | | | | | | | | | | | + * | |<- |Dn | ->| | | | | | | | | |End | * |----------------------------------------------------------------| - * | | F1|F2 | F3|F4 | F5| F6| F7| F8| | | | | | + * | | | |Bl-|BL |BL+| |VU-|VU+|MUT| |MouseL|MsU|Rck | * |----------------------------------------------------------------| - * | | | | | | | | | | | + * | | | | | | | |MsL|MsD|MsR | * `----------------------------------------------------------------' */ [_FL] = KEYMAP_ANSI( - #ifdef RGBLIGHT_ENABLE - _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,RESET,_______, \ - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, BL_DEC,BL_INC, BL_TOGG,_______, \ - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______, \ - _______,RGB_TOG,RGB_MOD,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD,_______,_______,_______,_______,_______, \ - _______,_______,_______, _______, _______,_______,_______,_______,_______, _______), - #else - _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,RESET,_______, \ - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, BL_DEC,BL_INC, BL_TOGG,_______, \ - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______, \ - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ - _______,_______,_______, _______, _______,_______,_______,_______,_______, _______), - #endif -}; - -/*enum function_id { - //SHIFT_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_INS , \ + _______,_______,KC_UP, _______,_______,_______,_______,_______,_______,_______,_______, BL_DEC,BL_INC, BL_TOGG,KC_HOME, \ + _______,KC_LEFT,KC_DOWN,KC_RIGHT,_______,_______,_______,_______,_______,_______,_______,_______, _______,KC_END, \ + _______,_______,_______,BL_DEC, BL_TOGG,BL_INC, _______,KC_VOLD,KC_VOLU,KC_MUTE,_______,KC_BTN1, KC_MS_U, KC_BTN2, \ + _______,_______,_______, _______, _______,_______,_______,KC_MS_L,KC_MS_D, KC_MS_R), }; - -const uint16_t PROGMEM fn_actions[] = { - //[0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -}*/ diff --git a/keyboards/tada68/keymaps/default/readme.md b/keyboards/tada68/keymaps/default/readme.md index 36760d6b9..53412d7c2 100644 --- a/keyboards/tada68/keymaps/default/readme.md +++ b/keyboards/tada68/keymaps/default/readme.md @@ -1 +1,3 @@ # default TADA68 layout + +This layout replicates the default factory layout of the TADA68. diff --git a/keyboards/tada68/readme.md b/keyboards/tada68/readme.md index 552fdea52..dbe2fdca1 100644 --- a/keyboards/tada68/readme.md +++ b/keyboards/tada68/readme.md @@ -1,4 +1,15 @@ TADA68 keyboard firmware -====================== +======================== -TODO: to be updated. +1) from the keyboards/tada68 directory run: +``` +$ make flashbin +``` + +2) hit the reset button on the TADA, the lights will start flashing. + +3) You'll see a new drive on your computer called TADA68. Backup the original factory `FLASH.BIN` file thats inside it. + +4) Delete `FLASH.BIN` from the TADA drive and copy `tada68_default.bin` that was generated at the root of the qmk directory into the TADA drive. + +5) Hit ESC on the keyboard. The lights will stop flashing and your firmware is loaded! \ No newline at end of file -- cgit v1.2.3 From ec9210959fc67ce631ce5bd2e177fbb49924c1c7 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Mon, 13 Mar 2017 12:12:09 -0400 Subject: Update readme.md --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 21bb79a49..7871a12cb 100644 --- a/readme.md +++ b/readme.md @@ -1,6 +1,6 @@ # Quantum Mechanical Keyboard Firmware -[![Build Status](https://travis-ci.org/qmk/qmk_firmware.svg?branch=master)](https://travis-ci.org/jackhumbert/qmk_firmware) [![Gitter](https://badges.gitter.im/qmk/qmk_firmware.svg)](https://gitter.im/qmk/qmk_firmware?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) +[![Build Status](https://travis-ci.org/qmk/qmk_firmware.svg?branch=master)](https://travis-ci.org/qmk/qmk_firmware) [![Gitter](https://badges.gitter.im/qmk/qmk_firmware.svg)](https://gitter.im/qmk/qmk_firmware?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) This is a keyboard firmware based on the [tmk_keyboard firmware](http://github.com/tmk/tmk_keyboard) with some useful features for Atmel AVR controllers, and more specifically, the [OLKB product line](http://olkb.com), the [ErgoDox EZ](http://www.ergodox-ez.com) keyboard, and the [Clueboard product line](http://clueboard.co/). -- cgit v1.2.3 From 52ea58805a74fd4310f3c6a26271245001127cce Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Tue, 14 Mar 2017 09:51:48 -0400 Subject: Add RGB underglow, move keys to allow Adjust layer to be reached --- keyboards/lets_split/keymaps/hexwire/Makefile | 1 + keyboards/lets_split/keymaps/hexwire/README.md | 6 +++--- keyboards/lets_split/keymaps/hexwire/config.h | 6 ++++++ keyboards/lets_split/keymaps/hexwire/keymap.c | 10 +++++----- 4 files changed, 15 insertions(+), 8 deletions(-) create mode 100644 keyboards/lets_split/keymaps/hexwire/Makefile diff --git a/keyboards/lets_split/keymaps/hexwire/Makefile b/keyboards/lets_split/keymaps/hexwire/Makefile new file mode 100644 index 000000000..1e3cebb14 --- /dev/null +++ b/keyboards/lets_split/keymaps/hexwire/Makefile @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes diff --git a/keyboards/lets_split/keymaps/hexwire/README.md b/keyboards/lets_split/keymaps/hexwire/README.md index 2dc044646..edf2b6627 100644 --- a/keyboards/lets_split/keymaps/hexwire/README.md +++ b/keyboards/lets_split/keymaps/hexwire/README.md @@ -75,7 +75,7 @@ Hexwire's Let's Split Layout |----+----+----+----+----+----| |----+----+----+----+----+----| ,CPYP, , ,DOWN,LCBR, RCBR, P1 , P2 , P3 ,MINS, , |----+----+----+----+----+----| |----+----+----+----+----+----| - , , , , , , DEL , P0 ,PDOT, , , + , , , , , , DEL , , P0 ,PDOT, , `----+----+----+----+----+----' `----+----+----+----+----+----' ``` @@ -87,9 +87,9 @@ Hexwire's Let's Split Layout |----+----+----+----+----+----| |----+----+----+----+----+----| DEL ,MPRV,MNXT,VOLU,PGUP,UNDS, EQL ,HOME, , , ,BSLS, |----+----+----+----+----+----| |----+----+----+----+----+----| - ,MSTP,MPLY,VOLD,PGDN,MINS, PLUS,END , , , , , + MUTE,MSTP,MPLY,VOLD,PGDN,MINS, PLUS,END , , , , , |----+----+----+----+----+----| |----+----+----+----+----+----| - , , , ,MUTE, , , , , , , + , , , , , , , , , , , `----+----+----+----+----+----' `----+----+----+----+----+----' ``` diff --git a/keyboards/lets_split/keymaps/hexwire/config.h b/keyboards/lets_split/keymaps/hexwire/config.h index cd766cc4f..b45214fe0 100644 --- a/keyboards/lets_split/keymaps/hexwire/config.h +++ b/keyboards/lets_split/keymaps/hexwire/config.h @@ -20,6 +20,12 @@ along with this program. If not, see . #define EE_HANDS +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 8 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 #ifdef SUBPROJECT_rev1 #include "../../rev1/config.h" diff --git a/keyboards/lets_split/keymaps/hexwire/keymap.c b/keyboards/lets_split/keymaps/hexwire/keymap.c index bae2e687e..796a1fcab 100644 --- a/keyboards/lets_split/keymaps/hexwire/keymap.c +++ b/keyboards/lets_split/keymaps/hexwire/keymap.c @@ -83,7 +83,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|----+----+----+----+----+----| |----+----+----+----+----+----| ,CPYP, , ,DOWN,LCBR, RCBR, P1 , P2 , P3 ,MINS, , //|----+----+----+----+----+----| |----+----+----+----+----+----| - , , , , , , DEL , P0 ,PDOT, , , + , , , , , , DEL , , P0 ,PDOT, , //`----+----+----+----+----+----' `----+----+----+----+----+----' ), @@ -93,9 +93,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|----+----+----+----+----+----| |----+----+----+----+----+----| DEL ,MPRV,MNXT,VOLU,PGUP,UNDS, EQL ,HOME, , , ,BSLS, //|----+----+----+----+----+----| |----+----+----+----+----+----| - ,MSTP,MPLY,VOLD,PGDN,MINS, PLUS,END , , , , , + MUTE,MSTP,MPLY,VOLD,PGDN,MINS, PLUS,END , , , , , //|----+----+----+----+----+----| |----+----+----+----+----+----| - , , , ,MUTE, , , , , , , + , , , , , , , , , , , //`----+----+----+----+----+----' `----+----+----+----+----+----' ), @@ -113,7 +113,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. - * | | Reset| | | | | | | | | | Del | + * | | Reset|RGB Tg|RGB Md|Hue Up|Hue Dn|Sat Up|Sat Dn|Val Up|Val Dn| | | * |------+------+------+------+------+-------------+------+------+------+------+------| * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | * |------+------+------+------+------+------|------+------+------+------+------+------| @@ -123,7 +123,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_ADJUST] = KEYMAP( \ - _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, RESET , RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, _______, \ _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ -- cgit v1.2.3 From 2e34d4bd85cc748c48e907154ea438f3d9653430 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Wed, 15 Mar 2017 10:57:24 -0400 Subject: update for infinity --- keyboards/ergodox/keymaps/guni/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/ergodox/keymaps/guni/keymap.c b/keyboards/ergodox/keymaps/guni/keymap.c index f33829b8a..9d9191f62 100644 --- a/keyboards/ergodox/keymaps/guni/keymap.c +++ b/keyboards/ergodox/keymaps/guni/keymap.c @@ -170,7 +170,7 @@ void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) if (id == TEENSY_KEY) { clear_keyboard(); print("\n\nJump to bootloader... "); - _delay_ms(250); + wait_ms(250); bootloader_jump(); // should not return print("not supported.\n"); } -- cgit v1.2.3 From cf28f7bfdaf7a2e5f8734c0936f5e48b93c9353a Mon Sep 17 00:00:00 2001 From: Dylan Khor Date: Wed, 15 Mar 2017 23:07:29 -0400 Subject: Add custom keycap --- keyboards/planck/keymaps/khord/keymap.c | 318 ++++++++++++++++++++++++++++++++ 1 file changed, 318 insertions(+) create mode 100644 keyboards/planck/keymaps/khord/keymap.c diff --git a/keyboards/planck/keymaps/khord/keymap.c b/keyboards/planck/keymaps/khord/keymap.c new file mode 100644 index 000000000..478e1f822 --- /dev/null +++ b/keyboards/planck/keymaps/khord/keymap.c @@ -0,0 +1,318 @@ +// This is the canonical layout file for the Quantum project. If you want to add another keyboard, +// this is the style you want to emulate. + +#include "planck.h" +#include "action_layer.h" +#ifdef AUDIO_ENABLE + #include "audio.h" +#endif +#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 _PLOVER 5 +#define _ADJUST 16 + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + PLOVER, + LOWER, + RAISE, + BACKLIT, + EXT_PLV +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +// Dylan's additions +#define C_A_DEL LALT(LCTL(KC_DEL)) +#define C_A_INS LALT(LCTL(KC_INS)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = { + {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, + {KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT }, + {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = { + {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, + {KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT }, + {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = { + {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC}, + {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH}, + {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT }, + {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = { + {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC}, + {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} +}, + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = { + {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_DEL, KC_F1, KC_F2, KC_F3, KC_F4, 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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} +}, + +/* Plover layer (http://opensteno.org) + * ,-----------------------------------------------------------------------------------. + * | # | # | # | # | # | # | # | # | # | # | # | # | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | S | T | P | H | * | * | F | P | L | T | D | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * |TogOut| S | K | W | R | * | * | R | B | G | S | Z | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Exit | | | A | O | | E | U | | | | + * `-----------------------------------------------------------------------------------' + */ + +[_PLOVER] = { + {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 }, + {XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC}, + {XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX} +}, + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = { + {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, + {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______}, + {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, C_A_INS, C_A_DEL} +} + + +}; + +#ifdef AUDIO_ENABLE + +float tone_startup[][2] = SONG(SONIC_RING); //plug in +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +float tone_plover[][2] = SONG(PLOVER_SOUND); +float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND); +float music_scale[][2] = SONG(ZELDA_PUZZLE); //music mode + +float tone_goodbye[][2] = SONG(GOODBYE_SOUND); +#endif + + +void persistant_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 + persistant_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_colemak, false, 0); + #endif + persistant_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + #endif + persistant_default_layer_set(1UL<<_DVORAK); + } + 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 BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + return false; + break; + case PLOVER: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + stop_all_notes(); + PLAY_NOTE_ARRAY(tone_plover, false, 0); + #endif + layer_off(_RAISE); + layer_off(_LOWER); + layer_off(_ADJUST); + layer_on(_PLOVER); + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + keymap_config.raw = eeconfig_read_keymap(); + keymap_config.nkro = 1; + eeconfig_update_keymap(keymap_config.raw); + } + return false; + break; + case EXT_PLV: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_plover_gb, false, 0); + #endif + layer_off(_PLOVER); + } + return false; + break; + } + return true; +} + +void matrix_init_user(void) { + #ifdef AUDIO_ENABLE + startup_user(); + #endif +} + +#ifdef AUDIO_ENABLE + +void startup_user() +{ + _delay_ms(20); // gets rid of tick + PLAY_NOTE_ARRAY(tone_startup, false, 0); +} + +void shutdown_user() +{ + PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + _delay_ms(150); + stop_all_notes(); +} + +void music_on_user(void) +{ + music_scale_user(); +} + +void music_scale_user(void) +{ + PLAY_NOTE_ARRAY(music_scale, false, 0); +} + +#endif -- cgit v1.2.3 From 73a70a2c1c78a140ac506bbe8b91ff4a7eb70da4 Mon Sep 17 00:00:00 2001 From: Dylan Khor Date: Wed, 15 Mar 2017 23:09:17 -0400 Subject: Add Makefile --- keyboards/planck/keymaps/khord/Makefile | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 keyboards/planck/keymaps/khord/Makefile diff --git a/keyboards/planck/keymaps/khord/Makefile b/keyboards/planck/keymaps/khord/Makefile new file mode 100644 index 000000000..457a3d01d --- /dev/null +++ b/keyboards/planck/keymaps/khord/Makefile @@ -0,0 +1,3 @@ +ifndef QUANTUM_DIR + include ../../../../Makefile +endif -- cgit v1.2.3 From 0c0a8ee187eb27faefe4391d978283a081896399 Mon Sep 17 00:00:00 2001 From: Dylan Khor Date: Thu, 16 Mar 2017 03:46:26 +0000 Subject: test --- keyboards/planck/keymaps/khord/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/planck/keymaps/khord/keymap.c b/keyboards/planck/keymaps/khord/keymap.c index 478e1f822..e6c90c26d 100644 --- a/keyboards/planck/keymaps/khord/keymap.c +++ b/keyboards/planck/keymaps/khord/keymap.c @@ -57,7 +57,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = { {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, {KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT }, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT) }, {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} }, -- cgit v1.2.3 From c043d1cc4709fa03e91942d9b769278994985af2 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Wed, 15 Mar 2017 23:49:38 -0400 Subject: Update config.h --- keyboards/lets_split/keymaps/hexwire/config.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/keyboards/lets_split/keymaps/hexwire/config.h b/keyboards/lets_split/keymaps/hexwire/config.h index b45214fe0..3d600d64d 100644 --- a/keyboards/lets_split/keymaps/hexwire/config.h +++ b/keyboards/lets_split/keymaps/hexwire/config.h @@ -32,4 +32,7 @@ along with this program. If not, see . #endif #ifdef SUBPROJECT_rev2 #include "../../rev2/config.h" -#endif \ No newline at end of file +#endif +#ifdef SUBPROJECT_rev2fliphalf + #include "../../rev2fliphalf/config.h" +#endif -- cgit v1.2.3 From c36a4496eb190c72c492000f38ab4e98a3681fe4 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Wed, 15 Mar 2017 23:51:56 -0400 Subject: Update config.h --- keyboards/lets_split/keymaps/hexwire/config.h | 1 + 1 file changed, 1 insertion(+) diff --git a/keyboards/lets_split/keymaps/hexwire/config.h b/keyboards/lets_split/keymaps/hexwire/config.h index 3d600d64d..983f8e352 100644 --- a/keyboards/lets_split/keymaps/hexwire/config.h +++ b/keyboards/lets_split/keymaps/hexwire/config.h @@ -21,6 +21,7 @@ along with this program. If not, see . #define EE_HANDS #undef RGBLED_NUM +#define RGB_DI_PIN B0 #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 8 #define RGBLIGHT_HUE_STEP 8 -- cgit v1.2.3 From 683754bce806c634f59dd9d926491952778f913b Mon Sep 17 00:00:00 2001 From: Dylan Khor Date: Thu, 16 Mar 2017 04:11:47 +0000 Subject: added custom tones --- quantum/audio/song_list.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/quantum/audio/song_list.h b/quantum/audio/song_list.h index 8022ca672..400915db9 100644 --- a/quantum/audio/song_list.h +++ b/quantum/audio/song_list.h @@ -122,4 +122,31 @@ E__NOTE(_E5), \ E__NOTE(_D5), +#define COIN_SOUND \ + E__NOTE(_A5 ), \ + HD_NOTE(_E6 ), + +#define ONE_UP_SOUND \ + Q__NOTE(_E6 ), \ + Q__NOTE(_G6 ), \ + Q__NOTE(_E7 ), \ + Q__NOTE(_C7 ), \ + Q__NOTE(_D7 ), \ + Q__NOTE(_G7 ), + +#define SONIC_RING \ + E__NOTE(_E6), \ + E__NOTE(_G6), \ + HD_NOTE(_C7), + +#define ZELDA_PUZZLE \ + Q__NOTE(_G5), \ + Q__NOTE(_FS5), \ + Q__NOTE(_DS5), \ + Q__NOTE(_A4), \ + Q__NOTE(_GS4), \ + Q__NOTE(_E5), \ + Q__NOTE(_GS5), \ + HD_NOTE(_C6), + #endif -- cgit v1.2.3 From 24d174595120aa6874604eed41db7ae02b26c9be Mon Sep 17 00:00:00 2001 From: Dylan Khor Date: Thu, 16 Mar 2017 12:24:31 -0400 Subject: add config.h for customization --- keyboards/planck/keymaps/khord/config.h | 90 +++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 keyboards/planck/keymaps/khord/config.h diff --git a/keyboards/planck/keymaps/khord/config.h b/keyboards/planck/keymaps/khord/config.h new file mode 100644 index 000000000..5cf96bb88 --- /dev/null +++ b/keyboards/planck/keymaps/khord/config.h @@ -0,0 +1,90 @@ +/* +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 MANUFACTURER Ortholinear Keyboards +#define PRODUCT The Planck Keyboard +#define DESCRIPTION A compact ortholinear keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* Planck PCB default pin-out */ +#define MATRIX_ROW_PINS { D0, D5, B5, B6 } +#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 } +#define UNUSED_PINS + +#define AUDIO_VOICES + +#define BACKLIGHT_PIN B7 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* 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 command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#ifdef SUBPROJECT_rev3 + #include "rev3/config.h" +#endif +#ifdef SUBPROJECT_rev4 + #include "rev4/config.h" +#endif + +#endif -- cgit v1.2.3 From 0c8f71e3c7fe258e6e084d7eec018b89a499d014 Mon Sep 17 00:00:00 2001 From: Dylan Khor Date: Thu, 16 Mar 2017 12:44:56 -0400 Subject: test tap dance --- keyboards/planck/keymaps/khord/Makefile | 1 + keyboards/planck/keymaps/khord/config.h | 3 +++ keyboards/planck/keymaps/khord/keymap.c | 14 +++++++++++++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/keyboards/planck/keymaps/khord/Makefile b/keyboards/planck/keymaps/khord/Makefile index 457a3d01d..666161d1f 100644 --- a/keyboards/planck/keymaps/khord/Makefile +++ b/keyboards/planck/keymaps/khord/Makefile @@ -1,3 +1,4 @@ ifndef QUANTUM_DIR include ../../../../Makefile endif +TAP_DANCE_ENABLE = yes diff --git a/keyboards/planck/keymaps/khord/config.h b/keyboards/planck/keymaps/khord/config.h index 5cf96bb88..76a1f8832 100644 --- a/keyboards/planck/keymaps/khord/config.h +++ b/keyboards/planck/keymaps/khord/config.h @@ -62,6 +62,9 @@ along with this program. If not, see . keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ ) +/* Tap Dance */ +#define TAPPING_TERM 200 + /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/planck/keymaps/khord/keymap.c b/keyboards/planck/keymaps/khord/keymap.c index e6c90c26d..04b95c744 100644 --- a/keyboards/planck/keymaps/khord/keymap.c +++ b/keyboards/planck/keymaps/khord/keymap.c @@ -33,6 +33,18 @@ enum planck_keycodes { EXT_PLV }; +// Tap Dance Declarations +enum { + TD_ESC_CAPS = 0 +}; + +// Tap Dance Definitions +qk_tap_dance_action_t tape_dance_actions[] = { + //Tap once for Esc, twice for Caps Lock + [TD_ESC_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_CAPS) + // Other declarations would go here, separated by commas, if you have them +}; + // Fillers to make layering more clear #define _______ KC_TRNS #define XXXXXXX KC_NO @@ -56,7 +68,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_QWERTY] = { {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, - {KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {TD(TD_ESC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT) }, {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} }, -- cgit v1.2.3 From 6ca1c49d38ddc31c5fc9ef1c180849804fe358fd Mon Sep 17 00:00:00 2001 From: Dylan Khor Date: Thu, 16 Mar 2017 13:07:01 -0400 Subject: test fixes for tap dane --- keyboards/planck/keymaps/khord/config.h | 2 +- keyboards/planck/keymaps/khord/keymap.c | 21 ++++++++++----------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/keyboards/planck/keymaps/khord/config.h b/keyboards/planck/keymaps/khord/config.h index 76a1f8832..008f3a5c2 100644 --- a/keyboards/planck/keymaps/khord/config.h +++ b/keyboards/planck/keymaps/khord/config.h @@ -63,7 +63,7 @@ along with this program. If not, see . ) /* Tap Dance */ -#define TAPPING_TERM 200 +#define TAPPING_TERM 150 /* * Feature disable options diff --git a/keyboards/planck/keymaps/khord/keymap.c b/keyboards/planck/keymaps/khord/keymap.c index 04b95c744..50a5daa57 100644 --- a/keyboards/planck/keymaps/khord/keymap.c +++ b/keyboards/planck/keymaps/khord/keymap.c @@ -33,22 +33,15 @@ enum planck_keycodes { EXT_PLV }; +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + // Tap Dance Declarations enum { TD_ESC_CAPS = 0 }; -// Tap Dance Definitions -qk_tap_dance_action_t tape_dance_actions[] = { - //Tap once for Esc, twice for Caps Lock - [TD_ESC_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_CAPS) - // Other declarations would go here, separated by commas, if you have them -}; - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Dylan's additions #define C_A_DEL LALT(LCTL(KC_DEL)) #define C_A_INS LALT(LCTL(KC_INS)) @@ -328,3 +321,9 @@ void music_scale_user(void) } #endif + +// Tap Dance Definitions +const qk_tap_dance_action_t tape_dance_actions[] = { + //Tap once for Esc, twice for Caps Lock + [TD_ESC_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_CAPS) +}; -- cgit v1.2.3 From c7cddfc539f111baeff51a2f7e6272701e0f0109 Mon Sep 17 00:00:00 2001 From: Dylan Khor Date: Thu, 16 Mar 2017 13:27:26 -0400 Subject: test td changes --- keyboards/planck/keymaps/khord/Makefile | 2 +- keyboards/planck/keymaps/khord/keymap.c | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/keyboards/planck/keymaps/khord/Makefile b/keyboards/planck/keymaps/khord/Makefile index 666161d1f..f0ed9e8dc 100644 --- a/keyboards/planck/keymaps/khord/Makefile +++ b/keyboards/planck/keymaps/khord/Makefile @@ -1,4 +1,4 @@ +TAP_DANCE_ENABLE = yes ifndef QUANTUM_DIR include ../../../../Makefile endif -TAP_DANCE_ENABLE = yes diff --git a/keyboards/planck/keymaps/khord/keymap.c b/keyboards/planck/keymaps/khord/keymap.c index 50a5daa57..52467641a 100644 --- a/keyboards/planck/keymaps/khord/keymap.c +++ b/keyboards/planck/keymaps/khord/keymap.c @@ -178,6 +178,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; + +const qk_tap_dance_action_t tape_dance_actions[] = { + [TD_ESC_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_CAPS) +}; + #ifdef AUDIO_ENABLE float tone_startup[][2] = SONG(SONIC_RING); //plug in @@ -321,9 +326,3 @@ void music_scale_user(void) } #endif - -// Tap Dance Definitions -const qk_tap_dance_action_t tape_dance_actions[] = { - //Tap once for Esc, twice for Caps Lock - [TD_ESC_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_CAPS) -}; -- cgit v1.2.3 From 4b1d0c585977884faac28f1e7210bf528af46c9a Mon Sep 17 00:00:00 2001 From: Dylan Khor Date: Thu, 16 Mar 2017 17:36:31 +0000 Subject: remove const --- keyboards/planck/keymaps/khord/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/planck/keymaps/khord/keymap.c b/keyboards/planck/keymaps/khord/keymap.c index 52467641a..64185a148 100644 --- a/keyboards/planck/keymaps/khord/keymap.c +++ b/keyboards/planck/keymaps/khord/keymap.c @@ -179,7 +179,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const qk_tap_dance_action_t tape_dance_actions[] = { +qk_tap_dance_action_t tape_dance_actions[] = { [TD_ESC_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_CAPS) }; -- cgit v1.2.3 From e03ddbe118740493a7adc59539c7edb47a98c799 Mon Sep 17 00:00:00 2001 From: Dylan Khor Date: Thu, 16 Mar 2017 18:13:53 +0000 Subject: tap dance working for esc and arrows --- keyboards/planck/keymaps/khord/keymap.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/keyboards/planck/keymaps/khord/keymap.c b/keyboards/planck/keymaps/khord/keymap.c index 64185a148..6f19966f2 100644 --- a/keyboards/planck/keymaps/khord/keymap.c +++ b/keyboards/planck/keymaps/khord/keymap.c @@ -39,7 +39,11 @@ enum planck_keycodes { // Tap Dance Declarations enum { - TD_ESC_CAPS = 0 + ESC_CAP = 0, + LFT_HOM, + DWN_PDN, + UPP_PUP, + RGT_END }; // Dylan's additions @@ -60,10 +64,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_QWERTY] = { - {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, - {TD(TD_ESC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT) }, - {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} + {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC }, + {TD(ESC_CAP), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT }, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT)}, + {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, TD(LFT_HOM), TD(DWN_PDN), TD(UPP_PUP), TD(RGT_END) } }, /* Colemak @@ -179,8 +183,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -qk_tap_dance_action_t tape_dance_actions[] = { - [TD_ESC_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_CAPS) +qk_tap_dance_action_t tap_dance_actions[] = { + [ESC_CAP] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_CAPS), + [LFT_HOM] = ACTION_TAP_DANCE_DOUBLE(KC_LEFT, KC_HOME), + [DWN_PDN] = ACTION_TAP_DANCE_DOUBLE(KC_DOWN, KC_PGDN), + [UPP_PUP] = ACTION_TAP_DANCE_DOUBLE(KC_UP, KC_PGUP), + [RGT_END] = ACTION_TAP_DANCE_DOUBLE(KC_RGHT, KC_END) }; #ifdef AUDIO_ENABLE -- cgit v1.2.3 From e123ed8d5f4837a424d8ad58bd8664a323a76f9b Mon Sep 17 00:00:00 2001 From: jprmesh Date: Wed, 15 Mar 2017 13:48:31 -0700 Subject: Added KC_KEYMAP macro for old style keymaps in Atreus62 --- keyboards/atreus62/atreus62.h | 38 +++++++++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/keyboards/atreus62/atreus62.h b/keyboards/atreus62/atreus62.h index eacf5b451..ca5cda8a8 100644 --- a/keyboards/atreus62/atreus62.h +++ b/keyboards/atreus62/atreus62.h @@ -9,18 +9,34 @@ void promicro_bootloader_jmp(bool program); // The first section contains all of the arguements // The second converts the arguments into a two-dimensional array #define KEYMAP( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \ - k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d \ ) \ { \ - { k00, k01, k02, k03, k04, k05, KC_NO, k06, k07, k08, k09, k0a, k0b }, \ - { k10, k11, k12, k13, k14, k15, KC_NO, k16, k17, k18, k19, k1a, k1b }, \ - { k20, k21, k22, k23, k24, k25, KC_NO, k26, k27, k28, k29, k2a, k2b }, \ - { k30, k31, k32, k33, k34, k35, k46, k36, k37, k38, k39, k3a, k3b }, \ - { k40, k41, k42, k43, k44, k45, k47, k48, k49, k4a, k4b, k4c, k4d } \ + { k00, k01, k02, k03, k04, k05, KC_NO, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, KC_NO, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, KC_NO, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, k46, k36, k37, k38, k39, k3a, k3b }, \ + { k40, k41, k42, k43, k44, k45, k47, k48, k49, k4a, k4b, k4c, k4d } \ } -#endif \ No newline at end of file +// Used to create a keymap using only KC_ prefixed keys. +#define KC_KEYMAP( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d \ +) \ +{ \ + { KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_NO, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b }, \ + { KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_NO, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b }, \ + { KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_NO, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b }, \ + { KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k46, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b }, \ + { KC_##k40, KC_##k41, KC_##k42, KC_##k43, KC_##k44, KC_##k45, KC_##k47, KC_##k48, KC_##k49, KC_##k4a, KC_##k4b, KC_##k4c, KC_##k4d } \ +} + +#endif -- cgit v1.2.3 From 3766f902a02da7e9355685c733f70bcff9fe5a12 Mon Sep 17 00:00:00 2001 From: Gabriel Young Date: Sat, 18 Mar 2017 15:38:03 -0700 Subject: boilerplate project created with new_project.sh --- keyboards/frosty_flake/Makefile | 3 + keyboards/frosty_flake/config.h | 162 +++++++++++++++++++++++ keyboards/frosty_flake/frosty_flake.c | 28 ++++ keyboards/frosty_flake/frosty_flake.h | 19 +++ keyboards/frosty_flake/keymaps/default/Makefile | 21 +++ keyboards/frosty_flake/keymaps/default/config.h | 8 ++ keyboards/frosty_flake/keymaps/default/keymap.c | 44 ++++++ keyboards/frosty_flake/keymaps/default/readme.md | 1 + keyboards/frosty_flake/readme.md | 28 ++++ keyboards/frosty_flake/rules.mk | 68 ++++++++++ 10 files changed, 382 insertions(+) create mode 100644 keyboards/frosty_flake/Makefile create mode 100644 keyboards/frosty_flake/config.h create mode 100644 keyboards/frosty_flake/frosty_flake.c create mode 100644 keyboards/frosty_flake/frosty_flake.h create mode 100644 keyboards/frosty_flake/keymaps/default/Makefile create mode 100644 keyboards/frosty_flake/keymaps/default/config.h create mode 100644 keyboards/frosty_flake/keymaps/default/keymap.c create mode 100644 keyboards/frosty_flake/keymaps/default/readme.md create mode 100644 keyboards/frosty_flake/readme.md create mode 100644 keyboards/frosty_flake/rules.mk diff --git a/keyboards/frosty_flake/Makefile b/keyboards/frosty_flake/Makefile new file mode 100644 index 000000000..57b2ef62e --- /dev/null +++ b/keyboards/frosty_flake/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif diff --git a/keyboards/frosty_flake/config.h b/keyboards/frosty_flake/config.h new file mode 100644 index 000000000..9390feb94 --- /dev/null +++ b/keyboards/frosty_flake/config.h @@ -0,0 +1,162 @@ +/* +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 You +#define PRODUCT frosty_flake +#define DESCRIPTION A custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 2 +#define MATRIX_COLS 3 + +/* + * 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, D5 } +#define MATRIX_COL_PINS { F1, F0, B0 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/frosty_flake/frosty_flake.c b/keyboards/frosty_flake/frosty_flake.c new file mode 100644 index 000000000..22979a451 --- /dev/null +++ b/keyboards/frosty_flake/frosty_flake.c @@ -0,0 +1,28 @@ +#include "frosty_flake.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/frosty_flake/frosty_flake.h b/keyboards/frosty_flake/frosty_flake.h new file mode 100644 index 000000000..90ea25ed9 --- /dev/null +++ b/keyboards/frosty_flake/frosty_flake.h @@ -0,0 +1,19 @@ +#ifndef FROSTY_FLAKE_H +#define FROSTY_FLAKE_H + +#include "quantum.h" + +// This a shortcut to help you visually see your layout. +// The following is an example using the Planck MIT layout +// The first section contains all of the arguements +// The second converts the arguments into a two-dimensional array +#define KEYMAP( \ + k00, k01, k02, \ + k10, k11 \ +) \ +{ \ + { k00, k01, k02 }, \ + { k10, KC_NO, k11 }, \ +} + +#endif diff --git a/keyboards/frosty_flake/keymaps/default/Makefile b/keyboards/frosty_flake/keymaps/default/Makefile new file mode 100644 index 000000000..9d3df5964 --- /dev/null +++ b/keyboards/frosty_flake/keymaps/default/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 = no # 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/frosty_flake/keymaps/default/config.h b/keyboards/frosty_flake/keymaps/default/config.h new file mode 100644 index 000000000..8893d122e --- /dev/null +++ b/keyboards/frosty_flake/keymaps/default/config.h @@ -0,0 +1,8 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here + +#endif diff --git a/keyboards/frosty_flake/keymaps/default/keymap.c b/keyboards/frosty_flake/keymaps/default/keymap.c new file mode 100644 index 000000000..1c9e33b64 --- /dev/null +++ b/keyboards/frosty_flake/keymaps/default/keymap.c @@ -0,0 +1,44 @@ +#include "frosty_flake.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = KEYMAP( /* Base */ + KC_A, KC_1, KC_H, \ + KC_TAB, KC_SPC \ +), +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; + + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/frosty_flake/keymaps/default/readme.md b/keyboards/frosty_flake/keymaps/default/readme.md new file mode 100644 index 000000000..11bf4825f --- /dev/null +++ b/keyboards/frosty_flake/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for frosty_flake diff --git a/keyboards/frosty_flake/readme.md b/keyboards/frosty_flake/readme.md new file mode 100644 index 000000000..a32965061 --- /dev/null +++ b/keyboards/frosty_flake/readme.md @@ -0,0 +1,28 @@ +frosty_flake keyboard firmware +====================== + +## Quantum MK Firmware + +For the full Quantum feature list, see [the parent readme](/). + +## Building + +Download or clone the whole firmware and navigate to the keyboards/frosty_flake folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. + +Depending on which keymap you would like to use, you will have to compile slightly differently. + +### Default + +To build with the default keymap, simply run `make default`. + +### Other Keymaps + +Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files. + +To build the firmware binary hex file with a keymap just do `make` with a keymap like this: + +``` +$ make [default|jack|] +``` + +Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. diff --git a/keyboards/frosty_flake/rules.mk b/keyboards/frosty_flake/rules.mk new file mode 100644 index 000000000..bad3387bf --- /dev/null +++ b/keyboards/frosty_flake/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=512 + + +# 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 ?= yes # Console for debug(+400) +COMMAND_ENABLE ?= yes # 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 ?= no # USB Nkey Rollover +BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default +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 +FAUXCLICKY_ENABLE ?= no # Use buzzer to emulate clicky switches -- cgit v1.2.3 From 19fd20261b895a6848c8b15fd7365d5b87b7fd72 Mon Sep 17 00:00:00 2001 From: Gabriel Young Date: Sat, 18 Mar 2017 16:19:10 -0700 Subject: sketch out frosty flake matrix using custom matrix.c based on kitten paw --- keyboards/frosty_flake/config.h | 24 +++--- keyboards/frosty_flake/matrix.c | 167 ++++++++++++++++++++++++++++++++++++++++ keyboards/frosty_flake/rules.mk | 7 +- 3 files changed, 187 insertions(+), 11 deletions(-) create mode 100644 keyboards/frosty_flake/matrix.c diff --git a/keyboards/frosty_flake/config.h b/keyboards/frosty_flake/config.h index 9390feb94..2575a52b1 100644 --- a/keyboards/frosty_flake/config.h +++ b/keyboards/frosty_flake/config.h @@ -24,13 +24,19 @@ along with this program. If not, see . #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x6060 #define DEVICE_VER 0x0001 -#define MANUFACTURER You +#define MANUFACTURER Bathroom Epiphanies #define PRODUCT frosty_flake -#define DESCRIPTION A custom keyboard +#define DESCRIPTION Frosty Flake controller for the CM Storm Quick Fire Rapid + +/* + * Frosty Flake Rev. 20140521 made by Bathroom Ephiphanies + * Schematic is available at https://deskthority.net/w/images/a/a4/Frosty_Flake_Schematics.pdf + * + */ /* key matrix size */ -#define MATRIX_ROWS 2 -#define MATRIX_COLS 3 +#define MATRIX_ROWS 8 // Row0 to Row7 in the schematic +#define MATRIX_COLS 18 // ColA to ColR in the schematic /* * Keyboard Matrix Assignments @@ -42,13 +48,13 @@ along with this program. If not, see . * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) * */ -#define MATRIX_ROW_PINS { D0, D5 } -#define MATRIX_COL_PINS { F1, F0, B0 } -#define UNUSED_PINS +//#define MATRIX_ROW_PINS { D5, D4, D6, D2, D1, D0 } +//#define MATRIX_COL_PINS << n/a >> +//#define UNUSED_PINS { B0, C4, D3 } /* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ -#define DIODE_DIRECTION COL2ROW - +//#define DIODE_DIRECTION << n/a >> + // #define BACKLIGHT_PIN B7 // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 diff --git a/keyboards/frosty_flake/matrix.c b/keyboards/frosty_flake/matrix.c new file mode 100644 index 000000000..21b0d9088 --- /dev/null +++ b/keyboards/frosty_flake/matrix.c @@ -0,0 +1,167 @@ +//TODO(gabe): customize for frosty flake + +/* + Copyright 2014 Ralf Schmitt + + 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 +#include +#include +#include +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" + +#ifndef DEBOUNCING_DELAY +# define DEBOUNCING_DELAY 5 +#endif +static uint8_t debouncing = DEBOUNCING_DELAY; + +static matrix_row_t matrix[MATRIX_ROWS]; +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + +static uint8_t read_rows(void); +static void select_col(uint8_t col); + +inline uint8_t matrix_rows(void) { + return MATRIX_ROWS; +} + +inline uint8_t matrix_cols(void) { + return MATRIX_COLS; +} + +/* Column pin configuration + * + * col: 0 1 2 3 4 5 6 7 + * pin: PC7 PD5 PD3 PD1 PC2 PD6 PD4 PD2 + * + * Rrr pin configuration + * + * These rrrs uses one 74HC154 4 to 16 bit demultiplexer (low + * active), together with 2 rrrs driven directly from the micro + * controller, to control the 18 rrrs. The rrrs are driven from + * pins B6,5,4,3,2,1,0. + */ +void matrix_init(void) { + DDRC &= ~0b10000100; // Row input pins + DDRD &= ~0b01111110; + PORTC |= 0b10000100; + PORTD |= 0b01111110; + + DDRB |= 0b01111111; // Column output pins + + for (uint8_t i=0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + matrix_debouncing[i] = 0; + } + matrix_init_quantum(); +} + +uint8_t matrix_scan(void) { + for (uint8_t col = 0; col < MATRIX_COLS; col++) { + select_col(col); + _delay_us(3); + uint8_t rows = read_rows(); + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + bool prev_bit = matrix_debouncing[row] & ((matrix_row_t)1< Date: Sun, 19 Mar 2017 00:07:48 +0000 Subject: Don't feel like tap dancing arrows anymore --- keyboards/planck/keymaps/khord/keymap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/planck/keymaps/khord/keymap.c b/keyboards/planck/keymaps/khord/keymap.c index 6f19966f2..2ee57b8f4 100644 --- a/keyboards/planck/keymaps/khord/keymap.c +++ b/keyboards/planck/keymaps/khord/keymap.c @@ -64,10 +64,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_QWERTY] = { - {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC }, - {TD(ESC_CAP), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT }, - {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT)}, - {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, TD(LFT_HOM), TD(DWN_PDN), TD(UPP_PUP), TD(RGT_END) } + {KC_TAB, KC_Q, KC_W, KC_E, KC_R KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC }, + {TD(ESC_CAP), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT }, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT)}, + {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT } }, /* Colemak -- cgit v1.2.3 From 561da65606c8b27f3fecc10f41ff139d7625fd08 Mon Sep 17 00:00:00 2001 From: Dylan Khor Date: Sun, 19 Mar 2017 00:14:43 +0000 Subject: Missing comma --- keyboards/planck/keymaps/khord/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/planck/keymaps/khord/keymap.c b/keyboards/planck/keymaps/khord/keymap.c index 2ee57b8f4..65ba1c417 100644 --- a/keyboards/planck/keymaps/khord/keymap.c +++ b/keyboards/planck/keymaps/khord/keymap.c @@ -64,7 +64,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_QWERTY] = { - {KC_TAB, KC_Q, KC_W, KC_E, KC_R KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC }, + {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC }, {TD(ESC_CAP), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT }, {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT)}, {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT } -- cgit v1.2.3 From d7fc2365402069a6149c9593dad82c4b4e31b78a Mon Sep 17 00:00:00 2001 From: Gabriel Young Date: Sun, 19 Mar 2017 15:59:21 -0700 Subject: successfully read data from the matrix --- keyboards/frosty_flake/config.h | 7 +- keyboards/frosty_flake/keymaps/default/Makefile | 4 +- keyboards/frosty_flake/keymaps/default/keymap.c | 7 +- keyboards/frosty_flake/matrix.c | 150 +++++++++++++----------- 4 files changed, 93 insertions(+), 75 deletions(-) diff --git a/keyboards/frosty_flake/config.h b/keyboards/frosty_flake/config.h index 2575a52b1..507e6a6b6 100644 --- a/keyboards/frosty_flake/config.h +++ b/keyboards/frosty_flake/config.h @@ -30,13 +30,14 @@ along with this program. If not, see . /* * Frosty Flake Rev. 20140521 made by Bathroom Ephiphanies - * Schematic is available at https://deskthority.net/w/images/a/a4/Frosty_Flake_Schematics.pdf + * Ported from the Bathroom Epiphanies TMK Firmware: + * https://github.com/BathroomEpiphanies/epiphanies_tmk_keyboard/tree/master/be_controllers * */ /* key matrix size */ -#define MATRIX_ROWS 8 // Row0 to Row7 in the schematic -#define MATRIX_COLS 18 // ColA to ColR in the schematic +#define MATRIX_ROWS 18 +#define MATRIX_COLS 8 /* * Keyboard Matrix Assignments diff --git a/keyboards/frosty_flake/keymaps/default/Makefile b/keyboards/frosty_flake/keymaps/default/Makefile index 9d3df5964..088766680 100644 --- a/keyboards/frosty_flake/keymaps/default/Makefile +++ b/keyboards/frosty_flake/keymaps/default/Makefile @@ -3,9 +3,9 @@ # the appropriate keymap folder that will get included automatically # BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +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 diff --git a/keyboards/frosty_flake/keymaps/default/keymap.c b/keyboards/frosty_flake/keymaps/default/keymap.c index 1c9e33b64..e55355566 100644 --- a/keyboards/frosty_flake/keymaps/default/keymap.c +++ b/keyboards/frosty_flake/keymaps/default/keymap.c @@ -28,11 +28,12 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) void matrix_init_user(void) { - + debug_enable = true; } void matrix_scan_user(void) { - + if (matrix_is_modified()) + matrix_print(); } bool process_record_user(uint16_t keycode, keyrecord_t *record) { @@ -41,4 +42,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { void led_set_user(uint8_t usb_led) { -} +} \ No newline at end of file diff --git a/keyboards/frosty_flake/matrix.c b/keyboards/frosty_flake/matrix.c index 21b0d9088..70456ada3 100644 --- a/keyboards/frosty_flake/matrix.c +++ b/keyboards/frosty_flake/matrix.c @@ -1,5 +1,3 @@ -//TODO(gabe): customize for frosty flake - /* Copyright 2014 Ralf Schmitt @@ -26,16 +24,71 @@ #include "util.h" #include "matrix.h" +#ifndef CONFIG_SPECIFIC_H +#define CONFIG_SPECIFIC_H + +#define CONFIG_LED_IO \ + DDRB |= (1<<7); \ + DDRC |= (1<<5) | (1<<6); + +#define USB_LED_CAPS_LOCK_ON PORTC &= ~(1<<5) +#define USB_LED_CAPS_LOCK_OFF PORTC |= (1<<5) +#define USB_LED_NUM_LOCK_ON PORTB &= ~(1<<7) +#define USB_LED_NUM_LOCK_OFF PORTB |= (1<<7) +#define USB_LED_SCROLL_LOCK_ON PORTC &= ~(1<<6) +#define USB_LED_SCROLL_LOCK_OFF PORTC |= (1<<6) + +#define CONFIG_MATRIX_IO \ + /* Column output pins */ \ + DDRD |= 0b01111011; \ + /* Row input pins */ \ + DDRC &= ~0b10000000; \ + DDRB &= ~0b01111111; \ + PORTC |= 0b10000000; \ + PORTB |= 0b01111111; + +#define MATRIX_ROW_SCAN \ + (PINC&(1<<7) ? 0 : ((matrix_row_t)1<<0)) | \ + (PINB&(1<<5) ? 0 : ((matrix_row_t)1<<1)) | \ + (PINB&(1<<4) ? 0 : ((matrix_row_t)1<<2)) | \ + (PINB&(1<<6) ? 0 : ((matrix_row_t)1<<3)) | \ + (PINB&(1<<1) ? 0 : ((matrix_row_t)1<<4)) | \ + (PINB&(1<<2) ? 0 : ((matrix_row_t)1<<5)) | \ + (PINB&(1<<3) ? 0 : ((matrix_row_t)1<<6)) | \ + (PINB&(1<<0) ? 0 : ((matrix_row_t)1<<7)) + +#define MATRIX_ROW_SELECT \ + case 0: PORTD = (PORTD & ~0b01111011) | 0b00011011; break; \ + case 1: PORTD = (PORTD & ~0b01111011) | 0b01000011; break; \ + case 2: PORTD = (PORTD & ~0b01111011) | 0b01101010; break; \ + case 3: PORTD = (PORTD & ~0b01111011) | 0b01111001; break; \ + case 4: PORTD = (PORTD & ~0b01111011) | 0b01100010; break; \ + case 5: PORTD = (PORTD & ~0b01111011) | 0b01110001; break; \ + case 6: PORTD = (PORTD & ~0b01111011) | 0b01100001; break; \ + case 7: PORTD = (PORTD & ~0b01111011) | 0b01110000; break; \ + case 8: PORTD = (PORTD & ~0b01111011) | 0b01100000; break; \ + case 9: PORTD = (PORTD & ~0b01111011) | 0b01101000; break; \ + case 10: PORTD = (PORTD & ~0b01111011) | 0b00101011; break; \ + case 11: PORTD = (PORTD & ~0b01111011) | 0b00110011; break; \ + case 12: PORTD = (PORTD & ~0b01111011) | 0b00100011; break; \ + case 13: PORTD = (PORTD & ~0b01111011) | 0b01111000; break; \ + case 14: PORTD = (PORTD & ~0b01111011) | 0b00010011; break; \ + case 15: PORTD = (PORTD & ~0b01111011) | 0b01101001; break; \ + case 16: PORTD = (PORTD & ~0b01111011) | 0b00001011; break; \ + case 17: PORTD = (PORTD & ~0b01111011) | 0b00111011; break; + +#endif + #ifndef DEBOUNCING_DELAY -# define DEBOUNCING_DELAY 5 +# define DEBOUNCING_DELAY 0 #endif static uint8_t debouncing = DEBOUNCING_DELAY; static matrix_row_t matrix[MATRIX_ROWS]; static matrix_row_t matrix_debouncing[MATRIX_ROWS]; -static uint8_t read_rows(void); -static void select_col(uint8_t col); +static matrix_row_t scan_row(void); +static void select_row(uint8_t row); inline uint8_t matrix_rows(void) { return MATRIX_ROWS; @@ -45,58 +98,40 @@ inline uint8_t matrix_cols(void) { return MATRIX_COLS; } -/* Column pin configuration - * - * col: 0 1 2 3 4 5 6 7 - * pin: PC7 PD5 PD3 PD1 PC2 PD6 PD4 PD2 - * - * Rrr pin configuration - * - * These rrrs uses one 74HC154 4 to 16 bit demultiplexer (low - * active), together with 2 rrrs driven directly from the micro - * controller, to control the 18 rrrs. The rrrs are driven from - * pins B6,5,4,3,2,1,0. - */ void matrix_init(void) { - DDRC &= ~0b10000100; // Row input pins - DDRD &= ~0b01111110; - PORTC |= 0b10000100; - PORTD |= 0b01111110; - - DDRB |= 0b01111111; // Column output pins + CONFIG_MATRIX_IO; for (uint8_t i=0; i < MATRIX_ROWS; i++) { matrix[i] = 0; matrix_debouncing[i] = 0; } + matrix_init_quantum(); } uint8_t matrix_scan(void) { - for (uint8_t col = 0; col < MATRIX_COLS; col++) { - select_col(col); + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + select_row(row); _delay_us(3); - uint8_t rows = read_rows(); - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + matrix_row_t row_scan = scan_row(); + for (uint8_t col = 0; col < MATRIX_COLS; col++) { bool prev_bit = matrix_debouncing[row] & ((matrix_row_t)1< Date: Sun, 19 Mar 2017 19:55:55 -0700 Subject: start to define keymap; annoying because rows and columns are swapped from schematic --- keyboards/frosty_flake/frosty_flake.h | 74 +++++++++++++++++++++++++ keyboards/frosty_flake/keymaps/default/keymap.c | 11 ++-- keyboards/frosty_flake/matrix.c | 4 +- 3 files changed, 84 insertions(+), 5 deletions(-) diff --git a/keyboards/frosty_flake/frosty_flake.h b/keyboards/frosty_flake/frosty_flake.h index 90ea25ed9..767efcbd8 100644 --- a/keyboards/frosty_flake/frosty_flake.h +++ b/keyboards/frosty_flake/frosty_flake.h @@ -7,6 +7,7 @@ // The following is an example using the Planck MIT layout // The first section contains all of the arguements // The second converts the arguments into a two-dimensional array +#if 0 #define KEYMAP( \ k00, k01, k02, \ k10, k11 \ @@ -15,5 +16,78 @@ { k00, k01, k02 }, \ { k10, KC_NO, k11 }, \ } +#endif + +/* + Matrix col/row mapping + + ,----. ,-------------------. ,-------------------. ,-------------------. ,--------------. + | J6 | | I4 | H4 | H2 | H6 | | A7 | E6 | D2 | D4 | | B4 | B7 | B6 | B0 | | C7 | C5 | A5 | + `----' `-------------------' `-------------------' `-------------------' `--------------' + ,-------------------------------------------------------------------------. ,--------------. ,-------------------. + | J4 | J7 | I7 | H7 | G7 | G4 | F4 | F7 | E7 | D7 | R7 | R4 | E4 | B2 | | L4 | O4 | Q4 | | K1 | L1 | Q1 | Q0 | + |-------------------------------------------------------------------------| |--------------| |-------------------| + | J2 | J5 | I5 | H5 | G5 | G2 | F2 | F5 | E5 | D5 | R5 | R2 | E2 | B3 | | K4 | O7 | Q7 | | K5 | L5 | Q5 | O5 | + |-------------------------------------------------------------------------| '--------------' |-------------- | + | O5 | J3 | I3 | H3 | G3 | G6 | F6 | F3 | E3 | D3 | R3 | R6 | B1 | | K2 | L2 | Q2 | | + |-------------------------------------------------------------------------| ,----. |-------------------| + | N2 | J1 | I1 | H1 | G1 | G0 | F0 | F1 | E1 | D1 | R0 | N3 | | O6 | | K3 | L3 | Q3 | O3 | + |-------------------------------------------------------------------------| ,--------------. |-------------- | + | A4 | P2 | C6 | K6 | C0 | M3 | D0 | A1 | | O0 | K0 | L0 | | L6 | Q6 | | + `-------------------------------------------------------------------------' `--------------' `-------------------' +*/ + +#define KEYMAP( \ + KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \ + KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KL4, KO4, KQ4, KK1, KL1, KQ1, KQ0, \ + KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, KK5, KL5, KQ5, KO5, \ + KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, KK2, KL2, KQ2, \ + KN2, KI6, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, KK3, KL3, KQ3, KO3, \ + KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0, KL6, KQ6 \ +) \ +{ \ +/* 0 1 2 3 4 5 6 7 */ \ +/* A */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ +/* B */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ +/* C */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ +/* D */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ +/* E */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ +/* F */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ +/* G */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ +/* H */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ +/* I */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ +/* J */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KJ6, KC_NO }, \ +/* K */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ +/* L */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ +/* M */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ +/* N */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ +/* O */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ +/* P */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ +/* Q */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ +/* R */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \ +} + +#if 0 +#define KEYMAP( \ + KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \ + KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KL4, KO4, KQ4, KK1, KL1, KQ1, KQ0, \ + KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, KK5, KL5, KQ5, KO5, \ + KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, KK2, KL2, KQ2, \ + KN2, KI6, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, KK3, KL3, KQ3, KO3, \ + KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0, KL6, KQ6 \ +) \ +{ \ +/* Columns and rows need to be swapped in the below definition */ \ +/* A B C D E F G H I J K L M N O P Q R */ \ +/* 0 */ { KC_NO, KB0, KC0, KD0, KC_NO, KF0, KG0, KC_NO, KC_NO, KC_NO, KK0, KL0, KC_NO, KC_NO, KO0, KC_NO, KQ0, KR0 }, \ +/* 1 */ { KA1, KB1, KC_NO, KD1, KE1, KF1, KG1, KH1, KI1, KJ1, KK1, KL1, KC_NO, KC_NO, KC_NO, KC_NO, KQ1, KC_NO }, \ +/* 2 */ { KC_NO, KB2, KC_NO, KD2, KE2, KF2, KG2, KH2, KI2, KJ2, KK2, KL2, KC_NO, KN2, KC_NO, KP2, KQ2, KR2 }, \ +/* 3 */ { KC_NO, KB3, KC_NO, KD3, KE3, KF3, KG3, KH3, KI3, KJ3, KK3, KL3, KM3, KN3, KO3, KC_NO, KQ3, KR3 }, \ +/* 4 */ { KA4, KB4, KC_NO, KD4, KE4, KF4, KG4, KH4, KI4, KJ4, KK4, KL4, KC_NO, KC_NO, KO4, KC_NO, KQ4, KR4 }, \ +/* 5 */ { KA5, KC_NO, KC5, KD5, KE5, KF5, KG5, KH5, KI5, KJ5, KK5, KL5, KC_NO, KC_NO, KO5, KC_NO, KQ5, KR5 }, \ +/* 6 */ { KC_NO, KB6, KC6, KC_NO, KE6, KF6, KG6, KH6, KI6, KJ6, KK6, KL6, KC_NO, KC_NO, KO6, KC_NO, KQ6, KR6 }, \ +/* 7 */ { KA7, KB7, KC7, KD7, KE7, KF7, KG7, KH7, KI7, KJ7, KC_NO, KC_NO, KC_NO, KC_NO, KO7, KC_NO, KQ7, KR7 } \ +} +#endif #endif diff --git a/keyboards/frosty_flake/keymaps/default/keymap.c b/keyboards/frosty_flake/keymaps/default/keymap.c index e55355566..90711732f 100644 --- a/keyboards/frosty_flake/keymaps/default/keymap.c +++ b/keyboards/frosty_flake/keymaps/default/keymap.c @@ -1,10 +1,13 @@ #include "frosty_flake.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = KEYMAP( /* Base */ - KC_A, KC_1, KC_H, \ - KC_TAB, KC_SPC \ -), +[0] = KEYMAP(\ + 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_NLCK,KC_PSLS,KC_PAST,KC_PMNS, \ + 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_P7, KC_P8, KC_P9,KC_PPLS, \ + 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_P4, KC_P5, KC_P6, \ + 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_P1, KC_P2, KC_P3,KC_PENT, \ + KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_APP,KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT, KC_P0,KC_PDOT) }; const uint16_t PROGMEM fn_actions[] = { diff --git a/keyboards/frosty_flake/matrix.c b/keyboards/frosty_flake/matrix.c index 70456ada3..07b9f6dd6 100644 --- a/keyboards/frosty_flake/matrix.c +++ b/keyboards/frosty_flake/matrix.c @@ -151,11 +151,13 @@ inline matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; } +static const char ROW_NAMES[] = "ABCDEFGHIJKLMNOPQR"; + void matrix_print(void) { print("\nr/c 01234567\n"); for (uint8_t row = 0; row < MATRIX_ROWS; row++) { matrix_row_t row_scan = matrix_get_row(row); - xprintf("%02X: ", row); + xprintf("%c: ", ROW_NAMES[row]); for (uint8_t col = 0; col < MATRIX_COLS; col++) { bool curr_bit = row_scan & (1< Date: Sun, 19 Mar 2017 20:33:41 -0700 Subject: Swap rows and columns to match the schematic --- keyboards/frosty_flake/config.h | 4 +- keyboards/frosty_flake/frosty_flake.h | 43 ------- keyboards/frosty_flake/keymaps/default/keymap.c | 3 +- keyboards/frosty_flake/matrix.c | 154 +++++++++--------------- 4 files changed, 62 insertions(+), 142 deletions(-) diff --git a/keyboards/frosty_flake/config.h b/keyboards/frosty_flake/config.h index 507e6a6b6..f03cecb3e 100644 --- a/keyboards/frosty_flake/config.h +++ b/keyboards/frosty_flake/config.h @@ -36,8 +36,8 @@ along with this program. If not, see . */ /* key matrix size */ -#define MATRIX_ROWS 18 -#define MATRIX_COLS 8 +#define MATRIX_ROWS 8 +#define MATRIX_COLS 18 /* * Keyboard Matrix Assignments diff --git a/keyboards/frosty_flake/frosty_flake.h b/keyboards/frosty_flake/frosty_flake.h index 767efcbd8..3b52df6ba 100644 --- a/keyboards/frosty_flake/frosty_flake.h +++ b/keyboards/frosty_flake/frosty_flake.h @@ -7,16 +7,6 @@ // The following is an example using the Planck MIT layout // The first section contains all of the arguements // The second converts the arguments into a two-dimensional array -#if 0 -#define KEYMAP( \ - k00, k01, k02, \ - k10, k11 \ -) \ -{ \ - { k00, k01, k02 }, \ - { k10, KC_NO, k11 }, \ -} -#endif /* Matrix col/row mapping @@ -36,38 +26,6 @@ | A4 | P2 | C6 | K6 | C0 | M3 | D0 | A1 | | O0 | K0 | L0 | | L6 | Q6 | | `-------------------------------------------------------------------------' `--------------' `-------------------' */ - -#define KEYMAP( \ - KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \ - KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KL4, KO4, KQ4, KK1, KL1, KQ1, KQ0, \ - KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, KK5, KL5, KQ5, KO5, \ - KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, KK2, KL2, KQ2, \ - KN2, KI6, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, KK3, KL3, KQ3, KO3, \ - KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0, KL6, KQ6 \ -) \ -{ \ -/* 0 1 2 3 4 5 6 7 */ \ -/* A */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ -/* B */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ -/* C */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ -/* D */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ -/* E */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ -/* F */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ -/* G */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ -/* H */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ -/* I */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ -/* J */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KJ6, KC_NO }, \ -/* K */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ -/* L */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ -/* M */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ -/* N */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ -/* O */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ -/* P */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ -/* Q */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ -/* R */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \ -} - -#if 0 #define KEYMAP( \ KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \ KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KL4, KO4, KQ4, KK1, KL1, KQ1, KQ0, \ @@ -88,6 +46,5 @@ /* 6 */ { KC_NO, KB6, KC6, KC_NO, KE6, KF6, KG6, KH6, KI6, KJ6, KK6, KL6, KC_NO, KC_NO, KO6, KC_NO, KQ6, KR6 }, \ /* 7 */ { KA7, KB7, KC7, KD7, KE7, KF7, KG7, KH7, KI7, KJ7, KC_NO, KC_NO, KC_NO, KC_NO, KO7, KC_NO, KQ7, KR7 } \ } -#endif #endif diff --git a/keyboards/frosty_flake/keymaps/default/keymap.c b/keyboards/frosty_flake/keymaps/default/keymap.c index 90711732f..4383f7a8d 100644 --- a/keyboards/frosty_flake/keymaps/default/keymap.c +++ b/keyboards/frosty_flake/keymaps/default/keymap.c @@ -35,8 +35,7 @@ void matrix_init_user(void) { } void matrix_scan_user(void) { - if (matrix_is_modified()) - matrix_print(); + matrix_print(); } bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/frosty_flake/matrix.c b/keyboards/frosty_flake/matrix.c index 07b9f6dd6..f289f506a 100644 --- a/keyboards/frosty_flake/matrix.c +++ b/keyboards/frosty_flake/matrix.c @@ -1,5 +1,5 @@ /* - Copyright 2014 Ralf Schmitt + Copyright 2017 Gabriel Young 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 @@ -24,9 +24,6 @@ #include "util.h" #include "matrix.h" -#ifndef CONFIG_SPECIFIC_H -#define CONFIG_SPECIFIC_H - #define CONFIG_LED_IO \ DDRB |= (1<<7); \ DDRC |= (1<<5) | (1<<6); @@ -38,85 +35,40 @@ #define USB_LED_SCROLL_LOCK_ON PORTC &= ~(1<<6) #define USB_LED_SCROLL_LOCK_OFF PORTC |= (1<<6) -#define CONFIG_MATRIX_IO \ - /* Column output pins */ \ - DDRD |= 0b01111011; \ - /* Row input pins */ \ - DDRC &= ~0b10000000; \ - DDRB &= ~0b01111111; \ - PORTC |= 0b10000000; \ - PORTB |= 0b01111111; - -#define MATRIX_ROW_SCAN \ - (PINC&(1<<7) ? 0 : ((matrix_row_t)1<<0)) | \ - (PINB&(1<<5) ? 0 : ((matrix_row_t)1<<1)) | \ - (PINB&(1<<4) ? 0 : ((matrix_row_t)1<<2)) | \ - (PINB&(1<<6) ? 0 : ((matrix_row_t)1<<3)) | \ - (PINB&(1<<1) ? 0 : ((matrix_row_t)1<<4)) | \ - (PINB&(1<<2) ? 0 : ((matrix_row_t)1<<5)) | \ - (PINB&(1<<3) ? 0 : ((matrix_row_t)1<<6)) | \ - (PINB&(1<<0) ? 0 : ((matrix_row_t)1<<7)) - -#define MATRIX_ROW_SELECT \ - case 0: PORTD = (PORTD & ~0b01111011) | 0b00011011; break; \ - case 1: PORTD = (PORTD & ~0b01111011) | 0b01000011; break; \ - case 2: PORTD = (PORTD & ~0b01111011) | 0b01101010; break; \ - case 3: PORTD = (PORTD & ~0b01111011) | 0b01111001; break; \ - case 4: PORTD = (PORTD & ~0b01111011) | 0b01100010; break; \ - case 5: PORTD = (PORTD & ~0b01111011) | 0b01110001; break; \ - case 6: PORTD = (PORTD & ~0b01111011) | 0b01100001; break; \ - case 7: PORTD = (PORTD & ~0b01111011) | 0b01110000; break; \ - case 8: PORTD = (PORTD & ~0b01111011) | 0b01100000; break; \ - case 9: PORTD = (PORTD & ~0b01111011) | 0b01101000; break; \ - case 10: PORTD = (PORTD & ~0b01111011) | 0b00101011; break; \ - case 11: PORTD = (PORTD & ~0b01111011) | 0b00110011; break; \ - case 12: PORTD = (PORTD & ~0b01111011) | 0b00100011; break; \ - case 13: PORTD = (PORTD & ~0b01111011) | 0b01111000; break; \ - case 14: PORTD = (PORTD & ~0b01111011) | 0b00010011; break; \ - case 15: PORTD = (PORTD & ~0b01111011) | 0b01101001; break; \ - case 16: PORTD = (PORTD & ~0b01111011) | 0b00001011; break; \ - case 17: PORTD = (PORTD & ~0b01111011) | 0b00111011; break; - -#endif - #ifndef DEBOUNCING_DELAY -# define DEBOUNCING_DELAY 0 +# define DEBOUNCING_DELAY 5 #endif static uint8_t debouncing = DEBOUNCING_DELAY; static matrix_row_t matrix[MATRIX_ROWS]; static matrix_row_t matrix_debouncing[MATRIX_ROWS]; -static matrix_row_t scan_row(void); -static void select_row(uint8_t row); - -inline uint8_t matrix_rows(void) { - return MATRIX_ROWS; -} - -inline uint8_t matrix_cols(void) { - return MATRIX_COLS; -} +static matrix_row_t scan_col(void); +static void select_col(uint8_t row); void matrix_init(void) { - CONFIG_MATRIX_IO; - - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - matrix_debouncing[i] = 0; - } - - matrix_init_quantum(); + /* Row output pins */ + DDRD |= 0b01111011; + /* Column input pins */ + DDRC &= ~0b10000000; + DDRB &= ~0b01111111; + PORTC |= 0b10000000; + PORTB |= 0b01111111; + + for (uint8_t i=0; i < MATRIX_ROWS; i++) + matrix[i] = matrix_debouncing[i] = 0; + + matrix_init_quantum(); } uint8_t matrix_scan(void) { - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - select_row(row); + for (uint8_t col = 0; col < MATRIX_COLS; col++) { + select_col(col); _delay_us(3); - matrix_row_t row_scan = scan_row(); - for (uint8_t col = 0; col < MATRIX_COLS; col++) { + matrix_row_t col_scan = scan_col(); + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { bool prev_bit = matrix_debouncing[row] & ((matrix_row_t)1< Date: Sun, 19 Mar 2017 20:45:10 -0700 Subject: support LEDs --- keyboards/frosty_flake/frosty_flake.c | 40 ++++++++++++++++++------- keyboards/frosty_flake/matrix.c | 55 ++++++++++++++--------------------- 2 files changed, 51 insertions(+), 44 deletions(-) diff --git a/keyboards/frosty_flake/frosty_flake.c b/keyboards/frosty_flake/frosty_flake.c index 22979a451..ed1736184 100644 --- a/keyboards/frosty_flake/frosty_flake.c +++ b/keyboards/frosty_flake/frosty_flake.c @@ -1,28 +1,46 @@ #include "frosty_flake.h" void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up + // put your keyboard start-up code here + // runs once when the firmware starts up - matrix_init_user(); + matrix_init_user(); } void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) + // put your looping keyboard code here + // runs every cycle (a lot) - matrix_scan_user(); + 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 + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware - return process_record_user(keycode, record); + 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 + DDRB |= (1<<7); + DDRC |= (1<<5) | (1<<6); - led_set_user(usb_led); + print_dec(usb_led); + + if (usb_led & (1< Date: Sun, 19 Mar 2017 20:46:56 -0700 Subject: fix whitespace --- keyboards/frosty_flake/matrix.c | 99 ++++++++++++++++++++--------------------- 1 file changed, 48 insertions(+), 51 deletions(-) diff --git a/keyboards/frosty_flake/matrix.c b/keyboards/frosty_flake/matrix.c index 5d711a660..05dffdb64 100644 --- a/keyboards/frosty_flake/matrix.c +++ b/keyboards/frosty_flake/matrix.c @@ -32,8 +32,41 @@ static uint8_t debouncing = DEBOUNCING_DELAY; static matrix_row_t matrix[MATRIX_ROWS]; static matrix_row_t matrix_debouncing[MATRIX_ROWS]; -static matrix_row_t scan_col(void); -static void select_col(uint8_t row); +static matrix_row_t scan_col(void) { + return ( + (PINC&(1<<7) ? 0 : ((matrix_row_t)1<<0)) | + (PINB&(1<<5) ? 0 : ((matrix_row_t)1<<1)) | + (PINB&(1<<4) ? 0 : ((matrix_row_t)1<<2)) | + (PINB&(1<<6) ? 0 : ((matrix_row_t)1<<3)) | + (PINB&(1<<1) ? 0 : ((matrix_row_t)1<<4)) | + (PINB&(1<<2) ? 0 : ((matrix_row_t)1<<5)) | + (PINB&(1<<3) ? 0 : ((matrix_row_t)1<<6)) | + (PINB&(1<<0) ? 0 : ((matrix_row_t)1<<7)) + ); +} + +static void select_col(uint8_t col) { + switch (col) { + case 0: PORTD = (PORTD & ~0b01111011) | 0b00011011; break; + case 1: PORTD = (PORTD & ~0b01111011) | 0b01000011; break; + case 2: PORTD = (PORTD & ~0b01111011) | 0b01101010; break; + case 3: PORTD = (PORTD & ~0b01111011) | 0b01111001; break; + case 4: PORTD = (PORTD & ~0b01111011) | 0b01100010; break; + case 5: PORTD = (PORTD & ~0b01111011) | 0b01110001; break; + case 6: PORTD = (PORTD & ~0b01111011) | 0b01100001; break; + case 7: PORTD = (PORTD & ~0b01111011) | 0b01110000; break; + case 8: PORTD = (PORTD & ~0b01111011) | 0b01100000; break; + case 9: PORTD = (PORTD & ~0b01111011) | 0b01101000; break; + case 10: PORTD = (PORTD & ~0b01111011) | 0b00101011; break; + case 11: PORTD = (PORTD & ~0b01111011) | 0b00110011; break; + case 12: PORTD = (PORTD & ~0b01111011) | 0b00100011; break; + case 13: PORTD = (PORTD & ~0b01111011) | 0b01111000; break; + case 14: PORTD = (PORTD & ~0b01111011) | 0b00010011; break; + case 15: PORTD = (PORTD & ~0b01111011) | 0b01101001; break; + case 16: PORTD = (PORTD & ~0b01111011) | 0b00001011; break; + case 17: PORTD = (PORTD & ~0b01111011) | 0b00111011; break; + } +} void matrix_init(void) { /* Row output pins */ @@ -82,57 +115,21 @@ inline matrix_row_t matrix_get_row(uint8_t row) { } void matrix_print(void) { - print("\nr\\c ABCDEFGHIJKLMNOPQR\n"); - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - matrix_row_t matrix_row = matrix_get_row(row); - xprintf("%02X: ", row); - for (uint8_t col = 0; col < MATRIX_COLS; col++) { - bool curr_bit = matrix_row & (1< Date: Sun, 19 Mar 2017 20:56:45 -0700 Subject: update docs --- keyboards/frosty_flake/readme.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/keyboards/frosty_flake/readme.md b/keyboards/frosty_flake/readme.md index a32965061..ef0e7492b 100644 --- a/keyboards/frosty_flake/readme.md +++ b/keyboards/frosty_flake/readme.md @@ -1,6 +1,10 @@ frosty_flake keyboard firmware ====================== +This is the firmware for Rev. 20140521 of the Frosty Flake controller by [Bathroom Epiphanies](http://bathroomepiphanies.com/controllers/). + +The code was adapted from the [BathroomEpiphanies TMK Firmware](https://github.com/BathroomEpiphanies/epiphanies_tmk_keyboard/tree/master/be_controllers), but has been cleaned up to match the [schematic](https://deskthority.net/wiki/File:Frosty_Flake_Schematics.pdf) and gone through some minor refactoring for QMK. + ## Quantum MK Firmware For the full Quantum feature list, see [the parent readme](/). -- cgit v1.2.3 From a3a304db9ae09c3c5532c43e553cc24d3f9b29a2 Mon Sep 17 00:00:00 2001 From: Gabriel Young Date: Sun, 19 Mar 2017 21:11:17 -0700 Subject: clean up docs and provide defaults for keymap --- keyboards/frosty_flake/frosty_flake.c | 17 +++++++++++ keyboards/frosty_flake/keymaps/default/Makefile | 4 +-- keyboards/frosty_flake/keymaps/default/keymap.c | 38 +------------------------ keyboards/frosty_flake/readme.md | 2 +- 4 files changed, 21 insertions(+), 40 deletions(-) diff --git a/keyboards/frosty_flake/frosty_flake.c b/keyboards/frosty_flake/frosty_flake.c index ed1736184..1cd476038 100644 --- a/keyboards/frosty_flake/frosty_flake.c +++ b/keyboards/frosty_flake/frosty_flake.c @@ -44,3 +44,20 @@ void led_set_kb(uint8_t usb_led) { led_set_user(usb_led); } + +__attribute__ ((weak)) +void matrix_init_user(void) { +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +__attribute__ ((weak)) +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +__attribute__ ((weak)) +void led_set_user(uint8_t usb_led) { +} \ No newline at end of file diff --git a/keyboards/frosty_flake/keymaps/default/Makefile b/keyboards/frosty_flake/keymaps/default/Makefile index 088766680..9d3df5964 100644 --- a/keyboards/frosty_flake/keymaps/default/Makefile +++ b/keyboards/frosty_flake/keymaps/default/Makefile @@ -3,9 +3,9 @@ # the appropriate keymap folder that will get included automatically # BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +CONSOLE_ENABLE = no # 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 diff --git a/keyboards/frosty_flake/keymaps/default/keymap.c b/keyboards/frosty_flake/keymaps/default/keymap.c index 4383f7a8d..4dc7ed655 100644 --- a/keyboards/frosty_flake/keymaps/default/keymap.c +++ b/keyboards/frosty_flake/keymaps/default/keymap.c @@ -8,40 +8,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_P4, KC_P5, KC_P6, \ 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_P1, KC_P2, KC_P3,KC_PENT, \ KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_APP,KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT, KC_P0,KC_PDOT) -}; - -const uint16_t PROGMEM fn_actions[] = { - -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; - - -void matrix_init_user(void) { - debug_enable = true; -} - -void matrix_scan_user(void) { - matrix_print(); -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - -void led_set_user(uint8_t usb_led) { - -} \ No newline at end of file +}; \ No newline at end of file diff --git a/keyboards/frosty_flake/readme.md b/keyboards/frosty_flake/readme.md index ef0e7492b..ff440e33b 100644 --- a/keyboards/frosty_flake/readme.md +++ b/keyboards/frosty_flake/readme.md @@ -1,7 +1,7 @@ frosty_flake keyboard firmware ====================== -This is the firmware for Rev. 20140521 of the Frosty Flake controller by [Bathroom Epiphanies](http://bathroomepiphanies.com/controllers/). +This is the firmware for Rev. 20140521 of the Frosty Flake controller by [Bathroom Epiphanies](http://bathroomepiphanies.com/controllers/), a replacement controller for the [Cooler Master Quick Fire Rapid](http://www.coolermaster.com/peripheral/keyboards/quickfirerapid/). The code was adapted from the [BathroomEpiphanies TMK Firmware](https://github.com/BathroomEpiphanies/epiphanies_tmk_keyboard/tree/master/be_controllers), but has been cleaned up to match the [schematic](https://deskthority.net/wiki/File:Frosty_Flake_Schematics.pdf) and gone through some minor refactoring for QMK. -- cgit v1.2.3 From b37f510f323b532360f38afb6f0bb29bc61eaab3 Mon Sep 17 00:00:00 2001 From: Gabriel Young Date: Sun, 19 Mar 2017 21:18:15 -0700 Subject: clean up config --- keyboards/frosty_flake/config.h | 30 ++++-------------------------- 1 file changed, 4 insertions(+), 26 deletions(-) diff --git a/keyboards/frosty_flake/config.h b/keyboards/frosty_flake/config.h index f03cecb3e..2c73f1074 100644 --- a/keyboards/frosty_flake/config.h +++ b/keyboards/frosty_flake/config.h @@ -36,39 +36,17 @@ along with this program. If not, see . */ /* key matrix size */ -#define MATRIX_ROWS 8 -#define MATRIX_COLS 18 +#define MATRIX_ROWS 8 // Row0 - Row7 in the schematic +#define MATRIX_COLS 18 // ColA - ColR in the schematic /* * 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 { D5, D4, D6, D2, D1, D0 } -//#define MATRIX_COL_PINS << n/a >> -//#define UNUSED_PINS { B0, C4, D3 } - -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ -//#define DIODE_DIRECTION << n/a >> - -// #define BACKLIGHT_PIN B7 -// #define BACKLIGHT_BREATHING -// #define BACKLIGHT_LEVELS 3 - + */ +#define UNUSED_PINS { B0, C4, D3 } /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 -/* define if matrix has ghost (lacks anti-ghosting diodes) */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ -- cgit v1.2.3 From 3399e392977f91b1993e1ac581ff5a054a45848b Mon Sep 17 00:00:00 2001 From: Stephen Tudor Date: Mon, 20 Mar 2017 07:26:28 -0400 Subject: Fix shift tap-dance (can't use one-shot layer) --- keyboards/satan/keymaps/smt/Makefile | 3 ++- keyboards/satan/keymaps/smt/keymap.c | 43 +++++++++--------------------------- 2 files changed, 12 insertions(+), 34 deletions(-) diff --git a/keyboards/satan/keymaps/smt/Makefile b/keyboards/satan/keymaps/smt/Makefile index 2a7ff2779..afcd025e1 100644 --- a/keyboards/satan/keymaps/smt/Makefile +++ b/keyboards/satan/keymaps/smt/Makefile @@ -8,13 +8,14 @@ EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # 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 = yes # Enable keyboard backlight functionality +BACKLIGHT_ENABLE = yes # 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 +TAP_DANCE_ENABLE = yes # Enable tap dance ifndef QUANTUM_DIR include ../../../../Makefile diff --git a/keyboards/satan/keymaps/smt/keymap.c b/keyboards/satan/keymaps/smt/keymap.c index 4ac016f21..7f9e9c2d5 100644 --- a/keyboards/satan/keymaps/smt/keymap.c +++ b/keyboards/satan/keymaps/smt/keymap.c @@ -20,6 +20,10 @@ enum planck_keycodes { DVORAK }; +enum { + TD_SHIFT_RAISE = 0 +}; + #define _______ KC_TRNS #define XXXXXXX KC_NO @@ -28,7 +32,7 @@ enum planck_keycodes { #define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl #define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Shift+Alt) #define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift -#define SFT_RSE TD(KC_LSFT, OS(_RAISE)) // Double-tap for RAISE one-shot, otherwise Left Shift +#define SFT_RSE TD(TD_SHIFT_RAISE) // Double-tap for RAISE one-shot, otherwise Left Shift const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _QWERTY: (Base Layer) Default Layer @@ -170,36 +174,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -enum function_id { - SHIFT_ESC, +// Tap Dance Definitions +qk_tap_dance_action_t tap_dance_actions[] = { + // Tap/hold once for Shift, tap twice for raise layer + [TD_SHIFT_RAISE] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, _RAISE) +// Other declarations would go here, separated by commas, if you have them }; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} -- cgit v1.2.3 From b10d95070831dde5801e930c615612dec3a6fd11 Mon Sep 17 00:00:00 2001 From: Stephen Tudor Date: Mon, 20 Mar 2017 07:43:24 -0400 Subject: Use normal backtick in ESC spot - I've mapped ESC to caps lock --- keyboards/satan/keymaps/smt/keymap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/satan/keymaps/smt/keymap.c b/keyboards/satan/keymaps/smt/keymap.c index 7f9e9c2d5..1a2bc9769 100644 --- a/keyboards/satan/keymaps/smt/keymap.c +++ b/keyboards/satan/keymaps/smt/keymap.c @@ -49,7 +49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------' */ [_QWERTY] = KEYMAP_ANSI( - F(0), 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_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, \ HPR_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, \ CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, \ SFT_RSE, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, SFT_ENT, \ @@ -69,7 +69,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------' */ [_COLEMAK] = KEYMAP_ANSI( - F(0), 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_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, \ HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN,KC_LBRC, KC_RBRC,KC_BSLS, \ CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O ,KC_QUOT, KC_ENT, \ SFT_RSE, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM,KC_DOT, KC_SLSH, SFT_ENT, \ @@ -89,7 +89,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------' */ [_DVORAK] = KEYMAP_ANSI( - F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC,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_LBRC, KC_RBRC,KC_BSPC, \ HPR_TAB, KC_QUOT,KC_COMM,KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, \ CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, \ SFT_RSE, KC_SCLN,KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT, \ @@ -109,7 +109,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------' */ [_LOWER] = KEYMAP_ANSI( - 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_DEL, \ + _______,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_HOME,KC_UP ,KC_END ,_______,_______,_______,_______,_______,_______,_______,BL_DEC ,BL_INC ,BL_TOGG, \ _______,KC_LEFT,KC_DOWN,KC_RGHT,_______,_______,KC_LEFT,KC_DOWN,KC_UP ,KC_RGHT,KC_VOLU,KC_PGUP ,_______, \ KC_LSFT ,_______,_______,KC_MPRV,KC_MPLY,KC_MNXT,_______,_______,_______,KC_VOLD,KC_PGDN ,_______, \ -- cgit v1.2.3 From 34c5f8094e3a07dfff344f95b29407c9efaa0e4c Mon Sep 17 00:00:00 2001 From: Stephen Tudor Date: Mon, 20 Mar 2017 07:43:45 -0400 Subject: Remove tap-dance. Raise will be accessed via holding shift while lower is active --- keyboards/satan/keymaps/smt/Makefile | 1 - keyboards/satan/keymaps/smt/keymap.c | 32 +++++++++++--------------------- 2 files changed, 11 insertions(+), 22 deletions(-) diff --git a/keyboards/satan/keymaps/smt/Makefile b/keyboards/satan/keymaps/smt/Makefile index afcd025e1..0c9ae824f 100644 --- a/keyboards/satan/keymaps/smt/Makefile +++ b/keyboards/satan/keymaps/smt/Makefile @@ -15,7 +15,6 @@ 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 -TAP_DANCE_ENABLE = yes # Enable tap dance ifndef QUANTUM_DIR include ../../../../Makefile diff --git a/keyboards/satan/keymaps/smt/keymap.c b/keyboards/satan/keymaps/smt/keymap.c index 1a2bc9769..a21d3eb86 100644 --- a/keyboards/satan/keymaps/smt/keymap.c +++ b/keyboards/satan/keymaps/smt/keymap.c @@ -17,11 +17,9 @@ enum planck_keycodes { QWERTY = SAFE_RANGE, COLEMAK, - DVORAK -}; - -enum { - TD_SHIFT_RAISE = 0 + DVORAK, + LOWER, + RAISE }; #define _______ KC_TRNS @@ -32,7 +30,6 @@ enum { #define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl #define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Shift+Alt) #define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift -#define SFT_RSE TD(TD_SHIFT_RAISE) // Double-tap for RAISE one-shot, otherwise Left Shift const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _QWERTY: (Base Layer) Default Layer @@ -52,7 +49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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, \ HPR_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, \ CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, \ - SFT_RSE, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, SFT_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, SFT_ENT, \ KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,MO(_LOWER),KC_RCTL), /* Keymap _COLEMAK: (Base Layer) Default Layer @@ -72,7 +69,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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, \ HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN,KC_LBRC, KC_RBRC,KC_BSLS, \ CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O ,KC_QUOT, KC_ENT, \ - SFT_RSE, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM,KC_DOT, KC_SLSH, SFT_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM,KC_DOT, KC_SLSH, SFT_ENT, \ KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,MO(_LOWER),KC_RCTL), /* Keymap _DVORAK: (Base Layer) Default Layer @@ -92,7 +89,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC,KC_BSPC, \ HPR_TAB, KC_QUOT,KC_COMM,KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, \ CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, \ - SFT_RSE, KC_SCLN,KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT, \ + KC_LSFT, KC_SCLN,KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT, \ KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,MO(_LOWER),KC_RCTL), /* Keymap _LOWER: Function Layer @@ -112,7 +109,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 ,KC_DEL, \ _______,KC_HOME,KC_UP ,KC_END ,_______,_______,_______,_______,_______,_______,_______,BL_DEC ,BL_INC ,BL_TOGG, \ _______,KC_LEFT,KC_DOWN,KC_RGHT,_______,_______,KC_LEFT,KC_DOWN,KC_UP ,KC_RGHT,KC_VOLU,KC_PGUP ,_______, \ - KC_LSFT ,_______,_______,KC_MPRV,KC_MPLY,KC_MNXT,_______,_______,_______,KC_VOLD,KC_PGDN ,_______, \ + RAISE ,_______,_______,KC_MPRV,KC_MPLY,KC_MNXT,_______,_______,_______,KC_VOLD,KC_PGDN ,_______, \ _______,_______,_______ ,_______ ,_______,_______,_______,_______), /* Keymap _RAISE: Function Layer @@ -133,14 +130,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,RESET , \ _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ _______,_______,_______,_______,_______,_______,_______,QWERTY ,COLEMAK,DVORAK ,_______,_______ ,_______, \ - KC_LSFT ,RGB_TOG,RGB_MOD,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD,_______,_______ ,_______, \ - _______,_______,_______ ,_______ ,_______,_______,XXXXXXX,_______ + _______ ,RGB_TOG,RGB_MOD,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD,_______,_______ ,_______, \ + _______,_______,_______ ,_______ ,_______,_______,_______,_______ #else _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,RESET , \ _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ _______,_______,_______,_______,_______,_______,_______,QWERTY ,COLEMAK,DVORAK ,_______,_______ ,_______, \ - KC_LSFT ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______, \ - _______,_______,_______ ,_______ ,_______,_______,XXXXXXX,_______ + _______ ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______, \ + _______,_______,_______ ,_______ ,_______,_______,_______,_______ #endif ) }; @@ -173,10 +170,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; } - -// Tap Dance Definitions -qk_tap_dance_action_t tap_dance_actions[] = { - // Tap/hold once for Shift, tap twice for raise layer - [TD_SHIFT_RAISE] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, _RAISE) -// Other declarations would go here, separated by commas, if you have them -}; -- cgit v1.2.3 From d7f2bd29646c585434a8f19e7b9df0d3a6ea7bef Mon Sep 17 00:00:00 2001 From: Dylan Khor Date: Mon, 20 Mar 2017 13:14:48 -0400 Subject: add pgup, pgdn, home, end --- keyboards/planck/keymaps/khord/keymap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/planck/keymaps/khord/keymap.c b/keyboards/planck/keymaps/khord/keymap.c index 6f19966f2..b6adb603e 100644 --- a/keyboards/planck/keymaps/khord/keymap.c +++ b/keyboards/planck/keymaps/khord/keymap.c @@ -112,7 +112,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+-------------+------+------+------+------+------| * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter | + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | END | HOME |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' @@ -120,7 +120,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LOWER] = { {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC}, {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, - {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______}, + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_END, KC_HOME, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} }, @@ -130,7 +130,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+-------------+------+------+------+------+------| * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter | + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |PG DN |PG UP |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' @@ -138,7 +138,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_RAISE] = { {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_DEL, KC_F1, KC_F2, KC_F3, KC_F4, 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_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGDN, KC_PGUP, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} }, -- cgit v1.2.3 From dce3847ebb900ffebd9038da255309cbac634170 Mon Sep 17 00:00:00 2001 From: Stephen Tudor Date: Mon, 20 Mar 2017 14:12:43 -0400 Subject: Use single _FUNC layer. Move RESET and base layout-changing keys to _FUNC. --- keyboards/satan/keymaps/smt/keymap.c | 55 ++++++++---------------------------- 1 file changed, 12 insertions(+), 43 deletions(-) diff --git a/keyboards/satan/keymaps/smt/keymap.c b/keyboards/satan/keymaps/smt/keymap.c index a21d3eb86..d90849914 100644 --- a/keyboards/satan/keymaps/smt/keymap.c +++ b/keyboards/satan/keymaps/smt/keymap.c @@ -11,15 +11,12 @@ #define _QWERTY 0 #define _COLEMAK 1 #define _DVORAK 2 -#define _LOWER 3 -#define _RAISE 4 +#define _FUNC 3 enum planck_keycodes { QWERTY = SAFE_RANGE, COLEMAK, - DVORAK, - LOWER, - RAISE + DVORAK }; #define _______ KC_TRNS @@ -50,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { HPR_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, \ CTL_ESC, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, SFT_ENT, \ - KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,MO(_LOWER),KC_RCTL), + KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,MO(_FUNC),KC_RCTL), /* Keymap _COLEMAK: (Base Layer) Default Layer * ,-----------------------------------------------------------. @@ -70,7 +67,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN,KC_LBRC, KC_RBRC,KC_BSLS, \ CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O ,KC_QUOT, KC_ENT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM,KC_DOT, KC_SLSH, SFT_ENT, \ - KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,MO(_LOWER),KC_RCTL), + KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,MO(_FUNC),KC_RCTL), /* Keymap _DVORAK: (Base Layer) Default Layer * ,-----------------------------------------------------------. @@ -90,55 +87,27 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { HPR_TAB, KC_QUOT,KC_COMM,KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, \ CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, \ KC_LSFT, KC_SCLN,KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT, \ - KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,MO(_LOWER),KC_RCTL), + KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,MO(_FUNC),KC_RCTL), - /* Keymap _LOWER: Function Layer + /* Keymap _FUNC: Function Layer * ,-----------------------------------------------------------. * | | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Delete | * |-----------------------------------------------------------| - * | |Hom| UP|End| | | | | | | |BL-|BL+|BL | + * | |Hom| UP|End| | | |Qwt|Cmk|Dvk| |BL-|BL+|BL | * |-----------------------------------------------------------| * | |LFT| DN| RT| | |LFT| DN| UP| RT|Vo+|Pg+| | * |-----------------------------------------------------------| * | | | |Prv|Ply|Nxt| | | |Vo-|Pg-| | * |-----------------------------------------------------------| - * | | | | | | | | | + * |RESET| | | | | | | | * `-----------------------------------------------------------' */ -[_LOWER] = KEYMAP_ANSI( +[_FUNC] = KEYMAP_ANSI( _______,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_HOME,KC_UP ,KC_END ,_______,_______,_______,_______,_______,_______,_______,BL_DEC ,BL_INC ,BL_TOGG, \ + _______,KC_HOME,KC_UP ,KC_END ,_______,_______,_______,QWERTY ,COLEMAK,DVORAK ,_______,BL_DEC ,BL_INC ,BL_TOGG, \ _______,KC_LEFT,KC_DOWN,KC_RGHT,_______,_______,KC_LEFT,KC_DOWN,KC_UP ,KC_RGHT,KC_VOLU,KC_PGUP ,_______, \ - RAISE ,_______,_______,KC_MPRV,KC_MPLY,KC_MNXT,_______,_______,_______,KC_VOLD,KC_PGDN ,_______, \ - _______,_______,_______ ,_______ ,_______,_______,_______,_______), - - /* Keymap _RAISE: Function Layer - * ,-----------------------------------------------------------. - * | | | | | | | | | | | | | | RESET | - * |-----------------------------------------------------------| - * | | | | | | | | | | | |BL-|BL+|BL | - * |-----------------------------------------------------------| - * | | | | | | | |QWT|CLM|DVK| | | | - * |-----------------------------------------------------------| - * | | F1|F2 | F3|F4 | F5| F6| F7| F8| | | | - * |-----------------------------------------------------------| - * | | | | | | | | | - * `-----------------------------------------------------------' - */ -[_RAISE] = KEYMAP_ANSI( - #ifdef RGBLIGHT_ENABLE - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,RESET , \ - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ - _______,_______,_______,_______,_______,_______,_______,QWERTY ,COLEMAK,DVORAK ,_______,_______ ,_______, \ - _______ ,RGB_TOG,RGB_MOD,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD,_______,_______ ,_______, \ - _______,_______,_______ ,_______ ,_______,_______,_______,_______ - #else - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,RESET , \ - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ - _______,_______,_______,_______,_______,_______,_______,QWERTY ,COLEMAK,DVORAK ,_______,_______ ,_______, \ - _______ ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______, \ - _______,_______,_______ ,_______ ,_______,_______,_______,_______ - #endif + _______ ,_______,_______,KC_MPRV,KC_MPLY,KC_MNXT,_______,_______,_______,KC_VOLD,KC_PGDN ,_______, \ + RESET ,_______,_______ ,_______ ,_______,_______,_______,_______ ) }; -- cgit v1.2.3 From 9e0ca927f950d1d396e3f45f02e0a3e7dd5b0fff Mon Sep 17 00:00:00 2001 From: tengg Date: Wed, 22 Mar 2017 00:03:30 -0400 Subject: fixed a bug related to mod + Grave with combined ESC/Grave key This only applies to keymaps that has combined esc/grave. Here we call it theKEY. Think about the motion when we do shift + theKEY (typing ~), or CMD + theKEY (switching window on MAC). Based on the original code, we must do following sequence: press shift -> press theKEY -> release theKEY -> release shift. However, it is very possible and natural that we do this stroke sequence instead: press shift -> press theKEY -> release shift -> release theKEY. If we do the 2nd stroke sequence, the code will del_key(ESC) instead of (GRV) when we release theKEY. This caused some inconvenient issues and ghost typing. By adding a flag, this issue is eliminated and will not affect any other functions. --- keyboards/clueboard/keymaps/mac_optimized/keymap.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/keyboards/clueboard/keymaps/mac_optimized/keymap.c b/keyboards/clueboard/keymaps/mac_optimized/keymap.c index 59f7ff243..bb1a5d3cb 100644 --- a/keyboards/clueboard/keymaps/mac_optimized/keymap.c +++ b/keyboards/clueboard/keymaps/mac_optimized/keymap.c @@ -50,6 +50,7 @@ const uint16_t PROGMEM fn_actions[] = { void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { static uint8_t mods_pressed; + static bool mods_flag; switch (id) { case 0: @@ -62,6 +63,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { */ if (mods_pressed) { add_key(KC_GRV); + mod_flag = true; send_keyboard_report(); } else { add_key(KC_ESC); @@ -70,8 +72,9 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { } else { /* The key is being released. */ - if (mods_pressed) { + if (mod_flag) { del_key(KC_GRV); + mod_flag = false; send_keyboard_report(); } else { del_key(KC_ESC); -- cgit v1.2.3 From a89998b977ccb707767149c0fa4bbf614d4eefea Mon Sep 17 00:00:00 2001 From: tengg Date: Wed, 22 Mar 2017 00:28:59 -0400 Subject: fix typo --- keyboards/clueboard/keymaps/mac_optimized/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/clueboard/keymaps/mac_optimized/keymap.c b/keyboards/clueboard/keymaps/mac_optimized/keymap.c index bb1a5d3cb..bd9a76dc8 100644 --- a/keyboards/clueboard/keymaps/mac_optimized/keymap.c +++ b/keyboards/clueboard/keymaps/mac_optimized/keymap.c @@ -49,7 +49,7 @@ const uint16_t PROGMEM fn_actions[] = { }; void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t mods_pressed; + static uint8_t mod_pressed; static bool mods_flag; switch (id) { -- cgit v1.2.3 From 3cba7a43d976be973a4fe32a058b98f092f2e26e Mon Sep 17 00:00:00 2001 From: tengg Date: Wed, 22 Mar 2017 00:33:44 -0400 Subject: typo fixed --- keyboards/clueboard/keymaps/mac_optimized/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/clueboard/keymaps/mac_optimized/keymap.c b/keyboards/clueboard/keymaps/mac_optimized/keymap.c index bd9a76dc8..4a18e9a75 100644 --- a/keyboards/clueboard/keymaps/mac_optimized/keymap.c +++ b/keyboards/clueboard/keymaps/mac_optimized/keymap.c @@ -49,8 +49,8 @@ const uint16_t PROGMEM fn_actions[] = { }; void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t mod_pressed; - static bool mods_flag; + static uint8_t mods_pressed; + static bool mod_flag; switch (id) { case 0: -- cgit v1.2.3 From 452949f9139a04d46748e6abc03e92d65d74eb30 Mon Sep 17 00:00:00 2001 From: skullY Date: Tue, 21 Mar 2017 22:06:47 -0700 Subject: Add #1170 to all the clueboard keymaps --- keyboards/clueboard/keymaps/caps_fn/keymap.c | 5 ++++- keyboards/clueboard/keymaps/colemak/keymap.c | 5 ++++- keyboards/clueboard/keymaps/default/keymap.c | 5 ++++- keyboards/clueboard/keymaps/mac_optimized/keymap.c | 4 ++-- keyboards/clueboard/keymaps/mouse_keys/keymap.c | 5 ++++- keyboards/clueboard/keymaps/shift_fn/keymap.c | 5 ++++- keyboards/clueboard/keymaps/skully/keymap.c | 5 ++++- keyboards/clueboard/keymaps/unix_optimized/keymap.c | 5 ++++- keyboards/clueboard/keymaps/win_optimized/keymap.c | 5 ++++- 9 files changed, 34 insertions(+), 10 deletions(-) diff --git a/keyboards/clueboard/keymaps/caps_fn/keymap.c b/keyboards/clueboard/keymaps/caps_fn/keymap.c index 37f00e8d8..01779446c 100644 --- a/keyboards/clueboard/keymaps/caps_fn/keymap.c +++ b/keyboards/clueboard/keymaps/caps_fn/keymap.c @@ -50,6 +50,7 @@ const uint16_t PROGMEM fn_actions[] = { void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { static uint8_t mods_pressed; + static boot mod_flag; switch (id) { case 0: @@ -61,6 +62,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { /* The key is being pressed. */ if (mods_pressed) { + mod_flag = true; add_key(KC_GRV); send_keyboard_report(); } else { @@ -70,7 +72,8 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { } else { /* The key is being released. */ - if (mods_pressed) { + if (mod_flag) { + mod_flag = false; del_key(KC_GRV); send_keyboard_report(); } else { diff --git a/keyboards/clueboard/keymaps/colemak/keymap.c b/keyboards/clueboard/keymaps/colemak/keymap.c index 6b1fc7c9c..42c85ff9d 100644 --- a/keyboards/clueboard/keymaps/colemak/keymap.c +++ b/keyboards/clueboard/keymaps/colemak/keymap.c @@ -50,6 +50,7 @@ const uint16_t PROGMEM fn_actions[] = { void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { static uint8_t mods_pressed; + static bool mod_flag; switch (id) { case 0: @@ -61,6 +62,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { /* The key is being pressed. */ if (mods_pressed) { + mod_flag = true; add_key(KC_GRV); send_keyboard_report(); } else { @@ -70,7 +72,8 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { } else { /* The key is being released. */ - if (mods_pressed) { + if (mod_flag) { + mod_flag = false; del_key(KC_GRV); send_keyboard_report(); } else { diff --git a/keyboards/clueboard/keymaps/default/keymap.c b/keyboards/clueboard/keymaps/default/keymap.c index 37f00e8d8..7fad9c1b2 100644 --- a/keyboards/clueboard/keymaps/default/keymap.c +++ b/keyboards/clueboard/keymaps/default/keymap.c @@ -50,6 +50,7 @@ const uint16_t PROGMEM fn_actions[] = { void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { static uint8_t mods_pressed; + static bool mod_flag; switch (id) { case 0: @@ -61,6 +62,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { /* The key is being pressed. */ if (mods_pressed) { + mod_flag = true; add_key(KC_GRV); send_keyboard_report(); } else { @@ -70,7 +72,8 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { } else { /* The key is being released. */ - if (mods_pressed) { + if (mod_flag) { + mod_flag = false; del_key(KC_GRV); send_keyboard_report(); } else { diff --git a/keyboards/clueboard/keymaps/mac_optimized/keymap.c b/keyboards/clueboard/keymaps/mac_optimized/keymap.c index 4a18e9a75..7ea02d27e 100644 --- a/keyboards/clueboard/keymaps/mac_optimized/keymap.c +++ b/keyboards/clueboard/keymaps/mac_optimized/keymap.c @@ -62,8 +62,8 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { /* The key is being pressed. */ if (mods_pressed) { - add_key(KC_GRV); mod_flag = true; + add_key(KC_GRV); send_keyboard_report(); } else { add_key(KC_ESC); @@ -73,8 +73,8 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { /* The key is being released. */ if (mod_flag) { - del_key(KC_GRV); mod_flag = false; + del_key(KC_GRV); send_keyboard_report(); } else { del_key(KC_ESC); diff --git a/keyboards/clueboard/keymaps/mouse_keys/keymap.c b/keyboards/clueboard/keymaps/mouse_keys/keymap.c index a9c5cebd0..d3108d1e2 100644 --- a/keyboards/clueboard/keymaps/mouse_keys/keymap.c +++ b/keyboards/clueboard/keymaps/mouse_keys/keymap.c @@ -60,6 +60,7 @@ const uint16_t PROGMEM fn_actions[] = { void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { static uint8_t mods_pressed; + static bool mod_flag; switch (id) { case 0: @@ -71,6 +72,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { /* The key is being pressed. */ if (mods_pressed) { + mod_flag = true; add_key(KC_GRV); send_keyboard_report(); } else { @@ -80,7 +82,8 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { } else { /* The key is being released. */ - if (mods_pressed) { + if (mod_flag) { + mod_flag = false; del_key(KC_GRV); send_keyboard_report(); } else { diff --git a/keyboards/clueboard/keymaps/shift_fn/keymap.c b/keyboards/clueboard/keymaps/shift_fn/keymap.c index f21b9b589..c4fae0369 100644 --- a/keyboards/clueboard/keymaps/shift_fn/keymap.c +++ b/keyboards/clueboard/keymaps/shift_fn/keymap.c @@ -50,6 +50,7 @@ const uint16_t PROGMEM fn_actions[] = { void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { static uint8_t mods_pressed; + static bool mod_flag; switch (id) { case 0: @@ -61,6 +62,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { /* The key is being pressed. */ if (mods_pressed) { + mod_flag = true; add_key(KC_GRV); send_keyboard_report(); } else { @@ -70,7 +72,8 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { } else { /* The key is being released. */ - if (mods_pressed) { + if (mod_flag) { + mod_flag = false; del_key(KC_GRV); send_keyboard_report(); } else { diff --git a/keyboards/clueboard/keymaps/skully/keymap.c b/keyboards/clueboard/keymaps/skully/keymap.c index 295090352..077d214fa 100644 --- a/keyboards/clueboard/keymaps/skully/keymap.c +++ b/keyboards/clueboard/keymaps/skully/keymap.c @@ -47,6 +47,7 @@ const uint16_t PROGMEM fn_actions[] = { void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { static uint8_t mods_pressed; + static bool mod_flag; switch (id) { case 0: @@ -58,6 +59,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { /* The key is being pressed. */ if (mods_pressed) { + mod_flag = true; add_key(KC_GRV); send_keyboard_report(); } else { @@ -67,7 +69,8 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { } else { /* The key is being released. */ - if (mods_pressed) { + if (mod_flag) { + mod_flag = false; del_key(KC_GRV); send_keyboard_report(); } else { diff --git a/keyboards/clueboard/keymaps/unix_optimized/keymap.c b/keyboards/clueboard/keymaps/unix_optimized/keymap.c index 9fbd77240..7c1359954 100644 --- a/keyboards/clueboard/keymaps/unix_optimized/keymap.c +++ b/keyboards/clueboard/keymaps/unix_optimized/keymap.c @@ -50,6 +50,7 @@ const uint16_t PROGMEM fn_actions[] = { void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { static uint8_t mods_pressed; + static bool mod_flag; switch (id) { case 0: @@ -61,6 +62,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { /* The key is being pressed. */ if (mods_pressed) { + mod_flag = true; add_key(KC_GRV); send_keyboard_report(); } else { @@ -70,7 +72,8 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { } else { /* The key is being released. */ - if (mods_pressed) { + if (mod_flag) { + mod_flag = false; del_key(KC_GRV); send_keyboard_report(); } else { diff --git a/keyboards/clueboard/keymaps/win_optimized/keymap.c b/keyboards/clueboard/keymaps/win_optimized/keymap.c index a85f0824f..c5553ff1f 100644 --- a/keyboards/clueboard/keymaps/win_optimized/keymap.c +++ b/keyboards/clueboard/keymaps/win_optimized/keymap.c @@ -50,6 +50,7 @@ const uint16_t PROGMEM fn_actions[] = { void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { static uint8_t mods_pressed; + static bool mod_flag; switch (id) { case 0: @@ -61,6 +62,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { /* The key is being pressed. */ if (mods_pressed) { + mod_flag = true; add_key(KC_GRV); send_keyboard_report(); } else { @@ -70,7 +72,8 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { } else { /* The key is being released. */ - if (mods_pressed) { + if (mod_flag) { + mod_flag = false; del_key(KC_GRV); send_keyboard_report(); } else { -- cgit v1.2.3 From 7a9437a2e3a2597e8eef1ea293bfb3c394f588b9 Mon Sep 17 00:00:00 2001 From: skullY Date: Tue, 21 Mar 2017 22:24:34 -0700 Subject: Fix a typo --- keyboards/clueboard/keymaps/caps_fn/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/clueboard/keymaps/caps_fn/keymap.c b/keyboards/clueboard/keymaps/caps_fn/keymap.c index 01779446c..7fad9c1b2 100644 --- a/keyboards/clueboard/keymaps/caps_fn/keymap.c +++ b/keyboards/clueboard/keymaps/caps_fn/keymap.c @@ -50,7 +50,7 @@ const uint16_t PROGMEM fn_actions[] = { void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { static uint8_t mods_pressed; - static boot mod_flag; + static bool mod_flag; switch (id) { case 0: -- cgit v1.2.3 From f0962bce505a7643abbd169868820715b86f97b7 Mon Sep 17 00:00:00 2001 From: ishtob Date: Wed, 22 Mar 2017 14:55:13 -0400 Subject: Add files via upload --- keyboards/lets_split/keymaps/OLED_sample/Makefile | 25 ++ keyboards/lets_split/keymaps/OLED_sample/config.h | 45 +++ keyboards/lets_split/keymaps/OLED_sample/keymap.c | 356 ++++++++++++++++++++++ 3 files changed, 426 insertions(+) create mode 100644 keyboards/lets_split/keymaps/OLED_sample/Makefile create mode 100644 keyboards/lets_split/keymaps/OLED_sample/config.h create mode 100644 keyboards/lets_split/keymaps/OLED_sample/keymap.c diff --git a/keyboards/lets_split/keymaps/OLED_sample/Makefile b/keyboards/lets_split/keymaps/OLED_sample/Makefile new file mode 100644 index 000000000..90616d1f1 --- /dev/null +++ b/keyboards/lets_split/keymaps/OLED_sample/Makefile @@ -0,0 +1,25 @@ + +# 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 = no # Console for debug(+400) +COMMAND_ENABLE = no # 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 = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +ONEHAND_ENABLE = no # Enable one-hand typing + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/lets_split/keymaps/OLED_sample/config.h b/keyboards/lets_split/keymaps/OLED_sample/config.h new file mode 100644 index 000000000..353ea368c --- /dev/null +++ b/keyboards/lets_split/keymaps/OLED_sample/config.h @@ -0,0 +1,45 @@ +/* +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 . +*/ + +#define USE_I2C +//#define USE_SERIAL +//#define MASTER_RIGHT +#define FLIP_HALF + +#define SSD1306OLED + + +#define PREVENT_STUCK_MODIFIERS +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 100 + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 6 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + + + + +#ifdef SUBPROJECT_rev1 + #include "../../rev1/config.h" +#endif +#ifdef SUBPROJECT_rev2 + #include "../../rev2/config.h" +#endif \ No newline at end of file diff --git a/keyboards/lets_split/keymaps/OLED_sample/keymap.c b/keyboards/lets_split/keymaps/OLED_sample/keymap.c new file mode 100644 index 000000000..072b825ab --- /dev/null +++ b/keyboards/lets_split/keymaps/OLED_sample/keymap.c @@ -0,0 +1,356 @@ +#include "lets_split.h" +#include "bootloader.h" +#include "action_layer.h" +#include "eeconfig.h" +#include "tmk_core/protocol/lufa/LUFA-git/LUFA/Drivers/Peripheral/TWI.h" +#ifdef AUDIO_ENABLE + #include "audio.h" +#endif + +extern keymap_config_t keymap_config; + +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_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 _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + ADJUST, + BACKLIT, + RGBLED_TOGGLE, + RGBLED_STEP_MODE, + RGBLED_INCREASE_HUE, + RGBLED_DECREASE_HUE, + RGBLED_INCREASE_SAT, + RGBLED_DECREASE_SAT, + RGBLED_INCREASE_VAL, + RGBLED_DECREASE_VAL, +}; + +enum macro_keycodes { + KC_SAMPLEMACRO, +}; + + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO +//Macros +#define M_SAMPLE M(KC_SAMPLEMACRO) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = KEYMAP( \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = KEYMAP( \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = KEYMAP( \ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = KEYMAP( \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | 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_DEL, KC_F1, KC_F2, KC_F3, KC_F4, 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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = KEYMAP( \ + _______, RESET, _______, M_SAMPLE, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + + +}; + + +#ifdef AUDIO_ENABLE + +float tone_startup[][2] = SONG(STARTUP_SOUND); +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +float tone_plover[][2] = SONG(PLOVER_SOUND); +float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND); +float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); +float tone_goodbye[][2] = SONG(GOODBYE_SOUND); +#endif + +// define variables for reactive RGB +bool TOG_STATUS = false; +int RGB_current_mode; + +void persistant_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +// Setting ADJUST layer RGB back to default +void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { + if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { + rgblight_mode(RGB_current_mode); + layer_on(layer3); + } else { + layer_off(layer3); + } +} + +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 + persistant_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_colemak, false, 0); + #endif + persistant_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + #endif + persistant_default_layer_set(1UL<<_DVORAK); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + //not sure how to have keyboard check mode and set it to a variable, so my work around + //uses another variable that would be set to true after the first time a reactive key is pressed. + if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false + } else { + TOG_STATUS = !TOG_STATUS; + rgblight_mode(16); + } + layer_on(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change + TOG_STATUS = false; + layer_off(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + //not sure how to have keyboard check mode and set it to a variable, so my work around + //uses another variable that would be set to true after the first time a reactive key is pressed. + if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false + } else { + TOG_STATUS = !TOG_STATUS; + rgblight_mode(15); + } + layer_on(_RAISE); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change + layer_off(_RAISE); + TOG_STATUS = false; + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + return false; + break; + //led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released + case RGB_MOD: + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + return false; + break; + } + return true; +} + +void matrix_init_user(void) { + #ifdef AUDIO_ENABLE + startup_user(); + #endif + RGB_current_mode = rgblight_config.mode; +} + +//SSD1306 OLED init and update loop, make sure to add #define SSD1306OLED in config.h +#ifdef SSD1306OLED +void matrix_master_OLED_init (void) { + TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); + iota_gfx_init(); // turns on the display +} + +void matrix_scan_user(void) { + iota_gfx_task(); // this is what updates the display continuously +} +#endif + +#ifdef AUDIO_ENABLE + +void startup_user() +{ + _delay_ms(20); // gets rid of tick + PLAY_NOTE_ARRAY(tone_startup, false, 0); +} + +void shutdown_user() +{ + PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + _delay_ms(150); + stop_all_notes(); +} + +void music_on_user(void) +{ + music_scale_user(); +} + +void music_scale_user(void) +{ + PLAY_NOTE_ARRAY(music_scale, false, 0); +} + +#endif + +/* + * Macro definition + */ +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + + switch (id) { + case KC_SAMPLEMACRO: + if (record->event.pressed){ + return MACRO (I(10), T(H), T(E), T(L), T(L), T(O), T(SPACE), T(W), T(O), T(R), T(L), T(D), END); + } + + } + + return MACRO_NONE; +} -- cgit v1.2.3 From dfb5a0e8f413338363138dd6beb1701563e1021d Mon Sep 17 00:00:00 2001 From: ishtob Date: Wed, 22 Mar 2017 14:59:20 -0400 Subject: Delete Makefile --- keyboards/lets_split/rev2fliphalf/Makefile | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 keyboards/lets_split/rev2fliphalf/Makefile diff --git a/keyboards/lets_split/rev2fliphalf/Makefile b/keyboards/lets_split/rev2fliphalf/Makefile deleted file mode 100644 index 4e2a6f00f..000000000 --- a/keyboards/lets_split/rev2fliphalf/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -ifndef MAKEFILE_INCLUDED - include ../../Makefile -endif \ No newline at end of file -- cgit v1.2.3 From 6167d7937c15f7fb68f50a48ce34df858f24d80f Mon Sep 17 00:00:00 2001 From: ishtob Date: Wed, 22 Mar 2017 14:59:32 -0400 Subject: Delete config.h --- keyboards/lets_split/rev2fliphalf/config.h | 91 ------------------------------ 1 file changed, 91 deletions(-) delete mode 100644 keyboards/lets_split/rev2fliphalf/config.h diff --git a/keyboards/lets_split/rev2fliphalf/config.h b/keyboards/lets_split/rev2fliphalf/config.h deleted file mode 100644 index 1c45cf136..000000000 --- a/keyboards/lets_split/rev2fliphalf/config.h +++ /dev/null @@ -1,91 +0,0 @@ -/* -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 0x3060 -#define DEVICE_VER 0x0001 -#define MANUFACTURER Wootpatoot -#define PRODUCT Lets Split v2 -#define DESCRIPTION A split keyboard for the cheap makers - -/* key matrix size */ -// Rows are doubled-up -#define MATRIX_ROWS 8 -#define MATRIX_COLS 6 - -// wiring of each half -#define MATRIX_ROW_PINS { D7, E6, B4, B5 } -//#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 } -#define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6 } //uncomment this line and comment line above if you need to reverse left-to-right key order - -//#define CATERINA_BOOTLOADER - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ -// #define BACKLIGHT_LEVELS 3 - -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 - -/* 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 command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - -/* ws2812 RGB LED */ -#define RGB_DI_PIN D3 -#define RGBLIGHT_TIMER -#define RGBLED_NUM 12 // Number of LEDs -#define ws2812_PORTREG PORTD -#define ws2812_DDRREG DDRD - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -// #define NO_DEBUG - -/* disable print */ -// #define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION - - -#endif \ No newline at end of file -- cgit v1.2.3 From d012b0110811595bed92d3a281ccc5480d0a4a86 Mon Sep 17 00:00:00 2001 From: ishtob Date: Wed, 22 Mar 2017 14:59:42 -0400 Subject: Delete rev2fliphalf.c --- keyboards/lets_split/rev2fliphalf/rev2fliphalf.c | 32 ------------------------ 1 file changed, 32 deletions(-) delete mode 100644 keyboards/lets_split/rev2fliphalf/rev2fliphalf.c diff --git a/keyboards/lets_split/rev2fliphalf/rev2fliphalf.c b/keyboards/lets_split/rev2fliphalf/rev2fliphalf.c deleted file mode 100644 index c505d3a6e..000000000 --- a/keyboards/lets_split/rev2fliphalf/rev2fliphalf.c +++ /dev/null @@ -1,32 +0,0 @@ -#include "lets_split.h" - -#ifdef AUDIO_ENABLE - float tone_startup[][2] = SONG(STARTUP_SOUND); - float tone_goodbye[][2] = SONG(GOODBYE_SOUND); -#endif - -void matrix_init_kb(void) { - - #ifdef AUDIO_ENABLE - _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); - #endif - - // // green led on - // DDRD |= (1<<5); - // PORTD &= ~(1<<5); - - // // orange led on - // DDRB |= (1<<0); - // PORTB &= ~(1<<0); - - matrix_init_user(); -}; - -void shutdown_user(void) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); - _delay_ms(150); - stop_all_notes(); - #endif -} -- cgit v1.2.3 From a4bdd6d0845667422c9e42818cfc848bcd0807ee Mon Sep 17 00:00:00 2001 From: ishtob Date: Wed, 22 Mar 2017 14:59:54 -0400 Subject: Delete rev2fliphalf.h --- keyboards/lets_split/rev2fliphalf/rev2fliphalf.h | 28 ------------------------ 1 file changed, 28 deletions(-) delete mode 100644 keyboards/lets_split/rev2fliphalf/rev2fliphalf.h diff --git a/keyboards/lets_split/rev2fliphalf/rev2fliphalf.h b/keyboards/lets_split/rev2fliphalf/rev2fliphalf.h deleted file mode 100644 index 7dc8e5ba8..000000000 --- a/keyboards/lets_split/rev2fliphalf/rev2fliphalf.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef REV2FLIPHALF_H -#define REV2FLIPHALF_H - -#include "../lets_split.h" - -//void promicro_bootloader_jmp(bool program); -#include "quantum.h" - -//void promicro_bootloader_jmp(bool program); - -#define KEYMAP( \ - k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \ - k10, k11, k12, k13, k14, k15, k50, k51, k52, k53, k54, k55, \ - k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \ - k30, k31, k32, k33, k34, k35, k70, k71, k72, k73, k74, k75 \ - ) \ - { \ - { k00, k01, k02, k03, k04, k05 }, \ - { k10, k11, k12, k13, k14, k15 }, \ - { k20, k21, k22, k23, k24, k25 }, \ - { k30, k31, k32, k33, k34, k35 }, \ - { k40, k41, k42, k43, k44, k45 }, \ - { k50, k51, k52, k53, k54, k55 }, \ - { k60, k61, k62, k63, k64, k65 }, \ - { k70, k71, k72, k73, k74, k75 } \ - } - -#endif \ No newline at end of file -- cgit v1.2.3 From 3a7083d810441253404ac22dda259172b6f9b6de Mon Sep 17 00:00:00 2001 From: ishtob Date: Wed, 22 Mar 2017 15:00:00 -0400 Subject: Delete rules.mk --- keyboards/lets_split/rev2fliphalf/rules.mk | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 keyboards/lets_split/rev2fliphalf/rules.mk diff --git a/keyboards/lets_split/rev2fliphalf/rules.mk b/keyboards/lets_split/rev2fliphalf/rules.mk deleted file mode 100644 index 80a942d06..000000000 --- a/keyboards/lets_split/rev2fliphalf/rules.mk +++ /dev/null @@ -1,5 +0,0 @@ -BACKLIGHT_ENABLE = no - -ifndef QUANTUM_DIR - include ../../../Makefile -endif -- cgit v1.2.3 From 423c68c210d73f6bb05c3e9f4a994833b12a524e Mon Sep 17 00:00:00 2001 From: ishtob Date: Wed, 22 Mar 2017 15:02:49 -0400 Subject: Merged Fliphalf, now defined in config, added OLED Can now use the following in the keymap config.h to call the flipped matrix ``` #define FLIPHALF ``` --- keyboards/lets_split/rev2/rev2.c | 8 ++++++ keyboards/lets_split/rev2/rev2.h | 59 ++++++++++++++++++++++++++++++++++------ 2 files changed, 59 insertions(+), 8 deletions(-) diff --git a/keyboards/lets_split/rev2/rev2.c b/keyboards/lets_split/rev2/rev2.c index c505d3a6e..8bfa171d0 100644 --- a/keyboards/lets_split/rev2/rev2.c +++ b/keyboards/lets_split/rev2/rev2.c @@ -5,6 +5,13 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND); #endif +#ifdef SSD1306OLED +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); +} +#endif + void matrix_init_kb(void) { #ifdef AUDIO_ENABLE @@ -30,3 +37,4 @@ void shutdown_user(void) { stop_all_notes(); #endif } + diff --git a/keyboards/lets_split/rev2/rev2.h b/keyboards/lets_split/rev2/rev2.h index 990976de2..054731366 100644 --- a/keyboards/lets_split/rev2/rev2.h +++ b/keyboards/lets_split/rev2/rev2.h @@ -6,23 +6,66 @@ //void promicro_bootloader_jmp(bool program); #include "quantum.h" + +#ifdef USE_I2C +#include +#ifdef __AVR__ +#include +#include +#endif +#ifdef SSD1306OLED +extern bool iota_gfx_init(void); +extern void iota_gfx_task(void); +extern bool iota_gfx_off(void); +extern bool iota_gfx_on(void); +extern void iota_gfx_flush(void); +extern void iota_gfx_write_char(uint8_t c); +extern void iota_gfx_write(const char *data); +extern void iota_gfx_write_P(const char *data); +extern void iota_gfx_clear_screen(void); +#endif +#endif + //void promicro_bootloader_jmp(bool program); +#ifndef FLIP_HALF +//Standard Keymap #define KEYMAP( \ - k00, k01, k02, k03, k04, k05, k45, k44, k43, k42, k41, k40, \ - k10, k11, k12, k13, k14, k15, k55, k54, k53, k52, k51, k50, \ - k20, k21, k22, k23, k24, k25, k65, k64, k63, k62, k61, k60, \ - k30, k31, k32, k33, k34, k35, k75, k74, k73, k72, k71, k70 \ + k40, k41, k42, k43, k44, k45, k05, k04, k03, k02, k01, k00, \ + k50, k51, k52, k53, k54, k55, k15, k14, k13, k12, k11, k10, \ + k60, k61, k62, k63, k64, k65, k25, k24, k23, k22, k21, k20, \ + k70, k71, k72, k73, k74, k75, k35, k34, k33, k32, k31, k30 \ + ) \ + { \ + { k45, k44, k43, k42, k41, k40 }, \ + { k55, k54, k53, k52, k51, k50 }, \ + { k65, k64, k63, k62, k61, k60 }, \ + { k75, k74, k73, k72, k71, k70 }, \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k33, k34, k35 } \ + } + +#else +// Keymap with one side flipped +#define KEYMAP( \ + k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \ + k10, k11, k12, k13, k14, k15, k50, k51, k52, k53, k54, k55, \ + k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \ + k30, k31, k32, k33, k34, k35, k70, k71, k72, k73, k74, k75 \ ) \ { \ { k00, k01, k02, k03, k04, k05 }, \ { k10, k11, k12, k13, k14, k15 }, \ { k20, k21, k22, k23, k24, k25 }, \ { k30, k31, k32, k33, k34, k35 }, \ - { k40, k41, k42, k43, k44, k45 }, \ - { k50, k51, k52, k53, k54, k55 }, \ - { k60, k61, k62, k63, k64, k65 }, \ - { k70, k71, k72, k73, k74, k75 } \ + { k45, k44, k43, k42, k41, k40 }, \ + { k55, k54, k53, k52, k51, k50 }, \ + { k65, k64, k63, k62, k61, k60 }, \ + { k75, k74, k73, k72, k71, k70 } \ } +#endif + #endif \ No newline at end of file -- cgit v1.2.3 From 65317a3a020c0b0261849fb4c40d3aae175ac337 Mon Sep 17 00:00:00 2001 From: ishtob Date: Wed, 22 Mar 2017 15:04:11 -0400 Subject: Added OLED SSD1306 support to I2C --- keyboards/lets_split/common/glcdfont.c | 276 ++++++++++++++++++ keyboards/lets_split/i2c.c | 94 +++++- keyboards/lets_split/i2c.h | 20 +- keyboards/lets_split/matrix.c | 7 +- keyboards/lets_split/rules.mk | 15 +- keyboards/lets_split/split_util.c | 7 +- keyboards/lets_split/split_util.h | 2 + keyboards/lets_split/ssd1306.c | 508 +++++++++++++++++++++++++++++++++ 8 files changed, 908 insertions(+), 21 deletions(-) create mode 100644 keyboards/lets_split/common/glcdfont.c create mode 100644 keyboards/lets_split/ssd1306.c diff --git a/keyboards/lets_split/common/glcdfont.c b/keyboards/lets_split/common/glcdfont.c new file mode 100644 index 000000000..6f88bd23a --- /dev/null +++ b/keyboards/lets_split/common/glcdfont.c @@ -0,0 +1,276 @@ +// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. +// See gfxfont.h for newer custom bitmap font info. + +#ifndef FONT5X7_H +#define FONT5X7_H + +#ifdef __AVR__ + #include + #include +#elif defined(ESP8266) + #include +#else + #define PROGMEM +#endif + +// Standard ASCII 5x7 font + +static const unsigned char font[] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x00, + 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, + 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, + 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, + 0x18, 0x3C, 0x7E, 0x3C, 0x18, + 0x1C, 0x57, 0x7D, 0x57, 0x1C, + 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, + 0x00, 0x18, 0x3C, 0x18, 0x00, + 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, + 0x00, 0x18, 0x24, 0x18, 0x00, + 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, + 0x30, 0x48, 0x3A, 0x06, 0x0E, + 0x26, 0x29, 0x79, 0x29, 0x26, + 0x40, 0x7F, 0x05, 0x05, 0x07, + 0x40, 0x7F, 0x05, 0x25, 0x3F, + 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, + 0x7F, 0x3E, 0x1C, 0x1C, 0x08, + 0x08, 0x1C, 0x1C, 0x3E, 0x7F, + 0x14, 0x22, 0x7F, 0x22, 0x14, + 0x5F, 0x5F, 0x00, 0x5F, 0x5F, + 0x06, 0x09, 0x7F, 0x01, 0x7F, + 0x00, 0x66, 0x89, 0x95, 0x6A, + 0x60, 0x60, 0x60, 0x60, 0x60, + 0x94, 0xA2, 0xFF, 0xA2, 0x94, + 0x08, 0x04, 0x7E, 0x04, 0x08, + 0x10, 0x20, 0x7E, 0x20, 0x10, + 0x08, 0x08, 0x2A, 0x1C, 0x08, + 0x08, 0x1C, 0x2A, 0x08, 0x08, + 0x1E, 0x10, 0x10, 0x10, 0x10, + 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, + 0x30, 0x38, 0x3E, 0x38, 0x30, + 0x06, 0x0E, 0x3E, 0x0E, 0x06, + 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x5F, 0x00, 0x00, + 0x00, 0x07, 0x00, 0x07, 0x00, + 0x14, 0x7F, 0x14, 0x7F, 0x14, + 0x24, 0x2A, 0x7F, 0x2A, 0x12, + 0x23, 0x13, 0x08, 0x64, 0x62, + 0x36, 0x49, 0x56, 0x20, 0x50, + 0x00, 0x08, 0x07, 0x03, 0x00, + 0x00, 0x1C, 0x22, 0x41, 0x00, + 0x00, 0x41, 0x22, 0x1C, 0x00, + 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, + 0x08, 0x08, 0x3E, 0x08, 0x08, + 0x00, 0x80, 0x70, 0x30, 0x00, + 0x08, 0x08, 0x08, 0x08, 0x08, + 0x00, 0x00, 0x60, 0x60, 0x00, + 0x20, 0x10, 0x08, 0x04, 0x02, + 0x3E, 0x51, 0x49, 0x45, 0x3E, + 0x00, 0x42, 0x7F, 0x40, 0x00, + 0x72, 0x49, 0x49, 0x49, 0x46, + 0x21, 0x41, 0x49, 0x4D, 0x33, + 0x18, 0x14, 0x12, 0x7F, 0x10, + 0x27, 0x45, 0x45, 0x45, 0x39, + 0x3C, 0x4A, 0x49, 0x49, 0x31, + 0x41, 0x21, 0x11, 0x09, 0x07, + 0x36, 0x49, 0x49, 0x49, 0x36, + 0x46, 0x49, 0x49, 0x29, 0x1E, + 0x00, 0x00, 0x14, 0x00, 0x00, + 0x00, 0x40, 0x34, 0x00, 0x00, + 0x00, 0x08, 0x14, 0x22, 0x41, + 0x14, 0x14, 0x14, 0x14, 0x14, + 0x00, 0x41, 0x22, 0x14, 0x08, + 0x02, 0x01, 0x59, 0x09, 0x06, + 0x3E, 0x41, 0x5D, 0x59, 0x4E, + 0x7C, 0x12, 0x11, 0x12, 0x7C, + 0x7F, 0x49, 0x49, 0x49, 0x36, + 0x3E, 0x41, 0x41, 0x41, 0x22, + 0x7F, 0x41, 0x41, 0x41, 0x3E, + 0x7F, 0x49, 0x49, 0x49, 0x41, + 0x7F, 0x09, 0x09, 0x09, 0x01, + 0x3E, 0x41, 0x41, 0x51, 0x73, + 0x7F, 0x08, 0x08, 0x08, 0x7F, + 0x00, 0x41, 0x7F, 0x41, 0x00, + 0x20, 0x40, 0x41, 0x3F, 0x01, + 0x7F, 0x08, 0x14, 0x22, 0x41, + 0x7F, 0x40, 0x40, 0x40, 0x40, + 0x7F, 0x02, 0x1C, 0x02, 0x7F, + 0x7F, 0x04, 0x08, 0x10, 0x7F, + 0x3E, 0x41, 0x41, 0x41, 0x3E, + 0x7F, 0x09, 0x09, 0x09, 0x06, + 0x3E, 0x41, 0x51, 0x21, 0x5E, + 0x7F, 0x09, 0x19, 0x29, 0x46, + 0x26, 0x49, 0x49, 0x49, 0x32, + 0x03, 0x01, 0x7F, 0x01, 0x03, + 0x3F, 0x40, 0x40, 0x40, 0x3F, + 0x1F, 0x20, 0x40, 0x20, 0x1F, + 0x3F, 0x40, 0x38, 0x40, 0x3F, + 0x63, 0x14, 0x08, 0x14, 0x63, + 0x03, 0x04, 0x78, 0x04, 0x03, + 0x61, 0x59, 0x49, 0x4D, 0x43, + 0x00, 0x7F, 0x41, 0x41, 0x41, + 0x02, 0x04, 0x08, 0x10, 0x20, + 0x00, 0x41, 0x41, 0x41, 0x7F, + 0x04, 0x02, 0x01, 0x02, 0x04, + 0x40, 0x40, 0x40, 0x40, 0x40, + 0x00, 0x03, 0x07, 0x08, 0x00, + 0x20, 0x54, 0x54, 0x78, 0x40, + 0x7F, 0x28, 0x44, 0x44, 0x38, + 0x38, 0x44, 0x44, 0x44, 0x28, + 0x38, 0x44, 0x44, 0x28, 0x7F, + 0x38, 0x54, 0x54, 0x54, 0x18, + 0x00, 0x08, 0x7E, 0x09, 0x02, + 0x18, 0xA4, 0xA4, 0x9C, 0x78, + 0x7F, 0x08, 0x04, 0x04, 0x78, + 0x00, 0x44, 0x7D, 0x40, 0x00, + 0x20, 0x40, 0x40, 0x3D, 0x00, + 0x7F, 0x10, 0x28, 0x44, 0x00, + 0x00, 0x41, 0x7F, 0x40, 0x00, + 0x7C, 0x04, 0x78, 0x04, 0x78, + 0x7C, 0x08, 0x04, 0x04, 0x78, + 0x38, 0x44, 0x44, 0x44, 0x38, + 0xFC, 0x18, 0x24, 0x24, 0x18, + 0x18, 0x24, 0x24, 0x18, 0xFC, + 0x7C, 0x08, 0x04, 0x04, 0x08, + 0x48, 0x54, 0x54, 0x54, 0x24, + 0x04, 0x04, 0x3F, 0x44, 0x24, + 0x3C, 0x40, 0x40, 0x20, 0x7C, + 0x1C, 0x20, 0x40, 0x20, 0x1C, + 0x3C, 0x40, 0x30, 0x40, 0x3C, + 0x44, 0x28, 0x10, 0x28, 0x44, + 0x4C, 0x90, 0x90, 0x90, 0x7C, + 0x44, 0x64, 0x54, 0x4C, 0x44, + 0x00, 0x08, 0x36, 0x41, 0x00, + 0x00, 0x00, 0x77, 0x00, 0x00, + 0x00, 0x41, 0x36, 0x08, 0x00, + 0x02, 0x01, 0x02, 0x04, 0x02, + 0x3C, 0x26, 0x23, 0x26, 0x3C, + 0x1E, 0xA1, 0xA1, 0x61, 0x12, + 0x3A, 0x40, 0x40, 0x20, 0x7A, + 0x38, 0x54, 0x54, 0x55, 0x59, + 0x21, 0x55, 0x55, 0x79, 0x41, + 0x22, 0x54, 0x54, 0x78, 0x42, // a-umlaut + 0x21, 0x55, 0x54, 0x78, 0x40, + 0x20, 0x54, 0x55, 0x79, 0x40, + 0x0C, 0x1E, 0x52, 0x72, 0x12, + 0x39, 0x55, 0x55, 0x55, 0x59, + 0x39, 0x54, 0x54, 0x54, 0x59, + 0x39, 0x55, 0x54, 0x54, 0x58, + 0x00, 0x00, 0x45, 0x7C, 0x41, + 0x00, 0x02, 0x45, 0x7D, 0x42, + 0x00, 0x01, 0x45, 0x7C, 0x40, + 0x7D, 0x12, 0x11, 0x12, 0x7D, // A-umlaut + 0xF0, 0x28, 0x25, 0x28, 0xF0, + 0x7C, 0x54, 0x55, 0x45, 0x00, + 0x20, 0x54, 0x54, 0x7C, 0x54, + 0x7C, 0x0A, 0x09, 0x7F, 0x49, + 0x32, 0x49, 0x49, 0x49, 0x32, + 0x3A, 0x44, 0x44, 0x44, 0x3A, // o-umlaut + 0x32, 0x4A, 0x48, 0x48, 0x30, + 0x3A, 0x41, 0x41, 0x21, 0x7A, + 0x3A, 0x42, 0x40, 0x20, 0x78, + 0x00, 0x9D, 0xA0, 0xA0, 0x7D, + 0x3D, 0x42, 0x42, 0x42, 0x3D, // O-umlaut + 0x3D, 0x40, 0x40, 0x40, 0x3D, + 0x3C, 0x24, 0xFF, 0x24, 0x24, + 0x48, 0x7E, 0x49, 0x43, 0x66, + 0x2B, 0x2F, 0xFC, 0x2F, 0x2B, + 0xFF, 0x09, 0x29, 0xF6, 0x20, + 0xC0, 0x88, 0x7E, 0x09, 0x03, + 0x20, 0x54, 0x54, 0x79, 0x41, + 0x00, 0x00, 0x44, 0x7D, 0x41, + 0x30, 0x48, 0x48, 0x4A, 0x32, + 0x38, 0x40, 0x40, 0x22, 0x7A, + 0x00, 0x7A, 0x0A, 0x0A, 0x72, + 0x7D, 0x0D, 0x19, 0x31, 0x7D, + 0x26, 0x29, 0x29, 0x2F, 0x28, + 0x26, 0x29, 0x29, 0x29, 0x26, + 0x30, 0x48, 0x4D, 0x40, 0x20, + 0x38, 0x08, 0x08, 0x08, 0x08, + 0x08, 0x08, 0x08, 0x08, 0x38, + 0x2F, 0x10, 0xC8, 0xAC, 0xBA, + 0x2F, 0x10, 0x28, 0x34, 0xFA, + 0x00, 0x00, 0x7B, 0x00, 0x00, + 0x08, 0x14, 0x2A, 0x14, 0x22, + 0x22, 0x14, 0x2A, 0x14, 0x08, + 0x55, 0x00, 0x55, 0x00, 0x55, // #176 (25% block) missing in old code + 0xAA, 0x55, 0xAA, 0x55, 0xAA, // 50% block + 0xFF, 0x55, 0xFF, 0x55, 0xFF, // 75% block + 0x00, 0x00, 0x00, 0xFF, 0x00, + 0x10, 0x10, 0x10, 0xFF, 0x00, + 0x14, 0x14, 0x14, 0xFF, 0x00, + 0x10, 0x10, 0xFF, 0x00, 0xFF, + 0x10, 0x10, 0xF0, 0x10, 0xF0, + 0x14, 0x14, 0x14, 0xFC, 0x00, + 0x14, 0x14, 0xF7, 0x00, 0xFF, + 0x00, 0x00, 0xFF, 0x00, 0xFF, + 0x14, 0x14, 0xF4, 0x04, 0xFC, + 0x14, 0x14, 0x17, 0x10, 0x1F, + 0x10, 0x10, 0x1F, 0x10, 0x1F, + 0x14, 0x14, 0x14, 0x1F, 0x00, + 0x10, 0x10, 0x10, 0xF0, 0x00, + 0x00, 0x00, 0x00, 0x1F, 0x10, + 0x10, 0x10, 0x10, 0x1F, 0x10, + 0x10, 0x10, 0x10, 0xF0, 0x10, + 0x00, 0x00, 0x00, 0xFF, 0x10, + 0x10, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0xFF, 0x10, + 0x00, 0x00, 0x00, 0xFF, 0x14, + 0x00, 0x00, 0xFF, 0x00, 0xFF, + 0x00, 0x00, 0x1F, 0x10, 0x17, + 0x00, 0x00, 0xFC, 0x04, 0xF4, + 0x14, 0x14, 0x17, 0x10, 0x17, + 0x14, 0x14, 0xF4, 0x04, 0xF4, + 0x00, 0x00, 0xFF, 0x00, 0xF7, + 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0xF7, 0x00, 0xF7, + 0x14, 0x14, 0x14, 0x17, 0x14, + 0x10, 0x10, 0x1F, 0x10, 0x1F, + 0x14, 0x14, 0x14, 0xF4, 0x14, + 0x10, 0x10, 0xF0, 0x10, 0xF0, + 0x00, 0x00, 0x1F, 0x10, 0x1F, + 0x00, 0x00, 0x00, 0x1F, 0x14, + 0x00, 0x00, 0x00, 0xFC, 0x14, + 0x00, 0x00, 0xF0, 0x10, 0xF0, + 0x10, 0x10, 0xFF, 0x10, 0xFF, + 0x14, 0x14, 0x14, 0xFF, 0x14, + 0x10, 0x10, 0x10, 0x1F, 0x00, + 0x00, 0x00, 0x00, 0xF0, 0x10, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, + 0xFF, 0xFF, 0xFF, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xFF, 0xFF, + 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, + 0x38, 0x44, 0x44, 0x38, 0x44, + 0xFC, 0x4A, 0x4A, 0x4A, 0x34, // sharp-s or beta + 0x7E, 0x02, 0x02, 0x06, 0x06, + 0x02, 0x7E, 0x02, 0x7E, 0x02, + 0x63, 0x55, 0x49, 0x41, 0x63, + 0x38, 0x44, 0x44, 0x3C, 0x04, + 0x40, 0x7E, 0x20, 0x1E, 0x20, + 0x06, 0x02, 0x7E, 0x02, 0x02, + 0x99, 0xA5, 0xE7, 0xA5, 0x99, + 0x1C, 0x2A, 0x49, 0x2A, 0x1C, + 0x4C, 0x72, 0x01, 0x72, 0x4C, + 0x30, 0x4A, 0x4D, 0x4D, 0x30, + 0x30, 0x48, 0x78, 0x48, 0x30, + 0xBC, 0x62, 0x5A, 0x46, 0x3D, + 0x3E, 0x49, 0x49, 0x49, 0x00, + 0x7E, 0x01, 0x01, 0x01, 0x7E, + 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, + 0x44, 0x44, 0x5F, 0x44, 0x44, + 0x40, 0x51, 0x4A, 0x44, 0x40, + 0x40, 0x44, 0x4A, 0x51, 0x40, + 0x00, 0x00, 0xFF, 0x01, 0x03, + 0xE0, 0x80, 0xFF, 0x00, 0x00, + 0x08, 0x08, 0x6B, 0x6B, 0x08, + 0x36, 0x12, 0x36, 0x24, 0x36, + 0x06, 0x0F, 0x09, 0x0F, 0x06, + 0x00, 0x00, 0x18, 0x18, 0x00, + 0x00, 0x00, 0x10, 0x10, 0x00, + 0x30, 0x40, 0xFF, 0x01, 0x01, + 0x00, 0x1F, 0x01, 0x01, 0x1E, + 0x00, 0x19, 0x1D, 0x17, 0x12, + 0x00, 0x3C, 0x3C, 0x3C, 0x3C, + 0x00, 0x00, 0x00, 0x00, 0x00 // #255 NBSP +}; +#endif // FONT5X7_H diff --git a/keyboards/lets_split/i2c.c b/keyboards/lets_split/i2c.c index 084c890c4..038f37a4b 100644 --- a/keyboards/lets_split/i2c.c +++ b/keyboards/lets_split/i2c.c @@ -48,7 +48,7 @@ void i2c_master_init(void) { // returns: 0 => success // 1 => error uint8_t i2c_master_start(uint8_t address) { - TWCR = (1< ERROR_DISCONNECT_COUNT) { @@ -226,9 +227,7 @@ uint8_t matrix_scan(void) TXLED0; error_count = 0; } - matrix_scan_quantum(); - return ret; } diff --git a/keyboards/lets_split/rules.mk b/keyboards/lets_split/rules.mk index 0efa78550..ff159e0f0 100644 --- a/keyboards/lets_split/rules.mk +++ b/keyboards/lets_split/rules.mk @@ -1,7 +1,8 @@ SRC += matrix.c \ i2c.c \ split_util.c \ - serial.c + serial.c\ + ssd1306.c # MCU name #MCU = at90usb1287 @@ -73,15 +74,3 @@ USE_I2C ?= yes SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes - -avrdude: build - ls /dev/tty* > /tmp/1; \ - echo "Reset your Pro Micro now"; \ - while [[ -z $$USB ]]; do \ - sleep 1; \ - ls /dev/tty* > /tmp/2; \ - USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \ - done; \ - avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex - -.PHONY: avrdude diff --git a/keyboards/lets_split/split_util.c b/keyboards/lets_split/split_util.c index 226dc1881..b87bae38b 100644 --- a/keyboards/lets_split/split_util.c +++ b/keyboards/lets_split/split_util.c @@ -21,8 +21,8 @@ static void setup_handedness(void) { #ifdef EE_HANDS isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS); #else - // I2C_MASTER_RIGHT is deprecated use MASTER_RIGHT instead since this works for both serial and i2c - #if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT) + // I2c_MASTER_RIGHT ish deprecate use MASTER_RIGHT instead since this works for both serial and i2c: + #if defined (I2C_MASTER_RIGHT) || defined (MASTER_RIGHT) isLeftHand = !has_usb(); #else isLeftHand = has_usb(); @@ -33,6 +33,9 @@ static void setup_handedness(void) { static void keyboard_master_setup(void) { #ifdef USE_I2C i2c_master_init(); +#ifdef SSD1306OLED + matrix_master_OLED_init (); +#endif #else serial_master_init(); #endif diff --git a/keyboards/lets_split/split_util.h b/keyboards/lets_split/split_util.h index 6b896679c..3ae76c209 100644 --- a/keyboards/lets_split/split_util.h +++ b/keyboards/lets_split/split_util.h @@ -19,4 +19,6 @@ void split_keyboard_setup(void); bool has_usb(void); void keyboard_slave_loop(void); +void matrix_master_OLED_init (void); + #endif diff --git a/keyboards/lets_split/ssd1306.c b/keyboards/lets_split/ssd1306.c new file mode 100644 index 000000000..c25a355bf --- /dev/null +++ b/keyboards/lets_split/ssd1306.c @@ -0,0 +1,508 @@ +#include "config.h" +#include "i2c.h" +#include +#include +#include +#include "print.h" +#include "lets_split.h" +#include "common/glcdfont.c" +#ifdef ADAFRUIT_BLE_ENABLE +#include "adafruit_ble.h" +#endif +#ifdef PROTOCOL_LUFA +#include "lufa.h" +#endif +#include "sendchar.h" +#include "pincontrol.h" + +//assign the right code to your layers +#define _BASE 0 +#define _LOWER 8 +#define _RAISE 16 +#define _FNLAYER 64 +#define _NUMLAY 128 +#define _NLOWER 136 +#define _NFNLAYER 192 +#define _MOUSECURSOR 256 +#define _ADJUST 65560 + +// Set this to 1 to help diagnose early startup problems +// when testing power-on with ble. Turn it off otherwise, +// as the latency of printing most of the debug info messes +// with the matrix scan, causing keys to drop. +#define DEBUG_TO_SCREEN 0 + +// Controls the SSD1306 128x32 OLED display via i2c + +#define i2cAddress 0x3C + +#define DisplayHeight 32 +#define DisplayWidth 128 + +#define FontHeight 8 +#define FontWidth 6 + +#define MatrixRows (DisplayHeight / FontHeight) +#define MatrixCols (DisplayWidth / FontWidth) + +struct CharacterMatrix { + uint8_t display[MatrixRows][MatrixCols]; + uint8_t *cursor; + bool dirty; +}; + +static struct CharacterMatrix display; +//static uint16_t last_battery_update; +//static uint32_t vbat; +//#define BatteryUpdateInterval 10000 /* milliseconds */ +#define ScreenOffInterval 300000 /* milliseconds */ +#if DEBUG_TO_SCREEN +static uint8_t displaying; +#endif +static uint16_t last_flush; + +enum ssd1306_cmds { + DisplayOff = 0xAE, + DisplayOn = 0xAF, + + SetContrast = 0x81, + DisplayAllOnResume = 0xA4, + + DisplayAllOn = 0xA5, + NormalDisplay = 0xA6, + InvertDisplay = 0xA7, + SetDisplayOffset = 0xD3, + SetComPins = 0xda, + SetVComDetect = 0xdb, + SetDisplayClockDiv = 0xD5, + SetPreCharge = 0xd9, + SetMultiPlex = 0xa8, + SetLowColumn = 0x00, + SetHighColumn = 0x10, + SetStartLine = 0x40, + + SetMemoryMode = 0x20, + ColumnAddr = 0x21, + PageAddr = 0x22, + + ComScanInc = 0xc0, + ComScanDec = 0xc8, + SegRemap = 0xa0, + SetChargePump = 0x8d, + ExternalVcc = 0x01, + SwitchCapVcc = 0x02, + + ActivateScroll = 0x2f, + DeActivateScroll = 0x2e, + SetVerticalScrollArea = 0xa3, + RightHorizontalScroll = 0x26, + LeftHorizontalScroll = 0x27, + VerticalAndRightHorizontalScroll = 0x29, + VerticalAndLeftHorizontalScroll = 0x2a, +}; + + +// Write command sequence. +// Returns true on success. +static inline bool _send_cmd1(uint8_t cmd) { + bool res = false; + + if (i2c_start_write(i2cAddress)) { + xprintf("failed to start write to %d\n", i2cAddress); + goto done; + } + + if (i2c_master_write(0x0 /* command byte follows */)) { + print("failed to write control byte\n"); + + goto done; + } + + if (i2c_master_write(cmd)) { + xprintf("failed to write command %d\n", cmd); + goto done; + } + res = true; +done: + i2c_master_stop(); + return res; +} + +// Write 2-byte command sequence. +// Returns true on success +static inline bool _send_cmd2(uint8_t cmd, uint8_t opr) { + if (!_send_cmd1(cmd)) { + return false; + } + return _send_cmd1(opr); +} + +// Write 3-byte command sequence. +// Returns true on success +static inline bool _send_cmd3(uint8_t cmd, uint8_t opr1, uint8_t opr2) { + if (!_send_cmd1(cmd)) { + return false; + } + if (!_send_cmd1(opr1)) { + return false; + } + return _send_cmd1(opr2); +} + +#define send_cmd1(c) if (!_send_cmd1(c)) {goto done;} +#define send_cmd2(c,o) if (!_send_cmd2(c,o)) {goto done;} +#define send_cmd3(c,o1,o2) if (!_send_cmd3(c,o1,o2)) {goto done;} + +static void matrix_clear(struct CharacterMatrix *matrix); + +static void clear_display(void) { + matrix_clear(&display); + + // Clear all of the display bits (there can be random noise + // in the RAM on startup) + send_cmd3(PageAddr, 0, (DisplayHeight / 8) - 1); + send_cmd3(ColumnAddr, 0, DisplayWidth - 1); + + if (i2c_start_write(i2cAddress)) { + goto done; + } + if (i2c_master_write(0x40)) { + // Data mode + goto done; + } + for (uint8_t row = 0; row < MatrixRows; ++row) { + for (uint8_t col = 0; col < DisplayWidth; ++col) { + i2c_master_write(0); + } + } + + display.dirty = false; + +done: + i2c_master_stop(); +} + +#if DEBUG_TO_SCREEN +#undef sendchar +static int8_t capture_sendchar(uint8_t c) { + sendchar(c); + iota_gfx_write_char(c); + + if (!displaying) { + iota_gfx_flush(); + } + return 0; +} +#endif + +bool iota_gfx_init(void) { + bool success = false; + + send_cmd1(DisplayOff); + send_cmd2(SetDisplayClockDiv, 0x80); + send_cmd2(SetMultiPlex, DisplayHeight - 1); + + send_cmd2(SetDisplayOffset, 0); + + + send_cmd1(SetStartLine | 0x0); + send_cmd2(SetChargePump, 0x14 /* Enable */); + send_cmd2(SetMemoryMode, 0 /* horizontal addressing */); + +/* Flips the display orientation 0 degrees + send_cmd1(SegRemap | 0x1); + send_cmd1(ComScanDec); +*/ +// the following Flip the display orientation 180 degrees */ + send_cmd1(SegRemap); + send_cmd1(ComScanInc); +//end flip + send_cmd2(SetComPins, 0x2); + send_cmd2(SetContrast, 0x8f); + send_cmd2(SetPreCharge, 0xf1); + send_cmd2(SetVComDetect, 0x40); + send_cmd1(DisplayAllOnResume); + send_cmd1(NormalDisplay); + send_cmd1(DeActivateScroll); + send_cmd1(DisplayOn); + + send_cmd2(SetContrast, 0); // Dim + + clear_display(); + + success = true; + + iota_gfx_flush(); + +#if DEBUG_TO_SCREEN + print_set_sendchar(capture_sendchar); +#endif + +done: + return success; +} + +bool iota_gfx_off(void) { + bool success = false; + + send_cmd1(DisplayOff); + success = true; + +done: + return success; +} + +bool iota_gfx_on(void) { + bool success = false; + + send_cmd1(DisplayOn); + success = true; + +done: + return success; +} + +static void matrix_write_char_inner(struct CharacterMatrix *matrix, uint8_t c) { + *matrix->cursor = c; + ++matrix->cursor; + + if (matrix->cursor - &matrix->display[0][0] == sizeof(matrix->display)) { + // We went off the end; scroll the display upwards by one line + memmove(&matrix->display[0], &matrix->display[1], + MatrixCols * (MatrixRows - 1)); + matrix->cursor = &matrix->display[MatrixRows - 1][0]; + memset(matrix->cursor, ' ', MatrixCols); + } +} + +static void matrix_write_char(struct CharacterMatrix *matrix, uint8_t c) { + matrix->dirty = true; + + if (c == '\n') { + // Clear to end of line from the cursor and then move to the + // start of the next line + uint8_t cursor_col = (matrix->cursor - &matrix->display[0][0]) % MatrixCols; + + while (cursor_col++ < MatrixCols) { + matrix_write_char_inner(matrix, ' '); + } + return; + } + + matrix_write_char_inner(matrix, c); +} + +void iota_gfx_write_char(uint8_t c) { + matrix_write_char(&display, c); +} + +static void matrix_write(struct CharacterMatrix *matrix, const char *data) { + const char *end = data + strlen(data); + while (data < end) { + matrix_write_char(matrix, *data); + ++data; + } +} + +void iota_gfx_write(const char *data) { + matrix_write(&display, data); +} + +static void matrix_write_P(struct CharacterMatrix *matrix, const char *data) { + while (true) { + uint8_t c = pgm_read_byte(data); + if (c == 0) { + return; + } + matrix_write_char(matrix, c); + ++data; + } +} + +void iota_gfx_write_P(const char *data) { + matrix_write_P(&display, data); +} + +static void matrix_clear(struct CharacterMatrix *matrix) { + memset(matrix->display, ' ', sizeof(matrix->display)); + matrix->cursor = &matrix->display[0][0]; + matrix->dirty = true; +} + +void iota_gfx_clear_screen(void) { + matrix_clear(&display); +} + +static void matrix_render(struct CharacterMatrix *matrix) { + last_flush = timer_read(); + iota_gfx_on(); +#if DEBUG_TO_SCREEN + ++displaying; +#endif + + // Move to the home position + send_cmd3(PageAddr, 0, MatrixRows - 1); + send_cmd3(ColumnAddr, 0, (MatrixCols * FontWidth) - 1); + + if (i2c_start_write(i2cAddress)) { + goto done; + } + if (i2c_master_write(0x40)) { + // Data mode + goto done; + } + + for (uint8_t row = 0; row < MatrixRows; ++row) { + for (uint8_t col = 0; col < MatrixCols; ++col) { + const uint8_t *glyph = font + (matrix->display[row][col] * (FontWidth - 1)); + + for (uint8_t glyphCol = 0; glyphCol < FontWidth - 1; ++glyphCol) { + uint8_t colBits = pgm_read_byte(glyph + glyphCol); + i2c_master_write(colBits); + } + + // 1 column of space between chars (it's not included in the glyph) + i2c_master_write(0); + } + } + + matrix->dirty = false; + +done: + i2c_master_stop(); +#if DEBUG_TO_SCREEN + --displaying; +#endif +} + +void iota_gfx_flush(void) { + matrix_render(&display); +} + +//#include "LUFA/Drivers/Peripheral/ADC.h" + +/* Returns the battery voltage; returns the number of millivolts +static uint32_t read_battery_voltage(void) { + if (last_battery_update == 0 || + timer_elapsed(last_battery_update) > BatteryUpdateInterval) { + ADC_Init(ADC_SINGLE_CONVERSION | ADC_PRESCALE_32); + ADC_SetupChannel(12); + vbat = 2 * 3.3 * ADC_GetChannelReading(ADC_REFERENCE_AVCC | ADC_CHANNEL12); + + last_battery_update = timer_read(); + } + return vbat; +} */ + +static void matrix_update(struct CharacterMatrix *dest, + const struct CharacterMatrix *source) { + if (memcmp(dest->display, source->display, sizeof(dest->display))) { + memcpy(dest->display, source->display, sizeof(dest->display)); + dest->dirty = true; + } +} + +static void render_status_info(void) { +#if DEBUG_TO_SCREEN + if (debug_enable) { + return; + } +#endif + + struct CharacterMatrix matrix; + + matrix_clear(&matrix); + matrix_write_P(&matrix, PSTR("USB: ")); +#ifdef PROTOCOL_LUFA + switch (USB_DeviceState) { + case DEVICE_STATE_Unattached: + matrix_write_P(&matrix, PSTR("Unattached")); + break; + case DEVICE_STATE_Suspended: + matrix_write_P(&matrix, PSTR("Suspended")); + break; + case DEVICE_STATE_Configured: + matrix_write_P(&matrix, PSTR("Connected")); + break; + case DEVICE_STATE_Powered: + matrix_write_P(&matrix, PSTR("Powered")); + break; + case DEVICE_STATE_Default: + matrix_write_P(&matrix, PSTR("Default")); + break; + case DEVICE_STATE_Addressed: + matrix_write_P(&matrix, PSTR("Addressed")); + break; + default: + matrix_write_P(&matrix, PSTR("Invalid")); + } +#endif + + // matrix_write_P(&matrix, (host_keyboard_leds() & (1< ScreenOffInterval) { + iota_gfx_off(); + } +} -- cgit v1.2.3 From 30f450749201b9584bc863cb08724d8f61f0463a Mon Sep 17 00:00:00 2001 From: ishtob Date: Wed, 22 Mar 2017 15:11:03 -0400 Subject: OLED code cleanup --- keyboards/lets_split/ssd1306.c | 52 +++++------------------------------------- 1 file changed, 6 insertions(+), 46 deletions(-) diff --git a/keyboards/lets_split/ssd1306.c b/keyboards/lets_split/ssd1306.c index c25a355bf..a68165f83 100644 --- a/keyboards/lets_split/ssd1306.c +++ b/keyboards/lets_split/ssd1306.c @@ -209,14 +209,14 @@ bool iota_gfx_init(void) { send_cmd2(SetChargePump, 0x14 /* Enable */); send_cmd2(SetMemoryMode, 0 /* horizontal addressing */); -/* Flips the display orientation 0 degrees +/// Flips the display orientation 0 degrees send_cmd1(SegRemap | 0x1); send_cmd1(ComScanDec); -*/ -// the following Flip the display orientation 180 degrees */ +/* +// the following Flip the display orientation 180 degrees send_cmd1(SegRemap); send_cmd1(ComScanInc); -//end flip +*/end flip send_cmd2(SetComPins, 0x2); send_cmd2(SetContrast, 0x8f); send_cmd2(SetPreCharge, 0xf1); @@ -379,21 +379,6 @@ void iota_gfx_flush(void) { matrix_render(&display); } -//#include "LUFA/Drivers/Peripheral/ADC.h" - -/* Returns the battery voltage; returns the number of millivolts -static uint32_t read_battery_voltage(void) { - if (last_battery_update == 0 || - timer_elapsed(last_battery_update) > BatteryUpdateInterval) { - ADC_Init(ADC_SINGLE_CONVERSION | ADC_PRESCALE_32); - ADC_SetupChannel(12); - vbat = 2 * 3.3 * ADC_GetChannelReading(ADC_REFERENCE_AVCC | ADC_CHANNEL12); - - last_battery_update = timer_read(); - } - return vbat; -} */ - static void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) { if (memcmp(dest->display, source->display, sizeof(dest->display))) { @@ -438,18 +423,7 @@ static void render_status_info(void) { } #endif - // matrix_write_P(&matrix, (host_keyboard_leds() & (1< Date: Wed, 22 Mar 2017 15:14:33 -0400 Subject: Add files via upload --- keyboards/lets_split/keymaps/OLED_sample/readme.md | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 keyboards/lets_split/keymaps/OLED_sample/readme.md diff --git a/keyboards/lets_split/keymaps/OLED_sample/readme.md b/keyboards/lets_split/keymaps/OLED_sample/readme.md new file mode 100644 index 000000000..839fd4284 --- /dev/null +++ b/keyboards/lets_split/keymaps/OLED_sample/readme.md @@ -0,0 +1,32 @@ +SSD1306 OLED Display via I2C +====== + +Features +-------- + +Some features supported by the firmware: + + +* I2C connection between the two halves is required as the OLED display will use this connection as well. Note this + requires pull-up resistors on the data and clock lines. +* OLED display will connect from either side + + +Wiring +------ + +The wiring for i2c: + +![i2c wiring](imgs/split-keyboard-i2c-schematic.png) + +The pull-up resistors may be placed on either half. It is also possible +to use 4 resistors and have the pull-ups in both halves, but this is +unnecessary in simple use cases. + +Work in progress... + + +OLED Configuration +------------------------------- + +Work in progress... \ No newline at end of file -- cgit v1.2.3 From d1865db599a92695baa1434803a41204cd5e5ca6 Mon Sep 17 00:00:00 2001 From: ishtob Date: Wed, 22 Mar 2017 15:19:01 -0400 Subject: OLED code cleanup --- keyboards/lets_split/ssd1306.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/lets_split/ssd1306.c b/keyboards/lets_split/ssd1306.c index a68165f83..3c7816bb3 100644 --- a/keyboards/lets_split/ssd1306.c +++ b/keyboards/lets_split/ssd1306.c @@ -216,7 +216,7 @@ bool iota_gfx_init(void) { // the following Flip the display orientation 180 degrees send_cmd1(SegRemap); send_cmd1(ComScanInc); -*/end flip +// end flip */ send_cmd2(SetComPins, 0x2); send_cmd2(SetContrast, 0x8f); send_cmd2(SetPreCharge, 0xf1); -- cgit v1.2.3 From 1f7b8a034362f1461d89abee91038df885be4ca2 Mon Sep 17 00:00:00 2001 From: ishtob Date: Wed, 22 Mar 2017 15:45:15 -0400 Subject: Update matrix.c --- keyboards/lets_split/matrix.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/keyboards/lets_split/matrix.c b/keyboards/lets_split/matrix.c index b6e59cb7f..1b6501999 100644 --- a/keyboards/lets_split/matrix.c +++ b/keyboards/lets_split/matrix.c @@ -210,8 +210,7 @@ uint8_t matrix_scan(void) if( serial_transaction() ) { #endif // turn on the indicator led when halves are disconnected -// TXLED1; - TXLED0; + TXLED1; error_count++; -- cgit v1.2.3 From ebb46694e500e08ea1d39349d957182270e835f6 Mon Sep 17 00:00:00 2001 From: ishtob Date: Wed, 22 Mar 2017 15:45:45 -0400 Subject: Update split_util.c --- keyboards/lets_split/split_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/lets_split/split_util.c b/keyboards/lets_split/split_util.c index b87bae38b..46586fbc0 100644 --- a/keyboards/lets_split/split_util.c +++ b/keyboards/lets_split/split_util.c @@ -22,7 +22,7 @@ static void setup_handedness(void) { isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS); #else // I2c_MASTER_RIGHT ish deprecate use MASTER_RIGHT instead since this works for both serial and i2c: - #if defined (I2C_MASTER_RIGHT) || defined (MASTER_RIGHT) + #if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT) isLeftHand = !has_usb(); #else isLeftHand = has_usb(); -- cgit v1.2.3 From 732a7f2be9b197ed22d20bea3d4dcd8013c8e077 Mon Sep 17 00:00:00 2001 From: ishtob Date: Wed, 22 Mar 2017 15:47:53 -0400 Subject: Update matrix.c --- keyboards/lets_split/matrix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/lets_split/matrix.c b/keyboards/lets_split/matrix.c index 1b6501999..81dfb1445 100644 --- a/keyboards/lets_split/matrix.c +++ b/keyboards/lets_split/matrix.c @@ -211,7 +211,7 @@ uint8_t matrix_scan(void) #endif // turn on the indicator led when halves are disconnected TXLED1; - + error_count++; if (error_count > ERROR_DISCONNECT_COUNT) { -- cgit v1.2.3 From be0cfbb97e5577e331e327b4e729b1b4c4ccb54c Mon Sep 17 00:00:00 2001 From: ishtob Date: Wed, 22 Mar 2017 15:48:56 -0400 Subject: Update i2c.c --- keyboards/lets_split/i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/lets_split/i2c.c b/keyboards/lets_split/i2c.c index 038f37a4b..f1a349168 100644 --- a/keyboards/lets_split/i2c.c +++ b/keyboards/lets_split/i2c.c @@ -48,7 +48,7 @@ void i2c_master_init(void) { // returns: 0 => success // 1 => error uint8_t i2c_master_start(uint8_t address) { - TWCR = (1< Date: Wed, 22 Mar 2017 15:49:21 -0400 Subject: Update i2c.c --- keyboards/lets_split/i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/lets_split/i2c.c b/keyboards/lets_split/i2c.c index f1a349168..755038f5e 100644 --- a/keyboards/lets_split/i2c.c +++ b/keyboards/lets_split/i2c.c @@ -48,7 +48,7 @@ void i2c_master_init(void) { // returns: 0 => success // 1 => error uint8_t i2c_master_start(uint8_t address) { - TWCR = (1< Date: Wed, 22 Mar 2017 15:50:18 -0400 Subject: Update i2c.c --- keyboards/lets_split/i2c.c | 90 ---------------------------------------------- 1 file changed, 90 deletions(-) diff --git a/keyboards/lets_split/i2c.c b/keyboards/lets_split/i2c.c index 755038f5e..fbf2f3b76 100644 --- a/keyboards/lets_split/i2c.c +++ b/keyboards/lets_split/i2c.c @@ -161,94 +161,4 @@ ISR(TWI_vect) { TWCR |= (1< Date: Wed, 22 Mar 2017 15:50:52 -0400 Subject: Update i2c.c --- keyboards/lets_split/i2c.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/keyboards/lets_split/i2c.c b/keyboards/lets_split/i2c.c index fbf2f3b76..084c890c4 100644 --- a/keyboards/lets_split/i2c.c +++ b/keyboards/lets_split/i2c.c @@ -56,7 +56,6 @@ uint8_t i2c_master_start(uint8_t address) { if ( (TW_STATUS != TW_START) && (TW_STATUS != TW_REP_START)) return 1; - // send device address TWDR = address; TWCR = (1< Date: Wed, 22 Mar 2017 15:56:45 -0400 Subject: Update readme.md --- keyboards/lets_split/keymaps/OLED_sample/readme.md | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/keyboards/lets_split/keymaps/OLED_sample/readme.md b/keyboards/lets_split/keymaps/OLED_sample/readme.md index 839fd4284..02888855b 100644 --- a/keyboards/lets_split/keymaps/OLED_sample/readme.md +++ b/keyboards/lets_split/keymaps/OLED_sample/readme.md @@ -15,13 +15,6 @@ Some features supported by the firmware: Wiring ------ -The wiring for i2c: - -![i2c wiring](imgs/split-keyboard-i2c-schematic.png) - -The pull-up resistors may be placed on either half. It is also possible -to use 4 resistors and have the pull-ups in both halves, but this is -unnecessary in simple use cases. Work in progress... @@ -29,4 +22,4 @@ Work in progress... OLED Configuration ------------------------------- -Work in progress... \ No newline at end of file +Work in progress... -- cgit v1.2.3 From 91776772fd5600116e9d02c614813c427a3d4219 Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Wed, 15 Mar 2017 16:34:10 -0400 Subject: Remove line for hands selection via EEPROM, reduce tap duration from 200ms to 150ms --- keyboards/lets_split/keymaps/hexwire/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/lets_split/keymaps/hexwire/config.h b/keyboards/lets_split/keymaps/hexwire/config.h index 983f8e352..11adbc454 100644 --- a/keyboards/lets_split/keymaps/hexwire/config.h +++ b/keyboards/lets_split/keymaps/hexwire/config.h @@ -18,7 +18,7 @@ along with this program. If not, see . #define USE_SERIAL -#define EE_HANDS +#define TAPPING_TERM 150 #undef RGBLED_NUM #define RGB_DI_PIN B0 -- cgit v1.2.3 From f3e3ff29a346bf917403672f8dbdf08c9f3a83f6 Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Wed, 15 Mar 2017 16:34:57 -0400 Subject: Add Makefile in keymap dir --- keyboards/lets_split/keymaps/hexwire/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/keyboards/lets_split/keymaps/hexwire/Makefile b/keyboards/lets_split/keymaps/hexwire/Makefile index 1e3cebb14..1e5761278 100644 --- a/keyboards/lets_split/keymaps/hexwire/Makefile +++ b/keyboards/lets_split/keymaps/hexwire/Makefile @@ -1 +1,5 @@ RGBLIGHT_ENABLE = yes + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif -- cgit v1.2.3 From e5c5902e95840876f1e51c3e8e0a93311676fa27 Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Thu, 23 Mar 2017 08:46:10 -0400 Subject: Move keymap into config file --- .../lets_split/keymaps/hexwire/compact_keymap.h | 23 ---------------- keyboards/lets_split/keymaps/hexwire/config.h | 32 ++++++++++++++++++++++ keyboards/lets_split/keymaps/hexwire/keymap.c | 2 +- 3 files changed, 33 insertions(+), 24 deletions(-) delete mode 100644 keyboards/lets_split/keymaps/hexwire/compact_keymap.h diff --git a/keyboards/lets_split/keymaps/hexwire/compact_keymap.h b/keyboards/lets_split/keymaps/hexwire/compact_keymap.h deleted file mode 100644 index d9d063fbf..000000000 --- a/keyboards/lets_split/keymaps/hexwire/compact_keymap.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef COMPACT_KEYMAP_H -#define COMPACT_KEYMAP_H - -#define COMPACT_KEYMAP( \ - k00, k01, k02, k03, k04, k05, k45, k44, k43, k42, k41, k40, \ - k10, k11, k12, k13, k14, k15, k55, k54, k53, k52, k51, k50, \ - k20, k21, k22, k23, k24, k25, k65, k64, k63, k62, k61, k60, \ - k30, k31, k32, k33, k34, k35, k75, k74, k73, k72, k71, k70 \ - ) \ - { \ - { KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05 }, \ - { KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15 }, \ - { KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25 }, \ - { KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35 }, \ - { KC_##k40, KC_##k41, KC_##k42, KC_##k43, KC_##k44, KC_##k45 }, \ - { KC_##k50, KC_##k51, KC_##k52, KC_##k53, KC_##k54, KC_##k55 }, \ - { KC_##k60, KC_##k61, KC_##k62, KC_##k63, KC_##k64, KC_##k65 }, \ - { KC_##k70, KC_##k71, KC_##k72, KC_##k73, KC_##k74, KC_##k75 } \ - } - -#define KC_ KC_TRNS - -#endif \ No newline at end of file diff --git a/keyboards/lets_split/keymaps/hexwire/config.h b/keyboards/lets_split/keymaps/hexwire/config.h index 11adbc454..38b57266a 100644 --- a/keyboards/lets_split/keymaps/hexwire/config.h +++ b/keyboards/lets_split/keymaps/hexwire/config.h @@ -30,9 +30,41 @@ along with this program. If not, see . #ifdef SUBPROJECT_rev1 #include "../../rev1/config.h" + #define COMPACT_KEYMAP( \ + k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \ + k10, k11, k12, k13, k14, k15, k50, k51, k52, k53, k54, k55, \ + k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \ + k30, k31, k32, k33, k34, k35, k70, k71, k72, k73, k74, k75 \ + ) \ + { \ + { KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05 }, \ + { KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15 }, \ + { KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25 }, \ + { KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35 }, \ + { KC_##k40, KC_##k41, KC_##k42, KC_##k43, KC_##k44, KC_##k45 }, \ + { KC_##k50, KC_##k51, KC_##k52, KC_##k53, KC_##k54, KC_##k55 }, \ + { KC_##k60, KC_##k61, KC_##k62, KC_##k63, KC_##k64, KC_##k65 }, \ + { KC_##k70, KC_##k71, KC_##k72, KC_##k73, KC_##k74, KC_##k75 } \ + } #endif #ifdef SUBPROJECT_rev2 #include "../../rev2/config.h" + #define COMPACT_KEYMAP( \ + k00, k01, k02, k03, k04, k05, k45, k44, k43, k42, k41, k40, \ + k10, k11, k12, k13, k14, k15, k55, k54, k53, k52, k51, k50, \ + k20, k21, k22, k23, k24, k25, k65, k64, k63, k62, k61, k60, \ + k30, k31, k32, k33, k34, k35, k75, k74, k73, k72, k71, k70 \ + ) \ + { \ + { KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05 }, \ + { KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15 }, \ + { KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25 }, \ + { KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35 }, \ + { KC_##k40, KC_##k41, KC_##k42, KC_##k43, KC_##k44, KC_##k45 }, \ + { KC_##k50, KC_##k51, KC_##k52, KC_##k53, KC_##k54, KC_##k55 }, \ + { KC_##k60, KC_##k61, KC_##k62, KC_##k63, KC_##k64, KC_##k65 }, \ + { KC_##k70, KC_##k71, KC_##k72, KC_##k73, KC_##k74, KC_##k75 } \ + } #endif #ifdef SUBPROJECT_rev2fliphalf #include "../../rev2fliphalf/config.h" diff --git a/keyboards/lets_split/keymaps/hexwire/keymap.c b/keyboards/lets_split/keymaps/hexwire/keymap.c index 796a1fcab..f8370490d 100644 --- a/keyboards/lets_split/keymaps/hexwire/keymap.c +++ b/keyboards/lets_split/keymaps/hexwire/keymap.c @@ -1,7 +1,6 @@ #include "lets_split.h" #include "action_layer.h" #include "eeconfig.h" -#include "compact_keymap.h" extern keymap_config_t keymap_config; @@ -25,6 +24,7 @@ enum custom_keycodes { ADJUST, }; +#define KC_ KC_TRNS #define _______ KC_TRNS #define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen -- cgit v1.2.3 From edfb50ea5616c9361e479ec41d1d2c3d72f2f51c Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Thu, 23 Mar 2017 09:42:32 -0400 Subject: Initial commit for Atreus50 with working audio --- keyboards/atreus50/Makefile | 3 + keyboards/atreus50/atreus50.c | 10 + keyboards/atreus50/atreus50.h | 36 ++++ keyboards/atreus50/config.h | 163 ++++++++++++++++ keyboards/atreus50/keymaps/default/Makefile | 6 + keyboards/atreus50/keymaps/default/keymap.c | 270 +++++++++++++++++++++++++++ keyboards/atreus50/keymaps/default/readme.md | 1 + keyboards/atreus50/readme.md | 25 +++ keyboards/atreus50/rules.mk | 81 ++++++++ 9 files changed, 595 insertions(+) create mode 100644 keyboards/atreus50/Makefile create mode 100644 keyboards/atreus50/atreus50.c create mode 100644 keyboards/atreus50/atreus50.h create mode 100644 keyboards/atreus50/config.h create mode 100644 keyboards/atreus50/keymaps/default/Makefile create mode 100644 keyboards/atreus50/keymaps/default/keymap.c create mode 100644 keyboards/atreus50/keymaps/default/readme.md create mode 100644 keyboards/atreus50/readme.md create mode 100644 keyboards/atreus50/rules.mk diff --git a/keyboards/atreus50/Makefile b/keyboards/atreus50/Makefile new file mode 100644 index 000000000..57b2ef62e --- /dev/null +++ b/keyboards/atreus50/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif diff --git a/keyboards/atreus50/atreus50.c b/keyboards/atreus50/atreus50.c new file mode 100644 index 000000000..0ec63216f --- /dev/null +++ b/keyboards/atreus50/atreus50.c @@ -0,0 +1,10 @@ +#include "atreus50.h" + +void matrix_init_kb(void) { + + // Turn status LED on + //DDRE |= (1<<6); + PORTE |= (1<<6); + + matrix_init_user(); +}; \ No newline at end of file diff --git a/keyboards/atreus50/atreus50.h b/keyboards/atreus50/atreus50.h new file mode 100644 index 000000000..de06f255e --- /dev/null +++ b/keyboards/atreus50/atreus50.h @@ -0,0 +1,36 @@ +#ifndef ATREUS50_H +#define ATREUS50_H + +#include "quantum.h" + +// The first section contains all of the arguements +// The second converts the arguments into a two-dimensional array +#define KEYMAP( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, km0, km1, k36, k37, k38, k39, k3a, k3b \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, KC_NO, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, KC_NO, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, km0, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, km1, k36, k37, k38, k39, k3a, k3b } \ +} + +#define COMPACT_KEYMAP( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, km0, km1, k36, k37, k38, k39, k3a, k3b \ +) \ +{ \ + { KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_NO, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b }, \ + { KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_NO, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b }, \ + { KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##km0, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b }, \ + { KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##km1, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b } \ +} + +#define KC_ KC_TRNS + +#endif diff --git a/keyboards/atreus50/config.h b/keyboards/atreus50/config.h new file mode 100644 index 000000000..dedcc8cae --- /dev/null +++ b/keyboards/atreus50/config.h @@ -0,0 +1,163 @@ +/* +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 0xBB80 +#define PRODUCT_ID 0x040D +#define DEVICE_VER 0x0001 +#define MANUFACTURER Hexwire +#define PRODUCT Atreus 50 Keyboard +#define DESCRIPTION Atreus layout with extra column + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 13 + +/* Planck PCB default pin-out */ +#define MATRIX_ROW_PINS { D3, D2, D1, D0 } +#define MATRIX_COL_PINS { D4, D7, E6, B4, B5, B6, B2, B3, B1, F7, F6, F5, F4 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + + +/* ws2812 RGB LED */ +#define RGB_DI_PIN C6 +#define RGBLIGHT_TIMER +#define RGBLED_NUM 12 // Number of LEDs +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/atreus50/keymaps/default/Makefile b/keyboards/atreus50/keymaps/default/Makefile new file mode 100644 index 000000000..e8556d0d6 --- /dev/null +++ b/keyboards/atreus50/keymaps/default/Makefile @@ -0,0 +1,6 @@ +RGBLIGHT_ENABLE = no +AUDIO_ENABLE = yes + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/atreus50/keymaps/default/keymap.c b/keyboards/atreus50/keymaps/default/keymap.c new file mode 100644 index 000000000..0a77613c5 --- /dev/null +++ b/keyboards/atreus50/keymaps/default/keymap.c @@ -0,0 +1,270 @@ +#include "atreus50.h" +#include "action_layer.h" +#include "eeconfig.h" +#ifdef AUDIO_ENABLE + #include "audio.h" +#endif + +// 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 _MOVEMENT 5 +#define _ADJUST 16 + +enum preonic_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + MOVEMENT, + BACKLIT +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | - | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | Ctrl | Alt | GUI |Lower |Space | Bksp |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = KEYMAP( \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, \ + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \ + KC_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, MO(_MOVEMENT), KC_RSFT, KC_BSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Colemak + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | - | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = KEYMAP( \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_MINS, \ + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \ + KC_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, MO(_MOVEMENT), KC_RSFT, KC_BSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Dvorak + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | " | , | . | P | Y | F | G | C | R | L | - | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = KEYMAP( \ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_MINS, \ + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT, \ + KC_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, MO(_MOVEMENT), KC_RSFT, KC_BSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Lower + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = KEYMAP( \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Raise + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | 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_DEL, \ + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, 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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +[_MOVEMENT] = KEYMAP( \ + KC_TILD, KC_EXLM, KC_MUTE, KC_VOLD, KC_VOLU, KC_PERC, KC_CIRC, KC_AMPR, KC_UP, KC_LPRN, KC_RPRN, KC_DEL, \ + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_LEFT, KC_DOWN, KC_RIGHT, KC_RCBR, KC_PIPE, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_PGDOWN, KC_PGUP, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Adjust (Lower + Raise) + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Audoff|Aud on|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Musoff|Mus on| | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = KEYMAP( \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + +}; + +#ifdef AUDIO_ENABLE +float tone_startup[][2] = { + {NOTE_B5, 20}, + {NOTE_B6, 8}, + {NOTE_DS6, 20}, + {NOTE_B6, 8} +}; + +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); + +float tone_goodbye[][2] = SONG(GOODBYE_SOUND); + +float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); +#endif + +void persistant_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 + persistant_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_colemak, false, 0); + #endif + persistant_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + #endif + persistant_default_layer_set(1UL<<_DVORAK); + } + 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 BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + return false; + break; + } + return true; +}; + +void matrix_init_user(void) { + #ifdef AUDIO_ENABLE + startup_user(); + #endif +} + +#ifdef AUDIO_ENABLE + +void startup_user() +{ + _delay_ms(20); // gets rid of tick + PLAY_NOTE_ARRAY(tone_startup, false, 0); +} + +void shutdown_user() +{ + PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + _delay_ms(150); + stop_all_notes(); +} + +void music_on_user(void) +{ + music_scale_user(); +} + +void music_scale_user(void) +{ + PLAY_NOTE_ARRAY(music_scale, false, 0); +} + +#endif \ No newline at end of file diff --git a/keyboards/atreus50/keymaps/default/readme.md b/keyboards/atreus50/keymaps/default/readme.md new file mode 100644 index 000000000..e911968dd --- /dev/null +++ b/keyboards/atreus50/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default Preonic layout - largely based on the Planck's \ No newline at end of file diff --git a/keyboards/atreus50/readme.md b/keyboards/atreus50/readme.md new file mode 100644 index 000000000..f0be255a0 --- /dev/null +++ b/keyboards/atreus50/readme.md @@ -0,0 +1,25 @@ +Preonic keyboard firmware +====================== +DIY/Assembled compact ortholinear 50% keyboard by [Ortholinear Keyboards](http://ortholinearkeyboards.com). + +## Quantum MK Firmware + +For the full Quantum feature list, see [the parent readme.md](/readme.md). + +## Building + +Download or clone the whole firmware and navigate to the keyboards/preonic folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use `make dfu` to program your PCB once you hit the reset button. + +Depending on which keymap you would like to use, you will have to compile slightly differently. + +### Default +To build with the default keymap, simply run `make`. + +### Other Keymaps +Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap, create a file in the keymaps folder named `.c` and see keymap document (you can find in top readme.md) and existent keymap files. + +To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like: +``` +$ make KEYMAP=[default|jack|] +``` +Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. diff --git a/keyboards/atreus50/rules.mk b/keyboards/atreus50/rules.mk new file mode 100644 index 000000000..7770ea2a2 --- /dev/null +++ b/keyboards/atreus50/rules.mk @@ -0,0 +1,81 @@ + + +# 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 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 ?= no # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +NKRO_ENABLE ?= no # 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. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend + +avrdude: build + ls /dev/tty* > /tmp/1; \ + echo "Reset your Pro Micro now"; \ + while [[ -z $$USB ]]; do \ + sleep 1; \ + ls /dev/tty* > /tmp/2; \ + USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \ + done; \ + avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex + +.PHONY: avrdude -- cgit v1.2.3 From 0520341ce48e45ddb53a8b26f8710417af6279e6 Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Thu, 23 Mar 2017 11:25:21 -0400 Subject: Cleanup keymap --- keyboards/atreus50/atreus50.c | 2 +- keyboards/atreus50/keymaps/default/keymap.c | 206 ++++++++++++--------------- keyboards/atreus50/keymaps/default/readme.md | 1 - 3 files changed, 94 insertions(+), 115 deletions(-) delete mode 100644 keyboards/atreus50/keymaps/default/readme.md diff --git a/keyboards/atreus50/atreus50.c b/keyboards/atreus50/atreus50.c index 0ec63216f..225a51bcc 100644 --- a/keyboards/atreus50/atreus50.c +++ b/keyboards/atreus50/atreus50.c @@ -7,4 +7,4 @@ void matrix_init_kb(void) { PORTE |= (1<<6); matrix_init_user(); -}; \ No newline at end of file +}; diff --git a/keyboards/atreus50/keymaps/default/keymap.c b/keyboards/atreus50/keymaps/default/keymap.c index 0a77613c5..8ae096cd8 100644 --- a/keyboards/atreus50/keymaps/default/keymap.c +++ b/keyboards/atreus50/keymaps/default/keymap.c @@ -17,7 +17,7 @@ #define _MOVEMENT 5 #define _ADJUST 16 -enum preonic_keycodes { +enum custom_keycodes { QWERTY = SAFE_RANGE, COLEMAK, DVORAK, @@ -30,123 +30,103 @@ enum preonic_keycodes { // Fillers to make layering more clear #define _______ KC_TRNS #define XXXXXXX KC_NO +#define KC_X0 MT(MOD_LCTL, KC_ESC) // Hold for Left Ctrl, Tap for ESC +#define KC_X1 LOWER +#define KC_X2 RAISE +#define KC_X3 MO(_MOVEMENT) +#define KC_X4 MT(MOD_LSFT, KC_ENT) // Hold for Left Shift, Tap for Enter const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Qwerty - * ,-----------------------------------------------------------------------------------. - * | Tab | Q | W | E | R | T | Y | U | I | O | P | - | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | S | D | F | G | H | J | K | L | ; | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | ` | Ctrl | Alt | GUI |Lower |Space | Bksp |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_QWERTY] = KEYMAP( \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, \ - KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \ - KC_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, MO(_MOVEMENT), KC_RSFT, KC_BSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ -), - -/* Colemak - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Tab | Q | W | F | P | G | J | L | U | Y | ; | - | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | R | S | T | D | H | N | E | I | O | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_COLEMAK] = KEYMAP( \ - KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_MINS, \ - KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \ - KC_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, MO(_MOVEMENT), KC_RSFT, KC_BSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ -), - -/* Dvorak - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Tab | " | , | . | P | Y | F | G | C | R | L | - | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | O | E | U | I | D | H | T | N | S | / | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_DVORAK] = KEYMAP( \ - KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_MINS, \ - KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ - KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT, \ - KC_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, MO(_MOVEMENT), KC_RSFT, KC_BSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ -), - -/* Lower - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------------------------------------------------' - */ -[_LOWER] = KEYMAP( \ - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ - KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ -), - -/* Raise - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | 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_DEL, \ - KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, 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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ -), - -[_MOVEMENT] = KEYMAP( \ - KC_TILD, KC_EXLM, KC_MUTE, KC_VOLD, KC_VOLU, KC_PERC, KC_CIRC, KC_AMPR, KC_UP, KC_LPRN, KC_RPRN, KC_DEL, \ - KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_LEFT, KC_DOWN, KC_RIGHT, KC_RCBR, KC_PIPE, \ - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_PGDOWN, KC_PGUP, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ -), + [_QWERTY] = COMPACT_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + TAB , Q , W , E , R , T , Y , U , I , O , P ,MINS, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + X0 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, X4 , + //|----+----+----+----+----+----|----+----|----+----+----+----+----+----| + GRV ,LCTL,LALT,LGUI, X1 ,SPC , X3 ,RSFT,BSPC, X2 ,LEFT,DOWN, UP ,RGHT + //`----+----+----+----+----+----+----+----+----+----+----+----+----+----' + ), + + [_COLEMAK] = COMPACT_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + TAB , Q , W , F , P , G , J , L , U , Y ,SCLN,MINS, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + X0 , A , R , S , T , D , H , N , E , I , O ,QUOT, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + LSFT, Z , X , C , V , B , K , M ,COMM,DOT ,SLSH, X4 , + //|----+----+----+----+----+----|----+----|----+----+----+----+----+----| + GRV ,LCTL,LALT,LGUI, X1 ,SPC , X3 ,RSFT,BSPC, X2 ,LEFT,DOWN, UP ,RGHT + //`----+----+----+----+----+----+----+----+----+----+----+----+----+----' + ), + + [_DVORAK] = COMPACT_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,MINS, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + X0 , A , O , E , U , I , D , H , R , N , S ,SLSH, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + LSFT,SCLN, Q , J , K , X , B , M , W , V , Z , X4 , + //|----+----+----+----+----+----|----+----|----+----+----+----+----+----| + GRV ,LCTL,LALT,LGUI, X1 ,SPC , X3 ,RSFT,BSPC, X2 ,LEFT,DOWN, UP ,RGHT + //`----+----+----+----+----+----+----+----+----+----+----+----+----+----' + ), + + [_LOWER] = COMPACT_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,DEL , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + DEL , F1 , F2 , F3 , F4 , F5 , F6 ,UNDS,PLUS,LCBR,RCBR,PIPE, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , F7 , F8 , F9 ,F10 ,F11 , F12 ,END , , , , , + //|----+----+----+----+----+----|----+----|----+----+----+----+----+----| + , , , , , , , , , ,MNXT,VOLD,VOLU,MPLY + //`----+----+----+----+----+----+----+----+----+----+----+----+----+----' + ), + + [_RAISE] = COMPACT_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,DEL , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + DEL , F1 , F2 , F3 , F4 , F5 , F6 ,MINS,EQL ,LBRC,RBRC,BSLS, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , F7 , F8 , F9 ,F10 ,F11 , F12 ,NUHS,NUBS, , , , + //|----+----+----+----+----+----|----+----|----+----+----+----+----+----| + , , , , , , , , , ,MNXT,VOLD,VOLU,MPLY + //`----+----+----+----+----+----+----+----+----+----+----+----+----+----' + ), + + [_MOVEMENT] = COMPACT_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR, UP ,LPRN,RPRN,DEL , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + DEL , F1 , F2 , F3 , F4 , F5 , F6 ,LEFT,DOWN,RGHT,RCBR,PIPE, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , F7 , F8 , F9 ,F10 ,F11 , F12 ,END , , , , , + //|----+----+----+----+----+----|----+----|----+----+----+----+----+----| + , , , , , , , ,PGDN,PGUP,MNXT,VOLD,VOLU,MPLY + //`----+----+----+----+----+----+----+----+----+----+----+----+----+----' + ), /* Adjust (Lower + Raise) - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | Reset| | | | | | | | | | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | |Audoff|Aud on|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | |Voice-|Voice+|Musoff|Mus on| | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' + * |------+------+------+------+------+------. ,------+------+------+------+------+------| + * | | Reset| | | | | | | | | | | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | |Audoff|Aud on|AGnorm| |AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | |Voice-|Voice+|Musoff|Mus on| | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | + * `-------------------------------------------------------------------------------------------------' */ -[_ADJUST] = KEYMAP( \ - _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ - _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ - _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ -) + [_ADJUST] = KEYMAP( \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ) }; @@ -267,4 +247,4 @@ void music_scale_user(void) PLAY_NOTE_ARRAY(music_scale, false, 0); } -#endif \ No newline at end of file +#endif diff --git a/keyboards/atreus50/keymaps/default/readme.md b/keyboards/atreus50/keymaps/default/readme.md deleted file mode 100644 index e911968dd..000000000 --- a/keyboards/atreus50/keymaps/default/readme.md +++ /dev/null @@ -1 +0,0 @@ -# The default Preonic layout - largely based on the Planck's \ No newline at end of file -- cgit v1.2.3 From 63e47a642536ca7af22ef353cf7d19677f48b013 Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Thu, 23 Mar 2017 12:23:20 -0400 Subject: =?UTF-8?q?Add=20RGB=20support=20for=20Let=E2=80=99s=20Split=20v1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- keyboards/lets_split/keymaps/hexwire/config.h | 1 - keyboards/lets_split/rev1/config.h | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/keyboards/lets_split/keymaps/hexwire/config.h b/keyboards/lets_split/keymaps/hexwire/config.h index 38b57266a..9c8c6d7f4 100644 --- a/keyboards/lets_split/keymaps/hexwire/config.h +++ b/keyboards/lets_split/keymaps/hexwire/config.h @@ -21,7 +21,6 @@ along with this program. If not, see . #define TAPPING_TERM 150 #undef RGBLED_NUM -#define RGB_DI_PIN B0 #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 8 #define RGBLIGHT_HUE_STEP 8 diff --git a/keyboards/lets_split/rev1/config.h b/keyboards/lets_split/rev1/config.h index 2f5bde953..5fb87cf5d 100644 --- a/keyboards/lets_split/rev1/config.h +++ b/keyboards/lets_split/rev1/config.h @@ -63,6 +63,13 @@ along with this program. If not, see . keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ ) +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 +#define RGBLIGHT_TIMER +#define RGBLED_NUM 16 // Number of LEDs +#define ws2812_PORTREG PORTD +#define ws2812_DDRREG DDRD + /* * Feature disable options * These options are also useful to firmware size reduction. -- cgit v1.2.3 From 8775a13658146b7ffc90ac20579c1996bd51e909 Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Thu, 23 Mar 2017 14:46:58 -0400 Subject: Add RGB support --- keyboards/atreus50/config.h | 2 +- keyboards/atreus50/keymaps/default/Makefile | 4 ++-- keyboards/atreus50/keymaps/default/keymap.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/atreus50/config.h b/keyboards/atreus50/config.h index dedcc8cae..2e34e0f89 100644 --- a/keyboards/atreus50/config.h +++ b/keyboards/atreus50/config.h @@ -61,7 +61,7 @@ along with this program. If not, see . /* ws2812 RGB LED */ #define RGB_DI_PIN C6 -#define RGBLIGHT_TIMER +#define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 12 // Number of LEDs #define RGBLIGHT_HUE_STEP 10 #define RGBLIGHT_SAT_STEP 17 diff --git a/keyboards/atreus50/keymaps/default/Makefile b/keyboards/atreus50/keymaps/default/Makefile index e8556d0d6..d7b0fa7fd 100644 --- a/keyboards/atreus50/keymaps/default/Makefile +++ b/keyboards/atreus50/keymaps/default/Makefile @@ -1,5 +1,5 @@ -RGBLIGHT_ENABLE = no -AUDIO_ENABLE = yes +RGBLIGHT_ENABLE = yes +AUDIO_ENABLE = no ifndef QUANTUM_DIR include ../../../../Makefile diff --git a/keyboards/atreus50/keymaps/default/keymap.c b/keyboards/atreus50/keymaps/default/keymap.c index 8ae096cd8..415405ec2 100644 --- a/keyboards/atreus50/keymaps/default/keymap.c +++ b/keyboards/atreus50/keymaps/default/keymap.c @@ -122,7 +122,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-------------------------------------------------------------------------------------------------' */ [_ADJUST] = KEYMAP( \ - _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, RESET, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, KC_DEL, \ _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ -- cgit v1.2.3 From ddc036b69ea508750f5129d9a43fee484148716a Mon Sep 17 00:00:00 2001 From: Travis La Marr Date: Fri, 24 Mar 2017 12:53:55 -0400 Subject: Refactor Bluetooth Handling Refactored Bluetooth support to make adding new Bluetooth modules easier in the future. * Remove `OUT_BLE` key from QMK's keymap. `OUT_BT` is all we need now as there's no difference anymore. * Made BLUETOOTH_ENABLE build option legacy as not to break existing keymaps (Falls back to existing EZ Key support if on) * Removed `ADAFRUIT_BLE_ENABLE` build option * Created new build option `BLUETOOTH` with module option (Currently `AdafruitEZKey` & `AdafruitBLE`) * Moved all LUFA bluetooth key/mouse events under `BLUETOOTH_ENABLE` ifdef with selected modules output. --- quantum/quantum.c | 8 ---- quantum/quantum_keycodes.h | 3 -- tmk_core/common.mk | 12 ++++-- tmk_core/protocol/lufa.mk | 12 ++++-- tmk_core/protocol/lufa/adafruit_ble.h | 4 +- tmk_core/protocol/lufa/lufa.c | 77 ++++++++++++++++------------------- tmk_core/protocol/lufa/outputselect.c | 6 +-- tmk_core/protocol/lufa/outputselect.h | 1 - 8 files changed, 57 insertions(+), 66 deletions(-) diff --git a/quantum/quantum.c b/quantum/quantum.c index 582f8920b..807a7084a 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -294,14 +294,6 @@ bool process_record_quantum(keyrecord_t *record) { return false; break; #endif - #ifdef ADAFRUIT_BLE_ENABLE - case OUT_BLE: - if (record->event.pressed) { - set_output(OUTPUT_ADAFRUIT_BLE); - } - return false; - break; - #endif #endif case MAGIC_SWAP_CONTROL_CAPSLOCK ... MAGIC_TOGGLE_NKRO: if (record->event.pressed) { diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 903d57f1e..78b02a0de 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -159,9 +159,6 @@ enum quantum_keycodes { #ifdef BLUETOOTH_ENABLE OUT_BT, #endif -#ifdef ADAFRUIT_BLE_ENABLE - OUT_BLE, -#endif // always leave at the end SAFE_RANGE diff --git a/tmk_core/common.mk b/tmk_core/common.mk index a86dccc61..2b0fda5f2 100644 --- a/tmk_core/common.mk +++ b/tmk_core/common.mk @@ -93,14 +93,18 @@ ifeq ($(strip $(BACKLIGHT_ENABLE)), yes) TMK_COMMON_DEFS += -DBACKLIGHT_ENABLE endif -ifeq ($(strip $(ADAFRUIT_BLE_ENABLE)), yes) - TMK_COMMON_DEFS += -DADAFRUIT_BLE_ENABLE -endif - ifeq ($(strip $(BLUETOOTH_ENABLE)), yes) TMK_COMMON_DEFS += -DBLUETOOTH_ENABLE endif +ifeq ($(strip $(BLUETOOTH)), AdafruitBLE) + TMK_COMMON_DEFS += -DBLUETOOTH_ENABLE +endif + +ifeq ($(strip $(BLUETOOTH)), AdafruitEZKey) + TMK_COMMON_DEFS += -DBLUETOOTH_ENABLE +endif + ifeq ($(strip $(ONEHAND_ENABLE)), yes) TMK_COMMON_DEFS += -DONEHAND_ENABLE endif diff --git a/tmk_core/protocol/lufa.mk b/tmk_core/protocol/lufa.mk index de0cc795f..5b1577972 100644 --- a/tmk_core/protocol/lufa.mk +++ b/tmk_core/protocol/lufa.mk @@ -22,11 +22,16 @@ ifeq ($(strip $(MIDI_ENABLE)), yes) include $(TMK_PATH)/protocol/midi.mk endif -ifeq ($(strip $(ADAFRUIT_BLE_ENABLE)), yes) - LUFA_SRC += $(LUFA_DIR)/adafruit_ble.cpp +ifeq ($(strip $(BLUETOOTH_ENABLE)), yes) + LUFA_SRC += $(LUFA_DIR)/bluetooth.c \ + $(TMK_DIR)/protocol/serial_uart.c endif -ifeq ($(strip $(BLUETOOTH_ENABLE)), yes) +ifeq ($(strip $(BLUETOOTH)), AdafruitBLE) + LUFA_SRC += $(LUFA_DIR)/adafruit_ble.cpp +endif + +ifeq ($(strip $(BLUETOOTH)), AdafruitEZKey) LUFA_SRC += $(LUFA_DIR)/bluetooth.c \ $(TMK_DIR)/protocol/serial_uart.c endif @@ -54,6 +59,7 @@ LUFA_OPTS += -DUSE_FLASH_DESCRIPTORS LUFA_OPTS += -DUSE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)" #LUFA_OPTS += -DINTERRUPT_CONTROL_ENDPOINT LUFA_OPTS += -DFIXED_CONTROL_ENDPOINT_SIZE=8 +LUFA_OPTS += -DFIXED_CONTROL_ENDPOINT_SIZE=8 LUFA_OPTS += -DFIXED_NUM_CONFIGURATIONS=1 # Remote wakeup fix for ATmega32U2 https://github.com/tmk/tmk_keyboard/issues/361 diff --git a/tmk_core/protocol/lufa/adafruit_ble.h b/tmk_core/protocol/lufa/adafruit_ble.h index 351fd55ae..b3bab3ca0 100644 --- a/tmk_core/protocol/lufa/adafruit_ble.h +++ b/tmk_core/protocol/lufa/adafruit_ble.h @@ -3,7 +3,7 @@ * Supports the Adafruit BLE board built around the nRF51822 chip. */ #pragma once -#ifdef ADAFRUIT_BLE_ENABLE +#ifdef MODULE_ADAFRUIT_BLE #include #include #include @@ -57,4 +57,4 @@ extern bool adafruit_ble_set_power_level(int8_t level); } #endif -#endif // ADAFRUIT_BLE_ENABLE +#endif // MODULE_ADAFRUIT_BLE diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index ba49284c9..d71748ce3 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -67,10 +67,11 @@ #endif #ifdef BLUETOOTH_ENABLE - #include "bluetooth.h" -#endif -#ifdef ADAFRUIT_BLE_ENABLE + #ifdef MODULE_ADAFRUIT_BLE #include "adafruit_ble.h" + #else + #include "bluetooth.h" + #endif #endif #ifdef VIRTSER_ENABLE @@ -602,18 +603,14 @@ static void send_keyboard(report_keyboard_t *report) uint8_t where = where_to_send(); #ifdef BLUETOOTH_ENABLE - if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) { - bluefruit_serial_send(0xFD); - for (uint8_t i = 0; i < KEYBOARD_EPSIZE; i++) { - bluefruit_serial_send(report->raw[i]); - } - } -#endif - -#ifdef ADAFRUIT_BLE_ENABLE - if (where == OUTPUT_ADAFRUIT_BLE) { - adafruit_ble_send_keys(report->mods, report->keys, sizeof(report->keys)); + #ifdef MODULE_ADAFRUIT_BLE + adafruit_ble_send_keys(report->mods, report->keys, sizeof(report->keys)); + #else + bluefruit_serial_send(0xFD); + for (uint8_t i = 0; i < KEYBOARD_EPSIZE; i++) { + bluefruit_serial_send(report->raw[i]); } + #endif #endif if (where != OUTPUT_USB && where != OUTPUT_USB_AND_BT) { @@ -660,24 +657,22 @@ static void send_mouse(report_mouse_t *report) uint8_t where = where_to_send(); #ifdef BLUETOOTH_ENABLE - if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) { - bluefruit_serial_send(0xFD); - bluefruit_serial_send(0x00); - bluefruit_serial_send(0x03); - bluefruit_serial_send(report->buttons); - bluefruit_serial_send(report->x); - bluefruit_serial_send(report->y); - bluefruit_serial_send(report->v); // should try sending the wheel v here - bluefruit_serial_send(report->h); // should try sending the wheel h here - bluefruit_serial_send(0x00); - } -#endif - -#ifdef ADAFRUIT_BLE_ENABLE - if (where == OUTPUT_ADAFRUIT_BLE) { + if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) { + #ifdef MODULE_ADAFRUIT_BLE // FIXME: mouse buttons adafruit_ble_send_mouse_move(report->x, report->y, report->v, report->h); - } + #else + bluefruit_serial_send(0xFD); + bluefruit_serial_send(0x00); + bluefruit_serial_send(0x03); + bluefruit_serial_send(report->buttons); + bluefruit_serial_send(report->x); + bluefruit_serial_send(report->y); + bluefruit_serial_send(report->v); // should try sending the wheel v here + bluefruit_serial_send(report->h); // should try sending the wheel h here + bluefruit_serial_send(0x00); + #endif + } #endif if (where != OUTPUT_USB && where != OUTPUT_USB_AND_BT) { @@ -727,6 +722,9 @@ static void send_consumer(uint16_t data) #ifdef BLUETOOTH_ENABLE if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) { + #ifdef MODULE_ADAFRUIT_BLE + adafruit_ble_send_consumer_key(data, 0); + #else static uint16_t last_data = 0; if (data == last_data) return; last_data = data; @@ -740,12 +738,7 @@ static void send_consumer(uint16_t data) bluefruit_serial_send(0x00); bluefruit_serial_send(0x00); bluefruit_serial_send(0x00); - } -#endif - -#ifdef ADAFRUIT_BLE_ENABLE - if (where == OUTPUT_ADAFRUIT_BLE) { - adafruit_ble_send_consumer_key(data, 0); + #endif } #endif @@ -1130,10 +1123,6 @@ int main(void) // midi_send_noteoff(&midi_device, 0, 64, 127); #endif -#ifdef BLUETOOTH_ENABLE - serial_init(); -#endif - /* wait for USB startup & debug output */ #ifdef WAIT_FOR_USB @@ -1161,7 +1150,7 @@ int main(void) print("Keyboard start.\n"); while (1) { - #if !defined(BLUETOOTH_ENABLE) && !defined(ADAFRUIT_BLE_ENABLE) + #if !defined(BLUETOOTH_ENABLE) while (USB_DeviceState == DEVICE_STATE_Suspended) { print("[s]"); suspend_power_down(); @@ -1182,7 +1171,11 @@ int main(void) rgblight_task(); #endif -#ifdef ADAFRUIT_BLE_ENABLE +#ifdef MODULE_ADAFRUIT_EZKEY + serial_init(); +#endif + +#ifdef MODULE_ADAFRUIT_BLE adafruit_ble_task(); #endif diff --git a/tmk_core/protocol/lufa/outputselect.c b/tmk_core/protocol/lufa/outputselect.c index 5d2457bff..0df5d3b75 100644 --- a/tmk_core/protocol/lufa/outputselect.c +++ b/tmk_core/protocol/lufa/outputselect.c @@ -14,7 +14,7 @@ along with this program. If not, see . #include "lufa.h" #include "outputselect.h" -#ifdef ADAFRUIT_BLE_ENABLE +#ifdef MODULE_ADAFRUIT_BLE #include "adafruit_ble.h" #endif @@ -34,9 +34,9 @@ uint8_t auto_detect_output(void) { return OUTPUT_USB; } -#ifdef ADAFRUIT_BLE_ENABLE +#ifdef MODULE_ADAFRUIT_BLE if (adafruit_ble_is_connected()) { - return OUTPUT_ADAFRUIT_BLE; + return OUTPUT_BLUETOOTH; } #endif diff --git a/tmk_core/protocol/lufa/outputselect.h b/tmk_core/protocol/lufa/outputselect.h index 79b4dd35d..28cc3298e 100644 --- a/tmk_core/protocol/lufa/outputselect.h +++ b/tmk_core/protocol/lufa/outputselect.h @@ -18,7 +18,6 @@ enum outputs { OUTPUT_NONE, OUTPUT_USB, OUTPUT_BLUETOOTH, - OUTPUT_ADAFRUIT_BLE, // backward compatibility OUTPUT_USB_AND_BT -- cgit v1.2.3 From 25f2295ba88627521bed63ec4e5412b983626901 Mon Sep 17 00:00:00 2001 From: Hugh Enxing Date: Fri, 24 Mar 2017 14:31:02 -0400 Subject: Swapped placement of `Ctrl` and `Alt` keys to match Technomancy's default layout --- keyboards/atreus/keymaps/default/keymap.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/keyboards/atreus/keymaps/default/keymap.c b/keyboards/atreus/keymaps/default/keymap.c index 04ad66fed..ce92e89c9 100644 --- a/keyboards/atreus/keymaps/default/keymap.c +++ b/keyboards/atreus/keymaps/default/keymap.c @@ -15,8 +15,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QW] = { /* Qwerty */ {KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TRNS, KC_Y, KC_U, KC_I, KC_O, KC_P }, {KC_A, KC_S, KC_D, KC_F, KC_G, KC_TRNS, KC_H, KC_J, KC_K, KC_L, KC_SCLN }, - {KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LALT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH }, - {KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_SPC, MO(_RS), KC_MINS, KC_QUOT, KC_ENT } + {KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LCTL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH }, + {KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_LALT, KC_SPC, MO(_RS), KC_MINS, KC_QUOT, KC_ENT } }, /* * ! @ up { } || pgup 7 8 9 * @@ -27,8 +27,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_RS] = { /* [> RAISE <] */ {KC_EXLM, KC_AT, KC_UP, KC_LCBR, KC_RCBR, KC_TRNS, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR}, {KC_HASH, KC_LEFT, KC_DOWN, KC_RGHT, KC_DLR, KC_TRNS, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS}, - {KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_AMPR, KC_LALT, KC_GRV, KC_1, KC_2, KC_3, KC_BSLS}, - {TG(_LW), KC_INS, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_SPC, KC_TRNS, KC_DOT, KC_0, KC_EQL} + {KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_AMPR, KC_LCTL, KC_GRV, KC_1, KC_2, KC_3, KC_BSLS}, + {TG(_LW), KC_INS, KC_LGUI, KC_LSFT, KC_BSPC, KC_LALT, KC_SPC, KC_TRNS, KC_DOT, KC_0, KC_EQL} }, /* * insert home up end pgup || up F7 F8 F9 F10 @@ -39,8 +39,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LW] = { /* [> LOWER <] */ {KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_TRNS, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10}, {KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, KC_TRNS, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11}, - {KC_TRNS, KC_VOLU, KC_TRNS, KC_TRNS, RESET, KC_LALT, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F12}, - {KC_TRNS, KC_VOLD, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_SPC, DF(_QW), KC_PSCR, KC_SLCK, KC_PAUS} + {KC_TRNS, KC_VOLU, KC_TRNS, KC_TRNS, RESET, KC_LCTL, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F12}, + {KC_TRNS, KC_VOLD, KC_LGUI, KC_LSFT, KC_BSPC, KC_LALT, KC_SPC, DF(_QW), KC_PSCR, KC_SLCK, KC_PAUS} }}; const uint16_t PROGMEM fn_actions[] = { -- cgit v1.2.3 From b4ac0598fa5a69418d79f78c0cf323307d5f5f5e Mon Sep 17 00:00:00 2001 From: Travis La Marr Date: Fri, 24 Mar 2017 15:55:02 -0400 Subject: Readd bluetooth output direction on standard key input. --- tmk_core/protocol/lufa/lufa.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index d71748ce3..3d7a8cc43 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -603,14 +603,16 @@ static void send_keyboard(report_keyboard_t *report) uint8_t where = where_to_send(); #ifdef BLUETOOTH_ENABLE - #ifdef MODULE_ADAFRUIT_BLE - adafruit_ble_send_keys(report->mods, report->keys, sizeof(report->keys)); - #else - bluefruit_serial_send(0xFD); - for (uint8_t i = 0; i < KEYBOARD_EPSIZE; i++) { - bluefruit_serial_send(report->raw[i]); - } - #endif + if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) { + #ifdef MODULE_ADAFRUIT_BLE + adafruit_ble_send_keys(report->mods, report->keys, sizeof(report->keys)); + #else + bluefruit_serial_send(0xFD); + for (uint8_t i = 0; i < KEYBOARD_EPSIZE; i++) { + bluefruit_serial_send(report->raw[i]); + } + #endif + } #endif if (where != OUTPUT_USB && where != OUTPUT_USB_AND_BT) { -- cgit v1.2.3 From 43eee52cba8db46e9f305a56ca6623428e28cc2e Mon Sep 17 00:00:00 2001 From: Travis La Marr Date: Fri, 24 Mar 2017 17:14:57 -0400 Subject: Add BLE and EZKey module defines. Also restored serial init back to original location. Was getting junk data. --- tmk_core/common.mk | 2 ++ tmk_core/protocol/lufa/lufa.c | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tmk_core/common.mk b/tmk_core/common.mk index 2b0fda5f2..47f6fc571 100644 --- a/tmk_core/common.mk +++ b/tmk_core/common.mk @@ -99,10 +99,12 @@ endif ifeq ($(strip $(BLUETOOTH)), AdafruitBLE) TMK_COMMON_DEFS += -DBLUETOOTH_ENABLE + TMK_COMMON_DEFS += -DMODULE_ADAFRUIT_BLE endif ifeq ($(strip $(BLUETOOTH)), AdafruitEZKey) TMK_COMMON_DEFS += -DBLUETOOTH_ENABLE + TMK_COMMON_DEFS += -DMODULE_ADAFRUIT_EZKEY endif ifeq ($(strip $(ONEHAND_ENABLE)), yes) diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index 3d7a8cc43..4cb23ebc8 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -1125,6 +1125,10 @@ int main(void) // midi_send_noteoff(&midi_device, 0, 64, 127); #endif +#ifdef MODULE_ADAFRUIT_EZKEY + serial_init(); +#endif + /* wait for USB startup & debug output */ #ifdef WAIT_FOR_USB @@ -1173,10 +1177,6 @@ int main(void) rgblight_task(); #endif -#ifdef MODULE_ADAFRUIT_EZKEY - serial_init(); -#endif - #ifdef MODULE_ADAFRUIT_BLE adafruit_ble_task(); #endif -- cgit v1.2.3 From 739249ff0d707a9702771236fcf22538e3a7106b Mon Sep 17 00:00:00 2001 From: Nicolas Guelpa Date: Fri, 24 Mar 2017 20:18:59 -0400 Subject: Adding different layer --- keyboards/xd60/keymaps/cheese/keymap.c | 67 ++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 keyboards/xd60/keymaps/cheese/keymap.c diff --git a/keyboards/xd60/keymaps/cheese/keymap.c b/keyboards/xd60/keymaps/cheese/keymap.c new file mode 100644 index 000000000..738009304 --- /dev/null +++ b/keyboards/xd60/keymaps/cheese/keymap.c @@ -0,0 +1,67 @@ +#include "xd60.h" +#include "action_layer.h" + +// Each layer gets a name for readability. +// 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, and you can also skip them entirely +// and just use numbers. +#define _BL 0 +#define _FL 1 +#define _LS 2 +#define _RS 3 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* (Base Layer) Default Layer + * ,-----------------------------------------------------------. + * |Esc~| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | + * |-----------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | + * |-----------------------------------------------------------| + * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return | + * |-----------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | + * |-----------------------------------------------------------| + * |Ctrl|Gui |Alt | Space |FN|Left|Up|Down|Right| + * `-----------------------------------------------------------' + */ + [_BL] = KEYMAP( + KC_ESC, 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_BSPC, \ + 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, \ + MO(_FL), 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, \ + F(0), KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, F(1), F(1), F(1), \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FL), KC_LEFT, KC_UP, KC_DOWN, KC_RIGHT), + +// Function Layer + [_FL] = 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_DEL, KC_DEL, \ + KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_CALC, KC_INS, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, \ + KC_TRNS, KC_VOLD, KC_MUTE, KC_VOLU, KC_TRNS, KC_TRNS, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_APP, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_PGDN, KC_END), + +// Left Shift Layer + [_LS] = KEYMAP( + KC_GRV, 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, 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, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_CAPS, KC_CAPS, KC_CAPS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +// Right Shift Layer + [_RS] = KEYMAP( + KC_GRV, 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, 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, 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_CAPS, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +}; + +// Custom Actions +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_MODS(_LS, MOD_LSFT), + [1] = ACTION_LAYER_MODS(_RS, MOD_RSFT), +}; -- cgit v1.2.3 From c0a6c5f80601ed040be0adfe183c9b672aa7fa50 Mon Sep 17 00:00:00 2001 From: Nicolas Guelpa Date: Sun, 26 Mar 2017 15:07:19 -0400 Subject: fixing layout --- keyboards/xd60/keymaps/cheese/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/xd60/keymaps/cheese/keymap.c b/keyboards/xd60/keymaps/cheese/keymap.c index 738009304..25919a41f 100644 --- a/keyboards/xd60/keymaps/cheese/keymap.c +++ b/keyboards/xd60/keymaps/cheese/keymap.c @@ -20,7 +20,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-----------------------------------------------------------| * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | * |-----------------------------------------------------------| - * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return | + * |FUNCTION| A| S| D| F| G| H| J| K| L| ;| '|Return| * |-----------------------------------------------------------| * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | * |-----------------------------------------------------------| -- cgit v1.2.3 From a89ee25db8eb57b902e0fc1a16166d16af0dc721 Mon Sep 17 00:00:00 2001 From: Nicolas Guelpa Date: Sun, 26 Mar 2017 15:16:55 -0400 Subject: Add files via upload --- keyboards/xd60/keymaps/cheese/base_layout.png | Bin 0 -> 23729 bytes keyboards/xd60/keymaps/cheese/fn_layout.png | Bin 0 -> 20690 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 keyboards/xd60/keymaps/cheese/base_layout.png create mode 100644 keyboards/xd60/keymaps/cheese/fn_layout.png diff --git a/keyboards/xd60/keymaps/cheese/base_layout.png b/keyboards/xd60/keymaps/cheese/base_layout.png new file mode 100644 index 000000000..211c4c731 Binary files /dev/null and b/keyboards/xd60/keymaps/cheese/base_layout.png differ diff --git a/keyboards/xd60/keymaps/cheese/fn_layout.png b/keyboards/xd60/keymaps/cheese/fn_layout.png new file mode 100644 index 000000000..fe5ae99e0 Binary files /dev/null and b/keyboards/xd60/keymaps/cheese/fn_layout.png differ -- cgit v1.2.3 From a32436d5a16e1092d71b3185f17fda303d8333c6 Mon Sep 17 00:00:00 2001 From: Nicolas Guelpa Date: Sun, 26 Mar 2017 15:20:44 -0400 Subject: Create README.md --- keyboards/xd60/keymaps/cheese/README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 keyboards/xd60/keymaps/cheese/README.md diff --git a/keyboards/xd60/keymaps/cheese/README.md b/keyboards/xd60/keymaps/cheese/README.md new file mode 100644 index 000000000..8a5b97c03 --- /dev/null +++ b/keyboards/xd60/keymaps/cheese/README.md @@ -0,0 +1,13 @@ +# cheese's Layout +Customized xd60 keymap + +![Base Layout](base_layout.png "Base Layout") +![Fn Layout](fn_layout.png "Fn Layout") + +## Programming Instructions: +`cd` into keymap directory, `make dfu` + +## Features +- Media keys and movement keys setup like on the pok3r +- Lower right movement keys setup like on the fc660m (fn+direction for home/end/page up and down) +- Caps lock can be triggered by pressing both shift keys at the same time (and deactivated the same way) -- cgit v1.2.3 From b6b85ed41397440417106309bcf2b7ef2b617976 Mon Sep 17 00:00:00 2001 From: mattdibi Date: Tue, 28 Mar 2017 09:56:07 +0200 Subject: Added italian layout --- keyboards/ergodox/keymaps/italian/L0.PNG | Bin 0 -> 152470 bytes keyboards/ergodox/keymaps/italian/L1.PNG | Bin 0 -> 130416 bytes keyboards/ergodox/keymaps/italian/L2.PNG | Bin 0 -> 126006 bytes keyboards/ergodox/keymaps/italian/keymap.c | 223 ++++++++++++++++++++++++++++ keyboards/ergodox/keymaps/italian/readme.md | 15 ++ 5 files changed, 238 insertions(+) create mode 100644 keyboards/ergodox/keymaps/italian/L0.PNG create mode 100644 keyboards/ergodox/keymaps/italian/L1.PNG create mode 100644 keyboards/ergodox/keymaps/italian/L2.PNG create mode 100644 keyboards/ergodox/keymaps/italian/keymap.c create mode 100644 keyboards/ergodox/keymaps/italian/readme.md diff --git a/keyboards/ergodox/keymaps/italian/L0.PNG b/keyboards/ergodox/keymaps/italian/L0.PNG new file mode 100644 index 000000000..491a4f388 Binary files /dev/null and b/keyboards/ergodox/keymaps/italian/L0.PNG differ diff --git a/keyboards/ergodox/keymaps/italian/L1.PNG b/keyboards/ergodox/keymaps/italian/L1.PNG new file mode 100644 index 000000000..17c5ffc67 Binary files /dev/null and b/keyboards/ergodox/keymaps/italian/L1.PNG differ diff --git a/keyboards/ergodox/keymaps/italian/L2.PNG b/keyboards/ergodox/keymaps/italian/L2.PNG new file mode 100644 index 000000000..c0aa9e9d3 Binary files /dev/null and b/keyboards/ergodox/keymaps/italian/L2.PNG differ diff --git a/keyboards/ergodox/keymaps/italian/keymap.c b/keyboards/ergodox/keymaps/italian/keymap.c new file mode 100644 index 000000000..e4c7a569c --- /dev/null +++ b/keyboards/ergodox/keymaps/italian/keymap.c @@ -0,0 +1,223 @@ +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" +#include "version.h" + +#define BASE 0 // default layer +#define SYMB 1 // symbols +#define MDIA 2 // media keys + +enum custom_keycodes { + PLACEHOLDER = SAFE_RANGE, // can always be here + EPRM, + VRSN, + RGB_SLD +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | \ | 1 | 2 | 3 | 4 | 5 | ESC | | T2 | 6 | 7 | 8 | 9 | 0 | ' | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | E | R | T | TT1 | | TT1 | Y | U | I | O | P | è | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Caps | A | S | D | F | G |------| |------| H | J | K | L | ò | à | + * |--------+------+------+------+------+------| Alt | | Alt |------+------+------+------+------+--------| + * | LShift | Z | X | C | V | B | | | | N | M | , | . | ù |-/RShift| + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + break; + case 1: + if (record->event.pressed) { // For resetting EEPROM + eeconfig_init(); + } + break; + } + return MACRO_NONE; +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + // dynamically generate these. + case EPRM: + if (record->event.pressed) { + eeconfig_init(); + } + return false; + break; + case VRSN: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + break; + case RGB_SLD: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + rgblight_mode(1); + #endif + } + return false; + break; + } + return true; +} + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + // TODO: Make this relevant to the ErgoDox EZ. + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + default: + // none + break; + } + +}; diff --git a/keyboards/ergodox/keymaps/italian/readme.md b/keyboards/ergodox/keymaps/italian/readme.md new file mode 100644 index 000000000..979ce0f5b --- /dev/null +++ b/keyboards/ergodox/keymaps/italian/readme.md @@ -0,0 +1,15 @@ +# ErgoDox EZ Default Configuration + +## Changelog + +* Dec 2016: + * Added LED keys + * Refreshed layout graphic, comes from http://configure.ergodox-ez.com now. +* Sep 22, 2016: + * Created a new key in layer 1 (bottom-corner key) that resets the EEPROM. +* Feb 2, 2016 (V1.1): + * Made the right-hand quote key double as Cmd/Win on hold. So you get ' when you tap it, " when you tap it with Shift, and Cmd or Win when you hold it. You can then use it as a modifier, or just press and hold it for a moment (and then let go) to send a single Cmd or Win keystroke (handy for opening the Start menu on Windows). + +This is what we ship with out of the factory. :) The image says it all: + +![Default](default_firmware_v1.2-2.png) -- cgit v1.2.3 From 512eb5e1d5edd39e3e46f8201b57d8fd17084408 Mon Sep 17 00:00:00 2001 From: mattdibi Date: Tue, 28 Mar 2017 10:10:24 +0200 Subject: Updated readme --- keyboards/ergodox/keymaps/italian/readme.md | 79 +++++++++++++++++++++++++---- 1 file changed, 68 insertions(+), 11 deletions(-) diff --git a/keyboards/ergodox/keymaps/italian/readme.md b/keyboards/ergodox/keymaps/italian/readme.md index 979ce0f5b..f9d012135 100644 --- a/keyboards/ergodox/keymaps/italian/readme.md +++ b/keyboards/ergodox/keymaps/italian/readme.md @@ -1,15 +1,72 @@ -# ErgoDox EZ Default Configuration +# ErgoDox Italian layout -## Changelog +## Layer 0 +```sh + + ,--------------------------------------------------. ,--------------------------------------------------. + | \ | 1 | 2 | 3 | 4 | 5 | ESC | | T2 | 6 | 7 | 8 | 9 | 0 | ' | + |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + | Tab | Q | W | E | R | T | TT1 | | TT1 | Y | U | I | O | P | è | + |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + | Caps | A | S | D | F | G |------| |------| H | J | K | L | ò | à | + |--------+------+------+------+------+------| Alt | | Alt |------+------+------+------+------+--------| + | LShift | Z | X | C | V | B | | | | N | M | , | . | ù |-/RShift| + `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + | Date: Tue, 28 Mar 2017 10:13:29 +0200 Subject: Fixed italian kymap readme --- keyboards/ergodox/keymaps/italian/readme.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboards/ergodox/keymaps/italian/readme.md b/keyboards/ergodox/keymaps/italian/readme.md index f9d012135..75dd3c29d 100644 --- a/keyboards/ergodox/keymaps/italian/readme.md +++ b/keyboards/ergodox/keymaps/italian/readme.md @@ -1,7 +1,7 @@ # ErgoDox Italian layout ## Layer 0 -```sh +``` ,--------------------------------------------------. ,--------------------------------------------------. | \ | 1 | 2 | 3 | 4 | 5 | ESC | | T2 | 6 | 7 | 8 | 9 | 0 | ' | @@ -24,7 +24,7 @@ ``` ## Layer 1 -```sh +``` ,--------------------------------------------------. ,--------------------------------------------------. |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | @@ -47,7 +47,7 @@ ``` ## Layer 1 -```sh +``` ,--------------------------------------------------. ,--------------------------------------------------. | | | | | | | | | | | | | | | | -- cgit v1.2.3 From 221b27c508b3870de725e720222a6281770b5f98 Mon Sep 17 00:00:00 2001 From: mattdibi Date: Tue, 28 Mar 2017 10:15:18 +0200 Subject: Fixed layout title in ergodox ez italian keymap --- keyboards/ergodox/keymaps/italian/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/ergodox/keymaps/italian/readme.md b/keyboards/ergodox/keymaps/italian/readme.md index 75dd3c29d..215c24a5a 100644 --- a/keyboards/ergodox/keymaps/italian/readme.md +++ b/keyboards/ergodox/keymaps/italian/readme.md @@ -46,7 +46,7 @@ `--------------------' `--------------------' ``` -## Layer 1 +## Layer 2 ``` ,--------------------------------------------------. ,--------------------------------------------------. -- cgit v1.2.3 From 2104900030c4a0d0a5d71c9900804dec229a375d Mon Sep 17 00:00:00 2001 From: mattdibi Date: Tue, 28 Mar 2017 10:19:25 +0200 Subject: Removed images from ergodox ez italian layout --- keyboards/ergodox/keymaps/italian/L0.PNG | Bin 152470 -> 0 bytes keyboards/ergodox/keymaps/italian/L1.PNG | Bin 130416 -> 0 bytes keyboards/ergodox/keymaps/italian/L2.PNG | Bin 126006 -> 0 bytes 3 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 keyboards/ergodox/keymaps/italian/L0.PNG delete mode 100644 keyboards/ergodox/keymaps/italian/L1.PNG delete mode 100644 keyboards/ergodox/keymaps/italian/L2.PNG diff --git a/keyboards/ergodox/keymaps/italian/L0.PNG b/keyboards/ergodox/keymaps/italian/L0.PNG deleted file mode 100644 index 491a4f388..000000000 Binary files a/keyboards/ergodox/keymaps/italian/L0.PNG and /dev/null differ diff --git a/keyboards/ergodox/keymaps/italian/L1.PNG b/keyboards/ergodox/keymaps/italian/L1.PNG deleted file mode 100644 index 17c5ffc67..000000000 Binary files a/keyboards/ergodox/keymaps/italian/L1.PNG and /dev/null differ diff --git a/keyboards/ergodox/keymaps/italian/L2.PNG b/keyboards/ergodox/keymaps/italian/L2.PNG deleted file mode 100644 index c0aa9e9d3..000000000 Binary files a/keyboards/ergodox/keymaps/italian/L2.PNG and /dev/null differ -- cgit v1.2.3 From 71857ebc3f410b918481f4a6bbed93f1cb2eec65 Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Tue, 28 Mar 2017 09:17:09 -0400 Subject: Move Atreus50 to hardwired directory and update README --- keyboards/atreus50/Makefile | 3 - keyboards/atreus50/atreus50.c | 10 - keyboards/atreus50/atreus50.h | 36 --- keyboards/atreus50/config.h | 163 -------------- keyboards/atreus50/keymaps/default/Makefile | 6 - keyboards/atreus50/keymaps/default/keymap.c | 250 --------------------- keyboards/atreus50/readme.md | 25 --- keyboards/atreus50/rules.mk | 81 ------- keyboards/handwired/atreus50/Makefile | 3 + keyboards/handwired/atreus50/atreus50.c | 10 + keyboards/handwired/atreus50/atreus50.h | 36 +++ keyboards/handwired/atreus50/config.h | 163 ++++++++++++++ .../handwired/atreus50/keymaps/default/Makefile | 6 + .../handwired/atreus50/keymaps/default/keymap.c | 250 +++++++++++++++++++++ keyboards/handwired/atreus50/readme.md | 16 ++ keyboards/handwired/atreus50/rules.mk | 81 +++++++ 16 files changed, 565 insertions(+), 574 deletions(-) delete mode 100644 keyboards/atreus50/Makefile delete mode 100644 keyboards/atreus50/atreus50.c delete mode 100644 keyboards/atreus50/atreus50.h delete mode 100644 keyboards/atreus50/config.h delete mode 100644 keyboards/atreus50/keymaps/default/Makefile delete mode 100644 keyboards/atreus50/keymaps/default/keymap.c delete mode 100644 keyboards/atreus50/readme.md delete mode 100644 keyboards/atreus50/rules.mk create mode 100644 keyboards/handwired/atreus50/Makefile create mode 100644 keyboards/handwired/atreus50/atreus50.c create mode 100644 keyboards/handwired/atreus50/atreus50.h create mode 100644 keyboards/handwired/atreus50/config.h create mode 100644 keyboards/handwired/atreus50/keymaps/default/Makefile create mode 100644 keyboards/handwired/atreus50/keymaps/default/keymap.c create mode 100644 keyboards/handwired/atreus50/readme.md create mode 100644 keyboards/handwired/atreus50/rules.mk diff --git a/keyboards/atreus50/Makefile b/keyboards/atreus50/Makefile deleted file mode 100644 index 57b2ef62e..000000000 --- a/keyboards/atreus50/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -ifndef MAKEFILE_INCLUDED - include ../../Makefile -endif diff --git a/keyboards/atreus50/atreus50.c b/keyboards/atreus50/atreus50.c deleted file mode 100644 index 225a51bcc..000000000 --- a/keyboards/atreus50/atreus50.c +++ /dev/null @@ -1,10 +0,0 @@ -#include "atreus50.h" - -void matrix_init_kb(void) { - - // Turn status LED on - //DDRE |= (1<<6); - PORTE |= (1<<6); - - matrix_init_user(); -}; diff --git a/keyboards/atreus50/atreus50.h b/keyboards/atreus50/atreus50.h deleted file mode 100644 index de06f255e..000000000 --- a/keyboards/atreus50/atreus50.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef ATREUS50_H -#define ATREUS50_H - -#include "quantum.h" - -// The first section contains all of the arguements -// The second converts the arguments into a two-dimensional array -#define KEYMAP( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k34, k35, km0, km1, k36, k37, k38, k39, k3a, k3b \ -) \ -{ \ - { k00, k01, k02, k03, k04, k05, KC_NO, k06, k07, k08, k09, k0a, k0b }, \ - { k10, k11, k12, k13, k14, k15, KC_NO, k16, k17, k18, k19, k1a, k1b }, \ - { k20, k21, k22, k23, k24, k25, km0, k26, k27, k28, k29, k2a, k2b }, \ - { k30, k31, k32, k33, k34, k35, km1, k36, k37, k38, k39, k3a, k3b } \ -} - -#define COMPACT_KEYMAP( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k34, k35, km0, km1, k36, k37, k38, k39, k3a, k3b \ -) \ -{ \ - { KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_NO, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b }, \ - { KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_NO, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b }, \ - { KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##km0, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b }, \ - { KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##km1, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b } \ -} - -#define KC_ KC_TRNS - -#endif diff --git a/keyboards/atreus50/config.h b/keyboards/atreus50/config.h deleted file mode 100644 index 2e34e0f89..000000000 --- a/keyboards/atreus50/config.h +++ /dev/null @@ -1,163 +0,0 @@ -/* -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 0xBB80 -#define PRODUCT_ID 0x040D -#define DEVICE_VER 0x0001 -#define MANUFACTURER Hexwire -#define PRODUCT Atreus 50 Keyboard -#define DESCRIPTION Atreus layout with extra column - -/* key matrix size */ -#define MATRIX_ROWS 4 -#define MATRIX_COLS 13 - -/* Planck PCB default pin-out */ -#define MATRIX_ROW_PINS { D3, D2, D1, D0 } -#define MATRIX_COL_PINS { D4, D7, E6, B4, B5, B6, B2, B3, B1, F7, F6, F5, F4 } -#define UNUSED_PINS - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -// #define BACKLIGHT_PIN B7 -// #define BACKLIGHT_BREATHING -// #define BACKLIGHT_LEVELS 3 - - -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 - -/* define if matrix has ghost (lacks anti-ghosting diodes) */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ - -/* 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 - - -/* ws2812 RGB LED */ -#define RGB_DI_PIN C6 -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 12 // Number of LEDs -#define RGBLIGHT_HUE_STEP 10 -#define RGBLIGHT_SAT_STEP 17 -#define RGBLIGHT_VAL_STEP 17 - - -/* - * Force NKRO - * - * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved - * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the - * makefile for this to work.) - * - * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) - * until the next keyboard reset. - * - * NKRO may prevent your keystrokes from being detected in the BIOS, but it is - * fully operational during normal computer usage. - * - * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) - * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by - * bootmagic, NKRO mode will always be enabled until it is toggled again during a - * power-up. - * - */ -//#define FORCE_NKRO - -/* - * Magic Key Options - * - * Magic keys are hotkey commands that allow control over firmware functions of - * the keyboard. They are best used in combination with the HID Listen program, - * found here: https://www.pjrc.com/teensy/hid_listen.html - * - * The options below allow the magic key functionality to be changed. This is - * useful if your keyboard/keypad is missing keys and you want magic key support. - * - */ - -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - -/* control how magic key switches layers */ -//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false - -/* override magic key keymap */ -//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS -//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS -//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM -//#define MAGIC_KEY_HELP1 H -//#define MAGIC_KEY_HELP2 SLASH -//#define MAGIC_KEY_DEBUG D -//#define MAGIC_KEY_DEBUG_MATRIX X -//#define MAGIC_KEY_DEBUG_KBD K -//#define MAGIC_KEY_DEBUG_MOUSE M -//#define MAGIC_KEY_VERSION V -//#define MAGIC_KEY_STATUS S -//#define MAGIC_KEY_CONSOLE C -//#define MAGIC_KEY_LAYER0_ALT1 ESC -//#define MAGIC_KEY_LAYER0_ALT2 GRAVE -//#define MAGIC_KEY_LAYER0 0 -//#define MAGIC_KEY_LAYER1 1 -//#define MAGIC_KEY_LAYER2 2 -//#define MAGIC_KEY_LAYER3 3 -//#define MAGIC_KEY_LAYER4 4 -//#define MAGIC_KEY_LAYER5 5 -//#define MAGIC_KEY_LAYER6 6 -//#define MAGIC_KEY_LAYER7 7 -//#define MAGIC_KEY_LAYER8 8 -//#define MAGIC_KEY_LAYER9 9 -//#define MAGIC_KEY_BOOTLOADER PAUSE -//#define MAGIC_KEY_LOCK CAPS -//#define MAGIC_KEY_EEPROM E -//#define MAGIC_KEY_NKRO N -//#define MAGIC_KEY_SLEEP_LED Z - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/atreus50/keymaps/default/Makefile b/keyboards/atreus50/keymaps/default/Makefile deleted file mode 100644 index d7b0fa7fd..000000000 --- a/keyboards/atreus50/keymaps/default/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -RGBLIGHT_ENABLE = yes -AUDIO_ENABLE = no - -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/atreus50/keymaps/default/keymap.c b/keyboards/atreus50/keymaps/default/keymap.c deleted file mode 100644 index 415405ec2..000000000 --- a/keyboards/atreus50/keymaps/default/keymap.c +++ /dev/null @@ -1,250 +0,0 @@ -#include "atreus50.h" -#include "action_layer.h" -#include "eeconfig.h" -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif - -// 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 _MOVEMENT 5 -#define _ADJUST 16 - -enum custom_keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - DVORAK, - LOWER, - RAISE, - MOVEMENT, - BACKLIT -}; - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO -#define KC_X0 MT(MOD_LCTL, KC_ESC) // Hold for Left Ctrl, Tap for ESC -#define KC_X1 LOWER -#define KC_X2 RAISE -#define KC_X3 MO(_MOVEMENT) -#define KC_X4 MT(MOD_LSFT, KC_ENT) // Hold for Left Shift, Tap for Enter - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [_QWERTY] = COMPACT_KEYMAP( - //,----+----+----+----+----+----. ,----+----+----+----+----+----. - TAB , Q , W , E , R , T , Y , U , I , O , P ,MINS, - //|----+----+----+----+----+----| |----+----+----+----+----+----| - X0 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT, - //|----+----+----+----+----+----| |----+----+----+----+----+----| - LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, X4 , - //|----+----+----+----+----+----|----+----|----+----+----+----+----+----| - GRV ,LCTL,LALT,LGUI, X1 ,SPC , X3 ,RSFT,BSPC, X2 ,LEFT,DOWN, UP ,RGHT - //`----+----+----+----+----+----+----+----+----+----+----+----+----+----' - ), - - [_COLEMAK] = COMPACT_KEYMAP( - //,----+----+----+----+----+----. ,----+----+----+----+----+----. - TAB , Q , W , F , P , G , J , L , U , Y ,SCLN,MINS, - //|----+----+----+----+----+----| |----+----+----+----+----+----| - X0 , A , R , S , T , D , H , N , E , I , O ,QUOT, - //|----+----+----+----+----+----| |----+----+----+----+----+----| - LSFT, Z , X , C , V , B , K , M ,COMM,DOT ,SLSH, X4 , - //|----+----+----+----+----+----|----+----|----+----+----+----+----+----| - GRV ,LCTL,LALT,LGUI, X1 ,SPC , X3 ,RSFT,BSPC, X2 ,LEFT,DOWN, UP ,RGHT - //`----+----+----+----+----+----+----+----+----+----+----+----+----+----' - ), - - [_DVORAK] = COMPACT_KEYMAP( - //,----+----+----+----+----+----. ,----+----+----+----+----+----. - TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,MINS, - //|----+----+----+----+----+----| |----+----+----+----+----+----| - X0 , A , O , E , U , I , D , H , R , N , S ,SLSH, - //|----+----+----+----+----+----| |----+----+----+----+----+----| - LSFT,SCLN, Q , J , K , X , B , M , W , V , Z , X4 , - //|----+----+----+----+----+----|----+----|----+----+----+----+----+----| - GRV ,LCTL,LALT,LGUI, X1 ,SPC , X3 ,RSFT,BSPC, X2 ,LEFT,DOWN, UP ,RGHT - //`----+----+----+----+----+----+----+----+----+----+----+----+----+----' - ), - - [_LOWER] = COMPACT_KEYMAP( - //,----+----+----+----+----+----. ,----+----+----+----+----+----. - TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,DEL , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - DEL , F1 , F2 , F3 , F4 , F5 , F6 ,UNDS,PLUS,LCBR,RCBR,PIPE, - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , F7 , F8 , F9 ,F10 ,F11 , F12 ,END , , , , , - //|----+----+----+----+----+----|----+----|----+----+----+----+----+----| - , , , , , , , , , ,MNXT,VOLD,VOLU,MPLY - //`----+----+----+----+----+----+----+----+----+----+----+----+----+----' - ), - - [_RAISE] = COMPACT_KEYMAP( - //,----+----+----+----+----+----. ,----+----+----+----+----+----. - GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,DEL , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - DEL , F1 , F2 , F3 , F4 , F5 , F6 ,MINS,EQL ,LBRC,RBRC,BSLS, - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , F7 , F8 , F9 ,F10 ,F11 , F12 ,NUHS,NUBS, , , , - //|----+----+----+----+----+----|----+----|----+----+----+----+----+----| - , , , , , , , , , ,MNXT,VOLD,VOLU,MPLY - //`----+----+----+----+----+----+----+----+----+----+----+----+----+----' - ), - - [_MOVEMENT] = COMPACT_KEYMAP( - //,----+----+----+----+----+----. ,----+----+----+----+----+----. - TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR, UP ,LPRN,RPRN,DEL , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - DEL , F1 , F2 , F3 , F4 , F5 , F6 ,LEFT,DOWN,RGHT,RCBR,PIPE, - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , F7 , F8 , F9 ,F10 ,F11 , F12 ,END , , , , , - //|----+----+----+----+----+----|----+----|----+----+----+----+----+----| - , , , , , , , ,PGDN,PGUP,MNXT,VOLD,VOLU,MPLY - //`----+----+----+----+----+----+----+----+----+----+----+----+----+----' - ), - -/* Adjust (Lower + Raise) - * |------+------+------+------+------+------. ,------+------+------+------+------+------| - * | | Reset| | | | | | | | | | | Del | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | |Audoff|Aud on|AGnorm| |AGswap|Qwerty|Colemk|Dvorak| | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | |Voice-|Voice+|Musoff|Mus on| | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | | | - * `-------------------------------------------------------------------------------------------------' - */ - [_ADJUST] = KEYMAP( \ - _______, RESET, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, KC_DEL, \ - _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ - _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ - ) - -}; - -#ifdef AUDIO_ENABLE -float tone_startup[][2] = { - {NOTE_B5, 20}, - {NOTE_B6, 8}, - {NOTE_DS6, 20}, - {NOTE_B6, 8} -}; - -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -float tone_dvorak[][2] = SONG(DVORAK_SOUND); -float tone_colemak[][2] = SONG(COLEMAK_SOUND); - -float tone_goodbye[][2] = SONG(GOODBYE_SOUND); - -float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); -#endif - -void persistant_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 - persistant_default_layer_set(1UL<<_QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); - #endif - persistant_default_layer_set(1UL<<_COLEMAK); - } - return false; - break; - case DVORAK: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); - #endif - persistant_default_layer_set(1UL<<_DVORAK); - } - 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 BACKLIT: - if (record->event.pressed) { - register_code(KC_RSFT); - #ifdef BACKLIGHT_ENABLE - backlight_step(); - #endif - } else { - unregister_code(KC_RSFT); - } - return false; - break; - } - return true; -}; - -void matrix_init_user(void) { - #ifdef AUDIO_ENABLE - startup_user(); - #endif -} - -#ifdef AUDIO_ENABLE - -void startup_user() -{ - _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); -} - -void shutdown_user() -{ - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); - _delay_ms(150); - stop_all_notes(); -} - -void music_on_user(void) -{ - music_scale_user(); -} - -void music_scale_user(void) -{ - PLAY_NOTE_ARRAY(music_scale, false, 0); -} - -#endif diff --git a/keyboards/atreus50/readme.md b/keyboards/atreus50/readme.md deleted file mode 100644 index f0be255a0..000000000 --- a/keyboards/atreus50/readme.md +++ /dev/null @@ -1,25 +0,0 @@ -Preonic keyboard firmware -====================== -DIY/Assembled compact ortholinear 50% keyboard by [Ortholinear Keyboards](http://ortholinearkeyboards.com). - -## Quantum MK Firmware - -For the full Quantum feature list, see [the parent readme.md](/readme.md). - -## Building - -Download or clone the whole firmware and navigate to the keyboards/preonic folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use `make dfu` to program your PCB once you hit the reset button. - -Depending on which keymap you would like to use, you will have to compile slightly differently. - -### Default -To build with the default keymap, simply run `make`. - -### Other Keymaps -Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap, create a file in the keymaps folder named `.c` and see keymap document (you can find in top readme.md) and existent keymap files. - -To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like: -``` -$ make KEYMAP=[default|jack|] -``` -Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. diff --git a/keyboards/atreus50/rules.mk b/keyboards/atreus50/rules.mk deleted file mode 100644 index 7770ea2a2..000000000 --- a/keyboards/atreus50/rules.mk +++ /dev/null @@ -1,81 +0,0 @@ - - -# 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 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 ?= no # Console for debug(+400) -COMMAND_ENABLE ?= yes # Commands for debug and configuration -NKRO_ENABLE ?= no # 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. - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend - -avrdude: build - ls /dev/tty* > /tmp/1; \ - echo "Reset your Pro Micro now"; \ - while [[ -z $$USB ]]; do \ - sleep 1; \ - ls /dev/tty* > /tmp/2; \ - USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \ - done; \ - avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex - -.PHONY: avrdude diff --git a/keyboards/handwired/atreus50/Makefile b/keyboards/handwired/atreus50/Makefile new file mode 100644 index 000000000..57b2ef62e --- /dev/null +++ b/keyboards/handwired/atreus50/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif diff --git a/keyboards/handwired/atreus50/atreus50.c b/keyboards/handwired/atreus50/atreus50.c new file mode 100644 index 000000000..225a51bcc --- /dev/null +++ b/keyboards/handwired/atreus50/atreus50.c @@ -0,0 +1,10 @@ +#include "atreus50.h" + +void matrix_init_kb(void) { + + // Turn status LED on + //DDRE |= (1<<6); + PORTE |= (1<<6); + + matrix_init_user(); +}; diff --git a/keyboards/handwired/atreus50/atreus50.h b/keyboards/handwired/atreus50/atreus50.h new file mode 100644 index 000000000..de06f255e --- /dev/null +++ b/keyboards/handwired/atreus50/atreus50.h @@ -0,0 +1,36 @@ +#ifndef ATREUS50_H +#define ATREUS50_H + +#include "quantum.h" + +// The first section contains all of the arguements +// The second converts the arguments into a two-dimensional array +#define KEYMAP( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, km0, km1, k36, k37, k38, k39, k3a, k3b \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, KC_NO, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, KC_NO, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, km0, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, km1, k36, k37, k38, k39, k3a, k3b } \ +} + +#define COMPACT_KEYMAP( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, km0, km1, k36, k37, k38, k39, k3a, k3b \ +) \ +{ \ + { KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_NO, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b }, \ + { KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_NO, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b }, \ + { KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##km0, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b }, \ + { KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##km1, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b } \ +} + +#define KC_ KC_TRNS + +#endif diff --git a/keyboards/handwired/atreus50/config.h b/keyboards/handwired/atreus50/config.h new file mode 100644 index 000000000..2e34e0f89 --- /dev/null +++ b/keyboards/handwired/atreus50/config.h @@ -0,0 +1,163 @@ +/* +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 0xBB80 +#define PRODUCT_ID 0x040D +#define DEVICE_VER 0x0001 +#define MANUFACTURER Hexwire +#define PRODUCT Atreus 50 Keyboard +#define DESCRIPTION Atreus layout with extra column + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 13 + +/* Planck PCB default pin-out */ +#define MATRIX_ROW_PINS { D3, D2, D1, D0 } +#define MATRIX_COL_PINS { D4, D7, E6, B4, B5, B6, B2, B3, B1, F7, F6, F5, F4 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + + +/* ws2812 RGB LED */ +#define RGB_DI_PIN C6 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 12 // Number of LEDs +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/handwired/atreus50/keymaps/default/Makefile b/keyboards/handwired/atreus50/keymaps/default/Makefile new file mode 100644 index 000000000..d7b0fa7fd --- /dev/null +++ b/keyboards/handwired/atreus50/keymaps/default/Makefile @@ -0,0 +1,6 @@ +RGBLIGHT_ENABLE = yes +AUDIO_ENABLE = no + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/handwired/atreus50/keymaps/default/keymap.c b/keyboards/handwired/atreus50/keymaps/default/keymap.c new file mode 100644 index 000000000..415405ec2 --- /dev/null +++ b/keyboards/handwired/atreus50/keymaps/default/keymap.c @@ -0,0 +1,250 @@ +#include "atreus50.h" +#include "action_layer.h" +#include "eeconfig.h" +#ifdef AUDIO_ENABLE + #include "audio.h" +#endif + +// 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 _MOVEMENT 5 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + MOVEMENT, + BACKLIT +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO +#define KC_X0 MT(MOD_LCTL, KC_ESC) // Hold for Left Ctrl, Tap for ESC +#define KC_X1 LOWER +#define KC_X2 RAISE +#define KC_X3 MO(_MOVEMENT) +#define KC_X4 MT(MOD_LSFT, KC_ENT) // Hold for Left Shift, Tap for Enter + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = COMPACT_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + TAB , Q , W , E , R , T , Y , U , I , O , P ,MINS, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + X0 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, X4 , + //|----+----+----+----+----+----|----+----|----+----+----+----+----+----| + GRV ,LCTL,LALT,LGUI, X1 ,SPC , X3 ,RSFT,BSPC, X2 ,LEFT,DOWN, UP ,RGHT + //`----+----+----+----+----+----+----+----+----+----+----+----+----+----' + ), + + [_COLEMAK] = COMPACT_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + TAB , Q , W , F , P , G , J , L , U , Y ,SCLN,MINS, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + X0 , A , R , S , T , D , H , N , E , I , O ,QUOT, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + LSFT, Z , X , C , V , B , K , M ,COMM,DOT ,SLSH, X4 , + //|----+----+----+----+----+----|----+----|----+----+----+----+----+----| + GRV ,LCTL,LALT,LGUI, X1 ,SPC , X3 ,RSFT,BSPC, X2 ,LEFT,DOWN, UP ,RGHT + //`----+----+----+----+----+----+----+----+----+----+----+----+----+----' + ), + + [_DVORAK] = COMPACT_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,MINS, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + X0 , A , O , E , U , I , D , H , R , N , S ,SLSH, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + LSFT,SCLN, Q , J , K , X , B , M , W , V , Z , X4 , + //|----+----+----+----+----+----|----+----|----+----+----+----+----+----| + GRV ,LCTL,LALT,LGUI, X1 ,SPC , X3 ,RSFT,BSPC, X2 ,LEFT,DOWN, UP ,RGHT + //`----+----+----+----+----+----+----+----+----+----+----+----+----+----' + ), + + [_LOWER] = COMPACT_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,DEL , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + DEL , F1 , F2 , F3 , F4 , F5 , F6 ,UNDS,PLUS,LCBR,RCBR,PIPE, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , F7 , F8 , F9 ,F10 ,F11 , F12 ,END , , , , , + //|----+----+----+----+----+----|----+----|----+----+----+----+----+----| + , , , , , , , , , ,MNXT,VOLD,VOLU,MPLY + //`----+----+----+----+----+----+----+----+----+----+----+----+----+----' + ), + + [_RAISE] = COMPACT_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,DEL , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + DEL , F1 , F2 , F3 , F4 , F5 , F6 ,MINS,EQL ,LBRC,RBRC,BSLS, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , F7 , F8 , F9 ,F10 ,F11 , F12 ,NUHS,NUBS, , , , + //|----+----+----+----+----+----|----+----|----+----+----+----+----+----| + , , , , , , , , , ,MNXT,VOLD,VOLU,MPLY + //`----+----+----+----+----+----+----+----+----+----+----+----+----+----' + ), + + [_MOVEMENT] = COMPACT_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR, UP ,LPRN,RPRN,DEL , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + DEL , F1 , F2 , F3 , F4 , F5 , F6 ,LEFT,DOWN,RGHT,RCBR,PIPE, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , F7 , F8 , F9 ,F10 ,F11 , F12 ,END , , , , , + //|----+----+----+----+----+----|----+----|----+----+----+----+----+----| + , , , , , , , ,PGDN,PGUP,MNXT,VOLD,VOLU,MPLY + //`----+----+----+----+----+----+----+----+----+----+----+----+----+----' + ), + +/* Adjust (Lower + Raise) + * |------+------+------+------+------+------. ,------+------+------+------+------+------| + * | | Reset| | | | | | | | | | | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | |Audoff|Aud on|AGnorm| |AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | |Voice-|Voice+|Musoff|Mus on| | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | + * `-------------------------------------------------------------------------------------------------' + */ + [_ADJUST] = KEYMAP( \ + _______, RESET, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, KC_DEL, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ) + +}; + +#ifdef AUDIO_ENABLE +float tone_startup[][2] = { + {NOTE_B5, 20}, + {NOTE_B6, 8}, + {NOTE_DS6, 20}, + {NOTE_B6, 8} +}; + +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); + +float tone_goodbye[][2] = SONG(GOODBYE_SOUND); + +float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); +#endif + +void persistant_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 + persistant_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_colemak, false, 0); + #endif + persistant_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + #endif + persistant_default_layer_set(1UL<<_DVORAK); + } + 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 BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + return false; + break; + } + return true; +}; + +void matrix_init_user(void) { + #ifdef AUDIO_ENABLE + startup_user(); + #endif +} + +#ifdef AUDIO_ENABLE + +void startup_user() +{ + _delay_ms(20); // gets rid of tick + PLAY_NOTE_ARRAY(tone_startup, false, 0); +} + +void shutdown_user() +{ + PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + _delay_ms(150); + stop_all_notes(); +} + +void music_on_user(void) +{ + music_scale_user(); +} + +void music_scale_user(void) +{ + PLAY_NOTE_ARRAY(music_scale, false, 0); +} + +#endif diff --git a/keyboards/handwired/atreus50/readme.md b/keyboards/handwired/atreus50/readme.md new file mode 100644 index 000000000..0c24f67db --- /dev/null +++ b/keyboards/handwired/atreus50/readme.md @@ -0,0 +1,16 @@ +Handwired Atreus50 +================== + +This firmware is for a Handwired Atreus50 using an Arduino Pro Micro. + +## Pinout + +The following pins are used: +- Columns 1-13: D4, D7, E6, B4, B5, B6, B2, B3, B1, F7, F6, F5, F4 +- Rows 1-4: D3, D2, D1, D0 + +## Compiling and loading the firmware + +To build the firmware, run `make`. + +To flash the firemware onto the microcontroller, run `make avrdude`, and press the reset button. diff --git a/keyboards/handwired/atreus50/rules.mk b/keyboards/handwired/atreus50/rules.mk new file mode 100644 index 000000000..7770ea2a2 --- /dev/null +++ b/keyboards/handwired/atreus50/rules.mk @@ -0,0 +1,81 @@ + + +# 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 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 ?= no # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +NKRO_ENABLE ?= no # 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. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend + +avrdude: build + ls /dev/tty* > /tmp/1; \ + echo "Reset your Pro Micro now"; \ + while [[ -z $$USB ]]; do \ + sleep 1; \ + ls /dev/tty* > /tmp/2; \ + USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \ + done; \ + avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex + +.PHONY: avrdude -- cgit v1.2.3 From d5ee0194abf5cc9df4086a89ad78cf188352028a Mon Sep 17 00:00:00 2001 From: Ole Anders Date: Tue, 28 Mar 2017 15:43:04 +0200 Subject: fixed #1139 issues A fix described by jackhumbert has been sorted out now. --- keyboards/satan/keymaps/admiralStrokers/Makefile | 36 ++++++++++++------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/keyboards/satan/keymaps/admiralStrokers/Makefile b/keyboards/satan/keymaps/admiralStrokers/Makefile index 18d2280d6..7aba5d809 100644 --- a/keyboards/satan/keymaps/admiralStrokers/Makefile +++ b/keyboards/satan/keymaps/admiralStrokers/Makefile @@ -2,25 +2,25 @@ # 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 = no # 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 -SLEEP_LED_ENABLE = no # Enables your LED to breathe while your computer is sleeping. -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 -UNICODEMAP_ENABLE = no # This allows sending unicode symbols using X() in your keymap. -UNICODE_ENABLE = no # Unicode -UCIS_ENABLE = no # Keep in mind that not all will work (See WinCompose for details on Windows). -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 +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # 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 +SLEEP_LED_ENABLE = no # Enables your LED to breathe while your computer is sleeping. +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 +UNICODEMAP_ENABLE = no # This allows sending unicode symbols using X() in your keymap. +UNICODE_ENABLE =no # Unicode +UCIS_ENABLE = no # Keep in mind that not all will work (See WinCompose for details on Windows). +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 -VARIABLE_TRACE = no # Use this to debug changes to variable values -API_SYSEX_ENABLE = no # This enables using the Quantum SYSEX API to send strings +VARIABLE_TRACE = no # Use this to debug changes to variable values +API_SYSEX_ENABLE = no # This enables using the Quantum SYSEX API to send strings ifndef QUANTUM_DIR include ../../../../Makefile endif -- cgit v1.2.3 From 48dfc77718bf115c6d65257b07e8d87304c23d8f Mon Sep 17 00:00:00 2001 From: Ole Anders Date: Tue, 28 Mar 2017 15:58:46 +0200 Subject: removed a carriage return --- keyboards/satan/keymaps/admiralStrokers/Makefile | 37 ++++++++++++------------ 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/keyboards/satan/keymaps/admiralStrokers/Makefile b/keyboards/satan/keymaps/admiralStrokers/Makefile index 7aba5d809..bb4072861 100644 --- a/keyboards/satan/keymaps/admiralStrokers/Makefile +++ b/keyboards/satan/keymaps/admiralStrokers/Makefile @@ -2,25 +2,24 @@ # 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 = no # 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 -SLEEP_LED_ENABLE = no # Enables your LED to breathe while your computer is sleeping. -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 -UNICODEMAP_ENABLE = no # This allows sending unicode symbols using X() in your keymap. -UNICODE_ENABLE =no # Unicode -UCIS_ENABLE = no # Keep in mind that not all will work (See WinCompose for details on Windows). -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 - -VARIABLE_TRACE = no # Use this to debug changes to variable values -API_SYSEX_ENABLE = no # This enables using the Quantum SYSEX API to send strings +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # 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 +SLEEP_LED_ENABLE = no # Enables your LED to breathe while your computer is sleeping. +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 +UNICODEMAP_ENABLE = no # This allows sending unicode symbols using X() in your keymap. +UNICODE_ENABLE =no # Unicode +UCIS_ENABLE = no # Keep in mind that not all will work (See WinCompose for details on Windows). +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 +VARIABLE_TRACE = no # Use this to debug changes to variable values +API_SYSEX_ENABLE = no # This enables using the Quantum SYSEX API to send strings ifndef QUANTUM_DIR include ../../../../Makefile endif -- cgit v1.2.3 From c72ca58528671eb582a1a7360407fd9347c9735b Mon Sep 17 00:00:00 2001 From: Ole Anders Date: Tue, 28 Mar 2017 16:50:44 +0200 Subject: Moved key_timer out of function. --- keyboards/satan/keymaps/admiralStrokers/keymap.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/keyboards/satan/keymaps/admiralStrokers/keymap.c b/keyboards/satan/keymaps/admiralStrokers/keymap.c index 97a0f225d..4bd49aaad 100644 --- a/keyboards/satan/keymaps/admiralStrokers/keymap.c +++ b/keyboards/satan/keymaps/admiralStrokers/keymap.c @@ -1,13 +1,14 @@ #include "satan.h" +static uint16_t key_timer; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // general keydefs #define norm 0 // Default layer #define elev 1 // Layer directional keys #define supr 2 // F-keys and mediakeys -#define spac 3 +#define spac 3 // #define FNO1 4 // #define FNO2 5 // -#define FNO3 6 // +#define FNO3 6 // #define MAC0 M(0) // #define MAC1 M(1) // #define MAC2 M(2) // @@ -143,7 +144,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function - static uint16_t key_timer; + bool checkTime(){ return (timer_elapsed(key_timer) < 150) ? true : false; } -- cgit v1.2.3 From 37b7539af3a4e302a44ed9292ed5012a9ab34e5c Mon Sep 17 00:00:00 2001 From: Ole Anders Date: Tue, 28 Mar 2017 16:52:56 +0200 Subject: slight cleanup as per recommendation --- keyboards/satan/keymaps/admiralStrokers/keymap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/keyboards/satan/keymaps/admiralStrokers/keymap.c b/keyboards/satan/keymaps/admiralStrokers/keymap.c index 4bd49aaad..72a4c3dc9 100644 --- a/keyboards/satan/keymaps/admiralStrokers/keymap.c +++ b/keyboards/satan/keymaps/admiralStrokers/keymap.c @@ -1,6 +1,6 @@ #include "satan.h" static uint16_t key_timer; -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // general keydefs #define norm 0 // Default layer #define elev 1 // Layer directional keys @@ -114,6 +114,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #define DEAD KC_NO #define SCAN KC_TRNS // Scandinavian keys, the Row 5 key 5 is actually Row 1 key 15 on the PCB +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [ norm ] = KEYMAP( // Normal scandinavian mapping (danish has QUOT and SCLN wapped) GRAV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, MINS, EQUL, BSPC, DELE,\ DUTB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, LBRC, RBRC, DEAD,\ -- cgit v1.2.3 From 1b821eca663fb6cbe13ea1753f220bce5a7636a6 Mon Sep 17 00:00:00 2001 From: Ole Anders Date: Tue, 28 Mar 2017 16:55:25 +0200 Subject: removed varable trace option from makefile --- keyboards/satan/keymaps/admiralStrokers/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/keyboards/satan/keymaps/admiralStrokers/Makefile b/keyboards/satan/keymaps/admiralStrokers/Makefile index bb4072861..61dfedeb8 100644 --- a/keyboards/satan/keymaps/admiralStrokers/Makefile +++ b/keyboards/satan/keymaps/admiralStrokers/Makefile @@ -18,7 +18,6 @@ UCIS_ENABLE = no # Keep in mind that not all will work (See WinCompose for detai 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 -VARIABLE_TRACE = no # Use this to debug changes to variable values API_SYSEX_ENABLE = no # This enables using the Quantum SYSEX API to send strings ifndef QUANTUM_DIR include ../../../../Makefile -- cgit v1.2.3 From 256abc64d5daee6d7526d33455f6f28cc782dee1 Mon Sep 17 00:00:00 2001 From: Ole Anders Date: Tue, 28 Mar 2017 17:08:01 +0200 Subject: fixed function to not accept any arguments. As per Pramod's comment on stack overflow: In C int foo() and int foo(void) are different functions. int foo() accepts an arbitrary number of arguments, while int foo(void) accepts 0 arguments. In C++ they mean the same thing. I suggest that you use void consistently when you mean no arguments. --- keyboards/satan/keymaps/admiralStrokers/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/satan/keymaps/admiralStrokers/keymap.c b/keyboards/satan/keymaps/admiralStrokers/keymap.c index 72a4c3dc9..7a8459eb5 100644 --- a/keyboards/satan/keymaps/admiralStrokers/keymap.c +++ b/keyboards/satan/keymaps/admiralStrokers/keymap.c @@ -146,7 +146,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function - bool checkTime(){ + bool checkTime(void){ return (timer_elapsed(key_timer) < 150) ? true : false; } -- cgit v1.2.3 From f504082f7f4f2fe078cb1863b43d7ef0dc0c5c53 Mon Sep 17 00:00:00 2001 From: Ole Anders Date: Tue, 28 Mar 2017 17:17:08 +0200 Subject: declaring checktime before the function it is used in. --- keyboards/satan/keymaps/admiralStrokers/keymap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/keyboards/satan/keymaps/admiralStrokers/keymap.c b/keyboards/satan/keymaps/admiralStrokers/keymap.c index 7a8459eb5..b5fd2ec60 100644 --- a/keyboards/satan/keymaps/admiralStrokers/keymap.c +++ b/keyboards/satan/keymaps/admiralStrokers/keymap.c @@ -1,5 +1,6 @@ #include "satan.h" static uint16_t key_timer; +bool checkTime(void); // general keydefs #define norm 0 // Default layer -- cgit v1.2.3 From 411cd4fae27693324ca51eb5bf07ecebbc074c01 Mon Sep 17 00:00:00 2001 From: Ole Anders Date: Tue, 28 Mar 2017 17:30:15 +0200 Subject: moved checktime out of function --- keyboards/satan/keymaps/admiralStrokers/keymap.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/keyboards/satan/keymaps/admiralStrokers/keymap.c b/keyboards/satan/keymaps/admiralStrokers/keymap.c index b5fd2ec60..422a801ba 100644 --- a/keyboards/satan/keymaps/admiralStrokers/keymap.c +++ b/keyboards/satan/keymaps/admiralStrokers/keymap.c @@ -1,6 +1,8 @@ #include "satan.h" static uint16_t key_timer; -bool checkTime(void); +bool checkTime(void){ + return (timer_elapsed(key_timer) < 150) ? true : false; + } // general keydefs #define norm 0 // Default layer @@ -147,11 +149,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function - bool checkTime(void){ - return (timer_elapsed(key_timer) < 150) ? true : false; - } - - switch(id) { case 0: //MAC0 - Hold for lshift and { on tap if (record->event.pressed) { -- cgit v1.2.3 From 85cac3952965b37317d42bf7b3e5cf3a9e4ebdae Mon Sep 17 00:00:00 2001 From: Ole Anders Date: Tue, 28 Mar 2017 18:41:04 +0200 Subject: fixed capitalization issue (checkTime => checktime) --- keyboards/satan/keymaps/admiralStrokers/keymap.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/keyboards/satan/keymaps/admiralStrokers/keymap.c b/keyboards/satan/keymaps/admiralStrokers/keymap.c index 422a801ba..7b83ed7b0 100644 --- a/keyboards/satan/keymaps/admiralStrokers/keymap.c +++ b/keyboards/satan/keymaps/admiralStrokers/keymap.c @@ -1,6 +1,8 @@ #include "satan.h" + static uint16_t key_timer; -bool checkTime(void){ + +bool checktime(void){ return (timer_elapsed(key_timer) < 150) ? true : false; } @@ -147,7 +149,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX), }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {3 // MACRODOWN only works in this function switch(id) { case 0: //MAC0 - Hold for lshift and { on tap -- cgit v1.2.3 From 6de7e5d8dce42b56a0424da98408f3cf8f27cfa1 Mon Sep 17 00:00:00 2001 From: Ole Anders Date: Tue, 28 Mar 2017 18:45:26 +0200 Subject: typo removed {3 ... --- keyboards/satan/keymaps/admiralStrokers/keymap.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/keyboards/satan/keymaps/admiralStrokers/keymap.c b/keyboards/satan/keymaps/admiralStrokers/keymap.c index 7b83ed7b0..b6dc29c67 100644 --- a/keyboards/satan/keymaps/admiralStrokers/keymap.c +++ b/keyboards/satan/keymaps/admiralStrokers/keymap.c @@ -4,7 +4,7 @@ static uint16_t key_timer; bool checktime(void){ return (timer_elapsed(key_timer) < 150) ? true : false; - } + }; // general keydefs #define norm 0 // Default layer @@ -149,8 +149,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX), }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {3 // MACRODOWN only works in this function - +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function switch(id) { case 0: //MAC0 - Hold for lshift and { on tap if (record->event.pressed) { -- cgit v1.2.3 From 23839b8c6d2f955e4da89b0981948c721346c528 Mon Sep 17 00:00:00 2001 From: skullydazed Date: Tue, 28 Mar 2017 15:20:36 -0700 Subject: Clarify the quantum license (#1042) * Clarify the license for files we have signoff on * Update against the currently signed off files * Remove unused and not clearly licensed headers * Replace an #endif I accidentally removed while resolving merge conflicts --- doc/COPYING.GPLv2 | 339 ----------- doc/COPYING.GPLv3 | 674 --------------------- license_GPLv2.md | 264 ++++++++ license_GPLv3.md | 656 ++++++++++++++++++++ license_Modified_BSD.md | 32 + quantum/analog.c | 16 + quantum/analog.h | 16 + quantum/api.c | 18 +- quantum/api.h | 18 +- quantum/api/api_sysex.c | 15 + quantum/api/api_sysex.h | 18 +- quantum/audio/audio.c | 15 + quantum/audio/audio.h | 17 +- quantum/audio/audio_pwm.c | 15 + quantum/audio/luts.c | 16 + quantum/audio/luts.h | 18 +- quantum/audio/musical_notes.h | 18 +- quantum/audio/song_list.h | 15 + quantum/audio/voices.c | 15 + quantum/audio/voices.h | 17 +- quantum/audio/wave.h | 18 +- quantum/config_common.h | 16 + quantum/dynamic_macro.h | 16 + quantum/keycode_config.c | 18 +- quantum/keycode_config.h | 16 + quantum/keymap.h | 2 +- quantum/keymap_common.c | 2 +- quantum/keymap_extras/keymap_bepo.h | 15 + .../keymap_extras/keymap_canadian_multilingual.h | 15 + quantum/keymap_extras/keymap_colemak.h | 15 + quantum/keymap_extras/keymap_dvorak.h | 15 + quantum/keymap_extras/keymap_dvp.h | 16 + quantum/keymap_extras/keymap_fr_ch.h | 15 + quantum/keymap_extras/keymap_french.h | 15 + quantum/keymap_extras/keymap_french_osx.h | 17 +- quantum/keymap_extras/keymap_german.h | 16 + quantum/keymap_extras/keymap_german_ch.h | 15 + quantum/keymap_extras/keymap_german_osx.h | 15 + quantum/keymap_extras/keymap_jp.h | 17 +- quantum/keymap_extras/keymap_neo2.h | 15 + quantum/keymap_extras/keymap_nordic.h | 15 + quantum/keymap_extras/keymap_norwegian.h | 15 + quantum/keymap_extras/keymap_plover.h | 15 + quantum/keymap_extras/keymap_russian.h | 77 --- quantum/keymap_extras/keymap_spanish.h | 15 + quantum/keymap_extras/keymap_uk.h | 15 + quantum/keymap_extras/keymap_unicode_cyrillic.h | 163 ----- quantum/light_ws2812.c | 13 +- quantum/light_ws2812.h | 14 +- quantum/matrix.c | 3 +- quantum/pincontrol.h | 15 + quantum/process_keycode/process_chording.c | 18 +- quantum/process_keycode/process_chording.h | 18 +- quantum/process_keycode/process_combo.c | 16 + quantum/process_keycode/process_combo.h | 16 + quantum/process_keycode/process_leader.c | 18 +- quantum/process_keycode/process_leader.h | 18 +- quantum/process_keycode/process_midi.c | 15 + quantum/process_keycode/process_midi.h | 18 +- quantum/process_keycode/process_music.c | 15 + quantum/process_keycode/process_music.h | 18 +- quantum/process_keycode/process_printer.c | 18 +- quantum/process_keycode/process_printer.h | 18 +- quantum/process_keycode/process_printer_bb.c | 18 +- quantum/process_keycode/process_tap_dance.c | 15 + quantum/process_keycode/process_tap_dance.h | 15 + quantum/process_keycode/process_ucis.c | 18 +- quantum/process_keycode/process_ucis.h | 16 + quantum/process_keycode/process_unicode.c | 15 + quantum/process_keycode/process_unicode.h | 15 + quantum/process_keycode/process_unicode_common.c | 18 +- quantum/process_keycode/process_unicode_common.h | 18 +- quantum/process_keycode/process_unicodemap.c | 18 +- quantum/process_keycode/process_unicodemap.h | 18 +- quantum/quantum.c | 16 + quantum/quantum.h | 15 + quantum/quantum_keycodes.h | 15 + quantum/rgblight.c | 15 + quantum/rgblight.h | 15 + quantum/serial_link/LICENSE | 2 - quantum/template/Makefile | 17 +- quantum/template/config.h | 2 +- quantum/template/keymaps/default/Makefile | 20 +- quantum/template/keymaps/default/config.h | 18 +- quantum/template/keymaps/default/keymap.c | 17 +- quantum/template/template.c | 15 + quantum/template/template.h | 15 + quantum/variable_trace.c | 16 + quantum/variable_trace.h | 16 + 89 files changed, 2172 insertions(+), 1293 deletions(-) delete mode 100644 doc/COPYING.GPLv2 delete mode 100644 doc/COPYING.GPLv3 create mode 100644 license_GPLv2.md create mode 100644 license_GPLv3.md create mode 100644 license_Modified_BSD.md delete mode 100644 quantum/keymap_extras/keymap_russian.h delete mode 100644 quantum/keymap_extras/keymap_unicode_cyrillic.h diff --git a/doc/COPYING.GPLv2 b/doc/COPYING.GPLv2 deleted file mode 100644 index d159169d1..000000000 --- a/doc/COPYING.GPLv2 +++ /dev/null @@ -1,339 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - 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, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/doc/COPYING.GPLv3 b/doc/COPYING.GPLv3 deleted file mode 100644 index 94a9ed024..000000000 --- a/doc/COPYING.GPLv3 +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/license_GPLv2.md b/license_GPLv2.md new file mode 100644 index 000000000..b017086e9 --- /dev/null +++ b/license_GPLv2.md @@ -0,0 +1,264 @@ +The GNU General Public License, Version 2, June 1991 (GPLv2) +============================================================ + +> Copyright (C) 1989, 1991 Free Software Foundation, Inc. +> 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + + +Preamble +-------- + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to most +of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you can +do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for a +fee, you must give the recipients all the rights that you have. You must make +sure that they, too, receive or can get the source code. And you must show them +these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) offer +you this license which gives you legal permission to copy, distribute and/or +modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced by +others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We wish +to avoid the danger that redistributors of a free program will individually +obtain patent licenses, in effect making the program proprietary. To prevent +this, we have made it clear that any patent must be licensed for everyone's free +use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + + +Terms And Conditions For Copying, Distribution And Modification +--------------------------------------------------------------- + +**0.** This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program or +work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included without +limitation in the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is not +restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +**1.** You may copy and distribute verbatim copies of the Program's source code +as you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the Program +a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may at +your option offer warranty protection in exchange for a fee. + +**2.** You may modify your copy or copies of the Program or any portion of it, +thus forming a work based on the Program, and copy and distribute such +modifications or work under the terms of Section 1 above, provided that you also +meet all of these conditions: + +* **a)** You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + +* **b)** You must cause any work that you distribute or publish, that in whole + or in part contains or is derived from the Program or any part thereof, to + be licensed as a whole at no charge to all third parties under the terms of + this License. + +* **c)** If the modified program normally reads commands interactively when + run, you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the entire whole, +and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on the +Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +**3.** You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and 2 +above provided that you also do one of the following: + +* **a)** Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above on + a medium customarily used for software interchange; or, + +* **b)** Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + +* **c)** Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only for + noncommercial distribution and only if you received the program in object + code or executable form with such an offer, in accord with Subsection b + above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all the +source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code distributed +need not include anything that is normally distributed (in either source or +binary form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component itself +accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source code +from the same place counts as distribution of the source code, even though third +parties are not compelled to copy the source along with the object code. + +**4.** You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +**5.** You are not required to accept this License, since you have not signed +it. However, nothing else grants you permission to modify or distribute the +Program or its derivative works. These actions are prohibited by law if you do +not accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +**6.** Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the original +licensor to copy, distribute or modify the Program subject to these terms and +conditions. You may not impose any further restrictions on the recipients' +exercise of the rights granted herein. You are not responsible for enforcing +compliance by third parties to this License. + +**7.** If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution of +the Program by all those who receive copies directly or indirectly through you, +then the only way you could satisfy both it and this License would be to refrain +entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and the +section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +**8.** If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original copyright +holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In such +case, this License incorporates the limitation as if written in the body of this +License. + +**9.** The Free Software Foundation may publish revised and/or new versions of +the General Public License from time to time. Such new versions will be similar +in spirit to the present version, but may differ in detail to address new +problems or concerns. + +Each version is given a distinguishing version number. If the Program specifies +a version number of this License which applies to it and "any later version", +you have the option of following the terms and conditions either of that version +or of any later version published by the Free Software Foundation. If the +Program does not specify a version number of this License, you may choose any +version ever published by the Free Software Foundation. + +**10.** If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + + +No Warranty +----------- + +**11.** BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM +"AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +**12.** IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. diff --git a/license_GPLv3.md b/license_GPLv3.md new file mode 100644 index 000000000..2061be2b7 --- /dev/null +++ b/license_GPLv3.md @@ -0,0 +1,656 @@ +The GNU General Public License, Version 3, 29 June 2007 (GPLv3) +=============================================================== + +> Copyright © 2007 +> Free Software Foundation, Inc. +> <> + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + + +Preamble +-------- + +The GNU General Public License is a free, copyleft license for software and +other kinds of works. + +The licenses for most software and other practical works are designed to take +away your freedom to share and change the works. By contrast, the GNU General +Public License is intended to guarantee your freedom to share and change all +versions of a program--to make sure it remains free software for all its users. +We, the Free Software Foundation, use the GNU General Public License for most of +our software; it applies also to any other work released this way by its +authors. You can apply it to your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for them if you wish), that you +receive source code or can get it if you want it, that you can change the +software or use pieces of it in new free programs, and that you know you can do +these things. + +To protect your rights, we need to prevent others from denying you these rights +or asking you to surrender the rights. Therefore, you have certain +responsibilities if you distribute copies of the software, or if you modify it: +responsibilities to respect the freedom of others. + +For example, if you distribute copies of such a program, whether gratis or for a +fee, you must pass on to the recipients the same freedoms that you received. You +must make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +Developers that use the GNU GPL protect your rights with two steps: (1) assert +copyright on the software, and (2) offer you this License giving you legal +permission to copy, distribute and/or modify it. + +For the developers' and authors' protection, the GPL clearly explains that there +is no warranty for this free software. For both users' and authors' sake, the +GPL requires that modified versions be marked as changed, so that their problems +will not be attributed erroneously to authors of previous versions. + +Some devices are designed to deny users access to install or run modified +versions of the software inside them, although the manufacturer can do so. This +is fundamentally incompatible with the aim of protecting users' freedom to +change the software. The systematic pattern of such abuse occurs in the area of +products for individuals to use, which is precisely where it is most +unacceptable. Therefore, we have designed this version of the GPL to prohibit +the practice for those products. If such problems arise substantially in other +domains, we stand ready to extend this provision to those domains in future +versions of the GPL, as needed to protect the freedom of users. + +Finally, every program is threatened constantly by software patents. States +should not allow patents to restrict development and use of software on +general-purpose computers, but in those that do, we wish to avoid the special +danger that patents applied to a free program could make it effectively +proprietary. To prevent this, the GPL assures that patents cannot be used to +render the program non-free. + +The precise terms and conditions for copying, distribution and modification +follow. + + +TERMS AND CONDITIONS +-------------------- + + +### 0. Definitions. + +"This License refers to version 3 of the GNU General Public License. + +"Copyright" also means copyright-like laws that apply to other kinds of works, +such as semiconductor masks. + +"The Program" refers to any copyrightable work licensed under this License. Each +licensee is addressed as "you". "Licensees" and "recipients" may be individuals +or organizations. + +To "modify" a work means to copy from or adapt all or part of the work in a +fashion requiring copyright permission, other than the making of an exact copy. +The resulting work is called a "modified version" of the earlier work or a work +"based on" the earlier work. + +A "covered work" means either the unmodified Program or a work based on the +Program. + +To "propagate" a work means to do anything with it that, without permission, +would make you directly or secondarily liable for infringement under applicable +copyright law, except executing it on a computer or modifying a private copy. +Propagation includes copying, distribution (with or without modification), +making available to the public, and in some countries other activities as well. + +To "convey" a work means any kind of propagation that enables other parties to +make or receive copies. Mere interaction with a user through a computer network, +with no transfer of a copy, is not conveying. + +An interactive user interface displays "Appropriate Legal Notices" to the extent +that it includes a convenient and prominently visible feature that (1) displays +an appropriate copyright notice, and (2) tells the user that there is no +warranty for the work (except to the extent that warranties are provided), that +licensees may convey the work under this License, and how to view a copy of this +License. If the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + +### 1. Source Code. + +The "source code" for a work means the preferred form of the work for making +modifications to it. "Object code" means any non-source form of a work. + +A "Standard Interface" means an interface that either is an official standard +defined by a recognized standards body, or, in the case of interfaces specified +for a particular programming language, one that is widely used among developers +working in that language. + +The "System Libraries" of an executable work include anything, other than the +work as a whole, that (a) is included in the normal form of packaging a Major +Component, but which is not part of that Major Component, and (b) serves only to +enable use of the work with that Major Component, or to implement a Standard +Interface for which an implementation is available to the public in source code +form. A "Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system (if any) on +which the executable work runs, or a compiler used to produce the work, or an +object code interpreter used to run it. + +The "Corresponding Source" for a work in object code form means all the source +code needed to generate, install, and (for an executable work) run the object +code and to modify the work, including scripts to control those activities. +However, it does not include the work's System Libraries, or general-purpose +tools or generally available free programs which are used unmodified in +performing those activities but which are not part of the work. For example, +Corresponding Source includes interface definition files associated with source +files for the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, such as by +intimate data communication or control flow between those subprograms and other +parts of the work. + +The Corresponding Source need not include anything that users can regenerate +automatically from other parts of the Corresponding Source. + +The Corresponding Source for a work in source code form is that same work. + + +### 2. Basic Permissions. + +All rights granted under this License are granted for the term of copyright on +the Program, and are irrevocable provided the stated conditions are met. This +License explicitly affirms your unlimited permission to run the unmodified +Program. The output from running a covered work is covered by this License only +if the output, given its content, constitutes a covered work. This License +acknowledges your rights of fair use or other equivalent, as provided by +copyright law. + +You may make, run and propagate covered works that you do not convey, without +conditions so long as your license otherwise remains in force. You may convey +covered works to others for the sole purpose of having them make modifications +exclusively for you, or provide you with facilities for running those works, +provided that you comply with the terms of this License in conveying all +material for which you do not control copyright. Those thus making or running +the covered works for you must do so exclusively on your behalf, under your +direction and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + +Conveying under any other circumstances is permitted solely under the conditions +stated below. Sublicensing is not allowed; section 10 makes it unnecessary. + + +### 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + +No covered work shall be deemed part of an effective technological measure under +any applicable law fulfilling obligations under article 11 of the WIPO copyright +treaty adopted on 20 December 1996, or similar laws prohibiting or restricting +circumvention of such measures. + +When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention is +effected by exercising rights under this License with respect to the covered +work, and you disclaim any intention to limit operation or modification of the +work as a means of enforcing, against the work's users, your or third parties' +legal rights to forbid circumvention of technological measures. + + +### 4. Conveying Verbatim Copies. + +You may convey verbatim copies of the Program's source code as you receive it, +in any medium, provided that you conspicuously and appropriately publish on each +copy an appropriate copyright notice; keep intact all notices stating that this +License and any non-permissive terms added in accord with section 7 apply to the +code; keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + +You may charge any price or no price for each copy that you convey, and you may +offer support or warranty protection for a fee. + + +### 5. Conveying Modified Source Versions. + +You may convey a work based on the Program, or the modifications to produce it +from the Program, in the form of source code under the terms of section 4, +provided that you also meet all of these conditions: + +* **a)** The work must carry prominent notices stating that you modified it, + and giving a relevant date. + +* **b)** The work must carry prominent notices stating that it is released + under this License and any conditions added under section 7. This + requirement modifies the requirement in section 4 to "keep intact all + notices". + +* **c)** You must license the entire work, as a whole, under this License to + anyone who comes into possession of a copy. This License will therefore + apply, along with any applicable section 7 additional terms, to the whole of + the work, and all its parts, regardless of how they are packaged. This + License gives no permission to license the work in any other way, but it + does not invalidate such permission if you have separately received it. + +* **d)** If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your work need not + make them do so. + +A compilation of a covered work with other separate and independent works, +which are not by their nature extensions of the covered work, and which are +not combined with it such as to form a larger program, in or on a volume of +a storage or distribution medium, is called an "aggregate" if the +compilation and its resulting copyright are not used to limit the access or +legal rights of the compilation's users beyond what the individual works +permit. Inclusion of a covered work in an aggregate does not cause this +License to apply to the other parts of the aggregate. + + +### 6. Conveying Non-Source Forms. + +You may convey a covered work in object code form under the terms of sections 4 +and 5, provided that you also convey the machine-readable Corresponding Source +under the terms of this License, in one of these ways: + +* **a)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the Corresponding + Source fixed on a durable physical medium customarily used for software + interchange. + +* **b)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a written offer, + valid for at least three years and valid for as long as you offer spare + parts or customer support for that product model, to give anyone who + possesses the object code either (1) a copy of the Corresponding Source for + all the software in the product that is covered by this License, on a + durable physical medium customarily used for software interchange, for a + price no more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the Corresponding Source from a + network server at no charge. + +* **c)** Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This alternative is + allowed only occasionally and noncommercially, and only if you received the + object code with such an offer, in accord with subsection 6b. + +* **d)** Convey the object code by offering access from a designated place + (gratis or for a charge), and offer equivalent access to the Corresponding + Source in the same way through the same place at no further charge. You need + not require recipients to copy the Corresponding Source along with the + object code. If the place to copy the object code is a network server, the + Corresponding Source may be on a different server (operated by you or a + third party) that supports equivalent copying facilities, provided you + maintain clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the Corresponding + Source, you remain obligated to ensure that it is available for as long as + needed to satisfy these requirements. + +* **e)** Convey the object code using peer-to-peer transmission, provided you + inform other peers where the object code and Corresponding Source of the + work are being offered to the general public at no charge under subsection + 6d. + +A separable portion of the object code, whose source code is excluded from +the Corresponding Source as a System Library, need not be included in +conveying the object code work. + +A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, or +household purposes, or (2) anything designed or sold for incorporation into +a dwelling. In determining whether a product is a consumer product, doubtful +cases shall be resolved in favor of coverage. For a particular product +received by a particular user, "normally used" refers to a typical or common +use of that class of product, regardless of the status of the particular +user or of the way in which the particular user actually uses, or expects or +is expected to use, the product. A product is a consumer product regardless +of whether the product has substantial commercial, industrial or non- +consumer uses, unless such uses represent the only significant mode of use +of the product. + +"Installation Information" for a User Product means any methods, procedures, +authorization keys, or other information required to install and execute +modified versions of a covered work in that User Product from a modified +version of its Corresponding Source. The information must suffice to ensure +that the continued functioning of the modified object code is in no case +prevented or interfered with solely because modification has been made. + +If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as part of +a transaction in which the right of possession and use of the User Product +is transferred to the recipient in perpetuity or for a fixed term +(regardless of how the transaction is characterized), the Corresponding +Source conveyed under this section must be accompanied by the Installation +Information. But this requirement does not apply if neither you nor any +third party retains the ability to install modified object code on the User +Product (for example, the work has been installed in ROM). + +The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates for +a work that has been modified or installed by the recipient, or for the User +Product in which it has been modified or installed. Access to a network may +be denied when the modification itself materially and adversely affects the +operation of the network or violates the rules and protocols for +communication across the network. + +Corresponding Source conveyed, and Installation Information provided, in +accord with this section must be in a format that is publicly documented +(and with an implementation available to the public in source code form), +and must require no special password or key for unpacking, reading or +copying. + + +### 7. Additional Terms. + +"Additional permissions" are terms that supplement the terms of this License by +making exceptions from one or more of its conditions. Additional permissions +that are applicable to the entire Program shall be treated as though they were +included in this License, to the extent that they are valid under applicable +law. If additional permissions apply only to part of the Program, that part may +be used separately under those permissions, but the entire Program remains +governed by this License without regard to the additional permissions. + +When you convey a copy of a covered work, you may at your option remove any +additional permissions from that copy, or from any part of it. (Additional +permissions may be written to require their own removal in certain cases when +you modify the work.) You may place additional permissions on material, added by +you to a covered work, for which you have or can give appropriate copyright +permission. + +Notwithstanding any other provision of this License, for material you add to a +covered work, you may (if authorized by the copyright holders of that material) +supplement the terms of this License with terms: + +* **a)** Disclaiming warranty or limiting liability differently from the terms + of sections 15 and 16 of this License; or + +* **b)** Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal Notices + displayed by works containing it; or + +* **c)** Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in reasonable + ways as different from the original version; or + +* **d)** Limiting the use for publicity purposes of names of licensors or + authors of the material; or + +* **e)** Declining to grant rights under trademark law for use of some trade + names, trademarks, or service marks; or + +* **f)** Requiring indemnification of licensors and authors of that material + by anyone who conveys the material (or modified versions of it) with + contractual assumptions of liability to the recipient, for any liability + that these contractual assumptions directly impose on those licensors and + authors. + +All other non-permissive additional terms are considered "further restrictions" +within the meaning of section 10. If the Program as you received it, or any part +of it, contains a notice stating that it is governed by this License along with +a term that is a further restriction, you may remove that term. If a license +document contains a further restriction but permits relicensing or conveying +under this License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does not survive +such relicensing or conveying. + +If you add terms to a covered work in accord with this section, you must place, +in the relevant source files, a statement of the additional terms that apply to +those files, or a notice indicating where to find the applicable terms. + +Additional terms, permissive or non-permissive, may be stated in the form of a +separately written license, or stated as exceptions; the above requirements +apply either way. + + +### 8. Termination. + +You may not propagate or modify a covered work except as expressly provided +under this License. Any attempt otherwise to propagate or modify it is void, and +will automatically terminate your rights under this License (including any +patent licenses granted under the third paragraph of section 11). + +However, if you cease all violation of this License, then your license from a +particular copyright holder is reinstated (a) provisionally, unless and until +the copyright holder explicitly and finally terminates your license, and (b) +permanently, if the copyright holder fails to notify you of the violation by +some reasonable means prior to 60 days after the cessation. + +Moreover, your license from a particular copyright holder is reinstated +permanently if the copyright holder notifies you of the violation by some +reasonable means, this is the first time you have received notice of violation +of this License (for any work) from that copyright holder, and you cure the +violation prior to 30 days after your receipt of the notice. + +Termination of your rights under this section does not terminate the licenses of +parties who have received copies or rights from you under this License. If your +rights have been terminated and not permanently reinstated, you do not qualify +to receive new licenses for the same material under section 10. + + +### 9. Acceptance Not Required for Having Copies. + +You are not required to accept this License in order to receive or run a copy of +the Program. Ancillary propagation of a covered work occurring solely as a +consequence of using peer-to-peer transmission to receive a copy likewise does +not require acceptance. However, nothing other than this License grants you +permission to propagate or modify any covered work. These actions infringe +copyright if you do not accept this License. Therefore, by modifying or +propagating a covered work, you indicate your acceptance of this License to do +so. + + +### 10. Automatic Licensing of Downstream Recipients. + +Each time you convey a covered work, the recipient automatically receives a +license from the original licensors, to run, modify and propagate that work, +subject to this License. You are not responsible for enforcing compliance by +third parties with this License. + +An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered work results +from an entity transaction, each party to that transaction who receives a copy +of the work also receives whatever licenses to the work the party's predecessor +in interest had or could give under the previous paragraph, plus a right to +possession of the Corresponding Source of the work from the predecessor in +interest, if the predecessor has it or can get it with reasonable efforts. + +You may not impose any further restrictions on the exercise of the rights +granted or affirmed under this License. For example, you may not impose a +license fee, royalty, or other charge for exercise of rights granted under this +License, and you may not initiate litigation (including a cross-claim or +counterclaim in a lawsuit) alleging that any patent claim is infringed by +making, using, selling, offering for sale, or importing the Program or any +portion of it. + + +### 11. Patents. + +A "contributor" is a copyright holder who authorizes use under this License of +the Program or a work on which the Program is based. The work thus licensed is +called the contributor's "contributor version". + +A contributor's "essential patent claims" are all patent claims owned or +controlled by the contributor, whether already acquired or hereafter acquired, +that would be infringed by some manner, permitted by this License, of making, +using, or selling its contributor version, but do not include claims that would +be infringed only as a consequence of further modification of the contributor +version. For purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of this License. + +Each contributor grants you a non-exclusive, worldwide, royalty-free patent +license under the contributor's essential patent claims, to make, use, sell, +offer for sale, import and otherwise run, modify and propagate the contents of +its contributor version. + +In the following three paragraphs, a "patent license" is any express agreement +or commitment, however denominated, not to enforce a patent (such as an express +permission to practice a patent or covenant not to sue for patent infringement). +To "grant" such a patent license to a party means to make such an agreement or +commitment not to enforce a patent against the party. + +If you convey a covered work, knowingly relying on a patent license, and the +Corresponding Source of the work is not available for anyone to copy, free of +charge and under the terms of this License, through a publicly available network +server or other readily accessible means, then you must either (1) cause the +Corresponding Source to be so available, or (2) arrange to deprive yourself of +the benefit of the patent license for this particular work, or (3) arrange, in a +manner consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have actual +knowledge that, but for the patent license, your conveying the covered work in a +country, or your recipient's use of the covered work in a country, would +infringe one or more identifiable patents in that country that you have reason +to believe are valid. + +If, pursuant to or in connection with a single transaction or arrangement, you +convey, or propagate by procuring conveyance of, a covered work, and grant a +patent license to some of the parties receiving the covered work authorizing +them to use, propagate, modify or convey a specific copy of the covered work, +then the patent license you grant is automatically extended to all recipients of +the covered work and works based on it. + +A patent license is "discriminatory" if it does not include within the scope of +its coverage, prohibits the exercise of, or is conditioned on the non- exercise +of one or more of the rights that are specifically granted under this License. +You may not convey a covered work if you are a party to an arrangement with a +third party that is in the business of distributing software, under which you +make payment to the third party based on the extent of your activity of +conveying the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory patent +license (a) in connection with copies of the covered work conveyed by you (or +copies made from those copies), or (b) primarily for and in connection with +specific products or compilations that contain the covered work, unless you +entered into that arrangement, or that patent license was granted, prior to 28 +March 2007. + +Nothing in this License shall be construed as excluding or limiting any implied +license or other defenses to infringement that may otherwise be available to you +under applicable patent law. + + +### 12. No Surrender of Others' Freedom. + +If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not excuse +you from the conditions of this License. If you cannot convey a covered work so +as to satisfy simultaneously your obligations under this License and any other +pertinent obligations, then as a consequence you may not convey it at all. For +example, if you agree to terms that obligate you to collect a royalty for +further conveying from those to whom you convey the Program, the only way you +could satisfy both those terms and this License would be to refrain entirely +from conveying the Program. + + +### 13. Use with the GNU Affero General Public License. + +Notwithstanding any other provision of this License, you have permission to link +or combine any covered work with a work licensed under version 3 of the GNU +Affero General Public License into a single combined work, and to convey the +resulting work. The terms of this License will continue to apply to the part +which is the covered work, but the special requirements of the GNU Affero +General Public License, section 13, concerning interaction through a network +will apply to the combination as such. + + +### 14. Revised Versions of this License. + +The Free Software Foundation may publish revised and/or new versions of the GNU +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program specifies +that a certain numbered version of the GNU General Public License "or any later +version" applies to it, you have the option of following the terms and +conditions either of that numbered version or of any later version published by +the Free Software Foundation. If the Program does not specify a version number +of the GNU General Public License, you may choose any version ever published by +the Free Software Foundation. + +If the Program specifies that a proxy can decide which future versions of the +GNU General Public License can be used, that proxy's public statement of +acceptance of a version permanently authorizes you to choose that version for +the Program. + +Later license versions may give you additional or different permissions. +However, no additional obligations are imposed on any author or copyright holder +as a result of your choosing to follow a later version. + + +### 15. Disclaimer of Warranty. + +THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER +PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER +EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE +QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE +DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + +### 16. Limitation of Liability. + +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY +COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS +PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, +INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE +THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED +INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE +PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY +HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +### 17. Interpretation of Sections 15 and 16. + +If the disclaimer of warranty and limitation of liability provided above cannot +be given local legal effect according to their terms, reviewing courts shall +apply local law that most closely approximates an absolute waiver of all civil +liability in connection with the Program, unless a warranty or assumption of +liability accompanies a copy of the Program in return for a fee. + +END OF TERMS AND CONDITIONS + + +How to Apply These Terms to Your New Programs +--------------------------------------------- + +If you develop a new program, and you want it to be of the greatest possible use +to the public, the best way to achieve this is to make it free software which +everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively state the exclusion of +warranty; and each file should have at least the "copyright" line and a pointer +to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation, either version 3 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along with + this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + +If the program does terminal interaction, make it output a short notice like +this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'. + This is free software, and you are welcome to redistribute it under certain + conditions; type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, your program's commands might be +different; for a GUI interface, you would use an "about box". + +You should also get your employer (if you work as a programmer) or school, if +any, to sign a "copyright disclaimer" for the program, if necessary. For more +information on this, and how to apply and follow the GNU GPL, see +<>. + +The GNU General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may consider +it more useful to permit linking proprietary applications with the library. If +this is what you want to do, use the GNU Lesser General Public License instead +of this License. But first, please read +<>. diff --git a/license_Modified_BSD.md b/license_Modified_BSD.md new file mode 100644 index 000000000..3d5f00f2c --- /dev/null +++ b/license_Modified_BSD.md @@ -0,0 +1,32 @@ +This software is licensed with a Modified BSD License. + +All of this is supposed to be Free Software, Open Source, DFSG-free, +GPL-compatible, and OK to use in both free and proprietary applications. +Additions and corrections to this file are welcome. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + +* Neither the name of the copyright holders nor the names of + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. diff --git a/quantum/analog.c b/quantum/analog.c index 49b84ee0e..1ec38df75 100644 --- a/quantum/analog.c +++ b/quantum/analog.c @@ -1,3 +1,19 @@ +/* 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 . + */ + // Simple analog to digitial conversion #include diff --git a/quantum/analog.h b/quantum/analog.h index 9b95a93be..8d93de7dc 100644 --- a/quantum/analog.h +++ b/quantum/analog.h @@ -1,3 +1,19 @@ +/* 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 _analog_h_included__ #define _analog_h_included__ diff --git a/quantum/api.c b/quantum/api.c index 6a7c0a433..52dfe23e1 100644 --- a/quantum/api.c +++ b/quantum/api.c @@ -1,3 +1,19 @@ +/* Copyright 2016 Jack Humbert + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #include "api.h" #include "quantum.h" @@ -176,4 +192,4 @@ void process_api(uint16_t length, uint8_t * data) { // #endif } -} \ No newline at end of file +} diff --git a/quantum/api.h b/quantum/api.h index 00dcdb895..efc0ddca1 100644 --- a/quantum/api.h +++ b/quantum/api.h @@ -1,3 +1,19 @@ +/* Copyright 2016 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 _API_H_ #define _API_H_ @@ -56,4 +72,4 @@ bool process_api_keyboard(uint8_t length, uint8_t * data); __attribute__ ((weak)) bool process_api_user(uint8_t length, uint8_t * data); -#endif \ No newline at end of file +#endif diff --git a/quantum/api/api_sysex.c b/quantum/api/api_sysex.c index 868f854b9..6a2ee9012 100644 --- a/quantum/api/api_sysex.c +++ b/quantum/api/api_sysex.c @@ -1,3 +1,18 @@ +/* Copyright 2016 Jack Humbert, Fred Sundvik + * + * 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 "api_sysex.h" #include "sysex_tools.h" #include "print.h" diff --git a/quantum/api/api_sysex.h b/quantum/api/api_sysex.h index b947b60e5..a23f00f57 100644 --- a/quantum/api/api_sysex.h +++ b/quantum/api/api_sysex.h @@ -1,3 +1,19 @@ +/* Copyright 2016 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 _API_SYSEX_H_ #define _API_SYSEX_H_ @@ -7,4 +23,4 @@ void send_bytes_sysex(uint8_t message_type, uint8_t data_type, uint8_t * bytes, #define SEND_BYTES(mt, dt, b, l) send_bytes_sysex(mt, dt, b, l) -#endif \ No newline at end of file +#endif diff --git a/quantum/audio/audio.c b/quantum/audio/audio.c index e1e81fd2b..597073611 100644 --- a/quantum/audio/audio.c +++ b/quantum/audio/audio.c @@ -1,3 +1,18 @@ +/* Copyright 2016 Jack Humbert + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ #include #include //#include diff --git a/quantum/audio/audio.h b/quantum/audio/audio.h index 47f326ea0..27fdc2ab6 100644 --- a/quantum/audio/audio.h +++ b/quantum/audio/audio.h @@ -1,3 +1,18 @@ +/* Copyright 2016 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 AUDIO_H #define AUDIO_H @@ -88,4 +103,4 @@ void play_notes(float (*np)[][2], uint16_t n_count, bool n_repeat, float n_rest) bool is_playing_notes(void); -#endif \ No newline at end of file +#endif diff --git a/quantum/audio/audio_pwm.c b/quantum/audio/audio_pwm.c index f820eec1b..ded86edee 100644 --- a/quantum/audio/audio_pwm.c +++ b/quantum/audio/audio_pwm.c @@ -1,3 +1,18 @@ +/* Copyright 2016 Jack Humbert + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ #include #include //#include diff --git a/quantum/audio/luts.c b/quantum/audio/luts.c index 9f3de9a05..57f2d5924 100644 --- a/quantum/audio/luts.c +++ b/quantum/audio/luts.c @@ -1,3 +1,19 @@ +/* Copyright 2016 IBNobody + * + * 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 #include #include diff --git a/quantum/audio/luts.h b/quantum/audio/luts.h index 7df3078a7..155e34e88 100644 --- a/quantum/audio/luts.h +++ b/quantum/audio/luts.h @@ -1,3 +1,19 @@ +/* Copyright 2016 IBNobody + * + * 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 #include #include @@ -12,4 +28,4 @@ extern const float vibrato_lut[VIBRATO_LUT_LENGTH]; extern const uint16_t frequency_lut[FREQUENCY_LUT_LENGTH]; -#endif /* LUTS_H */ \ No newline at end of file +#endif /* LUTS_H */ diff --git a/quantum/audio/musical_notes.h b/quantum/audio/musical_notes.h index b08d16a6f..a3aaa2f19 100644 --- a/quantum/audio/musical_notes.h +++ b/quantum/audio/musical_notes.h @@ -1,3 +1,19 @@ +/* Copyright 2016 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 MUSICAL_NOTES_H #define MUSICAL_NOTES_H @@ -214,4 +230,4 @@ #define NOTE_BF8 NOTE_AS8 -#endif \ No newline at end of file +#endif diff --git a/quantum/audio/song_list.h b/quantum/audio/song_list.h index 400915db9..3bf20333d 100644 --- a/quantum/audio/song_list.h +++ b/quantum/audio/song_list.h @@ -1,3 +1,18 @@ +/* Copyright 2016 Jack Humbert + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ #include "musical_notes.h" #ifndef SONG_LIST_H diff --git a/quantum/audio/voices.c b/quantum/audio/voices.c index c2edb75f0..54ebd423b 100644 --- a/quantum/audio/voices.c +++ b/quantum/audio/voices.c @@ -1,3 +1,18 @@ +/* Copyright 2016 Jack Humbert + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ #include "voices.h" #include "audio.h" #include "stdlib.h" diff --git a/quantum/audio/voices.h b/quantum/audio/voices.h index 52f7e006d..9403a6b5e 100644 --- a/quantum/audio/voices.h +++ b/quantum/audio/voices.h @@ -1,3 +1,18 @@ +/* Copyright 2016 Jack Humbert + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ #include #include #include @@ -32,4 +47,4 @@ void set_voice(voice_type v); void voice_iterate(void); void voice_deiterate(void); -#endif \ No newline at end of file +#endif diff --git a/quantum/audio/wave.h b/quantum/audio/wave.h index 6ebc34851..f15615dd1 100644 --- a/quantum/audio/wave.h +++ b/quantum/audio/wave.h @@ -1,3 +1,19 @@ +/* Copyright 2016 Jack Humbert + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #include #include #include @@ -262,4 +278,4 @@ const uint8_t sinewave[] PROGMEM= //2048 values 0x76,0x77,0x77,0x77,0x78,0x78,0x78,0x79, 0x79,0x7a,0x7a,0x7a,0x7b,0x7b,0x7c,0x7c, 0x7c,0x7d,0x7d,0x7e,0x7e,0x7e,0x7f,0x7f -}; \ No newline at end of file +}; diff --git a/quantum/config_common.h b/quantum/config_common.h index 28f68b9c7..c88e02d91 100644 --- a/quantum/config_common.h +++ b/quantum/config_common.h @@ -1,3 +1,19 @@ +/* Copyright 2015-2017 Jack Humbert + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #ifndef CONFIG_DEFINITIONS_H #define CONFIG_DEFINITIONS_H diff --git a/quantum/dynamic_macro.h b/quantum/dynamic_macro.h index e6dbc5b9c..64093f293 100644 --- a/quantum/dynamic_macro.h +++ b/quantum/dynamic_macro.h @@ -1,3 +1,19 @@ +/* Copyright 2016 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 . + */ + /* Author: Wojciech Siewierski < wojciech dot siewierski at onet dot pl > */ #ifndef DYNAMIC_MACROS_H #define DYNAMIC_MACROS_H diff --git a/quantum/keycode_config.c b/quantum/keycode_config.c index 6d90781a1..4f7bc525e 100644 --- a/quantum/keycode_config.c +++ b/quantum/keycode_config.c @@ -1,3 +1,19 @@ +/* Copyright 2016 Jack Humbert + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #include "keycode_config.h" extern keymap_config_t keymap_config; @@ -71,4 +87,4 @@ uint16_t keycode_config(uint16_t keycode) { default: return keycode; } -} \ No newline at end of file +} diff --git a/quantum/keycode_config.h b/quantum/keycode_config.h index c15b0d32f..293fefecf 100644 --- a/quantum/keycode_config.h +++ b/quantum/keycode_config.h @@ -1,3 +1,19 @@ +/* Copyright 2016 Jack Humbert + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #include "eeconfig.h" #include "keycode.h" diff --git a/quantum/keymap.h b/quantum/keymap.h index c000d2da8..5d64be19c 100644 --- a/quantum/keymap.h +++ b/quantum/keymap.h @@ -1,5 +1,5 @@ /* -Copyright 2012,2013 Jun Wako +Copyright 2012-2016 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 diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index 002eabd85..6cf4f031f 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c @@ -1,5 +1,5 @@ /* -Copyright 2012,2013 Jun Wako +Copyright 2012-2017 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 diff --git a/quantum/keymap_extras/keymap_bepo.h b/quantum/keymap_extras/keymap_bepo.h index e5ef39552..013559e96 100644 --- a/quantum/keymap_extras/keymap_bepo.h +++ b/quantum/keymap_extras/keymap_bepo.h @@ -1,3 +1,18 @@ +/* Copyright 2016 Didier Loiseau + * + * 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 . + */ /* Keymap macros for the French BÉPO layout - http://bepo.fr */ #ifndef KEYMAP_BEPO_H #define KEYMAP_BEPO_H diff --git a/quantum/keymap_extras/keymap_canadian_multilingual.h b/quantum/keymap_extras/keymap_canadian_multilingual.h index 0bc20c7b9..1d45bee32 100644 --- a/quantum/keymap_extras/keymap_canadian_multilingual.h +++ b/quantum/keymap_extras/keymap_canadian_multilingual.h @@ -1,3 +1,18 @@ +/* Copyright 2016 Didier Loiseau + * + * 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 KEYMAP_CANADIAN_MULTILINGUAG_H #define KEYMAP_CANADIAN_MULTILINGUAG_H diff --git a/quantum/keymap_extras/keymap_colemak.h b/quantum/keymap_extras/keymap_colemak.h index b8d615748..2d3f9c06a 100644 --- a/quantum/keymap_extras/keymap_colemak.h +++ b/quantum/keymap_extras/keymap_colemak.h @@ -1,3 +1,18 @@ +/* Copyright 2015-2016 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 KEYMAP_COLEMAK_H #define KEYMAP_COLEMAK_H diff --git a/quantum/keymap_extras/keymap_dvorak.h b/quantum/keymap_extras/keymap_dvorak.h index a0feed850..b1d5604ba 100644 --- a/quantum/keymap_extras/keymap_dvorak.h +++ b/quantum/keymap_extras/keymap_dvorak.h @@ -1,3 +1,18 @@ +/* Copyright 2015-2016 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 KEYMAP_DVORAK_H #define KEYMAP_DVORAK_H diff --git a/quantum/keymap_extras/keymap_dvp.h b/quantum/keymap_extras/keymap_dvp.h index 83f49a52b..50e2d1f46 100644 --- a/quantum/keymap_extras/keymap_dvp.h +++ b/quantum/keymap_extras/keymap_dvp.h @@ -1,3 +1,19 @@ +/* Copyright 2016 Artyom Mironov + * + * 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 KEYMAP_DVP_H #define KEYMAP_DVP_H diff --git a/quantum/keymap_extras/keymap_fr_ch.h b/quantum/keymap_extras/keymap_fr_ch.h index 87d4bb24c..c0ca832a6 100644 --- a/quantum/keymap_extras/keymap_fr_ch.h +++ b/quantum/keymap_extras/keymap_fr_ch.h @@ -1,3 +1,18 @@ +/* Copyright 2016 Vincent Pochet + * + * 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 KEYMAP_FR_CH #define KEYMAP_FR_CH diff --git a/quantum/keymap_extras/keymap_french.h b/quantum/keymap_extras/keymap_french.h index 401bbdf64..3308dc5f7 100644 --- a/quantum/keymap_extras/keymap_french.h +++ b/quantum/keymap_extras/keymap_french.h @@ -1,3 +1,18 @@ +/* Copyright 2015-2016 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 KEYMAP_FRENCH_H #define KEYMAP_FRENCH_H diff --git a/quantum/keymap_extras/keymap_french_osx.h b/quantum/keymap_extras/keymap_french_osx.h index 004d73ee2..ecade3fe9 100644 --- a/quantum/keymap_extras/keymap_french_osx.h +++ b/quantum/keymap_extras/keymap_french_osx.h @@ -1,3 +1,18 @@ +/* Copyright 2016 Sébastien Pérochon + * + * 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 KEYMAP_FRENCH_OSX_H #define KEYMAP_FRENCH_OSX_H @@ -74,4 +89,4 @@ #define FR_PIPE LSFT(LALT(KC_L)) #define FR_BSLS LSFT(LALT(FR_COLN)) -#endif \ No newline at end of file +#endif diff --git a/quantum/keymap_extras/keymap_german.h b/quantum/keymap_extras/keymap_german.h index 7e2e0ed44..e007c26ef 100644 --- a/quantum/keymap_extras/keymap_german.h +++ b/quantum/keymap_extras/keymap_german.h @@ -1,3 +1,19 @@ +/* Copyright 2015-2016 Matthias Schmidtt + * + * 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 KEYMAP_GERMAN #define KEYMAP_GERMAN diff --git a/quantum/keymap_extras/keymap_german_ch.h b/quantum/keymap_extras/keymap_german_ch.h index b66d582a4..8332e00af 100644 --- a/quantum/keymap_extras/keymap_german_ch.h +++ b/quantum/keymap_extras/keymap_german_ch.h @@ -1,3 +1,18 @@ +/* Copyright 2016 heartsekai + * + * 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 KEYMAP_SWISS_GERMAN #define KEYMAP_SWISS_GERMAN diff --git a/quantum/keymap_extras/keymap_german_osx.h b/quantum/keymap_extras/keymap_german_osx.h index f63f06618..798bb7579 100644 --- a/quantum/keymap_extras/keymap_german_osx.h +++ b/quantum/keymap_extras/keymap_german_osx.h @@ -1,3 +1,18 @@ +/* Copyright 2016 Stephen Bösebeck + * + * 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 KEYMAP_GERMAN_OSX #define KEYMAP_GERMAN_OSX diff --git a/quantum/keymap_extras/keymap_jp.h b/quantum/keymap_extras/keymap_jp.h index e81b5952e..fb74bce8d 100644 --- a/quantum/keymap_extras/keymap_jp.h +++ b/quantum/keymap_extras/keymap_jp.h @@ -1,4 +1,19 @@ -/* JP106-layout (Japanese Standard) +/* Copyright 2016 h-youhei + * + * 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 . + * + * JP106-layout (Japanese Standard) * * For more information, see * http://www2d.biglobe.ne.jp/~msyk/keyboard/layout/usbkeycode.html diff --git a/quantum/keymap_extras/keymap_neo2.h b/quantum/keymap_extras/keymap_neo2.h index 80439af34..174f4a6ee 100644 --- a/quantum/keymap_extras/keymap_neo2.h +++ b/quantum/keymap_extras/keymap_neo2.h @@ -1,3 +1,18 @@ +/* Copyright 2016 Matthias Schmitt + * + * 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 KEYMAP_NEO2 #define KEYMAP_NEO2 diff --git a/quantum/keymap_extras/keymap_nordic.h b/quantum/keymap_extras/keymap_nordic.h index 9b0ef35ca..6b34db558 100644 --- a/quantum/keymap_extras/keymap_nordic.h +++ b/quantum/keymap_extras/keymap_nordic.h @@ -1,3 +1,18 @@ +/* Copyright 2015-2016 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 KEYMAP_NORDIC_H #define KEYMAP_NORDIC_H diff --git a/quantum/keymap_extras/keymap_norwegian.h b/quantum/keymap_extras/keymap_norwegian.h index 5c4e8c495..b7128973a 100644 --- a/quantum/keymap_extras/keymap_norwegian.h +++ b/quantum/keymap_extras/keymap_norwegian.h @@ -1,3 +1,18 @@ +/* Copyright 2016 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 KEYMAP_NORWEGIAN_H #define KEYMAP_NORWEGIAN_H diff --git a/quantum/keymap_extras/keymap_plover.h b/quantum/keymap_extras/keymap_plover.h index 9b88f7d84..de6d8c53f 100644 --- a/quantum/keymap_extras/keymap_plover.h +++ b/quantum/keymap_extras/keymap_plover.h @@ -1,3 +1,18 @@ +/* Copyright 2016 James Kay + * + * 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 KEYMAP_PLOVER_H #define KEYMAP_PLOVER_H diff --git a/quantum/keymap_extras/keymap_russian.h b/quantum/keymap_extras/keymap_russian.h deleted file mode 100644 index 237e9abde..000000000 --- a/quantum/keymap_extras/keymap_russian.h +++ /dev/null @@ -1,77 +0,0 @@ -#ifndef KEYMAP_RUSSIAN_H -#define KEYMAP_RUSSIAN_H - -#include "keymap.h" - -// Normal Chracters // reg SHIFT -#define RU_A KC_F // а and А -#define RU_BE KC_COMM // б and Б -#define RU_VE KC_D // в and В -#define RU_GHE KC_U // г and Г -#define RU_DE KC_L // д and Д -#define RU_IE KC_T // е and Е -#define RU_IO KC_GRV // ё and Ё -#define RU_ZHE KC_SCLN // ж and Ж -#define RU_ZE KC_P // з and З -#define RU_I KC_B // и and И -#define RU_SRT_I KC_Q // й and Й -#define RU_KA KC_R // к and К -#define RU_EL KC_K // л and Л -#define RU_EM KC_V // м and М -#define RU_EN KC_Y // н and Н -#define RU_O KC_J // о and О -#define RU_PE KC_G // п and П -#define RU_ER KC_H // р and Р -#define RU_ES KC_C // с and С -#define RU_TE KC_N // т and Т -#define RU_U KC_E // у and У -#define RU_EF KC_A // ф and Ф -#define RU_HA KC_LBRC // х and Х -#define RU_TSE KC_W // ц and Ц -#define RU_CHE KC_X // ч and Ч -#define RU_SHA KC_I // ш and Ш -#define RU_SHCHA KC_O // щ and Щ -#define RU_HSIGN KC_RBRC // ъ and Ъ -#define RU_YERU KC_S // ы and Ы -#define RU_SSIGN KC_M // ь and Ь -#define RU_E KC_QUOT // э and Э -#define RU_YU KC_DOT // ю and Ю -#define RU_YA KC_Z // я and Я - -#define RU_1 KC_1 // 1 and ! -#define RU_2 KC_2 // 2 and " -#define RU_3 KC_3 // 3 and № -#define RU_4 KC_4 // 4 and ; -#define RU_5 KC_5 // 5 and % -#define RU_6 KC_6 // 6 and : -#define RU_7 KC_7 // 7 and ? -#define RU_8 KC_8 // 8 and * -#define RU_9 KC_9 // 9 and ( -#define RU_0 KC_0 // 0 and ) - -#define RU_MINS KC_MINS // - and _ -#define RU_EQL KC_EQL // = and + -#define RU_BSLS KC_BSLS // \ and / -#define RU_DOT KC_SLSH // . and , - -// Shifted Chracters -#define RU_EXLM LSFT(RU_1) // ! -#define RU_DQUT LSFT(RU_2) // " -#define RU_NMRO LSFT(RU_3) // № -#define RU_SCLN LSFT(RU_4) // ; -#define RU_PERC LSFT(RU_5) // % -#define RU_COLN LSFT(RU_6) // : -#define RU_QUES LSFT(RU_7) // ? -#define RU_ASTR LSFT(RU_8) // * -#define RU_LPRN LSFT(RU_9) // ( -#define RU_RPRN LSFT(RU_0) // ) - -#define RU_UNDR LSFT(RU_MINS) // _ -#define RU_PLUS LSFT(RU_EQL) // + -#define RU_SLSH LSFT(RU_BSLS) // / -#define RU_COMM LSFT(RU_DOT) // , - -// Alt Gr-ed characters -#define RU_RUBL RALT(RU_8) // ₽ - -#endif diff --git a/quantum/keymap_extras/keymap_spanish.h b/quantum/keymap_extras/keymap_spanish.h index 4ba568af2..3a5787e9c 100644 --- a/quantum/keymap_extras/keymap_spanish.h +++ b/quantum/keymap_extras/keymap_spanish.h @@ -1,3 +1,18 @@ +/* Copyright 2015-2016 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 KEYMAP_SPANISH_H #define KEYMAP_SPANISH_H diff --git a/quantum/keymap_extras/keymap_uk.h b/quantum/keymap_extras/keymap_uk.h index 00c87afc3..9d02efe04 100644 --- a/quantum/keymap_extras/keymap_uk.h +++ b/quantum/keymap_extras/keymap_uk.h @@ -1,3 +1,18 @@ +/* Copyright 2015-2016 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 KEYMAP_UK_H #define KEYMAP_UK_H diff --git a/quantum/keymap_extras/keymap_unicode_cyrillic.h b/quantum/keymap_extras/keymap_unicode_cyrillic.h deleted file mode 100644 index a40626d91..000000000 --- a/quantum/keymap_extras/keymap_unicode_cyrillic.h +++ /dev/null @@ -1,163 +0,0 @@ -#ifndef KEYMAP_CYRILLIC_H -#define KEYMAP_CYRILLIC_H - -#include "keymap.h" - -/* - * This is based off of - * https://en.wikipedia.org/wiki/Cyrillic_script - * - * Unicode is iffy, a software implementation is preferred - */ - -// Capital Char russian/ukrainian/bulgarian -#define CY_A UC(0x0410) // А rus ukr bul -#define CY_BE UC(0x0411) // Б rus ukr bul -#define CY_VE UC(0x0412) // В rus ukr bul -#define CY_GHE UC(0x0413) // Г rus ukr bul -#define CY_GHEUP UC(0x0490) // Ґ ukr -#define CY_DE UC(0x0414) // Д rus ukr bul -#define CY_DJE UC(0x0402) // Ђ -#define CY_GJE UC(0x0403) // Ѓ -#define CY_IE UC(0x0415) // Е rus ukr bul -#define CY_IO UC(0x0401) // Ё rus -#define CY_UIE UC(0x0404) // Є ukr -#define CY_ZHE UC(0x0416) // Ж rus ukr bul -#define CY_ZE UC(0x0417) // З rus ukr bul -#define CY_DZE UC(0x0405) // Ѕ -#define CY_I UC(0x0418) // И rus ukr bul -#define CY_B_U_I UC(0x0406) // І ukr -#define CY_YI UC(0x0407) // Ї ukr -#define CY_SRT_I UC(0x0419) // Й rus ukr bul -#define CY_JE UC(0x0408) // Ј -#define CY_KA UC(0x041a) // К rus ukr bul -#define CY_EL UC(0x041b) // Л rus ukr bul -#define CY_LJE UC(0x0409) // Љ -#define CY_EM UC(0x041c) // М rus ukr bul -#define CY_EN UC(0x041d) // Н rus ukr bul -#define CY_NJE UC(0x040a) // Њ -#define CY_O UC(0x041e) // О rus ukr bul -#define CY_PE UC(0x041f) // П rus ukr bul -#define CY_ER UC(0x0420) // Р rus ukr bul -#define CY_ES UC(0x0421) // С rus ukr bul -#define CY_TE UC(0x0422) // Т rus ukr bul -#define CY_TSHE UC(0x040b) // Ћ -#define CY_KJE UC(0x040c) // Ќ -#define CY_U UC(0x0423) // У rus ukr bul -#define CY_SRT_U UC(0x040e) // Ў -#define CY_EF UC(0x0424) // Ф rus ukr bul -#define CY_HA UC(0x0425) // Х rus bul -#define CY_TSE UC(0x0426) // Ц rus ukr bul -#define CY_CHE UC(0x0427) // Ч rus ukr bul -#define CY_DZHE UC(0x040f) // Џ -#define CY_SHA UC(0x0428) // Ш rus ukr bul -#define CY_SHCHA UC(0x0429) // Щ rus ukr bul -#define CY_HSIGN UC(0x042a) // Ъ rus bul -#define CY_YERU UC(0x042b) // Ы rus -#define CY_SSIGN UC(0x042c) // Ь rus ukr bul -#define CY_E UC(0x042d) // Э rus -#define CY_YU UC(0x042e) // Ю rus ukr bul -#define CY_YA UC(0x042f) // Я rus ukr bul -// Important Cyrillic non-Slavic letters -#define CY_PALOCHKA UC(0x04c0) // Ӏ -#define CY_SCHWA UC(0x04d8) // Ә -#define CY_GHE_S UC(0x0492) // Ғ -#define CY_ZE_D UC(0x0498) // Ҙ -#define CY_ES_D UC(0x04aa) // Ҫ -#define CY_BR_KA UC(0x04a0) // Ҡ -#define CY_ZHE_D UC(0x0496) // Җ -#define CY_KA_D UC(0x049a) // Қ -#define CY_EN_D UC(0x04a2) // Ң -#define CY_ENGHE UC(0x04a4) // Ҥ -#define CY_BRD_O UC(0x04e8) // Ө -#define CY_STR_U UC(0x04ae) // Ү -#define CY_S_U_S UC(0x04b0) // Ұ -#define CY_SHHA UC(0x04ba) // Һ -#define CY_HA_D UC(0x04b2) // Ҳ - - -// Small -#define CY_a UC(0x0430) // a rus ukr bul -#define CY_be UC(0x0431) // б rus ukr bul -#define CY_ve UC(0x0432) // в rus ukr bul -#define CY_ghe UC(0x0433) // г rus ukr bul -#define CY_gheup UC(0x0491) // ґ ukr -#define CY_de UC(0x0434) // д rus ukr bul -#define CY_dje UC(0x0452) // ђ -#define CY_gje UC(0x0453) // ѓ -#define CY_ie UC(0x0435) // е rus ukr bul -#define CY_io UC(0x0451) // ё rus -#define CY_uie UC(0x0454) // є ukr -#define CY_zhe UC(0x0436) // ж rus ukr bul -#define CY_ze UC(0x0437) // з rus ukr bul -#define CY_dze UC(0x0455) // ѕ -#define CY_i UC(0x0438) // и rus ukr bul -#define CY_b_u_i UC(0x0456) // і ukr -#define CY_yi UC(0x0457) // ї ukr -#define CY_srt_i UC(0x0439) // й rus ukr bul -#define CY_je UC(0x0458) // ј -#define CY_ka UC(0x043a) // к rus ukr bul -#define CY_el UC(0x043b) // л rus ukr bul -#define CY_lje UC(0x0459) // љ -#define CY_em UC(0x043c) // м rus ukr bul -#define CY_en UC(0x043d) // н rus ukr bul -#define CY_nje UC(0x045a) // њ -#define CY_o UC(0x043e) // о rus ukr bul -#define CY_pe UC(0x043f) // п rus ukr bul -#define CY_er UC(0x0440) // р rus ukr bul -#define CY_es UC(0x0441) // с rus ukr bul -#define CY_te UC(0x0442) // т rus ukr bul -#define CY_tshe UC(0x045b) // ћ -#define CY_kje UC(0x045c) // ќ -#define CY_u UC(0x0443) // у rus ukr bul -#define CY_srt_u UC(0x045e) // ў -#define CY_ef UC(0x0444) // ф rus ukr bul -#define CY_ha UC(0x0445) // х rus ukr bul -#define CY_tse UC(0x0446) // ц rus ukr bul -#define CY_che UC(0x0447) // ч rus ukr bul -#define CY_dzhe UC(0x045f) // џ -#define CY_sha UC(0x0448) // ш rus ukr bul -#define CY_shcha UC(0x0449) // щ rus ukr bul -#define CY_hsign UC(0x044a) // ъ rus bul -#define CY_yeru UC(0x044b) // ы rus -#define CY_ssign UC(0x044c) // ь rus ukr bul -#define CY_e UC(0x044d) // э rus -#define CY_yu UC(0x044e) // ю rus ukr bul -#define CY_ya UC(0x044f) // я rus ukr bul -// Important Cyrillic non-Slavic letters -#define CY_palochka UC(0x04cf) // ӏ -#define CY_schwa UC(0x04d9) // ә -#define CY_ghe_s UC(0x0493) // ғ -#define CY_ze_d UC(0x0499) // ҙ -#define CY_es_d UC(0x04ab) // ҫ -#define CY_br_ka UC(0x04a1) // ҡ -#define CY_zhe_d UC(0x0497) // җ -#define CY_ka_d UC(0x049b) // қ -#define CY_en_d UC(0x04a3) // ң -#define CY_enghe UC(0x04a5) // ҥ -#define CY_brd_o UC(0x04e9) // ө -#define CY_str_u UC(0x04af) // ү -#define CY_s_u_s UC(0x04b1) // ұ -#define CY_shha UC(0x04bb) // һ -#define CY_ha_d UC(0x04b3) // ҳ - - -// Extra -#define CY_slr_ve UC(0x1c80) // ᲀ CYRILLIC SMALL LETTER ROUNDED VE -#define CY_ll_de UC(0x1c81) // ᲁ CYRILLIC SMALL LETTER LONG-LEGGED DE -#define CY_ZEMLYA UC(0xa640) // Ꙁ CYRILLIC CAPITAL LETTER ZEMLYA -#define CY_zemlya UC(0xa641) // ꙁ CYRILLIC SMALL LETTER ZEMLYA -#define CY_RV_DZE UC(0xa644) // Ꙅ CYRILLIC CAPITAL LETTER REVERSED DZE -#define CY_rv_DZE UC(0xa645) // ꙅ CYRILLIC SMALL LETTER REVERSED DZE -#define CY_slw_es UC(0x1c83) // ᲃ CYRILLIC SMALL LETTER WIDE ES -#define CY_st_te UC(0x1c84) // ᲄ CYRILLIC SMALL LETTER TALL TE -#define CY_3l_te UC(0x1c85) // ᲅ CYRILLIC SMALL LETTER THREE-LEGGED TE -#define CY_thsign UC(0x1c86) // ᲆ CYRILLIC SMALL LETTER TALL HARD SIGN -#define CY_YERUBY UC(0xa650) // Ꙑ CYRILLIC CAPITAL LETTER YERU WITH BACK YER -#define CY_yeruby UC(0xa651) // ꙑ CYRILLIC SMALL LETTER YERU WITH BACK YER -#define CY_RUBL UC(0x20bd) // ₽ -#define CY_NMRO UC(0x2116) // № - -// The letters Zje and Sje are made for other letters and accent marks - -#endif diff --git a/quantum/light_ws2812.c b/quantum/light_ws2812.c index 55bdd9cd8..2506e3d8e 100755 --- a/quantum/light_ws2812.c +++ b/quantum/light_ws2812.c @@ -7,7 +7,18 @@ * Jan 18th, 2014 v2.0b Initial Version * Nov 29th, 2015 v2.3 Added SK6812RGBW support * -* License: GNU GPL v2 (see License.txt) +* 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 "light_ws2812.h" diff --git a/quantum/light_ws2812.h b/quantum/light_ws2812.h index 2f78c20fc..60924a0fb 100755 --- a/quantum/light_ws2812.h +++ b/quantum/light_ws2812.h @@ -6,8 +6,18 @@ * * Please do not change this file! All configuration is handled in "ws2812_config.h" * - * License: GNU GPL v2 (see License.txt) - + + * 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 LIGHT_WS2812_H_ diff --git a/quantum/matrix.c b/quantum/matrix.c index ac523482a..5337e2626 100644 --- a/quantum/matrix.c +++ b/quantum/matrix.c @@ -1,6 +1,5 @@ /* -Copyright 2012 Jun Wako -Copyright 2014 Jack Humbert +Copyright 2012-2017 Jun Wako, 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 diff --git a/quantum/pincontrol.h b/quantum/pincontrol.h index 36ce29ef2..d77977ebe 100644 --- a/quantum/pincontrol.h +++ b/quantum/pincontrol.h @@ -1,3 +1,18 @@ +/* Copyright 2016 Wez Furlong + * + * 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 . + */ #pragma once // Some helpers for controlling gpio pins #include diff --git a/quantum/process_keycode/process_chording.c b/quantum/process_keycode/process_chording.c index d7814629f..6c6ebe300 100644 --- a/quantum/process_keycode/process_chording.c +++ b/quantum/process_keycode/process_chording.c @@ -1,3 +1,19 @@ +/* Copyright 2016 Jack Humbert + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #include "process_chording.h" bool keys_chord(uint8_t keys[]) { @@ -57,4 +73,4 @@ bool process_chording(uint16_t keycode, keyrecord_t *record) { } } return true; -} \ No newline at end of file +} diff --git a/quantum/process_keycode/process_chording.h b/quantum/process_keycode/process_chording.h index 49c97db3b..8c0f4862a 100644 --- a/quantum/process_keycode/process_chording.h +++ b/quantum/process_keycode/process_chording.h @@ -1,3 +1,19 @@ +/* Copyright 2016 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 PROCESS_CHORDING_H #define PROCESS_CHORDING_H @@ -13,4 +29,4 @@ uint8_t chord_key_down = 0; bool process_chording(uint16_t keycode, keyrecord_t *record); -#endif \ No newline at end of file +#endif diff --git a/quantum/process_keycode/process_combo.c b/quantum/process_keycode/process_combo.c index e2189ad98..58d45add2 100644 --- a/quantum/process_keycode/process_combo.c +++ b/quantum/process_keycode/process_combo.c @@ -1,3 +1,19 @@ +/* Copyright 2016 Jack Humbert + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #include "process_combo.h" #include "print.h" diff --git a/quantum/process_keycode/process_combo.h b/quantum/process_keycode/process_combo.h index 847f2b737..a5dbd788a 100644 --- a/quantum/process_keycode/process_combo.h +++ b/quantum/process_keycode/process_combo.h @@ -1,3 +1,19 @@ +/* Copyright 2016 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 PROCESS_COMBO_H #define PROCESS_COMBO_H diff --git a/quantum/process_keycode/process_leader.c b/quantum/process_keycode/process_leader.c index e53d221e7..473906d65 100644 --- a/quantum/process_keycode/process_leader.c +++ b/quantum/process_keycode/process_leader.c @@ -1,3 +1,19 @@ +/* Copyright 2016 Jack Humbert + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #include "process_leader.h" __attribute__ ((weak)) @@ -35,4 +51,4 @@ bool process_leader(uint16_t keycode, keyrecord_t *record) { } } return true; -} \ No newline at end of file +} diff --git a/quantum/process_keycode/process_leader.h b/quantum/process_keycode/process_leader.h index c83db8abb..da7a3d2ef 100644 --- a/quantum/process_keycode/process_leader.h +++ b/quantum/process_keycode/process_leader.h @@ -1,3 +1,19 @@ +/* Copyright 2016 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 PROCESS_LEADER_H #define PROCESS_LEADER_H @@ -20,4 +36,4 @@ void leader_end(void); #define LEADER_EXTERNS() extern bool leading; extern uint16_t leader_time; extern uint16_t leader_sequence[5]; extern uint8_t leader_sequence_size #define LEADER_DICTIONARY() if (leading && timer_elapsed(leader_time) > LEADER_TIMEOUT) -#endif \ No newline at end of file +#endif diff --git a/quantum/process_keycode/process_midi.c b/quantum/process_keycode/process_midi.c index 700c6ce8e..9184feaae 100644 --- a/quantum/process_keycode/process_midi.c +++ b/quantum/process_keycode/process_midi.c @@ -1,3 +1,18 @@ +/* Copyright 2016 Jack Humbert + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ #include "process_midi.h" #ifdef MIDI_ENABLE diff --git a/quantum/process_keycode/process_midi.h b/quantum/process_keycode/process_midi.h index 58b7650c6..ccac8981a 100644 --- a/quantum/process_keycode/process_midi.h +++ b/quantum/process_keycode/process_midi.h @@ -1,3 +1,19 @@ +/* Copyright 2016 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 PROCESS_MIDI_H #define PROCESS_MIDI_H @@ -37,4 +53,4 @@ uint8_t midi_compute_note(uint16_t keycode); #endif // MIDI_ENABLE -#endif \ No newline at end of file +#endif diff --git a/quantum/process_keycode/process_music.c b/quantum/process_keycode/process_music.c index f89a04ee3..217dca280 100644 --- a/quantum/process_keycode/process_music.c +++ b/quantum/process_keycode/process_music.c @@ -1,3 +1,18 @@ +/* Copyright 2016 Jack Humbert + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ #include "process_music.h" #ifdef AUDIO_ENABLE diff --git a/quantum/process_keycode/process_music.h b/quantum/process_keycode/process_music.h index a36514a44..8dfbf041f 100644 --- a/quantum/process_keycode/process_music.h +++ b/quantum/process_keycode/process_music.h @@ -1,3 +1,19 @@ +/* Copyright 2016 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 PROCESS_MUSIC_H #define PROCESS_MUSIC_H @@ -28,4 +44,4 @@ void matrix_scan_music(void); #endif // defined(AUDIO_ENABLE) || (defined(MIDI_ENABLE) && defined(MIDI_BASIC)) -#endif \ No newline at end of file +#endif diff --git a/quantum/process_keycode/process_printer.c b/quantum/process_keycode/process_printer.c index 2e11dd366..807f7a0b9 100644 --- a/quantum/process_keycode/process_printer.c +++ b/quantum/process_keycode/process_printer.c @@ -1,3 +1,19 @@ +/* Copyright 2016 Jack Humbert + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #include "process_printer.h" #include "action_util.h" @@ -251,4 +267,4 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { } return true; -} \ No newline at end of file +} diff --git a/quantum/process_keycode/process_printer.h b/quantum/process_keycode/process_printer.h index fdd36d75a..aa494ac8a 100644 --- a/quantum/process_keycode/process_printer.h +++ b/quantum/process_keycode/process_printer.h @@ -1,3 +1,19 @@ +/* Copyright 2016 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 PROCESS_PRINTER_H #define PROCESS_PRINTER_H @@ -5,4 +21,4 @@ #include "protocol/serial.h" -#endif \ No newline at end of file +#endif diff --git a/quantum/process_keycode/process_printer_bb.c b/quantum/process_keycode/process_printer_bb.c index 1924d0377..55d3b552b 100644 --- a/quantum/process_keycode/process_printer_bb.c +++ b/quantum/process_keycode/process_printer_bb.c @@ -1,3 +1,19 @@ +/* Copyright 2016 Jack Humbert + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #include "process_printer.h" #include "action_util.h" @@ -257,4 +273,4 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { } return true; -} \ No newline at end of file +} diff --git a/quantum/process_keycode/process_tap_dance.c b/quantum/process_keycode/process_tap_dance.c index 403dca538..68c8425bb 100644 --- a/quantum/process_keycode/process_tap_dance.c +++ b/quantum/process_keycode/process_tap_dance.c @@ -1,3 +1,18 @@ +/* Copyright 2016 Jack Humbert + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ #include "quantum.h" #include "action_tapping.h" diff --git a/quantum/process_keycode/process_tap_dance.h b/quantum/process_keycode/process_tap_dance.h index 726752ecc..330809f83 100644 --- a/quantum/process_keycode/process_tap_dance.h +++ b/quantum/process_keycode/process_tap_dance.h @@ -1,3 +1,18 @@ +/* Copyright 2016 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 PROCESS_TAP_DANCE_H #define PROCESS_TAP_DANCE_H diff --git a/quantum/process_keycode/process_ucis.c b/quantum/process_keycode/process_ucis.c index 4ad2533b0..86c0937f5 100644 --- a/quantum/process_keycode/process_ucis.c +++ b/quantum/process_keycode/process_ucis.c @@ -1,3 +1,19 @@ +/* Copyright 2017 Jack Humbert + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #include "process_ucis.h" qk_ucis_state_t qk_ucis_state; @@ -130,4 +146,4 @@ bool process_ucis (uint16_t keycode, keyrecord_t *record) { return false; } return true; -} \ No newline at end of file +} diff --git a/quantum/process_keycode/process_ucis.h b/quantum/process_keycode/process_ucis.h index 4332f57b3..3f736a709 100644 --- a/quantum/process_keycode/process_ucis.h +++ b/quantum/process_keycode/process_ucis.h @@ -1,3 +1,19 @@ +/* Copyright 2017 Jack Humbert + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #ifndef PROCESS_UCIS_H #define PROCESS_UCIS_H diff --git a/quantum/process_keycode/process_unicode.c b/quantum/process_keycode/process_unicode.c index ccae6fdca..26571ea03 100644 --- a/quantum/process_keycode/process_unicode.c +++ b/quantum/process_keycode/process_unicode.c @@ -1,3 +1,18 @@ +/* Copyright 2016 Jack Humbert + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ #include "process_unicode.h" #include "action_util.h" diff --git a/quantum/process_keycode/process_unicode.h b/quantum/process_keycode/process_unicode.h index 4c21f11eb..c525b74f0 100644 --- a/quantum/process_keycode/process_unicode.h +++ b/quantum/process_keycode/process_unicode.h @@ -1,3 +1,18 @@ +/* Copyright 2016 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 PROCESS_UNICODE_H #define PROCESS_UNICODE_H diff --git a/quantum/process_keycode/process_unicode_common.c b/quantum/process_keycode/process_unicode_common.c index 31bc3b7ab..6012b4f07 100644 --- a/quantum/process_keycode/process_unicode_common.c +++ b/quantum/process_keycode/process_unicode_common.c @@ -1,3 +1,19 @@ +/* Copyright 2017 Jack Humbert + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #include "process_unicode_common.h" uint8_t mods; @@ -82,4 +98,4 @@ void register_hex(uint16_t hex) { register_code(hex_to_keycode(digit)); unregister_code(hex_to_keycode(digit)); } -} \ No newline at end of file +} diff --git a/quantum/process_keycode/process_unicode_common.h b/quantum/process_keycode/process_unicode_common.h index 864693cdd..f5be1da5c 100644 --- a/quantum/process_keycode/process_unicode_common.h +++ b/quantum/process_keycode/process_unicode_common.h @@ -1,3 +1,19 @@ +/* Copyright 2017 Jack Humbert + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #ifndef PROCESS_UNICODE_COMMON_H #define PROCESS_UNICODE_COMMON_H @@ -129,4 +145,4 @@ void register_hex(uint16_t hex); #define UC_TILD UC(0x007E) #define UC_DEL UC(0x007F) -#endif \ No newline at end of file +#endif diff --git a/quantum/process_keycode/process_unicodemap.c b/quantum/process_keycode/process_unicodemap.c index 68a593a18..0227fbdd7 100644 --- a/quantum/process_keycode/process_unicodemap.c +++ b/quantum/process_keycode/process_unicodemap.c @@ -1,3 +1,19 @@ +/* Copyright 2017 Jack Humbert + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #include "process_unicodemap.h" #include "process_unicode_common.h" @@ -53,4 +69,4 @@ bool process_unicode_map(uint16_t keycode, keyrecord_t *record) { } } return true; -} \ No newline at end of file +} diff --git a/quantum/process_keycode/process_unicodemap.h b/quantum/process_keycode/process_unicodemap.h index 64a7a0109..929c88c0b 100644 --- a/quantum/process_keycode/process_unicodemap.h +++ b/quantum/process_keycode/process_unicodemap.h @@ -1,3 +1,19 @@ +/* Copyright 2017 Jack Humbert + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #ifndef PROCESS_UNICODEMAP_H #define PROCESS_UNICODEMAP_H @@ -6,4 +22,4 @@ void unicode_map_input_error(void); bool process_unicode_map(uint16_t keycode, keyrecord_t *record); -#endif \ No newline at end of file +#endif diff --git a/quantum/quantum.c b/quantum/quantum.c index 5a9e771a9..62d9ef923 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -1,3 +1,19 @@ +/* Copyright 2016-2017 Jack Humbert + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #include "quantum.h" #ifdef PROTOCOL_LUFA #include "outputselect.h" diff --git a/quantum/quantum.h b/quantum/quantum.h index 1f1bb0afd..2bf18d095 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -1,3 +1,18 @@ +/* Copyright 2016-2017 Erez Zukerman, 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 QUANTUM_H #define QUANTUM_H diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 1e3df9fa6..7354ae0da 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -1,3 +1,18 @@ +/* Copyright 2016-2017 Jack Humbert + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ #ifndef QUANTUM_KEYCODES_H #define QUANTUM_KEYCODES_H diff --git a/quantum/rgblight.c b/quantum/rgblight.c index dd1b91c63..eff70aae1 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -1,3 +1,18 @@ +/* Copyright 2016-2017 Yang Liu + * + * 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 #include #include diff --git a/quantum/rgblight.h b/quantum/rgblight.h index 2b3e791bf..92130192c 100644 --- a/quantum/rgblight.h +++ b/quantum/rgblight.h @@ -1,3 +1,18 @@ +/* Copyright 2017 Yang Liu + * + * 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 RGBLIGHT_H #define RGBLIGHT_H diff --git a/quantum/serial_link/LICENSE b/quantum/serial_link/LICENSE index d7cc3198c..d13cc4b26 100644 --- a/quantum/serial_link/LICENSE +++ b/quantum/serial_link/LICENSE @@ -1,7 +1,5 @@ The MIT License (MIT) -Copyright (c) 2016 Fred Sundvik - Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights diff --git a/quantum/template/Makefile b/quantum/template/Makefile index 4e2a6f00f..840dc9a28 100644 --- a/quantum/template/Makefile +++ b/quantum/template/Makefile @@ -1,3 +1,18 @@ +# Copyright 2013 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 MAKEFILE_INCLUDED include ../../Makefile -endif \ No newline at end of file +endif diff --git a/quantum/template/config.h b/quantum/template/config.h index 7393097e1..dbca45765 100644 --- a/quantum/template/config.h +++ b/quantum/template/config.h @@ -1,5 +1,5 @@ /* -Copyright 2012 Jun Wako +Copyright 2017 REPLACE_WITH_YOUR_NAME 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 diff --git a/quantum/template/keymaps/default/Makefile b/quantum/template/keymaps/default/Makefile index 29f11bbc7..b8879076b 100644 --- a/quantum/template/keymaps/default/Makefile +++ b/quantum/template/keymaps/default/Makefile @@ -1,4 +1,20 @@ -# Build Options +# Copyright 2013 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 . + + +# 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 # @@ -18,4 +34,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend ifndef QUANTUM_DIR include ../../../../Makefile -endif \ No newline at end of file +endif diff --git a/quantum/template/keymaps/default/config.h b/quantum/template/keymaps/default/config.h index df06a2620..f52a97bbc 100644 --- a/quantum/template/keymaps/default/config.h +++ b/quantum/template/keymaps/default/config.h @@ -1,3 +1,19 @@ +/* Copyright 2017 REPLACE_WITH_YOUR_NAME + * + * 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 @@ -5,4 +21,4 @@ // place overrides here -#endif \ No newline at end of file +#endif diff --git a/quantum/template/keymaps/default/keymap.c b/quantum/template/keymaps/default/keymap.c index e28a4723e..a123cd7ba 100644 --- a/quantum/template/keymaps/default/keymap.c +++ b/quantum/template/keymaps/default/keymap.c @@ -1,3 +1,18 @@ +/* Copyright 2017 REPLACE_WITH_YOUR_NAME + * + * 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 "%KEYBOARD%.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -41,4 +56,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { void led_set_user(uint8_t usb_led) { -} \ No newline at end of file +} diff --git a/quantum/template/template.c b/quantum/template/template.c index 5ef349583..97f788654 100644 --- a/quantum/template/template.c +++ b/quantum/template/template.c @@ -1,3 +1,18 @@ +/* Copyright 2017 REPLACE_WITH_YOUR_NAME + * + * 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 "%KEYBOARD%.h" void matrix_init_kb(void) { diff --git a/quantum/template/template.h b/quantum/template/template.h index cd78a54e3..e912188ba 100644 --- a/quantum/template/template.h +++ b/quantum/template/template.h @@ -1,3 +1,18 @@ +/* Copyright 2017 REPLACE_WITH_YOUR_NAME + * + * 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 %KEYBOARD_UPPERCASE%_H #define %KEYBOARD_UPPERCASE%_H diff --git a/quantum/variable_trace.c b/quantum/variable_trace.c index de580244c..713747cfc 100644 --- a/quantum/variable_trace.c +++ b/quantum/variable_trace.c @@ -1,3 +1,19 @@ +/* Copyright 2016 Fred Sundvik + * + * 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 "variable_trace.h" #include #include diff --git a/quantum/variable_trace.h b/quantum/variable_trace.h index 46bd82786..dacc13858 100644 --- a/quantum/variable_trace.h +++ b/quantum/variable_trace.h @@ -1,3 +1,19 @@ +/* Copyright 2016 Fred Sundvik + * + * 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 VARIABLE_TRACE_H #define VARIABLE_TRACE_H -- cgit v1.2.3 From d6e51d20084921481acacde7546ff08d790b898d Mon Sep 17 00:00:00 2001 From: Rovanion Luckey Date: Wed, 29 Mar 2017 09:34:20 +0200 Subject: Added link to the teensy linux page. --- keyboards/ergodox/readme.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/keyboards/ergodox/readme.md b/keyboards/ergodox/readme.md index d7eed8f43..23e5b862d 100644 --- a/keyboards/ergodox/readme.md +++ b/keyboards/ergodox/readme.md @@ -69,8 +69,11 @@ files. Check them out with: The Ez uses the [Teensy Loader](https://www.pjrc.com/teensy/loader.html). -Linux users need to modify udev rules as described on the Teensy Linux page (which page?). -Some distributions provide a binary, maybe called `teensy-loader-cli`. +Linux users need to modify udev rules as described on the [Teensy +Linux page]. Some distributions provide a binary, maybe called +`teensy-loader-cli`. + +[Teensy Linux page]: https://www.pjrc.com/teensy/loader_linux.html To flash the firmware: -- cgit v1.2.3 From 4d2be0281c230fc8d7764e4071d1447c59af2cf7 Mon Sep 17 00:00:00 2001 From: Osamu Aoki Date: Mon, 13 Mar 2017 17:11:05 +0000 Subject: Typo fix --- quantum/template/template.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quantum/template/template.h b/quantum/template/template.h index cd78a54e3..49e6b60e7 100644 --- a/quantum/template/template.h +++ b/quantum/template/template.h @@ -5,7 +5,7 @@ // This a shortcut to help you visually see your layout. // The following is an example using the Planck MIT layout -// The first section contains all of the arguements +// The first section contains all of the arguments // The second converts the arguments into a two-dimensional array #define KEYMAP( \ k00, k01, k02, \ -- cgit v1.2.3 From c782b269b6544f63a13b80e9b28f460fded63f67 Mon Sep 17 00:00:00 2001 From: Osamu Aoki Date: Sun, 12 Mar 2017 02:41:47 +0900 Subject: Update to match QMK keymap --- doc/keymap.md | 232 ++++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 143 insertions(+), 89 deletions(-) diff --git a/doc/keymap.md b/doc/keymap.md index 6f2a663fc..c127db2b2 100644 --- a/doc/keymap.md +++ b/doc/keymap.md @@ -1,15 +1,30 @@ Keymap framework - how to define your keymap ============================================ -***NOTE: This is not final version, may be inconsistent with source code and changed occasionally for a while.*** +***NOTE: This is updated for QMK but this is still work in progress. This may still be inconsistent with the source code.*** + +QMK is based on TMK. Understanding the essential changes made should help you understand variable names etc. + +## TMK vs. QMK + +| Firmware |TMK |QMK | +|-------------------------------------------------|-----------------------|-------------------------| +| Maintainer |hasu |Jack Humbert et al. | +| Build path customization | `TMK_DIR = ...` | `include .../Makefile` | +| `keymaps` data | 3D array of `uint8_t` holding **keycode** | 3D array of `uint16_t` holding **action code** | +| `fn_actions` data | 1D array of `uint16_t` holding **action code** | 3D array of `uint16_t` holding **action code** | + +Since QMK is based on TMK and uses major portion of TMK code as is, understanding the essential changes made should help you understand the code. ## 0. Keymap and layers -**Keymap** is comprised of multiple layers of key layout, you can define **32 layers** at most. -**Layer** is an array of **keycodes** to define **actions** for each physical keys. -respective layers can be validated simultaneously. Layers are indexed with 0 to 31 and higher layer has precedence. +In QMK, **`const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS]`** holds multiple **layers** of keymap information in **16 bit** data holding the **action code**. You can define **32 layers** at most. - Keymap: 32 Layers Layer: Keycode matrix +For trivial key definitions, the higher 8 bits of the **action code** are all 0 and the lower 8 bits holds the USB HID usage code generated by the key as **keycode**. + +Respective layers can be validated simultaneously. Layers are indexed with 0 to 31 and higher layer has precedence. + + Keymap: 32 Layers Layer: action code matrix ----------------- --------------------- - stack of layers array_of_keycode[row][column] + stack of layers array_of_action_code[row][column] ____________ precedence _______________________ / / | high / ESC / F1 / F2 / F3 .... 31 /___________// | /-----/-----/-----/----- @@ -22,11 +37,15 @@ respective layers can be validated simultaneously. Layers are indexed with 0 to 0 /___________/ V low 0 `-------------------------- +Sometimes, the action code stored in keymap may be referred as keycode in some documents due to the TMK history. + +### 0.1 Keymap layer status +Keymap layer has its state in two 32 bit parameters: -### 0.1 Keymap status -Keymap has its state in two parameters: -**`default_layer`** indicates a base keymap layer(0-31) which is always valid and to be referred, **`keymap_stat`** is 16bit variable which has current on/off status of layers on its each bit. +* **`default_layer_state`** indicates a base keymap layer(0-31) which is always valid and to be referred. +* **`layer_state`** () has current on/off status of the layer on its each bit. +Keymap has its state in two parameter**`default_layer`** indicates a base keymap layer(0-31) which is always valid and to be referred, **`keymap_stat`** is 16bit variable which has current on/off status of layers on its each bit. Keymap layer '0' is usually `default_layer` and which is the only valid layer and other layers is initially off after boot up firmware, though, you can configured them in `config.h`. To change `default_layer` will be useful when you switch key layout completely, say you want Colmak instead of Qwerty. @@ -67,97 +86,132 @@ On the other hand, you shall change `layer_state` to overlay base layer with som ### 0.2 Layer Precedence and Transparency Note that ***higher layer has higher priority on stack of layers***, namely firmware falls down from top layer to bottom to look up keycode. Once it spots keycode other than **`KC_TRNS`**(transparent) on a layer it stops searching and lower layers aren't referred. -You can place `KC_TRNS` on overlay layer changes just part of layout to fall back on lower or base layer. -Key with `KC_TRANS` doesn't has its own keycode and refers to lower valid layers for keycode, instead. +You can place `KC_TRANS` on overlay layer changes just part of layout to fall back on lower or base layer. +Key with `KC_TRANS` (`KC_TRNS` and `_______` are the alias) doesn't has its own keycode and refers to lower valid layers for keycode, instead. See example below. ### 0.3 Keymap Example -Keymap is **`keymaps[]`** C array in fact and you can define layers in it with **`KEYMAP()`** C macro and keycodes. To use complex actions you need to define `Fn` keycode in **`fn_actions[]`** array. +Keymap in this QMK is **`static const uint16_t PROGMEM keymaps[]`** C array in fact and you can define layers in it with **`KEYMAP()`** C macro and keycodes. To use complex actions you need to define `Fn` keycode in **`fn_actions[]`** array. It holds the 16 bit quantum keycode (action code). + +> Please note that keymap in the TMK, which QMK was forked from, is **`static const uint8_t PROGMEM keymaps[]`** C array which holds the 8 bit keycode (~USB HID usage code). This is a keymap example for [HHKB](http://en.wikipedia.org/wiki/Happy_Hacking_Keyboard) keyboard. -This example has three layers, 'Qwerty' as base layer, 'Cursor' and 'Mousekey'. +This example has three layers, 'QWERTY' as base layer, 'FN' and 'MOUSE'. + In this example, - `Fn0` is a **momentary layer switching** key, you can use keys on Cursor layer while holding the key. + `MO(layer)` is a **momentary layer switching** key. - `Fn1` is a momentary layer switching key with tapping feature, you can get semicolon **';'** with taping the key and switch layers while holding the key. The word **'tap'** or **'tapping'** mean to press and release a key quickly. +You can find other keymap definitions in file `keymap.c` located on project directories. +``` +/* + * dbroqua HHKB Layout + */ +#include "hhkb.h" + +#define BASE 0 +#define FN 1 +#define MOUSE 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* BASE Level: Default Layer + * ,-----------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | + * |-----------------------------------------------------------------------------------------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp | + * |-----------------------------------------------------------------------------------------+ + * | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter | + * |-----------------------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | fn | + * +-----------------------------------------------------------------------------------------+ + * | Gui | Alt | Space | AltGr |Mouse| + * `----------------------------------------------------------------´ + */ + [BASE] = KEYMAP( + KC_ESC, 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_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_LCTL, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(FN), \ + KC_LGUI, KC_LALT, /* */ KC_SPC, KC_RALT, MO(MOUSE) + ), + + /* FN Layer + * ,-----------------------------------------------------------------------------------------. + * | Pwr | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F0 | F11 | F12 | Ins | Del| + * |-----------------------------------------------------------------------------------------+ + * | Caps | | | | | | | |PrtSc| Slck| Paus| Up | | | + * |-----------------------------------------------------------------------------------------+ + * | | Vol-| Vol+| Mute| | | * | / | Home| PgUp| Left |Right| | + * |-----------------------------------------------------------------------------------------+ + * | | Prev| Play| Next| | | + | - | End |PgDwn| Down| | | + * +-----------------------------------------------------------------------------------------+ + * | | | | Stop | | + * `----------------------------------------------------------------´ + */ + [FN] = KEYMAP( + KC_PWR, 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_INS, KC_DEL, \ + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, \ + KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_MSTP, KC_TRNS + ), + + /* MOUSE Layer + * ,-----------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------------------------------------+ + * | | | WUp | | | | | | | | Btn1| Up | Btn2| | + * |-----------------------------------------------------------------------------------------+ + * | | WLt | WDn | WRt | | | | | | | Left |Right| | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | | Btn3| Down| | | + * +-----------------------------------------------------------------------------------------+ + * | | | | | | + * `----------------------------------------------------------------´ + */ + [MOUSE] = 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, \ + KC_TRNS, KC_TRNS, KC_WH_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, \ + KC_TRNS, KC_WH_L, KC_WH_D, KC_WH_R, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_R, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN3, KC_MS_D, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; - `Fn2` is a **toggle layer switch** key, you can stay switched layer after releasing the key unlike momentary switching. +const uint16_t PROGMEM fn_actions[] = { -You can find other keymap definitions in file `keymap.c` located on project directories. +}; - static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* 0: Qwerty - * ,-----------------------------------------------------------. - * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `| - * |-----------------------------------------------------------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]|Backs| - * |-----------------------------------------------------------| - * |Contro| A| S| D| F| G| H| J| K| L|Fn1| '|Enter | - * |-----------------------------------------------------------| - * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Fn0| - * `-----------------------------------------------------------' - * |Gui|Alt |Space |Alt |Fn2| - * `-------------------------------------------' - */ - KEYMAP(ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSLS,GRV, \ - TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSPC, \ - LCTL,A, S, D, F, G, H, J, K, L, FN1, QUOT,ENT, \ - LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH,RSFT,FN0, \ - LGUI,LALT, SPC, RALT,FN2), - /* 1: Cursor(HHKB mode) - * ,-----------------------------------------------------------. - * |Pwr| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del| - * |-----------------------------------------------------------| - * |Caps | | | | | | | |Psc|Slk|Pus|Up | |Backs| - * |-----------------------------------------------------------| - * |Contro|VoD|VoU|Mut| | | *| /|Hom|PgU|Lef|Rig|Enter | - * |-----------------------------------------------------------| - * |Shift | | | | | | +| -|End|PgD|Dow|Shift | | - * `-----------------------------------------------------------' - * |Gui |Alt |Space |Alt |Gui| - * `--------------------------------------------' - */ - KEYMAP(PWR, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, INS, DEL, \ - CAPS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PSCR,SLCK,PAUS,UP, TRNS,BSPC, \ - LCTL,VOLD,VOLU,MUTE,TRNS,TRNS,PAST,PSLS,HOME,PGUP,LEFT,RGHT,ENT, \ - LSFT,TRNS,TRNS,TRNS,TRNS,TRNS,PPLS,PMNS,END, PGDN,DOWN,RSFT,TRNS, \ - LGUI,LALT, SPC, RALT,RGUI), - /* 2: Mousekey - * ,-----------------------------------------------------------. - * |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del| - * |-----------------------------------------------------------| - * |Tab | | | | | |MwL|MwD|MwU|MwR| | | |Backs| - * |-----------------------------------------------------------| - * |Contro| | | | | |McL|McD|McU|McR| | |Return | - * |-----------------------------------------------------------| - * |Shift | | | | |Mb3|Mb2|Mb1|Mb4|Mb5| |Shift | | - * `-----------------------------------------------------------' - * |Gui |Alt |Mb1 |Alt | | - * `--------------------------------------------' - * Mc: Mouse Cursor / Mb: Mouse Button / Mw: Mouse Wheel - */ - KEYMAP(ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, INS, DEL, \ - TAB, TRNS,TRNS,TRNS,TRNS,TRNS,WH_L,WH_D,WH_U,WH_R,TRNS,TRNS,TRNS,BSPC, \ - LCTL,TRNS,ACL0,ACL1,ACL2,TRNS,MS_L,MS_D,MS_U,MS_R,TRNS,QUOT,ENT, \ - LSFT,TRNS,TRNS,TRNS,TRNS,BTN3,BTN2,BTN1,BTN4,BTN5,SLSH,RSFT,TRNS, \ - LGUI,LALT, BTN1, RALT,TRNS), - }; +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; +``` - static const uint16_t PROGMEM fn_actions[] = { - ACTION_LAYER_MOMENTARY(1), // FN0 - ACTION_LAYER_TAP_KEY(2, KC_SCLN), // FN1 - ACTION_LAYER_TOGGLE(2), // FN2 - }; +## 1. Keycode +See [`tmk_core/common/keycode.h`](../tmk_core/common/keycode.h) or keycode table below for the detail. Keycode is internal **8bit code** to indicate action performed on key in keymap. Keycodes are based on [HID Usage Keyboard/Keypad Page(0x07)](http://www.usb.org/developers/hidpage/Hut1_12v2.pdf) plus special codes in the `0xA5-DF` range. + +Keycode has `KC_` prefixed symbol respectively. Most of keycodes like `KC_A` have simple action registers key to host on press and unregister on release, while some of other keycodes has some special actions like `Fn` keys, Media control keys, System control keys and Mousekeys. +keymaps[] +In `KEYMAP()` macro, TMK recommends you to keep prefix part `KC_` of keycode to keep keymap compact. For example, just use `A` instead you place `KC_A` in `KEYMAP()`. But this doesn't apply for QMK. -## 1. Keycode -See [`common/keycode.h`](../common/keycode.h) or keycode table below for the detail. Keycode is internal **8bit code** to indicate action performed on key in keymap. Keycode has `KC_` prefixed symbol respectively. Most of keycodes like `KC_A` have simple action registers key to host on press and unregister on release, while some of other keycodes has some special actions like `Fn` keys, Media control keys, System control keys and Mousekeys. +The `KEYMAP()` macro defines correspondence between the physical key location to the electrical key connection. - ***In `KEYMAP()` macro you should omit prefix part `KC_` of keycode to keep keymap compact.*** For example, just use `A` instead you place `KC_A` in `KEYMAP()`. Some keycodes has 4-letter **short name** in addition to descriptive name, you'll prefer short one in `KEYMAP()`. +Some keycodes has 7-letter **short name** such as `KC_COMM` in addition to descriptive name `KC_COMMA`, you'll prefer short one in `KEYMAP()`. ### 1.0 Other key - `KC_NO` for no action @@ -192,7 +246,10 @@ There are 8 modifiers which has discrimination between left and right. - `KC_WSCH`, `KC_WHOM`, `KC_WBAK`, `KC_WFWD`, `KC_WSTP`, `KC_WREF`, `KC_WFAV` for web browser operation ### 1.5 Fn key -`KC_FNnn` are keycodes for `Fn` key which not given any actions at the beginning unlike most of keycodes has its own inborn action. To use these keycodes in `KEYMAP()` you need to assign action you want at first. Action of `Fn` key is defined in `fn_actions[]` and its index of the array is identical with number part of `KC_FNnn`. Thus `KC_FN0` keycode indicates the action defined in first element of the array. ***32 `Fn` keys can be defined at most.*** +You don't need to use this functionality under QMK since this is a backward compatibility functionality. Unlike TMK, you can write action code itself directly in **`static const uint16_t PROGMEM keymaps[]`** C array using `MO(layer)`, etc. + +`KC_FNnn` are keycodes for `Fn` key which not given any actions at the beginning unlike most of keycodes has its own inborn action. To use these keycodes in `KEYMAP()` you need to assign action you want at first. Action of `Fn` key is defined in `fn_actions[]` and its index of the array is identical with number part of `KC_FNnn`. Thus `KC_FN0` keycode indicates the action defined in first element of the array. ***Only 32 `Fn` keys can be defined at most.*** + ### 1.6 Keycode Table See keycode table in [`doc/keycode.txt`](./keycode.txt) for description of keycodes. @@ -581,15 +638,11 @@ Similar to layer tap toggle, this works as a momentary modifier when holding, bu ## 5. Legacy Keymap -This was used in prior version and still works due to legacy support code in `common/keymap.c`. Legacy keymap doesn't support many of features that new keymap offers. ***It is not recommended to use Legacy Keymap for new project.*** - -To enable Legacy Keymap support define this macro in `config.h`. - - #define USE_LEGACY_KEYMAP +In QMK, `tmk_core/common/keymap.c` is missing and its replacement `quantum/keymap_common.c` lacks Legacy Keymap support. Legacy Keymap uses two arrays `fn_layer[]` and `fn_keycode[]` to define Fn key. The index of arrays corresponds with postfix number of `Fn` key. Array `fn_layer[]` indicates destination layer to switch and `fn_keycode[]` has keycodes to send when tapping `Fn` key. -In following setting example, `Fn0`, `Fn1` and `Fn2` switch layer to 1, 2 and 2 respectively. `Fn2` registers `Space` key when tapping while `Fn0` and `Fn1` doesn't send any key. +In the following legacy keymap setting example, `Fn0`, `Fn1` and `Fn2` switch layer to 1, 2 and 2 respectively. `Fn2` registers `Space` key when tapping while `Fn0` and `Fn1` doesn't send any key. static const uint8_t PROGMEM fn_layer[] = { 1, // Fn0 @@ -603,6 +656,7 @@ In following setting example, `Fn0`, `Fn1` and `Fn2` switch layer to 1, 2 and 2 KC_SPC, // Fn2 }; +Under QMK, these can be realized using action code ACTION_LAYER_TAP_KEY(1, KC_NO), ACTION_LAYER_TAP_KEY(2, KC_NO), and ACTION_LAYER_TAP_KEY(2, KC_SPC) in the `keymaps` directly. ## 6. Terminology ***TBD*** -- cgit v1.2.3 From 71da013995ec72293ab1f3e2518a99d64ec486fb Mon Sep 17 00:00:00 2001 From: Travis La Marr Date: Wed, 29 Mar 2017 23:03:04 -0400 Subject: Add RN42 Bluetooth module support Added support for sending HID keycodes over the RN42/reflashed HC05 module. Tested on OS X and iOS. --- tmk_core/common.mk | 5 +++++ tmk_core/protocol/lufa.mk | 5 +++++ tmk_core/protocol/lufa/bluetooth.h | 16 +++++++++++++++- tmk_core/protocol/lufa/lufa.c | 19 ++++++++++++++++++- 4 files changed, 43 insertions(+), 2 deletions(-) diff --git a/tmk_core/common.mk b/tmk_core/common.mk index 47f6fc571..3e0bd7dbc 100644 --- a/tmk_core/common.mk +++ b/tmk_core/common.mk @@ -107,6 +107,11 @@ ifeq ($(strip $(BLUETOOTH)), AdafruitEZKey) TMK_COMMON_DEFS += -DMODULE_ADAFRUIT_EZKEY endif +ifeq ($(strip $(BLUETOOTH)), RN42) + TMK_COMMON_DEFS += -DBLUETOOTH_ENABLE + TMK_COMMON_DEFS += -DMODULE_RN42 +endif + ifeq ($(strip $(ONEHAND_ENABLE)), yes) TMK_COMMON_DEFS += -DONEHAND_ENABLE endif diff --git a/tmk_core/protocol/lufa.mk b/tmk_core/protocol/lufa.mk index 5b1577972..7ce727dab 100644 --- a/tmk_core/protocol/lufa.mk +++ b/tmk_core/protocol/lufa.mk @@ -36,6 +36,11 @@ ifeq ($(strip $(BLUETOOTH)), AdafruitEZKey) $(TMK_DIR)/protocol/serial_uart.c endif +ifeq ($(strip $(BLUETOOTH)), RN42) + LUFA_SRC += $(LUFA_DIR)/bluetooth.c \ + $(TMK_DIR)/protocol/serial_uart.c +endif + ifeq ($(strip $(VIRTSER_ENABLE)), yes) LUFA_SRC += $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/CDCClassDevice.c endif diff --git a/tmk_core/protocol/lufa/bluetooth.h b/tmk_core/protocol/lufa/bluetooth.h index 78ece1cd0..f4b2f6f8b 100644 --- a/tmk_core/protocol/lufa/bluetooth.h +++ b/tmk_core/protocol/lufa/bluetooth.h @@ -62,4 +62,18 @@ void bluefruit_serial_send(uint8_t data); (usage == AC_REFRESH ? 0x0000 : \ (usage == AC_BOOKMARKS ? 0x0000 : 0))))))))))))))))))) -#endif \ No newline at end of file +#define CONSUMER2RN42(usage) \ + (usage == AUDIO_MUTE ? 0x0040 : \ + (usage == AUDIO_VOL_UP ? 0x0010 : \ + (usage == AUDIO_VOL_DOWN ? 0x0020 : \ + (usage == TRANSPORT_NEXT_TRACK ? 0x0100 : \ + (usage == TRANSPORT_PREV_TRACK ? 0x0200 : \ + (usage == TRANSPORT_STOP ? 0x0400 : \ + (usage == TRANSPORT_STOP_EJECT ? 0x0800 : \ + (usage == TRANSPORT_PLAY_PAUSE ? 0x0080 : \ + (usage == AL_EMAIL ? 0x0200 : \ + (usage == AL_LOCAL_BROWSER ? 0x8000 : \ + (usage == AC_SEARCH ? 0x0400 : \ + (usage == AC_HOME ? 0x0100 : 0)))))))))))) + + #endif diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index 60cba8d2a..ae6129d1a 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -606,6 +606,13 @@ static void send_keyboard(report_keyboard_t *report) if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) { #ifdef MODULE_ADAFRUIT_BLE adafruit_ble_send_keys(report->mods, report->keys, sizeof(report->keys)); + #elif MODULE_RN42 + bluefruit_serial_send(0xFD); + bluefruit_serial_send(0x09); + bluefruit_serial_send(0x01); + for (uint8_t i = 0; i < KEYBOARD_EPSIZE; i++) { + bluefruit_serial_send(report->raw[i]); + } #else bluefruit_serial_send(0xFD); for (uint8_t i = 0; i < KEYBOARD_EPSIZE; i++) { @@ -726,6 +733,16 @@ static void send_consumer(uint16_t data) if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) { #ifdef MODULE_ADAFRUIT_BLE adafruit_ble_send_consumer_key(data, 0); + #elif MODULE_RN42 + static uint16_t last_data = 0; + if (data == last_data) return; + last_data = data; + uint16_t bitmap = CONSUMER2RN42(data); + bluefruit_serial_send(0xFD); + bluefruit_serial_send(0x03); + bluefruit_serial_send(0x03); + bluefruit_serial_send(bitmap&0xFF); + bluefruit_serial_send((bitmap>>8)&0xFF); #else static uint16_t last_data = 0; if (data == last_data) return; @@ -1132,7 +1149,7 @@ int main(void) // midi_send_noteoff(&midi_device, 0, 64, 127); #endif -#ifdef MODULE_ADAFRUIT_EZKEY +#if defined(MODULE_ADAFRUIT_EZKEY) || defined(MODULE_RN42) serial_init(); #endif -- cgit v1.2.3 From d145a1192f5833a427d58d69b355935232fb37fb Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Thu, 30 Mar 2017 13:22:16 +0100 Subject: changed hotkey cluster to accomodate awkward software --- keyboards/planck/keymaps/callum/keymap.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index aede27df7..d50b04319 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -14,7 +14,7 @@ extern keymap_config_t keymap_config; #define _FUNC 4 #define ENDASH LALT(KC_MINS) #define POUND LALT(KC_3) -#define H(X) LALT(LCTL(X)) +#define H(X) RALT(X) enum planck_keycodes { MOVE = SAFE_RANGE, @@ -48,19 +48,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* MOVE * ,-----------------------------------------------------------------------------------. - * | H(3) | H(F1)| H(F2)| H(F3)| H(F4)| H(F5)| H(8) | Home | Up | End | H(7) | Esc | + * | H(F7)| H(F8)| H(6) | H(5) | H(4) | H(F9)|H(F10)| Home | Up | End | H(A) | Esc | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | H(4) | H(F6)| H(F7)| H(F8)| H(F9)|H(F10)| H(9) | Left | Down | Right| Caps | Del | + * | H(F3)| H(F4)| H(3) | H(2) | H(1) | H(F5)| H(F6)| Left | Down | Right| Caps | Del | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | |H(F11)|H(F12)| H(0) | H(1) | H(2) | H(A) | Pg Dn| Pg Up| H(5) | H(6) | | + * | | H(0) | H(9) | H(8) | H(7) | H(F1)| H(F2)| Pg Dn| Pg Up|H(F11)|H(F12)| | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ [_MOVE] = { - {H(KC_3), H(KC_F1),H(KC_F2),H(KC_F3),H(KC_F4),H(KC_F5),H(KC_8), KC_HOME, KC_UP, KC_END, H(KC_7), KC_ESC }, - {H(KC_4), H(KC_F6),H(KC_F7),H(KC_F8),H(KC_F9),H(KC_F10),H(KC_9),KC_LEFT, KC_DOWN, KC_RGHT, KC_CAPS, KC_DEL }, - {_______, H(KC_F11),H(KC_F12),H(KC_0),H(KC_1),H(KC_2), H(KC_A), KC_PGDN, KC_PGUP, H(KC_5), H(KC_6), _______}, + {H(KC_F7),H(KC_F8),H(KC_6), H(KC_5), H(KC_4), H(KC_F9),H(KC_F10),KC_HOME,KC_UP, KC_END, H(KC_A), KC_ESC }, + {H(KC_F3),H(KC_F4),H(KC_3), H(KC_2), H(KC_1), H(KC_F5),H(KC_F6),KC_LEFT, KC_DOWN, KC_RGHT, KC_CAPS, KC_DEL }, + {_______, H(KC_0), H(KC_9), H(KC_8), H(KC_7), H(KC_F1),H(KC_F2),KC_PGDN,KC_PGUP,H(KC_F11),H(KC_F12),_______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} }, -- cgit v1.2.3 From 3f3f208113abb928209d608d4d763267005d488b Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Thu, 30 Mar 2017 14:20:18 +0100 Subject: changed hotkey cluster to accomodate awkward software... again --- keyboards/planck/keymaps/callum/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index d50b04319..09063cb97 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -14,7 +14,7 @@ extern keymap_config_t keymap_config; #define _FUNC 4 #define ENDASH LALT(KC_MINS) #define POUND LALT(KC_3) -#define H(X) RALT(X) +#define H(X) LALT(LCTL(X)) enum planck_keycodes { MOVE = SAFE_RANGE, -- cgit v1.2.3 From 3a1ee48cda5f185ebb3a4f989b389edf029992bb Mon Sep 17 00:00:00 2001 From: Osamu Aoki Date: Mon, 13 Mar 2017 17:11:05 +0000 Subject: Typo fix --- quantum/template/template.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quantum/template/template.h b/quantum/template/template.h index e912188ba..7e2b14f3c 100644 --- a/quantum/template/template.h +++ b/quantum/template/template.h @@ -20,7 +20,7 @@ // This a shortcut to help you visually see your layout. // The following is an example using the Planck MIT layout -// The first section contains all of the arguements +// The first section contains all of the arguments // The second converts the arguments into a two-dimensional array #define KEYMAP( \ k00, k01, k02, \ -- cgit v1.2.3 From ccbdf90f02067bc37975130ca8c4b26d2497dcf7 Mon Sep 17 00:00:00 2001 From: Osamu Aoki Date: Sun, 12 Mar 2017 02:41:47 +0900 Subject: Update to match QMK keymap --- doc/keymap.md | 232 ++++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 143 insertions(+), 89 deletions(-) diff --git a/doc/keymap.md b/doc/keymap.md index 2b0d2cd95..bc7809905 100644 --- a/doc/keymap.md +++ b/doc/keymap.md @@ -1,15 +1,30 @@ Keymap framework - how to define your keymap ============================================ -***NOTE: This is not final version, may be inconsistent with source code and changed occasionally for a while.*** +***NOTE: This is updated for QMK but this is still work in progress. This may still be inconsistent with the source code.*** + +QMK is based on TMK. Understanding the essential changes made should help you understand variable names etc. + +## TMK vs. QMK + +| Firmware |TMK |QMK | +|-------------------------------------------------|-----------------------|-------------------------| +| Maintainer |hasu |Jack Humbert et al. | +| Build path customization | `TMK_DIR = ...` | `include .../Makefile` | +| `keymaps` data | 3D array of `uint8_t` holding **keycode** | 3D array of `uint16_t` holding **action code** | +| `fn_actions` data | 1D array of `uint16_t` holding **action code** | 3D array of `uint16_t` holding **action code** | + +Since QMK is based on TMK and uses major portion of TMK code as is, understanding the essential changes made should help you understand the code. ## 0. Keymap and layers -**Keymap** is comprised of multiple layers of key layout, you can define **32 layers** at most. -**Layer** is an array of **keycodes** to define **actions** for each physical keys. -respective layers can be validated simultaneously. Layers are indexed with 0 to 31 and higher layer has precedence. +In QMK, **`const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS]`** holds multiple **layers** of keymap information in **16 bit** data holding the **action code**. You can define **32 layers** at most. - Keymap: 32 Layers Layer: Keycode matrix +For trivial key definitions, the higher 8 bits of the **action code** are all 0 and the lower 8 bits holds the USB HID usage code generated by the key as **keycode**. + +Respective layers can be validated simultaneously. Layers are indexed with 0 to 31 and higher layer has precedence. + + Keymap: 32 Layers Layer: action code matrix ----------------- --------------------- - stack of layers array_of_keycode[row][column] + stack of layers array_of_action_code[row][column] ____________ precedence _______________________ / / | high / ESC / F1 / F2 / F3 .... 31 /___________// | /-----/-----/-----/----- @@ -22,11 +37,15 @@ respective layers can be validated simultaneously. Layers are indexed with 0 to 0 /___________/ V low 0 `-------------------------- +Sometimes, the action code stored in keymap may be referred as keycode in some documents due to the TMK history. + +### 0.1 Keymap layer status +Keymap layer has its state in two 32 bit parameters: -### 0.1 Keymap status -Keymap has its state in two parameters: -**`default_layer`** indicates a base keymap layer(0-31) which is always valid and to be referred, **`keymap_stat`** is 16bit variable which has current on/off status of layers on its each bit. +* **`default_layer_state`** indicates a base keymap layer(0-31) which is always valid and to be referred. +* **`layer_state`** () has current on/off status of the layer on its each bit. +Keymap has its state in two parameter**`default_layer`** indicates a base keymap layer(0-31) which is always valid and to be referred, **`keymap_stat`** is 16bit variable which has current on/off status of layers on its each bit. Keymap layer '0' is usually `default_layer` and which is the only valid layer and other layers is initially off after boot up firmware, though, you can configured them in `config.h`. To change `default_layer` will be useful when you switch key layout completely, say you want Colmak instead of Qwerty. @@ -67,97 +86,132 @@ On the other hand, you shall change `layer_state` to overlay base layer with som ### 0.2 Layer Precedence and Transparency Note that ***higher layer has higher priority on stack of layers***, namely firmware falls down from top layer to bottom to look up keycode. Once it spots keycode other than **`KC_TRNS`**(transparent) on a layer it stops searching and lower layers aren't referred. -You can place `KC_TRNS` on overlay layer changes just part of layout to fall back on lower or base layer. -Key with `KC_TRANS` doesn't has its own keycode and refers to lower valid layers for keycode, instead. +You can place `KC_TRANS` on overlay layer changes just part of layout to fall back on lower or base layer. +Key with `KC_TRANS` (`KC_TRNS` and `_______` are the alias) doesn't has its own keycode and refers to lower valid layers for keycode, instead. See example below. ### 0.3 Keymap Example -Keymap is **`keymaps[]`** C array in fact and you can define layers in it with **`KEYMAP()`** C macro and keycodes. To use complex actions you need to define `Fn` keycode in **`fn_actions[]`** array. +Keymap in this QMK is **`static const uint16_t PROGMEM keymaps[]`** C array in fact and you can define layers in it with **`KEYMAP()`** C macro and keycodes. To use complex actions you need to define `Fn` keycode in **`fn_actions[]`** array. It holds the 16 bit quantum keycode (action code). + +> Please note that keymap in the TMK, which QMK was forked from, is **`static const uint8_t PROGMEM keymaps[]`** C array which holds the 8 bit keycode (~USB HID usage code). This is a keymap example for [HHKB](http://en.wikipedia.org/wiki/Happy_Hacking_Keyboard) keyboard. -This example has three layers, 'Qwerty' as base layer, 'Cursor' and 'Mousekey'. +This example has three layers, 'QWERTY' as base layer, 'FN' and 'MOUSE'. + In this example, - `Fn0` is a **momentary layer switching** key, you can use keys on Cursor layer while holding the key. + `MO(layer)` is a **momentary layer switching** key. - `Fn1` is a momentary layer switching key with tapping feature, you can get semicolon **';'** with taping the key and switch layers while holding the key. The word **'tap'** or **'tapping'** mean to press and release a key quickly. +You can find other keymap definitions in file `keymap.c` located on project directories. +``` +/* + * dbroqua HHKB Layout + */ +#include "hhkb.h" + +#define BASE 0 +#define FN 1 +#define MOUSE 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* BASE Level: Default Layer + * ,-----------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | + * |-----------------------------------------------------------------------------------------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp | + * |-----------------------------------------------------------------------------------------+ + * | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter | + * |-----------------------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | fn | + * +-----------------------------------------------------------------------------------------+ + * | Gui | Alt | Space | AltGr |Mouse| + * `----------------------------------------------------------------´ + */ + [BASE] = KEYMAP( + KC_ESC, 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_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_LCTL, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(FN), \ + KC_LGUI, KC_LALT, /* */ KC_SPC, KC_RALT, MO(MOUSE) + ), + + /* FN Layer + * ,-----------------------------------------------------------------------------------------. + * | Pwr | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F0 | F11 | F12 | Ins | Del| + * |-----------------------------------------------------------------------------------------+ + * | Caps | | | | | | | |PrtSc| Slck| Paus| Up | | | + * |-----------------------------------------------------------------------------------------+ + * | | Vol-| Vol+| Mute| | | * | / | Home| PgUp| Left |Right| | + * |-----------------------------------------------------------------------------------------+ + * | | Prev| Play| Next| | | + | - | End |PgDwn| Down| | | + * +-----------------------------------------------------------------------------------------+ + * | | | | Stop | | + * `----------------------------------------------------------------´ + */ + [FN] = KEYMAP( + KC_PWR, 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_INS, KC_DEL, \ + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, \ + KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_MSTP, KC_TRNS + ), + + /* MOUSE Layer + * ,-----------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------------------------------------+ + * | | | WUp | | | | | | | | Btn1| Up | Btn2| | + * |-----------------------------------------------------------------------------------------+ + * | | WLt | WDn | WRt | | | | | | | Left |Right| | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | | Btn3| Down| | | + * +-----------------------------------------------------------------------------------------+ + * | | | | | | + * `----------------------------------------------------------------´ + */ + [MOUSE] = 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, \ + KC_TRNS, KC_TRNS, KC_WH_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, \ + KC_TRNS, KC_WH_L, KC_WH_D, KC_WH_R, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_R, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN3, KC_MS_D, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; - `Fn2` is a **toggle layer switch** key, you can stay switched layer after releasing the key unlike momentary switching. +const uint16_t PROGMEM fn_actions[] = { -You can find other keymap definitions in file `keymap.c` located on project directories. +}; - static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* 0: Qwerty - * ,-----------------------------------------------------------. - * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `| - * |-----------------------------------------------------------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]|Backs| - * |-----------------------------------------------------------| - * |Contro| A| S| D| F| G| H| J| K| L|Fn1| '|Enter | - * |-----------------------------------------------------------| - * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Fn0| - * `-----------------------------------------------------------' - * |Gui|Alt |Space |Alt |Fn2| - * `-------------------------------------------' - */ - KEYMAP(ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSLS,GRV, \ - TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSPC, \ - LCTL,A, S, D, F, G, H, J, K, L, FN1, QUOT,ENT, \ - LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH,RSFT,FN0, \ - LGUI,LALT, SPC, RALT,FN2), - /* 1: Cursor(HHKB mode) - * ,-----------------------------------------------------------. - * |Pwr| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del| - * |-----------------------------------------------------------| - * |Caps | | | | | | | |Psc|Slk|Pus|Up | |Backs| - * |-----------------------------------------------------------| - * |Contro|VoD|VoU|Mut| | | *| /|Hom|PgU|Lef|Rig|Enter | - * |-----------------------------------------------------------| - * |Shift | | | | | | +| -|End|PgD|Dow|Shift | | - * `-----------------------------------------------------------' - * |Gui |Alt |Space |Alt |Gui| - * `--------------------------------------------' - */ - KEYMAP(PWR, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, INS, DEL, \ - CAPS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PSCR,SLCK,PAUS,UP, TRNS,BSPC, \ - LCTL,VOLD,VOLU,MUTE,TRNS,TRNS,PAST,PSLS,HOME,PGUP,LEFT,RGHT,ENT, \ - LSFT,TRNS,TRNS,TRNS,TRNS,TRNS,PPLS,PMNS,END, PGDN,DOWN,RSFT,TRNS, \ - LGUI,LALT, SPC, RALT,RGUI), - /* 2: Mousekey - * ,-----------------------------------------------------------. - * |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del| - * |-----------------------------------------------------------| - * |Tab | | | | | |MwL|MwD|MwU|MwR| | | |Backs| - * |-----------------------------------------------------------| - * |Contro| | | | | |McL|McD|McU|McR| | |Return | - * |-----------------------------------------------------------| - * |Shift | | | | |Mb3|Mb2|Mb1|Mb4|Mb5| |Shift | | - * `-----------------------------------------------------------' - * |Gui |Alt |Mb1 |Alt | | - * `--------------------------------------------' - * Mc: Mouse Cursor / Mb: Mouse Button / Mw: Mouse Wheel - */ - KEYMAP(ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, INS, DEL, \ - TAB, TRNS,TRNS,TRNS,TRNS,TRNS,WH_L,WH_D,WH_U,WH_R,TRNS,TRNS,TRNS,BSPC, \ - LCTL,TRNS,ACL0,ACL1,ACL2,TRNS,MS_L,MS_D,MS_U,MS_R,TRNS,QUOT,ENT, \ - LSFT,TRNS,TRNS,TRNS,TRNS,BTN3,BTN2,BTN1,BTN4,BTN5,SLSH,RSFT,TRNS, \ - LGUI,LALT, BTN1, RALT,TRNS), - }; +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; +``` - static const uint16_t PROGMEM fn_actions[] = { - ACTION_LAYER_MOMENTARY(1), // FN0 - ACTION_LAYER_TAP_KEY(2, KC_SCLN), // FN1 - ACTION_LAYER_TOGGLE(2), // FN2 - }; +## 1. Keycode +See [`tmk_core/common/keycode.h`](../tmk_core/common/keycode.h) or keycode table below for the detail. Keycode is internal **8bit code** to indicate action performed on key in keymap. Keycodes are based on [HID Usage Keyboard/Keypad Page(0x07)](http://www.usb.org/developers/hidpage/Hut1_12v2.pdf) plus special codes in the `0xA5-DF` range. + +Keycode has `KC_` prefixed symbol respectively. Most of keycodes like `KC_A` have simple action registers key to host on press and unregister on release, while some of other keycodes has some special actions like `Fn` keys, Media control keys, System control keys and Mousekeys. +keymaps[] +In `KEYMAP()` macro, TMK recommends you to keep prefix part `KC_` of keycode to keep keymap compact. For example, just use `A` instead you place `KC_A` in `KEYMAP()`. But this doesn't apply for QMK. -## 1. Keycode -See [`common/keycode.h`](../common/keycode.h) or keycode table below for the detail. Keycode is internal **8bit code** to indicate action performed on key in keymap. Keycode has `KC_` prefixed symbol respectively. Most of keycodes like `KC_A` have simple action registers key to host on press and unregister on release, while some of other keycodes has some special actions like `Fn` keys, Media control keys, System control keys and Mousekeys. +The `KEYMAP()` macro defines correspondence between the physical key location to the electrical key connection. - ***In `KEYMAP()` macro you should omit prefix part `KC_` of keycode to keep keymap compact.*** For example, just use `A` instead you place `KC_A` in `KEYMAP()`. Some keycodes has 4-letter **short name** in addition to descriptive name, you'll prefer short one in `KEYMAP()`. +Some keycodes has 7-letter **short name** such as `KC_COMM` in addition to descriptive name `KC_COMMA`, you'll prefer short one in `KEYMAP()`. ### 1.0 Other key - `KC_NO` for no action @@ -192,7 +246,10 @@ There are 8 modifiers which has discrimination between left and right. - `KC_WSCH`, `KC_WHOM`, `KC_WBAK`, `KC_WFWD`, `KC_WSTP`, `KC_WREF`, `KC_WFAV` for web browser operation ### 1.5 Fn key -`KC_FNnn` are keycodes for `Fn` key which not given any actions at the beginning unlike most of keycodes has its own inborn action. To use these keycodes in `KEYMAP()` you need to assign action you want at first. Action of `Fn` key is defined in `fn_actions[]` and its index of the array is identical with number part of `KC_FNnn`. Thus `KC_FN0` keycode indicates the action defined in first element of the array. ***32 `Fn` keys can be defined at most.*** +You don't need to use this functionality under QMK since this is a backward compatibility functionality. Unlike TMK, you can write action code itself directly in **`static const uint16_t PROGMEM keymaps[]`** C array using `MO(layer)`, etc. + +`KC_FNnn` are keycodes for `Fn` key which not given any actions at the beginning unlike most of keycodes has its own inborn action. To use these keycodes in `KEYMAP()` you need to assign action you want at first. Action of `Fn` key is defined in `fn_actions[]` and its index of the array is identical with number part of `KC_FNnn`. Thus `KC_FN0` keycode indicates the action defined in first element of the array. ***Only 32 `Fn` keys can be defined at most.*** + ### 1.6 Keycode Table See keycode table in [`doc/keycode.txt`](./keycode.txt) for description of keycodes. @@ -584,15 +641,11 @@ Similar to layer tap toggle, this works as a momentary modifier when holding, bu ## 5. Legacy Keymap -This was used in prior version and still works due to legacy support code in `common/keymap.c`. Legacy keymap doesn't support many of features that new keymap offers. ***It is not recommended to use Legacy Keymap for new project.*** - -To enable Legacy Keymap support define this macro in `config.h`. - - #define USE_LEGACY_KEYMAP +In QMK, `tmk_core/common/keymap.c` is missing and its replacement `quantum/keymap_common.c` lacks Legacy Keymap support. Legacy Keymap uses two arrays `fn_layer[]` and `fn_keycode[]` to define Fn key. The index of arrays corresponds with postfix number of `Fn` key. Array `fn_layer[]` indicates destination layer to switch and `fn_keycode[]` has keycodes to send when tapping `Fn` key. -In following setting example, `Fn0`, `Fn1` and `Fn2` switch layer to 1, 2 and 2 respectively. `Fn2` registers `Space` key when tapping while `Fn0` and `Fn1` doesn't send any key. +In the following legacy keymap setting example, `Fn0`, `Fn1` and `Fn2` switch layer to 1, 2 and 2 respectively. `Fn2` registers `Space` key when tapping while `Fn0` and `Fn1` doesn't send any key. static const uint8_t PROGMEM fn_layer[] = { 1, // Fn0 @@ -606,6 +659,7 @@ In following setting example, `Fn0`, `Fn1` and `Fn2` switch layer to 1, 2 and 2 KC_SPC, // Fn2 }; +Under QMK, these can be realized using action code ACTION_LAYER_TAP_KEY(1, KC_NO), ACTION_LAYER_TAP_KEY(2, KC_NO), and ACTION_LAYER_TAP_KEY(2, KC_SPC) in the `keymaps` directly. ## 6. Terminology ***TBD*** -- cgit v1.2.3 From eedb767279df6c43763cbf37b8fe75cfc224c80c Mon Sep 17 00:00:00 2001 From: Travis La Marr Date: Wed, 29 Mar 2017 23:03:04 -0400 Subject: Add RN42 Bluetooth module support Added support for sending HID keycodes over the RN42/reflashed HC05 module. Tested on OS X and iOS. --- tmk_core/common.mk | 5 +++++ tmk_core/protocol/lufa.mk | 5 +++++ tmk_core/protocol/lufa/bluetooth.h | 16 +++++++++++++++- tmk_core/protocol/lufa/lufa.c | 19 ++++++++++++++++++- 4 files changed, 43 insertions(+), 2 deletions(-) diff --git a/tmk_core/common.mk b/tmk_core/common.mk index 47f6fc571..3e0bd7dbc 100644 --- a/tmk_core/common.mk +++ b/tmk_core/common.mk @@ -107,6 +107,11 @@ ifeq ($(strip $(BLUETOOTH)), AdafruitEZKey) TMK_COMMON_DEFS += -DMODULE_ADAFRUIT_EZKEY endif +ifeq ($(strip $(BLUETOOTH)), RN42) + TMK_COMMON_DEFS += -DBLUETOOTH_ENABLE + TMK_COMMON_DEFS += -DMODULE_RN42 +endif + ifeq ($(strip $(ONEHAND_ENABLE)), yes) TMK_COMMON_DEFS += -DONEHAND_ENABLE endif diff --git a/tmk_core/protocol/lufa.mk b/tmk_core/protocol/lufa.mk index 5b1577972..7ce727dab 100644 --- a/tmk_core/protocol/lufa.mk +++ b/tmk_core/protocol/lufa.mk @@ -36,6 +36,11 @@ ifeq ($(strip $(BLUETOOTH)), AdafruitEZKey) $(TMK_DIR)/protocol/serial_uart.c endif +ifeq ($(strip $(BLUETOOTH)), RN42) + LUFA_SRC += $(LUFA_DIR)/bluetooth.c \ + $(TMK_DIR)/protocol/serial_uart.c +endif + ifeq ($(strip $(VIRTSER_ENABLE)), yes) LUFA_SRC += $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/CDCClassDevice.c endif diff --git a/tmk_core/protocol/lufa/bluetooth.h b/tmk_core/protocol/lufa/bluetooth.h index 78ece1cd0..f4b2f6f8b 100644 --- a/tmk_core/protocol/lufa/bluetooth.h +++ b/tmk_core/protocol/lufa/bluetooth.h @@ -62,4 +62,18 @@ void bluefruit_serial_send(uint8_t data); (usage == AC_REFRESH ? 0x0000 : \ (usage == AC_BOOKMARKS ? 0x0000 : 0))))))))))))))))))) -#endif \ No newline at end of file +#define CONSUMER2RN42(usage) \ + (usage == AUDIO_MUTE ? 0x0040 : \ + (usage == AUDIO_VOL_UP ? 0x0010 : \ + (usage == AUDIO_VOL_DOWN ? 0x0020 : \ + (usage == TRANSPORT_NEXT_TRACK ? 0x0100 : \ + (usage == TRANSPORT_PREV_TRACK ? 0x0200 : \ + (usage == TRANSPORT_STOP ? 0x0400 : \ + (usage == TRANSPORT_STOP_EJECT ? 0x0800 : \ + (usage == TRANSPORT_PLAY_PAUSE ? 0x0080 : \ + (usage == AL_EMAIL ? 0x0200 : \ + (usage == AL_LOCAL_BROWSER ? 0x8000 : \ + (usage == AC_SEARCH ? 0x0400 : \ + (usage == AC_HOME ? 0x0100 : 0)))))))))))) + + #endif diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index 60cba8d2a..ae6129d1a 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -606,6 +606,13 @@ static void send_keyboard(report_keyboard_t *report) if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) { #ifdef MODULE_ADAFRUIT_BLE adafruit_ble_send_keys(report->mods, report->keys, sizeof(report->keys)); + #elif MODULE_RN42 + bluefruit_serial_send(0xFD); + bluefruit_serial_send(0x09); + bluefruit_serial_send(0x01); + for (uint8_t i = 0; i < KEYBOARD_EPSIZE; i++) { + bluefruit_serial_send(report->raw[i]); + } #else bluefruit_serial_send(0xFD); for (uint8_t i = 0; i < KEYBOARD_EPSIZE; i++) { @@ -726,6 +733,16 @@ static void send_consumer(uint16_t data) if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) { #ifdef MODULE_ADAFRUIT_BLE adafruit_ble_send_consumer_key(data, 0); + #elif MODULE_RN42 + static uint16_t last_data = 0; + if (data == last_data) return; + last_data = data; + uint16_t bitmap = CONSUMER2RN42(data); + bluefruit_serial_send(0xFD); + bluefruit_serial_send(0x03); + bluefruit_serial_send(0x03); + bluefruit_serial_send(bitmap&0xFF); + bluefruit_serial_send((bitmap>>8)&0xFF); #else static uint16_t last_data = 0; if (data == last_data) return; @@ -1132,7 +1149,7 @@ int main(void) // midi_send_noteoff(&midi_device, 0, 64, 127); #endif -#ifdef MODULE_ADAFRUIT_EZKEY +#if defined(MODULE_ADAFRUIT_EZKEY) || defined(MODULE_RN42) serial_init(); #endif -- cgit v1.2.3 From 200ae0c519c0bba927e417ec154783ce4fd306fe Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Thu, 30 Mar 2017 13:22:16 +0100 Subject: changed hotkey cluster to accomodate awkward software --- keyboards/planck/keymaps/callum/keymap.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index aede27df7..d50b04319 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -14,7 +14,7 @@ extern keymap_config_t keymap_config; #define _FUNC 4 #define ENDASH LALT(KC_MINS) #define POUND LALT(KC_3) -#define H(X) LALT(LCTL(X)) +#define H(X) RALT(X) enum planck_keycodes { MOVE = SAFE_RANGE, @@ -48,19 +48,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* MOVE * ,-----------------------------------------------------------------------------------. - * | H(3) | H(F1)| H(F2)| H(F3)| H(F4)| H(F5)| H(8) | Home | Up | End | H(7) | Esc | + * | H(F7)| H(F8)| H(6) | H(5) | H(4) | H(F9)|H(F10)| Home | Up | End | H(A) | Esc | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | H(4) | H(F6)| H(F7)| H(F8)| H(F9)|H(F10)| H(9) | Left | Down | Right| Caps | Del | + * | H(F3)| H(F4)| H(3) | H(2) | H(1) | H(F5)| H(F6)| Left | Down | Right| Caps | Del | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | |H(F11)|H(F12)| H(0) | H(1) | H(2) | H(A) | Pg Dn| Pg Up| H(5) | H(6) | | + * | | H(0) | H(9) | H(8) | H(7) | H(F1)| H(F2)| Pg Dn| Pg Up|H(F11)|H(F12)| | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ [_MOVE] = { - {H(KC_3), H(KC_F1),H(KC_F2),H(KC_F3),H(KC_F4),H(KC_F5),H(KC_8), KC_HOME, KC_UP, KC_END, H(KC_7), KC_ESC }, - {H(KC_4), H(KC_F6),H(KC_F7),H(KC_F8),H(KC_F9),H(KC_F10),H(KC_9),KC_LEFT, KC_DOWN, KC_RGHT, KC_CAPS, KC_DEL }, - {_______, H(KC_F11),H(KC_F12),H(KC_0),H(KC_1),H(KC_2), H(KC_A), KC_PGDN, KC_PGUP, H(KC_5), H(KC_6), _______}, + {H(KC_F7),H(KC_F8),H(KC_6), H(KC_5), H(KC_4), H(KC_F9),H(KC_F10),KC_HOME,KC_UP, KC_END, H(KC_A), KC_ESC }, + {H(KC_F3),H(KC_F4),H(KC_3), H(KC_2), H(KC_1), H(KC_F5),H(KC_F6),KC_LEFT, KC_DOWN, KC_RGHT, KC_CAPS, KC_DEL }, + {_______, H(KC_0), H(KC_9), H(KC_8), H(KC_7), H(KC_F1),H(KC_F2),KC_PGDN,KC_PGUP,H(KC_F11),H(KC_F12),_______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} }, -- cgit v1.2.3 From b9225a28f253e1ec33b8c96798bfef4b8cc0918d Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Thu, 30 Mar 2017 14:20:18 +0100 Subject: changed hotkey cluster to accomodate awkward software... again --- keyboards/planck/keymaps/callum/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index d50b04319..09063cb97 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -14,7 +14,7 @@ extern keymap_config_t keymap_config; #define _FUNC 4 #define ENDASH LALT(KC_MINS) #define POUND LALT(KC_3) -#define H(X) RALT(X) +#define H(X) LALT(LCTL(X)) enum planck_keycodes { MOVE = SAFE_RANGE, -- cgit v1.2.3 From 7e54332890f4c376314f942574c6183c87a6e9c8 Mon Sep 17 00:00:00 2001 From: nielsenz Date: Thu, 30 Mar 2017 19:15:43 -0700 Subject: Pulling and pushing troubles --- quantum/process_keycode/process_unicode.c | 75 ------------------------ quantum/process_keycode/process_unicode_common.c | 15 +++++ 2 files changed, 15 insertions(+), 75 deletions(-) diff --git a/quantum/process_keycode/process_unicode.c b/quantum/process_keycode/process_unicode.c index cecfaeee9..1f16b9bdb 100644 --- a/quantum/process_keycode/process_unicode.c +++ b/quantum/process_keycode/process_unicode.c @@ -16,81 +16,6 @@ #include "process_unicode.h" #include "action_util.h" -static uint8_t input_mode; -static uint8_t first_flag = 0; - -__attribute__((weak)) -uint16_t hex_to_keycode(uint8_t hex) -{ - if (hex == 0x0) { - return KC_0; - } else if (hex < 0xA) { - return KC_1 + (hex - 0x1); - } else { - return KC_A + (hex - 0xA); - } -} - -void set_unicode_input_mode(uint8_t os_target) -{ - input_mode = os_target; - eeprom_update_byte(EECONFIG_UNICODEMODE, os_target); -} - -uint8_t get_unicode_input_mode(void) { - return input_mode; -} - -__attribute__((weak)) -void unicode_input_start (void) { - switch(input_mode) { - case UC_OSX: - register_code(KC_LALT); - break; - case UC_LNX: - register_code(KC_LCTL); - register_code(KC_LSFT); - register_code(KC_U); - unregister_code(KC_U); - unregister_code(KC_LSFT); - unregister_code(KC_LCTL); - break; - case UC_WIN: - register_code(KC_LALT); - register_code(KC_PPLS); - unregister_code(KC_PPLS); - break; - case UC_WINC: - register_code(KC_RALT); - unregister_code(KC_RALT); - register_code(KC_U); - unregister_code(KC_U); - } - wait_ms(UNICODE_TYPE_DELAY); -} - -__attribute__((weak)) -void unicode_input_finish (void) { - switch(input_mode) { - case UC_OSX: - case UC_WIN: - unregister_code(KC_LALT); - break; - case UC_LNX: - register_code(KC_SPC); - unregister_code(KC_SPC); - break; - } -} - -void register_hex(uint16_t hex) { - for(int i = 3; i >= 0; i--) { - uint8_t digit = ((hex >> (i*4)) & 0xF); - register_code(hex_to_keycode(digit)); - unregister_code(hex_to_keycode(digit)); - } -} - bool process_unicode(uint16_t keycode, keyrecord_t *record) { if (keycode > QK_UNICODE && record->event.pressed) { diff --git a/quantum/process_keycode/process_unicode_common.c b/quantum/process_keycode/process_unicode_common.c index 6012b4f07..b4d4231db 100644 --- a/quantum/process_keycode/process_unicode_common.c +++ b/quantum/process_keycode/process_unicode_common.c @@ -16,11 +16,14 @@ #include "process_unicode_common.h" +static uint8_t input_mode; +static uint8_t first_flag = 0; uint8_t mods; void set_unicode_input_mode(uint8_t os_target) { input_mode = os_target; + eeprom_update_byte(EECONFIG_UNICODEMODE, os_target); } uint8_t get_unicode_input_mode(void) { @@ -92,6 +95,18 @@ void unicode_input_finish (void) { if (mods & MOD_BIT(KC_RGUI)) register_code(KC_RGUI); } +__attribute__((weak)) +uint16_t hex_to_keycode(uint8_t hex) +{ + if (hex == 0x0) { + return KC_0; + } else if (hex < 0xA) { + return KC_1 + (hex - 0x1); + } else { + return KC_A + (hex - 0xA); + } +} + void register_hex(uint16_t hex) { for(int i = 3; i >= 0; i--) { uint8_t digit = ((hex >> (i*4)) & 0xF); -- cgit v1.2.3 From d1e66e2e0715c680a8da3216525b54fd8f2b671f Mon Sep 17 00:00:00 2001 From: nielsenz Date: Thu, 30 Mar 2017 20:10:34 -0700 Subject: Worked around some new Makefile issues. --- keyboards/planck/keymaps/zach/Makefile | 2 +- keyboards/planck/keymaps/zach/config.h | 2 +- .../planck/keymaps/zach/zach_common_functions.c | 50 +++++++++++----------- keyboards/preonic/keymaps/zach/Makefile | 4 +- keyboards/preonic/keymaps/zach/config.h | 2 +- .../preonic/keymaps/zach/zach_common_functions.c | 50 +++++++++++----------- quantum/process_keycode/process_tap_dance.c | 2 + quantum/process_keycode/process_unicode.c | 1 + quantum/process_keycode/process_unicode_common.c | 1 - 9 files changed, 58 insertions(+), 56 deletions(-) diff --git a/keyboards/planck/keymaps/zach/Makefile b/keyboards/planck/keymaps/zach/Makefile index 977f1a901..9d86fc81f 100644 --- a/keyboards/planck/keymaps/zach/Makefile +++ b/keyboards/planck/keymaps/zach/Makefile @@ -17,7 +17,7 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 #VARIABLE_TRACE = no # Debug changes to variable values -UNICODE_ENABLE = yes # Unicode +UNICODE_ENABLE = no # Unicode (can't be used with unicodemap) UNICODEMAP_ENABLE = yes # Enable extended 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. diff --git a/keyboards/planck/keymaps/zach/config.h b/keyboards/planck/keymaps/zach/config.h index 7deb9ebfe..d309c9493 100644 --- a/keyboards/planck/keymaps/zach/config.h +++ b/keyboards/planck/keymaps/zach/config.h @@ -77,7 +77,7 @@ along with this program. If not, see . /* disable action features */ //#define NO_ACTION_LAYER #define NO_ACTION_TAPPING -#define NO_ACTION_ONESHOT +//#define NO_ACTION_ONESHOT #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION #define PREVENT_STUCK_MODIFIERS diff --git a/keyboards/planck/keymaps/zach/zach_common_functions.c b/keyboards/planck/keymaps/zach/zach_common_functions.c index b77f2b241..2c47b2289 100644 --- a/keyboards/planck/keymaps/zach/zach_common_functions.c +++ b/keyboards/planck/keymaps/zach/zach_common_functions.c @@ -141,31 +141,31 @@ qk_tap_dance_action_t tap_dance_actions[] = { }; #endif -#ifdef UNICODE_ENABLE +//#ifdef UNICODE_ENABLE // Unicode shortcuts -#define IBANG UC(0x203D) -#define RAROW UC(0x2192) -#define LAROW UC(0x2190) -#define DEGREE UC(0x00B0) -#define OMEGA UC(0x03A9) -#define WOMEGA UC(0x03C9) -#define MICRO UC(0x00B5) -#define PLUMIN UC(0x00B1) -#define SUPA2 UC(0x00B2) -#define ROMAN1 UC(0x2160) -#define ROMAN2 UC(0x2161) -#define ROMAN3 UC(0x2162) -#define ROMAN4 UC(0x2163) -#define ROMAN5 UC(0x2164) -#define ROMAN6 UC(0x2165) -#define ROMAN7 UC(0x2166) -#define roman1 UC(0x2170) -#define roman2 UC(0x2171) -#define roman3 UC(0x2172) -#define roman4 UC(0x2173) -#define roman5 UC(0x2174) -#define roman6 UC(0x2175) -#define roman7 UC(0x2176) +#define IBANG X(0x203D) +#define RAROW X(0x2192) +#define LAROW X(0x2190) +#define DEGREE X(0x00B0) +#define OMEGA X(0x03A9) +#define WOMEGA X(0x03C9) +#define MICRO X(0x00B5) +#define PLUMIN X(0x00B1) +#define SUPA2 X(0x00B2) +#define ROMAN1 X(0x2160) +#define ROMAN2 X(0x2161) +#define ROMAN3 X(0x2162) +#define ROMAN4 X(0x2163) +#define ROMAN5 X(0x2164) +#define ROMAN6 X(0x2165) +#define ROMAN7 X(0x2166) +#define roman1 X(0x2170) +#define roman2 X(0x2171) +#define roman3 X(0x2172) +#define roman4 X(0x2173) +#define roman5 X(0x2174) +#define roman6 X(0x2175) +#define roman7 X(0x2176) #ifdef UNICODEMAP_ENABLE // For Unicode characters larger than 0x8000. Send with X() enum Ext_Unicode{ @@ -192,7 +192,7 @@ const uint32_t PROGMEM unicode_map[] = { #define TMBL X(TUMBLER) #endif -#endif +//#endif static uint16_t key_timer; static uint8_t caps_status = 0; diff --git a/keyboards/preonic/keymaps/zach/Makefile b/keyboards/preonic/keymaps/zach/Makefile index f0a84abac..eebf41349 100644 --- a/keyboards/preonic/keymaps/zach/Makefile +++ b/keyboards/preonic/keymaps/zach/Makefile @@ -17,8 +17,8 @@ BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = yes # Audio output on port C6 #VARIABLE_TRACE = no # Debug changes to variable values -UNICODE_ENABLE = yes # Unicode -UNICODEMAP_ENABLE = no # Enable extended unicode +UNICODE_ENABLE = no # Unicode +UNICODEMAP_ENABLE = yes # Enable extended 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. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE diff --git a/keyboards/preonic/keymaps/zach/config.h b/keyboards/preonic/keymaps/zach/config.h index 59959524f..bb8913c7a 100644 --- a/keyboards/preonic/keymaps/zach/config.h +++ b/keyboards/preonic/keymaps/zach/config.h @@ -84,7 +84,7 @@ along with this program. If not, see . /* disable action features */ //#define NO_ACTION_LAYER #define NO_ACTION_TAPPING -#define NO_ACTION_ONESHOT +//#define NO_ACTION_ONESHOT #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION #define PREVENT_STUCK_MODIFIERS diff --git a/keyboards/preonic/keymaps/zach/zach_common_functions.c b/keyboards/preonic/keymaps/zach/zach_common_functions.c index b77f2b241..2c47b2289 100644 --- a/keyboards/preonic/keymaps/zach/zach_common_functions.c +++ b/keyboards/preonic/keymaps/zach/zach_common_functions.c @@ -141,31 +141,31 @@ qk_tap_dance_action_t tap_dance_actions[] = { }; #endif -#ifdef UNICODE_ENABLE +//#ifdef UNICODE_ENABLE // Unicode shortcuts -#define IBANG UC(0x203D) -#define RAROW UC(0x2192) -#define LAROW UC(0x2190) -#define DEGREE UC(0x00B0) -#define OMEGA UC(0x03A9) -#define WOMEGA UC(0x03C9) -#define MICRO UC(0x00B5) -#define PLUMIN UC(0x00B1) -#define SUPA2 UC(0x00B2) -#define ROMAN1 UC(0x2160) -#define ROMAN2 UC(0x2161) -#define ROMAN3 UC(0x2162) -#define ROMAN4 UC(0x2163) -#define ROMAN5 UC(0x2164) -#define ROMAN6 UC(0x2165) -#define ROMAN7 UC(0x2166) -#define roman1 UC(0x2170) -#define roman2 UC(0x2171) -#define roman3 UC(0x2172) -#define roman4 UC(0x2173) -#define roman5 UC(0x2174) -#define roman6 UC(0x2175) -#define roman7 UC(0x2176) +#define IBANG X(0x203D) +#define RAROW X(0x2192) +#define LAROW X(0x2190) +#define DEGREE X(0x00B0) +#define OMEGA X(0x03A9) +#define WOMEGA X(0x03C9) +#define MICRO X(0x00B5) +#define PLUMIN X(0x00B1) +#define SUPA2 X(0x00B2) +#define ROMAN1 X(0x2160) +#define ROMAN2 X(0x2161) +#define ROMAN3 X(0x2162) +#define ROMAN4 X(0x2163) +#define ROMAN5 X(0x2164) +#define ROMAN6 X(0x2165) +#define ROMAN7 X(0x2166) +#define roman1 X(0x2170) +#define roman2 X(0x2171) +#define roman3 X(0x2172) +#define roman4 X(0x2173) +#define roman5 X(0x2174) +#define roman6 X(0x2175) +#define roman7 X(0x2176) #ifdef UNICODEMAP_ENABLE // For Unicode characters larger than 0x8000. Send with X() enum Ext_Unicode{ @@ -192,7 +192,7 @@ const uint32_t PROGMEM unicode_map[] = { #define TMBL X(TUMBLER) #endif -#endif +//#endif static uint16_t key_timer; static uint8_t caps_status = 0; diff --git a/quantum/process_keycode/process_tap_dance.c b/quantum/process_keycode/process_tap_dance.c index 68c8425bb..b807ec3c3 100644 --- a/quantum/process_keycode/process_tap_dance.c +++ b/quantum/process_keycode/process_tap_dance.c @@ -16,6 +16,8 @@ #include "quantum.h" #include "action_tapping.h" +uint8_t get_oneshot_mods(void); + static uint16_t last_td; static int8_t highest_td = -1; diff --git a/quantum/process_keycode/process_unicode.c b/quantum/process_keycode/process_unicode.c index 1f16b9bdb..678a15234 100644 --- a/quantum/process_keycode/process_unicode.c +++ b/quantum/process_keycode/process_unicode.c @@ -16,6 +16,7 @@ #include "process_unicode.h" #include "action_util.h" +static uint8_t first_flag = 0; bool process_unicode(uint16_t keycode, keyrecord_t *record) { if (keycode > QK_UNICODE && record->event.pressed) { diff --git a/quantum/process_keycode/process_unicode_common.c b/quantum/process_keycode/process_unicode_common.c index b4d4231db..1dbdec3e7 100644 --- a/quantum/process_keycode/process_unicode_common.c +++ b/quantum/process_keycode/process_unicode_common.c @@ -17,7 +17,6 @@ #include "process_unicode_common.h" static uint8_t input_mode; -static uint8_t first_flag = 0; uint8_t mods; void set_unicode_input_mode(uint8_t os_target) -- cgit v1.2.3 From caab4d7e4576c10e45becea4a8fc69a7c9c064e0 Mon Sep 17 00:00:00 2001 From: Osamu Aoki Date: Sat, 1 Apr 2017 01:39:00 +0900 Subject: Fix typo --- doc/keymap.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/keymap.md b/doc/keymap.md index bc7809905..3ea138ea8 100644 --- a/doc/keymap.md +++ b/doc/keymap.md @@ -6,12 +6,12 @@ QMK is based on TMK. Understanding the essential changes made should help you ## TMK vs. QMK -| Firmware |TMK |QMK | -|-------------------------------------------------|-----------------------|-------------------------| -| Maintainer |hasu |Jack Humbert et al. | -| Build path customization | `TMK_DIR = ...` | `include .../Makefile` | -| `keymaps` data | 3D array of `uint8_t` holding **keycode** | 3D array of `uint16_t` holding **action code** | -| `fn_actions` data | 1D array of `uint16_t` holding **action code** | 3D array of `uint16_t` holding **action code** | +| Firmware |TMK |QMK | +|---------------------------|-----------------------|-------------------------| +| Maintainer |hasu |Jack Humbert et al. | +| Build path customization | `TMK_DIR = ...` | `include .../Makefile` | +| `keymaps` data | 3D array of `uint8_t` holding **keycode** | 3D array of `uint16_t` holding **action code** | +| `fn_actions` data | 1D array of `uint16_t` holding **action code** | 1D array of `uint16_t` holding **action code** | Since QMK is based on TMK and uses major portion of TMK code as is, understanding the essential changes made should help you understand the code. @@ -45,7 +45,7 @@ Keymap layer has its state in two 32 bit parameters: * **`default_layer_state`** indicates a base keymap layer(0-31) which is always valid and to be referred. * **`layer_state`** () has current on/off status of the layer on its each bit. -Keymap has its state in two parameter**`default_layer`** indicates a base keymap layer(0-31) which is always valid and to be referred, **`keymap_stat`** is 16bit variable which has current on/off status of layers on its each bit. +Keymap has its state in two parameter **`default_layer`** indicates a base keymap layer(0-31) which is always valid and to be referred, **`keymap_stat`** is 16bit variable which has current on/off status of layers on its each bit. Keymap layer '0' is usually `default_layer` and which is the only valid layer and other layers is initially off after boot up firmware, though, you can configured them in `config.h`. To change `default_layer` will be useful when you switch key layout completely, say you want Colmak instead of Qwerty. -- cgit v1.2.3