From 552399df4cef88463ea8ac40822d776d0fb90e18 Mon Sep 17 00:00:00 2001 From: Ian Sterling Date: Mon, 8 Aug 2016 18:34:08 -0700 Subject: Adding my own keymaps to the following keyboards: Planck, Preonic, Atreus, Ergodox --- keyboards/atreus/keymaps/xyverz/keymap.c | 89 ++++++ keyboards/ergodox/keymaps/xyverz/dvorak.png | Bin 0 -> 87314 bytes keyboards/ergodox/keymaps/xyverz/keymap.c | 184 +++++++++++++ keyboards/ergodox/keymaps/xyverz/old_keymap.c | 311 +++++++++++++++++++++ keyboards/ergodox/keymaps/xyverz/readme.md | 10 + keyboards/planck/keymaps/xyverz/README.md | 2 + keyboards/planck/keymaps/xyverz/keymap.c | 379 ++++++++++++++++++++++++++ keyboards/planck/keymaps/xyverz/makefile.mk | 2 + keyboards/preonic/keymaps/xyverz/README.md | 49 ++++ keyboards/preonic/keymaps/xyverz/keymap.c | 342 +++++++++++++++++++++++ keyboards/preonic/keymaps/xyverz/makefile.mk | 1 + 11 files changed, 1369 insertions(+) create mode 100644 keyboards/atreus/keymaps/xyverz/keymap.c create mode 100644 keyboards/ergodox/keymaps/xyverz/dvorak.png create mode 100644 keyboards/ergodox/keymaps/xyverz/keymap.c create mode 100644 keyboards/ergodox/keymaps/xyverz/old_keymap.c create mode 100644 keyboards/ergodox/keymaps/xyverz/readme.md create mode 100644 keyboards/planck/keymaps/xyverz/README.md create mode 100644 keyboards/planck/keymaps/xyverz/keymap.c create mode 100644 keyboards/planck/keymaps/xyverz/makefile.mk create mode 100644 keyboards/preonic/keymaps/xyverz/README.md create mode 100644 keyboards/preonic/keymaps/xyverz/keymap.c create mode 100644 keyboards/preonic/keymaps/xyverz/makefile.mk diff --git a/keyboards/atreus/keymaps/xyverz/keymap.c b/keyboards/atreus/keymaps/xyverz/keymap.c new file mode 100644 index 000000000..447fbcf10 --- /dev/null +++ b/keyboards/atreus/keymaps/xyverz/keymap.c @@ -0,0 +1,89 @@ +// This is the personal keymap of Ian Sterling (@xyverz). It is based on the keymap by +// Chris Gerber (@gerbercj), with the addition of persistent layers like the Planck and +// Preonic keyboards by Jack Humbert. + +#include "atreus.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 _DV 0 +#define _QW 1 +#define _CM 2 +#define _L1 3 +#define _L2 4 + +// Macro name shortcuts +#define DVORAK M(_DV) +#define QWERTY M(_QW) +#define COLEMAK M(_CM) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_DV] = { /* Dvorak */ + {KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_NO, KC_F, KC_G, KC_C, KC_R, KC_L }, + {KC_A, KC_O, KC_E, KC_U, KC_I, KC_NO, KC_D, KC_H, KC_T, KC_N, KC_S }, + {SFT_T(KC_SCLN), KC_Q, KC_J, KC_K, KC_X, CTL_T(KC_DEL), KC_B, KC_M, KC_W, KC_V, SFT_T(KC_Z) }, + {KC_ESC, KC_TAB, KC_LGUI, MO(_L2), KC_BSPC, ALT_T(KC_ENT), KC_SPC, MO(_L1), KC_MINS, KC_SLSH, KC_EQL} + }, + [_QW] = { /* Qwerty */ + {KC_Q, KC_W, KC_E, KC_R, KC_T, KC_NO, KC_Y, KC_U, KC_I, KC_O, KC_P }, + {KC_A, KC_S, KC_D, KC_F, KC_G, KC_NO, KC_H, KC_J, KC_K, KC_L, KC_SCLN}, + {SFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, CTL_T(KC_DEL), KC_N, KC_M, KC_COMM, KC_DOT, SFT_T(KC_SLSH) }, + {KC_ESC, KC_TAB, KC_LGUI, MO(_L2), KC_BSPC, ALT_T(KC_ENT), KC_SPC, MO(_L1), KC_MINS, KC_QUOT, KC_ENT} + }, + [_CM] = { /* Colemak */ + {KC_Q, KC_W, KC_F, KC_P, KC_G, KC_NO, KC_J, KC_L, KC_U, KC_Y, KC_SCLN}, + {KC_A, KC_R, KC_S, KC_T, KC_D, KC_NO, KC_H, KC_N, KC_E, KC_I, KC_O }, + {SFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, CTL_T(KC_DEL), KC_K, KC_M, KC_COMM, KC_DOT, SFT_T(KC_SLSH) }, + {KC_ESC, KC_TAB, KC_LGUI, MO(_L2), KC_BSPC, ALT_T(KC_ENT), KC_SPC, MO(_L1), KC_MINS, KC_QUOT, KC_ENT} + }, + [_L1] = { /* LAYER 1 */ + {KC_1, KC_2, KC_3, KC_4, KC_5, KC_NO, KC_6, KC_7, KC_8, KC_9, KC_0 }, + {KC_TAB, KC_INS, KC_UP, KC_DEL, KC_HOME, KC_NO, KC_PGUP, KC_MUTE, KC_VOLD, KC_VOLU, KC_EQL }, + {KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_LCTL, KC_PGDN, KC_MPRV, KC_MPLY, KC_MNXT, KC_BSLS}, + {KC_TRNS, KC_GRV, KC_LGUI, KC_TRNS, KC_DEL, KC_LALT, KC_SPC, KC_TRNS, KC_LBRC, KC_RBRC, KC_ENT } + }, + [_L2] = { /* LAYER 2 */ + {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_NO, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN}, + {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_NO, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 }, + {KC_TRNS, KC_TRNS, DVORAK, QWERTY, COLEMAK, KC_LCTL, KC_TRNS, KC_TRNS, KC_TRNS, KC_F11, KC_F12 }, + {KC_TRNS, KC_TRNS, KC_LGUI, KC_TRNS, KC_BSPC, KC_LALT, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, RESET } + } +}; + +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 _DV: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_DV); + } + break; + case _QW: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_QW); + } + break; + case _CM: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_CM); + } + break; + } + return MACRO_NONE; +}; diff --git a/keyboards/ergodox/keymaps/xyverz/dvorak.png b/keyboards/ergodox/keymaps/xyverz/dvorak.png new file mode 100644 index 000000000..cb8316309 Binary files /dev/null and b/keyboards/ergodox/keymaps/xyverz/dvorak.png differ diff --git a/keyboards/ergodox/keymaps/xyverz/keymap.c b/keyboards/ergodox/keymaps/xyverz/keymap.c new file mode 100644 index 000000000..dd39dbacb --- /dev/null +++ b/keyboards/ergodox/keymaps/xyverz/keymap.c @@ -0,0 +1,184 @@ +#include "ergodox.h" +#include "debug.h" +#include "action_layer.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 + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ] | 1 | 2 | 3 | 4 | 5 | ESC | | ESC | 6 | 7 | 8 | 9 | 0 | \ | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Del | ' | , | . | P | Y | L1 | | L1 | F | G | C | R | L | / | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | BkSp | A | O | E | U | I |------| |------| D | H | T | N |S / L2| - | + * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| + * | LShift |:/Ctrl| Q | J | K | X | | | | B | M | W | V |Z/Ctrl| RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~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_RBRC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, + KC_DELT, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, TG(1), + KC_BSPC, KC_A, KC_O, KC_E, KC_U, KC_I, + KC_LSFT, CTL_T(KC_SCLN), KC_Q, KC_J, KC_K, KC_X, ALL_T(KC_NO), + LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, + ALT_T(KC_APP), KC_LGUI, + KC_HOME, + KC_SPC,KC_BSPC,KC_END, + // right hand + KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, + TG(1), KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSLS, + KC_D, KC_H, KC_T, KC_N, LT(MDIA, KC_S), KC_MINS, + MEH_T(KC_NO),KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z), KC_RSFT, + KC_UP, KC_DOWN,KC_SLSH,KC_EQL, KC_FN1, + KC_LALT, CTL_T(KC_ESC), + KC_PGUP, + KC_PGDN,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, 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 +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) { + 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) { + // 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/xyverz/old_keymap.c b/keyboards/ergodox/keymaps/xyverz/old_keymap.c new file mode 100644 index 000000000..e082372f9 --- /dev/null +++ b/keyboards/ergodox/keymaps/xyverz/old_keymap.c @@ -0,0 +1,311 @@ +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" + +extern keymap_config_t keymap_config; + +#define _DVORAK 0 // default layer +#define _QWERTY 1 // symbols +#define _LOWER 2 +#define _RAISE 3 +#define _ADJUST 16 + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* + * Keymap 0: Dvorak + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ] | 1 | 2 | 3 | 4 | 5 | Esc | | ESC | 6 | 7 | 8 | 9 | 0 | [ | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | ' | , | . | Y | Y |(Null)| |(Null)| F | G | C | R | L | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | CapsLk | A | O | E | U | I |------| |------| D | H | T | N | S | - | + * |--------+------+------+------+------+------| FN1 | | FN2 |------+------+------+------+------+--------| + * | LShift | Z | X | C | V | X | | | | B | M | W | V | Z | RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | LGUI | ` | INS | Left | Rght | | Up | Dn | / | = | RGUI | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | LCtr | LAlt | | Ralt | RCtr | + * ,------|------|------| |------+------+------. + * | | | Home | | PgUp | | | + * | BkSp | Del |------| |------| Enter| Space| + * | | | End | | PgDn | | | + * `--------------------' `--------------------' + * + * + ***************************************************************************************************** + * This Dvorak keyboard layout stems from my early Kinesis years, using the Contour PS/2 with a Dvorak + * software layout. Because of this, the RBRC and LBRC were on opposite sides of the board in the cor- + * ner keys. I've decided to continue using this layout with my ErgoDox. + */ + + [_DVORAK] = ( + KC_RBRC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, XXXXXXX, + KC_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, LOWER, + KC_LGUI, KC_GRV, KC_INS, KC_LEFT, KC_RGHT, + KC_LCTL, KC_LALT, + KC_HOME, + KC_BSPC, KC_DEL, KC_END, + // right hand + KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, + NO, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSLS, + KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, + RAISE, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, + KC_UP, KC_DOWN, KC_SLSH, KC_EQL, KC_RGUI, + KC_RALT, KC_RCTL, + KC_PGUP, + KC_PGDN, KC_ENT, KC_SPC +), + +/* Keymap 1: QWERTY + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | BkSp | 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 | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | App | LGui | | Alt |Ctrl/Esc| + * ,------|------|------| |------+--------+------. + * | | | Home | | PgUp | | | + * | Space|Backsp|------| |------| Tab |Enter | + * | |ace | End | | PgDn | | | + * `--------------------' `----------------------' + */ +[_QWERTY] = ( + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, + KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_NO, + 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, LOWER, + LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), 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, + 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),GUI_T(KC_QUOT), + RAISE, KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + KC_LALT, CTL_T(KC_ESC), + KC_PGUP, + KC_PGDN,KC_TAB, KC_ENT +), + + +/* Lower 2: 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 | = | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[_LOWER] = ( + // 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, 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 +), + +/* Raise 3: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | MsUp | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | Prev | Next | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | |Brwser| + * | | |------| |------| |Back | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// MEDIA AND MOUSE +[_RAISE] = ( + 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 +), + +/* Adjust 16: Lower + Raise + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | Reset| | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| |Dvorak|Qwerty| | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// MEDIA AND MOUSE +[_ADJUST] = ( + 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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, QWERTY, DVORAK, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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) +}; + +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 _DVORAK: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_DVORAK); + } + break; + case _QWERTY: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_QWERTY); + } + 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); + } + 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); + } + 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; + } + +}; diff --git a/keyboards/ergodox/keymaps/xyverz/readme.md b/keyboards/ergodox/keymaps/xyverz/readme.md new file mode 100644 index 000000000..8f6dba45e --- /dev/null +++ b/keyboards/ergodox/keymaps/xyverz/readme.md @@ -0,0 +1,10 @@ +# ErgoDox EZ Default Configuration + +## Changelog + +* 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_highres.png) diff --git a/keyboards/planck/keymaps/xyverz/README.md b/keyboards/planck/keymaps/xyverz/README.md new file mode 100644 index 000000000..b0054fc30 --- /dev/null +++ b/keyboards/planck/keymaps/xyverz/README.md @@ -0,0 +1,2 @@ +# Zrevyx's Planck Layout + diff --git a/keyboards/planck/keymaps/xyverz/keymap.c b/keyboards/planck/keymaps/xyverz/keymap.c new file mode 100644 index 000000000..9ac78ec15 --- /dev/null +++ b/keyboards/planck/keymaps/xyverz/keymap.c @@ -0,0 +1,379 @@ +// 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 _MUSIC 5 +#define _PLOVER 6 +#define _ADJUST 16 + +// Macro name shortcuts +#define QWERTY M(_QWERTY) +#define COLEMAK M(_COLEMAK) +#define DVORAK M(_DVORAK) +#define LOWER M(_LOWER) +#define RAISE M(_RAISE) +#define M_BL 5 +#define AUD_OFF M(6) +#define AUD_ON M(7) +#define MUS_OFF M(8) +#define MUS_ON M(9) +#define VC_IN M(10) +#define VC_DE M(11) +#define PLOVER M(12) +#define EXT_PLV M(13) + +// 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | 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 }, + {M(M_BL), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, 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 }, + {M(M_BL), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_SPC, 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 | Shift| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Alt | Left |Right |Lower | Bksp |Space |Raise | Up | Down | GUI |Enter | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = { + {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, KC_RSFT}, + {KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT } +}, + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Caps | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | Mute | Vol- | Vol+ | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| | Home | End | | Del | Ins | | PgUp | PgDN | |Enter | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = { + {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______}, + {KC_CAPS, 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, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______}, + {M(M_BL), _______, KC_HOME, KC_END, _______, KC_DEL, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______} +}, + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Caps | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | Prev | Play | Next | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| | Home | End | | Del | Ins | | PgUp | PgDN | |Enter | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = { + {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______}, + {KC_CAPS, 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_MPRV, KC_MPLY, KC_MNXT, _______, _______}, + {M(M_BL), _______, KC_HOME, KC_END, _______, KC_DEL, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______} +}, + +/* Music (reserved for process_action_user) + * + */ +[_MUSIC] = { + {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, + {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, + {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, + {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, LOWER, XXXXXXX, XXXXXXX, RAISE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX} +}, + +/* Plover layer (http://opensteno.org) + * ,-----------------------------------------------------------------------------------. + * | # | # | # | # | # | # | # | # | # | # | # | # | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | S | T | P | H | * | * | F | P | L | T | D | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | 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| | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = { + {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, + {_______, _______, _______, AUD_ON, AUD_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______}, + {_______, VC_DE, VC_IN, MUS_ON, MUS_OFF, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +} + + +}; + +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_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); +#endif + + +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 _QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + #endif + persistant_default_layer_set(1UL<<_QWERTY); + } + break; + case _COLEMAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_colemak, false, 0); + #endif + persistant_default_layer_set(1UL<<_COLEMAK); + } + break; + case _DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + #endif + persistant_default_layer_set(1UL<<_DVORAK); + } + 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); + } + 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); + } + break; + case M_BL: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + break; + case 6: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + audio_off(); + #endif + } + break; + case 7: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + audio_on(); + PLAY_NOTE_ARRAY(tone_startup, false, 0); + #endif + } + break; + case 8: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + layer_off(_MUSIC); + stop_all_notes(); + #endif + } + break; + case 9: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(music_scale, false, 0); + layer_on(_MUSIC); + #endif + } + break; + case 10: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + voice_iterate(); + PLAY_NOTE_ARRAY(music_scale, false, 0); + #endif + } + break; + case 11: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + voice_deiterate(); + PLAY_NOTE_ARRAY(music_scale, false, 0); + #endif + } + break; + case 12: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_plover, false, 0); + #endif + layer_off(_RAISE); + layer_off(_LOWER); + layer_off(_ADJUST); + layer_off(_MUSIC); + stop_all_notes(); + 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); + } + break; + case 13: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_plover_gb, false, 0); + #endif + layer_off(_PLOVER); + } + break; + + } + return MACRO_NONE; +}; + +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 +void play_goodbye_tone() +{ + PLAY_NOTE_ARRAY(goodbye, false, 0); + _delay_ms(150); +} + +uint8_t starting_note = 0x0C; +int offset = 7; + +void process_action_user(keyrecord_t *record) { + + if (IS_LAYER_ON(_MUSIC)) { + if (record->event.pressed) { + play_note(((double)220.0)*pow(2.0, -4.0)*pow(2.0,(starting_note + SCALE[record->event.key.col + offset])/12.0+(MATRIX_ROWS - record->event.key.row)), 0xF); + } else { + stop_note(((double)220.0)*pow(2.0, -4.0)*pow(2.0,(starting_note + SCALE[record->event.key.col + offset])/12.0+(MATRIX_ROWS - record->event.key.row))); + } + } + +} +#endif diff --git a/keyboards/planck/keymaps/xyverz/makefile.mk b/keyboards/planck/keymaps/xyverz/makefile.mk new file mode 100644 index 000000000..99fbfbd0b --- /dev/null +++ b/keyboards/planck/keymaps/xyverz/makefile.mk @@ -0,0 +1,2 @@ +AUDIO_ENABLE = yes +NKRO_ENABLE = yes \ No newline at end of file diff --git a/keyboards/preonic/keymaps/xyverz/README.md b/keyboards/preonic/keymaps/xyverz/README.md new file mode 100644 index 000000000..9c23c5b9f --- /dev/null +++ b/keyboards/preonic/keymaps/xyverz/README.md @@ -0,0 +1,49 @@ +# The default Preonic layout - largely based on the Planck's + +## QWERTY Layer: + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | - | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / | Shift| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Alt | Left |Right |Lower | Space |Raise | Up | Down | GUI |Enter | + * `-----------------------------------------------------------------------------------' + */ + +## LOWER Layer: + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Caps | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | Mute | Vol- | Vol+ | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| | Home | End | | Ins | | PgUp | PgDN | |Enter | + * `-----------------------------------------------------------------------------------' + */ + +## RAISE Layer: + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Caps | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | Prev | Play | Next | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| | Home | End | | Ins | | PgUp | PgDN | |Enter | + * `-----------------------------------------------------------------------------------' + */ \ No newline at end of file diff --git a/keyboards/preonic/keymaps/xyverz/keymap.c b/keyboards/preonic/keymaps/xyverz/keymap.c new file mode 100644 index 000000000..adc7392e5 --- /dev/null +++ b/keyboards/preonic/keymaps/xyverz/keymap.c @@ -0,0 +1,342 @@ +#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 _QWERTY 0 +#define _COLEMAK 1 +#define _DVORAK 2 +#define _LOWER 3 +#define _RAISE 4 +#define _MUSIC 5 +#define _ADJUST 16 + +// Macro name shortcuts +#define QWERTY M(_QWERTY) +#define COLEMAK M(_COLEMAK) +#define DVORAK M(_DVORAK) +#define LOWER M(_LOWER) +#define RAISE M(_RAISE) +#define M_BL 5 +#define AUD_OFF M(6) +#define AUD_ON M(7) +#define MUS_OFF M(8) +#define MUS_ON M(9) +#define VC_IN M(10) +#define VC_DE M(11) + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | - | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / | Shift| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Alt | Left |Right |Lower | Space |Raise | Up | Down | GUI |Enter | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = { + {KC_ESC, 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_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL}, + {KC_MINS, 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_LEFT, KC_RGHT, LOWER, KC_SPC, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT } +}, + +/* 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 }, + {M(M_BL), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Esc | 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 | Shift| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Alt | Left |Right |Lower | Space |Raise | Up | Down | GUI |Enter | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = { + {KC_ESC, 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, KC_RSFT}, + {KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_SPC, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT } +}, + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Caps | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | Mute | Vol- | Vol+ | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| | Home | End | | Ins | | PgUp | PgDN | |Enter | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = { + {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_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, + {KC_CAPS, 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, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______}, + {M(M_BL), _______, KC_HOME, KC_END, _______, KC_INS, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______} +}, + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Caps | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | Prev | Play | Next | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| | Home | End | | Ins | | PgUp | PgDN | |Enter | + * `-----------------------------------------------------------------------------------' + */ +[_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_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, + {KC_CAPS, 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_MPRV, KC_MPLY, KC_MNXT, _______, _______}, + {M(M_BL), _______, KC_HOME, KC_END, _______, KC_INS, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______} +}, + +/* Music (reserved for process_action_user) + * + */ +[_MUSIC] = { + {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, + {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, + {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, + {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, + {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, LOWER, XXXXXXX, XXXXXXX, RAISE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX} +}, + +/* 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}, + {_______, _______, _______, AUD_ON, AUD_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______}, + {_______, VC_DE, VC_IN, MUS_ON, MUS_OFF, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +} + + +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +#ifdef AUDIO_ENABLE +float start_up[][2] = { + {440.0*pow(2.0,(14)/12.0), 20}, + {440.0*pow(2.0,(26)/12.0), 8}, + {440.0*pow(2.0,(18)/12.0), 20}, + {440.0*pow(2.0,(26)/12.0), 8} +}; + +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); + +float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); +float 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); +} + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + switch(id) { + case _QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + #endif + persistant_default_layer_set(1UL<<_QWERTY); + } + break; + case _COLEMAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_colemak, false, 0); + #endif + persistant_default_layer_set(1UL<<_COLEMAK); + } + break; + case _DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + #endif + persistant_default_layer_set(1UL<<_DVORAK); + } + 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); + } + 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); + } + break; + case M_BL: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + break; + case 6: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + audio_off(); + #endif + } + break; + case 7: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + audio_on(); + PLAY_NOTE_ARRAY(start_up, false, 0); + #endif + } + break; + case 8: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + layer_off(_MUSIC); + stop_all_notes(); + #endif + } + break; + case 9: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(music_scale, false, 0); + layer_on(_MUSIC); + #endif + } + break; + case 10: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + voice_iterate(); + PLAY_NOTE_ARRAY(music_scale, false, 0); + #endif + } + break; + case 11: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + voice_deiterate(); + PLAY_NOTE_ARRAY(music_scale, false, 0); + #endif + } + break; + } + return MACRO_NONE; +}; + + +void matrix_init_user(void) { + #ifdef AUDIO_ENABLE + _delay_ms(20); // gets rid of tick + PLAY_NOTE_ARRAY(start_up, false, 0); + #endif +} + +#ifdef AUDIO_ENABLE + +uint8_t starting_note = 0x0C; +int offset = 7; + +void process_action_user(keyrecord_t *record) { + + if (IS_LAYER_ON(_MUSIC)) { + if (record->event.pressed) { + play_note(((double)220.0)*pow(2.0, -4.0)*pow(2.0,(starting_note + SCALE[record->event.key.col + offset])/12.0+(MATRIX_ROWS - record->event.key.row)), 0xF); + } else { + stop_note(((double)220.0)*pow(2.0, -4.0)*pow(2.0,(starting_note + SCALE[record->event.key.col + offset])/12.0+(MATRIX_ROWS - record->event.key.row))); + } + } + +} + +void play_goodbye_tone() +{ + PLAY_NOTE_ARRAY(goodbye, false, 0); + _delay_ms(150); +} + +#endif \ No newline at end of file diff --git a/keyboards/preonic/keymaps/xyverz/makefile.mk b/keyboards/preonic/keymaps/xyverz/makefile.mk new file mode 100644 index 000000000..628167ff6 --- /dev/null +++ b/keyboards/preonic/keymaps/xyverz/makefile.mk @@ -0,0 +1 @@ +AUDIO_ENABLE = yes \ No newline at end of file -- cgit v1.2.3 From de1db144d06b488937633110b0598a1cac68f4fc Mon Sep 17 00:00:00 2001 From: Xyverz Date: Mon, 8 Aug 2016 18:44:09 -0700 Subject: Delete dvorak.png Not reflective of my layout. --- keyboards/ergodox/keymaps/xyverz/dvorak.png | Bin 87314 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 keyboards/ergodox/keymaps/xyverz/dvorak.png diff --git a/keyboards/ergodox/keymaps/xyverz/dvorak.png b/keyboards/ergodox/keymaps/xyverz/dvorak.png deleted file mode 100644 index cb8316309..000000000 Binary files a/keyboards/ergodox/keymaps/xyverz/dvorak.png and /dev/null differ -- cgit v1.2.3 From bf93fa510bcc5cec84bcd9d81cb8fae6beb1ebb4 Mon Sep 17 00:00:00 2001 From: Xyverz Date: Mon, 8 Aug 2016 18:46:34 -0700 Subject: Delete readme.md file cleanup, removing file that doesn't apply to my layout. --- keyboards/ergodox/keymaps/xyverz/readme.md | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 keyboards/ergodox/keymaps/xyverz/readme.md diff --git a/keyboards/ergodox/keymaps/xyverz/readme.md b/keyboards/ergodox/keymaps/xyverz/readme.md deleted file mode 100644 index 8f6dba45e..000000000 --- a/keyboards/ergodox/keymaps/xyverz/readme.md +++ /dev/null @@ -1,10 +0,0 @@ -# ErgoDox EZ Default Configuration - -## Changelog - -* 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_highres.png) -- cgit v1.2.3 From c060afe68eb729fd3afcfdb3f16e28730ab868b3 Mon Sep 17 00:00:00 2001 From: Xyverz Date: Mon, 8 Aug 2016 18:47:13 -0700 Subject: Delete old_keymap.c file cleanup --- keyboards/ergodox/keymaps/xyverz/old_keymap.c | 311 -------------------------- 1 file changed, 311 deletions(-) delete mode 100644 keyboards/ergodox/keymaps/xyverz/old_keymap.c diff --git a/keyboards/ergodox/keymaps/xyverz/old_keymap.c b/keyboards/ergodox/keymaps/xyverz/old_keymap.c deleted file mode 100644 index e082372f9..000000000 --- a/keyboards/ergodox/keymaps/xyverz/old_keymap.c +++ /dev/null @@ -1,311 +0,0 @@ -#include "ergodox.h" -#include "debug.h" -#include "action_layer.h" - -extern keymap_config_t keymap_config; - -#define _DVORAK 0 // default layer -#define _QWERTY 1 // symbols -#define _LOWER 2 -#define _RAISE 3 -#define _ADJUST 16 - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* - * Keymap 0: Dvorak - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | ] | 1 | 2 | 3 | 4 | 5 | Esc | | ESC | 6 | 7 | 8 | 9 | 0 | [ | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Tab | ' | , | . | Y | Y |(Null)| |(Null)| F | G | C | R | L | \ | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | CapsLk | A | O | E | U | I |------| |------| D | H | T | N | S | - | - * |--------+------+------+------+------+------| FN1 | | FN2 |------+------+------+------+------+--------| - * | LShift | Z | X | C | V | X | | | | B | M | W | V | Z | RShift | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | LGUI | ` | INS | Left | Rght | | Up | Dn | / | = | RGUI | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | LCtr | LAlt | | Ralt | RCtr | - * ,------|------|------| |------+------+------. - * | | | Home | | PgUp | | | - * | BkSp | Del |------| |------| Enter| Space| - * | | | End | | PgDn | | | - * `--------------------' `--------------------' - * - * - ***************************************************************************************************** - * This Dvorak keyboard layout stems from my early Kinesis years, using the Contour PS/2 with a Dvorak - * software layout. Because of this, the RBRC and LBRC were on opposite sides of the board in the cor- - * ner keys. I've decided to continue using this layout with my ErgoDox. - */ - - [_DVORAK] = ( - KC_RBRC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, - KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, XXXXXXX, - KC_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, - KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, LOWER, - KC_LGUI, KC_GRV, KC_INS, KC_LEFT, KC_RGHT, - KC_LCTL, KC_LALT, - KC_HOME, - KC_BSPC, KC_DEL, KC_END, - // right hand - KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, - NO, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSLS, - KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, - RAISE, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, - KC_UP, KC_DOWN, KC_SLSH, KC_EQL, KC_RGUI, - KC_RALT, KC_RCTL, - KC_PGUP, - KC_PGDN, KC_ENT, KC_SPC -), - -/* Keymap 1: QWERTY - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | BkSp | 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 | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | App | LGui | | Alt |Ctrl/Esc| - * ,------|------|------| |------+--------+------. - * | | | Home | | PgUp | | | - * | Space|Backsp|------| |------| Tab |Enter | - * | |ace | End | | PgDn | | | - * `--------------------' `----------------------' - */ -[_QWERTY] = ( - KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, - KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_NO, - 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, LOWER, - LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), 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, - 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),GUI_T(KC_QUOT), - RAISE, KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, - KC_LALT, CTL_T(KC_ESC), - KC_PGUP, - KC_PGDN,KC_TAB, KC_ENT -), - - -/* Lower 2: 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 | = | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | | | - * | | |------| |------| | | - * | | | | | | | | - * `--------------------' `--------------------' - */ -[_LOWER] = ( - // 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, 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 -), - -/* Raise 3: Media and mouse keys - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | | | | | | | | | | | | | | | | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | MsUp | | | | | | | | | | | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | | | | | | | Prev | Next | | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | |Brwser| - * | | |------| |------| |Back | - * | | | | | | | | - * `--------------------' `--------------------' - */ -// MEDIA AND MOUSE -[_RAISE] = ( - 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 -), - -/* Adjust 16: Lower + Raise - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | | Reset| | | | | | | | | | | | | | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | | | | | | | | | | | | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | |------| |------| |Dvorak|Qwerty| | | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | | | | | | | | | | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | | | | | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | | | - * | | |------| |------| | | - * | | | | | | | | - * `--------------------' `--------------------' - */ -// MEDIA AND MOUSE -[_ADJUST] = ( - 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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, QWERTY, DVORAK, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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) -}; - -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 _DVORAK: - if (record->event.pressed) { - persistant_default_layer_set(1UL<<_DVORAK); - } - break; - case _QWERTY: - if (record->event.pressed) { - persistant_default_layer_set(1UL<<_QWERTY); - } - 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); - } - 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); - } - 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 14938367626f0cddba4bc35abe62a9bcc02bee10 Mon Sep 17 00:00:00 2001 From: Xyverz Date: Mon, 8 Aug 2016 18:48:36 -0700 Subject: Delete README.md file clean up. --- keyboards/preonic/keymaps/xyverz/README.md | 49 ------------------------------ 1 file changed, 49 deletions(-) delete mode 100644 keyboards/preonic/keymaps/xyverz/README.md diff --git a/keyboards/preonic/keymaps/xyverz/README.md b/keyboards/preonic/keymaps/xyverz/README.md deleted file mode 100644 index 9c23c5b9f..000000000 --- a/keyboards/preonic/keymaps/xyverz/README.md +++ /dev/null @@ -1,49 +0,0 @@ -# The default Preonic layout - largely based on the Planck's - -## QWERTY Layer: - -/* Qwerty - * ,-----------------------------------------------------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | - | A | S | D | F | G | H | J | K | L | ; | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | / | Shift| - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | Alt | Left |Right |Lower | Space |Raise | Up | Down | GUI |Enter | - * `-----------------------------------------------------------------------------------' - */ - -## LOWER Layer: - -/* Lower - * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Caps | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 | | Mute | Vol- | Vol+ | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| | Home | End | | Ins | | PgUp | PgDN | |Enter | - * `-----------------------------------------------------------------------------------' - */ - -## RAISE Layer: - -/* Raise - * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Caps | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 | | Prev | Play | Next | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| | Home | End | | Ins | | PgUp | PgDN | |Enter | - * `-----------------------------------------------------------------------------------' - */ \ No newline at end of file -- cgit v1.2.3 From 4e030313f7f55be7573eaab0b91e45290dc2d0b3 Mon Sep 17 00:00:00 2001 From: Xyverz Date: Mon, 8 Aug 2016 18:51:34 -0700 Subject: Delete README.md file cleanup --- keyboards/planck/keymaps/xyverz/README.md | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 keyboards/planck/keymaps/xyverz/README.md diff --git a/keyboards/planck/keymaps/xyverz/README.md b/keyboards/planck/keymaps/xyverz/README.md deleted file mode 100644 index b0054fc30..000000000 --- a/keyboards/planck/keymaps/xyverz/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# Zrevyx's Planck Layout - -- cgit v1.2.3 From c062b6a13d7974144b5ab02896d2213051fd91ad Mon Sep 17 00:00:00 2001 From: Xyverz Date: Mon, 8 Aug 2016 18:52:48 -0700 Subject: Delete keymap.c file cleanup --- keyboards/ergodox/keymaps/xyverz/keymap.c | 184 ------------------------------ 1 file changed, 184 deletions(-) delete mode 100644 keyboards/ergodox/keymaps/xyverz/keymap.c diff --git a/keyboards/ergodox/keymaps/xyverz/keymap.c b/keyboards/ergodox/keymaps/xyverz/keymap.c deleted file mode 100644 index dd39dbacb..000000000 --- a/keyboards/ergodox/keymaps/xyverz/keymap.c +++ /dev/null @@ -1,184 +0,0 @@ -#include "ergodox.h" -#include "debug.h" -#include "action_layer.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 - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | ] | 1 | 2 | 3 | 4 | 5 | ESC | | ESC | 6 | 7 | 8 | 9 | 0 | \ | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Del | ' | , | . | P | Y | L1 | | L1 | F | G | C | R | L | / | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | BkSp | A | O | E | U | I |------| |------| D | H | T | N |S / L2| - | - * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| - * | LShift |:/Ctrl| Q | J | K | X | | | | B | M | W | V |Z/Ctrl| RShift | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~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_RBRC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, - KC_DELT, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, TG(1), - KC_BSPC, KC_A, KC_O, KC_E, KC_U, KC_I, - KC_LSFT, CTL_T(KC_SCLN), KC_Q, KC_J, KC_K, KC_X, ALL_T(KC_NO), - LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, - ALT_T(KC_APP), KC_LGUI, - KC_HOME, - KC_SPC,KC_BSPC,KC_END, - // right hand - KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, - TG(1), KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSLS, - KC_D, KC_H, KC_T, KC_N, LT(MDIA, KC_S), KC_MINS, - MEH_T(KC_NO),KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z), KC_RSFT, - KC_UP, KC_DOWN,KC_SLSH,KC_EQL, KC_FN1, - KC_LALT, CTL_T(KC_ESC), - KC_PGUP, - KC_PGDN,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, 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 -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) { - 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) { - // 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 39dd3d674cfb7299ce377f70a678d3613f826e0a Mon Sep 17 00:00:00 2001 From: Ian Sterling Date: Mon, 8 Aug 2016 19:35:13 -0700 Subject: Changed behavior of _DVORAK layout's KC_RSFT to SFT_T(KC_ENT) for flexibility's sake. Updated the rest of the keymap to reflect the current (as of 19:37 on 08 Aug 2018) default layout and default makefile. --- keyboards/planck/keymaps/xyverz/README.md | 2 - keyboards/planck/keymaps/xyverz/keymap.c | 335 +++++++++++----------------- keyboards/planck/keymaps/xyverz/makefile.mk | 27 ++- 3 files changed, 160 insertions(+), 204 deletions(-) delete mode 100644 keyboards/planck/keymaps/xyverz/README.md diff --git a/keyboards/planck/keymaps/xyverz/README.md b/keyboards/planck/keymaps/xyverz/README.md deleted file mode 100644 index b0054fc30..000000000 --- a/keyboards/planck/keymaps/xyverz/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# Zrevyx's Planck Layout - diff --git a/keyboards/planck/keymaps/xyverz/keymap.c b/keyboards/planck/keymaps/xyverz/keymap.c index 9ac78ec15..90529428d 100644 --- a/keyboards/planck/keymaps/xyverz/keymap.c +++ b/keyboards/planck/keymaps/xyverz/keymap.c @@ -19,25 +19,19 @@ extern keymap_config_t keymap_config; #define _DVORAK 2 #define _LOWER 3 #define _RAISE 4 -#define _MUSIC 5 -#define _PLOVER 6 +#define _PLOVER 5 #define _ADJUST 16 -// Macro name shortcuts -#define QWERTY M(_QWERTY) -#define COLEMAK M(_COLEMAK) -#define DVORAK M(_DVORAK) -#define LOWER M(_LOWER) -#define RAISE M(_RAISE) -#define M_BL 5 -#define AUD_OFF M(6) -#define AUD_ON M(7) -#define MUS_OFF M(8) -#define MUS_ON M(9) -#define VC_IN M(10) -#define VC_DE M(11) -#define PLOVER M(12) -#define EXT_PLV M(13) +enum planck_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + PLOVER, + LOWER, + RAISE, + BACKLIT, + EXT_PLV +}; // Fillers to make layering more clear #define _______ KC_TRNS @@ -60,7 +54,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_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 }, - {M(M_BL), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} + {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} }, /* Colemak @@ -78,7 +72,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {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 }, - {M(M_BL), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} + {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} }, /* Dvorak @@ -95,7 +89,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DVORAK] = { {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, KC_RSFT}, + {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)}, {KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT } }, @@ -114,7 +108,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______}, {KC_CAPS, 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, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______}, - {M(M_BL), _______, KC_HOME, KC_END, _______, KC_DEL, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______} + {BACKLIT, _______, KC_HOME, KC_END, _______, KC_DEL, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______} }, /* Raise @@ -132,17 +126,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_CAPS, 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_MPRV, KC_MPLY, KC_MNXT, _______, _______}, - {M(M_BL), _______, KC_HOME, KC_END, _______, KC_DEL, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______} -}, - -/* Music (reserved for process_action_user) - * - */ -[_MUSIC] = { - {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, - {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, - {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, - {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, LOWER, XXXXXXX, XXXXXXX, RAISE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX} + {BACKLIT, _______, KC_HOME, KC_END, _______, KC_DEL, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______} }, /* Plover layer (http://opensteno.org) @@ -151,7 +135,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+-------------+------+------+------+------+------| * | | S | T | P | H | * | * | F | P | L | T | D | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | S | K | W | R | * | * | R | B | G | S | Z | + * |TogOut| S | K | W | R | * | * | R | B | G | S | Z | * |------+------+------+------+------+------+------+------+------+------+------+------| * | Exit | | | A | O | | E | U | | | | * `-----------------------------------------------------------------------------------' @@ -170,42 +154,32 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+-------------+------+------+------+------+------| * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | |Voice-|Voice+|Mus on|Musoff| | | | | | | | + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ [_ADJUST] = { {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, - {_______, _______, _______, AUD_ON, AUD_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______}, - {_______, VC_DE, VC_IN, MUS_ON, MUS_OFF, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______}, + {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} } -}; - -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 music_scale[][2] = SONG(MUSIC_SCALE_SOUND); -float goodbye[][2] = SONG(GOODBYE_SOUND); +float tone_goodbye[][2] = SONG(GOODBYE_SOUND); #endif @@ -214,166 +188,127 @@ void persistant_default_layer_set(uint16_t 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 _QWERTY: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); - #endif - persistant_default_layer_set(1UL<<_QWERTY); - } - break; - case _COLEMAK: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); - #endif - persistant_default_layer_set(1UL<<_COLEMAK); - } - break; - case _DVORAK: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); - #endif - persistant_default_layer_set(1UL<<_DVORAK); - } - 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); - } - 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); - } - break; - case M_BL: - if (record->event.pressed) { - register_code(KC_RSFT); - #ifdef BACKLIGHT_ENABLE - backlight_step(); - #endif - } else { - unregister_code(KC_RSFT); - } - break; - case 6: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - audio_off(); - #endif - } - break; - case 7: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - audio_on(); - PLAY_NOTE_ARRAY(tone_startup, false, 0); - #endif - } - break; - case 8: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - layer_off(_MUSIC); - stop_all_notes(); - #endif - } - break; - case 9: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(music_scale, false, 0); - layer_on(_MUSIC); - #endif - } - break; - case 10: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - voice_iterate(); - PLAY_NOTE_ARRAY(music_scale, false, 0); - #endif - } - break; - case 11: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - voice_deiterate(); - PLAY_NOTE_ARRAY(music_scale, false, 0); - #endif - } - break; - case 12: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_plover, false, 0); - #endif - layer_off(_RAISE); - layer_off(_LOWER); - layer_off(_ADJUST); - layer_off(_MUSIC); - stop_all_notes(); - 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); - } - break; - case 13: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_plover_gb, false, 0); - #endif - layer_off(_PLOVER); - } - break; - +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 MACRO_NONE; -}; + 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 - _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); } -uint8_t starting_note = 0x0C; -int offset = 7; - -void process_action_user(keyrecord_t *record) { +void shutdown_user() +{ + PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + _delay_ms(150); + stop_all_notes(); +} - if (IS_LAYER_ON(_MUSIC)) { - if (record->event.pressed) { - play_note(((double)220.0)*pow(2.0, -4.0)*pow(2.0,(starting_note + SCALE[record->event.key.col + offset])/12.0+(MATRIX_ROWS - record->event.key.row)), 0xF); - } else { - stop_note(((double)220.0)*pow(2.0, -4.0)*pow(2.0,(starting_note + SCALE[record->event.key.col + offset])/12.0+(MATRIX_ROWS - record->event.key.row))); - } - } +void music_on_user(void) +{ + music_scale_user(); +} +void music_scale_user(void) +{ + PLAY_NOTE_ARRAY(music_scale, false, 0); } -#endif + +#endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/xyverz/makefile.mk b/keyboards/planck/keymaps/xyverz/makefile.mk index 99fbfbd0b..0f4953888 100644 --- a/keyboards/planck/keymaps/xyverz/makefile.mk +++ b/keyboards/planck/keymaps/xyverz/makefile.mk @@ -1,2 +1,25 @@ -AUDIO_ENABLE = yes -NKRO_ENABLE = yes \ No newline at end of file + + +# 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 -- cgit v1.2.3 From 6f700f1eb0c76aa19187efd83ab2b49a0db7f71f Mon Sep 17 00:00:00 2001 From: Ian Sterling Date: Tue, 9 Aug 2016 23:49:27 -0700 Subject: Adding my own layouts for the Phantom and Ergodox. My Ergodox layout adds persistent layers based on the Planck and Preonic setup. The layout arrays are pulled directly from the ergodox/ez/ez.h keymap definition starting at line 81. --- keyboards/ergodox/keymaps/xyverz/keymap.c | 311 ++++++++++++++++++++++++++++++ keyboards/phantom/keymaps/xyverz/keymap.c | 67 +++++++ 2 files changed, 378 insertions(+) create mode 100644 keyboards/ergodox/keymaps/xyverz/keymap.c create mode 100644 keyboards/phantom/keymaps/xyverz/keymap.c diff --git a/keyboards/ergodox/keymaps/xyverz/keymap.c b/keyboards/ergodox/keymaps/xyverz/keymap.c new file mode 100644 index 000000000..c5ce99dd2 --- /dev/null +++ b/keyboards/ergodox/keymaps/xyverz/keymap.c @@ -0,0 +1,311 @@ +/* + * The Dvorak layout shown herestems from my early Kinesis years, using the Contour PS/2 with a Dvorak + * software layout. Because of this, the RBRC and LBRC were on opposite sides of the board in the corner + * keys. I've decided to continue using this layout with my ErgoDox. + * + * The QWERTY layout shown here is based entirely on the Kinesis Advantage layout, with the additional + * keys as shown in the diagrams. The Colemak layout is merely an adaptation of that. + * + * I've enabled persistent keymaps for Qwerty, Dvorak and Colemak layers, similar to the default Planck + * layouts. + * + * For a better explanation of the layout matrices shown below, take a look at ../../ez/ez.h where the + * keymap is defined, beginning on line 81. + * + */ + +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +#define _DV 0 // Dvorak layer +#define _QW 1 // Qwerty layer +#define _CM 2 // Colemak layer +#define _MD 3 // Media Layer +#define _KP 4 // Keypad Layer + +// Macro name shortcuts +#define DVORAK M(_DV) +#define QWERTY M(_QW) +#define COLEMAK M(_CM) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Dvorak layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ] | 1 | 2 | 3 | 4 | 5 | ESC | | ESC | 6 | 7 | 8 | 9 | 0 | [ | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | ' | , | . | Y | Y | | | | F | G | C | R | L | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | CapsLk | A | O | E | U | I |------| |------| D | H | T | N | S | - | + * |--------+------+------+------+------+------| _MD | | _KP |------+------+------+------+------+--------| + * | LShift | Z | X | C | V | X | | | | B | M | W | V | Z | RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | LGUI | ` | INS | Left | Rght | | Up | Dn | / | = | RGUI | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | LCtr | LAlt | | Ralt | RCtr | + * ,------|------|------| |------+------+------. + * | | | Home | | PgUp | | | + * | BkSp | Del |------| |------| Enter| Space| + * | | | End | | PgDn | | | + * `--------------------' `--------------------' + * + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[_DV] = { // layer 0 : Dvorak + // left hand + {KC_RBRC, KC_TAB, KC_CAPS, KC_LSFT, KC_LGUI, KC_NO }, + {KC_1, KC_QUOT, KC_A, KC_SCLN, KC_GRV, KC_END }, + {KC_2, KC_COMM, KC_O, KC_Q, KC_INS, KC_DEL }, + {KC_3, KC_DOT, KC_E, KC_J, KC_LEFT, KC_BSPC}, + {KC_4, KC_P, KC_U, KC_K, KC_RGHT, KC_HOME}, + {KC_5, KC_Y, KC_I, KC_X, KC_NO, KC_LCTL}, + {KC_ESC, KC_NO, KC_NO, MO(_MD), KC_NO, KC_LALT}, + + // right hand + {KC_ESC, KC_NO, KC_NO, MO(_KP), KC_NO, KC_RALT}, + {KC_6, KC_F, KC_D, KC_B, KC_NO, KC_RCTL}, + {KC_7, KC_G, KC_H, KC_M, KC_UP, KC_PGUP}, + {KC_8, KC_C, KC_T, KC_W, KC_DOWN, KC_SPC }, + {KC_9, KC_R, KC_N, KC_V, KC_SLSH, KC_ENT }, + {KC_0, KC_L, KC_S, KC_Z, KC_EQL, KC_PGDN}, + {KC_LBRC, KC_BSLS, KC_MINS, KC_RSFT, KC_RGUI, KC_NO } +}, + +/* Keymap 1: QWERTY layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | = | 1 | 2 | 3 | 4 | 5 | ESC | | ESC | 6 | 7 | 8 | 9 | 0 | - | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | E | R | T | | | | Y | U | I | O | P | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | CapsLk | A | S | D | F | G |------| |------| H | J | K | L | ; | ' | + * |--------+------+------+------+------+------| _MD | | _KP |------+------+------+------+------+--------| + * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | LGUI | ` | INS | Left | Rght | | Up | Dn | [ | ] | RGUI | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | LCtr | LAlt | | Ralt | RCtr | + * ,------|------|------| |------+------+------. + * | | | Home | | PgUp | | | + * | BkSp | Del |------| |------| Enter| Space| + * | | | End | | PgDn | | | + * `--------------------' `--------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[_QW] = { // layer 1 : QWERTY + // left hand + {KC_EQL, KC_TAB, KC_CAPS, KC_LSFT, KC_LGUI, KC_NO }, + {KC_1, KC_Q, KC_A, KC_Z, KC_GRV, KC_END }, + {KC_2, KC_W, KC_S, KC_X, KC_INS, KC_DEL }, + {KC_3, KC_E, KC_D, KC_C, KC_LEFT, KC_BSPC}, + {KC_4, KC_R, KC_F, KC_V, KC_RGHT, KC_HOME}, + {KC_5, KC_T, KC_G, KC_B, KC_NO, KC_LCTL}, + {KC_ESC, KC_NO, KC_NO, MO(_MD), KC_NO, KC_LALT}, + + // right hand + {KC_ESC, KC_NO, KC_NO, MO(_KP), KC_NO, KC_RALT}, + {KC_6, KC_Y, KC_H, KC_N, KC_NO, KC_RCTL}, + {KC_7, KC_U, KC_J, KC_M, KC_UP, KC_PGUP}, + {KC_8, KC_I, KC_K, KC_COMM, KC_DOWN, KC_SPC }, + {KC_9, KC_O, KC_L, KC_DOT, KC_LBRC, KC_ENT }, + {KC_0, KC_P, KC_SCLN, KC_SLSH, KC_RBRC, KC_PGDN}, + {KC_MINS, KC_BSLS, KC_QUOT, KC_RSFT, KC_RGUI, KC_NO } + }, + +/* Keymap 2: Colemak layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | = | 1 | 2 | 3 | 4 | 5 | ESC | | ESC | 6 | 7 | 8 | 9 | 0 | - | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | F | P | G | | | | J | L | U | Y | ; | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | BkSpc | A | R | S | T | D |------| |------| H | N | E | I | O | ' | + * |--------+------+------+------+------+------| _MD | | _KP |------+------+------+------+------+--------| + * | LShift | Z | X | C | V | B | | | | K | M | , | . | / | RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | LGUI | ` | INS | Left | Rght | | Up | Dn | [ | ] | RGUI | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | LCtr | LAlt | | Ralt | RCtr | + * ,------|------|------| |------+------+------. + * | | | Home | | PgUp | | | + * | BkSp | Del |------| |------| Enter| Space| + * | | | End | | PgDn | | | + * `--------------------' `--------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[_CM] = { // layer 2 : Colemak + // left hand + {KC_EQL, KC_TAB, KC_BSPC, KC_LSFT, KC_LGUI, KC_NO }, + {KC_1, KC_Q, KC_A, KC_Z, KC_GRV, KC_END }, + {KC_2, KC_W, KC_R, KC_X, KC_INS, KC_DEL }, + {KC_3, KC_F, KC_S, KC_C, KC_LEFT, KC_BSPC}, + {KC_4, KC_P, KC_T, KC_V, KC_RGHT, KC_HOME}, + {KC_5, KC_G, KC_D, KC_B, KC_NO, KC_LCTL}, + {KC_ESC, KC_NO, KC_NO, MO(_MD), KC_NO, KC_LALT}, + + // right hand + {KC_ESC, KC_NO, KC_NO, MO(_KP), KC_NO, KC_RALT}, + {KC_6, KC_J, KC_H, KC_K, KC_NO, KC_RCTL}, + {KC_7, KC_L, KC_N, KC_M, KC_UP, KC_PGUP}, + {KC_8, KC_U, KC_E, KC_COMM, KC_DOWN, KC_SPC }, + {KC_9, KC_Y, KC_I, KC_DOT, KC_LBRC, KC_ENT }, + {KC_0, KC_SCLN, KC_O, KC_SLSH, KC_RBRC, KC_PGDN}, + {KC_MINS, KC_BSLS, KC_QUOT, KC_RSFT, KC_RGUI, KC_NO } + }, + +/* Keymap 3: Symbol Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | TEENSY | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | F10 | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | PrSc | ScLk | Paus | | FN4 | | FN5 | | Mute | Vol- | Vol+ | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| Stop | Prev | Play | Next | Sel | | + * |--------+------+------+------+------+------| FN4 | | FN5 |------+------+------+------+------+--------| + * | | |Dvorak|Qwerty|Colemk| | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// Media Layer +[_MD] = { // layer 3 : Media layer + // left hand + {RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO }, + {KC_F1, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, + {KC_F2, KC_PSCR, KC_TRNS, DVORAK, KC_TRNS, KC_TRNS}, + {KC_F3, KC_SLCK, KC_TRNS, QWERTY, KC_TRNS, KC_TRNS}, + {KC_F4, KC_PAUS, KC_TRNS, COLEMAK, KC_TRNS, KC_TRNS}, + {KC_F5, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS}, + {KC_F11, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_TRNS}, + + // right hand + {KC_F12, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_TRNS}, + {KC_F6, KC_TRNS, KC_MSTP, KC_TRNS, KC_NO, KC_TRNS}, + {KC_F7, KC_MUTE, KC_MPRV, KC_TRNS, KC_TRNS, KC_TRNS}, + {KC_F8, KC_VOLD, KC_MPLY, KC_TRNS, KC_TRNS, KC_TRNS}, + {KC_F9, KC_VOLU, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS}, + {KC_F10, KC_TRNS, KC_MSEL, KC_TRNS, KC_TRNS, KC_TRNS}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO } + }, + +/* Keymap 4: Keypad layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | Power | | | | | | | | | | NmLk | KP / | KP * | KP - | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Sleep | | | | | | FN5 | | FN4 | | KP 7 | KP 8 | KP 9 | KP + | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Wake | | | | | |------| |------| | KP 4 | KP 5 | KP 6 | KP + | | + * |--------+------+------+------+------+------| FN5 | | FN4 |------+------+------+------+------+--------| + * | | | | | | | | | | | KP 1 | KP 2 | KP 3 |KP Ent| | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | KP 0 | | KP . |KP Ent| | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// Keypad Layer +[_KP] = { // layer 4 : Keypad layer + // left hand + {KC_PWR, KC_SLEP, KC_WAKE, 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, KC_TRNS}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_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_TRNS}, + {KC_TRNS, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_TRNS}, + + // right hand + {KC_TRNS, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_TRNS}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS}, + {KC_NLCK, KC_P7, KC_P4, KC_P1, KC_P0, KC_TRNS}, + {KC_PSLS, KC_P8, KC_P5, KC_P2, KC_NO, KC_TRNS}, + {KC_PAST, KC_P9, KC_P6, KC_P3, KC_PDOT, KC_TRNS}, + {KC_PMNS, KC_PPLS, KC_PPLS, KC_PENT, KC_PENT, KC_TRNS}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO } + }, + +}; + +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 _DV: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_DV); + } + break; + case _QW: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_QW); + } + break; + case _CM: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_CM); + } + 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; + } + +}; diff --git a/keyboards/phantom/keymaps/xyverz/keymap.c b/keyboards/phantom/keymaps/xyverz/keymap.c new file mode 100644 index 000000000..5948e4ca5 --- /dev/null +++ b/keyboards/phantom/keymaps/xyverz/keymap.c @@ -0,0 +1,67 @@ +#include "phantom.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 _FL 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: (Base Layer) Default Layer + * ,-----------------------------------------------------------------------------. + * |Esc |f1| f2| f3| f4| | f5| f6| f7| f8| | f9|f10|f11|f12| |Prnt|ScLk|Paus| + * |-----------------------------------------------------------| |--------------| + * | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0| - | = |Backsp | | Ins|Home|PgUp| + * |-----------------------------------------------------------| |--------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| | Del| End|PgDn| + * |-----------------------------------------------------------| `--------------' + * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return | + * |-----------------------------------------------------------| ,----. + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | | Up | + * |-----------------------------------------------------------| ,-------------. + * |Ctrl|Gui |Alt | Space |ALT |GUI |_FL |CTRL | |Lft| Dn |Rig | + * `-----------------------------------------------------------' `-------------' + */ +[_BL] = 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_LBRC, KC_RBRC, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, \ + 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_EQL, KC_BSLS, KC_DELETE, KC_END, KC_PGDN, \ + KC_CAPS, 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, KC_RSFT, KC_UP, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _FL: Function Layer + * ,-----------------------------------------------------------------------------. + * |RESET| | | | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------| |--------------| + * | | | | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------| |--------------| + * | | | | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------| `--------------' + * | | | | | | | | | | | | | | + * |-----------------------------------------------------------| ,----. + * | | F1| F2| F3| F4| F5|F6 |F7 |F8 | | | | | | + * |-----------------------------------------------------------| ,-------------. + * | | | | | | | | | | | | | + * `-----------------------------------------------------------' `-------------' + */ +[_FL] = 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_SLEP, \ + RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,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_MSTP,KC_MPLY,KC_MPRV,KC_MNXT,KC_MSEL, KC_TRNS,KC_TRNS,KC_TRNS, \ + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_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_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) +}; + +enum function_id { + SHIFT_ESC, +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { +} -- cgit v1.2.3 From 0d6035524173219ced32abbfa2e78171edab17ff Mon Sep 17 00:00:00 2001 From: Ian Sterling Date: Tue, 9 Aug 2016 23:56:21 -0700 Subject: Added braces using LSFT(KC_LBRC) and LSFT(KC_RBRC) since the normal RBCR and LBCR didn't work for me. --- keyboards/atreus/keymaps/xyverz/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/atreus/keymaps/xyverz/keymap.c b/keyboards/atreus/keymaps/xyverz/keymap.c index 447fbcf10..f4d4a9cf0 100644 --- a/keyboards/atreus/keymaps/xyverz/keymap.c +++ b/keyboards/atreus/keymaps/xyverz/keymap.c @@ -53,7 +53,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_NO, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN}, {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_NO, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 }, {KC_TRNS, KC_TRNS, DVORAK, QWERTY, COLEMAK, KC_LCTL, KC_TRNS, KC_TRNS, KC_TRNS, KC_F11, KC_F12 }, - {KC_TRNS, KC_TRNS, KC_LGUI, KC_TRNS, KC_BSPC, KC_LALT, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, RESET } + {KC_TRNS, KC_TRNS, KC_LGUI, KC_TRNS, KC_BSPC, KC_LALT, KC_SPC, KC_TRNS, LSFT(KC_LBRC), LSFT(KC_RBRC), RESET } } }; -- cgit v1.2.3 From d1f418d85ddb3bc9594ab71267af92ef1a5b7b0c Mon Sep 17 00:00:00 2001 From: Xyverz Date: Thu, 11 Aug 2016 09:46:05 -0700 Subject: Update Makefile Corrected spelling of "ATREUS" in all locations. (ATRUES -> ATREUS) --- keyboards/atreus/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/atreus/Makefile b/keyboards/atreus/Makefile index 95ee1d4d7..5894d231f 100644 --- a/keyboards/atreus/Makefile +++ b/keyboards/atreus/Makefile @@ -2,11 +2,11 @@ ifdef TEENSY2 OPT_DEFS += -DATREUS_TEENSY2 - ATRUES_UPLOAD_COMMAND = teensy_loader_cli -w -mmcu=$(MCU) $(TARGET).hex + ATREUS_UPLOAD_COMMAND = teensy_loader_cli -w -mmcu=$(MCU) $(TARGET).hex else OPT_DEFS += -DATREUS_ASTAR OPT_DEFS += -DCATERINA_BOOTLOADER - ATRUES_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \ + ATREUS_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \ avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) endif @@ -84,5 +84,5 @@ endif USB ?= /dev/cu.usbmodem1411 upload: build - $(ATRUES_UPLOAD_COMMAND) - \ No newline at end of file + $(ATREUS_UPLOAD_COMMAND) + -- cgit v1.2.3 From eeade4af84af073479f38de32d97e99203b29350 Mon Sep 17 00:00:00 2001 From: Xyverz Date: Thu, 11 Aug 2016 09:48:23 -0700 Subject: Update keymap.c Changed right-hand F-key layout in order to add KC_PLUS to _L2. --- keyboards/atreus/keymaps/xyverz/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/atreus/keymaps/xyverz/keymap.c b/keyboards/atreus/keymaps/xyverz/keymap.c index f4d4a9cf0..0238fdbd3 100644 --- a/keyboards/atreus/keymaps/xyverz/keymap.c +++ b/keyboards/atreus/keymaps/xyverz/keymap.c @@ -51,8 +51,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }, [_L2] = { /* LAYER 2 */ {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_NO, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN}, - {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_NO, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 }, - {KC_TRNS, KC_TRNS, DVORAK, QWERTY, COLEMAK, KC_LCTL, KC_TRNS, KC_TRNS, KC_TRNS, KC_F11, KC_F12 }, + {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_NO, KC_TRNS, KC_F6, KC_F7, KC_F8, KC_PLUS}, + {KC_TRNS, KC_TRNS, DVORAK, QWERTY, COLEMAK, KC_LCTL, KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12 }, {KC_TRNS, KC_TRNS, KC_LGUI, KC_TRNS, KC_BSPC, KC_LALT, KC_SPC, KC_TRNS, LSFT(KC_LBRC), LSFT(KC_RBRC), RESET } } }; -- cgit v1.2.3 From 71e1bb2e1cf5fd87cb9cc6f81b830763b38665d4 Mon Sep 17 00:00:00 2001 From: Xyverz Date: Thu, 11 Aug 2016 11:04:57 -0700 Subject: Delete keymap.c Not ready to submit this one just yet. --- keyboards/phantom/keymaps/xyverz/keymap.c | 67 ------------------------------- 1 file changed, 67 deletions(-) delete mode 100644 keyboards/phantom/keymaps/xyverz/keymap.c diff --git a/keyboards/phantom/keymaps/xyverz/keymap.c b/keyboards/phantom/keymaps/xyverz/keymap.c deleted file mode 100644 index 5948e4ca5..000000000 --- a/keyboards/phantom/keymaps/xyverz/keymap.c +++ /dev/null @@ -1,67 +0,0 @@ -#include "phantom.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 _FL 1 - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Keymap _BL: (Base Layer) Default Layer - * ,-----------------------------------------------------------------------------. - * |Esc |f1| f2| f3| f4| | f5| f6| f7| f8| | f9|f10|f11|f12| |Prnt|ScLk|Paus| - * |-----------------------------------------------------------| |--------------| - * | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0| - | = |Backsp | | Ins|Home|PgUp| - * |-----------------------------------------------------------| |--------------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| | Del| End|PgDn| - * |-----------------------------------------------------------| `--------------' - * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return | - * |-----------------------------------------------------------| ,----. - * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | | Up | - * |-----------------------------------------------------------| ,-------------. - * |Ctrl|Gui |Alt | Space |ALT |GUI |_FL |CTRL | |Lft| Dn |Rig | - * `-----------------------------------------------------------' `-------------' - */ -[_BL] = 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_LBRC, KC_RBRC, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, \ - 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_EQL, KC_BSLS, KC_DELETE, KC_END, KC_PGDN, \ - KC_CAPS, 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, KC_RSFT, KC_UP, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), - - /* Keymap _FL: Function Layer - * ,-----------------------------------------------------------------------------. - * |RESET| | | | | | | | | | | | | | | | | | | - * |-----------------------------------------------------------| |--------------| - * | | | | | | | | | | | | | | | | | | | - * |-----------------------------------------------------------| |--------------| - * | | | | | | | | | | | | | | | | | | | - * |-----------------------------------------------------------| `--------------' - * | | | | | | | | | | | | | | - * |-----------------------------------------------------------| ,----. - * | | F1| F2| F3| F4| F5|F6 |F7 |F8 | | | | | | - * |-----------------------------------------------------------| ,-------------. - * | | | | | | | | | | | | | - * `-----------------------------------------------------------' `-------------' - */ -[_FL] = 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_SLEP, \ - RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,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_MSTP,KC_MPLY,KC_MPRV,KC_MNXT,KC_MSEL, KC_TRNS,KC_TRNS,KC_TRNS, \ - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_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_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) -}; - -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { -} -- cgit v1.2.3 From b98d47abe544c68ffba745b6643a777f8f61a03c Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Fri, 12 Aug 2016 16:36:07 +0200 Subject: ergodox: Update my keymap to v1.5 Major changes include: * The **1HAND** layer has been removed. * A `Delete` key is now available on the right thumb cluster. * The **ADORE** layer received a major update, see the updated layout image. * It is now possible to enable automatic logging for the **ADORE** layer, by setting the `ADORE_AUTOLOG` makefile variable to `yes` when compiling the keymap. It is off by default. * The `~` key and the `Media Next/Prev` key have been swapped on the **base** layer. * On the **ARROW** layer, `Backspace` has been replaced by `Enter`. * There is some experimental support for entering Unicode symbols. Signed-off-by: Gergely Nagy --- keyboards/ergodox/keymaps/algernon/Makefile | 7 + .../keymaps/algernon/images/adore-layer.png | Bin 95615 -> 93748 bytes .../ergodox/keymaps/algernon/images/base-layer.png | Bin 95654 -> 95222 bytes .../keymaps/algernon/images/one-handed-layer.png | Bin 91140 -> 0 bytes keyboards/ergodox/keymaps/algernon/keymap.c | 2422 ++++++++++---------- keyboards/ergodox/keymaps/algernon/readme.md | 52 +- 6 files changed, 1244 insertions(+), 1237 deletions(-) delete mode 100644 keyboards/ergodox/keymaps/algernon/images/one-handed-layer.png diff --git a/keyboards/ergodox/keymaps/algernon/Makefile b/keyboards/ergodox/keymaps/algernon/Makefile index 6bf3976b9..00194857a 100644 --- a/keyboards/ergodox/keymaps/algernon/Makefile +++ b/keyboards/ergodox/keymaps/algernon/Makefile @@ -8,10 +8,17 @@ CONSOLE_ENABLE = no TAP_DANCE_ENABLE = yes KEYLOGGER_ENABLE ?= yes +ADORE_AUTOLOG ?= no + ifeq (${FORCE_NKRO},yes) OPT_DEFS += -DFORCE_NKRO endif +ifeq (${ADORE_AUTOLOG},yes) +KEYLOGGER_ENABLE = yes +OPT_DEFS += -DADORE_AUTOLOG +endif + ifeq (${KEYLOGGER_ENABLE},yes) OPT_DEFS += -DKEYLOGGER_ENABLE CONSOLE_ENABLE = yes diff --git a/keyboards/ergodox/keymaps/algernon/images/adore-layer.png b/keyboards/ergodox/keymaps/algernon/images/adore-layer.png index 3df68ea53..44ad8a1eb 100644 Binary files a/keyboards/ergodox/keymaps/algernon/images/adore-layer.png and b/keyboards/ergodox/keymaps/algernon/images/adore-layer.png differ diff --git a/keyboards/ergodox/keymaps/algernon/images/base-layer.png b/keyboards/ergodox/keymaps/algernon/images/base-layer.png index 7b25a05b3..da159fbe2 100644 Binary files a/keyboards/ergodox/keymaps/algernon/images/base-layer.png and b/keyboards/ergodox/keymaps/algernon/images/base-layer.png differ diff --git a/keyboards/ergodox/keymaps/algernon/images/one-handed-layer.png b/keyboards/ergodox/keymaps/algernon/images/one-handed-layer.png deleted file mode 100644 index 698d11e5f..000000000 Binary files a/keyboards/ergodox/keymaps/algernon/images/one-handed-layer.png and /dev/null differ diff --git a/keyboards/ergodox/keymaps/algernon/keymap.c b/keyboards/ergodox/keymaps/algernon/keymap.c index c4de53da2..244bfb51f 100644 --- a/keyboards/ergodox/keymaps/algernon/keymap.c +++ b/keyboards/ergodox/keymaps/algernon/keymap.c @@ -1,1218 +1,1206 @@ -/* - * algernon's ErgoDox EZ layout, please see the readme.md file! - */ - -#include "ergodox.h" -#include "led.h" -#include "debug.h" -#include "action_layer.h" -#include "action_util.h" -#include "mousekey.h" -#include "timer.h" -#include "keymap_plover.h" -#include "eeconfig.h" -#include "wait.h" +/* + * algernon's ErgoDox EZ layout, please see the readme.md file! + */ + +#include "ergodox.h" +#include "led.h" +#include "debug.h" +#include "action_layer.h" +#include "action_util.h" +#include "mousekey.h" +#include "timer.h" +#include "keymap_plover.h" +#include "eeconfig.h" +#include "wait.h" #include "version.h" - -/* Layers */ - -enum { - BASE = 0, - ADORE, - ARRW, - APPSEL, - HUN, - NMDIA, - OHLFT, - OHRGT, - PLVR, -}; - -/* Macros */ - -enum { - NONE = 0, - // Buttons that do extra stuff - A_GUI, - A_PLVR, - A_ESC, - A_MPN, - - // Function / number keys - KF_1, // 1, F1 - KF_2, // 2, F2 - KF_3, // ... - KF_4, - KF_5, - KF_6, - KF_7, - KF_8, - KF_9, - KF_10, - KF_11, // =, F11 - - // Application select keys - APP_SLK, // Slack - APP_EMCS, // Emacs - APP_TERM, // Terminal - APP_CHRM, // Chrome - APP_MSIC, // Music - - // Diagonal mouse movement - A_MUL, - A_MUR, - A_MDL, - A_MDR, - - // Hungarian layer keys - HU_AA, // Á - HU_OO, // Ó - HU_EE, // É - HU_UU, // Ú - HU_II, // Í - HU_OE, // Ö - HU_UE, // Ü - HU_OEE, // Ő - HU_UEE, // Ű - - // One-handed layout specials - OH_BSSPC, - OH_ENTSFT, - OH_BASE, - OH_LEFT, - OH_RIGHT, -}; - -/* Fn keys */ - -enum { - F_BSE = 0, - F_HUN, - F_GUI, - F_SFT, - F_ALT, - F_CTRL -}; - -/* Custom keycodes */ - -enum { - CT_CLN = 0, - CT_MNS, - CT_TA, -}; - -/* States & timers */ - -uint16_t gui_timer = 0; - -uint16_t kf_timers[12]; - -uint16_t oh_base_timer = 0; -uint16_t oh_bsspc_timer = 0; -uint16_t oh_entsft_timer = 0; - -#define OH_BLINK_INTERVAL 500 - -uint8_t oh_left_blink = 0; -uint16_t oh_left_blink_timer = 0; -uint8_t oh_right_blink = 0; -uint16_t oh_right_blink_timer = 0; - -#if KEYLOGGER_ENABLE -bool log_enable = false; -#endif - -bool time_travel = false; - -/* The Keymap */ - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* Keymap 0: Base Layer - * - * ,-----------------------------------------------------. ,-----------------------------------------------------. - * | `~ | 1 F1 | 2 F2 | 3 F3 | 4 F4 | 5 F5 | Plvr | | Apps | 6 F6 | 7 F7 | 8 F8 | 9 F9 | 0 F10| F11 | - * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| - * | Next/Prev | ' | , | . | P | Y | [ | | ] | F | G | C | R | L | \ | - * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| - * | Tab/ARROW | A | O | E | U | I |------| |------| D | H | T | N | S | = / Arrow | - * |-----------+------+------+------+------+------| ( | | ) |------+------+------+------+------+-----------| - * | Play/Pause| / | Q | J | K | X | | | | B | M | W | V | Z | Stop | - * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' - * | | | | | : | | - | | | | | - * `-----------------------------------' `-----------------------------------' - * ,-------------. ,-------------. - * | LAlt | GUI | | MDIA | 1HND | - * ,------|------|------| |------+------+------. - * | | | Ctrl | | LEAD | | | - * |Backsp|LShift|------| |------| Enter| Space| - * | | | ESC | | HUN | | | - * `--------------------' `--------------------' - */ -[BASE] = KEYMAP( -// left hand - KC_GRV ,M(KF_1) ,M(KF_2) ,M(KF_3),M(KF_4),M(KF_5),M(A_PLVR) -,M(A_MPN) ,KC_QUOT ,KC_COMM ,KC_DOT ,KC_P ,KC_Y ,KC_LBRC -,TD(CT_TA) ,KC_A ,KC_O ,KC_E ,KC_U ,KC_I -,KC_MPLY ,KC_SLSH ,KC_Q ,KC_J ,KC_K ,KC_X ,KC_LPRN -,KC_NO ,KC_NO ,KC_NO ,KC_NO ,TD(CT_CLN) - - ,F(F_ALT),F(F_GUI) - ,F(F_CTRL) - ,KC_BSPC,F(F_SFT),M(A_ESC) - - // right hand - ,KC_APP ,M(KF_6),M(KF_7) ,M(KF_8),M(KF_9) ,M(KF_10) ,KC_F11 - ,KC_RBRC ,KC_F ,KC_G ,KC_C ,KC_R ,KC_L ,KC_BSLS - ,KC_D ,KC_H ,KC_T ,KC_N ,KC_S ,KC_EQL - ,KC_RPRN ,KC_B ,KC_M ,KC_W ,KC_V ,KC_Z ,KC_MSTP - ,TD(CT_MNS),KC_NO ,KC_NO ,KC_NO ,KC_NO - - ,OSL(NMDIA),M(OH_LEFT) - ,KC_LEAD - ,F(F_HUN) ,KC_ENT ,KC_SPC - ), - -/* Keymap 1: Adore layer - * - * ,-----------------------------------------------------. ,-----------------------------------------------------. - * | `~ | 1 F1 | 2 F2 | 3 F3 | 4 F4 | 5 F5 | Plvr | | Apps | 6 F6 | 7 F7 | 8 F8 | 9 F9 | 0 F10| F11 | - * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| - * | Next/Prev | , | . | L | W | M | [ | | ] | F | H | C | P | Y | \ | - * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| - * | Tab/Arrow | A | O | E | I | U |------| |------| D | R | T | N | S | = / Arrow | - * |-----------+------+------+------+------+------| ( | | ) |------+------+------+------+------+-----------| - * | Play/Pause| / | Z | ' | K | X | | | | B | G | V | J | Q | Stop | - * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' - * | | | | | : | | - | | | | | - * `-----------------------------------' `-----------------------------------' - * ,-------------. ,-------------. - * | LAlt | GUI | | MDIA | 1HND | - * ,------|------|------| |------+------+------. - * | | | Ctrl | | LEAD | | | - * |Backsp|LShift|------| |------| Enter| Space| - * | | | ESC | | HUN | | | - * `--------------------' `--------------------' - */ -[ADORE] = KEYMAP( -// left hand - KC_GRV ,M(KF_1) ,M(KF_2) ,M(KF_3),M(KF_4),M(KF_5),M(A_PLVR) -,M(A_MPN) ,KC_COMM ,KC_DOT ,KC_L ,KC_W ,KC_M ,KC_LBRC -,TD(CT_TA) ,KC_A ,KC_O ,KC_E ,KC_I ,KC_U -,KC_MPLY ,KC_SLSH ,KC_Z ,KC_QUOT,KC_K ,KC_X ,KC_LPRN -,KC_NO ,KC_NO ,KC_NO ,KC_NO ,TD(CT_CLN) - - ,F(F_ALT),F(F_GUI) - ,F(F_CTRL) - ,KC_BSPC,F(F_SFT),M(A_ESC) - - // right hand - ,KC_APP ,M(KF_6),M(KF_7) ,M(KF_8),M(KF_9) ,M(KF_10) ,KC_F11 - ,KC_RBRC ,KC_F ,KC_H ,KC_C ,KC_P ,KC_Y ,KC_BSLS - ,KC_D ,KC_R ,KC_T ,KC_N ,KC_S ,KC_EQL - ,KC_RPRN ,KC_B ,KC_G ,KC_V ,KC_J ,KC_Q ,KC_MSTP - ,TD(CT_MNS),KC_NO ,KC_NO ,KC_NO ,KC_NO - - ,OSL(NMDIA),M(OH_LEFT) - ,KC_LEAD - ,F(F_HUN) ,KC_ENT ,KC_SPC - ), - -/* Keymap 2: Arrow layer - * - * ,-----------------------------------------------------. ,-----------------------------------------------------. - * | | | | | | | | | | | | | | | | - * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| - * | | | | | | | | | | | Home | Up | End | | | - * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| - * | | | | | | |------| |------| | Left | Down | Rght | | | - * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| - * | | | | | | | | | | | | | | | | - * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' - * | | | | | | | | | | | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | | | - * | | |------| |------| PgUp | PgDn | - * | | | | | | | | - * `--------------------' `--------------------' - */ - -[ARRW] = 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 - - // right hand - ,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_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_PGUP ,KC_PGDN - ), - -/* Keymap 3: Application select layer - * - * ,-----------------------------------------------------. ,-----------------------------------------------------. - * | |Music |Slack |Emacs |Term |Chrome| | | | | | | | | | - * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| - * | | | | | | | | | | | | | | | | - * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| - * | | | | | | |------| |------| | | | | | | - * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| - * | | | | | | | | | | | | | | | | - * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' - * | | | | | | | | | | | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | | | - * | | |------| |------| | | - * | | | | | | | | - * `--------------------' `--------------------' - */ - -[APPSEL] = KEYMAP( -// left hand - KC_TRNS ,M(APP_MSIC),M(APP_SLK),M(APP_EMCS),M(APP_TERM),M(APP_CHRM),KC_TRNS -,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS -,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS -,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,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_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_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS - ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,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: Hungarian Layer - * - * ,-----------------------------------------------------. ,-----------------------------------------------------. - * | | | | | | | | | | | | | | | | - * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| - * | | | Ő | | Ű | | | | | | | | | | | - * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| - * | | Á | Ó | É | Ú | Í |------| |------| | | | | | | - * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| - * | | | Ö | | Ü | | | | | | | | | | | - * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' - * | | | | | | | | | | | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | | | - * | | |------| |------| | | - * | | | | | BASE | | | - * `--------------------' `--------------------' - */ - -[HUN] = KEYMAP( -// left hand - KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO -,KC_NO ,KC_NO ,M(HU_OEE),KC_NO ,M(HU_UEE),KC_NO ,KC_NO -,KC_NO ,M(HU_AA),M(HU_OO) ,M(HU_EE),M(HU_UU) ,M(HU_II) -,KC_NO ,KC_NO ,M(HU_OE) ,KC_NO ,M(HU_UE) ,KC_NO ,KC_NO -,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - - ,KC_NO ,KC_NO - ,KC_NO - ,KC_NO ,KC_TRNS ,KC_TRNS - - // right hand - ,KC_TRNS ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - - ,KC_NO ,KC_NO - ,KC_NO - ,F(F_BSE),KC_TRNS ,KC_TRNS - ), - -/* Keymap 5: Navigation & Media layer - * - * ,-----------------------------------------------------. ,-----------------------------------------------------. - * | MS Slow | | | | | |ScrLCK| |ScrLCK| | | | | | | - * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| - * | MS Normal | | Home | Up | PgUp | | | |Scroll| |MsUpL | MsUp |MsUpR | |PrintScreen| - * |-----------+------+------+------+------+------| | | Up |------+------+------+------+------+-----------| - * | MS Fast | | Left | Down | Right| |------| |------| |MsLeft| MsDn |MsRght| | | - * |-----------+------+------+------+------+------| | |Scroll|------+------+------+------+------+-----------| - * | Play/Pause| | End | Down | PgDn | | | | Down | |MsDnL | MsDn |MsDnR | | Stop | - * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' - * | | | | | | | | | | | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | Mute | VlUp | | BASE | MClk | - * ,------|------|------| |------+------+------. - * | | | VlDn | | Prev |Left |Right | - * | SPC | Enter|------| |------| Click| Click| - * | | | ESC | | Next | | | - * `--------------------' `--------------------' - */ -[NMDIA] = KEYMAP( -// left hand - KC_ACL0 ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,LGUI(KC_L) -,KC_ACL1 ,KC_NO ,KC_HOME ,KC_UP ,KC_PGUP ,KC_NO ,KC_NO -,KC_ACL2 ,KC_NO ,KC_LEFT ,KC_DOWN ,KC_RIGHT,KC_NO -,KC_MPLY ,KC_NO ,KC_END ,KC_DOWN ,KC_PGDN ,KC_NO ,KC_NO -,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - ,KC_MUTE ,KC_VOLU - ,KC_VOLD - ,KC_SPC,KC_ENTER,M(A_ESC) - - // right hand - ,LGUI(KC_L),KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - ,KC_WH_U ,KC_NO ,M(A_MUL),KC_MS_U ,M(A_MUR),KC_NO ,KC_PSCR - ,KC_NO ,KC_MS_L ,KC_MS_D ,KC_MS_R ,KC_NO ,KC_NO - ,KC_WH_D ,KC_NO ,M(A_MDL),KC_MS_D ,M(A_MDR),KC_NO ,KC_MSTP - ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - - ,KC_TRNS ,KC_MS_BTN3 - ,KC_MPRV - ,KC_MNXT ,KC_BTN1 ,KC_BTN2 - ), - -/* Keymap 6: One-handed, left side - * - * ,-----------------------------------------------------. - * | `~ | 1 F1 | 2 F2 | 3 F3 | 4 F4 | 5 F5 |A BSE| - * |-----------+------+------+------+------+-------------| - * | Tab | ' | , | . | P | Y | [ | - * |-----------+------+------+------+------+------| | - * | - | A | O | E | U | I |------| - * |-----------+------+------+------+------+------| ( | - * | Play/Pause| ; | Q | J | K | X | | - * `-----------+------+------+------+------+-------------' - * | Home | End | Down | Up | ESC | - * `-----------------------------------' - * ,-------------. - * | LAlt | GUI | - * ,------|------|------| - * |BackSp|LShift| Ctrl | - * | | |------| - * |Space |Enter |OTHER | - * `--------------------' - */ -[OHLFT] = KEYMAP( -// left hand - KC_GRV ,M(KF_1) ,M(KF_2) ,M(KF_3) ,M(KF_4) ,M(KF_5) ,M(OH_BASE) -,KC_TAB ,KC_QUOT ,KC_COMM ,KC_DOT ,KC_P ,KC_Y ,KC_LBRC -,KC_MINS ,KC_A ,KC_O ,KC_E ,KC_U ,KC_I -,KC_MPLY ,KC_SCLN ,KC_Q ,KC_J ,KC_K ,KC_X ,KC_LPRN -,KC_HOME ,KC_END ,KC_DOWN ,KC_UP ,M(A_ESC) - - ,KC_TRNS ,KC_TRNS - ,KC_TRNS - ,M(OH_BSSPC),M(OH_ENTSFT),M(OH_RIGHT) - - // 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_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - - ,KC_NO ,KC_NO - ,KC_NO - ,KC_NO ,KC_NO ,KC_NO - ), - -/* Keymap 7: One-handed, right side - * - * ,-----------------------------------------------------. - * | = F11 | 0 F10| 9 F9 | 8 F8 | 7 F7 | 6 F6 |A BSE| - * |-----------+------+------+------+------+-------------| - * | / | L | R | C | G | F | ] | - * |-----------+------+------+------+------+------| | - * | \ | S | N | T | H | D |------| - * |-----------+------+------+------+------+------| ) | - * | Stop | Z | V | W | M | B | | - * `-----------+------+------+------+------+-------------' - * | PgDn | PgUp | Right| Left | ESC | - * `-----------------------------------' - * ,-------------. - * | LAlt | GUI | - * ,------|------|------| - * |BackSp|LShift| Ctrl | - * | | |------| - * |Space |Enter |OTHER | - * `--------------------' - */ -[OHRGT] = KEYMAP( -// left hand - M(KF_11) ,M(KF_10) ,M(KF_9) ,M(KF_8) ,M(KF_7) ,M(KF_6) ,M(OH_BASE) -,KC_SLSH ,KC_L ,KC_R ,KC_C ,KC_G ,KC_F ,KC_RBRC -,KC_BSLS ,KC_S ,KC_N ,KC_T ,KC_H ,KC_D -,KC_MSTP ,KC_Z ,KC_V ,KC_W ,KC_M ,KC_B ,KC_RPRN -,KC_PGDN ,KC_PGUP ,KC_RGHT ,KC_LEFT ,M(A_ESC) - - ,KC_TRNS ,KC_TRNS - ,KC_TRNS - ,M(OH_BSSPC),M(OH_ENTSFT),M(OH_LEFT) - - // 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_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - - ,KC_NO ,KC_NO - ,KC_NO - ,KC_NO ,KC_NO ,KC_NO - ), - -/* Keymap 8: Steno for Plover - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | | | | | | | BASE | | | | | | | | | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | # | # | # | # | # | # | | # | # | # | # | # | # | # | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | T | P | H | |------| |------| | F | P | L | T | D | - * |--------+ S +------+------+------+ * | * | | * | * +------+------+------+------+--------| - * | | | K | W | R | | | | | | R | B | G | S | Z | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | | | | | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | | | - * | A | O |------| |------| E | U | - * | | | | | | | | - * `--------------------' `--------------------' - */ - -[PLVR] = KEYMAP( -// left hand -KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, M(A_PLVR), -KC_NO, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, -KC_NO, PV_LS, PV_LT, PV_LP, PV_LH, PV_STAR, -KC_NO, PV_LS, PV_LK, PV_LW, PV_LR, PV_STAR, PV_STAR, -KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_NO, KC_NO, - KC_NO, - PV_A, PV_O, KC_NO, - - // right hand - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, - PV_STAR, PV_RF, PV_RP, PV_RL, PV_RT, PV_RD, - PV_STAR, PV_STAR, PV_RR, PV_RB, PV_RG, PV_RS, PV_RZ, - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_NO, KC_NO, - KC_NO, - KC_NO,PV_E, PV_U - ), - -}; - -const uint16_t PROGMEM fn_actions[] = { - [F_BSE] = ACTION_LAYER_CLEAR(ON_PRESS) - ,[F_HUN] = ACTION_LAYER_INVERT(HUN, ON_PRESS) - ,[F_GUI] = ACTION_MACRO_TAP(A_GUI) - ,[F_SFT] = ACTION_MODS_ONESHOT (MOD_LSFT) - ,[F_ALT] = ACTION_MODS_ONESHOT (MOD_LALT) - ,[F_CTRL] = ACTION_MODS_ONESHOT (MOD_LCTL) -}; - -void toggle_steno(int pressed) -{ - uint8_t layer = biton32(layer_state); - - if (pressed) { - if (layer != PLVR) layer_on(PLVR); else layer_off(PLVR); - - register_code(PV_LP); - register_code(PV_LH); - register_code(PV_LR); - register_code(PV_O); - register_code(PV_RL); - register_code(PV_RG); - } else { - unregister_code(PV_LP); - unregister_code(PV_LH); - unregister_code(PV_LR); - unregister_code(PV_O); - unregister_code(PV_RL); - unregister_code(PV_RG); - } -} - -macro_t *ang_do_hun (keyrecord_t *record, uint16_t accent, uint16_t hun_char) -{ - uint8_t need_shift = 0; - uint8_t hold_shift = 0; - - if (!record->event.pressed) - return MACRO_NONE; - - layer_off (HUN); - - if (keyboard_report->mods & MOD_BIT (KC_LSFT)) { - hold_shift = 1; - need_shift = 1; - unregister_code (KC_LSFT); - } - if ((get_oneshot_mods () & MOD_BIT(KC_LSFT)) && !has_oneshot_mods_timed_out ()) { - need_shift = 1; - hold_shift = 0; - unregister_code (KC_LSFT); - } - - clear_oneshot_mods (); - - register_code (KC_RALT); - unregister_code (KC_RALT); - if (accent == (KC_DQT)) { - register_code (KC_RSFT); - } - register_code (accent); - unregister_code (accent); - if (need_shift && accent != (KC_DQT)) { - register_code (KC_RSFT); - } else if (accent == (KC_DQT) && !need_shift) { - unregister_code (KC_RSFT); - } - register_code (hun_char); - unregister_code (hun_char); - if (need_shift || accent == (KC_DQT)) - unregister_code (KC_RSFT); - if (hold_shift) - register_code (KC_LSFT); - - return MACRO_NONE; -} - -void ang_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; - - if (timer_elapsed (kf_timers[code]) > TAPPING_TERM) { - // Long press - kc = KC_F1 + code; - } else { - if (id == KF_11) - kc = KC_EQL; - else - kc = KC_1 + code; - } - - register_code (kc); - unregister_code (kc); - } -} - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - switch(id) { - case A_ESC: - if (record->event.pressed) { - if ((get_oneshot_mods ()) && !has_oneshot_mods_timed_out ()) { - clear_oneshot_mods (); - } else { - register_code (KC_ESC); - } - layer_off (HUN); - } else { - unregister_code (KC_ESC); - } - break; - - case A_MPN: - if (record->event.pressed) { - if (keyboard_report->mods & MOD_BIT(KC_LSFT) || - ((get_oneshot_mods() & MOD_BIT(KC_LSFT)) && !has_oneshot_mods_timed_out())) { - int oneshot = ((get_oneshot_mods() & MOD_BIT(KC_LSFT)) && !has_oneshot_mods_timed_out()); - - if (oneshot) - clear_oneshot_mods (); - unregister_code (KC_LSFT); - - register_code (KC_MPRV); - unregister_code (KC_MPRV); - - if (!oneshot) - register_code (KC_LSFT); - } else { - return MACRO (T(MNXT), END); - } - } - break; - - /* Hungarian layer */ - case HU_AA: - return ang_do_hun (record, KC_QUOT, KC_A); - case HU_OO: - return ang_do_hun (record, KC_QUOT, KC_O); - case HU_EE: - return ang_do_hun (record, KC_QUOT, KC_E); - case HU_UU: - return ang_do_hun (record, KC_QUOT, KC_U); - case HU_II: - return ang_do_hun (record, KC_QUOT, KC_I); - case HU_OE: - return ang_do_hun (record, KC_DQT, KC_O); - case HU_UE: - return ang_do_hun (record, KC_DQT, KC_U); - case HU_OEE: - return ang_do_hun (record, KC_EQL, KC_O); - case HU_UEE: - return ang_do_hun (record, KC_EQL, KC_U); - - /* Mouse movement */ - 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; - - /* Plover base */ - case A_PLVR: - toggle_steno(record->event.pressed); - break; - - /* GUI & AppSel */ - case A_GUI: - if (record->event.pressed) { - register_code (KC_LGUI); - if (record->tap.count && !record->tap.interrupted) { - if (record->tap.count >= 2) { - register_code (KC_W); - layer_on (APPSEL); - set_oneshot_layer (APPSEL, ONESHOT_START); - } - } else { - record->tap.count = 0; - } - gui_timer = 0; - } else { - if (record->tap.count >= 2) - { - unregister_code (KC_W); - clear_oneshot_layer_state (ONESHOT_PRESSED); - } - gui_timer = timer_read (); - } - break; - - case APP_SLK: - return MACRODOWN(T(S), T(L), T(A), T(C), T(K), T(ENT), END); - - case APP_EMCS: - return MACRODOWN(T(E), T(M), T(A), T(C), T(S), T(ENT), END); - - case APP_TERM: - return MACRODOWN(T(T), T(E), T(R), T(M), T(ENT), END); - - case APP_CHRM: - return MACRODOWN(T(C), T(H), T(R), T(O), T(M), T(ENT), END); - - case APP_MSIC: - return MACRODOWN(T(R), T(H), T(Y), T(T), T(H), T(M), T(B), T(O), T(X), T(ENT), END); - - /* Function keys */ - case KF_1 ... KF_11: - ang_handle_kf (record, id); - break; - - /* 1HAND layout */ - case OH_BASE: - if (record->event.pressed) { - oh_base_timer = timer_read (); - } else { - if (timer_elapsed (oh_base_timer) > TAPPING_TERM) { - layer_clear (); - } else { - return MACRO (T(APP), END); - } - } - break; - - case OH_BSSPC: - if (record->event.pressed) { - oh_bsspc_timer = timer_read (); - } else { - if (timer_elapsed (oh_bsspc_timer) > TAPPING_TERM) { - return MACRO (T(BSPC), END); - } else { - return MACRO (T(SPC), END); - } - } - break; - - case OH_ENTSFT: - if (record->event.pressed) { - oh_entsft_timer = timer_read (); - } else { - if (timer_elapsed (oh_entsft_timer) > TAPPING_TERM) { - if (keyboard_report->mods & MOD_BIT(KC_LSFT)) - unregister_code (KC_LSFT); - else - register_code (KC_LSFT); - } else { - return MACRO (T(ENT), END); - } - } - break; - - case OH_LEFT: - if (record->event.pressed) { - layer_move (OHLFT); - oh_left_blink = 1; - oh_left_blink_timer = timer_read (); - ergodox_right_led_1_on (); - } - break; - - case OH_RIGHT: - if (record->event.pressed) { - layer_move (OHRGT); - oh_right_blink = 1; - oh_right_blink_timer = timer_read (); - ergodox_right_led_3_on (); - } - break; - } - return MACRO_NONE; -}; - -uint8_t is_adore = 0; - -// Runs just one time when the keyboard initializes. -void matrix_init_user(void) { - uint8_t dl; - - ergodox_led_all_on(); - for (int i = LED_BRIGHTNESS_HI; i > LED_BRIGHTNESS_LO; i--) { - ergodox_led_all_set (i); - wait_ms (5); - } - wait_ms(1000); - for (int i = LED_BRIGHTNESS_LO; i > 0; i--) { - ergodox_led_all_set (i); - wait_ms (10); - } - ergodox_led_all_off(); - - if (!eeconfig_is_enabled()) - eeconfig_init(); - dl = eeconfig_read_default_layer (); - if (dl == (1UL << ADORE)) - is_adore = 1; -}; - -LEADER_EXTERNS(); - -void ang_do_unicode (void) { - register_code (KC_RCTL); - register_code (KC_RSFT); - register_code (KC_U); - unregister_code (KC_U); - unregister_code (KC_RSFT); - unregister_code (KC_RCTL); - wait_ms (100); -} - -void ang_tap (uint16_t codes[]) { - for (int i = 0; codes[i] != 0; i++) { - register_code (codes[i]); - unregister_code (codes[i]); - wait_ms (50); - } -} - -#define TAP_ONCE(code) \ - register_code (code); \ - unregister_code (code) - -void ang_tap_dance_cln_finished (qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - register_code (KC_RSFT); - register_code (KC_SCLN); - } else if (state->count == 2) { - register_code (KC_SCLN); - } -} - -void ang_tap_dance_cln_reset (qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - unregister_code (KC_SCLN); - unregister_code (KC_RSFT); - } else if (state->count == 2) { - unregister_code (KC_SCLN); - } -} - -void ang_tap_dance_mns_finished (qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - register_code (KC_MINS); - } else if (state->count == 2) { - register_code (KC_RSFT); - register_code (KC_MINS); - } -} - -void ang_tap_dance_mns_reset (qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - unregister_code (KC_MINS); - } else if (state->count == 2) { - unregister_code (KC_RSFT); - unregister_code (KC_MINS); - } -} - -typedef struct { - bool layer_toggle; - bool sticky; - bool finished_once; -} td_ta_state_t; - -void ang_tap_dance_ta_finished (qk_tap_dance_state_t *state, void *user_data) { - td_ta_state_t *td_ta = (td_ta_state_t *) user_data; - - if (td_ta->finished_once) { - return; - } - - if (td_ta->sticky) { - td_ta->sticky = false; - td_ta->layer_toggle = false; - layer_off (ARRW); - return; - } - - td_ta->finished_once = true; - if (state->count == 1 && !state->pressed) { - register_code (KC_TAB); - td_ta->sticky = false; - td_ta->layer_toggle = false; - } else { - td_ta->layer_toggle = true; - layer_on (ARRW); - td_ta->sticky = (state->count == 2); - } -} - -void ang_tap_dance_ta_reset (qk_tap_dance_state_t *state, void *user_data) { - td_ta_state_t *td_ta = (td_ta_state_t *) user_data; - - if (!td_ta->layer_toggle) - unregister_code (KC_TAB); - if (!td_ta->sticky) - layer_off (ARRW); - - td_ta->finished_once = false; -} - -const qk_tap_dance_action_t tap_dance_actions[] = { - [CT_CLN] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, ang_tap_dance_cln_finished, ang_tap_dance_cln_reset) - ,[CT_MNS] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, ang_tap_dance_mns_finished, ang_tap_dance_mns_reset) - ,[CT_TA] = { - .fn = { NULL, ang_tap_dance_ta_finished, ang_tap_dance_ta_reset }, - .user_data = (void *)&((td_ta_state_t) { false, false, false }) - } -}; - -// Runs constantly in the background, in a loop. -void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); - - if (gui_timer && timer_elapsed (gui_timer) > TAPPING_TERM) - unregister_code (KC_LGUI); - - if (layer != OHLFT) - oh_left_blink = 0; - if (layer != OHRGT) - oh_right_blink = 0; - - if (layer == HUN) { - ergodox_right_led_2_on(); - ergodox_right_led_3_on(); - } else if (layer == NMDIA) { - ergodox_right_led_1_on(); - ergodox_right_led_2_on(); - } else if (layer == PLVR) { - ergodox_right_led_1_on (); - ergodox_right_led_2_on (); - ergodox_right_led_3_on (); - } else if (layer == ADORE) { - ergodox_right_led_1_on (); - ergodox_right_led_2_on (); - ergodox_right_led_3_on (); - - ergodox_right_led_2_set (LED_BRIGHTNESS_HI); - } - - if (layer == OHLFT || layer == OHRGT) { - ergodox_right_led_2_on(); - - if (oh_left_blink) { - if (timer_elapsed (oh_left_blink_timer) > OH_BLINK_INTERVAL) { - if ((keyboard_report->mods & MOD_BIT(KC_LSFT)) == 0) - ergodox_right_led_1_off (); - } - if (timer_elapsed (oh_left_blink_timer) > OH_BLINK_INTERVAL * 2) { - ergodox_right_led_1_on (); - oh_left_blink_timer = timer_read (); - } - } - - if (oh_right_blink) { - if (timer_elapsed (oh_right_blink_timer) > OH_BLINK_INTERVAL) { - if ((keyboard_report->mods & MOD_BIT(KC_LCTRL)) == 0) - ergodox_right_led_3_off (); - } - if (timer_elapsed (oh_right_blink_timer) > OH_BLINK_INTERVAL * 2) { - ergodox_right_led_3_on (); - oh_right_blink_timer = timer_read (); - } - } - } - - if (keyboard_report->mods & MOD_BIT(KC_LSFT) || - ((get_oneshot_mods() & MOD_BIT(KC_LSFT)) && !has_oneshot_mods_timed_out())) { - ergodox_right_led_1_set (LED_BRIGHTNESS_HI); - ergodox_right_led_1_on (); - } else { - ergodox_right_led_1_set (LED_BRIGHTNESS_LO); - if (layer != OHLFT && layer != NMDIA && layer != PLVR && layer != ADORE) - ergodox_right_led_1_off (); - } - - if (keyboard_report->mods & MOD_BIT(KC_LALT) || - ((get_oneshot_mods() & MOD_BIT(KC_LALT)) && !has_oneshot_mods_timed_out())) { - ergodox_right_led_2_set (LED_BRIGHTNESS_HI); - ergodox_right_led_2_on (); - } else { - ergodox_right_led_2_set (LED_BRIGHTNESS_LO); - if (layer != OHRGT && layer != HUN && layer != OHLFT && layer != NMDIA && layer != PLVR && layer != ADORE) - ergodox_right_led_2_off (); - } - - if (keyboard_report->mods & MOD_BIT(KC_LCTRL) || - ((get_oneshot_mods() & MOD_BIT(KC_LCTRL)) && !has_oneshot_mods_timed_out())) { - ergodox_right_led_3_set (LED_BRIGHTNESS_HI); - ergodox_right_led_3_on (); - } else { - ergodox_right_led_3_set (LED_BRIGHTNESS_LO); - if (layer != OHRGT && layer != HUN && layer != PLVR && layer != ADORE) - ergodox_right_led_3_off (); - } - - LEADER_DICTIONARY() { - leading = false; - leader_end (); - -#if KEYLOGGER_ENABLE - SEQ_ONE_KEY (KC_D) { - ergodox_led_all_on(); - wait_ms(100); - ergodox_led_all_off(); - log_enable = !log_enable; - } -#endif - - SEQ_ONE_KEY (KC_T) { - time_travel = !time_travel; - } - - SEQ_ONE_KEY (KC_U) { - ang_do_unicode (); - } - - SEQ_ONE_KEY (KC_V) { - SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ (" QMK_VERSION "/" KEYMAP_VERSION ")"); - } - - SEQ_ONE_KEY (KC_L) { - /* λ */ - ang_do_unicode (); - - uint16_t codes[] = {KC_0, KC_3, KC_B, KC_B, KC_ENT, 0}; - ang_tap (codes); - } - - SEQ_ONE_KEY (KC_Y) { - uint16_t codes[] = {KC_BSLS, KC_O, KC_SLSH, 0}; - ang_tap (codes); - } - - SEQ_ONE_KEY (KC_S) { - ang_do_unicode (); TAP_ONCE (KC_A); TAP_ONCE (KC_F); TAP_ONCE (KC_SPC); - TAP_ONCE (KC_BSLS); - register_code (KC_RSFT); TAP_ONCE (KC_MINS); TAP_ONCE (KC_9); unregister_code (KC_RSFT); - ang_do_unicode (); TAP_ONCE (KC_3); TAP_ONCE (KC_0); TAP_ONCE (KC_C); TAP_ONCE (KC_4); TAP_ONCE (KC_SPC); - register_code (KC_RSFT); TAP_ONCE (KC_0); TAP_ONCE (KC_MINS); unregister_code (KC_RSFT); - TAP_ONCE (KC_SLSH); - ang_do_unicode (); TAP_ONCE (KC_A); TAP_ONCE (KC_F); TAP_ONCE (KC_SPC); - } - - SEQ_TWO_KEYS (KC_W, KC_M) { - register_code (KC_LALT); - register_code (KC_F2); - unregister_code (KC_F2); - unregister_code (KC_LALT); - - wait_ms (1000); - - uint16_t codes[] = {KC_M, KC_A, KC_X, KC_MINS, KC_F, KC_O, KC_C, KC_U, KC_S, KC_E, KC_D, KC_ENT, 0}; - ang_tap (codes); - register_code (KC_LGUI); - register_code (KC_UP); - unregister_code (KC_UP); - unregister_code (KC_LGUI); - } - - SEQ_ONE_KEY (KC_A) { - if (is_adore == 0) { - default_layer_and (0); - default_layer_or ((1UL << ADORE)); - eeconfig_update_default_layer ((1UL << ADORE)); - is_adore = 1; - - ergodox_led_all_off (); - ergodox_right_led_3_on (); - wait_ms (100); - ergodox_right_led_2_on (); - wait_ms (100); - ergodox_right_led_3_off (); - ergodox_right_led_1_on (); - wait_ms (100); - ergodox_right_led_2_off (); - wait_ms (100); - ergodox_right_led_1_off (); - } else { - is_adore = 0; - default_layer_and (0); - default_layer_or (1UL << BASE); - eeconfig_update_default_layer ((1UL << BASE)); - - ergodox_led_all_off (); - ergodox_right_led_1_on (); - wait_ms (100); - ergodox_right_led_2_on (); - wait_ms (100); - ergodox_right_led_1_off (); - ergodox_right_led_3_on (); - wait_ms (100); - ergodox_right_led_2_off (); - wait_ms (100); - ergodox_right_led_3_off (); - } - } - } -} - -static uint16_t last4[4]; - -bool process_record_user (uint16_t keycode, keyrecord_t *record) { -#if KEYLOGGER_ENABLE - uint8_t layer = biton32(layer_state); - - if (log_enable && layer == BASE) { - xprintf ("KL: col=%d, row=%d\n", record->event.key.col, - record->event.key.row); - } -#endif - - if (time_travel && !record->event.pressed) { - uint8_t p; - - // shift cache one to the left - for (p = 0; p < 3; p++) { - last4[p] = last4[p + 1]; - } - last4[3] = keycode; - - if (last4[0] == KC_D && last4[1] == KC_A && last4[2] == KC_T && last4[3] == KC_E) { - uint16_t codes[] = {KC_E, KC_SPC, KC_MINS, KC_D, KC_SPC, KC_QUOT, 0}; - ang_tap (codes); - register_code (KC_RSFT); - register_code (KC_EQL); - unregister_code (KC_EQL); - unregister_code (KC_RSFT); - - uint16_t codes2[] = {KC_4, KC_SPC, KC_D, KC_A, KC_Y, KC_S, KC_QUOT, 0}; - ang_tap (codes2); - - return false; - } - } - - return true; -} + +/* Layers */ + +enum { + BASE = 0, + ADORE, + ARRW, + APPSEL, + HUN, + NMDIA, + PLVR, +}; + +/* Macros */ + +enum { + NONE = 0, + // Buttons that do extra stuff + A_GUI, + A_PLVR, + A_ESC, + A_MPN, + + // Function / number keys + KF_1, // 1, F1 + KF_2, // 2, F2 + KF_3, // ... + KF_4, + KF_5, + KF_6, + KF_7, + KF_8, + KF_9, + KF_10, + KF_11, // =, F11 + + // Application select keys + APP_SLK, // Slack + APP_EMCS, // Emacs + APP_TERM, // Terminal + APP_CHRM, // Chrome + APP_MSIC, // Music + + // Diagonal mouse movement + A_MUL, + A_MUR, + A_MDL, + A_MDR, + + // Hungarian layer keys + HU_AA, // Á + HU_OO, // Ó + HU_EE, // É + HU_UU, // Ú + HU_II, // Í + HU_OE, // Ö + HU_UE, // Ü + HU_OEE, // Ő + HU_UEE, // Ű +}; + +/* Fn keys */ + +enum { + F_BSE = 0, + F_HUN, + F_GUI, + F_SFT, + F_ALT, + F_CTRL +}; + +/* Custom keycodes */ + +enum { + CT_CLN = 0, + CT_MNS, + CT_TA, + CT_LBP, + CT_RBP +}; + +/* States & timers */ + +uint16_t gui_timer = 0; + +uint16_t kf_timers[12]; + +#if KEYLOGGER_ENABLE +bool log_enable = false; +#endif + +bool time_travel = false; + +/* The Keymap */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Keymap 0: Base Layer + * + * ,-----------------------------------------------------. ,-----------------------------------------------------. + * | Next/Prev | 1 F1 | 2 F2 | 3 F3 | 4 F4 | 5 F5 | Plvr | | Apps | 6 F6 | 7 F7 | 8 F8 | 9 F9 | 0 F10| F11 | + * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| + * | ~ | ' | , | . | P | Y | [ | | ] | F | G | C | R | L | \ | + * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| + * | Tab/ARROW | A | O | E | U | I |------| |------| D | H | T | N | S | = / Arrow | + * |-----------+------+------+------+------+------| ( | | ) |------+------+------+------+------+-----------| + * | Play/Pause| / | Q | J | K | X | | | | B | M | W | V | Z | Stop | + * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' + * | | | | | : | | - | | | | | + * `-----------------------------------' `-----------------------------------' + * ,-------------. ,-------------. + * | LAlt | GUI | | MDIA | Del | + * ,------|------|------| |------+------+------. + * | | | Ctrl | | LEAD | | | + * |Backsp|LShift|------| |------| Enter| Space| + * | | | ESC | | HUN | | | + * `--------------------' `--------------------' + */ +[BASE] = KEYMAP( +// left hand + M(A_MPN) ,M(KF_1) ,M(KF_2) ,M(KF_3),M(KF_4),M(KF_5),M(A_PLVR) +,KC_GRV ,KC_QUOT ,KC_COMM ,KC_DOT ,KC_P ,KC_Y ,KC_LBRC +,TD(CT_TA) ,KC_A ,KC_O ,KC_E ,KC_U ,KC_I +,KC_MPLY ,KC_SLSH ,KC_Q ,KC_J ,KC_K ,KC_X ,KC_LPRN +,KC_NO ,KC_NO ,KC_NO ,KC_NO ,TD(CT_CLN) + + ,F(F_ALT),F(F_GUI) + ,F(F_CTRL) + ,KC_BSPC,F(F_SFT),M(A_ESC) + + // right hand + ,KC_APP ,M(KF_6),M(KF_7) ,M(KF_8),M(KF_9) ,M(KF_10) ,KC_F11 + ,KC_RBRC ,KC_F ,KC_G ,KC_C ,KC_R ,KC_L ,KC_BSLS + ,KC_D ,KC_H ,KC_T ,KC_N ,KC_S ,KC_EQL + ,KC_RPRN ,KC_B ,KC_M ,KC_W ,KC_V ,KC_Z ,KC_MSTP + ,TD(CT_MNS),KC_NO ,KC_NO ,KC_NO ,KC_NO + + ,OSL(NMDIA),KC_DEL + ,KC_LEAD + ,F(F_HUN) ,KC_ENT ,KC_SPC + ), + +/* Keymap 1: Adore layer + * + * ,-----------------------------------------------------. ,-----------------------------------------------------. + * | Play/Pause| 1 F1 | 2 F2 | 3 F3 | 4 F4 | 5 F5 | Plvr | | Apps | 6 F6 | 7 F7 | 8 F8 | 9 F9 | 0 F10| F11 | + * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| + * | `~ | X | W | K | L | M | ( | | ) | F | H | C | P | Y | \ | + * |-----------+------+------+------+------+------| [ | | ] |------+------+------+------+------+-----------| + * | Tab/Arrow | A | O | E | I | U |------| |------| D | R | T | N | S | = | + * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| + * | | Z | Q | ' | , | . | : | | - | B | G | V | J | / | | + * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' + * | | | | | | | | | | | | + * `-----------------------------------' `-----------------------------------' + * ,-------------. ,-------------. + * | LAlt | GUI | | MDIA | Del | + * ,------|------|------| |------+------+------. + * | | | Ctrl | | HUN | | | + * |Backsp|LShift|------| |------| Enter| Space| + * | | | ESC | | LEAD | | | + * `--------------------' `--------------------' + */ +[ADORE] = KEYMAP( +// left hand + KC_MPLY ,M(KF_1) ,M(KF_2) ,M(KF_3),M(KF_4),M(KF_5),M(A_PLVR) +,KC_GRV ,KC_X ,KC_W ,KC_K ,KC_L ,KC_M ,TD(CT_LBP) +,TD(CT_TA) ,KC_A ,KC_O ,KC_E ,KC_I ,KC_U +,KC_NO ,KC_Z ,KC_Q ,KC_QUOT,KC_COMM,KC_DOT ,TD(CT_CLN) +,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + + ,F(F_ALT),F(F_GUI) + ,F(F_CTRL) + ,KC_BSPC,F(F_SFT),M(A_ESC) + + // right hand + ,KC_APP ,M(KF_6),M(KF_7),M(KF_8),M(KF_9) ,M(KF_10) ,KC_F11 + ,TD(CT_RBP),KC_F ,KC_H ,KC_C ,KC_P ,KC_Y ,KC_BSLS + ,KC_D ,KC_R ,KC_T ,KC_N ,KC_S ,KC_EQL + ,TD(CT_MNS),KC_B ,KC_G ,KC_V ,KC_J ,KC_SLSH ,KC_NO + ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + + ,OSL(NMDIA),KC_DEL + ,F(F_HUN) + ,KC_LEAD ,KC_ENT ,KC_SPC + ), + +/* Keymap 2: Arrow layer + * + * ,-----------------------------------------------------. ,-----------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| + * | | | | | | | | | | | Home | Up | End | | | + * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| + * | | | | | | |------| |------| | Left | Down | Rght | | | + * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| + * | | | | | | | | | | | | | | | | + * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | Enter| |------| |------| PgUp | PgDn | + * | | | | | | | | + * `--------------------' `--------------------' + */ + +[ARRW] = 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_ENT ,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_HOME ,KC_UP ,KC_END ,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_PGUP ,KC_PGDN + ), + +/* Keymap 3: Application select layer + * + * ,-----------------------------------------------------. ,-----------------------------------------------------. + * | |Music |Slack |Emacs |Term |Chrome| | | | | | | | | | + * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| + * | | | | | | | | | | | | | | | | + * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| + * | | | | | | |------| |------| | | | | | | + * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| + * | | | | | | | | | | | | | | | | + * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ + +[APPSEL] = KEYMAP( +// left hand + KC_TRNS ,M(APP_MSIC),M(APP_SLK),M(APP_EMCS),M(APP_TERM),M(APP_CHRM),KC_TRNS +,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS +,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS +,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,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_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_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS + ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,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: Hungarian Layer + * + * ,-----------------------------------------------------. ,-----------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| + * | | | Ő | | Ű | | | | | | | | | | | + * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| + * | | Á | Ó | É | Ú | Í |------| |------| | | | | | | + * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| + * | | | Ö | | Ü | | | | | | | | | | | + * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | BASE | | | + * `--------------------' `--------------------' + */ + +[HUN] = KEYMAP( +// left hand + KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO +,KC_NO ,KC_NO ,M(HU_OEE),KC_NO ,M(HU_UEE),KC_NO ,KC_NO +,KC_NO ,M(HU_AA),M(HU_OO) ,M(HU_EE),M(HU_UU) ,M(HU_II) +,KC_NO ,KC_NO ,M(HU_OE) ,KC_NO ,M(HU_UE) ,KC_NO ,KC_NO +,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + + ,KC_NO ,KC_NO + ,KC_NO + ,KC_NO ,KC_TRNS ,KC_TRNS + + // right hand + ,KC_TRNS ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + + ,KC_NO ,KC_NO + ,KC_NO + ,F(F_BSE),KC_TRNS ,KC_TRNS + ), + +/* Keymap 5: Navigation & Media layer + * + * ,-----------------------------------------------------. ,-----------------------------------------------------. + * | MS Slow | | | | | |ScrLCK| |ScrLCK| | | | | | | + * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| + * | MS Normal | | Home | Up | PgUp | | | |Scroll| |MsUpL | MsUp |MsUpR | |PrintScreen| + * |-----------+------+------+------+------+------| | | Up |------+------+------+------+------+-----------| + * | MS Fast | | Left | Down | Right| |------| |------| |MsLeft| MsDn |MsRght| | | + * |-----------+------+------+------+------+------| | |Scroll|------+------+------+------+------+-----------| + * | Play/Pause| | End | Down | PgDn | | | | Down | |MsDnL | MsDn |MsDnR | | Stop | + * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | Mute | VlUp | | BASE | MClk | + * ,------|------|------| |------+------+------. + * | | | VlDn | | Prev |Left |Right | + * | SPC | Enter|------| |------| Click| Click| + * | | | ESC | | Next | | | + * `--------------------' `--------------------' + */ +[NMDIA] = KEYMAP( +// left hand + KC_ACL0 ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,LGUI(KC_L) +,KC_ACL1 ,KC_NO ,KC_HOME ,KC_UP ,KC_PGUP ,KC_NO ,KC_NO +,KC_ACL2 ,KC_NO ,KC_LEFT ,KC_DOWN ,KC_RIGHT,KC_NO +,KC_MPLY ,KC_NO ,KC_END ,KC_DOWN ,KC_PGDN ,KC_NO ,KC_NO +,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + ,KC_MUTE ,KC_VOLU + ,KC_VOLD + ,KC_SPC,KC_ENTER,M(A_ESC) + + // right hand + ,LGUI(KC_L),KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + ,KC_WH_U ,KC_NO ,M(A_MUL),KC_MS_U ,M(A_MUR),KC_NO ,KC_PSCR + ,KC_NO ,KC_MS_L ,KC_MS_D ,KC_MS_R ,KC_NO ,KC_NO + ,KC_WH_D ,KC_NO ,M(A_MDL),KC_MS_D ,M(A_MDR),KC_NO ,KC_MSTP + ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + + ,KC_TRNS ,KC_MS_BTN3 + ,KC_MPRV + ,KC_MNXT ,KC_BTN1 ,KC_BTN2 + ), + +/* Keymap 6: Steno for Plover + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | BASE | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | # | # | # | # | # | # | | # | # | # | # | # | # | # | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | T | P | H | |------| |------| | F | P | L | T | D | + * |--------+ S +------+------+------+ * | * | | * | * +------+------+------+------+--------| + * | | | K | W | R | | | | | | R | B | G | S | Z | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | A | O |------| |------| E | U | + * | | | | | | | | + * `--------------------' `--------------------' + */ + +[PLVR] = KEYMAP( +// left hand +KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, M(A_PLVR), +KC_NO, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, +KC_NO, PV_LS, PV_LT, PV_LP, PV_LH, PV_STAR, +KC_NO, PV_LS, PV_LK, PV_LW, PV_LR, PV_STAR, PV_STAR, +KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, + KC_NO, + PV_A, PV_O, KC_NO, + + // right hand + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, + PV_STAR, PV_RF, PV_RP, PV_RL, PV_RT, PV_RD, + PV_STAR, PV_STAR, PV_RR, PV_RB, PV_RG, PV_RS, PV_RZ, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, + KC_NO, + KC_NO,PV_E, PV_U + ), + +}; + +const uint16_t PROGMEM fn_actions[] = { + [F_BSE] = ACTION_LAYER_CLEAR(ON_PRESS) + ,[F_HUN] = ACTION_LAYER_INVERT(HUN, ON_PRESS) + ,[F_GUI] = ACTION_MACRO_TAP(A_GUI) + ,[F_SFT] = ACTION_MODS_ONESHOT (MOD_LSFT) + ,[F_ALT] = ACTION_MODS_ONESHOT (MOD_LALT) + ,[F_CTRL] = ACTION_MODS_ONESHOT (MOD_LCTL) +}; + +void toggle_steno(int pressed) +{ + uint8_t layer = biton32(layer_state); + + if (pressed) { + if (layer != PLVR) layer_on(PLVR); else layer_off(PLVR); + + register_code(PV_LP); + register_code(PV_LH); + register_code(PV_LR); + register_code(PV_O); + register_code(PV_RL); + register_code(PV_RG); + } else { + unregister_code(PV_LP); + unregister_code(PV_LH); + unregister_code(PV_LR); + unregister_code(PV_O); + unregister_code(PV_RL); + unregister_code(PV_RG); + } +} + +macro_t *ang_do_hun (keyrecord_t *record, uint16_t accent, uint16_t hun_char) +{ + uint8_t need_shift = 0; + uint8_t hold_shift = 0; + + if (!record->event.pressed) + return MACRO_NONE; + + layer_off (HUN); + + if (keyboard_report->mods & MOD_BIT (KC_LSFT)) { + hold_shift = 1; + need_shift = 1; + unregister_code (KC_LSFT); + } + if ((get_oneshot_mods () & MOD_BIT(KC_LSFT)) && !has_oneshot_mods_timed_out ()) { + need_shift = 1; + hold_shift = 0; + unregister_code (KC_LSFT); + } + + clear_oneshot_mods (); + + register_code (KC_RALT); + unregister_code (KC_RALT); + if (accent == (KC_DQT)) { + register_code (KC_RSFT); + } + register_code (accent); + unregister_code (accent); + if (need_shift && accent != (KC_DQT)) { + register_code (KC_RSFT); + } else if (accent == (KC_DQT) && !need_shift) { + unregister_code (KC_RSFT); + } + register_code (hun_char); + unregister_code (hun_char); + if (need_shift || accent == (KC_DQT)) + unregister_code (KC_RSFT); + if (hold_shift) + register_code (KC_LSFT); + + return MACRO_NONE; +} + +void ang_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; + + if (timer_elapsed (kf_timers[code]) > TAPPING_TERM) { + // Long press + kc = KC_F1 + code; + } else { + if (id == KF_11) + kc = KC_EQL; + else + kc = KC_1 + code; + } + + register_code (kc); + unregister_code (kc); + } +} + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + switch(id) { + case A_ESC: + if (record->event.pressed) { + if ((get_oneshot_mods ()) && !has_oneshot_mods_timed_out ()) { + clear_oneshot_mods (); + } else { + register_code (KC_ESC); + } + layer_off (HUN); + } else { + unregister_code (KC_ESC); + } + break; + + case A_MPN: + if (record->event.pressed) { + if (keyboard_report->mods & MOD_BIT(KC_LSFT) || + ((get_oneshot_mods() & MOD_BIT(KC_LSFT)) && !has_oneshot_mods_timed_out())) { + int oneshot = ((get_oneshot_mods() & MOD_BIT(KC_LSFT)) && !has_oneshot_mods_timed_out()); + + if (oneshot) + clear_oneshot_mods (); + unregister_code (KC_LSFT); + + register_code (KC_MPRV); + unregister_code (KC_MPRV); + + if (!oneshot) + register_code (KC_LSFT); + } else { + return MACRO (T(MNXT), END); + } + } + break; + + /* Hungarian layer */ + case HU_AA: + return ang_do_hun (record, KC_QUOT, KC_A); + case HU_OO: + return ang_do_hun (record, KC_QUOT, KC_O); + case HU_EE: + return ang_do_hun (record, KC_QUOT, KC_E); + case HU_UU: + return ang_do_hun (record, KC_QUOT, KC_U); + case HU_II: + return ang_do_hun (record, KC_QUOT, KC_I); + case HU_OE: + return ang_do_hun (record, KC_DQT, KC_O); + case HU_UE: + return ang_do_hun (record, KC_DQT, KC_U); + case HU_OEE: + return ang_do_hun (record, KC_EQL, KC_O); + case HU_UEE: + return ang_do_hun (record, KC_EQL, KC_U); + + /* Mouse movement */ + 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; + + /* Plover base */ + case A_PLVR: + toggle_steno(record->event.pressed); + break; + + /* GUI & AppSel */ + case A_GUI: + if (record->event.pressed) { + register_code (KC_LGUI); + if (record->tap.count && !record->tap.interrupted) { + if (record->tap.count >= 2) { + register_code (KC_W); + layer_on (APPSEL); + set_oneshot_layer (APPSEL, ONESHOT_START); + } + } else { + record->tap.count = 0; + } + gui_timer = 0; + } else { + if (record->tap.count >= 2) + { + unregister_code (KC_W); + clear_oneshot_layer_state (ONESHOT_PRESSED); + } + gui_timer = timer_read (); + } + break; + + case APP_SLK: + return MACRODOWN(T(S), T(L), T(A), T(C), T(K), T(ENT), END); + + case APP_EMCS: + return MACRODOWN(T(G), T(N), T(U), T(SPC), T(E), T(M), T(A), T(C), T(S), T(SPC), T(2), T(4), T(ENT), END); + + case APP_TERM: + return MACRODOWN(T(T), T(E), T(R), T(M), T(ENT), END); + + case APP_CHRM: + return MACRODOWN(T(C), T(H), T(R), T(O), T(M), T(ENT), END); + + case APP_MSIC: + return MACRODOWN(T(R), T(H), T(Y), T(T), T(H), T(M), T(B), T(O), T(X), T(ENT), END); + + /* Function keys */ + case KF_1 ... KF_11: + ang_handle_kf (record, id); + break; + } + + return MACRO_NONE; +}; + +uint8_t is_adore = 0; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + uint8_t dl; + + ergodox_led_all_on(); + for (int i = LED_BRIGHTNESS_HI; i > LED_BRIGHTNESS_LO; i--) { + ergodox_led_all_set (i); + wait_ms (5); + } + wait_ms(1000); + for (int i = LED_BRIGHTNESS_LO; i > 0; i--) { + ergodox_led_all_set (i); + wait_ms (10); + } + ergodox_led_all_off(); + + if (!eeconfig_is_enabled()) + eeconfig_init(); + dl = eeconfig_read_default_layer (); + if (dl == (1UL << ADORE)) { + is_adore = 1; +#if ADORE_AUTOLOG + log_enable = true; +#endif + } +}; + +LEADER_EXTERNS(); + +void ang_do_unicode (void) { + register_code (KC_RCTL); + register_code (KC_RSFT); + register_code (KC_U); + unregister_code (KC_U); + unregister_code (KC_RSFT); + unregister_code (KC_RCTL); + wait_ms (100); +} + +void ang_tap (uint16_t codes[]) { + for (int i = 0; codes[i] != 0; i++) { + register_code (codes[i]); + unregister_code (codes[i]); + wait_ms (50); + } +} + +#define TAP_ONCE(code) \ + register_code (code); \ + unregister_code (code) + +void ang_tap_dance_bp_finished (qk_tap_dance_state_t *state, void *user_data) { + bool left, parens; + + if (state->count > 2) { + state->count = 0; + return; + } + + if (state->keycode == TD(CT_LBP)) + left = true; + else + left = false; + + if (state->count == 1) + parens = false; + else + parens = true; + + if (parens) { + register_code (KC_RSFT); + if (left) { + TAP_ONCE(KC_9); + } else { + TAP_ONCE(KC_0); + } + unregister_code (KC_RSFT); + } else { + if (left) { + TAP_ONCE (KC_LBRC); + } else { + TAP_ONCE (KC_RBRC); + } + } +} + +void ang_tap_dance_cln_finished (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + register_code (KC_RSFT); + register_code (KC_SCLN); + } else if (state->count == 2) { + register_code (KC_SCLN); + } +} + +void ang_tap_dance_cln_reset (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + unregister_code (KC_SCLN); + unregister_code (KC_RSFT); + } else if (state->count == 2) { + unregister_code (KC_SCLN); + } +} + +void ang_tap_dance_mns_finished (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + register_code (KC_MINS); + } else if (state->count == 2) { + register_code (KC_RSFT); + register_code (KC_MINS); + } +} + +void ang_tap_dance_mns_reset (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + unregister_code (KC_MINS); + } else if (state->count == 2) { + unregister_code (KC_RSFT); + unregister_code (KC_MINS); + } +} + +typedef struct { + bool layer_toggle; + bool sticky; + bool finished_once; +} td_ta_state_t; + +void ang_tap_dance_ta_finished (qk_tap_dance_state_t *state, void *user_data) { + td_ta_state_t *td_ta = (td_ta_state_t *) user_data; + + if (td_ta->finished_once) { + return; + } + + if (td_ta->sticky) { + td_ta->sticky = false; + td_ta->layer_toggle = false; + layer_off (ARRW); + return; + } + + td_ta->finished_once = true; + if (state->count == 1 && !state->pressed) { + register_code (KC_TAB); + td_ta->sticky = false; + td_ta->layer_toggle = false; + } else { + td_ta->layer_toggle = true; + layer_on (ARRW); + td_ta->sticky = (state->count == 2); + } +} + +void ang_tap_dance_ta_reset (qk_tap_dance_state_t *state, void *user_data) { + td_ta_state_t *td_ta = (td_ta_state_t *) user_data; + + if (!td_ta->layer_toggle) + unregister_code (KC_TAB); + if (!td_ta->sticky) + layer_off (ARRW); + + td_ta->finished_once = false; +} + +const qk_tap_dance_action_t tap_dance_actions[] = { + [CT_CLN] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, ang_tap_dance_cln_finished, ang_tap_dance_cln_reset) + ,[CT_MNS] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, ang_tap_dance_mns_finished, ang_tap_dance_mns_reset) + ,[CT_TA] = { + .fn = { NULL, ang_tap_dance_ta_finished, ang_tap_dance_ta_reset }, + .user_data = (void *)&((td_ta_state_t) { false, false, false }) + } + ,[CT_LBP] = ACTION_TAP_DANCE_FN (ang_tap_dance_bp_finished) + ,[CT_RBP] = ACTION_TAP_DANCE_FN (ang_tap_dance_bp_finished) +}; + +static uint16_t uni[32]; +static uint8_t unicnt; +static bool unimagic = false; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + uint8_t layer = biton32(layer_state); + + if (gui_timer && timer_elapsed (gui_timer) > TAPPING_TERM) + unregister_code (KC_LGUI); + + if (layer == HUN) { + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + } else if (layer == NMDIA) { + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + } else if (layer == PLVR) { + ergodox_right_led_1_on (); + ergodox_right_led_2_on (); + ergodox_right_led_3_on (); + } else if (layer == ADORE) { + ergodox_right_led_1_on (); + ergodox_right_led_2_on (); + ergodox_right_led_3_on (); + + ergodox_right_led_2_set (LED_BRIGHTNESS_HI); + } + + if (keyboard_report->mods & MOD_BIT(KC_LSFT) || + ((get_oneshot_mods() & MOD_BIT(KC_LSFT)) && !has_oneshot_mods_timed_out())) { + ergodox_right_led_1_set (LED_BRIGHTNESS_HI); + ergodox_right_led_1_on (); + } else { + ergodox_right_led_1_set (LED_BRIGHTNESS_LO); + if (layer != NMDIA && layer != PLVR && layer != ADORE) + ergodox_right_led_1_off (); + } + + if (keyboard_report->mods & MOD_BIT(KC_LALT) || + ((get_oneshot_mods() & MOD_BIT(KC_LALT)) && !has_oneshot_mods_timed_out())) { + ergodox_right_led_2_set (LED_BRIGHTNESS_HI); + ergodox_right_led_2_on (); + } else { + ergodox_right_led_2_set (LED_BRIGHTNESS_LO); + if (layer != HUN && layer != NMDIA && layer != PLVR && layer != ADORE) + ergodox_right_led_2_off (); + } + + if (keyboard_report->mods & MOD_BIT(KC_LCTRL) || + ((get_oneshot_mods() & MOD_BIT(KC_LCTRL)) && !has_oneshot_mods_timed_out())) { + ergodox_right_led_3_set (LED_BRIGHTNESS_HI); + ergodox_right_led_3_on (); + } else { + ergodox_right_led_3_set (LED_BRIGHTNESS_LO); + if (layer != HUN && layer != PLVR && layer != ADORE) + ergodox_right_led_3_off (); + } + + LEADER_DICTIONARY() { + leading = false; + leader_end (); + +#if KEYLOGGER_ENABLE + SEQ_ONE_KEY (KC_D) { + ergodox_led_all_on(); + wait_ms(100); + ergodox_led_all_off(); + log_enable = !log_enable; + } +#endif + + SEQ_ONE_KEY (KC_T) { + time_travel = !time_travel; + } + + SEQ_ONE_KEY (KC_U) { + ang_do_unicode (); + } + + SEQ_TWO_KEYS (KC_LEAD, KC_U) { + unicnt = 0; + unimagic = true; + register_code(KC_RSFT); + TAP_ONCE(KC_U); + unregister_code(KC_RSFT); + } + + SEQ_ONE_KEY (KC_V) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ (" QMK_VERSION "/" KEYMAP_VERSION ")"); + } + + SEQ_ONE_KEY (KC_L) { + /* λ */ + ang_do_unicode (); + + uint16_t codes[] = {KC_0, KC_3, KC_B, KC_B, KC_ENT, 0}; + ang_tap (codes); + } + + SEQ_ONE_KEY (KC_Y) { + uint16_t codes[] = {KC_BSLS, KC_O, KC_SLSH, 0}; + ang_tap (codes); + } + + SEQ_ONE_KEY (KC_S) { + ang_do_unicode (); TAP_ONCE (KC_A); TAP_ONCE (KC_F); TAP_ONCE (KC_SPC); + TAP_ONCE (KC_BSLS); + register_code (KC_RSFT); TAP_ONCE (KC_MINS); TAP_ONCE (KC_9); unregister_code (KC_RSFT); + ang_do_unicode (); TAP_ONCE (KC_3); TAP_ONCE (KC_0); TAP_ONCE (KC_C); TAP_ONCE (KC_4); TAP_ONCE (KC_SPC); + register_code (KC_RSFT); TAP_ONCE (KC_0); TAP_ONCE (KC_MINS); unregister_code (KC_RSFT); + TAP_ONCE (KC_SLSH); + ang_do_unicode (); TAP_ONCE (KC_A); TAP_ONCE (KC_F); TAP_ONCE (KC_SPC); + } + + SEQ_TWO_KEYS (KC_W, KC_M) { + register_code (KC_LALT); + register_code (KC_F2); + unregister_code (KC_F2); + unregister_code (KC_LALT); + + wait_ms (1000); + + uint16_t codes[] = {KC_M, KC_A, KC_X, KC_MINS, KC_F, KC_O, KC_C, KC_U, KC_S, KC_E, KC_D, KC_ENT, 0}; + ang_tap (codes); + register_code (KC_LGUI); + register_code (KC_UP); + unregister_code (KC_UP); + unregister_code (KC_LGUI); + } + + SEQ_ONE_KEY (KC_A) { + if (is_adore == 0) { + default_layer_and (0); + default_layer_or ((1UL << ADORE)); + eeconfig_update_default_layer ((1UL << ADORE)); + is_adore = 1; + + ergodox_led_all_off (); + ergodox_right_led_3_on (); + wait_ms (100); + ergodox_right_led_2_on (); + wait_ms (100); + ergodox_right_led_3_off (); + ergodox_right_led_1_on (); + wait_ms (100); + ergodox_right_led_2_off (); + wait_ms (100); + ergodox_right_led_1_off (); +#if ADORE_AUTOLOG + log_enable = true; +#endif + } else { +#if ADORE_AUTOLOG + log_enable = false; +#endif + is_adore = 0; + default_layer_and (0); + default_layer_or (1UL << BASE); + eeconfig_update_default_layer ((1UL << BASE)); + + ergodox_led_all_off (); + ergodox_right_led_1_on (); + wait_ms (100); + ergodox_right_led_2_on (); + wait_ms (100); + ergodox_right_led_1_off (); + ergodox_right_led_3_on (); + wait_ms (100); + ergodox_right_led_2_off (); + wait_ms (100); + ergodox_right_led_3_off (); + } + } + } +} + +static uint16_t last4[4]; + +bool is_uni_seq(char *seq) { + uint8_t i; + + for (i = 0; seq[i]; i++) { + uint16_t code; + if (('1' <= seq[i]) && (seq[i] <= '9')) + code = seq[i] - '1' + KC_1; + else if (seq[i] == '0') + code = KC_0; + else + code = seq[i] - 'a' + KC_A; + + if (i > unicnt) + return false; + if (uni[i] != code) + return false; + } + + if (uni[i] == KC_ENT || uni[i] == KC_SPC) + return true; + + return false; +} + +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) { + bool leading_zeros = true; + + for(int i = 3; i >= 0; i--) { + uint8_t digit = ((hex >> (i*4)) & 0xF); + if (digit != 0) + leading_zeros = false; + else if (leading_zeros) + continue; + register_code(hex_to_keycode(digit)); + unregister_code(hex_to_keycode(digit)); + wait_ms(10); + } +} + +typedef struct { + char *symbol; + uint16_t codes[4]; +} qk_ucis_symbol_t; + +static qk_ucis_symbol_t ucis_symbol_table[] = { + {"poop", {0x1, 0xf4a9, 0}}, + {"rofl", {0x1, 0xf923, 0}}, + {"kiss", {0x1, 0xf619, 0}}, + {"snowman", {0x2603, 0}}, + {NULL, {}} +}; + +bool process_record_ucis (uint16_t keycode, keyrecord_t *record) { + uint8_t i; + + if (!unimagic) + return true; + + if (!record->event.pressed) + return true; + + uni[unicnt] = keycode; + unicnt++; + + if (keycode == KC_BSPC) { + if (unicnt >= 2) { + unicnt-= 2; + return true; + } else { + unicnt--; + return false; + } + } + + if (keycode == KC_ENT || keycode == KC_SPC) { + bool symbol_found = false; + + for (i = unicnt; i > 0; i--) { + register_code (KC_BSPC); + unregister_code (KC_BSPC); + wait_ms(10); + } + + ang_do_unicode(); + wait_ms(10); + for (i = 0; ucis_symbol_table[i].symbol; i++) { + if (is_uni_seq (ucis_symbol_table[i].symbol)) { + symbol_found = true; + for (uint8_t j = 0; ucis_symbol_table[i].codes[j]; j++) { + register_hex(ucis_symbol_table[i].codes[j]); + } + break; + } + } + if (!symbol_found) { + for (i = 0; i < unicnt - 1; i++) { + uint8_t code; + + if (uni[i] > KF_1) + code = uni[i] - KF_1 + KC_1; + else + code = uni[i]; + TAP_ONCE(code); + wait_ms (10); + } + } + + unimagic = false; + return true; + } + return true; +} + +bool process_record_user (uint16_t keycode, keyrecord_t *record) { +#if KEYLOGGER_ENABLE + if (log_enable) { + xprintf ("KL: col=%d, row=%d\n", record->event.key.col, + record->event.key.row); + } +#endif + + if (!process_record_ucis (keycode, record)) + return false; + + if (time_travel && !record->event.pressed) { + uint8_t p; + + // shift cache one to the left + for (p = 0; p < 3; p++) { + last4[p] = last4[p + 1]; + } + last4[3] = keycode; + + if (last4[0] == KC_D && last4[1] == KC_A && last4[2] == KC_T && last4[3] == KC_E) { + uint16_t codes[] = {KC_E, KC_SPC, KC_MINS, KC_D, KC_SPC, KC_QUOT, 0}; + ang_tap (codes); + register_code (KC_RSFT); + register_code (KC_EQL); + unregister_code (KC_EQL); + unregister_code (KC_RSFT); + + uint16_t codes2[] = {KC_4, KC_SPC, KC_D, KC_A, KC_Y, KC_S, KC_QUOT, 0}; + ang_tap (codes2); + + return false; + } + } + + return true; +} diff --git a/keyboards/ergodox/keymaps/algernon/readme.md b/keyboards/ergodox/keymaps/algernon/readme.md index 6fe177511..26dfddbe6 100644 --- a/keyboards/ergodox/keymaps/algernon/readme.md +++ b/keyboards/ergodox/keymaps/algernon/readme.md @@ -16,11 +16,12 @@ Some of the things in the layout only work when one uses Spacemacs and GNOME und - [ADORE layer](#adore-layer) - [Hungarian layer](#hungarian-layer) - [Navigation and media layer](#navigation-and-media-layer) - - [One-handed layer](#one-handed-layer) - [Steno layer](#steno-layer) - [LED states](#led-states) * [Tools](#tools) - [Heatmap](#heatmap) +* [Special features](#special-features) + - [Unicode Symbol Input](#unicode-symbol-input) * [Building](#building) - [Using on Windows](#using-on-windows) * [Changelog](#changelog) @@ -38,7 +39,7 @@ At its core, this is a Dvorak layout, with some minor changes. The more interest * The `Shift`, `Alt`, and `Control` modifiers are one-shot. When tapped, they are considered active for the next key press only. When double tapped, they toggle on, until a third, single tap sometime later. When held, they act as expected. My usual pattern is that I use these for the next keypress only, so this behaviour is perfect. If I need them held, I'll just double-tap. * The `GUI` key is special, because when I double-tap it, it sends `GUI + w`, which pops up an application selector. It also switches to a one-shot layer, where the number row on the left half turns into app selector macros, for the most common things I usually want to switch to. Otherwise it behaves as on a normal layout. * The `ESC` key also doubles as a one-shot cancel key: if tapped while any of the one-shot modifiers are in-flight (as in, single-tapped, and not expired yet), it cancels all one-shot modifiers. It also cancels the **Hun** layer, if active. Otherwise it sends the usual keycode. -* The **Media** and **Hun** layer keys are one-shot, the **1Hand** and **STENO** keys are toggles. +* The **Media** and **Hun** layer keys are one-shot, the **STENO** key is a toggle. * When holding any of the **Arrow** layer keys, the arrow layer activates while the layer key is held. Tapping the key produces the normal key. * Tapping the `:` key once yields `:`, tapping it twice yields `;`. * The **Lead** key allows me to type in a sequence of keys, and trigger some actions: @@ -51,6 +52,7 @@ At its core, this is a Dvorak layout, with some minor changes. The more interest - `LEAD v` prints the firmware version, the keyboard and the keymap. - `LEAD d` toggles logging keypress positions to the HID console. - `LEAD t` toggles time travel. Figuring out the current `date` is left as an exercise to the reader. + - `LEAD LEAD u` enters the [Unicode symbol input][#unicode-symbol-input] mode. ## ADORE layer @@ -74,20 +76,6 @@ On this layer, the accented characters are at the same position as their base va This layer is primarily for navigating with the cursor or the mouse, and some media things. -## One-handed layer - -[![One-handed layer](images/one-handed-layer.png)](http://www.keyboard-layout-editor.com/#/gists/edff2495135955b8963198dace7f7ece) - -The one-handed layer is used in situations where the right hand is occupied, by mousing around, for example. Tapping the `OTHER` key switches which side is active. For the most part, keys remain in their usual position. When the right half is active, keys are mirrored to the left half. - -The differences are as follows: - -* The `ESC` key has been moved to the bottom row, so the `OTHER` key is easier to tap. -* Most keys on the thumb cluster now have dual uses, and these do not change when switching sides: - - The `Space`/`Backspace` key sends `Space` on tap, `Backspace` when held for longer than a normal tap. - - The `Enter`/`Shift` key sends `Enter` on short-tap, `Shift` on long-tap. -* The `Apps`/`BASE` key can be used to go back to the base layer, by long-tapping it. A short-tap will send the `App` key, as usual. - ## Steno layer [![Steno layer for Plover](images/steno-layer.png)](http://www.keyboard-layout-editor.com/#/gists/401ef9a84369e47c57f9aedcf0a0d667) @@ -103,11 +91,25 @@ For the layers, the following rules apply: * When the [ADORE layer](#adore-layer) is toggled on, LEDs will light up from left to right in a sequence, then turn off. When the layer is toggled off, the LEDs light up and turn off in the other direction. No LEDs are on while the layer is active. * When the [Hungarian layer](#hungarian-layer) is active, the *green* and *blue* LEDs are on. * When the [Navigation and media layer](#navigation-and-media-layer) is active, the *red* and *green* ones are on. -* When the [One-handed layer](#one-handed-layer) is active, the *green* LED is on and bright, and either the *red* or the *blue* one is going to slowly blink, depending on the currently active side. * For the [Steno layer](#steno-layer), all LEDs will be turned on. Unless noted otherwise, the layers use a dim light for the LEDs, while modifiers use a stronger one, and modifiers override any layer preferences. For example, when on the one-handed layer, with the left side active (*red* light blinking), if `Shift` is on, the *red* light will be constantly on. +# Special features + +## Unicode Symbol Input + +Once in the Unicode Symbol Input mode, one is able to type in symbol names, press `Enter` or `Space`, and get the Unicode symbol itself back. When in the mode, a capital `U` is printed first. Once the sequence is finished, all of it is erased by sending enough `Backspace` taps, and the firmware starts the OS-specific unicode input sequence. Then, it looks up the symbol name, and enters the associated code. If it is not found, it will just replay the pressed keycodes. + +The currently supported symbols are: + +- `snowman`: ☃ +- `kiss`: 😙 +- `rofl`: 🤣 +- `poop`: 💩 + +This is an experimental feature, and may or may not work reliably. + # Tools ## Heatmap @@ -133,14 +135,14 @@ To make my workflow easier, this layout is maintained in [its own repository][al $ git clone https://github.com/jackhumbert/qmk_firmware.git $ cd qmk_firmware $ git clone https://github.com/algernon/ergodox-layout.git \ - keyboards/ergodox_ez/keymaps/algernon-master -$ make KEYBOARD=ergodox_ez KEYMAP=algernon-master + keyboards/ergodox/keymaps/algernon-master +$ make keyboard=ergodox keymap=algernon-master ``` From time to time, updates may be submitted back to the QMK repository. If you are reading it there, you can build the firmware like any other firmware included with it (assuming you are in the root directory of the firmware): ``` -$ make KEYBOARD=ergodox_ez KEYMAP=algernon +$ make keyboard=ergodox keymap=algernon ``` ## Using on Windows @@ -149,6 +151,16 @@ The keymap default to forcing NKRO, which seems to upset Windows, and except the # Changelog +## v1.5 - 2016-08-12 + +* The **1HAND** layer has been removed. +* A `Delete` key is now available on the right thumb cluster. +* The [ADORE](#adore-layer) layer received a major update, see the layout image above. +* It is now possible to enable automatic logging for the [ADORE](#adore-layer) layer, by setting the `ADORE_AUTOLOG` makefile variable to `yes` when compiling the keymap. It is off by default. +* The `~` key and the `Media Next/Prev` key have been swapped on the [base layer](#base-layer). +* On the **ARROW** layer, `Backspace` has been replaced by `Enter`. +* There is some experimental support for entering Unicode symbols. + ## v1.4 - 2016-07-29 * When toggling the key logging on or off, the LEDs will do a little dance. -- cgit v1.2.3 From 477f1ad0c8e360880d2b2db9abe4b000940a56bf Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Fri, 12 Aug 2016 19:07:44 -0700 Subject: fix link to ErgoDox EZ This just fixes the readme link to the ErgoDox EZ directory --- readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index 57629f8be..e2221e749 100644 --- a/readme.md +++ b/readme.md @@ -13,7 +13,7 @@ For an easy-to-read version of this document and the repository, check out [http * [Planck](/keyboards/planck/) * [Preonic](/keyboards/preonic/) * [Atomic](/keyboards/atomic/) -* [ErgoDox EZ](/keyboards/ergodox_ez/) +* [ErgoDox EZ](/keyboards/ergodox/ez/) * [Clueboard](/keyboards/clueboard/) * [Cluepad](/keyboards/cluepad/) @@ -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 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 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. -- cgit v1.2.3 From 458607ee5eafe1cc095b258cac014c334d8e7b72 Mon Sep 17 00:00:00 2001 From: Ian Sterling Date: Fri, 12 Aug 2016 22:26:30 -0700 Subject: Corrections to the Atreus Makefile and updates to my keymap --- keyboards/atreus/keymaps/xyverz/keymap.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/keyboards/atreus/keymaps/xyverz/keymap.c b/keyboards/atreus/keymaps/xyverz/keymap.c index 0238fdbd3..02a661c8e 100644 --- a/keyboards/atreus/keymaps/xyverz/keymap.c +++ b/keyboards/atreus/keymaps/xyverz/keymap.c @@ -46,14 +46,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_L1] = { /* LAYER 1 */ {KC_1, KC_2, KC_3, KC_4, KC_5, KC_NO, KC_6, KC_7, KC_8, KC_9, KC_0 }, {KC_TAB, KC_INS, KC_UP, KC_DEL, KC_HOME, KC_NO, KC_PGUP, KC_MUTE, KC_VOLD, KC_VOLU, KC_EQL }, - {KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_LCTL, KC_PGDN, KC_MPRV, KC_MPLY, KC_MNXT, KC_BSLS}, + {KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_LCTL, KC_PGDN, KC_MPRV, KC_MPLY, KC_MNXT, KC_BSLS}, {KC_TRNS, KC_GRV, KC_LGUI, KC_TRNS, KC_DEL, KC_LALT, KC_SPC, KC_TRNS, KC_LBRC, KC_RBRC, KC_ENT } }, [_L2] = { /* LAYER 2 */ {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_NO, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN}, {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_NO, KC_TRNS, KC_F6, KC_F7, KC_F8, KC_PLUS}, {KC_TRNS, KC_TRNS, DVORAK, QWERTY, COLEMAK, KC_LCTL, KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12 }, +<<<<<<< HEAD {KC_TRNS, KC_TRNS, KC_LGUI, KC_TRNS, KC_BSPC, KC_LALT, KC_SPC, KC_TRNS, LSFT(KC_LBRC), LSFT(KC_RBRC), RESET } +======= + {KC_TRNS, KC_TRNS, KC_LGUI, KC_TRNS, KC_BSPC, KC_LALT, KC_SPC, KC_TRNS, LSFT(KC_LBRC), LSFT(KC_RBRC), RESET} +>>>>>>> e1abe4c... Corrections to the Atreus Makefile and updates to my keymap } }; -- cgit v1.2.3 From 3bae791372e2090b30647d431c70c233caaef26f Mon Sep 17 00:00:00 2001 From: Xyverz Date: Fri, 12 Aug 2016 22:30:01 -0700 Subject: Update keymap.c --- keyboards/atreus/keymaps/xyverz/keymap.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/keyboards/atreus/keymaps/xyverz/keymap.c b/keyboards/atreus/keymaps/xyverz/keymap.c index 02a661c8e..b418cc9b5 100644 --- a/keyboards/atreus/keymaps/xyverz/keymap.c +++ b/keyboards/atreus/keymaps/xyverz/keymap.c @@ -53,11 +53,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_NO, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN}, {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_NO, KC_TRNS, KC_F6, KC_F7, KC_F8, KC_PLUS}, {KC_TRNS, KC_TRNS, DVORAK, QWERTY, COLEMAK, KC_LCTL, KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12 }, -<<<<<<< HEAD - {KC_TRNS, KC_TRNS, KC_LGUI, KC_TRNS, KC_BSPC, KC_LALT, KC_SPC, KC_TRNS, LSFT(KC_LBRC), LSFT(KC_RBRC), RESET } -======= {KC_TRNS, KC_TRNS, KC_LGUI, KC_TRNS, KC_BSPC, KC_LALT, KC_SPC, KC_TRNS, LSFT(KC_LBRC), LSFT(KC_RBRC), RESET} ->>>>>>> e1abe4c... Corrections to the Atreus Makefile and updates to my keymap } }; -- cgit v1.2.3 From c07fe96581f02d0ea14c50cda7565aa52406c122 Mon Sep 17 00:00:00 2001 From: Ian Sterling Date: Fri, 12 Aug 2016 23:45:40 -0700 Subject: Adding the MiniVan44 aka TheVan 44 by u/evangs to the repo. Initial Commit. --- keyboards/minivan44/Makefile | 75 ++++++++++++ keyboards/minivan44/config.h | 162 ++++++++++++++++++++++++++ keyboards/minivan44/keymaps/default/Makefile | 21 ++++ keyboards/minivan44/keymaps/default/config.h | 8 ++ keyboards/minivan44/keymaps/default/keymap.c | 97 +++++++++++++++ keyboards/minivan44/keymaps/default/readme.md | 1 + keyboards/minivan44/keymaps/xyverz/Makefile | 21 ++++ keyboards/minivan44/keymaps/xyverz/config.h | 8 ++ keyboards/minivan44/keymaps/xyverz/keymap.c | 92 +++++++++++++++ keyboards/minivan44/keymaps/xyverz/readme.md | 1 + keyboards/minivan44/minivan44.c | 28 +++++ keyboards/minivan44/minivan44.h | 22 ++++ keyboards/minivan44/readme.md | 28 +++++ 13 files changed, 564 insertions(+) create mode 100644 keyboards/minivan44/Makefile create mode 100644 keyboards/minivan44/config.h create mode 100644 keyboards/minivan44/keymaps/default/Makefile create mode 100644 keyboards/minivan44/keymaps/default/config.h create mode 100644 keyboards/minivan44/keymaps/default/keymap.c create mode 100644 keyboards/minivan44/keymaps/default/readme.md create mode 100644 keyboards/minivan44/keymaps/xyverz/Makefile create mode 100644 keyboards/minivan44/keymaps/xyverz/config.h create mode 100644 keyboards/minivan44/keymaps/xyverz/keymap.c create mode 100644 keyboards/minivan44/keymaps/xyverz/readme.md create mode 100644 keyboards/minivan44/minivan44.c create mode 100644 keyboards/minivan44/minivan44.h create mode 100644 keyboards/minivan44/readme.md diff --git a/keyboards/minivan44/Makefile b/keyboards/minivan44/Makefile new file mode 100644 index 000000000..45ca12780 --- /dev/null +++ b/keyboards/minivan44/Makefile @@ -0,0 +1,75 @@ + + +# 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 + +ifndef QUANTUM_DIR + include ../../Makefile +endif + + diff --git a/keyboards/minivan44/config.h b/keyboards/minivan44/config.h new file mode 100644 index 000000000..0ae93c095 --- /dev/null +++ b/keyboards/minivan44/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 0x8844 +#define DEVICE_VER 0x0002 +#define MANUFACTURER Evan Sailer +#define PRODUCT TheVan 44 +#define DESCRIPTION keyboard firmware for TV44 + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* + * 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 { D7, B5, F7, D4 } +#define MATRIX_COL_PINS { D2, D3, D5, D6, B4, B6, F6, F5, F4, F1, F0, B3 } +#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/minivan44/keymaps/default/Makefile b/keyboards/minivan44/keymaps/default/Makefile new file mode 100644 index 000000000..f4671a9d1 --- /dev/null +++ b/keyboards/minivan44/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/minivan44/keymaps/default/config.h b/keyboards/minivan44/keymaps/default/config.h new file mode 100644 index 000000000..df06a2620 --- /dev/null +++ b/keyboards/minivan44/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/minivan44/keymaps/default/keymap.c b/keyboards/minivan44/keymaps/default/keymap.c new file mode 100644 index 000000000..d559a4b1c --- /dev/null +++ b/keyboards/minivan44/keymaps/default/keymap.c @@ -0,0 +1,97 @@ +#include "minivan44.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 _QW 0 +#define _DV 1 +#define _CM 2 +#define _L1 3 +#define _L2 4 +#define _L3 5 + +// Macro name shortcuts +#define QWERTY M(_QW) +#define DVORAK M(_DV) +#define COLEMAK M(_CM) + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + + +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_LCTL, MO(_L2), KC_LGUI, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, KC_RALT, KC_ESC, XXXXXXX, TG(_L3) } + }, + [_DV] = { /* Dvorak */ + {KC_TAB, KC_COMM, KC_DOT, KC_SLSH, KC_Q, KC_Q, KC_Q, KC_Q, KC_Q, KC_Q, KC_Q, KC_BSPC }, + {MO(_L1), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, MO(_L1) }, + {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, MO(_L2) }, + {KC_LCTL, MO(_L2), KC_LGUI, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, KC_RALT, KC_ESC, XXXXXXX, TG(_L3) } + }, + [_CM] = { /* 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 }, + {MO(_L1), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, MO(_L1) }, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, 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) } + }, + [_L1] = { /* LAYER 1 */ + {KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL }, + {_______, KC_BSLS, KC_QUOT, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_DOWN, KC_UP, KC_LEFT, KC_RGHT, _______ }, + {_______, KC_ESC, _______, KC_PSCR, _______, _______, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, KC_RSFT }, + {_______, KC_LGUI, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, XXXXXXX, _______ } + }, + [_L2] = { /* LAYER 2 */ + {_______, QWERTY, DVORAK, COLEMAK, _______, _______, _______, KC_7, KC_8, KC_9, KC_0, _______ }, + {KC_ESC, KC_PIPE, KC_DQUO, KC_UNDS, KC_PLUS, LSFT(KC_LBRC), LSFT(KC_RBRC), KC_4, KC_5, KC_6, KC_VOLU, KC_ENT }, + {_______, _______, _______, _______, _______, _______, KC_0, KC_1, KC_2, KC_3, KC_VOLD, _______ }, + {_______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, XXXXXXX, _______ } + }, + [_L3] = { /* LAYER 3 */ + {_______, _______, _______, _______, _______, _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, _______ }, + {KC_ESC, _______, _______, _______, _______, _______, _______, KC_F5, KC_F6, KC_F7, KC_F8, _______ }, + {KC_LSFT, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_F9, KC_F10, KC_F11, KC_F12, _______ }, + {_______, KC_LSFT, KC_B, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, KC_C, _______, _______, XXXXXXX, _______ } + } +}; + +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 _DV: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_DV); + } + break; + case _QW: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_QW); + } + break; + case _CM: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_CM); + } + break; + } + return MACRO_NONE; +}; diff --git a/keyboards/minivan44/keymaps/default/readme.md b/keyboards/minivan44/keymaps/default/readme.md new file mode 100644 index 000000000..189a9c0ff --- /dev/null +++ b/keyboards/minivan44/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for minivan44 \ No newline at end of file diff --git a/keyboards/minivan44/keymaps/xyverz/Makefile b/keyboards/minivan44/keymaps/xyverz/Makefile new file mode 100644 index 000000000..f4671a9d1 --- /dev/null +++ b/keyboards/minivan44/keymaps/xyverz/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/minivan44/keymaps/xyverz/config.h b/keyboards/minivan44/keymaps/xyverz/config.h new file mode 100644 index 000000000..df06a2620 --- /dev/null +++ b/keyboards/minivan44/keymaps/xyverz/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/minivan44/keymaps/xyverz/keymap.c b/keyboards/minivan44/keymaps/xyverz/keymap.c new file mode 100644 index 000000000..f995da0e7 --- /dev/null +++ b/keyboards/minivan44/keymaps/xyverz/keymap.c @@ -0,0 +1,92 @@ +#include "minivan44.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +#define _DV 0 +#define _QW 1 +#define _CM 2 +#define _L1 3 +#define _L2 4 + +// Macro name shortcuts +#define DVORAK M(_DV) +#define QWERTY M(_QW) +#define COLEMAK M(_CM) + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_DV] = { /* 0: 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 }, + {MO(_L1), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENT }, + {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT }, + {KC_LCTL, KC_LALT, KC_LGUI, KC_BSPC, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, KC_SLSH, KC_MINS, XXXXXXX, MO(_L2) } + }, + + [_QW] = { /* 1: 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, 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, KC_BSPC, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, KC_SLSH, KC_MINS, XXXXXXX, MO(_L2) } + }, + + [_CM] = { /* 2: 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 }, + {MO(_L1), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT }, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT }, + {KC_LCTL, KC_LALT, KC_LGUI, KC_BSPC, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, KC_SLSH, KC_MINS, XXXXXXX, MO(_L2) } + }, + + [_L1] = {/* 1: FN 1 */ + {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_BSLS, KC_QUOT, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_DOWN, KC_UP, KC_LEFT, KC_RGHT, _______ }, + {_______, _______, _______, KC_PSCR, _______, _______, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, KC_RSFT }, + {_______, KC_LGUI, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, KC_SLSH, _______, _______ } + }, + + [_L2] = { /* 2: FN 2 */ + {KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_ESC }, + {_______, KC_F11, KC_F12, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_VOLU, KC_ENT }, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_VOLD, _______ }, + {QWERTY, DVORAK, COLEMAK, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______ } + } + +}; + +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 _DV: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_DV); + } + break; + case _QW: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_QW); + } + break; + case _CM: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_CM); + } + break; + } + return MACRO_NONE; +}; + + diff --git a/keyboards/minivan44/keymaps/xyverz/readme.md b/keyboards/minivan44/keymaps/xyverz/readme.md new file mode 100644 index 000000000..189a9c0ff --- /dev/null +++ b/keyboards/minivan44/keymaps/xyverz/readme.md @@ -0,0 +1 @@ +# The default keymap for minivan44 \ No newline at end of file diff --git a/keyboards/minivan44/minivan44.c b/keyboards/minivan44/minivan44.c new file mode 100644 index 000000000..be8214fd5 --- /dev/null +++ b/keyboards/minivan44/minivan44.c @@ -0,0 +1,28 @@ +#include "minivan44.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/minivan44/minivan44.h b/keyboards/minivan44/minivan44.h new file mode 100644 index 000000000..c6119c2e1 --- /dev/null +++ b/keyboards/minivan44/minivan44.h @@ -0,0 +1,22 @@ +#ifndef MINIVAN44_H +#define MINIVAN44_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, 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, K37, K38, K39, K3B \ +) \ +{ \ + { 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, KC_NO, KC_NO, KC_NO, K37, K38, K39, K3A, K3B } \ + +#endif diff --git a/keyboards/minivan44/readme.md b/keyboards/minivan44/readme.md new file mode 100644 index 000000000..59b62b0e6 --- /dev/null +++ b/keyboards/minivan44/readme.md @@ -0,0 +1,28 @@ +minivan44 keyboard firmware +====================== + +## 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/minivan44 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/` \ No newline at end of file -- cgit v1.2.3 From 8bdf745909bc2581491acce11225f56a85bc8f24 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Sat, 13 Aug 2016 10:33:47 +0200 Subject: process_unicode: Fix set_unicode_input_mode() In the header, this was defined as `set_unicode_input_mode`, but the implementation had `set_unicode_mode` for a name. Changed the implementation to match the header. Signed-off-by: Gergely Nagy --- quantum/process_keycode/process_unicode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quantum/process_keycode/process_unicode.c b/quantum/process_keycode/process_unicode.c index ad5d7f86b..3fcac15ce 100644 --- a/quantum/process_keycode/process_unicode.c +++ b/quantum/process_keycode/process_unicode.c @@ -13,7 +13,7 @@ uint16_t hex_to_keycode(uint8_t hex) } } -void set_unicode_mode(uint8_t os_target) +void set_unicode_input_mode(uint8_t os_target) { input_mode = os_target; } -- cgit v1.2.3 From 2d0f585e426084b13fecc642cdda77506e2bfbf9 Mon Sep 17 00:00:00 2001 From: Ian Sterling Date: Sat, 13 Aug 2016 10:36:08 -0700 Subject: Renamed minivan44 to tv44 in all occurrences per wishes of Jack and Evan. --- keyboards/tv44/Makefile | 75 ++++++++++++++ keyboards/tv44/config.h | 162 +++++++++++++++++++++++++++++++ keyboards/tv44/keymaps/default/Makefile | 21 ++++ keyboards/tv44/keymaps/default/config.h | 8 ++ keyboards/tv44/keymaps/default/keymap.c | 97 ++++++++++++++++++ keyboards/tv44/keymaps/default/readme.md | 1 + keyboards/tv44/keymaps/xyverz/Makefile | 21 ++++ keyboards/tv44/keymaps/xyverz/config.h | 8 ++ keyboards/tv44/keymaps/xyverz/keymap.c | 92 ++++++++++++++++++ keyboards/tv44/keymaps/xyverz/readme.md | 1 + keyboards/tv44/readme.md | 28 ++++++ keyboards/tv44/tv44.c | 28 ++++++ keyboards/tv44/tv44.h | 22 +++++ 13 files changed, 564 insertions(+) create mode 100644 keyboards/tv44/Makefile create mode 100644 keyboards/tv44/config.h create mode 100644 keyboards/tv44/keymaps/default/Makefile create mode 100644 keyboards/tv44/keymaps/default/config.h create mode 100644 keyboards/tv44/keymaps/default/keymap.c create mode 100644 keyboards/tv44/keymaps/default/readme.md create mode 100644 keyboards/tv44/keymaps/xyverz/Makefile create mode 100644 keyboards/tv44/keymaps/xyverz/config.h create mode 100644 keyboards/tv44/keymaps/xyverz/keymap.c create mode 100644 keyboards/tv44/keymaps/xyverz/readme.md create mode 100644 keyboards/tv44/readme.md create mode 100644 keyboards/tv44/tv44.c create mode 100644 keyboards/tv44/tv44.h diff --git a/keyboards/tv44/Makefile b/keyboards/tv44/Makefile new file mode 100644 index 000000000..45ca12780 --- /dev/null +++ b/keyboards/tv44/Makefile @@ -0,0 +1,75 @@ + + +# 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 + +ifndef QUANTUM_DIR + include ../../Makefile +endif + + diff --git a/keyboards/tv44/config.h b/keyboards/tv44/config.h new file mode 100644 index 000000000..0ae93c095 --- /dev/null +++ b/keyboards/tv44/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 0x8844 +#define DEVICE_VER 0x0002 +#define MANUFACTURER Evan Sailer +#define PRODUCT TheVan 44 +#define DESCRIPTION keyboard firmware for TV44 + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* + * 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 { D7, B5, F7, D4 } +#define MATRIX_COL_PINS { D2, D3, D5, D6, B4, B6, F6, F5, F4, F1, F0, B3 } +#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/tv44/keymaps/default/Makefile b/keyboards/tv44/keymaps/default/Makefile new file mode 100644 index 000000000..f4671a9d1 --- /dev/null +++ b/keyboards/tv44/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/tv44/keymaps/default/config.h b/keyboards/tv44/keymaps/default/config.h new file mode 100644 index 000000000..df06a2620 --- /dev/null +++ b/keyboards/tv44/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/tv44/keymaps/default/keymap.c b/keyboards/tv44/keymaps/default/keymap.c new file mode 100644 index 000000000..6a4fef3da --- /dev/null +++ b/keyboards/tv44/keymaps/default/keymap.c @@ -0,0 +1,97 @@ +#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 _QW 0 +#define _DV 1 +#define _CM 2 +#define _L1 3 +#define _L2 4 +#define _L3 5 + +// Macro name shortcuts +#define QWERTY M(_QW) +#define DVORAK M(_DV) +#define COLEMAK M(_CM) + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + + +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_LCTL, MO(_L2), KC_LGUI, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, KC_RALT, KC_ESC, XXXXXXX, TG(_L3) } + }, + [_DV] = { /* Dvorak */ + {KC_TAB, KC_COMM, KC_DOT, KC_SLSH, KC_Q, KC_Q, KC_Q, KC_Q, KC_Q, KC_Q, KC_Q, KC_BSPC }, + {MO(_L1), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, MO(_L1) }, + {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, MO(_L2) }, + {KC_LCTL, MO(_L2), KC_LGUI, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, KC_RALT, KC_ESC, XXXXXXX, TG(_L3) } + }, + [_CM] = { /* 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 }, + {MO(_L1), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, MO(_L1) }, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, 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) } + }, + [_L1] = { /* LAYER 1 */ + {KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL }, + {_______, KC_BSLS, KC_QUOT, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_DOWN, KC_UP, KC_LEFT, KC_RGHT, _______ }, + {_______, KC_ESC, _______, KC_PSCR, _______, _______, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, KC_RSFT }, + {_______, KC_LGUI, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, XXXXXXX, _______ } + }, + [_L2] = { /* LAYER 2 */ + {_______, QWERTY, DVORAK, COLEMAK, _______, _______, _______, KC_7, KC_8, KC_9, KC_0, _______ }, + {KC_ESC, KC_PIPE, KC_DQUO, KC_UNDS, KC_PLUS, LSFT(KC_LBRC), LSFT(KC_RBRC), KC_4, KC_5, KC_6, KC_VOLU, KC_ENT }, + {_______, _______, _______, _______, _______, _______, KC_0, KC_1, KC_2, KC_3, KC_VOLD, _______ }, + {_______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, XXXXXXX, _______ } + }, + [_L3] = { /* LAYER 3 */ + {_______, _______, _______, _______, _______, _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, _______ }, + {KC_ESC, _______, _______, _______, _______, _______, _______, KC_F5, KC_F6, KC_F7, KC_F8, _______ }, + {KC_LSFT, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_F9, KC_F10, KC_F11, KC_F12, _______ }, + {_______, KC_LSFT, KC_B, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, KC_C, _______, _______, XXXXXXX, _______ } + } +}; + +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 _DV: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_DV); + } + break; + case _QW: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_QW); + } + break; + case _CM: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_CM); + } + break; + } + return MACRO_NONE; +}; diff --git a/keyboards/tv44/keymaps/default/readme.md b/keyboards/tv44/keymaps/default/readme.md new file mode 100644 index 000000000..ac84c08cf --- /dev/null +++ b/keyboards/tv44/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for tv44 \ No newline at end of file diff --git a/keyboards/tv44/keymaps/xyverz/Makefile b/keyboards/tv44/keymaps/xyverz/Makefile new file mode 100644 index 000000000..f4671a9d1 --- /dev/null +++ b/keyboards/tv44/keymaps/xyverz/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/xyverz/config.h b/keyboards/tv44/keymaps/xyverz/config.h new file mode 100644 index 000000000..df06a2620 --- /dev/null +++ b/keyboards/tv44/keymaps/xyverz/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/tv44/keymaps/xyverz/keymap.c b/keyboards/tv44/keymaps/xyverz/keymap.c new file mode 100644 index 000000000..8cbcf8d35 --- /dev/null +++ b/keyboards/tv44/keymaps/xyverz/keymap.c @@ -0,0 +1,92 @@ +#include "tv44.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +#define _DV 0 +#define _QW 1 +#define _CM 2 +#define _L1 3 +#define _L2 4 + +// Macro name shortcuts +#define DVORAK M(_DV) +#define QWERTY M(_QW) +#define COLEMAK M(_CM) + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_DV] = { /* 0: 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 }, + {MO(_L1), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENT }, + {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT }, + {KC_LCTL, KC_LALT, KC_LGUI, KC_BSPC, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, KC_SLSH, KC_MINS, XXXXXXX, MO(_L2) } + }, + + [_QW] = { /* 1: 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, 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, KC_BSPC, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, KC_SLSH, KC_MINS, XXXXXXX, MO(_L2) } + }, + + [_CM] = { /* 2: 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 }, + {MO(_L1), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT }, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT }, + {KC_LCTL, KC_LALT, KC_LGUI, KC_BSPC, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, KC_SLSH, KC_MINS, XXXXXXX, MO(_L2) } + }, + + [_L1] = {/* 1: FN 1 */ + {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_BSLS, KC_QUOT, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_DOWN, KC_UP, KC_LEFT, KC_RGHT, _______ }, + {_______, _______, _______, KC_PSCR, _______, _______, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, KC_RSFT }, + {KC_ESC, KC_LGUI, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, KC_SLSH, _______, _______ } + }, + + [_L2] = { /* 2: FN 2 */ + {KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_ESC }, + {_______, KC_F11, KC_F12, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_VOLU, KC_ENT }, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_VOLD, _______ }, + {QWERTY, DVORAK, COLEMAK, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______ } + } + +}; + +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 _DV: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_DV); + } + break; + case _QW: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_QW); + } + break; + case _CM: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_CM); + } + break; + } + return MACRO_NONE; +}; + + diff --git a/keyboards/tv44/keymaps/xyverz/readme.md b/keyboards/tv44/keymaps/xyverz/readme.md new file mode 100644 index 000000000..ac84c08cf --- /dev/null +++ b/keyboards/tv44/keymaps/xyverz/readme.md @@ -0,0 +1 @@ +# The default keymap for tv44 \ No newline at end of file diff --git a/keyboards/tv44/readme.md b/keyboards/tv44/readme.md new file mode 100644 index 000000000..e3b557fe2 --- /dev/null +++ b/keyboards/tv44/readme.md @@ -0,0 +1,28 @@ +tv44 keyboard firmware +====================== + +## 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/tv44 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/` \ No newline at end of file diff --git a/keyboards/tv44/tv44.c b/keyboards/tv44/tv44.c new file mode 100644 index 000000000..6dc0efd28 --- /dev/null +++ b/keyboards/tv44/tv44.c @@ -0,0 +1,28 @@ +#include "tv44.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/tv44/tv44.h b/keyboards/tv44/tv44.h new file mode 100644 index 000000000..4c30174ac --- /dev/null +++ b/keyboards/tv44/tv44.h @@ -0,0 +1,22 @@ +#ifndef TV44_H +#define TV44_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, 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, K37, K38, K39, K3B \ +) \ +{ \ + { 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, KC_NO, KC_NO, KC_NO, K37, K38, K39, K3A, K3B } \ + +#endif -- cgit v1.2.3 From e87506767cec6410d1a93c15d68452815c9c3553 Mon Sep 17 00:00:00 2001 From: Ian Sterling Date: Sat, 13 Aug 2016 10:44:42 -0700 Subject: Removal of old minivan44 folder. --- keyboards/minivan44/Makefile | 75 ------------ keyboards/minivan44/config.h | 162 -------------------------- keyboards/minivan44/keymaps/default/Makefile | 21 ---- keyboards/minivan44/keymaps/default/config.h | 8 -- keyboards/minivan44/keymaps/default/keymap.c | 97 --------------- keyboards/minivan44/keymaps/default/readme.md | 1 - keyboards/minivan44/keymaps/xyverz/Makefile | 21 ---- keyboards/minivan44/keymaps/xyverz/config.h | 8 -- keyboards/minivan44/keymaps/xyverz/keymap.c | 92 --------------- keyboards/minivan44/keymaps/xyverz/readme.md | 1 - keyboards/minivan44/minivan44.c | 28 ----- keyboards/minivan44/minivan44.h | 22 ---- keyboards/minivan44/readme.md | 28 ----- 13 files changed, 564 deletions(-) delete mode 100644 keyboards/minivan44/Makefile delete mode 100644 keyboards/minivan44/config.h delete mode 100644 keyboards/minivan44/keymaps/default/Makefile delete mode 100644 keyboards/minivan44/keymaps/default/config.h delete mode 100644 keyboards/minivan44/keymaps/default/keymap.c delete mode 100644 keyboards/minivan44/keymaps/default/readme.md delete mode 100644 keyboards/minivan44/keymaps/xyverz/Makefile delete mode 100644 keyboards/minivan44/keymaps/xyverz/config.h delete mode 100644 keyboards/minivan44/keymaps/xyverz/keymap.c delete mode 100644 keyboards/minivan44/keymaps/xyverz/readme.md delete mode 100644 keyboards/minivan44/minivan44.c delete mode 100644 keyboards/minivan44/minivan44.h delete mode 100644 keyboards/minivan44/readme.md diff --git a/keyboards/minivan44/Makefile b/keyboards/minivan44/Makefile deleted file mode 100644 index 45ca12780..000000000 --- a/keyboards/minivan44/Makefile +++ /dev/null @@ -1,75 +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 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 - -ifndef QUANTUM_DIR - include ../../Makefile -endif - - diff --git a/keyboards/minivan44/config.h b/keyboards/minivan44/config.h deleted file mode 100644 index 0ae93c095..000000000 --- a/keyboards/minivan44/config.h +++ /dev/null @@ -1,162 +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 0xFEAE -#define PRODUCT_ID 0x8844 -#define DEVICE_VER 0x0002 -#define MANUFACTURER Evan Sailer -#define PRODUCT TheVan 44 -#define DESCRIPTION keyboard firmware for TV44 - -/* key matrix size */ -#define MATRIX_ROWS 4 -#define MATRIX_COLS 12 - -/* - * 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 { D7, B5, F7, D4 } -#define MATRIX_COL_PINS { D2, D3, D5, D6, B4, B6, F6, F5, F4, F1, F0, B3 } -#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/minivan44/keymaps/default/Makefile b/keyboards/minivan44/keymaps/default/Makefile deleted file mode 100644 index f4671a9d1..000000000 --- a/keyboards/minivan44/keymaps/default/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 \ No newline at end of file diff --git a/keyboards/minivan44/keymaps/default/config.h b/keyboards/minivan44/keymaps/default/config.h deleted file mode 100644 index df06a2620..000000000 --- a/keyboards/minivan44/keymaps/default/config.h +++ /dev/null @@ -1,8 +0,0 @@ -#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/minivan44/keymaps/default/keymap.c b/keyboards/minivan44/keymaps/default/keymap.c deleted file mode 100644 index d559a4b1c..000000000 --- a/keyboards/minivan44/keymaps/default/keymap.c +++ /dev/null @@ -1,97 +0,0 @@ -#include "minivan44.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 _QW 0 -#define _DV 1 -#define _CM 2 -#define _L1 3 -#define _L2 4 -#define _L3 5 - -// Macro name shortcuts -#define QWERTY M(_QW) -#define DVORAK M(_DV) -#define COLEMAK M(_CM) - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - - -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_LCTL, MO(_L2), KC_LGUI, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, KC_RALT, KC_ESC, XXXXXXX, TG(_L3) } - }, - [_DV] = { /* Dvorak */ - {KC_TAB, KC_COMM, KC_DOT, KC_SLSH, KC_Q, KC_Q, KC_Q, KC_Q, KC_Q, KC_Q, KC_Q, KC_BSPC }, - {MO(_L1), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, MO(_L1) }, - {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, MO(_L2) }, - {KC_LCTL, MO(_L2), KC_LGUI, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, KC_RALT, KC_ESC, XXXXXXX, TG(_L3) } - }, - [_CM] = { /* 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 }, - {MO(_L1), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, MO(_L1) }, - {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, 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) } - }, - [_L1] = { /* LAYER 1 */ - {KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL }, - {_______, KC_BSLS, KC_QUOT, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_DOWN, KC_UP, KC_LEFT, KC_RGHT, _______ }, - {_______, KC_ESC, _______, KC_PSCR, _______, _______, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, KC_RSFT }, - {_______, KC_LGUI, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, XXXXXXX, _______ } - }, - [_L2] = { /* LAYER 2 */ - {_______, QWERTY, DVORAK, COLEMAK, _______, _______, _______, KC_7, KC_8, KC_9, KC_0, _______ }, - {KC_ESC, KC_PIPE, KC_DQUO, KC_UNDS, KC_PLUS, LSFT(KC_LBRC), LSFT(KC_RBRC), KC_4, KC_5, KC_6, KC_VOLU, KC_ENT }, - {_______, _______, _______, _______, _______, _______, KC_0, KC_1, KC_2, KC_3, KC_VOLD, _______ }, - {_______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, XXXXXXX, _______ } - }, - [_L3] = { /* LAYER 3 */ - {_______, _______, _______, _______, _______, _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, _______ }, - {KC_ESC, _______, _______, _______, _______, _______, _______, KC_F5, KC_F6, KC_F7, KC_F8, _______ }, - {KC_LSFT, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_F9, KC_F10, KC_F11, KC_F12, _______ }, - {_______, KC_LSFT, KC_B, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, KC_C, _______, _______, XXXXXXX, _______ } - } -}; - -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 _DV: - if (record->event.pressed) { - persistant_default_layer_set(1UL<<_DV); - } - break; - case _QW: - if (record->event.pressed) { - persistant_default_layer_set(1UL<<_QW); - } - break; - case _CM: - if (record->event.pressed) { - persistant_default_layer_set(1UL<<_CM); - } - break; - } - return MACRO_NONE; -}; diff --git a/keyboards/minivan44/keymaps/default/readme.md b/keyboards/minivan44/keymaps/default/readme.md deleted file mode 100644 index 189a9c0ff..000000000 --- a/keyboards/minivan44/keymaps/default/readme.md +++ /dev/null @@ -1 +0,0 @@ -# The default keymap for minivan44 \ No newline at end of file diff --git a/keyboards/minivan44/keymaps/xyverz/Makefile b/keyboards/minivan44/keymaps/xyverz/Makefile deleted file mode 100644 index f4671a9d1..000000000 --- a/keyboards/minivan44/keymaps/xyverz/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 \ No newline at end of file diff --git a/keyboards/minivan44/keymaps/xyverz/config.h b/keyboards/minivan44/keymaps/xyverz/config.h deleted file mode 100644 index df06a2620..000000000 --- a/keyboards/minivan44/keymaps/xyverz/config.h +++ /dev/null @@ -1,8 +0,0 @@ -#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/minivan44/keymaps/xyverz/keymap.c b/keyboards/minivan44/keymaps/xyverz/keymap.c deleted file mode 100644 index f995da0e7..000000000 --- a/keyboards/minivan44/keymaps/xyverz/keymap.c +++ /dev/null @@ -1,92 +0,0 @@ -#include "minivan44.h" -#include "action_layer.h" -#include "eeconfig.h" - -extern keymap_config_t keymap_config; - -#define _DV 0 -#define _QW 1 -#define _CM 2 -#define _L1 3 -#define _L2 4 - -// Macro name shortcuts -#define DVORAK M(_DV) -#define QWERTY M(_QW) -#define COLEMAK M(_CM) - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_DV] = { /* 0: 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 }, - {MO(_L1), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENT }, - {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT }, - {KC_LCTL, KC_LALT, KC_LGUI, KC_BSPC, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, KC_SLSH, KC_MINS, XXXXXXX, MO(_L2) } - }, - - [_QW] = { /* 1: 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, 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, KC_BSPC, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, KC_SLSH, KC_MINS, XXXXXXX, MO(_L2) } - }, - - [_CM] = { /* 2: 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 }, - {MO(_L1), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT }, - {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT }, - {KC_LCTL, KC_LALT, KC_LGUI, KC_BSPC, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, KC_SLSH, KC_MINS, XXXXXXX, MO(_L2) } - }, - - [_L1] = {/* 1: FN 1 */ - {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_BSLS, KC_QUOT, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_DOWN, KC_UP, KC_LEFT, KC_RGHT, _______ }, - {_______, _______, _______, KC_PSCR, _______, _______, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, KC_RSFT }, - {_______, KC_LGUI, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, KC_SLSH, _______, _______ } - }, - - [_L2] = { /* 2: FN 2 */ - {KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_ESC }, - {_______, KC_F11, KC_F12, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_VOLU, KC_ENT }, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_VOLD, _______ }, - {QWERTY, DVORAK, COLEMAK, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______ } - } - -}; - -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 _DV: - if (record->event.pressed) { - persistant_default_layer_set(1UL<<_DV); - } - break; - case _QW: - if (record->event.pressed) { - persistant_default_layer_set(1UL<<_QW); - } - break; - case _CM: - if (record->event.pressed) { - persistant_default_layer_set(1UL<<_CM); - } - break; - } - return MACRO_NONE; -}; - - diff --git a/keyboards/minivan44/keymaps/xyverz/readme.md b/keyboards/minivan44/keymaps/xyverz/readme.md deleted file mode 100644 index 189a9c0ff..000000000 --- a/keyboards/minivan44/keymaps/xyverz/readme.md +++ /dev/null @@ -1 +0,0 @@ -# The default keymap for minivan44 \ No newline at end of file diff --git a/keyboards/minivan44/minivan44.c b/keyboards/minivan44/minivan44.c deleted file mode 100644 index be8214fd5..000000000 --- a/keyboards/minivan44/minivan44.c +++ /dev/null @@ -1,28 +0,0 @@ -#include "minivan44.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/minivan44/minivan44.h b/keyboards/minivan44/minivan44.h deleted file mode 100644 index c6119c2e1..000000000 --- a/keyboards/minivan44/minivan44.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef MINIVAN44_H -#define MINIVAN44_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, 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, K37, K38, K39, K3B \ -) \ -{ \ - { 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, KC_NO, KC_NO, KC_NO, K37, K38, K39, K3A, K3B } \ - -#endif diff --git a/keyboards/minivan44/readme.md b/keyboards/minivan44/readme.md deleted file mode 100644 index 59b62b0e6..000000000 --- a/keyboards/minivan44/readme.md +++ /dev/null @@ -1,28 +0,0 @@ -minivan44 keyboard firmware -====================== - -## 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/minivan44 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/` \ No newline at end of file -- cgit v1.2.3 From 97fca1efff37f749fae8d53bb5ee4da9f8a898c5 Mon Sep 17 00:00:00 2001 From: Xyverz Date: Sat, 13 Aug 2016 20:14:27 -0700 Subject: Fixing a mixup. Tidying up the keymap. --- keyboards/atreus/keymaps/xyverz/keymap.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/keyboards/atreus/keymaps/xyverz/keymap.c b/keyboards/atreus/keymaps/xyverz/keymap.c index 1ce92b4f2..b418cc9b5 100644 --- a/keyboards/atreus/keymaps/xyverz/keymap.c +++ b/keyboards/atreus/keymaps/xyverz/keymap.c @@ -46,24 +46,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_L1] = { /* LAYER 1 */ {KC_1, KC_2, KC_3, KC_4, KC_5, KC_NO, KC_6, KC_7, KC_8, KC_9, KC_0 }, {KC_TAB, KC_INS, KC_UP, KC_DEL, KC_HOME, KC_NO, KC_PGUP, KC_MUTE, KC_VOLD, KC_VOLU, KC_EQL }, -<<<<<<< HEAD {KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_LCTL, KC_PGDN, KC_MPRV, KC_MPLY, KC_MNXT, KC_BSLS}, -======= - {KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_LCTL, KC_PGDN, KC_MPRV, KC_MPLY, KC_MNXT, KC_BSLS}, ->>>>>>> upstream/master {KC_TRNS, KC_GRV, KC_LGUI, KC_TRNS, KC_DEL, KC_LALT, KC_SPC, KC_TRNS, KC_LBRC, KC_RBRC, KC_ENT } }, [_L2] = { /* LAYER 2 */ {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_NO, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN}, -<<<<<<< HEAD {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_NO, KC_TRNS, KC_F6, KC_F7, KC_F8, KC_PLUS}, {KC_TRNS, KC_TRNS, DVORAK, QWERTY, COLEMAK, KC_LCTL, KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12 }, {KC_TRNS, KC_TRNS, KC_LGUI, KC_TRNS, KC_BSPC, KC_LALT, KC_SPC, KC_TRNS, LSFT(KC_LBRC), LSFT(KC_RBRC), RESET} -======= - {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_NO, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 }, - {KC_TRNS, KC_TRNS, DVORAK, QWERTY, COLEMAK, KC_LCTL, KC_TRNS, KC_TRNS, KC_TRNS, KC_F11, KC_F12 }, - {KC_TRNS, KC_TRNS, KC_LGUI, KC_TRNS, KC_BSPC, KC_LALT, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, RESET } ->>>>>>> upstream/master } }; -- cgit v1.2.3 From 049343e523857eef6fe03bfd5ec73d830639e0b6 Mon Sep 17 00:00:00 2001 From: Xyverz Date: Sun, 14 Aug 2016 00:33:11 -0700 Subject: Added my own layout to the Phantom. --- keyboards/phantom/keymaps/xyverz/keymap.c | 104 ++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 keyboards/phantom/keymaps/xyverz/keymap.c diff --git a/keyboards/phantom/keymaps/xyverz/keymap.c b/keyboards/phantom/keymaps/xyverz/keymap.c new file mode 100644 index 000000000..aa6af18b1 --- /dev/null +++ b/keyboards/phantom/keymaps/xyverz/keymap.c @@ -0,0 +1,104 @@ +#include "phantom.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + + +// 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 _QW 0 +#define _DV 1 +#define _CM 2 +#define _FL 3 + +// Macro name shortcuts +#define QWERTY M(_QW) +#define DVORAK M(_DV) +#define COLEMAK M(_CM) + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_QW] = { /* Layer 0: Qwerty */ + {KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS}, + {KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, XXXXXXX, KC_BSPC, KC_INS, KC_HOME, KC_PGUP}, + {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN}, + {KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX}, + {KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, XXXXXXX, KC_RSFT, XXXXXXX, KC_UP, XXXXXXX}, + {KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, XXXXXXX, XXXXXXX, KC_RALT, KC_RGUI, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT} + }, + +[_DV] = { /* Layer 1: Dvorak */ + {KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS}, + {KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, XXXXXXX, KC_BSPC, KC_INS, KC_HOME, KC_PGUP}, + {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_EQL, KC_BSLS, KC_DEL, KC_END, KC_PGDN}, + {KC_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, XXXXXXX, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX}, + {KC_LSFT, XXXXXXX, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, XXXXXXX, KC_RSFT, XXXXXXX, KC_UP, XXXXXXX}, + {KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, XXXXXXX, XXXXXXX, KC_RALT, KC_RGUI, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT} + }, + +[_CM] = { /* Layer 2: Colemak */ + {KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS}, + {KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, XXXXXXX, KC_BSPC, KC_INS, KC_HOME, 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_DEL, KC_END, 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, XXXXXXX, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX}, + {KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, XXXXXXX, KC_RSFT, XXXXXXX, KC_UP, XXXXXXX}, + {KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, XXXXXXX, XXXXXXX, KC_RALT, KC_RGUI, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT} + }, + +[_FL] = { /* Layer 3: Functions */ + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, RESET, KC_MPRV, KC_MPLY, KC_MNXT}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX}, + {_______, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, XXXXXXX, _______, XXXXXXX}, + {QWERTY, DVORAK, COLEMAK, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, _______, _______}, + }, + + +}; + +enum function_id { + SHIFT_ESC, +}; + + +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 _DV: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_DV); + } + break; + case _QW: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_QW); + } + break; + case _CM: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_CM); + } + break; + } + return MACRO_NONE; +}; -- cgit v1.2.3 From 880486bd247b93800f9d007f0ba90d38d5397b41 Mon Sep 17 00:00:00 2001 From: jacwib Date: Sun, 14 Aug 2016 10:46:40 +0200 Subject: Jack's keymap. --- keyboards/preonic/keymaps/jacwib/Makefile | 25 ++++ keyboards/preonic/keymaps/jacwib/config.h | 9 ++ keyboards/preonic/keymaps/jacwib/keymap.c | 215 +++++++++++++++++++++++++++++ keyboards/preonic/keymaps/jacwib/readme.md | 2 + 4 files changed, 251 insertions(+) create mode 100644 keyboards/preonic/keymaps/jacwib/Makefile create mode 100644 keyboards/preonic/keymaps/jacwib/config.h create mode 100644 keyboards/preonic/keymaps/jacwib/keymap.c create mode 100644 keyboards/preonic/keymaps/jacwib/readme.md diff --git a/keyboards/preonic/keymaps/jacwib/Makefile b/keyboards/preonic/keymaps/jacwib/Makefile new file mode 100644 index 000000000..1743c6487 --- /dev/null +++ b/keyboards/preonic/keymaps/jacwib/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 = no # 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 diff --git a/keyboards/preonic/keymaps/jacwib/config.h b/keyboards/preonic/keymaps/jacwib/config.h new file mode 100644 index 000000000..330686559 --- /dev/null +++ b/keyboards/preonic/keymaps/jacwib/config.h @@ -0,0 +1,9 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here +#define FORCE_NKRO 1 + +#endif diff --git a/keyboards/preonic/keymaps/jacwib/keymap.c b/keyboards/preonic/keymaps/jacwib/keymap.c new file mode 100644 index 000000000..1d5e0a777 --- /dev/null +++ b/keyboards/preonic/keymaps/jacwib/keymap.c @@ -0,0 +1,215 @@ +#include "preonic.h" +#include "action_layer.h" +#include "eeconfig.h" +#include "keymap_nordic.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 _LOWER 3 +#define _RAISE 4 +#define _ADJUST 16 + +enum preonic_keycodes { + QWERTY = SAFE_RANGE, + 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] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | + | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | Q | W | E | R | T | Y | U | I | O | P | Å | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | Ö | Ä | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| < | Z | X | C | V | B | N | M | . | , | - | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | Alt |AltGr |Lower | Space| Enter|Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = { + {KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, NO_PLUS, KC_BSPC},//Done + {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, NO_AM },//Done + {KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, NO_AE, NO_OSLH},//Done + {KC_LSFT, NO_LESS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_DOT, KC_COMM, NO_MINS},//Done + {KC_LCTL, KC_LGUI, KC_LALT, NO_ALGR, LOWER, KC_SPC, KC_ENT, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}//Done +}, + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | | @ | £ | $ | | | { | [ | ] | } | \ | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | |VolUp | | | ~ | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | |LastS |PauseP|NextS | | * | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | |VolDwn| | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | |Bspc | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = { + {_______, NO_AT, NO_PND, NO_DLR, _______, _______, NO_LCBR, NO_LBRC, NO_RBRC, NO_RCBR, NO_BSLS, KC_DEL},//Done + {_______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______, _______, NO_TILD},//Done + {_______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, NO_LPRN},//Done + {_______, NO_PIPE, _______, _______, _______, _______, _______, _______, KC_VOLD, _______, _______, _______},//Done + {_______, _______, _______, _______, _______, _______, KC_BSPC, _______, _______, _______, _______, _______}//Done +}, + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ! | " | # | ¤ | % | & | / | ( | ) | = | ? | Ins | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | |Mouse^| | | | |ScrlUp| | | ^ | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | |Mouse<|MouseV|Mouse>| | |MLC |MMC |MRC | ' | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | > | | | | | | |ScrlDown| : | ; | _ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | |Bspc | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = { + {LSFT(KC_1),NO_QUO2,LSFT(KC_3), NO_BULT,LSFT(KC_5), NO_AMPR, NO_SLSH, NO_LPRN, NO_RPRN, NO_EQL, NO_QUES, KC_INS},//Done + {_______, _______, _______, KC_MS_U, _______, _______, _______, _______, KC_WH_U, _______, _______, NO_CIRC},//Done + {_______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, KC_BTN1, KC_BTN3, KC_BTN2, NO_APOS, NO_QUOT},//Done + {_______, NO_GRTR, _______, _______, _______, _______, _______, _______, KC_WH_D, NO_COLN, NO_SCLN, NO_UNDS},//Done + {_______, _______, _______, _______, _______, KC_BSPC, _______, _______, _______, _______, _______, _______}//Done +}, + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | Reset| | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | |Rsft | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |MusOn |MusOff| | | | | | | | | Reset| + * |------+------+------+------+------+------+------+------+------+------+--,----+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_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},//Done + {_______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______},//Done + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT},//Done + {_______, MU_ON, MU_OFF, _______, _______, _______, _______, _______, _______, _______, _______, RESET },//Done + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}//Done +} + + +}; + +#ifdef AUDIO_ENABLE //Mario theme song: E5 E5 E5 C5 E5 G5 G4 +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_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 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/jacwib/readme.md b/keyboards/preonic/keymaps/jacwib/readme.md new file mode 100644 index 000000000..e81c62f76 --- /dev/null +++ b/keyboards/preonic/keymaps/jacwib/readme.md @@ -0,0 +1,2 @@ +# Jack's preonic keymap. +Tries to feel like a normal keyboard, and is also designed for use with a swedish keymap. \ No newline at end of file -- cgit v1.2.3 From 1ab78110bd21b32a59eea46558ab4d83c5658cdb Mon Sep 17 00:00:00 2001 From: jacwib Date: Sun, 14 Aug 2016 10:48:22 +0200 Subject: Update readme.md --- keyboards/preonic/keymaps/jacwib/readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/preonic/keymaps/jacwib/readme.md b/keyboards/preonic/keymaps/jacwib/readme.md index e81c62f76..838af399c 100644 --- a/keyboards/preonic/keymaps/jacwib/readme.md +++ b/keyboards/preonic/keymaps/jacwib/readme.md @@ -1,2 +1,2 @@ -# Jack's preonic keymap. -Tries to feel like a normal keyboard, and is also designed for use with a swedish keymap. \ No newline at end of file +# Jacwib's preonic keymap. +Tries to feel like a normal keyboard, and is also designed for use with a swedish keymap. -- cgit v1.2.3 From cf91aa416a6c32e2fa02d3ad31605ff1f24aab5e Mon Sep 17 00:00:00 2001 From: jacwib Date: Sun, 14 Aug 2016 10:48:52 +0200 Subject: Update keymap.c --- keyboards/preonic/keymaps/jacwib/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/preonic/keymaps/jacwib/keymap.c b/keyboards/preonic/keymaps/jacwib/keymap.c index 1d5e0a777..4ddaa962e 100644 --- a/keyboards/preonic/keymaps/jacwib/keymap.c +++ b/keyboards/preonic/keymaps/jacwib/keymap.c @@ -100,7 +100,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | |Rsft | * |------+------+------+------+------+------|------+------+------+------+------+------| * | |MusOn |MusOff| | | | | | | | | Reset| - * |------+------+------+------+------+------+------+------+------+------+--,----+------| + * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -- cgit v1.2.3 From 62004866b3eee07a39a6caa0f6f3a2df0d5b2ef5 Mon Sep 17 00:00:00 2001 From: jacwib Date: Sun, 14 Aug 2016 10:49:06 +0200 Subject: Update config.h --- keyboards/preonic/keymaps/jacwib/config.h | 1 - 1 file changed, 1 deletion(-) diff --git a/keyboards/preonic/keymaps/jacwib/config.h b/keyboards/preonic/keymaps/jacwib/config.h index 330686559..23e9e0ed2 100644 --- a/keyboards/preonic/keymaps/jacwib/config.h +++ b/keyboards/preonic/keymaps/jacwib/config.h @@ -3,7 +3,6 @@ #include "../../config.h" -// place overrides here #define FORCE_NKRO 1 #endif -- cgit v1.2.3 From 26f4a0cf04cc11690abc80f644b5fbdc869cf056 Mon Sep 17 00:00:00 2001 From: jacwib Date: Sun, 14 Aug 2016 10:49:26 +0200 Subject: Update Makefile --- keyboards/preonic/keymaps/jacwib/Makefile | 5 ----- 1 file changed, 5 deletions(-) diff --git a/keyboards/preonic/keymaps/jacwib/Makefile b/keyboards/preonic/keymaps/jacwib/Makefile index 1743c6487..3e87d41d3 100644 --- a/keyboards/preonic/keymaps/jacwib/Makefile +++ b/keyboards/preonic/keymaps/jacwib/Makefile @@ -1,9 +1,5 @@ -# 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) @@ -17,7 +13,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. -# 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 -- cgit v1.2.3 From e4e13ddc54d90b41a882c76a2d28f28763117763 Mon Sep 17 00:00:00 2001 From: jacwib Date: Sun, 14 Aug 2016 10:57:47 +0200 Subject: Update readme.md --- keyboards/preonic/keymaps/jacwib/readme.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/keyboards/preonic/keymaps/jacwib/readme.md b/keyboards/preonic/keymaps/jacwib/readme.md index 838af399c..066031235 100644 --- a/keyboards/preonic/keymaps/jacwib/readme.md +++ b/keyboards/preonic/keymaps/jacwib/readme.md @@ -1,2 +1,3 @@ # Jacwib's preonic keymap. -Tries to feel like a normal keyboard, and is also designed for use with a swedish keymap. + +Designed for use with a swedish language. -- cgit v1.2.3 From 6ba27ea31883d52b3e023681edc344cc95e90317 Mon Sep 17 00:00:00 2001 From: jacwib Date: Sun, 14 Aug 2016 11:02:46 +0200 Subject: Remove pointless comments --- keyboards/preonic/keymaps/jacwib/keymap.c | 42 +++++++++++++++---------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/keyboards/preonic/keymaps/jacwib/keymap.c b/keyboards/preonic/keymaps/jacwib/keymap.c index 4ddaa962e..53604ef01 100644 --- a/keyboards/preonic/keymaps/jacwib/keymap.c +++ b/keyboards/preonic/keymaps/jacwib/keymap.c @@ -42,11 +42,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_QWERTY] = { - {KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, NO_PLUS, KC_BSPC},//Done - {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, NO_AM },//Done - {KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, NO_AE, NO_OSLH},//Done - {KC_LSFT, NO_LESS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_DOT, KC_COMM, NO_MINS},//Done - {KC_LCTL, KC_LGUI, KC_LALT, NO_ALGR, LOWER, KC_SPC, KC_ENT, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}//Done + {KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, NO_PLUS, KC_BSPC}, + {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, NO_AM }, + {KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, NO_AE, NO_OSLH}, + {KC_LSFT, NO_LESS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_DOT, KC_COMM, NO_MINS}, + {KC_LCTL, KC_LGUI, KC_LALT, NO_ALGR, LOWER, KC_SPC, KC_ENT, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} }, /* Lower @@ -63,11 +63,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_LOWER] = { - {_______, NO_AT, NO_PND, NO_DLR, _______, _______, NO_LCBR, NO_LBRC, NO_RBRC, NO_RCBR, NO_BSLS, KC_DEL},//Done - {_______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______, _______, NO_TILD},//Done - {_______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, NO_LPRN},//Done - {_______, NO_PIPE, _______, _______, _______, _______, _______, _______, KC_VOLD, _______, _______, _______},//Done - {_______, _______, _______, _______, _______, _______, KC_BSPC, _______, _______, _______, _______, _______}//Done + {_______, NO_AT, NO_PND, NO_DLR, _______, _______, NO_LCBR, NO_LBRC, NO_RBRC, NO_RCBR, NO_BSLS, KC_DEL}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______, _______, NO_TILD}, + {_______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, NO_LPRN}, + {_______, NO_PIPE, _______, _______, _______, _______, _______, _______, KC_VOLD, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, KC_BSPC, _______, _______, _______, _______, _______} }, /* Raise @@ -84,11 +84,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_RAISE] = { - {LSFT(KC_1),NO_QUO2,LSFT(KC_3), NO_BULT,LSFT(KC_5), NO_AMPR, NO_SLSH, NO_LPRN, NO_RPRN, NO_EQL, NO_QUES, KC_INS},//Done - {_______, _______, _______, KC_MS_U, _______, _______, _______, _______, KC_WH_U, _______, _______, NO_CIRC},//Done - {_______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, KC_BTN1, KC_BTN3, KC_BTN2, NO_APOS, NO_QUOT},//Done - {_______, NO_GRTR, _______, _______, _______, _______, _______, _______, KC_WH_D, NO_COLN, NO_SCLN, NO_UNDS},//Done - {_______, _______, _______, _______, _______, KC_BSPC, _______, _______, _______, _______, _______, _______}//Done + {LSFT(KC_1),NO_QUO2,LSFT(KC_3), NO_BULT,LSFT(KC_5), NO_AMPR, NO_SLSH, NO_LPRN, NO_RPRN, NO_EQL, NO_QUES, KC_INS}, + {_______, _______, _______, KC_MS_U, _______, _______, _______, _______, KC_WH_U, _______, _______, NO_CIRC}, + {_______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, KC_BTN1, KC_BTN3, KC_BTN2, NO_APOS, NO_QUOT}, + {_______, NO_GRTR, _______, _______, _______, _______, _______, _______, KC_WH_D, NO_COLN, NO_SCLN, NO_UNDS}, + {_______, _______, _______, _______, _______, KC_BSPC, _______, _______, _______, _______, _______, _______} }, /* Adjust (Lower + Raise) @@ -105,17 +105,17 @@ 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},//Done - {_______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______},//Done - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT},//Done - {_______, MU_ON, MU_OFF, _______, _______, _______, _______, _______, _______, _______, _______, RESET },//Done - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}//Done + {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_RSFT}, + {_______, MU_ON, MU_OFF, _______, _______, _______, _______, _______, _______, _______, _______, RESET }, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} } }; -#ifdef AUDIO_ENABLE //Mario theme song: E5 E5 E5 C5 E5 G5 G4 +#ifdef AUDIO_ENABLE float tone_startup[][2] = { {NOTE_B5, 20}, {NOTE_B6, 8}, -- cgit v1.2.3 From 54e37fd2d10f91b1b77cee263c1e3a2b3552cbd9 Mon Sep 17 00:00:00 2001 From: jacwib Date: Sun, 14 Aug 2016 11:08:01 +0200 Subject: Fix bug --- keyboards/preonic/keymaps/jacwib/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/preonic/keymaps/jacwib/keymap.c b/keyboards/preonic/keymaps/jacwib/keymap.c index 53604ef01..cf441bf30 100644 --- a/keyboards/preonic/keymaps/jacwib/keymap.c +++ b/keyboards/preonic/keymaps/jacwib/keymap.c @@ -65,7 +65,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LOWER] = { {_______, NO_AT, NO_PND, NO_DLR, _______, _______, NO_LCBR, NO_LBRC, NO_RBRC, NO_RCBR, NO_BSLS, KC_DEL}, {_______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______, _______, NO_TILD}, - {_______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, NO_LPRN}, + {_______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, LSFT(KC_BSLS)}, {_______, NO_PIPE, _______, _______, _______, _______, _______, _______, KC_VOLD, _______, _______, _______}, {_______, _______, _______, _______, _______, _______, KC_BSPC, _______, _______, _______, _______, _______} }, -- cgit v1.2.3 From c6c2c3fc14736e4d226c5f410d8c3faf3d36629f Mon Sep 17 00:00:00 2001 From: di0ib Date: Sun, 14 Aug 2016 10:58:10 -1000 Subject: minorca minirca with RGB keymap --- keyboards/minorca/Makefile | 71 ++++++++++++++++++++++++ keyboards/minorca/config.h | 80 ++++++++++++++++++++++++++++ keyboards/minorca/keymaps/default/Makefile | 25 +++++++++ keyboards/minorca/keymaps/default/config.h | 12 +++++ keyboards/minorca/keymaps/default/keymap.c | 44 +++++++++++++++ keyboards/minorca/keymaps/default/readme.md | 5 ++ keyboards/minorca/keymaps/readme.md | 23 ++++++++ keyboards/minorca/keymaps/rgb/Makefile | 25 +++++++++ keyboards/minorca/keymaps/rgb/config.h | 20 +++++++ keyboards/minorca/keymaps/rgb/example.jpg | Bin 0 -> 72737 bytes keyboards/minorca/keymaps/rgb/keymap.c | 65 ++++++++++++++++++++++ keyboards/minorca/keymaps/rgb/readme.md | 23 ++++++++ keyboards/minorca/keymaps/rgb/wiring1.jpg | Bin 0 -> 119547 bytes keyboards/minorca/keymaps/rgb/wiring2.jpg | Bin 0 -> 94987 bytes keyboards/minorca/minorca.c | 6 +++ keyboards/minorca/minorca.h | 6 +++ keyboards/minorca/readme.md | 31 +++++++++++ 17 files changed, 436 insertions(+) create mode 100644 keyboards/minorca/Makefile create mode 100644 keyboards/minorca/config.h create mode 100644 keyboards/minorca/keymaps/default/Makefile create mode 100644 keyboards/minorca/keymaps/default/config.h create mode 100644 keyboards/minorca/keymaps/default/keymap.c create mode 100644 keyboards/minorca/keymaps/default/readme.md create mode 100644 keyboards/minorca/keymaps/readme.md create mode 100644 keyboards/minorca/keymaps/rgb/Makefile create mode 100644 keyboards/minorca/keymaps/rgb/config.h create mode 100644 keyboards/minorca/keymaps/rgb/example.jpg create mode 100644 keyboards/minorca/keymaps/rgb/keymap.c create mode 100644 keyboards/minorca/keymaps/rgb/readme.md create mode 100644 keyboards/minorca/keymaps/rgb/wiring1.jpg create mode 100644 keyboards/minorca/keymaps/rgb/wiring2.jpg create mode 100644 keyboards/minorca/minorca.c create mode 100644 keyboards/minorca/minorca.h create mode 100644 keyboards/minorca/readme.md diff --git a/keyboards/minorca/Makefile b/keyboards/minorca/Makefile new file mode 100644 index 000000000..8cff00049 --- /dev/null +++ b/keyboards/minorca/Makefile @@ -0,0 +1,71 @@ +# 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 to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +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 ?= 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 ?= yes # 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/minorca/config.h b/keyboards/minorca/config.h new file mode 100644 index 000000000..4cdafcbd2 --- /dev/null +++ b/keyboards/minorca/config.h @@ -0,0 +1,80 @@ +/* +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 0x6660 +#define DEVICE_VER 0x0001 +#define MANUFACTURER ME +#define PRODUCT MinOrca +#define DESCRIPTION Tiny Whale + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* MinOrca PCB default pin-out */ +#define MATRIX_COL_PINS { D4, D6, D7, B4, B5, B6, F7, F6, F5, F4, F1, F0 } +#define MATRIX_ROW_PINS { B0, B1, B2, B3 } +#define UNUSED_PINS + +/* 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 + +#endif diff --git a/keyboards/minorca/keymaps/default/Makefile b/keyboards/minorca/keymaps/default/Makefile new file mode 100644 index 000000000..8dc851fdd --- /dev/null +++ b/keyboards/minorca/keymaps/default/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 = yes # 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. + +# 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/minorca/keymaps/default/config.h b/keyboards/minorca/keymaps/default/config.h new file mode 100644 index 000000000..bf40376c1 --- /dev/null +++ b/keyboards/minorca/keymaps/default/config.h @@ -0,0 +1,12 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* bootmagic salt key */ +#define BOOTMAGIC_KEY_SALT KC_ESC + +/* skip bootmagic and eeconfig */ +#define BOOTMAGIC_KEY_SKIP KC_SPACE + +#endif diff --git a/keyboards/minorca/keymaps/default/keymap.c b/keyboards/minorca/keymaps/default/keymap.c new file mode 100644 index 000000000..a55d578e4 --- /dev/null +++ b/keyboards/minorca/keymaps/default/keymap.c @@ -0,0 +1,44 @@ +// 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 "minorca.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. + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = { /* Base */ + {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, XXXXXXX, KC_ENT }, + {KC_LCTRL,XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_QUOT, KC_FN1, KC_FN0 }, + {KC_NO, XXXXXXX, KC_NO, KC_LALT, KC_SPC, XXXXXXX, XXXXXXX, KC_SPC, XXXXXXX, KC_DOT, KC_SLSH, KC_NO } + }, + [1] = { /* First */ + {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DELT }, + {KC_TAB, KC_MPRV, KC_MPLY, KC_MNXT, KC_PGUP, KC_HOME, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, XXXXXXX, KC_LGUI }, + {KC_LCTRL,XXXXXXX, KC_Z, KC_X, KC_C, KC_PGDN, KC_END, KC_L, KC_SCLN, KC_UP, KC_FN1, KC_FN0 }, + {KC_NO, XXXXXXX, KC_NO, KC_LALT, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, KC_DOWN, KC_RIGHT,KC_NO } + }, + [2] = { /* Second */ + {KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DELT }, + {KC_TAB, KC_MUTE, KC_VOLD, KC_VOLU, KC_TILD, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, XXXXXXX, KC_ENT }, + {KC_CAPS, XXXXXXX, KC_LSFT, KC_RSFT, KC_PAUSE,KC_F10, KC_F11, KC_F12, KC_NO, KC_UP, KC_FN1, KC_FN0 }, + {KC_NO, XXXXXXX, KC_NO, KC_LALT, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, KC_DOWN, KC_RIGHT,KC_NO } + }, +}; + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_MOMENTARY(1), // to First overlay + [1] = ACTION_LAYER_MOMENTARY(2), // to Second overlay + +}; \ No newline at end of file diff --git a/keyboards/minorca/keymaps/default/readme.md b/keyboards/minorca/keymaps/default/readme.md new file mode 100644 index 000000000..6ed31f82b --- /dev/null +++ b/keyboards/minorca/keymaps/default/readme.md @@ -0,0 +1,5 @@ +# The Default Minorca Layout + +Copied from https://github.com/pancinteractive/qmk_firmware/blob/master/keyboard/minorca_mkV/keymaps/default/keymap.c + +It looks incomplete. \ No newline at end of file diff --git a/keyboards/minorca/keymaps/readme.md b/keyboards/minorca/keymaps/readme.md new file mode 100644 index 000000000..54fb5f6d9 --- /dev/null +++ b/keyboards/minorca/keymaps/readme.md @@ -0,0 +1,23 @@ +# How to add your own keymap + +Folders can be named however you'd like (will be approved upon merging), or should follow the format with a preceding `_`: + + _[ISO 3166-1 alpha-2 code*]_[layout variant]_[layout name/author] + +\* See full list: https://en.wikipedia.org/wiki/ISO_3166-1#Officially_assigned_code_elements + +and contain the following files: + +* `keymap.c` +* `readme.md` *recommended* +* `config.h` *optional*, found automatically when compiling +* `Makefile` *optional*, found automatically when compling + +When adding your keymap to this list, keep it organised alphabetically (select list, edit->sort lines), and use this format: + + * **folder_name** description + +# List of Planck keymaps + +* **default** default Planck layout +* **cbbrowne** cbbrowne's Planck layout \ No newline at end of file diff --git a/keyboards/minorca/keymaps/rgb/Makefile b/keyboards/minorca/keymaps/rgb/Makefile new file mode 100644 index 000000000..230f75a62 --- /dev/null +++ b/keyboards/minorca/keymaps/rgb/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 = yes # 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 = yes # 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/minorca/keymaps/rgb/config.h b/keyboards/minorca/keymaps/rgb/config.h new file mode 100644 index 000000000..deaac2e26 --- /dev/null +++ b/keyboards/minorca/keymaps/rgb/config.h @@ -0,0 +1,20 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* bootmagic salt key */ +#define BOOTMAGIC_KEY_SALT KC_ESC + +/* skip bootmagic and eeconfig */ +#define BOOTMAGIC_KEY_SKIP KC_SPACE + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D5 +#define RGBLIGHT_TIMER +#define RGBLED_NUM 13 // Number of LEDs +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +#endif diff --git a/keyboards/minorca/keymaps/rgb/example.jpg b/keyboards/minorca/keymaps/rgb/example.jpg new file mode 100644 index 000000000..a04c8d37d Binary files /dev/null and b/keyboards/minorca/keymaps/rgb/example.jpg differ diff --git a/keyboards/minorca/keymaps/rgb/keymap.c b/keyboards/minorca/keymaps/rgb/keymap.c new file mode 100644 index 000000000..9002afbb8 --- /dev/null +++ b/keyboards/minorca/keymaps/rgb/keymap.c @@ -0,0 +1,65 @@ +// 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 "minorca.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 _LOWER 1 +#define _RAISE 2 +#define _TB 3 + +// Macro name shortcuts +#define QWERTY M(_QWERTY) +#define LOWER M(_LOWER) +#define RAISE M(_RAISE) + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_QWERTY] = { /* 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}, + {FUNC(0), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, XXXXXXX, KC_QUOT}, + {KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, FUNC(1)}, + {KC_LCTL, XXXXXXX, KC_LGUI, KC_LALT, FUNC(2), XXXXXXX, XXXXXXX, FUNC(3), XXXXXXX, KC_RALT, KC_APP, KC_RCTL} +}, + +[_RAISE] = { + {S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_BSPC}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_PAUSE, KC_TRNS, KC_TRNS, KC_TRNS, S(KC_MINS), S(KC_EQL), S(KC_LBRC), XXXXXXX, S(KC_BSLS)}, + {KC_TRNS, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_ENT}, + {KC_TRNS, XXXXXXX, KC_TRNS, KC_TRNS, KC_TRNS, XXXXXXX, XXXXXXX, KC_TRNS, XXXXXXX, KC_MNXT, KC_MUTE, KC_MPLY} +}, + +[_LOWER] = { + {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DELETE}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, XXXXXXX, KC_BSLS}, + {KC_TRNS, XXXXXXX, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_PGUP, KC_ENT}, + {KC_TRNS, XXXXXXX, KC_TRNS, KC_TRNS, KC_TRNS, XXXXXXX, XXXXXXX, KC_TRNS, XXXXXXX, KC_HOME, KC_PGDN, KC_END} +}, + +[_TB] = { /* Tab */ + {KC_ESC, KC_CALC, KC_WHOM, KC_MAIL, KC_MYCM, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_TRNS}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, XXXXXXX, KC_TRNS}, + {KC_TRNS, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_UP, KC_ENT}, + {BL_STEP, XXXXXXX, KC_TRNS, KC_TRNS, KC_TRNS, XXXXXXX, XXXXXXX, KC_TRNS, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT} +} +}; + + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_TAP_KEY(_TB, KC_TAB), + [1] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), + [2] = ACTION_LAYER_TAP_KEY(_RAISE, KC_SPC), + [3] = ACTION_LAYER_TAP_KEY(_LOWER, KC_SPC), +}; diff --git a/keyboards/minorca/keymaps/rgb/readme.md b/keyboards/minorca/keymaps/rgb/readme.md new file mode 100644 index 000000000..50806068c --- /dev/null +++ b/keyboards/minorca/keymaps/rgb/readme.md @@ -0,0 +1,23 @@ +#RGB backlight for MinOrca + +![wiring](example.jpg) + +Exmaple of adding WS2812b LEDs to a MinOrca. + +http://www.40percent.club/2016/08/tiny-whale.html + +The keymap is a work in progress. The RGB functions are accessed by holding down the TAB key. + +Tab + Z Toggle on/off +Tab + X Mode +Tab + C Hue+ +Tab + V Hue- +Tab + B Saturation+ +Tab + N Saturation- +Tab + M Brightness+ +Tab + , Brightness- + +Example wiring: + +![wiring](wiring1.jpg) +![wiring closeup](wiring2.jpg) diff --git a/keyboards/minorca/keymaps/rgb/wiring1.jpg b/keyboards/minorca/keymaps/rgb/wiring1.jpg new file mode 100644 index 000000000..7dcbe80c5 Binary files /dev/null and b/keyboards/minorca/keymaps/rgb/wiring1.jpg differ diff --git a/keyboards/minorca/keymaps/rgb/wiring2.jpg b/keyboards/minorca/keymaps/rgb/wiring2.jpg new file mode 100644 index 000000000..fd91d3e1c Binary files /dev/null and b/keyboards/minorca/keymaps/rgb/wiring2.jpg differ diff --git a/keyboards/minorca/minorca.c b/keyboards/minorca/minorca.c new file mode 100644 index 000000000..24e72c2a5 --- /dev/null +++ b/keyboards/minorca/minorca.c @@ -0,0 +1,6 @@ +#include "minorca.h" + +void matrix_init_kb(void) { + + matrix_init_user(); +} \ No newline at end of file diff --git a/keyboards/minorca/minorca.h b/keyboards/minorca/minorca.h new file mode 100644 index 000000000..158e5b4c5 --- /dev/null +++ b/keyboards/minorca/minorca.h @@ -0,0 +1,6 @@ +#ifndef MINORCA_H +#define MINORCA_H + +#include "quantum.h" + +#endif diff --git a/keyboards/minorca/readme.md b/keyboards/minorca/readme.md new file mode 100644 index 000000000..1d655dfe4 --- /dev/null +++ b/keyboards/minorca/readme.md @@ -0,0 +1,31 @@ +minorca keyboard firmware +====================== +Handwired 40% keyboard + +## 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/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. + +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` in the keymaps folder, 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. + +### Notable forks (which some of the keymap files are from) +- [Shane's Fork](https://github.com/shanecelis/tmk_keyboard/tree/master/keyboard/planck) +- [Pierre's Fork](https://github.com/pcarrier/tmk_keyboard/blob/pcarrier/planck/keyboard/gh60/keymap_planck.c) +- [Nathan's Fork](https://github.com/nathanrosspowell/tmk_keyboard/tree/planck-jack/keyboard/planck) +- [Matthew's Fork](https://github.com/pepers/tmk_keyboard/tree/master/keyboard/planck_grid) -- cgit v1.2.3 From dde9ee572cf01609aaebbc6cbe1f326e7f89b7f4 Mon Sep 17 00:00:00 2001 From: di0ib Date: Sun, 14 Aug 2016 11:06:46 -1000 Subject: clean up readnme --- keyboards/minorca/keymaps/rgb/readme.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/keyboards/minorca/keymaps/rgb/readme.md b/keyboards/minorca/keymaps/rgb/readme.md index 50806068c..051ffe3c6 100644 --- a/keyboards/minorca/keymaps/rgb/readme.md +++ b/keyboards/minorca/keymaps/rgb/readme.md @@ -8,16 +8,18 @@ http://www.40percent.club/2016/08/tiny-whale.html The keymap is a work in progress. The RGB functions are accessed by holding down the TAB key. -Tab + Z Toggle on/off -Tab + X Mode -Tab + C Hue+ -Tab + V Hue- -Tab + B Saturation+ -Tab + N Saturation- -Tab + M Brightness+ -Tab + , Brightness- +*Tab + Z Toggle on/off +*Tab + X Mode +*Tab + C Hue+ +*Tab + V Hue- +*Tab + B Saturation+ +*Tab + N Saturation- +*Tab + M Brightness+ +*Tab + , Brightness- Example wiring: +WS2812 data pin is connected to D2 + ![wiring](wiring1.jpg) ![wiring closeup](wiring2.jpg) -- cgit v1.2.3 From 65060ad000930b4d735760cd8951ae0f462d5f14 Mon Sep 17 00:00:00 2001 From: di0ib Date: Sun, 14 Aug 2016 11:07:35 -1000 Subject: Fix list --- keyboards/minorca/keymaps/rgb/readme.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/keyboards/minorca/keymaps/rgb/readme.md b/keyboards/minorca/keymaps/rgb/readme.md index 051ffe3c6..00b6d6cd8 100644 --- a/keyboards/minorca/keymaps/rgb/readme.md +++ b/keyboards/minorca/keymaps/rgb/readme.md @@ -2,20 +2,20 @@ ![wiring](example.jpg) -Exmaple of adding WS2812b LEDs to a MinOrca. +Example of adding WS2812b LEDs to a MinOrca. http://www.40percent.club/2016/08/tiny-whale.html The keymap is a work in progress. The RGB functions are accessed by holding down the TAB key. -*Tab + Z Toggle on/off -*Tab + X Mode -*Tab + C Hue+ -*Tab + V Hue- -*Tab + B Saturation+ -*Tab + N Saturation- -*Tab + M Brightness+ -*Tab + , Brightness- +* Tab + Z Toggle on/off +* Tab + X Mode +* Tab + C Hue+ +* Tab + V Hue- +* Tab + B Saturation+ +* Tab + N Saturation- +* Tab + M Brightness+ +* Tab + , Brightness- Example wiring: -- cgit v1.2.3 From 1eaa685872745d3ae01afb79bad8f25a4fd1029d Mon Sep 17 00:00:00 2001 From: di0ib Date: Sun, 14 Aug 2016 11:08:15 -1000 Subject: Correct data pin to D5 --- keyboards/minorca/keymaps/rgb/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/minorca/keymaps/rgb/readme.md b/keyboards/minorca/keymaps/rgb/readme.md index 00b6d6cd8..f50dfa546 100644 --- a/keyboards/minorca/keymaps/rgb/readme.md +++ b/keyboards/minorca/keymaps/rgb/readme.md @@ -19,7 +19,7 @@ The keymap is a work in progress. The RGB functions are accessed by holding down Example wiring: -WS2812 data pin is connected to D2 +WS2812 data pin is connected to D5 ![wiring](wiring1.jpg) ![wiring closeup](wiring2.jpg) -- cgit v1.2.3 From f58a67c991fa15f6177ebb9ec74e831b851bb38e Mon Sep 17 00:00:00 2001 From: di0ib Date: Sun, 14 Aug 2016 11:10:12 -1000 Subject: cleanup readme --- keyboards/minorca/keymaps/readme.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboards/minorca/keymaps/readme.md b/keyboards/minorca/keymaps/readme.md index 54fb5f6d9..058923ba2 100644 --- a/keyboards/minorca/keymaps/readme.md +++ b/keyboards/minorca/keymaps/readme.md @@ -17,7 +17,7 @@ When adding your keymap to this list, keep it organised alphabetically (select l * **folder_name** description -# List of Planck keymaps +# List of Minorca keymaps -* **default** default Planck layout -* **cbbrowne** cbbrowne's Planck layout \ No newline at end of file +* **default** default Minorca layout +* **rgb** layout with WS2812b control -- cgit v1.2.3 From 503ec7f9f6f9c15049f02c3753afdfe2d0db629b Mon Sep 17 00:00:00 2001 From: di0ib Date: Sun, 14 Aug 2016 11:15:46 -1000 Subject: Updated readme Added link to Minorca/Sebright blog. --- keyboards/minorca/readme.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/keyboards/minorca/readme.md b/keyboards/minorca/readme.md index 1d655dfe4..93c767954 100644 --- a/keyboards/minorca/readme.md +++ b/keyboards/minorca/readme.md @@ -2,6 +2,8 @@ minorca keyboard firmware ====================== Handwired 40% keyboard +http://www.panc.co/blog/minorcasebright-information-page + ## Quantum MK Firmware For the full Quantum feature list, see [the parent readme.md](/readme.md). -- cgit v1.2.3 From 959c48e146ec3c2192e8d261d78d27b80342ad30 Mon Sep 17 00:00:00 2001 From: di0ib Date: Sun, 14 Aug 2016 14:13:58 -1000 Subject: moved to handwired folder --- keyboards/handwired/minorca/Makefile | 71 ++++++++++++++++++ keyboards/handwired/minorca/config.h | 80 +++++++++++++++++++++ .../handwired/minorca/keymaps/default/Makefile | 25 +++++++ .../handwired/minorca/keymaps/default/config.h | 12 ++++ .../handwired/minorca/keymaps/default/keymap.c | 44 ++++++++++++ .../handwired/minorca/keymaps/default/readme.md | 5 ++ keyboards/handwired/minorca/keymaps/readme.md | 23 ++++++ keyboards/handwired/minorca/keymaps/rgb/Makefile | 25 +++++++ keyboards/handwired/minorca/keymaps/rgb/config.h | 20 ++++++ .../handwired/minorca/keymaps/rgb/example.jpg | Bin 0 -> 72737 bytes keyboards/handwired/minorca/keymaps/rgb/keymap.c | 65 +++++++++++++++++ keyboards/handwired/minorca/keymaps/rgb/readme.md | 25 +++++++ .../handwired/minorca/keymaps/rgb/wiring1.jpg | Bin 0 -> 119547 bytes .../handwired/minorca/keymaps/rgb/wiring2.jpg | Bin 0 -> 94987 bytes keyboards/handwired/minorca/minorca.c | 6 ++ keyboards/handwired/minorca/minorca.h | 6 ++ keyboards/handwired/minorca/readme.md | 33 +++++++++ keyboards/minorca/Makefile | 71 ------------------ keyboards/minorca/config.h | 80 --------------------- keyboards/minorca/keymaps/default/Makefile | 25 ------- keyboards/minorca/keymaps/default/config.h | 12 ---- keyboards/minorca/keymaps/default/keymap.c | 44 ------------ keyboards/minorca/keymaps/default/readme.md | 5 -- keyboards/minorca/keymaps/readme.md | 23 ------ keyboards/minorca/keymaps/rgb/Makefile | 25 ------- keyboards/minorca/keymaps/rgb/config.h | 20 ------ keyboards/minorca/keymaps/rgb/example.jpg | Bin 72737 -> 0 bytes keyboards/minorca/keymaps/rgb/keymap.c | 65 ----------------- keyboards/minorca/keymaps/rgb/readme.md | 25 ------- keyboards/minorca/keymaps/rgb/wiring1.jpg | Bin 119547 -> 0 bytes keyboards/minorca/keymaps/rgb/wiring2.jpg | Bin 94987 -> 0 bytes keyboards/minorca/minorca.c | 6 -- keyboards/minorca/minorca.h | 6 -- keyboards/minorca/readme.md | 33 --------- 34 files changed, 440 insertions(+), 440 deletions(-) create mode 100644 keyboards/handwired/minorca/Makefile create mode 100644 keyboards/handwired/minorca/config.h create mode 100644 keyboards/handwired/minorca/keymaps/default/Makefile create mode 100644 keyboards/handwired/minorca/keymaps/default/config.h create mode 100644 keyboards/handwired/minorca/keymaps/default/keymap.c create mode 100644 keyboards/handwired/minorca/keymaps/default/readme.md create mode 100644 keyboards/handwired/minorca/keymaps/readme.md create mode 100644 keyboards/handwired/minorca/keymaps/rgb/Makefile create mode 100644 keyboards/handwired/minorca/keymaps/rgb/config.h create mode 100644 keyboards/handwired/minorca/keymaps/rgb/example.jpg create mode 100644 keyboards/handwired/minorca/keymaps/rgb/keymap.c create mode 100644 keyboards/handwired/minorca/keymaps/rgb/readme.md create mode 100644 keyboards/handwired/minorca/keymaps/rgb/wiring1.jpg create mode 100644 keyboards/handwired/minorca/keymaps/rgb/wiring2.jpg create mode 100644 keyboards/handwired/minorca/minorca.c create mode 100644 keyboards/handwired/minorca/minorca.h create mode 100644 keyboards/handwired/minorca/readme.md delete mode 100644 keyboards/minorca/Makefile delete mode 100644 keyboards/minorca/config.h delete mode 100644 keyboards/minorca/keymaps/default/Makefile delete mode 100644 keyboards/minorca/keymaps/default/config.h delete mode 100644 keyboards/minorca/keymaps/default/keymap.c delete mode 100644 keyboards/minorca/keymaps/default/readme.md delete mode 100644 keyboards/minorca/keymaps/readme.md delete mode 100644 keyboards/minorca/keymaps/rgb/Makefile delete mode 100644 keyboards/minorca/keymaps/rgb/config.h delete mode 100644 keyboards/minorca/keymaps/rgb/example.jpg delete mode 100644 keyboards/minorca/keymaps/rgb/keymap.c delete mode 100644 keyboards/minorca/keymaps/rgb/readme.md delete mode 100644 keyboards/minorca/keymaps/rgb/wiring1.jpg delete mode 100644 keyboards/minorca/keymaps/rgb/wiring2.jpg delete mode 100644 keyboards/minorca/minorca.c delete mode 100644 keyboards/minorca/minorca.h delete mode 100644 keyboards/minorca/readme.md diff --git a/keyboards/handwired/minorca/Makefile b/keyboards/handwired/minorca/Makefile new file mode 100644 index 000000000..155c1f9a2 --- /dev/null +++ b/keyboards/handwired/minorca/Makefile @@ -0,0 +1,71 @@ +# 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 to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +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 ?= 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 ?= yes # 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/handwired/minorca/config.h b/keyboards/handwired/minorca/config.h new file mode 100644 index 000000000..4cdafcbd2 --- /dev/null +++ b/keyboards/handwired/minorca/config.h @@ -0,0 +1,80 @@ +/* +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 0x6660 +#define DEVICE_VER 0x0001 +#define MANUFACTURER ME +#define PRODUCT MinOrca +#define DESCRIPTION Tiny Whale + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* MinOrca PCB default pin-out */ +#define MATRIX_COL_PINS { D4, D6, D7, B4, B5, B6, F7, F6, F5, F4, F1, F0 } +#define MATRIX_ROW_PINS { B0, B1, B2, B3 } +#define UNUSED_PINS + +/* 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 + +#endif diff --git a/keyboards/handwired/minorca/keymaps/default/Makefile b/keyboards/handwired/minorca/keymaps/default/Makefile new file mode 100644 index 000000000..a573488a5 --- /dev/null +++ b/keyboards/handwired/minorca/keymaps/default/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 = yes # 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. + +# 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/handwired/minorca/keymaps/default/config.h b/keyboards/handwired/minorca/keymaps/default/config.h new file mode 100644 index 000000000..bf40376c1 --- /dev/null +++ b/keyboards/handwired/minorca/keymaps/default/config.h @@ -0,0 +1,12 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* bootmagic salt key */ +#define BOOTMAGIC_KEY_SALT KC_ESC + +/* skip bootmagic and eeconfig */ +#define BOOTMAGIC_KEY_SKIP KC_SPACE + +#endif diff --git a/keyboards/handwired/minorca/keymaps/default/keymap.c b/keyboards/handwired/minorca/keymaps/default/keymap.c new file mode 100644 index 000000000..a55d578e4 --- /dev/null +++ b/keyboards/handwired/minorca/keymaps/default/keymap.c @@ -0,0 +1,44 @@ +// 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 "minorca.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. + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = { /* Base */ + {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, XXXXXXX, KC_ENT }, + {KC_LCTRL,XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_QUOT, KC_FN1, KC_FN0 }, + {KC_NO, XXXXXXX, KC_NO, KC_LALT, KC_SPC, XXXXXXX, XXXXXXX, KC_SPC, XXXXXXX, KC_DOT, KC_SLSH, KC_NO } + }, + [1] = { /* First */ + {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DELT }, + {KC_TAB, KC_MPRV, KC_MPLY, KC_MNXT, KC_PGUP, KC_HOME, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, XXXXXXX, KC_LGUI }, + {KC_LCTRL,XXXXXXX, KC_Z, KC_X, KC_C, KC_PGDN, KC_END, KC_L, KC_SCLN, KC_UP, KC_FN1, KC_FN0 }, + {KC_NO, XXXXXXX, KC_NO, KC_LALT, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, KC_DOWN, KC_RIGHT,KC_NO } + }, + [2] = { /* Second */ + {KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DELT }, + {KC_TAB, KC_MUTE, KC_VOLD, KC_VOLU, KC_TILD, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, XXXXXXX, KC_ENT }, + {KC_CAPS, XXXXXXX, KC_LSFT, KC_RSFT, KC_PAUSE,KC_F10, KC_F11, KC_F12, KC_NO, KC_UP, KC_FN1, KC_FN0 }, + {KC_NO, XXXXXXX, KC_NO, KC_LALT, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, KC_DOWN, KC_RIGHT,KC_NO } + }, +}; + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_MOMENTARY(1), // to First overlay + [1] = ACTION_LAYER_MOMENTARY(2), // to Second overlay + +}; \ No newline at end of file diff --git a/keyboards/handwired/minorca/keymaps/default/readme.md b/keyboards/handwired/minorca/keymaps/default/readme.md new file mode 100644 index 000000000..6ed31f82b --- /dev/null +++ b/keyboards/handwired/minorca/keymaps/default/readme.md @@ -0,0 +1,5 @@ +# The Default Minorca Layout + +Copied from https://github.com/pancinteractive/qmk_firmware/blob/master/keyboard/minorca_mkV/keymaps/default/keymap.c + +It looks incomplete. \ No newline at end of file diff --git a/keyboards/handwired/minorca/keymaps/readme.md b/keyboards/handwired/minorca/keymaps/readme.md new file mode 100644 index 000000000..058923ba2 --- /dev/null +++ b/keyboards/handwired/minorca/keymaps/readme.md @@ -0,0 +1,23 @@ +# How to add your own keymap + +Folders can be named however you'd like (will be approved upon merging), or should follow the format with a preceding `_`: + + _[ISO 3166-1 alpha-2 code*]_[layout variant]_[layout name/author] + +\* See full list: https://en.wikipedia.org/wiki/ISO_3166-1#Officially_assigned_code_elements + +and contain the following files: + +* `keymap.c` +* `readme.md` *recommended* +* `config.h` *optional*, found automatically when compiling +* `Makefile` *optional*, found automatically when compling + +When adding your keymap to this list, keep it organised alphabetically (select list, edit->sort lines), and use this format: + + * **folder_name** description + +# List of Minorca keymaps + +* **default** default Minorca layout +* **rgb** layout with WS2812b control diff --git a/keyboards/handwired/minorca/keymaps/rgb/Makefile b/keyboards/handwired/minorca/keymaps/rgb/Makefile new file mode 100644 index 000000000..2b2af1335 --- /dev/null +++ b/keyboards/handwired/minorca/keymaps/rgb/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 = yes # 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 = yes # 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/handwired/minorca/keymaps/rgb/config.h b/keyboards/handwired/minorca/keymaps/rgb/config.h new file mode 100644 index 000000000..deaac2e26 --- /dev/null +++ b/keyboards/handwired/minorca/keymaps/rgb/config.h @@ -0,0 +1,20 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* bootmagic salt key */ +#define BOOTMAGIC_KEY_SALT KC_ESC + +/* skip bootmagic and eeconfig */ +#define BOOTMAGIC_KEY_SKIP KC_SPACE + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D5 +#define RGBLIGHT_TIMER +#define RGBLED_NUM 13 // Number of LEDs +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +#endif diff --git a/keyboards/handwired/minorca/keymaps/rgb/example.jpg b/keyboards/handwired/minorca/keymaps/rgb/example.jpg new file mode 100644 index 000000000..a04c8d37d Binary files /dev/null and b/keyboards/handwired/minorca/keymaps/rgb/example.jpg differ diff --git a/keyboards/handwired/minorca/keymaps/rgb/keymap.c b/keyboards/handwired/minorca/keymaps/rgb/keymap.c new file mode 100644 index 000000000..9002afbb8 --- /dev/null +++ b/keyboards/handwired/minorca/keymaps/rgb/keymap.c @@ -0,0 +1,65 @@ +// 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 "minorca.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 _LOWER 1 +#define _RAISE 2 +#define _TB 3 + +// Macro name shortcuts +#define QWERTY M(_QWERTY) +#define LOWER M(_LOWER) +#define RAISE M(_RAISE) + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_QWERTY] = { /* 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}, + {FUNC(0), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, XXXXXXX, KC_QUOT}, + {KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, FUNC(1)}, + {KC_LCTL, XXXXXXX, KC_LGUI, KC_LALT, FUNC(2), XXXXXXX, XXXXXXX, FUNC(3), XXXXXXX, KC_RALT, KC_APP, KC_RCTL} +}, + +[_RAISE] = { + {S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_BSPC}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_PAUSE, KC_TRNS, KC_TRNS, KC_TRNS, S(KC_MINS), S(KC_EQL), S(KC_LBRC), XXXXXXX, S(KC_BSLS)}, + {KC_TRNS, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_ENT}, + {KC_TRNS, XXXXXXX, KC_TRNS, KC_TRNS, KC_TRNS, XXXXXXX, XXXXXXX, KC_TRNS, XXXXXXX, KC_MNXT, KC_MUTE, KC_MPLY} +}, + +[_LOWER] = { + {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DELETE}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, XXXXXXX, KC_BSLS}, + {KC_TRNS, XXXXXXX, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_PGUP, KC_ENT}, + {KC_TRNS, XXXXXXX, KC_TRNS, KC_TRNS, KC_TRNS, XXXXXXX, XXXXXXX, KC_TRNS, XXXXXXX, KC_HOME, KC_PGDN, KC_END} +}, + +[_TB] = { /* Tab */ + {KC_ESC, KC_CALC, KC_WHOM, KC_MAIL, KC_MYCM, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_TRNS}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, XXXXXXX, KC_TRNS}, + {KC_TRNS, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_UP, KC_ENT}, + {BL_STEP, XXXXXXX, KC_TRNS, KC_TRNS, KC_TRNS, XXXXXXX, XXXXXXX, KC_TRNS, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT} +} +}; + + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_TAP_KEY(_TB, KC_TAB), + [1] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), + [2] = ACTION_LAYER_TAP_KEY(_RAISE, KC_SPC), + [3] = ACTION_LAYER_TAP_KEY(_LOWER, KC_SPC), +}; diff --git a/keyboards/handwired/minorca/keymaps/rgb/readme.md b/keyboards/handwired/minorca/keymaps/rgb/readme.md new file mode 100644 index 000000000..f50dfa546 --- /dev/null +++ b/keyboards/handwired/minorca/keymaps/rgb/readme.md @@ -0,0 +1,25 @@ +#RGB backlight for MinOrca + +![wiring](example.jpg) + +Example of adding WS2812b LEDs to a MinOrca. + +http://www.40percent.club/2016/08/tiny-whale.html + +The keymap is a work in progress. The RGB functions are accessed by holding down the TAB key. + +* Tab + Z Toggle on/off +* Tab + X Mode +* Tab + C Hue+ +* Tab + V Hue- +* Tab + B Saturation+ +* Tab + N Saturation- +* Tab + M Brightness+ +* Tab + , Brightness- + +Example wiring: + +WS2812 data pin is connected to D5 + +![wiring](wiring1.jpg) +![wiring closeup](wiring2.jpg) diff --git a/keyboards/handwired/minorca/keymaps/rgb/wiring1.jpg b/keyboards/handwired/minorca/keymaps/rgb/wiring1.jpg new file mode 100644 index 000000000..7dcbe80c5 Binary files /dev/null and b/keyboards/handwired/minorca/keymaps/rgb/wiring1.jpg differ diff --git a/keyboards/handwired/minorca/keymaps/rgb/wiring2.jpg b/keyboards/handwired/minorca/keymaps/rgb/wiring2.jpg new file mode 100644 index 000000000..fd91d3e1c Binary files /dev/null and b/keyboards/handwired/minorca/keymaps/rgb/wiring2.jpg differ diff --git a/keyboards/handwired/minorca/minorca.c b/keyboards/handwired/minorca/minorca.c new file mode 100644 index 000000000..24e72c2a5 --- /dev/null +++ b/keyboards/handwired/minorca/minorca.c @@ -0,0 +1,6 @@ +#include "minorca.h" + +void matrix_init_kb(void) { + + matrix_init_user(); +} \ No newline at end of file diff --git a/keyboards/handwired/minorca/minorca.h b/keyboards/handwired/minorca/minorca.h new file mode 100644 index 000000000..158e5b4c5 --- /dev/null +++ b/keyboards/handwired/minorca/minorca.h @@ -0,0 +1,6 @@ +#ifndef MINORCA_H +#define MINORCA_H + +#include "quantum.h" + +#endif diff --git a/keyboards/handwired/minorca/readme.md b/keyboards/handwired/minorca/readme.md new file mode 100644 index 000000000..93c767954 --- /dev/null +++ b/keyboards/handwired/minorca/readme.md @@ -0,0 +1,33 @@ +minorca keyboard firmware +====================== +Handwired 40% keyboard + +http://www.panc.co/blog/minorcasebright-information-page + +## 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/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. + +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` in the keymaps folder, 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. + +### Notable forks (which some of the keymap files are from) +- [Shane's Fork](https://github.com/shanecelis/tmk_keyboard/tree/master/keyboard/planck) +- [Pierre's Fork](https://github.com/pcarrier/tmk_keyboard/blob/pcarrier/planck/keyboard/gh60/keymap_planck.c) +- [Nathan's Fork](https://github.com/nathanrosspowell/tmk_keyboard/tree/planck-jack/keyboard/planck) +- [Matthew's Fork](https://github.com/pepers/tmk_keyboard/tree/master/keyboard/planck_grid) diff --git a/keyboards/minorca/Makefile b/keyboards/minorca/Makefile deleted file mode 100644 index 8cff00049..000000000 --- a/keyboards/minorca/Makefile +++ /dev/null @@ -1,71 +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=512 - -# 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 ?= yes # 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 ?= yes # 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/minorca/config.h b/keyboards/minorca/config.h deleted file mode 100644 index 4cdafcbd2..000000000 --- a/keyboards/minorca/config.h +++ /dev/null @@ -1,80 +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 0x6660 -#define DEVICE_VER 0x0001 -#define MANUFACTURER ME -#define PRODUCT MinOrca -#define DESCRIPTION Tiny Whale - -/* key matrix size */ -#define MATRIX_ROWS 4 -#define MATRIX_COLS 12 - -/* MinOrca PCB default pin-out */ -#define MATRIX_COL_PINS { D4, D6, D7, B4, B5, B6, F7, F6, F5, F4, F1, F0 } -#define MATRIX_ROW_PINS { B0, B1, B2, B3 } -#define UNUSED_PINS - -/* 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 - -#endif diff --git a/keyboards/minorca/keymaps/default/Makefile b/keyboards/minorca/keymaps/default/Makefile deleted file mode 100644 index 8dc851fdd..000000000 --- a/keyboards/minorca/keymaps/default/Makefile +++ /dev/null @@ -1,25 +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 = yes # 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. - -# 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/minorca/keymaps/default/config.h b/keyboards/minorca/keymaps/default/config.h deleted file mode 100644 index bf40376c1..000000000 --- a/keyboards/minorca/keymaps/default/config.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" - -/* bootmagic salt key */ -#define BOOTMAGIC_KEY_SALT KC_ESC - -/* skip bootmagic and eeconfig */ -#define BOOTMAGIC_KEY_SKIP KC_SPACE - -#endif diff --git a/keyboards/minorca/keymaps/default/keymap.c b/keyboards/minorca/keymaps/default/keymap.c deleted file mode 100644 index a55d578e4..000000000 --- a/keyboards/minorca/keymaps/default/keymap.c +++ /dev/null @@ -1,44 +0,0 @@ -// 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 "minorca.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. - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = { /* Base */ - {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, XXXXXXX, KC_ENT }, - {KC_LCTRL,XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_QUOT, KC_FN1, KC_FN0 }, - {KC_NO, XXXXXXX, KC_NO, KC_LALT, KC_SPC, XXXXXXX, XXXXXXX, KC_SPC, XXXXXXX, KC_DOT, KC_SLSH, KC_NO } - }, - [1] = { /* First */ - {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DELT }, - {KC_TAB, KC_MPRV, KC_MPLY, KC_MNXT, KC_PGUP, KC_HOME, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, XXXXXXX, KC_LGUI }, - {KC_LCTRL,XXXXXXX, KC_Z, KC_X, KC_C, KC_PGDN, KC_END, KC_L, KC_SCLN, KC_UP, KC_FN1, KC_FN0 }, - {KC_NO, XXXXXXX, KC_NO, KC_LALT, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, KC_DOWN, KC_RIGHT,KC_NO } - }, - [2] = { /* Second */ - {KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DELT }, - {KC_TAB, KC_MUTE, KC_VOLD, KC_VOLU, KC_TILD, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, XXXXXXX, KC_ENT }, - {KC_CAPS, XXXXXXX, KC_LSFT, KC_RSFT, KC_PAUSE,KC_F10, KC_F11, KC_F12, KC_NO, KC_UP, KC_FN1, KC_FN0 }, - {KC_NO, XXXXXXX, KC_NO, KC_LALT, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, KC_DOWN, KC_RIGHT,KC_NO } - }, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), // to First overlay - [1] = ACTION_LAYER_MOMENTARY(2), // to Second overlay - -}; \ No newline at end of file diff --git a/keyboards/minorca/keymaps/default/readme.md b/keyboards/minorca/keymaps/default/readme.md deleted file mode 100644 index 6ed31f82b..000000000 --- a/keyboards/minorca/keymaps/default/readme.md +++ /dev/null @@ -1,5 +0,0 @@ -# The Default Minorca Layout - -Copied from https://github.com/pancinteractive/qmk_firmware/blob/master/keyboard/minorca_mkV/keymaps/default/keymap.c - -It looks incomplete. \ No newline at end of file diff --git a/keyboards/minorca/keymaps/readme.md b/keyboards/minorca/keymaps/readme.md deleted file mode 100644 index 058923ba2..000000000 --- a/keyboards/minorca/keymaps/readme.md +++ /dev/null @@ -1,23 +0,0 @@ -# How to add your own keymap - -Folders can be named however you'd like (will be approved upon merging), or should follow the format with a preceding `_`: - - _[ISO 3166-1 alpha-2 code*]_[layout variant]_[layout name/author] - -\* See full list: https://en.wikipedia.org/wiki/ISO_3166-1#Officially_assigned_code_elements - -and contain the following files: - -* `keymap.c` -* `readme.md` *recommended* -* `config.h` *optional*, found automatically when compiling -* `Makefile` *optional*, found automatically when compling - -When adding your keymap to this list, keep it organised alphabetically (select list, edit->sort lines), and use this format: - - * **folder_name** description - -# List of Minorca keymaps - -* **default** default Minorca layout -* **rgb** layout with WS2812b control diff --git a/keyboards/minorca/keymaps/rgb/Makefile b/keyboards/minorca/keymaps/rgb/Makefile deleted file mode 100644 index 230f75a62..000000000 --- a/keyboards/minorca/keymaps/rgb/Makefile +++ /dev/null @@ -1,25 +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 = yes # 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 = yes # 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/minorca/keymaps/rgb/config.h b/keyboards/minorca/keymaps/rgb/config.h deleted file mode 100644 index deaac2e26..000000000 --- a/keyboards/minorca/keymaps/rgb/config.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" - -/* bootmagic salt key */ -#define BOOTMAGIC_KEY_SALT KC_ESC - -/* skip bootmagic and eeconfig */ -#define BOOTMAGIC_KEY_SKIP KC_SPACE - -/* ws2812 RGB LED */ -#define RGB_DI_PIN D5 -#define RGBLIGHT_TIMER -#define RGBLED_NUM 13 // Number of LEDs -#define RGBLIGHT_HUE_STEP 10 -#define RGBLIGHT_SAT_STEP 17 -#define RGBLIGHT_VAL_STEP 17 - -#endif diff --git a/keyboards/minorca/keymaps/rgb/example.jpg b/keyboards/minorca/keymaps/rgb/example.jpg deleted file mode 100644 index a04c8d37d..000000000 Binary files a/keyboards/minorca/keymaps/rgb/example.jpg and /dev/null differ diff --git a/keyboards/minorca/keymaps/rgb/keymap.c b/keyboards/minorca/keymaps/rgb/keymap.c deleted file mode 100644 index 9002afbb8..000000000 --- a/keyboards/minorca/keymaps/rgb/keymap.c +++ /dev/null @@ -1,65 +0,0 @@ -// 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 "minorca.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 _LOWER 1 -#define _RAISE 2 -#define _TB 3 - -// Macro name shortcuts -#define QWERTY M(_QWERTY) -#define LOWER M(_LOWER) -#define RAISE M(_RAISE) - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -[_QWERTY] = { /* 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}, - {FUNC(0), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, XXXXXXX, KC_QUOT}, - {KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, FUNC(1)}, - {KC_LCTL, XXXXXXX, KC_LGUI, KC_LALT, FUNC(2), XXXXXXX, XXXXXXX, FUNC(3), XXXXXXX, KC_RALT, KC_APP, KC_RCTL} -}, - -[_RAISE] = { - {S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_BSPC}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_PAUSE, KC_TRNS, KC_TRNS, KC_TRNS, S(KC_MINS), S(KC_EQL), S(KC_LBRC), XXXXXXX, S(KC_BSLS)}, - {KC_TRNS, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_ENT}, - {KC_TRNS, XXXXXXX, KC_TRNS, KC_TRNS, KC_TRNS, XXXXXXX, XXXXXXX, KC_TRNS, XXXXXXX, KC_MNXT, KC_MUTE, KC_MPLY} -}, - -[_LOWER] = { - {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DELETE}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, XXXXXXX, KC_BSLS}, - {KC_TRNS, XXXXXXX, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_PGUP, KC_ENT}, - {KC_TRNS, XXXXXXX, KC_TRNS, KC_TRNS, KC_TRNS, XXXXXXX, XXXXXXX, KC_TRNS, XXXXXXX, KC_HOME, KC_PGDN, KC_END} -}, - -[_TB] = { /* Tab */ - {KC_ESC, KC_CALC, KC_WHOM, KC_MAIL, KC_MYCM, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, XXXXXXX, KC_TRNS}, - {KC_TRNS, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_UP, KC_ENT}, - {BL_STEP, XXXXXXX, KC_TRNS, KC_TRNS, KC_TRNS, XXXXXXX, XXXXXXX, KC_TRNS, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT} -} -}; - - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_TAP_KEY(_TB, KC_TAB), - [1] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), - [2] = ACTION_LAYER_TAP_KEY(_RAISE, KC_SPC), - [3] = ACTION_LAYER_TAP_KEY(_LOWER, KC_SPC), -}; diff --git a/keyboards/minorca/keymaps/rgb/readme.md b/keyboards/minorca/keymaps/rgb/readme.md deleted file mode 100644 index f50dfa546..000000000 --- a/keyboards/minorca/keymaps/rgb/readme.md +++ /dev/null @@ -1,25 +0,0 @@ -#RGB backlight for MinOrca - -![wiring](example.jpg) - -Example of adding WS2812b LEDs to a MinOrca. - -http://www.40percent.club/2016/08/tiny-whale.html - -The keymap is a work in progress. The RGB functions are accessed by holding down the TAB key. - -* Tab + Z Toggle on/off -* Tab + X Mode -* Tab + C Hue+ -* Tab + V Hue- -* Tab + B Saturation+ -* Tab + N Saturation- -* Tab + M Brightness+ -* Tab + , Brightness- - -Example wiring: - -WS2812 data pin is connected to D5 - -![wiring](wiring1.jpg) -![wiring closeup](wiring2.jpg) diff --git a/keyboards/minorca/keymaps/rgb/wiring1.jpg b/keyboards/minorca/keymaps/rgb/wiring1.jpg deleted file mode 100644 index 7dcbe80c5..000000000 Binary files a/keyboards/minorca/keymaps/rgb/wiring1.jpg and /dev/null differ diff --git a/keyboards/minorca/keymaps/rgb/wiring2.jpg b/keyboards/minorca/keymaps/rgb/wiring2.jpg deleted file mode 100644 index fd91d3e1c..000000000 Binary files a/keyboards/minorca/keymaps/rgb/wiring2.jpg and /dev/null differ diff --git a/keyboards/minorca/minorca.c b/keyboards/minorca/minorca.c deleted file mode 100644 index 24e72c2a5..000000000 --- a/keyboards/minorca/minorca.c +++ /dev/null @@ -1,6 +0,0 @@ -#include "minorca.h" - -void matrix_init_kb(void) { - - matrix_init_user(); -} \ No newline at end of file diff --git a/keyboards/minorca/minorca.h b/keyboards/minorca/minorca.h deleted file mode 100644 index 158e5b4c5..000000000 --- a/keyboards/minorca/minorca.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef MINORCA_H -#define MINORCA_H - -#include "quantum.h" - -#endif diff --git a/keyboards/minorca/readme.md b/keyboards/minorca/readme.md deleted file mode 100644 index 93c767954..000000000 --- a/keyboards/minorca/readme.md +++ /dev/null @@ -1,33 +0,0 @@ -minorca keyboard firmware -====================== -Handwired 40% keyboard - -http://www.panc.co/blog/minorcasebright-information-page - -## 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/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. - -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` in the keymaps folder, 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. - -### Notable forks (which some of the keymap files are from) -- [Shane's Fork](https://github.com/shanecelis/tmk_keyboard/tree/master/keyboard/planck) -- [Pierre's Fork](https://github.com/pcarrier/tmk_keyboard/blob/pcarrier/planck/keyboard/gh60/keymap_planck.c) -- [Nathan's Fork](https://github.com/nathanrosspowell/tmk_keyboard/tree/planck-jack/keyboard/planck) -- [Matthew's Fork](https://github.com/pepers/tmk_keyboard/tree/master/keyboard/planck_grid) -- cgit v1.2.3 From 63e5782d2cdf0ee282ad434c773463d9da9db6b3 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Sat, 13 Aug 2016 10:43:22 +0200 Subject: process_unicode: Small refactor & linux fix This moves the unicode input start / end sequences into their own functions, so keymaps and other functionality can build on it too. At the same time, it changes how the Linux variant works, to match reality: CTRL+SHIFT must be unregistered too, and we close the thing with a Space instead. Signed-off-by: Gergely Nagy --- quantum/process_keycode/process_unicode.c | 76 ++++++++++++++++++------------- quantum/process_keycode/process_unicode.h | 3 ++ 2 files changed, 48 insertions(+), 31 deletions(-) diff --git a/quantum/process_keycode/process_unicode.c b/quantum/process_keycode/process_unicode.c index 3fcac15ce..55e47f179 100644 --- a/quantum/process_keycode/process_unicode.c +++ b/quantum/process_keycode/process_unicode.c @@ -18,40 +18,54 @@ void set_unicode_input_mode(uint8_t os_target) input_mode = os_target; } +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; + } +} + +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) { uint16_t unicode = keycode & 0x7FFF; - 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); - break; - case UC_WIN: - register_code(KC_LALT); - register_code(KC_PPLS); - unregister_code(KC_PPLS); - break; - } - for(int i = 3; i >= 0; i--) { - uint8_t digit = ((unicode >> (i*4)) & 0xF); - register_code(hex_to_keycode(digit)); - unregister_code(hex_to_keycode(digit)); - } - switch(input_mode) { - case UC_OSX: - case UC_WIN: - unregister_code(KC_LALT); - break; - case UC_LNX: - unregister_code(KC_LCTL); - unregister_code(KC_LSFT); - break; - } + unicode_input_start(); + register_hex(unicode); + unicode_input_finish(); } return true; } \ No newline at end of file diff --git a/quantum/process_keycode/process_unicode.h b/quantum/process_keycode/process_unicode.h index ca17f8f66..f719a1226 100644 --- a/quantum/process_keycode/process_unicode.h +++ b/quantum/process_keycode/process_unicode.h @@ -9,6 +9,9 @@ #define UC_BSD 3 void set_unicode_input_mode(uint8_t os_target); +void unicode_input_start(void); +void unicode_input_finish(void); +void register_hex(uint16_t hex); bool process_unicode(uint16_t keycode, keyrecord_t *record); -- cgit v1.2.3 From fa06a163607e8c6c4bd0968c2de96a9a298b777c Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Sat, 13 Aug 2016 10:46:38 +0200 Subject: process_unicode: Add a way to enter unicode symbols by name The purpose of this change is to allow keymaps to specify a dictionary of unicode symbol name to code mappings, and let the person at the keyboard enter unicode symbols by name. This is done by having a way to trigger unicode symbol input mode, when all keys are cached until Esc, Enter or Space are pressed. Once that happens, we try to look up the symbol from our lookup table. If found, we erase back, and type the unicode magic in to get that symbol. If not found, we still erase back, start unicode input mode, and replay what the user typed in. Signed-off-by: Gergely Nagy --- Makefile | 7 ++- quantum/process_keycode/process_unicode.c | 93 ++++++++++++++++++++++++++++++- quantum/process_keycode/process_unicode.h | 29 +++++++++- 3 files changed, 126 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 053c8532a..693edc9f0 100644 --- a/Makefile +++ b/Makefile @@ -198,6 +198,11 @@ ifeq ($(strip $(AUDIO_ENABLE)), yes) SRC += $(QUANTUM_DIR)/audio/luts.c endif +ifeq ($(strip $(UCIS_ENABLE)), yes) + OPT_DEFS += -DUCIS_ENABLE + UNICODE_ENABLE = yes +endif + ifeq ($(strip $(UNICODE_ENABLE)), yes) OPT_DEFS += -DUNICODE_ENABLE SRC += $(QUANTUM_DIR)/process_keycode/process_unicode.c @@ -273,4 +278,4 @@ BUILD_DATE := $(shell date +"%Y-%m-%d-%H:%M:%S") OPT_DEFS += -DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYMAP=\"$(KEYMAP)\" $(shell echo '#define QMK_VERSION "$(GIT_VERSION)"' > $(QUANTUM_PATH)/version.h) -$(shell echo '#define QMK_BUILDDATE "$(BUILD_DATE)"' >> $(QUANTUM_PATH)/version.h) \ No newline at end of file +$(shell echo '#define QMK_BUILDDATE "$(BUILD_DATE)"' >> $(QUANTUM_PATH)/version.h) diff --git a/quantum/process_keycode/process_unicode.c b/quantum/process_keycode/process_unicode.c index 55e47f179..8a6509300 100644 --- a/quantum/process_keycode/process_unicode.c +++ b/quantum/process_keycode/process_unicode.c @@ -68,4 +68,95 @@ bool process_unicode(uint16_t keycode, keyrecord_t *record) { unicode_input_finish(); } return true; -} \ No newline at end of file +} + +#ifdef UCIS_ENABLE +void qk_ucis_start(void) { + qk_ucis_state.count = 0; + qk_ucis_state.in_progress = true; + + 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); + } +} + +bool process_record_ucis (uint16_t keycode, keyrecord_t *record) { + uint8_t i; + + if (!qk_ucis_state.in_progress || !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); + } + + 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; + for (uint8_t j = 0; ucis_symbol_table[i].codes[j]; j++) { + register_hex(ucis_symbol_table[i].codes[j]); + } + 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 f719a1226..372ea2f0d 100644 --- a/quantum/process_keycode/process_unicode.h +++ b/quantum/process_keycode/process_unicode.h @@ -15,6 +15,33 @@ void register_hex(uint16_t hex); bool process_unicode(uint16_t keycode, keyrecord_t *record); +#ifdef UCIS_ENABLE +#ifndef UCIS_MAX_SYMBOL_LENGTH +#define UCIS_MAX_SYMBOL_LENGTH 32 +#endif + +typedef struct { + char *symbol; + uint16_t codes[4]; +} qk_ucis_symbol_t; + +struct { + uint8_t count; + uint16_t codes[UCIS_MAX_SYMBOL_LENGTH]; + bool in_progress:1; +} qk_ucis_state; + +#define UCIS_TABLE(...) {__VA_ARGS__, {NULL, {}}} +#define UCIS_SYM(name, ...) {name, {__VA_ARGS__, 0}} + +extern const qk_ucis_symbol_t ucis_symbol_table[]; + +void qk_ucis_start(void); +void qk_ucis_symbol_fallback (void); +bool process_record_ucis (uint16_t keycode, keyrecord_t *record); + +#endif + #define UC_BSPC UC(0x0008) #define UC_SPC UC(0x0020) @@ -122,4 +149,4 @@ bool process_unicode(uint16_t keycode, keyrecord_t *record); #define UC_TILD UC(0x007E) #define UC_DEL UC(0x007F) -#endif \ No newline at end of file +#endif -- cgit v1.2.3 From 0b6861827faea747345ea38202d64c8004ab128c Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Sat, 13 Aug 2016 11:11:22 +0200 Subject: process_unicode: Handle too long UCIS symbol names If the symbol name being entered is longer than the max, stop recording it, and stop processing keycodes apart from the ones that can delete, finish or cancel the sequence. Signed-off-by: Gergely Nagy --- quantum/process_keycode/process_unicode.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/quantum/process_keycode/process_unicode.c b/quantum/process_keycode/process_unicode.c index 8a6509300..851a96eaa 100644 --- a/quantum/process_keycode/process_unicode.c +++ b/quantum/process_keycode/process_unicode.c @@ -110,7 +110,15 @@ void qk_ucis_symbol_fallback (void) { bool process_record_ucis (uint16_t keycode, keyrecord_t *record) { uint8_t i; - if (!qk_ucis_state.in_progress || !record->event.pressed) + 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; -- cgit v1.2.3 From 857aa5bef6a74f8785a7039feea5286c07bf7067 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Sat, 13 Aug 2016 11:14:42 +0200 Subject: process_unicode: Call process_ucis() automatically If UCIS is enabled, call process_ucis() automatically from process_record_quantum(). Signed-off-by: Gergely Nagy --- quantum/process_keycode/process_unicode.c | 2 +- quantum/process_keycode/process_unicode.h | 2 +- quantum/quantum.c | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/quantum/process_keycode/process_unicode.c b/quantum/process_keycode/process_unicode.c index 851a96eaa..d71434411 100644 --- a/quantum/process_keycode/process_unicode.c +++ b/quantum/process_keycode/process_unicode.c @@ -107,7 +107,7 @@ void qk_ucis_symbol_fallback (void) { } } -bool process_record_ucis (uint16_t keycode, keyrecord_t *record) { +bool process_ucis (uint16_t keycode, keyrecord_t *record) { uint8_t i; if (!qk_ucis_state.in_progress) diff --git a/quantum/process_keycode/process_unicode.h b/quantum/process_keycode/process_unicode.h index 372ea2f0d..c5005897e 100644 --- a/quantum/process_keycode/process_unicode.h +++ b/quantum/process_keycode/process_unicode.h @@ -38,7 +38,7 @@ extern const qk_ucis_symbol_t ucis_symbol_table[]; void qk_ucis_start(void); void qk_ucis_symbol_fallback (void); -bool process_record_ucis (uint16_t keycode, keyrecord_t *record); +bool process_ucis (uint16_t keycode, keyrecord_t *record); #endif diff --git a/quantum/quantum.c b/quantum/quantum.c index bc2da510f..a4c5c2ddb 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -86,6 +86,9 @@ bool process_record_quantum(keyrecord_t *record) { #endif #ifdef UNICODE_ENABLE process_unicode(keycode, record) && + #endif + #ifdef UCIS_ENABLE + process_ucis(keycode, record) && #endif true)) { return false; -- cgit v1.2.3 From 234dd276cf03be6fd6961473e9d9c8f35deec682 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Sun, 14 Aug 2016 10:37:51 +0200 Subject: process_unicode: Make the startup overridable Extract out the part of `qk_ucis_start` that inputs the placeholder symbol, and make it weak, so it can be overridden. Signed-off-by: Gergely Nagy --- quantum/process_keycode/process_unicode.c | 5 +++++ quantum/process_keycode/process_unicode.h | 1 + 2 files changed, 6 insertions(+) diff --git a/quantum/process_keycode/process_unicode.c b/quantum/process_keycode/process_unicode.c index d71434411..c474483e7 100644 --- a/quantum/process_keycode/process_unicode.c +++ b/quantum/process_keycode/process_unicode.c @@ -75,6 +75,11 @@ 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(); diff --git a/quantum/process_keycode/process_unicode.h b/quantum/process_keycode/process_unicode.h index c5005897e..75607e40e 100644 --- a/quantum/process_keycode/process_unicode.h +++ b/quantum/process_keycode/process_unicode.h @@ -37,6 +37,7 @@ struct { 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); bool process_ucis (uint16_t keycode, keyrecord_t *record); -- cgit v1.2.3 From a312cbf712764277e0dbbbb99410c2f6fc6c7484 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Sun, 14 Aug 2016 14:34:52 +0200 Subject: process_unicode: Use uint32_t for UCIS purposes Use a single uint32_t to store the unicode of a symbol, instead of an array of uint16_ts. Signed-off-by: Gergely Nagy --- quantum/process_keycode/process_unicode.c | 12 +++++++++--- quantum/process_keycode/process_unicode.h | 7 ++++--- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/quantum/process_keycode/process_unicode.c b/quantum/process_keycode/process_unicode.c index c474483e7..698cc3c02 100644 --- a/quantum/process_keycode/process_unicode.c +++ b/quantum/process_keycode/process_unicode.c @@ -60,6 +60,14 @@ void register_hex(uint16_t hex) { } } +void register_hex32(uint32_t hex) { + for(int i = 7; i >= 0; i--) { + uint8_t digit = ((hex >> (i*8)) & 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; @@ -156,9 +164,7 @@ bool process_ucis (uint16_t keycode, keyrecord_t *record) { for (i = 0; ucis_symbol_table[i].symbol; i++) { if (is_uni_seq (ucis_symbol_table[i].symbol)) { symbol_found = true; - for (uint8_t j = 0; ucis_symbol_table[i].codes[j]; j++) { - register_hex(ucis_symbol_table[i].codes[j]); - } + register_hex32(ucis_symbol_table[i].code); break; } } diff --git a/quantum/process_keycode/process_unicode.h b/quantum/process_keycode/process_unicode.h index 75607e40e..dd6dd7138 100644 --- a/quantum/process_keycode/process_unicode.h +++ b/quantum/process_keycode/process_unicode.h @@ -12,6 +12,7 @@ void set_unicode_input_mode(uint8_t os_target); void unicode_input_start(void); void unicode_input_finish(void); void register_hex(uint16_t hex); +void register_hex32(uint32_t hex); bool process_unicode(uint16_t keycode, keyrecord_t *record); @@ -22,7 +23,7 @@ bool process_unicode(uint16_t keycode, keyrecord_t *record); typedef struct { char *symbol; - uint16_t codes[4]; + uint32_t code; } qk_ucis_symbol_t; struct { @@ -31,8 +32,8 @@ struct { bool in_progress:1; } qk_ucis_state; -#define UCIS_TABLE(...) {__VA_ARGS__, {NULL, {}}} -#define UCIS_SYM(name, ...) {name, {__VA_ARGS__, 0}} +#define UCIS_TABLE(...) {__VA_ARGS__, {NULL, 0}} +#define UCIS_SYM(name, code) {name, code} extern const qk_ucis_symbol_t ucis_symbol_table[]; -- cgit v1.2.3 From 43d08629cf275d0b32281ffe8785258fff226b49 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Mon, 15 Aug 2016 10:02:05 +0200 Subject: process_unicode: Replace register_hex32 It turns out that register_hex32 did not work reliably, and some systems only allow 7 chars after the unicode magic sequence, while others allow 8. To remedy the situation, store the codes as strings, and type those in instead of doing bit shifting magic. Signed-off-by: Gergely Nagy --- quantum/process_keycode/process_unicode.c | 37 +++++++++++++++++++++++-------- quantum/process_keycode/process_unicode.h | 8 +++---- 2 files changed, 32 insertions(+), 13 deletions(-) diff --git a/quantum/process_keycode/process_unicode.c b/quantum/process_keycode/process_unicode.c index 698cc3c02..d8a0f667c 100644 --- a/quantum/process_keycode/process_unicode.c +++ b/quantum/process_keycode/process_unicode.c @@ -60,14 +60,6 @@ void register_hex(uint16_t hex) { } } -void register_hex32(uint32_t hex) { - for(int i = 7; i >= 0; i--) { - uint8_t digit = ((hex >> (i*8)) & 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; @@ -120,6 +112,33 @@ void qk_ucis_symbol_fallback (void) { } } +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); + } + } +} + bool process_ucis (uint16_t keycode, keyrecord_t *record) { uint8_t i; @@ -164,7 +183,7 @@ bool process_ucis (uint16_t keycode, keyrecord_t *record) { for (i = 0; ucis_symbol_table[i].symbol; i++) { if (is_uni_seq (ucis_symbol_table[i].symbol)) { symbol_found = true; - register_hex32(ucis_symbol_table[i].code); + register_ucis(ucis_symbol_table[i].code + 2); break; } } diff --git a/quantum/process_keycode/process_unicode.h b/quantum/process_keycode/process_unicode.h index dd6dd7138..be24ddc2b 100644 --- a/quantum/process_keycode/process_unicode.h +++ b/quantum/process_keycode/process_unicode.h @@ -12,7 +12,6 @@ void set_unicode_input_mode(uint8_t os_target); void unicode_input_start(void); void unicode_input_finish(void); void register_hex(uint16_t hex); -void register_hex32(uint32_t hex); bool process_unicode(uint16_t keycode, keyrecord_t *record); @@ -23,7 +22,7 @@ bool process_unicode(uint16_t keycode, keyrecord_t *record); typedef struct { char *symbol; - uint32_t code; + char *code; } qk_ucis_symbol_t; struct { @@ -32,14 +31,15 @@ struct { bool in_progress:1; } qk_ucis_state; -#define UCIS_TABLE(...) {__VA_ARGS__, {NULL, 0}} -#define UCIS_SYM(name, code) {name, code} +#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 -- cgit v1.2.3 From e8845f0daf8dc7a7674dc5420cc5a684bbbea09b Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Mon, 15 Aug 2016 10:07:13 +0200 Subject: process_unicode: Introduce a slight delay When entering unicode codes, use some delay, so the OS has time to process the information. This is not needed on all systems, but some seem to require it. Signed-off-by: Gergely Nagy --- quantum/process_keycode/process_unicode.c | 4 ++++ quantum/process_keycode/process_unicode.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/quantum/process_keycode/process_unicode.c b/quantum/process_keycode/process_unicode.c index d8a0f667c..72c809c30 100644 --- a/quantum/process_keycode/process_unicode.c +++ b/quantum/process_keycode/process_unicode.c @@ -37,6 +37,7 @@ void unicode_input_start (void) { unregister_code(KC_PPLS); break; } + wait_ms(UNICODE_TYPE_DELAY); } void unicode_input_finish (void) { @@ -109,6 +110,7 @@ void qk_ucis_symbol_fallback (void) { uint8_t code = qk_ucis_state.codes[i]; register_code(code); unregister_code(code); + wait_ms(UNICODE_TYPE_DELAY); } } @@ -135,6 +137,7 @@ void register_ucis(const char *hex) { if (kc) { register_code (kc); unregister_code (kc); + wait_ms (UNICODE_TYPE_DELAY); } } } @@ -172,6 +175,7 @@ bool process_ucis (uint16_t keycode, keyrecord_t *record) { 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) { diff --git a/quantum/process_keycode/process_unicode.h b/quantum/process_keycode/process_unicode.h index be24ddc2b..85364e8eb 100644 --- a/quantum/process_keycode/process_unicode.h +++ b/quantum/process_keycode/process_unicode.h @@ -8,6 +8,10 @@ #define UC_WIN 2 #define UC_BSD 3 +#ifndef UNICODE_TYPE_DELAY +#define UNICODE_TYPE_DELAY 10 +#endif + void set_unicode_input_mode(uint8_t os_target); void unicode_input_start(void); void unicode_input_finish(void); -- cgit v1.2.3