From 0b023ef67c6786645738570fc02fdf44451c32b7 Mon Sep 17 00:00:00 2001 From: zs Date: Sun, 15 Oct 2017 07:00:44 +0200 Subject: [PATCH 01/52] Add tomb0y's minidox layout --- keyboards/minidox/keymaps/tomb0y/README.md | 49 +++++++ keyboards/minidox/keymaps/tomb0y/keymap.c | 144 +++++++++++++++++++++ 2 files changed, 193 insertions(+) create mode 100644 keyboards/minidox/keymaps/tomb0y/README.md create mode 100644 keyboards/minidox/keymaps/tomb0y/keymap.c diff --git a/keyboards/minidox/keymaps/tomb0y/README.md b/keyboards/minidox/keymaps/tomb0y/README.md new file mode 100644 index 0000000000..c00cca1c5b --- /dev/null +++ b/keyboards/minidox/keymaps/tomb0y/README.md @@ -0,0 +1,49 @@ +``` +/* Base layer - workman + * + * ,----------------------------------. ,----------------------------------. + * | q | d | r | w | b | | j | f | u | p | ; | + * |------+------+------+------+------| |------+------+------+------+------| + * | a | s | h | t | g | | y | n | e | o | i | + * |------+------+------+------+------| |------+------+------+------+------| + * | z | x | m | c | v | | k | l | dead | . | / | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,---------------------. + * | tab | esc | enter| |bckspc| space| tab | + * | shift | ctrl | alt | | gui | fn | shift | + * `-------+------+ | | |------+-------. + * `------' `------' + */ + +/* Dead key layer + * + * ,----------------------------------. ,----------------------------------. + * | % | & | ? | + | @ | | $ | _ | [ | ] | ! | + * |------+------+------+------+------| |------+------+------+------+------| + * | # | ( | = | 0 | { | | } | 1 | * | ) | - | + * |------+------+------+------+------| |------+------+------+------+------| + * | 6 | 7 | 8 | 9 | | | | \ | 2 | 3 | 4 | 5 | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,---------------------. + * | tab | esc | comma| |bckspc| comma| tab | + * | shift | ctrl |+enter| | gui |+space| shift | + * `-------+------+ | | |------+-------. + * `------' `------' + */ + +/* Function layer + * + * ,----------------------------------. ,---------------------------------. + * | | del |⌃← | ⌃→ | | | mute | vol- | vol+ | ⌘⌃p | | + * |------+------+------+------+------| |------+------+------+------+------| + * | ` | end | pgup | pgdn | home | | ← | ↓ | ↑ | → | ' | + * |------+------+------+------+------| |------+------+------+------+------| + * | ⌥⇥ | |⇧⌃⇥| ⌃⇥ | | | | br- | , | br+ | ^ | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,---------------------. + * | tab | | enter| |bckspc| | tab | + * | shift | | alt | | gui | | shift | + * `-------+------+ | | |------+-------. + * `------' `------' + */ +``` diff --git a/keyboards/minidox/keymaps/tomb0y/keymap.c b/keyboards/minidox/keymaps/tomb0y/keymap.c new file mode 100644 index 0000000000..c8f8a343c1 --- /dev/null +++ b/keyboards/minidox/keymaps/tomb0y/keymap.c @@ -0,0 +1,144 @@ +#include "minidox.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +#define _WM 0 +#define _DK 1 +#define _FUN 2 + +#define _DK_ACT 0 +#define _DK_REL 1 +#define _KC_COMS 2 +#define _KC_CENT 3 + +#define DK_ACT M(_DK_ACT) // activate dead key layer +#define DK_REL M(_DK_REL) // release dead key layer +#define KC_COMS M(_KC_COMS) // comma + space +#define KC_CENT M(_KC_CENT) // comma + enter +#define KC_ENOP ALT_T(KC_ENT) // press for enter, hold for option +#define KC_BSCM GUI_T(KC_BSPC) // press for backspace, hold for command +#define KC_CTES CTL_T(KC_ESC) // press for escape, hold for control +#define KC_SHTB SFT_T(KC_TAB) // press for tab, hold for shift +#define KC_SPFN LT(_FUN, KC_SPC) // press for space, hold for function layer (aka spacefn) +#define KC_OPTB RALT(KC_TAB) // option + tab +#define KC_CCSP RGUI(RCTL(KC_P)) // control + command + p +#define KC_CSTB S(RCTL(KC_TAB)) // shift + control + tab +#define KC_C_TB RCTL(KC_TAB) // control + tab +#define KC_C_LF RCTL(KC_LEFT) // control + left +#define KC_C_RT RCTL(KC_RGHT) // control + right +#define KC_BRUP KC_F15 // brightness up on osx +#define KC_BRDN KC_F14 // brightness down on osx + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Base layer - workman + * + * ,----------------------------------. ,----------------------------------. + * | q | d | r | w | b | | j | f | u | p | ; | + * |------+------+------+------+------| |------+------+------+------+------| + * | a | s | h | t | g | | y | n | e | o | i | + * |------+------+------+------+------| |------+------+------+------+------| + * | z | x | m | c | v | | k | l | dead | . | / | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,---------------------. + * | tab | esc | enter| |bckspc| space| tab | + * | shift | ctrl | alt | | gui | fn | shift | + * `-------+------+ | | |------+-------. + * `------' `------' + */ + [_WM] = KEYMAP( \ + KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, \ + KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, \ + KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, DK_ACT, KC_DOT, KC_SLSH, \ + KC_SHTB, KC_CTES, KC_ENOP, KC_BSCM, KC_SPFN, KC_SHTB \ + ), + +/* Dead key layer + * + * ,----------------------------------. ,----------------------------------. + * | % | & | ? | + | @ | | $ | _ | [ | ] | ! | + * |------+------+------+------+------| |------+------+------+------+------| + * | # | ( | = | 0 | { | | } | 1 | * | ) | - | + * |------+------+------+------+------| |------+------+------+------+------| + * | 6 | 7 | 8 | 9 | | | | \ | 2 | 3 | 4 | 5 | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,---------------------. + * | tab | esc | comma| |bckspc| comma| tab | + * | shift | ctrl |+enter| | gui |+space| shift | + * `-------+------+ | | |------+-------. + * `------' `------' + */ + [_DK] = KEYMAP( \ + KC_PERC, KC_AMPR, KC_QUES, KC_PLUS, KC_AT, KC_DLR, KC_UNDS, KC_LBRC, KC_RBRC, KC_EXLM, \ + KC_HASH, KC_LPRN, KC_EQL, KC_0, KC_LCBR, KC_RCBR, KC_1, KC_ASTR, KC_RPRN, KC_MINS, \ + KC_6, KC_7, KC_8, KC_9, KC_PIPE, KC_BSLS, KC_2, DK_REL, KC_4, KC_5, \ + KC_SHTB, KC_CTES, KC_CENT, KC_BSCM, KC_COMS, KC_SHTB \ + ), + +/* Function layer + * + * ,----------------------------------. ,---------------------------------. + * | | del |⌃← | ⌃→ | | | mute | vol- | vol+ | ⌘⌃p | | + * |------+------+------+------+------| |------+------+------+------+------| + * | ` | end | pgup | pgdn | home | | ← | ↓ | ↑ | → | ' | + * |------+------+------+------+------| |------+------+------+------+------| + * | ⌥⇥ | |⇧⌃⇥| ⌃⇥ | | | | br- | , | br+ | ^ | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,---------------------. + * | tab | | enter| |bckspc| | tab | + * | shift | | alt | | gui | | shift | + * `-------+------+ | | |------+-------. + * `------' `------' + */ + [_FUN] = KEYMAP( \ + XXXXXXX, KC_DEL, KC_C_LF, KC_C_RT, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, KC_CCSP, XXXXXXX, \ + KC_GRV, KC_END, KC_PGUP, KC_PGDN, KC_HOME, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_QUOT, \ + KC_OPTB, XXXXXXX, KC_CSTB, KC_C_TB, XXXXXXX, XXXXXXX, KC_BRDN, KC_COMM, KC_BRUP, KC_CIRC, \ + KC_SHTB, XXXXXXX, KC_ENOP, KC_BSCM, _______, KC_SHTB \ + ) +}; + +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 _KC_COMS: + if (record->event.pressed) { + return MACRO(T(COMM), T(SPC), END); // comma + space + } + break; + case _KC_CENT: + if (record->event.pressed) { + return MACRO(T(COMM), T(ENT), END); // comma + enter + } + break; + case _DK_ACT: + if (record->event.pressed) { + if (keyboard_report->mods & MOD_BIT(KC_LSFT) || keyboard_report->mods & MOD_BIT(KC_RSFT)) { // act as comma when shift is pressed (eg <) + register_code(KC_COMM); + } else { // activate oneshot dead key layer otherwise + layer_on(_DK); + set_oneshot_layer(_DK, ONESHOT_START); + } + } else { // make sure to deactive dead key layer on key release + clear_oneshot_layer_state(ONESHOT_PRESSED); + unregister_code(KC_COMM); + } + break; + case _DK_REL: + if (record->event.pressed) { // act as 3 on keypress + register_code(KC_3); + } else { // make sure to deactive dead key layer on key release + clear_oneshot_layer_state(ONESHOT_PRESSED); + unregister_code(KC_3); + } + break; + } + + return MACRO_NONE; +}; From e1bcb40e90cd7941fd7c4fee86a18f9a0ef136e3 Mon Sep 17 00:00:00 2001 From: Salt-Peanuts Date: Sun, 15 Oct 2017 12:12:39 -0400 Subject: [PATCH 02/52] Cleaned up my Kinesis layout and created readme. (#1843) * Cleaned up keymap and readme * Cleaned up keymap and readme * Cleaned up keymap and readme * Cleaned up keymap and readme --- keyboards/kinesis/keymaps/salty/keymap.c | 830 ++++++++++------------ keyboards/kinesis/keymaps/salty/readme.md | 14 + keyboards/kinesis/keymaps/salty/rules.mk | 7 +- 3 files changed, 386 insertions(+), 465 deletions(-) create mode 100644 keyboards/kinesis/keymaps/salty/readme.md diff --git a/keyboards/kinesis/keymaps/salty/keymap.c b/keyboards/kinesis/keymaps/salty/keymap.c index e6cf61bfa3..bfbb17adc6 100644 --- a/keyboards/kinesis/keymaps/salty/keymap.c +++ b/keyboards/kinesis/keymaps/salty/keymap.c @@ -2,16 +2,14 @@ #include "action_layer.h" #include "eeconfig.h" -#define _CMD 0 // Base Colemak Mod-DH -#define _QW 1 // Base QWERTY -#define _CG 2 // Colemak Mod-DH gaming layer -#define _QG 3 // QWERTY gaming layer -#define _NM 4 // Number layer -#define _MD 5 // Media Layer -#define _KP 6 // KP layer -#define _LY 7 // Layer switcher -#define _FN 8 // Function layer -#define _FN2 9 // Function layer (identical as _FN; used to deal with minor key interaction issue) +#define _QW 0 // Base QWERTY +#define _CM 1 // Colemak +#define _QG 2 // QWERTY gaming +#define _NS 3 // Number/Symbol +#define _NP 4 // Numpad +#define _LY 5 // Layer switcher +#define _FN 6 // Function +#define _FN2 7 // Function 2 (identical as _FN; used to deal with minor key interaction issue) #define _______ KC_TRNS #define XXXXXXX KC_NO @@ -27,466 +25,371 @@ qk_tap_dance_action_t tap_dance_actions[] = { [RPN_RBC] = ACTION_TAP_DANCE_DOUBLE(KC_RPRN, KC_RBRC) }; -/* - - Function Keys on All Layers (Keypad toggles): - ,-----------------------------------------------------------------. - | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | - `-----------------------------------------------------------------' - ,---------------------------------------------------------------- --------------. - | F9 | F10 | F11 | F12 | PScr | SLck | Paus | Keypad | Layer/ | - | | | | | | | | | RESET (in Fn layer) | - `-------------------------------------------------------------------------------' - - Colemak Mod-DH layer: - ,-------------------------------------------.,-------------------------------------------. - | = | 1 | 2 | 3 | 4 | 5 || 6 | 7 | 8 | 9 | 0 | - | - |--------+------+------+------+------+------||------+------+------+------+------+--------| - | Tab | Q | W | F | P | B || J | L | U | Y | ; | \ | - |--------+------+------+------+------+------||------+------+------+------+------+--------| - | Ctl/Esc| A | R | S | T | G || M | N | E | I | O | ' | - |--------+------+------+------+------+------||------+------+------+------+------+--------| - | ( [ | Z | X | C | D | V || K | H | , | . | / | ) ] | - `--------+------+------+------+------+------'`------+------+------+------+------+--------' - | ` | | [ | ] | | Left | Down | Up | Right| - `---------------------------' `---------------------------' - ,--------------.,--------------. - |Ctl/Esc| LAlt || RAlt | RCtl | - ,------|-------|------||------+-------+-------. - | | Enter |Number|| RGUI | Delete| | - | Space| / |------||------| / | Bspc | - | /Fn | LShift| Bspc || Media| RShift| /Fn | - `---------------------'`----------------------' - - - QWERTY layer: - ,-------------------------------------------.,-------------------------------------------. - | = | 1 | 2 | 3 | 4 | 5 || 6 | 7 | 8 | 9 | 0 | - | - |--------+------+------+------+------+------||------+------+------+------+------+--------| - | Tab | Q | W | E | R | T || Y | U | I | O | P | \ | - |--------+------+------+------+------+------||------+------+------+------+------+--------| - | Ctl/Esc| A | S | D | F | G || H | J | K | L | ; | ' | - |--------+------+------+------+------+------||------+------+------+------+------+--------| - | ( [ | Z | X | C | V | B || N | M | , | . | / | ) ] | - `--------+------+------+------+------+------'`------+------+------+------+------+--------' - | ` | | [ | ] | | Left | Down | Up | Right| - `---------------------------' `---------------------------' - ,--------------.,--------------. - |Ctl/Esc| LAlt || RAlt | RCtl | - ,------|-------|------||------+-------+-------. - | | Enter |Number|| RGUI | Delete| | - | Space| / |------||------| / | Bspc | - | /Fn | LShift| Bspc || Media| RShift| /Fn | - `---------------------'`----------------------' - - - Colemak Mod-DH Gaming layer: - ,-------------------------------------------.,-------------------------------------------. - | = | 1 | 2 | 3 | 4 | 5 || 6 | 7 | 8 | 9 | 0 | - | - |--------+------+------+------+------+------||------+------+------+------+------+--------| - | Tab | Q | W | F | P | B || J | L | U | Y | ; | \ | - |--------+------+------+------+------+------||------+------+------+------+------+--------| - | Ctl/Esc| A | R | S | T | G || M | N | E | I | O | ' | - |--------+------+------+------+------+------||------+------+------+------+------+--------| - | LShift | Z | X | C | D | V || K | H | , | . | / | RShift | - `--------+------+------+------+------+------'`------+------+------+------+------+--------' - | ` | | [ | ] | | Left | Down | Up | Right| - `---------------------------' `---------------------------' - ,--------------.,--------------. - |Ctl/Esc| LAlt || RAlt | RCtl | - ,------|-------|------||------+-------+-------. - | | Enter |Number|| RGUI | Delete| | - | Space| / |------||------| / | Bspc | - | | LShift| Bspc || Media| RShift| | - `---------------------'`----------------------' - - - QWERTY Gaming layer: - ,-------------------------------------------.,-------------------------------------------. - | = | 1 | 2 | 3 | 4 | 5 || 6 | 7 | 8 | 9 | 0 | - | - |--------+------+------+------+------+------||------+------+------+------+------+--------| - | Tab | Q | W | E | R | T || Y | U | I | O | P | \ | - |--------+------+------+------+------+------||------+------+------+------+------+--------| - | Ctl/Esc| A | S | D | F | G || H | J | K | L | ; | ' | - |--------+------+------+------+------+------||------+------+------+------+------+--------| - | LShift | Z | X | C | V | B || N | M | , | . | / | RShift | - `--------+------+------+------+------+------'`------+------+------+------+------+--------' - | ` | | [ | ] | | Left | Down | Up | Right| - `---------------------------' `---------------------------' - ,--------------.,--------------. - |Ctl/Esc| LAlt || RAlt | RCtl | - ,------|-------|------||------+-------+-------. - | | Enter |Number|| RGUI | Delete| | - | Space| / |------||------| / | Bspc | - | | LShift| Bspc || Media| RShift| | - `---------------------'`----------------------' - - - Media layer: - ,-------------------------------------------.,-------------------------------------------. - | | | | | | || | | | | | | - |--------+------+------+------+------+------||------+------+------+------+------+--------| - | | | | | | || | | | | | | - |--------+------+------+------+------+------||------+------+------+------+------+--------| - | | | Mute | Vol- | Vol+ | || | | | | | | - |--------+------+------+------+------+------||------+------+------+------+------+--------| - | | | Prev | Play | Next | Stop || | | | | | | - `--------+------+------+------+------+------'`------+------+------+------+------+--------' - | | | | | | | | | | - `---------------------------' `---------------------------' - ,-------------.,-------------. - | | || | | - ,------|------|------||------+------+------. - | | | || | | | - | | |------||------| | | - | | | || | | | - `--------------------'`--------------------' - - Keypad layer: - ,-------------------------------------------.,-------------------------------------------. - | | | | | | || | | KP = | KP / | KP * | | - |--------+------+------+------+------+------||------+------+------+------+------+--------| - | | | | Up | | || | KP 7 | KP 8 | KP 9 | KP - | | - |--------+------+------+------+------+------||------+------+------+------+------+--------| - | | | Left | Down | Right| || | KP 4 | KP 5 | KP 6 | KP + | | - |--------+------+------+------+------+------||------+------+------+------+------+--------| - | | | | | | || | KP 1 | KP 2 | KP 3 |KP Ent| | - `--------+------+------+------+------+------'`------+------+------+------+------+--------' - | | INS | | | | | | KP . |KP Ent| - `---------------------------' `---------------------------' - ,-------------.,-------------. - | | || | | - ,------|------|------||------+------+------. - | | | || | | | - | | |------||------| | KP 0 | - | | | || | | | - `--------------------'`--------------------' - - Layer switch layer: - ,-------------------------------------------.,-------------------------------------------. - | |Col DH|QWERTY|Col GM|QW GM | || | | | | | | - |--------+------+------+------+------+------||------+------+------+------+------+--------| - | | | | | | || | | | | | | - |--------+------+------+------+------+------||------+------+------+------+------+--------| - | | | | | | || | | | | | | - |--------+------+------+------+------+------||------+------+------+------+------+--------| - | | | | | | || | | | | | | - `--------+------+------+------+------+------'`------+------+------+------+------+--------' - | | | | | | | | | | - `---------------------------' `---------------------------' - ,-------------.,-------------. - | | || | | - ,------|------|------||------+------+------. - | | | || | | | - | | |------||------| | | - | | | || | | | - `--------------------'`--------------------' - - Function layer: - ,-------------------------------------------.,-------------------------------------------. - | F11 | F1 | F2 | F3 | F4 | F5 || F6 | F7 | F8 | F9 | F10 | F12 | - |--------+------+------+------+------+------||------+------+------+------+------+--------| - | | | | Up | | || | Home | Up | End | | | - |--------+------+------+------+------+------||------+------+------+------+------+--------| - | | | Left | Down | Right| || PgUp | Right| Down | Left | | | - |--------+------+------+------+------+------||------+------+------+------+------+--------| - | | | | | | || PgDn | | | | | | - `--------+------+------+------+------+------'`------+------+------+------+------+--------' - | | INS | | | | | | | | - `---------------------------' `---------------------------' - ,-------------.,-------------. - | | || | | - ,------|------|------||------+------+------. - | | | || | | | - | | |------||------| | | - | | | || | | | - `--------------------'`--------------------' - - -*/ - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_CMD] = KEYMAP( - // Left Hand - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, - KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, - KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, - CTL_T(KC_ESC), KC_A, KC_R, KC_S, KC_T, KC_G, - TD(LPN_LBC), KC_Z, KC_X, KC_C, KC_D, KC_V, - KC_GRV, XXXXXXX, KC_LBRC, KC_RBRC, - - //Left Thumb - CTL_T(KC_ESC), KC_LALT, - MO(_NM), - LT(_FN, KC_SPC), LSFT_T(KC_ENT), KC_BSPC, - - //Right Hand - KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, TG(_KP), MO(_LY), - KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, - KC_M, KC_N, KC_E, KC_I, KC_O, KC_QUOT, - KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, TD(RPN_RBC), - KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, - - //Right Thumb - KC_RALT, KC_RCTL, - KC_RGUI, - MO(_MD), RSFT_T(KC_DEL), LT(_FN2, KC_BSPC) - ), - +/* QWERTY +* (Keys separated by /: tap for first, hold for second) +* ,-----------------------------------------------------------------------------------------------------------. +* | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PScr| SLck| Paus|Numpd|Layer| +* `-----------------------------------------------------------------------------------------------------------' +* ,-------------------------------------------. ,-------------------------------------------. +* | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | Esc | A | S | D | F | G | | H | J | K | L | ; | ' | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | Shift | Z | X | C | V | B | | N | M | , | . | / | Shift | +* `--------+------+------+------+------+------' `------+------+------+------+------+--------' +* | ` | | [ | ] | | Left | Down | Up | Right| +* `---------------------------' `---------------------------' +* ,--------------. ,--------------. +* | LCtl | LAlt | | RAlt | RCtl | +* ,------|-------|------| |------+-------+------. +* | Space| Enter | App | | RGUI | Delete| Bspc | +* | / | / |------| |------| / | / | +* | Fn | Number| Bspc | | Enter| Number| Fn2 | +* `---------------------' `---------------------' +*/ [_QW] = KEYMAP( - // Left Hand - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, - KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, - CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, - TD(LPN_LBC), KC_Z, KC_X, KC_C, KC_V, KC_B, - KC_GRV, XXXXXXX, KC_LBRC, KC_RBRC, - - //Left Thumb - CTL_T(KC_ESC), KC_LALT, - MO(_NM), - LT(_FN, KC_SPC), LSFT_T(KC_ENT), KC_BSPC, - - //Right Hand - KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, TG(_KP), MO(_LY), - KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, - KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, TD(RPN_RBC), - KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, - - //Right Thumb - KC_RALT, KC_RCTL, - KC_RGUI, - MO(_MD), RSFT_T(KC_DEL), LT(_FN2, KC_BSPC) - - ), - -[_CG] = KEYMAP( - // Left Hand - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, - KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, - KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, - CTL_T(KC_ESC), KC_A, KC_R, KC_S, KC_T, KC_G, - KC_LSFT, KC_Z, KC_X, KC_C, KC_D, KC_V, - KC_GRV, XXXXXXX, KC_LBRC, KC_RBRC, - - //Left Thumb - CTL_T(KC_ESC), KC_LALT, - MO(_NM), - KC_SPC, LSFT_T(KC_ENT), KC_BSPC, - - //Right Hand - KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, TG(_KP), MO(_LY), - KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, - KC_M, KC_N, KC_E, KC_I, KC_O, KC_QUOT, - KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, - - //Right Thumb - KC_RALT, KC_RCTL, - KC_RGUI, - MO(_MD), RSFT_T(KC_DEL), KC_BSPC - ), - + // Left Hand + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, + KC_GRV, XXXXXXX, KC_LBRC, KC_RBRC, + //Left Thumb + KC_LCTL, KC_LALT, + KC_APP, + LT(_FN, KC_SPC), LT(_NS, KC_ENT), KC_BSPC, + //Right Hand + KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, TG(_NP), MO(_LY), + KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, + //Right Thumb + KC_RALT, KC_RCTL, + KC_RGUI, + KC_ENT, LT(_NS, KC_DEL), LT(_FN2, KC_BSPC) +), + +/* Colemak +* (Keys separated by /: tap for first, hold for second) +* ,-----------------------------------------------------------------------------------------------------------. +* | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PScr| SLck| Paus|Numpd|Layer| +* `-----------------------------------------------------------------------------------------------------------' +* ,-------------------------------------------. ,-------------------------------------------. +* | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | Tab | Q | W | F | P | G | | J | L | U | Y | ; | \ | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | Esc | A | R | S | T | D | | H | N | E | I | O | ' | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | Shift | Z | X | C | V | B | | K | M | , | . | / | Shift | +* `--------+------+------+------+------+------' `------+------+------+------+------+--------' +* | ` | | [ | ] | | Left | Down | Up | Right| +* `---------------------------' `---------------------------' +* ,--------------. ,--------------. +* | LCtl | LAlt | | RAlt | RCtl | +* ,------|-------|------| |------+-------+------. +* | Space| Enter | App | | RGUI | Delete| Bspc | +* | / | / |------| |------| / | / | +* | Fn | Number| Bspc | | Enter| Number| Fn2 | +* `---------------------' `---------------------' +*/ +[_CM] = KEYMAP( + // Left Hand + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, + KC_GRV, XXXXXXX, KC_LBRC, KC_RBRC, + //Left Thumb + KC_LCTL, KC_LALT, + KC_APP, + LT(_FN, KC_SPC), LT(_NS, KC_ENT), KC_BSPC, + //Right Hand + KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, TG(_NP), MO(_LY), + KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, + KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, + //Right Thumb + KC_RALT, KC_RCTL, + KC_RGUI, + KC_ENT, LT(_NS, KC_DEL), LT(_FN2, KC_BSPC) +), + +/* QWERTY Gaming +* (Keys separated by /: tap for first, hold for second; no access to Fn layer) +* ,-----------------------------------------------------------------------------------------------------------. +* | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PScr| SLck| Paus|Numpd|Layer| +* `-----------------------------------------------------------------------------------------------------------' +* ,-------------------------------------------. ,-------------------------------------------. +* | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | Esc | A | S | D | F | G | | H | J | K | L | ; | ' | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | Shift | Z | X | C | V | B | | N | M | , | . | / | Shift | +* `--------+------+------+------+------+------' `------+------+------+------+------+--------' +* | ` | | [ | ] | | Left | Down | Up | Right| +* `---------------------------' `---------------------------' +* ,--------------. ,--------------. +* | LCtl | LAlt | | RAlt | RCtl | +* ,------|-------|------| |------+-------+------. +* | | Enter | | | RGUI | Delete| | +* | Space| / |------| |------| / | Bspc | +* | | Number| Bspc | | Enter| Number| | +* `---------------------' `---------------------' +*/ [_QG] = KEYMAP( - // Left Hand - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, - KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, - CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, - KC_GRV, XXXXXXX, KC_LBRC, KC_RBRC, - - //Left Thumb - CTL_T(KC_ESC), KC_LALT, - MO(_NM), - KC_SPC, LSFT_T(KC_ENT), KC_BSPC, - - //Right Hand - KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, TG(_KP), MO(_LY), - KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, - KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, - - //Right Thumb - KC_RALT, KC_RCTL, - KC_RGUI, - MO(_MD), RSFT_T(KC_DEL), KC_BSPC - ), - -[_NM] = KEYMAP( - // Left Hand - _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, - - // Left Thumb - _______, _______, - _______, - _______, _______, _______, - - // Right Hand - _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, - - // Right Thumb - _______, _______, - _______, - _______, _______, _______ - ), - -[_MD] = KEYMAP( - // Left Hand - _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, - _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP, - _______, _______, _______, _______, - - // Left Thumb - _______, _______, - _______, - _______, _______, _______, - - // Right Hand - _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, - - // Right Thumb - _______, _______, - _______, - _______, _______, _______ - ), - -[_KP] = KEYMAP( - // Left Hand - _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, KC_UP, _______, _______, - _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, - _______, _______, _______, _______, _______, _______, - _______, KC_INS, _______, _______, - - // Left Thumb - _______, _______, - _______, - _______, _______, _______, - - // Right Hand - _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, KC_PEQL, KC_PSLS, KC_PAST, _______, - _______, KC_P7, KC_P8, KC_P9, KC_PMNS, _______, - _______, KC_P4, KC_P5, KC_P6, KC_PPLS, _______, - _______, KC_P1, KC_P2, KC_P3, KC_PENT, _______, - _______, _______, KC_PDOT, KC_PENT, - - // Right Thumb - _______, _______, - _______, - _______, _______, KC_P0 - ), - + // Left Hand + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, + KC_GRV, XXXXXXX, KC_LBRC, KC_RBRC, + //Left Thumb + KC_LCTL, KC_LALT, + XXXXXXX, + KC_SPC, LT(_NS, KC_ENT), KC_BSPC, + //Right Hand + KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, TG(_NP), MO(_LY), + KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, + //Right Thumb + KC_RALT, KC_RCTL, + KC_RGUI, + KC_ENT, LT(_NS, KC_DEL), KC_BSPC +), + +/* Number/symbol layer +* ,-----------------------------------------------------------------------------------------------------------. +* | | | | | | | | | | | | | | | | | | | +* `-----------------------------------------------------------------------------------------------------------' +* ,-------------------------------------------. ,-------------------------------------------. +* | F12 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | | ! | @ | # | $ | % | | ^ | & | * | ` | ~ | | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | | = | { | [ | ( | + | | _ | ) | ] | } | - | | +* `--------+------+------+------+------+------' `------+------+------+------+------+--------' +* | | | | | | | | | | +* `---------------------------' `---------------------------' +* ,-------------. ,-------------. +* | | | | | | +* ,------|------|------| |------+------+------. +* | | | | | | | | +* | | |------| |------| | | +* | | | | | | | | +* `--------------------' `--------------------' +*/ +[_NS] = KEYMAP( + // Left Hand + _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, + _______, KC_EQL, KC_LCBR, KC_LBRC, KC_LPRN, KC_PLUS, + _______, _______, _______, _______, + // Left Thumb + _______, _______, + _______, + _______, _______, _______, + // Right Hand + _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_CIRC, KC_AMPR, KC_ASTR, KC_GRV, KC_TILD, _______, + KC_6, KC_7, KC_8, KC_9, KC_0, _______, + KC_UNDS, KC_RPRN, KC_RBRC, KC_RCBR, KC_MINS, _______, + _______, _______, _______, _______, + // Right Thumb + _______, _______, + _______, + _______, _______, _______ +), + +/* Numpad layer +* ,-----------------------------------------------------------------------------------------------------------. +* | | | | | | | | | | | | | | | | | | | +* `-----------------------------------------------------------------------------------------------------------' +* ,-------------------------------------------. ,-------------------------------------------. +* | | | | | | | | NumLk| Tab | KP / | kP *| KP - | | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | | | | Up | | | | | KP 7 | KP 8 | KP 9 | KP + | | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | | | Left | Down | Right| | | | KP 4 | KP 5 | KP 6 | KP = | | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | | | | | | | | | KP 1 | KP 2 | KP 3 |KP Ent| | +* `--------+------+------+------+------+------' `------+------+------+------+------+--------' +* | | INS | | | | | KP , | KP . |KP Ent| +* `---------------------------' `---------------------------' +* ,-------------. ,-------------. +* | | | | | | +* ,------|------|------| |------+------+------. +* | | | | | | | | +* | | |------| |------| | KP 0 | +* | | | | | | | | +* `--------------------' `--------------------' +*/ +[_NP] = KEYMAP( + // Left Hand + _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_UP, _______, _______, + _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, + _______, _______, _______, _______, _______, _______, + _______, KC_INS, _______, _______, + // Left Thumb + _______, _______, + _______, + _______, _______, _______, + // Right Hand + _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_NLCK, KC_TAB, KC_PSLS, KC_PAST, KC_PMNS, _______, + _______, KC_P7, KC_P8, KC_P9, KC_PPLS, _______, + _______, KC_P4, KC_P5, KC_P6, KC_PEQL, _______, + _______, KC_P1, KC_P2, KC_P3, KC_PENT, _______, + _______, KC_PCMM, KC_PDOT, KC_PENT, + // Right Thumb + _______, _______, + _______, + _______, _______, KC_P0 +), + +/* Layer switch layer +* ,-----------------------------------------------------------------------------------------------------------. +* | | | | | | | | | | | | | | | | | | | +* `-----------------------------------------------------------------------------------------------------------' +* ,-------------------------------------------. ,-------------------------------------------. +* | |QWERTY|Colemk|QW GM | | | | | | | | | | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | | | | | | | | | | | | | | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | | | | | | | | | | | | | | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | | | | | | | | | | | | | | +* `--------+------+------+------+------+------' `------+------+------+------+------+--------' +* | | | | | | | | | | +* `---------------------------' `---------------------------' +* ,-------------. ,-------------. +* | | | | | | +* ,------|------|------| |------+------+------. +* | | | | | | | | +* | | |------| |------| | | +* | | | | | | | | +* `--------------------' `--------------------' +*/ [_LY] = KEYMAP( - // Left Hand - _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, DF(_CMD), DF(_QW), DF(_CG), DF(_QG), _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, - - // Left Thumb - _______, _______, - _______, - _______, _______, _______, - - // Right Hand - _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, - - // Right Thumb - _______, _______, - _______, - _______, _______, _______ - ), - + // Left Hand + _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, DF(_QW), DF(_CM), DF(_QG), _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + // Left Thumb + _______, _______, + _______, + _______, _______, _______, + // Right Hand + _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + // Right Thumb + _______, _______, + _______, + _______, _______, _______ +), + +/* Function layer +* ,-----------------------------------------------------------------------------------------------------------. +* | | | | | | | | | |RESET| | | | | | | | | +* `-----------------------------------------------------------------------------------------------------------' +* ,-------------------------------------------. ,-------------------------------------------. +* | F12 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | | | | Up | |Alt+Tb| | | Home | Up | End | | | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | | | Left | Down | Right| | | PgUp | Right| Down | Left | | | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | | | Prev | Play | Next | Stop | | PgDn | Mute | Vol- | Vol+ | | | +* `--------+------+------+------+------+------' `------+------+------+------+------+--------' +* | | INS | | | | | | | | +* `---------------------------' `---------------------------' +* ,-------------. ,-------------. +* | | | | | | +* ,------|------|------| |------+------+------. +* | | | | | | | | +* | | |------| |------| | | +* | | | | | | | | +* `--------------------' `--------------------' +*/ [_FN] = KEYMAP( - // Left Hand - _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, - _______, _______, _______, KC_UP, _______, _______, - _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, - _______, _______, _______, _______, _______, _______, - _______, KC_INS, _______, _______, - - // Left Thumb - _______, _______, - _______, - _______, _______, _______, - - // Right Hand - _______, _______, _______, _______, _______, _______, _______, _______, RESET, - KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12, - _______, KC_HOME, KC_UP, KC_END, _______, _______, - KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, - KC_PGDN, _______, _______, _______, _______, _______, - _______, _______, _______, _______, - - // Right Thumb - _______, _______, - _______, - _______, _______, _______ - ), + // Left Hand + _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, + _______, _______, _______, KC_UP, _______, LALT(KC_TAB), + _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP, + _______, KC_INS, _______, _______, + // Left Thumb + _______, _______, + _______, + _______, _______, _______, + // Right Hand + RESET, _______, _______, _______, _______, _______, _______, _______, _______, + KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, KC_HOME, KC_UP, KC_END, _______, _______, + KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, + KC_PGDN, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, + _______, _______, _______, _______, + // Right Thumb + _______, _______, + _______, + _______, _______, _______ +), [_FN2] = KEYMAP( - // Left Hand - _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, - _______, _______, _______, KC_UP, _______, _______, - _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, - _______, _______, _______, _______, _______, _______, - _______, KC_INS, _______, _______, - - // Left Thumb - _______, _______, - _______, - _______, _______, _______, - - // Right Hand - _______, _______, _______, _______, _______, _______, _______, _______, RESET, - KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12, - _______, KC_HOME, KC_UP, KC_END, _______, _______, - KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, - KC_PGDN, _______, _______, _______, _______, _______, - _______, _______, _______, _______, - - // Right Thumb - _______, _______, - _______, - _______, _______, _______ - ) + // Left Hand + _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, + _______, _______, _______, KC_UP, _______, LALT(KC_TAB), + _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP, + _______, KC_INS, _______, _______, + // Left Thumb + _______, _______, + _______, + _______, _______, _______, + // Right Hand + RESET, _______, _______, _______, _______, _______, _______, _______, _______, + KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, KC_HOME, KC_UP, KC_END, _______, _______, + KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, + KC_PGDN, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, + _______, _______, _______, _______, + // Right Thumb + _______, _______, + _______, + _______, _______, _______ +) }; @@ -525,3 +428,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { void led_set_user(uint8_t usb_led) { } + + + diff --git a/keyboards/kinesis/keymaps/salty/readme.md b/keyboards/kinesis/keymaps/salty/readme.md new file mode 100644 index 0000000000..4c70964239 --- /dev/null +++ b/keyboards/kinesis/keymaps/salty/readme.md @@ -0,0 +1,14 @@ +# Salty's Kinesis Keymap + +These layouts are derived from what I was using on my Kinesis Contoured keyboards through TMK converters. With the move to QMK through Stapelberg replacement controller, I've cleaned up the layouts a bit while adding number/symbol layer. + +There are only minor changes in the base keywell layout (e.g., CapsLock is ESC, arrow clusters on one side), while the thumb clusters deviate more from the default layout. + +Changes to the thumb clusters include: +* The navigations keys moved to Fn layers. +* The function of 2u keys have been reversed - I've always used space with my left thumb, and I find it more helpful to have access to Space and Enter while using my mouse/trackball. +* Enter and Backspace have been duplicated on both clusters. +* The 2u keys serve dual function as momentary layer switchers. + +I'm frequently fiddle around with the layouts as I find certain things I want to try out. + diff --git a/keyboards/kinesis/keymaps/salty/rules.mk b/keyboards/kinesis/keymaps/salty/rules.mk index 4346cf0095..e08bf38c8b 100644 --- a/keyboards/kinesis/keymaps/salty/rules.mk +++ b/keyboards/kinesis/keymaps/salty/rules.mk @@ -2,7 +2,7 @@ # 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) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -11,11 +11,12 @@ NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: ht BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode +UNICODE_ENABLE = yes # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -TAP_DANCE_ENABLE = yes +TAP_DANCE_ENABLE = yes # Enable Tap Dancing function +KEY_LOCK_ENABLE = yes # Enable key lock ifndef QUANTUM_DIR include ../../../../Makefile From 066525ab9ed35fad3a5d19279b92ff04c7e28dc1 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Sun, 15 Oct 2017 13:37:46 -0400 Subject: [PATCH 03/52] add qmk.fm as a backup host --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index fdb97df2ab..181bf366f4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,7 @@ env: global: - secure: vBTSL34BDPxDilKUuTXqU4CJ26Pv5hogD2nghatkxSQkI1/jbdnLj/DQdPUrMJFDIY6TK3AltsBx72MaMsLQ1JO/Ou24IeHINHXzUC1FlS9yQa48cpxnhX5kzXNyGs3oa0qaFbvnr7RgYRWtmD52n4bIZuSuW+xpBv05x2OCizdT2ZonH33nATaHGFasxROm4qYZ241VfzcUv766V6RVHgL4x9V08warugs+RENVkfzxxwhk3NmkrISabze0gSVJLHBPHxroZC6EUcf/ocobcuDrCwFqtEt90i7pNIAFUE7gZsN2uE75LmpzAWin21G7lLPcPL2k4FJVd8an1HiP2WmscJU6U89fOfMb2viObnKcCzebozBCmKGtHEuXZo9FcReOx49AnQSpmESJGs+q2dL/FApkTjQiyT4J6O5dJpoww0/r57Wx0cmmqjETKBb5rSgXM51Etk3wO09mvcPHsEwrT7qH8r9XWdyCDoEn7FCLX3/LYnf/D4SmZ633YPl5gv3v9XEwxR5+04akjgnvWDSNIaDbWBdxHNb7l4pMc+WR1bwCyMyA7KXj0RrftEGOrm9ZRLe6BkbT4cycA+j77nbPOMcyZChliV9pPQos+4TOJoTzcK2L8yWVoY409aDNVuAjdP6Yum0R2maBGl/etLmIMpJC35C5/lZ+dUNjJAM= before_install: - - wget http://www.atmel.com/images/avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz + - wget http://www.atmel.com/images/avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz || wget http://qmk.fm/avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz install: - tar -zxf avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz - export PATH="$PATH:$TRAVIS_BUILD_DIR/avr8-gnu-toolchain-linux_x86_64/bin" From e64313cdb37890c7f8342956855abd751c6583be Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Sun, 15 Oct 2017 16:17:47 -0400 Subject: [PATCH 04/52] adds default keymap for amj60 --- keyboards/amj40/keymaps/default/keymap.c | 2 - keyboards/amj60/keymaps/default/keymap.c | 59 +++++++++++++++++++ .../amj60/keymaps/iso_split_rshift/keymap.c | 2 - keyboards/amj60/keymaps/maximized/keymap.c | 2 - 4 files changed, 59 insertions(+), 6 deletions(-) create mode 100644 keyboards/amj60/keymaps/default/keymap.c diff --git a/keyboards/amj40/keymaps/default/keymap.c b/keyboards/amj40/keymaps/default/keymap.c index 13b48c2ada..e4607eae5c 100755 --- a/keyboards/amj40/keymaps/default/keymap.c +++ b/keyboards/amj40/keymaps/default/keymap.c @@ -1,7 +1,5 @@ -// 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 "amj40.h" diff --git a/keyboards/amj60/keymaps/default/keymap.c b/keyboards/amj60/keymaps/default/keymap.c new file mode 100644 index 0000000000..5c0b374fe6 --- /dev/null +++ b/keyboards/amj60/keymaps/default/keymap.c @@ -0,0 +1,59 @@ + +#include "amj60.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 _DEF 0 +#define _SPC 1 + +// dual-role shortcuts +#define SPACEDUAL LT(_SPC, KC_SPACE) + + +// increase readability +#define _______ KC_TRNS + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _DEF: Default Layer + * ,-----------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \ | ~ | + * |-----------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| bspc| + * |-----------------------------------------------------------| + * |Caps | A| S| D| F| G| H| J| K| L| ;| '| Return | + * |-----------------------------------------------------------| + * |Sft | Fn0| Z| X| C| V| B| N| M| ,| .| /| Sft |Fn2| + * |-----------------------------------------------------------| + * |Ctrl|Win |Alt | Space/Fn0 |Alt |Win |Menu|RCtl| + * `-----------------------------------------------------------' + */ + [_DEF] = KEYMAP_MAX( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, F(0), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, F(1), \ + KC_LCTL, KC_LALT, KC_LGUI, SPACEDUAL, KC_RGUI, KC_RALT, KC_RCTL, F(2)), + + /* Keymap 1: F-and-vim Layer, modified with Space (by holding space) + * ,-----------------------------------------------------------. + * |PrSc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| | | + * |-----------------------------------------------------------| + * | |Paus| Up| [ | ] | | | | ( | ) | | | | Del | + * |-----------------------------------------------------------| + * | |Lft|Dwn|Rgt| | |Left|Down|Right|Up| | | PLAY | + * |-----------------------------------------------------------| + * | | | | | < | > | |M0 | | | | | Vol+ | | + * |-----------------------------------------------------------| + * | | | | |Alt |Prev|Vol-|Next| + * `-----------------------------------------------------------' + */ + [_SPC] = KEYMAP_MAX( + KC_PSCR, 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_PAUS, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, KC_MPLY, \ + _______, _______, _______, _______, _______, _______, KC_SPACE, M(0), _______, _______, _______, _______, KC_VOLU, _______, \ + _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT), + +}; diff --git a/keyboards/amj60/keymaps/iso_split_rshift/keymap.c b/keyboards/amj60/keymaps/iso_split_rshift/keymap.c index 60fb0bfb0b..ee6511f834 100644 --- a/keyboards/amj60/keymaps/iso_split_rshift/keymap.c +++ b/keyboards/amj60/keymaps/iso_split_rshift/keymap.c @@ -1,5 +1,3 @@ -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, -// this is the style you want to emulate. #include "amj60.h" diff --git a/keyboards/amj60/keymaps/maximized/keymap.c b/keyboards/amj60/keymaps/maximized/keymap.c index d2a4be59f3..5c0b374fe6 100644 --- a/keyboards/amj60/keymaps/maximized/keymap.c +++ b/keyboards/amj60/keymaps/maximized/keymap.c @@ -1,5 +1,3 @@ -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, -// this is the style you want to emulate. #include "amj60.h" From 115e49b2af902097c08b9fb26b8e502e046b7fc8 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Sun, 15 Oct 2017 16:18:28 -0400 Subject: [PATCH 05/52] only build default keymaps --- util/travis_build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/travis_build.sh b/util/travis_build.sh index 87a5433705..c9b5fc3235 100644 --- a/util/travis_build.sh +++ b/util/travis_build.sh @@ -9,7 +9,7 @@ if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then BRANCH=$(git rev-parse --abbrev-ref HEAD) if [ $NEFM -gt 0 -o "$BRANCH" = "master" ]; then echo "Making all keymaps for all keyboards" - make all:all AUTOGEN="true" + make all:default AUTOGEN="true" : $((exit_code = $exit_code + $?)) else MKB=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -oP '(?<=keyboards\/)([a-zA-Z0-9_\/]+)(?=\/)' | sort -u) From 1745f202cc3806afeb3e7e1e973c3cdd9c7c4d07 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Sun, 15 Oct 2017 16:18:45 -0400 Subject: [PATCH 06/52] update keymaps to not be the canonical file --- keyboards/eco/keymaps/default/keymap.c | 2 -- keyboards/eco/keymaps/that_canadian/keymap.c | 2 -- keyboards/handwired/arrow_pad/keymaps/default/keymap.c | 2 -- keyboards/handwired/arrow_pad/keymaps/pad_21/keymap.c | 2 -- keyboards/handwired/arrow_pad/keymaps/pad_24/keymap.c | 2 -- keyboards/handwired/minorca/keymaps/default/keymap.c | 2 -- keyboards/handwired/minorca/keymaps/rgb/keymap.c | 2 -- keyboards/handwired/retro_refit/keymaps/default/keymap.c | 2 -- keyboards/kc60/keymaps/dbroqua/keymap.c | 2 -- keyboards/kc60/keymaps/dbroqua_hhkb/keymap.c | 2 -- keyboards/kc60/keymaps/default/keymap.c | 2 -- keyboards/kc60/keymaps/sgoodwin/keymap.c | 2 -- keyboards/kc60/keymaps/stanleylai/keymap.c | 2 -- keyboards/kc60/keymaps/ws2812/keymap.c | 2 -- keyboards/m10a/keymaps/default/keymap.c | 2 -- keyboards/planck/keymaps/ab/keymap.c | 2 -- keyboards/planck/keymaps/chance/keymap.c | 2 -- keyboards/planck/keymaps/dbroqua/keymap.c | 2 -- keyboards/planck/keymaps/experimental/keymap.c | 2 -- keyboards/planck/keymaps/handwired_binaryplease/keymap.c | 2 -- keyboards/planck/keymaps/impossible/keymap.c | 2 -- keyboards/planck/keymaps/jeebak/keymap.c | 2 -- keyboards/planck/keymaps/jhenahan/keymap.c | 2 -- keyboards/planck/keymaps/nico/keymap.c | 2 -- keyboards/planck/keymaps/originerd/keymap.c | 2 -- keyboards/planck/keymaps/pete/keymap.c | 2 -- keyboards/planck/keymaps/premek/keymap.c | 2 -- keyboards/planck/keymaps/tak3over/keymap.c | 2 -- keyboards/planck/keymaps/thermal_printer/keymap.c | 2 -- keyboards/planck/keymaps/vifon/keymap.c | 2 -- keyboards/planck/keymaps/xyverz/keymap.c | 2 -- keyboards/planck/keymaps/yale/keymap.c | 2 -- keyboards/planck/keymaps/yang/keymap.c | 2 -- keyboards/satan/keymaps/iso_split_rshift/keymap.c | 2 -- keyboards/sixkeyboard/keymaps/default/keymap.c | 2 -- keyboards/tv44/keymaps/tong92/keymap.c | 2 -- 36 files changed, 72 deletions(-) diff --git a/keyboards/eco/keymaps/default/keymap.c b/keyboards/eco/keymaps/default/keymap.c index fc8339caa5..6270d4260e 100644 --- a/keyboards/eco/keymaps/default/keymap.c +++ b/keyboards/eco/keymaps/default/keymap.c @@ -1,5 +1,3 @@ -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, -// this is the style you want to emulate. // Default ECO Layout // KLE here : http://www.keyboard-layout-editor.com/#/gists/0733eca6b4cb88ff9d7de746803f4039 diff --git a/keyboards/eco/keymaps/that_canadian/keymap.c b/keyboards/eco/keymaps/that_canadian/keymap.c index 5e3d9bdf58..be0004dbbe 100644 --- a/keyboards/eco/keymaps/that_canadian/keymap.c +++ b/keyboards/eco/keymaps/that_canadian/keymap.c @@ -1,5 +1,3 @@ -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, -// this is the style you want to emulate. // Below layout is based upon /u/That-Canadian's planck layout diff --git a/keyboards/handwired/arrow_pad/keymaps/default/keymap.c b/keyboards/handwired/arrow_pad/keymaps/default/keymap.c index 5647f75afe..03adf746dc 100644 --- a/keyboards/handwired/arrow_pad/keymaps/default/keymap.c +++ b/keyboards/handwired/arrow_pad/keymaps/default/keymap.c @@ -1,5 +1,3 @@ -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, -// this is the style you want to emulate. #include "arrow_pad.h" #include "led.h" diff --git a/keyboards/handwired/arrow_pad/keymaps/pad_21/keymap.c b/keyboards/handwired/arrow_pad/keymaps/pad_21/keymap.c index 28917a5d9e..d93ccb1ae4 100644 --- a/keyboards/handwired/arrow_pad/keymaps/pad_21/keymap.c +++ b/keyboards/handwired/arrow_pad/keymaps/pad_21/keymap.c @@ -1,5 +1,3 @@ -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, -// this is the style you want to emulate. #include "arrow_pad.h" #include "led.h" diff --git a/keyboards/handwired/arrow_pad/keymaps/pad_24/keymap.c b/keyboards/handwired/arrow_pad/keymaps/pad_24/keymap.c index 5647f75afe..03adf746dc 100644 --- a/keyboards/handwired/arrow_pad/keymaps/pad_24/keymap.c +++ b/keyboards/handwired/arrow_pad/keymaps/pad_24/keymap.c @@ -1,5 +1,3 @@ -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, -// this is the style you want to emulate. #include "arrow_pad.h" #include "led.h" diff --git a/keyboards/handwired/minorca/keymaps/default/keymap.c b/keyboards/handwired/minorca/keymaps/default/keymap.c index a55d578e44..3392f25ef8 100644 --- a/keyboards/handwired/minorca/keymaps/default/keymap.c +++ b/keyboards/handwired/minorca/keymaps/default/keymap.c @@ -1,5 +1,3 @@ -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, -// this is the style you want to emulate. #include "minorca.h" #include "action_layer.h" diff --git a/keyboards/handwired/minorca/keymaps/rgb/keymap.c b/keyboards/handwired/minorca/keymaps/rgb/keymap.c index 9002afbb88..e1ee49dce6 100644 --- a/keyboards/handwired/minorca/keymaps/rgb/keymap.c +++ b/keyboards/handwired/minorca/keymaps/rgb/keymap.c @@ -1,5 +1,3 @@ -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, -// this is the style you want to emulate. #include "minorca.h" #include "action_layer.h" diff --git a/keyboards/handwired/retro_refit/keymaps/default/keymap.c b/keyboards/handwired/retro_refit/keymaps/default/keymap.c index 405402d5e3..598541a05b 100644 --- a/keyboards/handwired/retro_refit/keymaps/default/keymap.c +++ b/keyboards/handwired/retro_refit/keymaps/default/keymap.c @@ -1,5 +1,3 @@ -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, -// this is the style you want to emulate. #include "retro_refit.h" diff --git a/keyboards/kc60/keymaps/dbroqua/keymap.c b/keyboards/kc60/keymaps/dbroqua/keymap.c index 8b5efd0cee..dc83fb7a01 100644 --- a/keyboards/kc60/keymaps/dbroqua/keymap.c +++ b/keyboards/kc60/keymaps/dbroqua/keymap.c @@ -1,5 +1,3 @@ -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, -// this is the style you want to emulate. #include "kc60.h" diff --git a/keyboards/kc60/keymaps/dbroqua_hhkb/keymap.c b/keyboards/kc60/keymaps/dbroqua_hhkb/keymap.c index 123c53a6de..119281492d 100644 --- a/keyboards/kc60/keymaps/dbroqua_hhkb/keymap.c +++ b/keyboards/kc60/keymaps/dbroqua_hhkb/keymap.c @@ -1,5 +1,3 @@ -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, -// this is the style you want to emulate. #include "kc60.h" diff --git a/keyboards/kc60/keymaps/default/keymap.c b/keyboards/kc60/keymaps/default/keymap.c index 293ff3ab46..a35cd99503 100644 --- a/keyboards/kc60/keymaps/default/keymap.c +++ b/keyboards/kc60/keymaps/default/keymap.c @@ -1,5 +1,3 @@ -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, -// this is the style you want to emulate. #include "kc60.h" diff --git a/keyboards/kc60/keymaps/sgoodwin/keymap.c b/keyboards/kc60/keymaps/sgoodwin/keymap.c index 3192b25142..101b9c9b77 100644 --- a/keyboards/kc60/keymaps/sgoodwin/keymap.c +++ b/keyboards/kc60/keymaps/sgoodwin/keymap.c @@ -1,5 +1,3 @@ -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, -// this is the style you want to emulate. #include "kc60.h" diff --git a/keyboards/kc60/keymaps/stanleylai/keymap.c b/keyboards/kc60/keymaps/stanleylai/keymap.c index 212fa88bd0..44a10848bd 100644 --- a/keyboards/kc60/keymaps/stanleylai/keymap.c +++ b/keyboards/kc60/keymaps/stanleylai/keymap.c @@ -1,5 +1,3 @@ -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, -// this is the style you want to emulate. #include "kc60.h" diff --git a/keyboards/kc60/keymaps/ws2812/keymap.c b/keyboards/kc60/keymaps/ws2812/keymap.c index ae11ebf91c..541d6cd67a 100644 --- a/keyboards/kc60/keymaps/ws2812/keymap.c +++ b/keyboards/kc60/keymaps/ws2812/keymap.c @@ -1,5 +1,3 @@ -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, -// this is the style you want to emulate. #include "kc60.h" diff --git a/keyboards/m10a/keymaps/default/keymap.c b/keyboards/m10a/keymaps/default/keymap.c index 97434a461d..bbf58302fc 100644 --- a/keyboards/m10a/keymaps/default/keymap.c +++ b/keyboards/m10a/keymaps/default/keymap.c @@ -1,5 +1,3 @@ -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, -// this is the style you want to emulate. #include "m10a.h" #include "action_layer.h" diff --git a/keyboards/planck/keymaps/ab/keymap.c b/keyboards/planck/keymaps/ab/keymap.c index 71512773b2..5b37ee0a82 100644 --- a/keyboards/planck/keymaps/ab/keymap.c +++ b/keyboards/planck/keymaps/ab/keymap.c @@ -1,5 +1,3 @@ -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, -// this is the style you want to emulate. #include "planck.h" #include "action_layer.h" diff --git a/keyboards/planck/keymaps/chance/keymap.c b/keyboards/planck/keymaps/chance/keymap.c index 6ef17b30a6..63b7f96483 100644 --- a/keyboards/planck/keymaps/chance/keymap.c +++ b/keyboards/planck/keymaps/chance/keymap.c @@ -1,5 +1,3 @@ -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, -// this is the style you want to emulate. #include "planck.h" #include "action_layer.h" diff --git a/keyboards/planck/keymaps/dbroqua/keymap.c b/keyboards/planck/keymaps/dbroqua/keymap.c index 97b8b94320..94460652f3 100644 --- a/keyboards/planck/keymaps/dbroqua/keymap.c +++ b/keyboards/planck/keymaps/dbroqua/keymap.c @@ -1,5 +1,3 @@ -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, -// this is the style you want to emulate. #include "planck.h" #include "action_layer.h" diff --git a/keyboards/planck/keymaps/experimental/keymap.c b/keyboards/planck/keymaps/experimental/keymap.c index 8a6e4fe260..272c09332d 100644 --- a/keyboards/planck/keymaps/experimental/keymap.c +++ b/keyboards/planck/keymaps/experimental/keymap.c @@ -1,5 +1,3 @@ -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, -// this is the style you want to emulate. #include "planck.h" #include "action_layer.h" diff --git a/keyboards/planck/keymaps/handwired_binaryplease/keymap.c b/keyboards/planck/keymaps/handwired_binaryplease/keymap.c index b570ccfcd6..73ccf62c0f 100644 --- a/keyboards/planck/keymaps/handwired_binaryplease/keymap.c +++ b/keyboards/planck/keymaps/handwired_binaryplease/keymap.c @@ -1,5 +1,3 @@ -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, -// this is the style you want to emulate. #include "planck.h" #include "action_layer.h" diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c index 86bf6409a5..0e6f37ed5a 100644 --- a/keyboards/planck/keymaps/impossible/keymap.c +++ b/keyboards/planck/keymaps/impossible/keymap.c @@ -1,5 +1,3 @@ -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, -// this is the style you want to emulate. #include "planck.h" #include "action_layer.h" diff --git a/keyboards/planck/keymaps/jeebak/keymap.c b/keyboards/planck/keymaps/jeebak/keymap.c index e7cf001136..2c6708d3a4 100644 --- a/keyboards/planck/keymaps/jeebak/keymap.c +++ b/keyboards/planck/keymaps/jeebak/keymap.c @@ -1,5 +1,3 @@ -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, -// this is the style you want to emulate. #include "planck.h" #include "action_layer.h" diff --git a/keyboards/planck/keymaps/jhenahan/keymap.c b/keyboards/planck/keymaps/jhenahan/keymap.c index ea63e9f274..a0d30b0a8e 100644 --- a/keyboards/planck/keymaps/jhenahan/keymap.c +++ b/keyboards/planck/keymaps/jhenahan/keymap.c @@ -1,5 +1,3 @@ -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, -// this is the style you want to emulate. #include "planck.h" #include "action_layer.h" diff --git a/keyboards/planck/keymaps/nico/keymap.c b/keyboards/planck/keymaps/nico/keymap.c index e81fd80a44..e7a5ba3036 100644 --- a/keyboards/planck/keymaps/nico/keymap.c +++ b/keyboards/planck/keymaps/nico/keymap.c @@ -1,5 +1,3 @@ -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, -// this is the style you want to emulate. #include "planck.h" #include "backlight.h" diff --git a/keyboards/planck/keymaps/originerd/keymap.c b/keyboards/planck/keymaps/originerd/keymap.c index 2cecf01050..b72f2d3e1d 100644 --- a/keyboards/planck/keymaps/originerd/keymap.c +++ b/keyboards/planck/keymaps/originerd/keymap.c @@ -1,5 +1,3 @@ -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, -// this is the style you want to emulate. #include "planck.h" #include "action_layer.h" diff --git a/keyboards/planck/keymaps/pete/keymap.c b/keyboards/planck/keymaps/pete/keymap.c index 05c2518273..07970158b7 100644 --- a/keyboards/planck/keymaps/pete/keymap.c +++ b/keyboards/planck/keymaps/pete/keymap.c @@ -1,5 +1,3 @@ -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, -// this is the style you want to emulate. #include "planck.h" #include "action_layer.h" diff --git a/keyboards/planck/keymaps/premek/keymap.c b/keyboards/planck/keymaps/premek/keymap.c index 41cfbaf806..2ceadda5ed 100644 --- a/keyboards/planck/keymaps/premek/keymap.c +++ b/keyboards/planck/keymaps/premek/keymap.c @@ -1,5 +1,3 @@ -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, -// this is the style you want to emulate. #include "planck.h" #include "action_layer.h" diff --git a/keyboards/planck/keymaps/tak3over/keymap.c b/keyboards/planck/keymaps/tak3over/keymap.c index 7d8243dfac..c47224a3ef 100644 --- a/keyboards/planck/keymaps/tak3over/keymap.c +++ b/keyboards/planck/keymaps/tak3over/keymap.c @@ -1,5 +1,3 @@ -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, -// this is the style you want to emulate. // //Dropped the Dvorak layer and added two my layer buttons. Both Raise and lower can be accessed from either side now. diff --git a/keyboards/planck/keymaps/thermal_printer/keymap.c b/keyboards/planck/keymaps/thermal_printer/keymap.c index 05a783722e..1a1119bf35 100644 --- a/keyboards/planck/keymaps/thermal_printer/keymap.c +++ b/keyboards/planck/keymaps/thermal_printer/keymap.c @@ -1,5 +1,3 @@ -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, -// this is the style you want to emulate. #include "planck.h" #include "action_layer.h" diff --git a/keyboards/planck/keymaps/vifon/keymap.c b/keyboards/planck/keymaps/vifon/keymap.c index ecd5c2cc44..2563548f64 100644 --- a/keyboards/planck/keymaps/vifon/keymap.c +++ b/keyboards/planck/keymaps/vifon/keymap.c @@ -1,5 +1,3 @@ -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, -// this is the style you want to emulate. #include "planck.h" #ifdef BACKLIGHT_ENABLE diff --git a/keyboards/planck/keymaps/xyverz/keymap.c b/keyboards/planck/keymaps/xyverz/keymap.c index ae1628d6c3..5ce52f36d8 100644 --- a/keyboards/planck/keymaps/xyverz/keymap.c +++ b/keyboards/planck/keymaps/xyverz/keymap.c @@ -1,5 +1,3 @@ -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, -// this is the style you want to emulate. #include "planck.h" #include "action_layer.h" diff --git a/keyboards/planck/keymaps/yale/keymap.c b/keyboards/planck/keymaps/yale/keymap.c index f2280778a3..edbe654306 100644 --- a/keyboards/planck/keymaps/yale/keymap.c +++ b/keyboards/planck/keymaps/yale/keymap.c @@ -1,5 +1,3 @@ -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, -// this is the style you want to emulate. // #include "planck.h" diff --git a/keyboards/planck/keymaps/yang/keymap.c b/keyboards/planck/keymaps/yang/keymap.c index 0ce849050b..df291b453f 100644 --- a/keyboards/planck/keymaps/yang/keymap.c +++ b/keyboards/planck/keymaps/yang/keymap.c @@ -1,5 +1,3 @@ -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, -// this is the style you want to emulate. #include "planck.h" #ifdef BACKLIGHT_ENABLE diff --git a/keyboards/satan/keymaps/iso_split_rshift/keymap.c b/keyboards/satan/keymaps/iso_split_rshift/keymap.c index cf938e07d5..2bedb7c0a2 100644 --- a/keyboards/satan/keymaps/iso_split_rshift/keymap.c +++ b/keyboards/satan/keymaps/iso_split_rshift/keymap.c @@ -1,5 +1,3 @@ -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, -// this is the style you want to emulate. #include "satan.h" // TODO: replace your ugly german brckets with #defines diff --git a/keyboards/sixkeyboard/keymaps/default/keymap.c b/keyboards/sixkeyboard/keymaps/default/keymap.c index 74ce6f0369..f5b10bb488 100644 --- a/keyboards/sixkeyboard/keymaps/default/keymap.c +++ b/keyboards/sixkeyboard/keymaps/default/keymap.c @@ -1,5 +1,3 @@ -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, -// this is the style you want to emulate. #include "sixkeyboard.h" #include "matrix.h" diff --git a/keyboards/tv44/keymaps/tong92/keymap.c b/keyboards/tv44/keymaps/tong92/keymap.c index aba007c4d0..315c864cd4 100644 --- a/keyboards/tv44/keymaps/tong92/keymap.c +++ b/keyboards/tv44/keymaps/tong92/keymap.c @@ -1,5 +1,3 @@ -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, -// this is the style you want to emulate. //Author: tong92 #include "tv44.h" From 32f18cf6164e5e23cef414b441f2f1ccd19a39db Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Sun, 15 Oct 2017 16:44:31 -0400 Subject: [PATCH 07/52] fix up default keymaps and remove keyboard folder filter --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 87a3f4993c..73112bd0b4 100644 --- a/Makefile +++ b/Makefile @@ -304,7 +304,7 @@ define PARSE_KEYBOARD KEYMAPS += $$(notdir $$(patsubst %/.,%,$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_3)/keymaps/*/.))) KEYMAPS += $$(notdir $$(patsubst %/.,%,$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_4)/keymaps/*/.))) KEYMAPS += $$(notdir $$(patsubst %/.,%,$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_5)/keymaps/*/.))) - KEYMAPS := $$(sort $$(filter-out $$(KEYBOARD_FOLDER_1) $$(KEYBOARD_FOLDER_2) \ + #KEYMAPS := $$(sort $$(filter-out $$(KEYBOARD_FOLDER_1) $$(KEYBOARD_FOLDER_2) \ $$(KEYBOARD_FOLDER_3) $$(KEYBOARD_FOLDER_4) $$(KEYBOARD_FOLDER_5), $$(KEYMAPS))) KEYBOARD_LAYOUTS := From 7f2882832e48509718c888d6f2da7294d0d81db0 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Sun, 15 Oct 2017 16:52:51 -0400 Subject: [PATCH 08/52] adds default keymap for handwired boards --- .../promethium/keymaps/default/README.md | 44 + .../promethium/keymaps/default/config.h | 29 + .../promethium/keymaps/default/flash.sh | 4 + .../promethium/keymaps/default/keymap.c | 1368 +++++++++++++++++ .../promethium/keymaps/default/rgbtheme.h | 1 + .../keymaps/default/rgbtheme_carbon.h | 36 + .../keymaps/default/rgbtheme_default.h | 36 + .../promethium/keymaps/default/rules.mk | 26 + 8 files changed, 1544 insertions(+) create mode 100644 keyboards/handwired/promethium/keymaps/default/README.md create mode 100644 keyboards/handwired/promethium/keymaps/default/config.h create mode 100644 keyboards/handwired/promethium/keymaps/default/flash.sh create mode 100644 keyboards/handwired/promethium/keymaps/default/keymap.c create mode 100644 keyboards/handwired/promethium/keymaps/default/rgbtheme.h create mode 100644 keyboards/handwired/promethium/keymaps/default/rgbtheme_carbon.h create mode 100644 keyboards/handwired/promethium/keymaps/default/rgbtheme_default.h create mode 100644 keyboards/handwired/promethium/keymaps/default/rules.mk diff --git a/keyboards/handwired/promethium/keymaps/default/README.md b/keyboards/handwired/promethium/keymaps/default/README.md new file mode 100644 index 0000000000..48824b9f73 --- /dev/null +++ b/keyboards/handwired/promethium/keymaps/default/README.md @@ -0,0 +1,44 @@ +Priyadi Keymap for Planck-like Keyboards +======================================== + +Main layer modifications from default Planck layout: + +* Enter moved to quotes position +* Quotes moved to semicolon position. +* QWERTZ style colon & semicolon. shift-. = : shift-, = ; This is done in hardware, no layout switching needed in software. +* < & > occupied precious real estate, and so they are moved down to punctuation layer. +* Right-shift on Enter position. +* Removed arrow keys, they are on another layer now. +* Put Ctrl-Alt-Super and Super-AltGr-Ctrl in left & right corners. +* Lower & Raise is now called Num and Fun. +* OS & Left keys become another thumb modifier: Empty & Greek (Empty because I used this for another use and my muscle memory is not adapted to it yet) + +On Promethium, Trackpoint is enabled on PD2 and PD3. We impersonate a Thinkpad keyboard to be able to use Thinkpad driver on Windows (still needs verification). + +AltGr & Compose dual use key. Tap for Compose (mapped to Scroll Lock in hardware) and press for AltGr. + +Supported layouts: QWERTY, DVORAK, Colemak, Workman, Norman. Switchable from SYS layer. In DVORAK, semicolon is replaced by /? key. + +Num activates NUM layer: hexkeypad on the right side and most punctuation on the left side. Hexkeypad is optimized for C-style hex, IPv6, HTML RGB triplets, etc. + +Fun activates FUN layer: arrow cluster on right home row, F-numbers on left side. + +Pressing Num+Fun activates PUNC layer: same punctuations as NUM layer on the left side, parens on the right side. + +Greek activates either GREEKU or GREEKL layer, depending whether shift is pressed or not. Shift state changes are also taken into account when the layer is active. + +Greek+Empty activates EMOJI layer. The whole keyboard now outputs emojis! + +Pressing both spacebars (spacekeys, actually) activates GUI layer. QWERTYUIOP switches to a virtual desktop. J & L switches virtual desktop to the left or right. S & F behaves like Alt-Tab and Alt-Shift-Tab. This works by sending Alt press when entering the layer, and Alt release when other than S or F keys are pressed. + +Pressing both Ctrls activates SYS layer for configuring the keyboard. + +On Promethium, USB or Bluetooth output is detected on startup. If USB is connected, then USB is used initially. SYS-U and SYS-B switch output to USB or Bluetooth at runtime. Current active output is indicated with LEDs. + +SYS-W, SYS-L, SYS-M switch Unicode input method. SYS-Q, SYS-D, SYS-C, SYS-K, SYS-N switch to QWERTY, DVORAK, Colemak, Workman and Norman, respectively. + +SYS-A (mnemonic: audio) toggles faux clicky: use buzzer to emit clicks on key presses and releases. + +On Promethium there are 16 indicator LEDs, and under switch LEDs on each switches, including Trackpoint buttons. Totaling 67 LEDs. Output is limited to 0xF for each LEDs to conserve power. SYS-G (mnemonic: glow) toggles various backlighting modes. + +On Promethium, there's a LED to indicate battery level. Hue indicates level: green is full, red is empty. \ No newline at end of file diff --git a/keyboards/handwired/promethium/keymaps/default/config.h b/keyboards/handwired/promethium/keymaps/default/config.h new file mode 100644 index 0000000000..fa86e22479 --- /dev/null +++ b/keyboards/handwired/promethium/keymaps/default/config.h @@ -0,0 +1,29 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#define PRIYADI_PROMETHIUM + +/* bootmagic salt key */ +#define BOOTMAGIC_KEY_SALT KC_ESC + +/* skip bootmagic and eeconfig */ +#define BOOTMAGIC_KEY_SKIP KC_SPACE + +#define PREVENT_STUCK_MODIFIERS + +#define RGBSPS_ENABLE +#define RGBSPS_DEMO_ENABLE + +#define UNICODE_TYPE_DELAY 0 + +#define LAYOUT_DVORAK +#define LAYOUT_COLEMAK +#define LAYOUT_NORMAN +#define LAYOUT_WORKMAN + +#define DOUBLESPACE_LAYER_ENABLE +// #define TOLELOT_ENABLE + +#endif diff --git a/keyboards/handwired/promethium/keymaps/default/flash.sh b/keyboards/handwired/promethium/keymaps/default/flash.sh new file mode 100644 index 0000000000..14a3b43789 --- /dev/null +++ b/keyboards/handwired/promethium/keymaps/default/flash.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +sleep 10 +avrdude -p m32u4 -P /dev/ttyACM0 -c avr109 -U flash:w:../../../../../.build/handwired_promethium_priyadi.hex diff --git a/keyboards/handwired/promethium/keymaps/default/keymap.c b/keyboards/handwired/promethium/keymaps/default/keymap.c new file mode 100644 index 0000000000..e229b67e54 --- /dev/null +++ b/keyboards/handwired/promethium/keymaps/default/keymap.c @@ -0,0 +1,1368 @@ +/* +Copyright 2017 Priyadi Iman Nurcahyo + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#if defined(PRIYADI_PROMETHIUM) + #include "promethium.h" +#elif defined(PRIYADI_PLANCK) + #include "planck.h" +#else + #error "no keyboard defined" +#endif + +#include "action_layer.h" +#ifdef AUDIO_ENABLE + #include "audio.h" + #include "musical_notes.h" +#endif +#include "eeconfig.h" +#include "process_unicode.h" +#include "quantum.h" +#ifdef RGBSPS_ENABLE +#include "rgbsps.h" +#include "rgbtheme.h" +#endif +#ifdef PS2_MOUSE_ENABLE +#include "ps2_mouse.h" +#include "ps2.h" +#endif +#ifdef FAUXCLICKY_ENABLE +#include "fauxclicky.h" +#ifdef RGBSPS_ENABLE +#undef FAUXCLICKY_OFF +#define FAUXCLICKY_OFF do { \ + fauxclicky_enabled = false; \ + rgbsps_set(LED_AUDIO, COLOR_BLANK); \ + fauxclicky_stop(); \ +} while (0) +#undef FAUXCLICKY_ON +#define FAUXCLICKY_ON do { \ + fauxclicky_enabled = true; \ + rgbsps_set(LED_AUDIO, THEME_COLOR_AUDIO); \ +} while (0) +#endif +#endif +#include "outputselect.h" +#include "led.h" +#define COUNT(x) (sizeof (x) / sizeof (*(x))) + +// Fillers to make layering clearer +#define _______ KC_TRNS +#define XXXXXXX KC_NO +#define G(x) LGUI(x) +#define KC_WWWB KC_WWW_BACK +#define KC_WWWF KC_WWW_FORWARD + +// hybrid right-alt & scroll lock (mapped to Compose in OS) +#define C_RALT MT(MOD_RALT, KC_SLCK) + +// dual use right-shift & del key +// #define C_RSFT MT(MOD_RSFT, KC_DEL) + +bool capslock = false; +#ifdef DOUBLESPACE_LAYER_ENABLE +bool lspace_active = false; +bool rspace_active = false; +bool lspace_emitted = false; +bool rspace_emitted = false; +bool space_layer_entered = false; +#endif + +// glow +enum glow_modes { + GLOW_NONE, + GLOW_MIN, + GLOW_FULL +}; +uint8_t glow_mode = GLOW_MIN; + +void turn_off_capslock(void); +extern keymap_config_t keymap_config; + +// layers, ordering is important! +enum layers { + _QWERTY, + _DVORAK, + _COLEMAK, + _WORKMAN, + _NORMAN, + _DEFAULT_LAYER_MAX = _NORMAN, + + _GREEKU, + _GREEKL, + + _NUM, + _FUN, + _PUNC, + + _EMPTY, + _EMOJI, + _GUI, + _SYS +}; + +// double-space layer +#define _SPACE _GUI + +enum planck_keycodes { + // layouts + QWERTY = SAFE_RANGE, + DVORAK, + COLEMAK, + WORKMAN, + NORMAN, + + // layer switchers + EMOJI, + GUI, + GREEK, + + // os switchers + LINUX, + WIN, + OSX, + + // others + LSPACE, + RSPACE, + GLOW, + + // stub +#ifndef FAUXCLICKY_ENABLE + FC_TOG, +#endif +#ifndef MODULE_ADAFRUIT_BLE + OUT_BT, +#endif + RGBDEMO, + KEYCODE_END +}; + +#define EMPTY MO(_EMPTY) +#define NUM MO(_NUM) +#define FUN MO(_FUN) +#define FUN0 LT(_FUN, KC_0) + +// unicode map + +enum unicode_name { + GRIN, // grinning face 😊 + TJOY, // tears of joy 😂 + SMILE, // grining face with smiling eyes 😁 + HEART, // heart ❤ + EYERT, // smiling face with heart shaped eyes 😍 + CRY, // crying face 😭 + SMEYE, // smiling face with smiling eyes 😊 + UNAMU, // unamused 😒 + KISS, // kiss 😘 + HART2, // two hearts 💕 + WEARY, // weary 😩 + OKHND, // ok hand sign 👌 + PENSV, // pensive 😔 + SMIRK, // smirk 😏 + RECYC, // recycle ♻ + WINK, // wink 😉 + THMUP, // thumb up 👍 + THMDN, // thumb down 👎 + PRAY, // pray 🙏 + PHEW, // relieved 😌 + MUSIC, // musical notes + FLUSH, // flushed 😳 + CELEB, // celebration 🙌 + CRY2, // crying face 😢 + COOL, // smile with sunglasses 😎 + NOEVS, // see no evil + NOEVH, // hear no evil + NOEVK, // speak no evil + POO, // pile of poo + EYES, // eyes + VIC, // victory hand + BHART, // broken heart + SLEEP, // sleeping face + SMIL2, // smiling face with open mouth & sweat + HUNRD, // 100 + CONFU, // confused + TONGU, // face with tongue & winking eye + DISAP, // disappointed + YUMMY, // face savoring delicious food + CLAP, // hand clapping + FEAR, // face screaming in fear + HORNS, // smiling face with horns + HALO, // smiling face with halo + BYE, // waving hand + SUN, // sun + MOON, // moon + SKULL, // skull + + // greek letters + UALPH, + UBETA, + UGAMM, + UDELT, + UEPSI, + UZETA, + UETA, + UTHET, + UIOTA, + UKAPP, + ULAMB, + UMU, + UNU, + UXI, + UOMIC, + UPI, + URHO, + USIGM, + UTAU, + UUPSI, + UPHI, + UCHI, + UPSI, + UOMEG, + + LALPH, + LBETA, + LGAMM, + LDELT, + LEPSI, + LZETA, + LETA, + LTHET, + LIOTA, + LKAPP, + LLAMB, + LMU, + LNU, + LXI, + LOMIC, + LPI, + LRHO, + LSIGM, + LTAU, + LUPSI, + LPHI, + LCHI, + LPSI, + LOMEG, + + FSIGM, + + LTEQ, + GTEQ, + NOTEQ, + PLMIN, +}; + +const uint32_t PROGMEM unicode_map[] = { + [GRIN] = 0x1F600, + [TJOY] = 0x1F602, + [SMILE] = 0x1F601, + [HEART] = 0x2764, + [EYERT] = 0x1f60d, + [CRY] = 0x1f62d, + [SMEYE] = 0x1F60A, + [UNAMU] = 0x1F612, + [KISS] = 0x1F618, + [HART2] = 0x1F495, + [WEARY] = 0x1F629, + [OKHND] = 0x1F44C, + [PENSV] = 0x1F614, + [SMIRK] = 0x1F60F, + [RECYC] = 0x267B, + [WINK] = 0x1F609, + [THMUP] = 0x1F44D, + [THMDN] = 0x1F44E, + [PRAY] = 0x1F64F, + [PHEW] = 0x1F60C, + [MUSIC] = 0x1F3B6, + [FLUSH] = 0x1F633, + [CELEB] = 0x1F64C, + [CRY2] = 0x1F622, + [COOL] = 0x1F60E, + [NOEVS] = 0x1F648, + [NOEVH] = 0x1F649, + [NOEVK] = 0x1F64A, + [POO] = 0x1F4A9, + [EYES] = 0x1F440, + [VIC] = 0x270C, + [BHART] = 0x1F494, + [SLEEP] = 0x1F634, + [SMIL2] = 0x1F605, + [HUNRD] = 0x1F4AF, + [CONFU] = 0x1F615, + [TONGU] = 0x1F61C, + [DISAP] = 0x1F61E, + [YUMMY] = 0x1F60B, + [CLAP] = 0x1F44F, + [FEAR] = 0x1F631, + [HORNS] = 0x1F608, + [HALO] = 0x1F607, + [BYE] = 0x1F44B, + [SUN] = 0x2600, + [MOON] = 0x1F314, + [SKULL] = 0x1F480, + + // greek letters + [UALPH] = 0x0391, + [UBETA] = 0x0392, + [UGAMM] = 0x0393, + [UDELT] = 0x0394, + [UEPSI] = 0x0395, + [UZETA] = 0x0396, + [UETA] = 0x0397, + [UTHET] = 0x0398, + [UIOTA] = 0x0399, + [UKAPP] = 0x039A, + [ULAMB] = 0x039B, + [UMU] = 0x039C, + [UNU] = 0x039D, + [UXI] = 0x039E, + [UOMIC] = 0x039F, + [UPI] = 0x03A0, + [URHO] = 0x03A1, + [USIGM] = 0x03A3, + [UTAU] = 0x03A4, + [UUPSI] = 0x03A5, + [UPHI] = 0x03A6, + [UCHI] = 0x03A7, + [UPSI] = 0x03A8, + [UOMEG] = 0x03A9, + [LALPH] = 0x03B1, + [LBETA] = 0x03B2, + [LGAMM] = 0x03B3, + [LDELT] = 0x03B4, + [LEPSI] = 0x03B5, + [LZETA] = 0x03B6, + [LETA] = 0x03B7, + [LTHET] = 0x03B8, + [LIOTA] = 0x03B9, + [LKAPP] = 0x03BA, + [LLAMB] = 0x03BB, + [LMU] = 0x03BC, + [LNU] = 0x03BD, + [LXI] = 0x03BE, + [LOMIC] = 0x03BF, + [LPI] = 0x03C0, + [LRHO] = 0x03C1, + [LSIGM] = 0x03C3, + [LTAU] = 0x03C4, + [LUPSI] = 0x03C5, + [LPHI] = 0x03C6, + [LCHI] = 0x03C7, + [LPSI] = 0x03C8, + [LOMEG] = 0x03C9, + [FSIGM] = 0x03C2, + + // other + [LTEQ] = 0x2264, // less than or equal + [GTEQ] = 0x2265, // greater than or equal + [NOTEQ] = 0x2260, // not equal + [PLMIN] = 0xB1, // plus minus +}; + +// RGBSPS + +#ifdef RGBSPS_ENABLE +const uint8_t PROGMEM LED_ALNUM[] = { + LED_Z, + LED_A, + LED_Q, + LED_W, + LED_S, + LED_X, + LED_C, + LED_D, + LED_E, + LED_R, + LED_F, + LED_V, + LED_B, + LED_G, + LED_T, + LED_N, + LED_HH, + LED_Y, + LED_U, + LED_J, + LED_M, + LED_COMM, + LED_K, + LED_I, + LED_O, + LED_L, + LED_DOT, + LED_SLSH, + LED_SCLN, + LED_P, + LED_LSPC, + LED_RSPC +}; + +const uint8_t PROGMEM LED_HOMING[] = { + LED_A, + LED_S, + LED_D, + LED_F, + LED_J, + LED_K, + LED_L, + LED_SCLN +}; + +const uint8_t PROGMEM LED_MODS[] = { + LED_TAB, + LED_ESC, + LED_LSFT, + LED_LCTL, + LED_LGUI, + LED_LALT, + LED_RALT, + LED_RGUI, + LED_BKSP, + LED_ENT, + LED_RSFT, + LED_RCTL +}; + +const uint8_t PROGMEM LED_FN[] = { + LED_EMPTY, + LED_NUM, + LED_FUN, + LED_GREEK +}; + +const uint8_t PROGMEM LED_INDICATORS[] = { + LED_IND_LINUX, + LED_IND_APPLE, + LED_IND_WINDOWS, + LED_IND_QWERTY, + LED_IND_ALT, + LED_IND_AUDIO, + LED_IND_BLUETOOTH, + LED_IND_USB, + + LED_IND_BATTERY, + LED_IND_CAPSLOCK, + LED_IND_GUI, + LED_IND_FUN, + LED_IND_NUM, + LED_IND_PUNC, + LED_IND_EMOJI, + LED_IND_GREEK, +}; + +const uint8_t PROGMEM LED_TRACKPOINT[] = { + LED_TRACKPOINT1, + LED_TRACKPOINT2, + LED_TRACKPOINT3, +}; + +void led_turnoff_keys(void) { + for(uint8_t i = 0; i < COUNT(LED_ALNUM); i++) { + rgbsps_set(pgm_read_byte(&LED_ALNUM[i]), COLOR_BLACK); + } + for(uint8_t i = 0; i < COUNT(LED_MODS); i++) { + rgbsps_set(pgm_read_byte(&LED_MODS[i]), COLOR_BLACK); + } + for(uint8_t i = 0; i < COUNT(LED_FN); i++) { + rgbsps_set(pgm_read_byte(&LED_FN[i]), COLOR_BLACK); + } +} + +#ifdef RGBSPS_DEMO_ENABLE +void led_demo(void) { + rgbsps_set(LED_IND_LINUX, THEME_COLOR_LINUX); + rgbsps_set(LED_IND_APPLE, THEME_COLOR_APPLE); + rgbsps_set(LED_IND_WINDOWS, THEME_COLOR_WINDOWS); + rgbsps_set(LED_IND_QWERTY, THEME_COLOR_QWERTY); + rgbsps_set(LED_IND_ALT, THEME_COLOR_ALT); + rgbsps_set(LED_IND_AUDIO, THEME_COLOR_AUDIO); + rgbsps_set(LED_IND_BLUETOOTH, THEME_COLOR_BLUETOOTH); + rgbsps_set(LED_IND_USB, THEME_COLOR_USB); + rgbsps_set(LED_IND_CAPSLOCK, THEME_COLOR_CAPSLOCK); + rgbsps_set(LED_IND_GUI, THEME_COLOR_GUI); + rgbsps_set(LED_IND_FUN, THEME_COLOR_FUN); + rgbsps_set(LED_IND_NUM, THEME_COLOR_NUM); + rgbsps_set(LED_IND_PUNC, THEME_COLOR_PUNC); + rgbsps_set(LED_IND_GREEK, THEME_COLOR_GREEK); + rgbsps_set(LED_IND_EMOJI, THEME_COLOR_EMOJI); + rgbsps_send(); +} +#endif + +void led_reset(void) { + switch (glow_mode) { + case GLOW_NONE: + led_turnoff_keys(); + break; + case GLOW_MIN: + led_turnoff_keys(); + for(uint8_t i = 0; i < COUNT(LED_HOMING); i++) { + rgbsps_set(pgm_read_byte(&LED_HOMING[i]), THEME_COLOR_GLOW1_HOME); + } + rgbsps_set(LED_F, THEME_COLOR_GLOW1_HOMING); + rgbsps_set(LED_J, THEME_COLOR_GLOW1_HOMING); + break; + case GLOW_FULL: + for(uint8_t i = 0; i < COUNT(LED_ALNUM); i++) { + rgbsps_set(pgm_read_byte(&LED_ALNUM[i]), THEME_COLOR_GLOW2_ALPHA); + } + for(uint8_t i = 0; i < COUNT(LED_MODS); i++) { + rgbsps_set(pgm_read_byte(&LED_MODS[i]), THEME_COLOR_GLOW2_MODS); + } + for(uint8_t i = 0; i < COUNT(LED_FN); i++) { + rgbsps_set(pgm_read_byte(&LED_FN[i]), THEME_COLOR_GLOW2_FN); + } + for(uint8_t i = 0; i < COUNT(LED_HOMING); i++) { + rgbsps_set(pgm_read_byte(&LED_HOMING[i]), THEME_COLOR_GLOW2_HOME); + } + rgbsps_set(LED_F, THEME_COLOR_GLOW2_HOMING); + rgbsps_set(LED_J, THEME_COLOR_GLOW2_HOMING); + break; + } +} + +void led_set_default_layer_indicator(void) { + uint8_t default_layer = biton32(default_layer_state); + if (default_layer == _QWERTY) { + rgbsps_set(LED_IND_QWERTY, THEME_COLOR_QWERTY); + rgbsps_set(LED_IND_ALT, COLOR_BLANK); + } else { + rgbsps_set(LED_IND_QWERTY, COLOR_BLANK); + rgbsps_set(LED_IND_ALT, THEME_COLOR_ALT); + } + rgbsps_send(); + return; +} + +void led_set_layer_indicator(void) { + static uint8_t oldlayer = 255; + + led_reset(); + + rgbsps_set(LED_IND_GUI, COLOR_BLANK); + rgbsps_set(LED_IND_FUN, COLOR_BLANK); + rgbsps_set(LED_IND_NUM, COLOR_BLANK); + rgbsps_set(LED_IND_PUNC, COLOR_BLANK); + rgbsps_set(LED_IND_GREEK, COLOR_BLANK); + rgbsps_set(LED_IND_EMOJI, COLOR_BLANK); + + uint8_t layer = biton32(layer_state); + if (oldlayer == layer) { + return; + } + + oldlayer = layer; + + if (layer <= _DEFAULT_LAYER_MAX) { + rgbsps_send(); + return; + } + + switch(layer) { + case _GUI: + rgbsps_set(LED_IND_GUI, THEME_COLOR_GUI); + break; + case _FUN: + rgbsps_set(LED_IND_FUN, THEME_COLOR_FUN); + break; + case _NUM: + rgbsps_set(LED_IND_NUM, THEME_COLOR_NUM); + break; + case _PUNC: + rgbsps_set(LED_IND_PUNC, THEME_COLOR_PUNC); + break; + case _GREEKL: + case _GREEKU: + rgbsps_set(LED_IND_GREEK, THEME_COLOR_GREEK); + break; + case _EMOJI: + rgbsps_set(LED_IND_EMOJI, THEME_COLOR_EMOJI); + break; + default: + rgbsps_set(LED_IND_GUI, THEME_COLOR_OTHERLAYER); + rgbsps_set(LED_IND_FUN, THEME_COLOR_OTHERLAYER); + rgbsps_set(LED_IND_NUM, THEME_COLOR_OTHERLAYER); + rgbsps_set(LED_IND_PUNC, THEME_COLOR_OTHERLAYER); + rgbsps_set(LED_IND_GREEK, THEME_COLOR_OTHERLAYER); + rgbsps_set(LED_IND_EMOJI, THEME_COLOR_OTHERLAYER); + } + + rgbsps_send(); +} + +void led_set_unicode_input_mode(void) { + rgbsps_set(LED_IND_LINUX, COLOR_BLANK); + rgbsps_set(LED_IND_APPLE, COLOR_BLANK); + rgbsps_set(LED_IND_WINDOWS, COLOR_BLANK); + + switch (get_unicode_input_mode()) { + case UC_LNX: + rgbsps_set(LED_IND_LINUX, THEME_COLOR_LINUX); + break; + case UC_OSX: + rgbsps_set(LED_IND_APPLE, THEME_COLOR_APPLE); + break; + case UC_WIN: + case UC_WINC: + rgbsps_set(LED_IND_WINDOWS, THEME_COLOR_WINDOWS); + break; + } + rgbsps_send(); +} + +void led_set_output_ble(void) { + rgbsps_set(LED_IND_BLUETOOTH, THEME_COLOR_BLUETOOTH); + rgbsps_set(LED_IND_USB, COLOR_BLANK); + rgbsps_send(); +} + +void led_set_output_usb(void) { + rgbsps_set(LED_IND_BLUETOOTH, COLOR_BLANK); + rgbsps_set(LED_IND_USB, THEME_COLOR_USB); + rgbsps_send(); +} + +void led_set_output_none(void) { + rgbsps_set(LED_IND_BLUETOOTH, COLOR_BLANK); + rgbsps_set(LED_IND_USB, COLOR_BLANK); + rgbsps_send(); +} + +void led_init(void) { + // turn off all + rgbsps_turnoff(); + + // set trackpoint color + rgbsps_set(LED_TRACKPOINT1, THEME_COLOR_TP1); + rgbsps_set(LED_TRACKPOINT2, THEME_COLOR_TP2); + rgbsps_set(LED_TRACKPOINT3, THEME_COLOR_TP3); + + // unicode input mode + led_set_unicode_input_mode(); + + // layer indicator + led_set_layer_indicator(); + led_set_default_layer_indicator(); + + // clicky +#ifdef FAUXCLICKY_ENABLE + if (fauxclicky_enabled) { + rgbsps_set(LED_IND_AUDIO, THEME_COLOR_AUDIO); + } else { + rgbsps_set(LED_IND_AUDIO, COLOR_BLANK); + } +#endif + + rgbsps_send(); +} + + +#endif // RGBSPS_ENABLE + +// keymaps + +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 | ' |Enter | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Shift | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Alt | GUI | Punc | Num | Space | Fun |Greek | GUI |AltGr | Ctrl | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = KEYMAP_CUSTOM( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT , + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LALT, KC_LGUI, EMPTY, NUM, LSPACE, RSPACE, FUN, GREEK, KC_RGUI, C_RALT, KC_RCTL, + _______, _______, _______ +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | ' | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S |Enter | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| / | Q | J | K | X | B | M | W | V | Z |Shift | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Alt | GUI | Punc | Num | Space | Func |Greek | GUI |AltGr | Ctrl | + * `-----------------------------------------------------------------------------------' + */ +#ifdef LAYOUT_DVORAK +[_DVORAK] = KEYMAP_CUSTOM( + _______, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, _______, + _______, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, _______, + _______, KC_SLSH, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______ +), +#endif + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O |Enter | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Shift | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Alt | GUI | Punc | Num | Space | Func |Greek | GUI |AltGr | Ctrl | + * `-----------------------------------------------------------------------------------' + */ + +#ifdef LAYOUT_COLEMAK +[_COLEMAK] = KEYMAP_CUSTOM( + _______, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, _______, + _______, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, _______, + _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______ +), +#endif + +/* Norman + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | D | F | K | J | U | R | L | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | E | T | G | Y | N | I | O | H |Enter | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | P | M | , | . | / |Shift | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Alt | GUI | Punc | Num | Space | Func |Greek | GUI |AltGr | Ctrl | + * `-----------------------------------------------------------------------------------' + */ + +#ifdef LAYOUT_NORMAN +[_NORMAN] = KEYMAP_CUSTOM( + _______, KC_Q, KC_W, KC_D, KC_F, KC_K, KC_J, KC_U, KC_R, KC_L, KC_QUOT, _______, + _______, KC_A, KC_S, KC_E, KC_T, KC_G, KC_Y, KC_N, KC_I, KC_O, KC_H, _______, + _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_P, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______ +), +#endif + +/* Workman + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | D | R | W | B | J | F | U | P | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | H | T | G | Y | N | E | O | I |Enter | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | M | C | V | K | K | , | . | / |Shift | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Alt | GUI | Punc | Num | Space | Func |Greek | GUI |AltGr | Ctrl | + * `-----------------------------------------------------------------------------------' + */ + +#ifdef LAYOUT_WORKMAN +[_WORKMAN] = KEYMAP_CUSTOM( + _______, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_QUOT, _______, + _______, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, _______, + _______, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______ +), +#endif + +/* Punc + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ≤ | ≥ | ` | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | * | \ | - | = | / | ≠ | ( | ) | < | > | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | & | ^ | | | _ | + | ? | ± | [ | ] | { | } | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | : | | + * `-----------------------------------------------------------------------------------' + */ +[_PUNC] = KEYMAP_CUSTOM( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, X(LTEQ), X(GTEQ), _______, + KC_GRV, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, X(NOTEQ),KC_LPRN, KC_RPRN, KC_LABK, KC_RABK, _______, + KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, X(PLMIN),KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_COLN, _______, + _______, _______, _______ +), + +/* Num + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | A | 7 | 8 | 9 | D | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ` | * | \ | - | = | / | B | 4 | 5 | 6 | E | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | & | ^ | | | _ | + | ? | C | 1 | 2 | 3 | F | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | x | | | | | 0 | , | . | : | | + * `-----------------------------------------------------------------------------------' + */ +[_NUM] = KEYMAP_CUSTOM( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, S(KC_A), KC_1, KC_2, KC_3, S(KC_D), _______, + KC_GRV, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, S(KC_B), KC_4, KC_5, KC_6, S(KC_E), _______, + KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, S(KC_C), KC_7, KC_8, KC_9, S(KC_F), _______, + _______, _______, KC_X, _______, _______, _______, _______, FUN0 , KC_COMM, KC_DOT, KC_COLN, _______, + _______, _______, _______ +), + +/* Func + * ,-----------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | Ins | | PgUp | Up | PgDn | PgUp | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Caps | F5 | F6 | F7 | F8 |PrtSc | | Left | Down | Right| PgDn | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F9 | F10 | F11 | F12 |Pause | | | Home | End | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_FUN] = KEYMAP_CUSTOM( + XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_INS, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, KC_DEL, + KC_CAPS, KC_F5, KC_F6, KC_F7, KC_F8, KC_PSCR, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, + _______, KC_F9, KC_F10, KC_F11, KC_F12, KC_PAUS, XXXXXXX, XXXXXXX, KC_HOME, KC_END, XXXXXXX, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______ +), + +/* Uppercase Greek + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_GREEKU] = KEYMAP_CUSTOM( + _______, XXXXXXX, XXXXXXX,X(UEPSI), X(URHO), X(UTAU),X(UUPSI),X(UTHET),X(UIOTA),X(UOMIC), X(UPI), _______, + _______,X(UALPH),X(USIGM),X(UDELT), X(UPHI),X(UGAMM), X(UETA), X(UXI),X(UKAPP),X(ULAMB), KC_QUOT, _______, + _______,X(UZETA), X(UCHI), X(UPSI),X(UOMEG),X(UBETA), X(UNU), X(UMU), KC_COMM, KC_DOT, KC_SLSH, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______ +), + +/* Lowercase Greek + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_GREEKL] = KEYMAP_CUSTOM( + _______, XXXXXXX,X(FSIGM),X(LEPSI), X(LRHO), X(LTAU),X(LUPSI),X(LTHET),X(LIOTA),X(LOMIC), X(LPI), _______, + _______,X(LALPH),X(LSIGM),X(LDELT), X(LPHI),X(LGAMM), X(LETA), X(LXI),X(LKAPP),X(LLAMB), KC_QUOT, _______, + _______,X(LZETA), X(LCHI), X(LPSI),X(LOMEG),X(LBETA), X(LNU), X(LMU), KC_COMM, KC_DOT, KC_SLSH, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______ +), + +/* Empty + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_EMPTY] = KEYMAP_CUSTOM( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______ +), + +/* Emoji + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_EMOJI] = KEYMAP_CUSTOM( + X(HART2), X(CRY2),X(WEARY),X(EYERT),X(SMIRK), X(TJOY),X(RECYC),X(UNAMU),X(MUSIC),X(OKHND),X(PENSV), X(PHEW), + X(THMUP), X(PRAY),X(SMILE),X(SMIL2),X(FLUSH), X(GRIN),X(HEART), X(BYE), X(KISS),X(CELEB), X(COOL),X(NOEVS), + X(THMDN),X(SLEEP), X(CLAP), X(CRY), X(VIC),X(BHART), X(SUN),X(SMEYE), X(WINK), X(MOON),X(CONFU),X(NOEVH), + X(POO), X(EYES), X(HUNRD),_______, X(SKULL),X(HORNS), X(HALO), X(FEAR),_______,X(YUMMY),X(DISAP),X(NOEVK), + _______, _______, _______ +), + +/* GUI + * ,-----------------------------------------------------------------------------------. + * | | D1 | D2 | D3 | D4 | D5 | D6 | D7 | D8 | D9 | D10 | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | | Btab | Esc | Tab | | | Prev | | Next | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | Prev | Play | Next | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_GUI] = KEYMAP_CUSTOM( + XXXXXXX, G(KC_1), G(KC_2), G(KC_3), G(KC_4), G(KC_5), G(KC_6), G(KC_7), G(KC_8), G(KC_9), G(KC_0), XXXXXXX, + KC_ESC, XXXXXXX, S(KC_TAB),KC_ESC, KC_TAB, XXXXXXX, XXXXXXX, KC_WWWB, XXXXXXX, KC_WWWF, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, KC_SPC, KC_SPC, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, _______, _______ +), + +/* Sys + * ,-----------------------------------------------------------------------------------. + * | |Qwerty| Win | |Reset | | | USB | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | |Audio | |Dvorak| | Glow | | |WorkMn|Linux | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | |Colmak| | BLE |Norman|MacOS | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_SYS] = KEYMAP_CUSTOM( + DEBUG, QWERTY, WIN, XXXXXXX, RESET, XXXXXXX, XXXXXXX, OUT_USB, XXXXXXX, XXXXXXX, XXXXXXX, RGBDEMO, + XXXXXXX, FC_TOG, XXXXXXX, DVORAK, XXXXXXX, GLOW, XXXXXXX, XXXXXXX, WORKMAN, LINUX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, COLEMAK, XXXXXXX, OUT_BT, NORMAN, OSX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + _______, _______, _______ +), + + +}; + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +#ifdef RGBSPS_ENABLE + led_set_default_layer_indicator(); +#endif +} + +#ifdef DOUBLESPACE_LAYER_ENABLE +void process_doublespace(bool pressed, bool *isactive, bool *otheractive, bool *isemitted) { + if (pressed) { + *isactive = true; + if (*otheractive) { + layer_on(_SPACE); + register_code(KC_LALT); // sends alt and enter layer + space_layer_entered = true; + } + } else { + *isactive = false; + if (space_layer_entered) { + unregister_code(KC_LALT); // release alt and exit layer + layer_off(_SPACE); + if (!*otheractive) { + space_layer_entered = false; + } + } else { + if (!*isemitted) { + register_code(KC_SPC); + unregister_code(KC_SPC); + } + *isemitted = false; + } + } +} +#endif + +uint32_t layer_state_set_kb(uint32_t state) +{ + // turn on punc layer if both fun & num are on + if ((state & ((1UL<<_NUM) | (1UL<<_FUN))) == ((1UL<<_NUM) | (1UL<<_FUN))) { + state |= (1UL<<_PUNC); + } else { + state &= ~(1UL<<_PUNC); + } + + // turn on emoji layer if empty and greek layer are on + if ( + (state & ((1UL<<_EMPTY) | (1UL<<_GREEKU))) == ((1UL<<_EMPTY) | (1UL<<_GREEKU)) + || (state & ((1UL<<_EMPTY) | (1UL<<_GREEKL))) == ((1UL<<_EMPTY) | (1UL<<_GREEKL)) + ) { + state |= (1UL<<_EMOJI); + } else { + state &= ~(1UL<<_EMOJI); + } + return state; +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + static bool lshift = false; + static bool rshift = false; + static uint8_t layer = 0; + + lshift = keyboard_report->mods & MOD_BIT(KC_LSFT); + rshift = keyboard_report->mods & MOD_BIT(KC_RSFT); + layer = biton32(layer_state); + +#ifdef DOUBLESPACE_LAYER_ENABLE + // double-space: send space immediately if any other key depressed before space is released + if ((lspace_active ^ rspace_active) + && keycode != LSPACE + && keycode != RSPACE + && record->event.pressed) + { + if (lspace_active) { + if (!lspace_emitted) { + register_code(KC_SPC); + unregister_code(KC_SPC); + } + lspace_emitted = true; + } + if (rspace_active) { + if (!rspace_emitted) { + register_code(KC_SPC); + unregister_code(KC_SPC); + } + rspace_emitted = true; + } + } + + if (layer == _SPACE && keycode != S(KC_TAB) && keycode != KC_TAB && keycode != KC_ESC && keycode != XXXXXXX) { + if (record->event.pressed) { + unregister_code(KC_LALT); + } else { + register_code(KC_LALT); + } + } +#endif + + switch (keycode) { + +#ifdef DOUBLESPACE_LAYER_ENABLE + // double-space enter space layer + case LSPACE: + process_doublespace(record->event.pressed, &lspace_active, &rspace_active, &lspace_emitted); + return false; + break; + case RSPACE: + process_doublespace(record->event.pressed, &rspace_active, &lspace_active, &rspace_emitted); + return false; + break; +#endif + + // handle greek layer shift + case KC_LSFT: + case KC_RSFT: + ; + if (layer == _GREEKU || layer == _GREEKL) { + if (record->event.pressed) { + layer_on(_GREEKU); + layer_off(_GREEKL); + } else { + if (lshift ^ rshift) { // if only one shift was pressed + layer_on(_GREEKL); + layer_off(_GREEKU); + } + } + } + return true; + break; + + // press both ctrls to activate SYS layer + case KC_LCTL: + case KC_RCTL: + ; + bool lctrl = keyboard_report->mods & MOD_BIT(KC_LCTL); + bool rctrl = keyboard_report->mods & MOD_BIT(KC_RCTL); + if (record->event.pressed) { + if (lctrl ^ rctrl) { // if only one ctrl was pressed + layer_on(_SYS); + } + } else { + layer_off(_SYS); + } + return true; + break; + + // QWERTZ style comma and dot: semicolon and colon when shifted + case KC_COMM: + if (record->event.pressed) { + if (lshift || rshift) { + if (lshift) unregister_code(KC_LSFT); + if (rshift) unregister_code(KC_RSFT); + register_code(KC_SCLN); + unregister_code(KC_SCLN); + if (lshift) register_code(KC_LSFT); + if (rshift) register_code(KC_RSFT); + } else { + register_code(KC_COMM); + unregister_code(KC_COMM); + } + } + return false; + break; + case KC_DOT: + if (record->event.pressed) { + if ((keyboard_report->mods & MOD_BIT(KC_LSFT)) || (keyboard_report->mods & MOD_BIT(KC_RSFT))) { + register_code(KC_SCLN); + unregister_code(KC_SCLN); + } else { + register_code(KC_DOT); + unregister_code(KC_DOT); + } + } + return false; + break; + + // layout switchers + case QWERTY: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; +#ifdef LAYOUT_DVORAK + case DVORAK: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_DVORAK); + } + return false; + break; +#endif +#ifdef LAYOUT_COLEMAK + case COLEMAK: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; +#endif +#ifdef LAYOUT_WORKMAN + case WORKMAN: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_WORKMAN); + } + return false; + break; +#endif +#ifdef LAYOUT_NORMAN + case NORMAN: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_NORMAN); + } + return false; + break; +#endif + + // only process Fnumber on key release, and only when layer switcher is still pressed. + // this is to avoid accidental presses on potentially destructive keys + case KC_F1 ... KC_F12: + case KC_PAUS: + case KC_PSCR: + case KC_INS: + if (!record->event.pressed && layer == _FUN) { // key released and still in FUN layer + register_code(keycode); + unregister_code(keycode); + } + return false; + break; + + // layer switcher + // + case GREEK: + if (record->event.pressed) { + if (lshift || rshift) { + layer_on(_GREEKU); + layer_off(_GREEKL); + } else { + layer_on(_GREEKL); + layer_off(_GREEKU); + } + } else { + layer_off(_GREEKU); + layer_off(_GREEKL); + } + return false; + break; + + // OS switchers + case LINUX: + set_unicode_input_mode(UC_LNX); +#ifdef RGBSPS_ENABLE + led_set_unicode_input_mode(); +#endif + return false; + break; + case WIN: + set_unicode_input_mode(UC_WINC); +#ifdef RGBSPS_ENABLE + led_set_unicode_input_mode(); +#endif + return false; + break; + case OSX: + set_unicode_input_mode(UC_OSX); +#ifdef RGBSPS_ENABLE + led_set_unicode_input_mode(); +#endif + return false; + break; + + // glow mode changer +#ifdef RGBSPS_ENABLE + case GLOW: + if (record->event.pressed) { + glow_mode++; + if (glow_mode > GLOW_FULL) { + glow_mode = GLOW_NONE; + } + led_reset(); + rgbsps_send(); + } + return false; + break; +#endif + + // faux clicky indicator +#ifdef FAUXCLICKY_ENABLE + case FC_TOG: +#ifdef RGBSPS_ENABLE + if (fauxclicky_enabled) { + rgbsps_set(LED_IND_AUDIO, THEME_COLOR_AUDIO); + } else { + rgbsps_set(LED_IND_AUDIO, COLOR_BLANK); + } + rgbsps_send(); +#endif + return true; + break; +#endif + +#ifdef RGBSPS_DEMO_ENABLE + case RGBDEMO: + led_demo(); + return false; + break; +#endif + } + return true; +} + +void set_output_user(uint8_t output) { +#ifdef MODULE_ADAFRUIT_BLE + switch(output) { + case OUTPUT_USB: + led_set_output_usb(); + break; + case OUTPUT_BLUETOOTH: + led_set_output_ble(); + break; + default: + led_set_output_none(); + } +#endif +} + +void matrix_init_user() { + _delay_ms(500); // give time for usb to initialize + + set_unicode_input_mode(UC_LNX); + +#ifdef RGBSPS_ENABLE + led_init(); +#endif + + // auto detect output on init +#ifdef MODULE_ADAFRUIT_BLE + uint8_t output = auto_detect_output(); + if (output == OUTPUT_USB) { + set_output(OUTPUT_USB); + } else { + set_output(OUTPUT_BLUETOOTH); + } +#endif +} + +void turn_off_capslock() { + if (capslock) { + register_code(KC_CAPS); + unregister_code(KC_CAPS); + } +} + +#ifdef RGBSPS_ENABLE + void matrix_scan_user(void) { + led_set_layer_indicator(); + } + + void battery_poll(uint8_t level) { + rgbsps_sethsv(LED_IND_BATTERY, level * 120/255, 255, 15); + rgbsps_send(); + } + + void led_set_user(uint8_t usb_led) { + bool new_capslock = usb_led & (1< Date: Sun, 15 Oct 2017 16:54:06 -0400 Subject: [PATCH 09/52] add note to makefile for future use --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 73112bd0b4..e67e2fa093 100644 --- a/Makefile +++ b/Makefile @@ -304,6 +304,7 @@ define PARSE_KEYBOARD KEYMAPS += $$(notdir $$(patsubst %/.,%,$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_3)/keymaps/*/.))) KEYMAPS += $$(notdir $$(patsubst %/.,%,$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_4)/keymaps/*/.))) KEYMAPS += $$(notdir $$(patsubst %/.,%,$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_5)/keymaps/*/.))) + # this might be needed, but in a different form #KEYMAPS := $$(sort $$(filter-out $$(KEYBOARD_FOLDER_1) $$(KEYBOARD_FOLDER_2) \ $$(KEYBOARD_FOLDER_3) $$(KEYBOARD_FOLDER_4) $$(KEYBOARD_FOLDER_5), $$(KEYMAPS))) From 12b2e0ac73a17a8ae0da190c35830c21c61a8ee9 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Sun, 15 Oct 2017 20:04:23 -0400 Subject: [PATCH 10/52] hack to force new tag --- util/travis_compiled_push.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index af9fc51d9c..27e77a9218 100644 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -40,7 +40,8 @@ if [[ $NEFM -gt 0 ]] ; then #lasttag=$(git describe --tags $(git rev-list --tags --max-count=10) | grep -Ev '\-' | xargs -I@ git log --format=format:"%ai @%n" -1 @ | sort -V | awk '{print $4}' | tail -1) lasttag=$(git describe --tags $(git rev-list --tags --max-count=10) | grep -Ev '\-' | sort -V | tail -1) newtag=$(increment_version $lasttag) - git tag $newtag + newertag=$(increment_version $newtag) + git tag $newtag || git tag $newertag git push --tags git@github.com:qmk/qmk_firmware.git else echo "No essential files modified." From aa660c1eb7cad0e248c69e60d8752fe997e666a7 Mon Sep 17 00:00:00 2001 From: Dylan Khor Date: Sun, 15 Oct 2017 20:26:51 -0400 Subject: [PATCH 11/52] Broken link found in issue #1845 --- docs/keymap.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/keymap.md b/docs/keymap.md index 170fdaed7d..1dedccc0d6 100644 --- a/docs/keymap.md +++ b/docs/keymap.md @@ -79,7 +79,7 @@ Key with `KC_TRANS` (`KC_TRNS` and `_______` are the alias) doesn't has its own ## Anatomy Of A `keymap.c` -For this example we will walk through the [default Clueboard keymap](https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard/keymaps/default/keymap.c). You'll find it helpful to open that file in another browser window so you can look at everything in context. +For this example we will walk through the [default Clueboard 66% keymap](https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard_66/keymaps/default/keymap.c). You'll find it helpful to open that file in another browser window so you can look at everything in context. There are 3 main sections of a `keymap.c` file you'll want to concern yourself with: From ba4b3d9d7275e8f4280044d959a267e2abcec8e7 Mon Sep 17 00:00:00 2001 From: Benjamin Dengler Date: Mon, 16 Oct 2017 03:04:03 +0200 Subject: [PATCH 12/52] Added BLE support for USB-USB converter. (#1824) * Added BLE support to USB-USB converter * Added readme * Removed images and Makefile --- .../converter/usb_usb/keymaps/ble/README.md | 30 ++++++++ .../converter/usb_usb/keymaps/ble/config.h | 15 ++++ .../converter/usb_usb/keymaps/ble/keymap.c | 76 +++++++++++++++++++ .../converter/usb_usb/keymaps/ble/rules.mk | 3 + tmk_core/protocol/lufa/adafruit_ble.h | 3 + 5 files changed, 127 insertions(+) create mode 100644 keyboards/converter/usb_usb/keymaps/ble/README.md create mode 100644 keyboards/converter/usb_usb/keymaps/ble/config.h create mode 100644 keyboards/converter/usb_usb/keymaps/ble/keymap.c create mode 100644 keyboards/converter/usb_usb/keymaps/ble/rules.mk diff --git a/keyboards/converter/usb_usb/keymaps/ble/README.md b/keyboards/converter/usb_usb/keymaps/ble/README.md new file mode 100644 index 0000000000..0ee7223fd4 --- /dev/null +++ b/keyboards/converter/usb_usb/keymaps/ble/README.md @@ -0,0 +1,30 @@ +QMK BLE Adapter +=============== +A small device that reads USB keyboard input and passes it on over Bluetooth LE HID. + +![Picture of Adapter](https://i.imgur.com/O3VwBBJ.png) + +Hardware +-------- +The hardware is relatively easy to assemble. Just follow the schematic and don't forget to [cut the VBUS jumper](https://www.pjrc.com/teensy/td_libs_USBHostShield_4a.jpg). + +Schematic: +![Schematic](https://i.imgur.com/s1Ia9We.png) + +Part list: +* [Adafruit Feather 32u4 Bluefruit LE](https://www.adafruit.com/product/2829) +* [USB Host Mini](https://www.circuitsathome.com/arduino_usb_host_shield_projects/) +* [Pololu 5V Step-Up Voltage Regulator U3V12F5](https://www.pololu.com/product/2115) +* [Lithium Ion Battery - 3.7v 2000mAh](https://www.adafruit.com/product/2011) +* Some sort of switch to be able to turn it off + +Building and Flashing +--------------------- + +``` +make converter-usb_usb-ble +``` + +``` +make converter-usb_usb-ble-avrdude +``` \ No newline at end of file diff --git a/keyboards/converter/usb_usb/keymaps/ble/config.h b/keyboards/converter/usb_usb/keymaps/ble/config.h new file mode 100644 index 0000000000..c1859b7f1a --- /dev/null +++ b/keyboards/converter/usb_usb/keymaps/ble/config.h @@ -0,0 +1,15 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#undef PRODUCT +#define PRODUCT QMK BLE Adapter +#undef DESCRIPTION +#define DESCRIPTION + +// Turn off the mode leds on the BLE module +#define ADAFRUIT_BLE_ENABLE_MODE_LEDS 0 +#define ADAFRUIT_BLE_ENABLE_POWER_LED 0 + +#endif diff --git a/keyboards/converter/usb_usb/keymaps/ble/keymap.c b/keyboards/converter/usb_usb/keymaps/ble/keymap.c new file mode 100644 index 0000000000..094bd95693 --- /dev/null +++ b/keyboards/converter/usb_usb/keymaps/ble/keymap.c @@ -0,0 +1,76 @@ +/* +Copyright 2017 Balz Guenat + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "usb_usb.h" + +const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = { + /* 0: plain Qwerty without layer switching + * ,---------------. ,---------------. ,---------------. + * |F13|F14|F15|F16| |F17|F18|F19|F20| |F21|F22|F23|F24| + * ,---. |---------------| |---------------| |---------------| ,-----------. ,---------------. ,-------. + * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| |VDn|VUp|Mut|Pwr| | Help | + * `---' `---------------' `---------------' `---------------' `-----------' `---------------' `-------' + * ,-----------------------------------------------------------. ,-----------. ,---------------. ,-------. + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|JPY|Bsp| |Ins|Hom|PgU| |NmL| /| *| -| |Stp|Agn| + * |-----------------------------------------------------------| |-----------| |---------------| |-------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | |Del|End|PgD| | 7| 8| 9| +| |Mnu|Und| + * |-----------------------------------------------------------| `-----------' |---------------| |-------| + * |CapsL | A| S| D| F| G| H| J| K| L| ;| :| #|Retn| | 4| 5| 6|KP,| |Sel|Cpy| + * |-----------------------------------------------------------| ,---. |---------------| |-------| + * |Shft| <| Z| X| C| V| B| N| M| ,| ,| /| RO|Shift | |Up | | 1| 2| 3|KP=| |Exe|Pst| + * |-----------------------------------------------------------| ,-----------. |---------------| |-------| + * |Ctl|Gui|Alt|MHEN|HNJ| Space |H/E|HENK|KANA|Alt|Gui|App|Ctl| |Lef|Dow|Rig| | 0 | .|Ent| |Fnd|Cut| + * `-----------------------------------------------------------' `-----------' `---------------' `-------' + */ + [0] = KEYMAP_ALL( + KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, + 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_VOLD, KC_VOLU, KC_MUTE, KC_PWR, KC_HELP, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_JYEN, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_STOP, KC_AGIN, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_MENU, KC_UNDO, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PCMM, KC_SLCT, KC_COPY, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PEQL, KC_EXEC, KC_PSTE, + KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_HANJ, KC_SPC, KC_HAEN, KC_HENK, KC_KANA, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT, KC_FIND, KC_CUT + ), +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + switch(id) { + default: + return MACRO_NONE; + } +}; + + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/converter/usb_usb/keymaps/ble/rules.mk b/keyboards/converter/usb_usb/keymaps/ble/rules.mk new file mode 100644 index 0000000000..3beda3f445 --- /dev/null +++ b/keyboards/converter/usb_usb/keymaps/ble/rules.mk @@ -0,0 +1,3 @@ +BLUETOOTH = AdafruitBLE +ADAFRUIT_BLE_ENABLE = yes +OPT_DEFS += -DCATERINA_BOOTLOADER \ No newline at end of file diff --git a/tmk_core/protocol/lufa/adafruit_ble.h b/tmk_core/protocol/lufa/adafruit_ble.h index 036b7d14ea..5d26a9d5a3 100644 --- a/tmk_core/protocol/lufa/adafruit_ble.h +++ b/tmk_core/protocol/lufa/adafruit_ble.h @@ -8,6 +8,9 @@ #include #include +#include "config_common.h" +#include "progmem.h" + #ifdef __cplusplus extern "C" { #endif From 0f5928fdf4399f14a500a00936a2cc35225cd3bf Mon Sep 17 00:00:00 2001 From: Phil Hagelberg Date: Mon, 16 Oct 2017 09:01:43 -0700 Subject: [PATCH 13/52] Fix avrdude message to not mention any specific device model. --- tmk_core/avr.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tmk_core/avr.mk b/tmk_core/avr.mk index 989180f3ca..0e014a412a 100644 --- a/tmk_core/avr.mk +++ b/tmk_core/avr.mk @@ -146,10 +146,10 @@ dfu-ee: $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).eep avrdude: $(BUILD_DIR)/$(TARGET).hex if grep -q -s Microsoft /proc/version; then \ - echo 'ERROR: Pro Micros can not be flashed within the Windows Subsystem for Linux (WSL) currently. Instead, take the .hex file generated and flash it using AVRDUDE, AVRDUDESS, or XLoader.'; \ + echo 'ERROR: AVR flashing cannot be automated within the Windows Subsystem for Linux (WSL) currently. Instead, take the .hex file generated and flash it using AVRDUDE, AVRDUDESS, or XLoader.'; \ else \ ls /dev/tty* > /tmp/1; \ - echo "Detecting Pro Micro port, reset your Pro Micro now.\c"; \ + echo "Detecting USB port, reset your controller now.\c"; \ while [ -z $$USB ]; do \ sleep 1; \ echo ".\c"; \ @@ -157,7 +157,7 @@ avrdude: $(BUILD_DIR)/$(TARGET).hex USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \ done; \ echo ""; \ - echo "Detected Pro Micro port at $$USB"; \ + echo "Detected controller on USB port at $$USB"; \ sleep 1; \ avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex; \ fi From b7bb92396286b495e48864b5813e7dafcade93f5 Mon Sep 17 00:00:00 2001 From: Kenneth Aloysius Date: Tue, 17 Oct 2017 10:31:39 +1100 Subject: [PATCH 14/52] Add NIU Mini from KBDFans (#1847) * Add NIU Mini keymap from Planck keymap * Remove old keymap files * Fix README, removed Planck references * Add default layout, move Planck layout to separate folder * Update README --- keyboards/niu_mini/config.h | 97 +++++++ keyboards/niu_mini/keymaps/default/keymap.c | 84 ++++++ keyboards/niu_mini/keymaps/default/readme.md | 2 + keyboards/niu_mini/keymaps/planck/config.h | 32 +++ keyboards/niu_mini/keymaps/planck/keymap.c | 262 +++++++++++++++++++ keyboards/niu_mini/keymaps/planck/readme.md | 2 + keyboards/niu_mini/keymaps/planck/rules.mk | 3 + keyboards/niu_mini/keymaps/readme.md | 23 ++ keyboards/niu_mini/niu_mini.c | 19 ++ keyboards/niu_mini/niu_mini.h | 35 +++ keyboards/niu_mini/readme.md | 16 ++ keyboards/niu_mini/rules.mk | 68 +++++ 12 files changed, 643 insertions(+) create mode 100644 keyboards/niu_mini/config.h create mode 100755 keyboards/niu_mini/keymaps/default/keymap.c create mode 100644 keyboards/niu_mini/keymaps/default/readme.md create mode 100644 keyboards/niu_mini/keymaps/planck/config.h create mode 100644 keyboards/niu_mini/keymaps/planck/keymap.c create mode 100644 keyboards/niu_mini/keymaps/planck/readme.md create mode 100644 keyboards/niu_mini/keymaps/planck/rules.mk create mode 100644 keyboards/niu_mini/keymaps/readme.md create mode 100644 keyboards/niu_mini/niu_mini.c create mode 100644 keyboards/niu_mini/niu_mini.h create mode 100644 keyboards/niu_mini/readme.md create mode 100644 keyboards/niu_mini/rules.mk diff --git a/keyboards/niu_mini/config.h b/keyboards/niu_mini/config.h new file mode 100644 index 0000000000..2f22306160 --- /dev/null +++ b/keyboards/niu_mini/config.h @@ -0,0 +1,97 @@ +/* +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" + +#define DEVICE_VER 0x0001 + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define MANUFACTURER KBDFans +#define PRODUCT NIU Mini +#define DESCRIPTION A compact ortholinear keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* NIU Mini PCB default pin-out */ +#define MATRIX_ROW_PINS { D0, D1, D2, D3 } +#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, B3, B1, B0, D5, B7, C7 } +#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_PIN B6 +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 4 +#endif + +/* 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)) \ +) + +/* prevent stuck modifiers */ +#define PREVENT_STUCK_MODIFIERS + +#define RGB_DI_PIN E2 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 14 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + +/* + * 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/niu_mini/keymaps/default/keymap.c b/keyboards/niu_mini/keymaps/default/keymap.c new file mode 100755 index 0000000000..20e90f6e93 --- /dev/null +++ b/keyboards/niu_mini/keymaps/default/keymap.c @@ -0,0 +1,84 @@ +#include "niu_mini.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = { + {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, + {KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT}, + {KC_LCTL, KC_LGUI, KC_1, KC_2, KC_3, KC_SPC, MO(2), MO(1), KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT} + // NOTE MO(2) does not correspond to an actual key since the NIU only comes + // in MIT layout + }, + + [1] = { + {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS}, + {KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, + {KC_TRNS, BL_TOGG, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} + }, + + [2] = { + {KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, + {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 macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + keyevent_t event = record->event; + + switch (id) { + case 1: + // do nothing for now + if (event.pressed) { + ; + } + } + return MACRO_NONE; +} + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + + if (usb_led & (1 << USB_LED_NUM_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_COMPOSE)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_KANA)) { + + } else { + + } + +} diff --git a/keyboards/niu_mini/keymaps/default/readme.md b/keyboards/niu_mini/keymaps/default/readme.md new file mode 100644 index 0000000000..a2f2aa2f46 --- /dev/null +++ b/keyboards/niu_mini/keymaps/default/readme.md @@ -0,0 +1,2 @@ +# Default layout +Default layout that shipped with the NIU mini diff --git a/keyboards/niu_mini/keymaps/planck/config.h b/keyboards/niu_mini/keymaps/planck/config.h new file mode 100644 index 0000000000..26387986dd --- /dev/null +++ b/keyboards/niu_mini/keymaps/planck/config.h @@ -0,0 +1,32 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#define MUSIC_MASK (keycode != KC_NO) + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +#endif diff --git a/keyboards/niu_mini/keymaps/planck/keymap.c b/keyboards/niu_mini/keymaps/planck/keymap.c new file mode 100644 index 0000000000..a4ffad9c95 --- /dev/null +++ b/keyboards/niu_mini/keymaps/planck/keymap.c @@ -0,0 +1,262 @@ +/* Copyright 2015-2017 Jack Humbert + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "niu_mini.h" +#include "action_layer.h" + +extern keymap_config_t keymap_config; + +enum layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _PLOVER, + _ADJUST +}; + +enum keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + PLOVER, + LOWER, + RAISE, + BACKLIT, + EXT_PLV +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = { + {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, + {KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT }, + {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = { + {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, + {KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT }, + {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = { + {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC}, + {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH}, + {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT }, + {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = { + {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC}, + {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} +}, + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = { + {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, + {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} +}, + +/* 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|MIDIon|MIDIof| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = { + {_______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL }, + {_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______}, + {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +} + + +}; + +#ifdef AUDIO_ENABLE + float plover_song[][2] = SONG(PLOVER_SOUND); + float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); +#endif + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + print("mode just switched to qwerty and this is a huge string\n"); + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_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_SONG(plover_song); + #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_SONG(plover_gb_song); + #endif + layer_off(_PLOVER); + } + return false; + break; + } + return true; +} diff --git a/keyboards/niu_mini/keymaps/planck/readme.md b/keyboards/niu_mini/keymaps/planck/readme.md new file mode 100644 index 0000000000..de9680b498 --- /dev/null +++ b/keyboards/niu_mini/keymaps/planck/readme.md @@ -0,0 +1,2 @@ +# The Default Planck Layout + diff --git a/keyboards/niu_mini/keymaps/planck/rules.mk b/keyboards/niu_mini/keymaps/planck/rules.mk new file mode 100644 index 0000000000..457a3d01d4 --- /dev/null +++ b/keyboards/niu_mini/keymaps/planck/rules.mk @@ -0,0 +1,3 @@ +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/niu_mini/keymaps/readme.md b/keyboards/niu_mini/keymaps/readme.md new file mode 100644 index 0000000000..804a657e7c --- /dev/null +++ b/keyboards/niu_mini/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 keymaps + +- **default** default layout from KBDFans +- **planck** Planck default layout diff --git a/keyboards/niu_mini/niu_mini.c b/keyboards/niu_mini/niu_mini.c new file mode 100644 index 0000000000..f1607df55c --- /dev/null +++ b/keyboards/niu_mini/niu_mini.c @@ -0,0 +1,19 @@ +#include "niu_mini.h" + +#ifdef ONEHAND_ENABLE +__attribute__ ((weak)) +const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { + {{11, 0}, {10, 0}, {9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}}, + {{11, 1}, {10, 1}, {9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}}, + {{11, 2}, {10, 2}, {9, 2}, {8, 2}, {7, 2}, {6, 2}, {5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}}, + {{11, 3}, {10, 3}, {9, 3}, {8, 3}, {7, 3}, {6, 3}, {5, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}}, +}; +#endif + +void matrix_init_kb(void) { + // Turn status LED on + DDRE |= (1<<6); + PORTE |= (1<<6); + + matrix_init_user(); +} diff --git a/keyboards/niu_mini/niu_mini.h b/keyboards/niu_mini/niu_mini.h new file mode 100644 index 0000000000..f4a55272a0 --- /dev/null +++ b/keyboards/niu_mini/niu_mini.h @@ -0,0 +1,35 @@ +#ifndef NIU_MINI_H +#define NIU_MINI_H + +#include "quantum.h" + +#define MIT( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, 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, k34, k35, k35, k37, k38, k39, k3a, k3b } \ +} + +#define GRID( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \ +} + +#define KEYMAP GRID +#define LAYOUT_ortho_4x12 GRID + +#endif diff --git a/keyboards/niu_mini/readme.md b/keyboards/niu_mini/readme.md new file mode 100644 index 0000000000..71bfae2731 --- /dev/null +++ b/keyboards/niu_mini/readme.md @@ -0,0 +1,16 @@ +NIU Mini +=== + +![NIU Mini](https://cdn.shopify.com/s/files/1/1473/3902/files/40__01.jpg) + +A compact 40% (12x4) ortholinear keyboard kit sold by KBDFans. + +Keyboard Maintainer: QMK Community +Hardware Supported: NIU Mini PCB +Hardware Availability: [KBDFans](https://kbdfans.myshopify.com/) + +Make example for this keyboard (after setting up your build environment): + + make niu_mini:default + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/niu_mini/rules.mk b/keyboards/niu_mini/rules.mk new file mode 100644 index 0000000000..7c7e981218 --- /dev/null +++ b/keyboards/niu_mini/rules.mk @@ -0,0 +1,68 @@ +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +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. +API_SYSEX_ENABLE = no + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend From af4697cba5114d79027b900d94fc1462324c006a Mon Sep 17 00:00:00 2001 From: Max Rumpf Date: Tue, 17 Oct 2017 04:43:40 +0200 Subject: [PATCH 15/52] Add Maxr1998's GH60 layout (#1849) * Maxr1998's GH60 layout * delete unused makefile * Remove unneeded include --- keyboards/gh60/keymaps/maxr1998/config.h | 30 +++++++++ keyboards/gh60/keymaps/maxr1998/keymap.c | 84 ++++++++++++++++++++++++ keyboards/gh60/keymaps/maxr1998/rules.mk | 6 ++ 3 files changed, 120 insertions(+) create mode 100644 keyboards/gh60/keymaps/maxr1998/config.h create mode 100644 keyboards/gh60/keymaps/maxr1998/keymap.c create mode 100644 keyboards/gh60/keymaps/maxr1998/rules.mk diff --git a/keyboards/gh60/keymaps/maxr1998/config.h b/keyboards/gh60/keymaps/maxr1998/config.h new file mode 100644 index 0000000000..8c3b9b2502 --- /dev/null +++ b/keyboards/gh60/keymaps/maxr1998/config.h @@ -0,0 +1,30 @@ +/* +Copyright 2017 Max Rumpf alias Maxr1998 + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#define RGB_DI_PIN F4 // pin the DI on the WS2812B is hooked-up to +#define RGBLIGHT_ANIMATIONS // run RGB animations +#define RGBLED_NUM 6 // number of LEDs +#define RGBLIGHT_HUE_STEP 12 // units to step when in/decreasing hue +#define RGBLIGHT_SAT_STEP 25 // units to step when in/decresing saturation +#define RGBLIGHT_VAL_STEP 12 // units to step when in/decreasing value (brightness) + +#endif \ No newline at end of file diff --git a/keyboards/gh60/keymaps/maxr1998/keymap.c b/keyboards/gh60/keymaps/maxr1998/keymap.c new file mode 100644 index 0000000000..74dab4910d --- /dev/null +++ b/keyboards/gh60/keymaps/maxr1998/keymap.c @@ -0,0 +1,84 @@ +/* +Copyright 2017 Max Rumpf alias Maxr1998 + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "gh60.h" +#include "action_layer.h" + +#define KC_EURO RALT(KC_5) + +#define SWITCH_LANG SEND_STRING(SS_LGUI(SS_TAP(X_SPACE))) +#define PRINT_UMLAUT(str) SWITCH_LANG;_delay_ms(90);SEND_STRING(str);SWITCH_LANG; + +enum custom_keycodes { + MCO_AE = SAFE_RANGE, + MCO_OE = SAFE_RANGE + 1, + MCO_UE = SAFE_RANGE + 2, + MCO_SS = SAFE_RANGE + 3, + TP_REQ = SAFE_RANGE + 10, + TP_ACC = SAFE_RANGE + 11 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* 0: qwertz */ + KEYMAP( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,\ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Z, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_NO, \ + KC_LOCK, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_HOME, KC_ENT, \ + KC_LSFT, KC_BSLS, KC_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, KC_RSFT,\ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_NO, F(0), KC_LEFT, KC_DOWN, KC_RGHT), + /* 1: fn */ + 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_DEL, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_EURO, TP_REQ, TP_ACC, KC_TRNS, MCO_UE, KC_TRNS, MCO_OE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, MCO_AE, MCO_SS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_M_P, RGB_M_B, RGB_M_SW,KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUI, RGB_HUD, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_MOMENTARY(1) // to Fn overlay +}; + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch (keycode) { + case MCO_AE: + PRINT_UMLAUT("'"); // ä + return false; + case MCO_OE: + PRINT_UMLAUT(";"); // ö + return false; + case MCO_UE: + PRINT_UMLAUT("["); // ü + return false; + case MCO_SS: + PRINT_UMLAUT("-"); // ß + return false; + case TP_REQ: + SEND_STRING("/tpa "); + return false; + case TP_ACC: + SEND_STRING("/tpaccept"SS_TAP(X_ENTER)); + return false; + } + } + return true; +} \ No newline at end of file diff --git a/keyboards/gh60/keymaps/maxr1998/rules.mk b/keyboards/gh60/keymaps/maxr1998/rules.mk new file mode 100644 index 0000000000..d64f11e1f0 --- /dev/null +++ b/keyboards/gh60/keymaps/maxr1998/rules.mk @@ -0,0 +1,6 @@ +# Build Options +# comment out to disable the options. +# +RGBLIGHT_ENABLE = yes # Enable RGB Underglow +KEY_LOCK_ENABLE = yes # Enable key lock option +SKIP_GIT = yes From d3fe6a0588965b71c6876b060d05abfceabacbb5 Mon Sep 17 00:00:00 2001 From: mogranjm <32807665+mogranjm@users.noreply.github.com> Date: Wed, 18 Oct 2017 03:42:27 +1100 Subject: [PATCH 16/52] Add terminus_mini keyboard and nyquist/DivergeJM layout (#1851) * First commit of the Terminus_Mini firmware and the DivergeJM version of the Nyquist firmware * Fix terminus_mini & nyquist/DivergeJM readme files Previously an outdated copy of the default readme. Updated to match the Nyquist/DivergeJM format (DivergeJM is a split 5x12 implementation of the terminus_mini layout) * Update makefiles to rules.mk Renamed both Makefiles to rules.mk, removed references to makefiles * Updated rules.mk Inadvertantly removed important code from the rules.mk in previous commit. This has been restored. Also disabled Tap_Dance in both rules.mk files * Moved terminus_mini to handwired Realised that existing directory was not appropriate for the terminus_mini project, moved to handwired. --- keyboards/handwired/terminus_mini/config.h | 190 +++++++++++++++ .../terminus_mini/keymaps/default/config.h | 24 ++ .../terminus_mini/keymaps/default/keymap.c | 218 ++++++++++++++++++ .../terminus_mini/keymaps/default/readme.md | 122 ++++++++++ .../terminus_mini/keymaps/default/rules.mk | 34 +++ keyboards/handwired/terminus_mini/rules.mk | 69 ++++++ .../handwired/terminus_mini/terminus_mini.c | 43 ++++ .../handwired/terminus_mini/terminus_mini.h | 40 ++++ keyboards/nyquist/keymaps/DivergeJM/README.md | 135 +++++++++++ keyboards/nyquist/keymaps/DivergeJM/config.h | 26 +++ keyboards/nyquist/keymaps/DivergeJM/keymap.c | 216 +++++++++++++++++ keyboards/nyquist/keymaps/DivergeJM/rules.mk | 34 +++ 12 files changed, 1151 insertions(+) create mode 100644 keyboards/handwired/terminus_mini/config.h create mode 100644 keyboards/handwired/terminus_mini/keymaps/default/config.h create mode 100644 keyboards/handwired/terminus_mini/keymaps/default/keymap.c create mode 100644 keyboards/handwired/terminus_mini/keymaps/default/readme.md create mode 100644 keyboards/handwired/terminus_mini/keymaps/default/rules.mk create mode 100644 keyboards/handwired/terminus_mini/rules.mk create mode 100644 keyboards/handwired/terminus_mini/terminus_mini.c create mode 100644 keyboards/handwired/terminus_mini/terminus_mini.h create mode 100644 keyboards/nyquist/keymaps/DivergeJM/README.md create mode 100644 keyboards/nyquist/keymaps/DivergeJM/config.h create mode 100644 keyboards/nyquist/keymaps/DivergeJM/keymap.c create mode 100644 keyboards/nyquist/keymaps/DivergeJM/rules.mk diff --git a/keyboards/handwired/terminus_mini/config.h b/keyboards/handwired/terminus_mini/config.h new file mode 100644 index 0000000000..5e32cbaf0a --- /dev/null +++ b/keyboards/handwired/terminus_mini/config.h @@ -0,0 +1,190 @@ +/* +Copyright 2017 James Morgan + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER James Morgan +#define PRODUCT terminus_mini +#define DESCRIPTION A custom keyboard + +/* 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 { B5, B4, D7, D6 } +#define MATRIX_COL_PINS { B0, D0, D5, B6, D4, C7, F7, F6, F5, F4, F1, F0 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +//define tapping-toggle count +#define TAPPING_TOGGLE 1 + +//define maximum duration of hold required to register a tap vs hold default is 200 +#define TAPPING_TERM 150 //reduce time required so fast typing doesn't disrupt + +/* 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 + * rules.mk 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 + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +#endif diff --git a/keyboards/handwired/terminus_mini/keymaps/default/config.h b/keyboards/handwired/terminus_mini/keymaps/default/config.h new file mode 100644 index 0000000000..f52a97bbc8 --- /dev/null +++ b/keyboards/handwired/terminus_mini/keymaps/default/config.h @@ -0,0 +1,24 @@ +/* Copyright 2017 REPLACE_WITH_YOUR_NAME + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here + +#endif diff --git a/keyboards/handwired/terminus_mini/keymaps/default/keymap.c b/keyboards/handwired/terminus_mini/keymaps/default/keymap.c new file mode 100644 index 0000000000..5227cb6a99 --- /dev/null +++ b/keyboards/handwired/terminus_mini/keymaps/default/keymap.c @@ -0,0 +1,218 @@ +/* Copyright 2017 MogranJM + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "terminus_mini.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. + +enum terminus_mini_layers { + _COLEMAK, + _QWERTY, + _LOWER, + _RAISE, + _FUNCTION, + _MOUSE, + _ADJUST, +}; + +enum terminus_mini_keycodes { + COLEMAK = SAFE_RANGE, + QWERTY, + LOWER, + RAISE, + FUNCTION, + MOUSE, + ADJUST, +}; + + // Enable these functions using FUNC(n) macro. + const uint16_t PROGMEM fn_actions[] = { //ACTION_LAYER_TAP_TOGGLE requires that number of taps be defined in *config.h* - default set to 5 + [0] = ACTION_LAYER_TAP_KEY(_LOWER, KC_SPC), //Hold for momentary Lower layer, Tap for Space, + [1] = ACTION_LAYER_TAP_KEY(_RAISE, KC_ENT), //Hold for momentary Mouse layer, Tap for Enter, + [2] = ACTION_LAYER_TAP_TOGGLE(_LOWER), //Hold for momentary Lower, Tap for toggle Lower + [3] = ACTION_LAYER_TAP_TOGGLE(_MOUSE), //Hold for momentary Mouse, Tap for toggle Mouse + [4] = ACTION_LAYER_MOMENTARY(_FUNCTION), //Hold for momentary Function + }; +#define SPC_LW FUNC(0) +#define ENT_RS FUNC(1) +#define LWR FUNC(2) +#define MSE FUNC(3) +#define FNC FUNC(4) + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Colemak - + * ,----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Del | + * |-----+------+------+------+------+-------------+------+------+------+------+------| + * | BS | A | R | S | T | D | H | N | E | I | O | " | + * |-----+------+------+------+------+-------------+------+------+------+------+------| + * | LSPO| Z | X | C | V | B | K | M | , | . | / | RSPC | + * |-----+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl| LGUI | LAlt | Lower| SpaceLW | RSEnter | Fn | Mouse| Menu | Ctrl | + * `----------------------------------------------------------------------------------' + */ +[_COLEMAK] = TERMINUS_MINI( + 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_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, \ + KC_LCTL, KC_LGUI, KC_LALT, LWR, SPC_LW, ENT_RS, FNC, MSE, KC_APP, KC_RCTL \ + ), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | Tab | PgUp | Home | Up | End | / | 7 | 8 | 9 | * | | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | BS | PgDn | Left | Down |Right | - | 4 | 5 | 6 | + | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | LSPO | Z | X | C | V | = | 1 | 2 | 3 | Enter| | RSPC | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | LGUI | Alt | Lower| Space/Lower | 0 | . | Fn | Menu | Ctrl | + * `-----------------------------------------------------------------------------------' + Want to add tap-dance function to 0 key: Tap=0, doubleTap=Ent + */ + +[_LOWER] = TERMINUS_MINI( + KC_TAB, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_PSLS, KC_7, KC_8, KC_9, KC_PAST, XXXXXXX, _______, \ + _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_MINS, KC_4, KC_5, KC_6, KC_PPLS, XXXXXXX, _______, \ + _______, _______, _______, _______, _______, KC_EQL, KC_1, KC_2, KC_3, KC_PENT, XXXXXXX, _______, \ + _______, _______, _______, _______, _______, KC_0, KC_DOT, FNC, _______, _______ \ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | Esc | ! | @ | # | $ | % | ^ | & | * | - | + | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | BS | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | " | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | LSPO | | | { | [ | ` | \ | ] | } | . | ? | RSPC | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | LGUI | Alt | | Space/Lower | Raise/Enter | Fn | Mouse| Menu | Ctrl | + * `-----------------------------------------------------------------------------------' + */ + +[_RAISE] = TERMINUS_MINI( + KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_MINS, KC_EQL, _______, \ + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ + _______, XXXXXXX, XXXXXXX, KC_LCBR, KC_LBRC, KC_GRV, KC_BSLS, KC_RBRC, KC_RCBR, KC_DOT, KC_SLSH, _______, \ + _______, _______, _______, _______, SPC_LW, ENT_RS, FNC, MSE, _______, _______ \ + ), + +/*Function + * ,-----------------------------------------------------------------------------------. + * | Esc | Mute | Vol- | Vol+ | | RESET| POWER| F1 | F2 | F3 | F4 | Ins | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Caps | Stop | |<< | >/|| | >>| | | | F5 | F6 | F7 | F8 |PrtSc | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | LSOB | | | | | | | F9 | F10 | F11 | F12 |ScrLk | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | LGUI | Alt | | Space/Lower | Enter/Raise | Fn | | |PsBrk | + * `-----------------------------------------------------------------------------------' + */ + +[_FUNCTION] = TERMINUS_MINI( + _______, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, RESET, KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_INS , \ + KC_CAPS, KC_MSTP, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, KC_PSCR, \ + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, KC_SLCK, \ + _______, _______, _______, _______, _______, _______, FNC, _______, _______, KC_PAUS \ + ), + +/* MOUSE + * ,---------------------------------------------------------------------------------------. + * | Esc | WhlU | WhlL | MsUp | WhlR | | | M1 | M2 | M3 | | | + * |------+-------+------+-------+------+------+------+-------+-------+------+------+------| + * | | WhlD | MsL | MsDn | MsR | | |LClick |RClick | | | | + * |------+-------+------+-------+------+------+------+-------+-------+------+------+------| + * | LSPO | | | | | | | | | | | RSCB | + * |------+-------+------+-------+------+------+------+-------+-------+------+------+------| + * | Ctrl | | | | Sensitivity | Sensitivity | |MOUSE | | Ctrl | + * `---------------------------------------------------------------------------------------' + */ + +[_MOUSE] = TERMINUS_MINI( + KC_ESC, KC_WH_U, KC_WH_L, KC_MS_U, KC_WH_R, XXXXXXX, XXXXXXX, KC_BTN3, KC_BTN4, KC_BTN5, XXXXXXX, XXXXXXX, \ + KC_BSPC, KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, XXXXXXX, KC_BTN1, KC_BTN2, XXXXXXX, XXXXXXX, XXXXXXX, \ + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RSPC, \ + _______, XXXXXXX, XXXXXXX, XXXXXXX, KC_ACL1, KC_ACL0, XXXXXXX, MSE, XXXXXXX, KC_RCTL \ + ), + +}; + +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 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 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; + } + return true; +} + + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/handwired/terminus_mini/keymaps/default/readme.md b/keyboards/handwired/terminus_mini/keymaps/default/readme.md new file mode 100644 index 0000000000..66ca566ed6 --- /dev/null +++ b/keyboards/handwired/terminus_mini/keymaps/default/readme.md @@ -0,0 +1,122 @@ +Copyright 2017 James Morgan + +#MogranJM's terminus_mini layout - A handwired keyboard inspired by the UniKeyboard Terminus Mini 2. + +This keymap is modified from the Planck default layout. Credit for the layout name goes to UniKeyboard & reddit's /u/blahlicus) + +The terminus_mini is a handwired 4x12 ortholinear keyboard with two 2U thumb bar keys. The microcontroller is a Teensy 2.0 + +The TERMINUS_MINI layout (../../../terminus_mini/terminus_mini.h) is handwired and the 2U keys are handled using KC_NO to detail that two columns do not have a 4th column. + +> .----------------------------------------. .-----------------------------------------. \ +> | Tab | Q | W | F | P | G | | J | L | U | Y | ; | Del | \ +> |-----+------+------+------+------+------| |------+------+------+------+------+------| \ +> | BS | A | R | S | T | D | | H | N | E | I | O | ' | \ +> |-----+------+------+------+------+------| |------+------+------+------+------+------| \ +> | LSPO| Z | X | C | V | B | | K | M | , | \. | / | RSPC | \ +> |-----+------+------+------+------+------| |------+------+------+------+------+------| \ +> | Ctrl| LGUI | LAlt | Lower| Space/Lower | | Enter/Raise | Fn | Mouse| Menu | Ctrl | \ +> '----------------------------------------' '-----------------------------------------' \ +\ +> [_COLEMAK] = KEYMAP( \ +> KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL , \ +> KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ +> KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, \ +> KC_LCTL, KC_LGUI, KC_LALT, LWR, SPC_LW, SPC_LW, ENT_RS, ENT_RS, FNC, MSE, KC_APP, KC_RCTL \ +> ), + +##Layers + +### Base Layer - Colemak + * The base layout is Colemak. Since the CapsLock key is replaced with BackSpace, this layout has the delete key in the traditional backspace location. + * QWERTY and Dvorak layers have been removed from the keymap that was initially developed from the default Planck keymap. + * I've implemented COLEMAK = SAFE_RANGE when enumerating the custom_keycodes, but I don't actually know what this does... + + * Space cadet is implemented in the shift keys (hold for shift, tap for respective parentheses) + * I never find myself using the right-modifiers on a standard keyboard, so I've only implemented LGUI and LALT. I have intentions of improving my use of the ctrl key in correct hand alternation, so CTRL is implemented in both outside corners of the home row. + + + #### Layer Shifting + * The 4th key on the bottom row of the left hand PCB is a **TAP_TOGGLE** macro for the *LOWER* layer + * The left 2U key is a **TAP_KEY** macro - Hold for momentary *LOWER* layer, Tap for Space. + * The right 2U key is a **TAP_KEY** macro - Hold for momentary *RAISE* layer, Tap for Enter + * The 2nd key on the bottom row of the right hand PCB is a **LAYER_MOMENTARY** for the *FUNCTION* layer + * The 3rd key on the bottom row of the right hand PCB is a **TAP_TOGGLE** macro for the *MOUSE* layer + +### LOWER - Numpad & Navigation keys + + ,-----------------------------------------. .-----------------------------------------. \ + | Tab | PgUp | Home | Up | End | | | 7 | 8 | 9 | \+ | | Del | \ + |------+------+------+------+------+------| |------+------+------+------+------+------| \ + | BS | PgDn | Left | Down |Right | | | 4 | 5 | 6 | Enter| | ' | \ + |------+------+------+------+------+------| |------+------+------+------+------+------| \ + | LSPO | Z | X | C | V | | | 1 | 2 | 3 | Enter| | RSPC | \ + |------+------+------+------+-------------| |-------------+------+------+------+------| \ + | Ctrl | LGUI | Alt | LOWER| Space/Lower | | 0 | \. | Fn | Menu | Ctrl | \ + '-----------------------------------------' '-----------------------------------------' \ + + * The *LOWER* layer contains a navigation cluster on the left hand and a numpad on the right. This layer is momentary when the left thumb-bar or LOWER key is held and toggled on/off when the LOWER key is tapped. + + * The Navigation cluster is offset to the right compared to the traditional **WASD** nav cluster. With this implementation, you don't need to move your hand from the home position when navigating. Page Up & Down keys are found on the far left of the cluster. + + + * All unused (blank on the above keymap) keys are locked out using the XXXXXXX filler (KC_NO), all modifiers (edge |_| keys \[except 0, \. & Fn\] on the above keymap) and the ZXCV cluster are transparent (_______) to the Base layer. + + - [] TO DO!! - It would be nice to have a **TAP_DANCE_DOUBLE** implementation whereby a double tap of the right 2U key sends KC_PENT + * Couldn't get this to work in Rev1, produced an error in the Make process. + * When this is done, I can remove the clunky double Enter on the 4th column of the right hand PCB. + +### RAISE - Symbol Layer + + > ,-----------------------------------------. .-----------------------------------------. \ + > | Esc | | | | | | | | | | | | Del | \ + > |------+------+------+------+------+------| |------+------+------+------+------+------| \ + > | BS | \! | @ | \# | $ | % | | ^ | & | \* | \- | \+ | ' | \ + > |------+------+------+------+------+------| |------+------+------+------+------+------| \ + > | LSBO | | | \{ | \[ | \` | | | | \] | \} | \. | ? | RSBC | \ + > |------+------+------+------+------+------| |------+------+------+------+------+------| \ + > | Ctrl | LGUI | Alt | | Space/Lower | | Enter/Raise | Fn | Mouse| Menu | Ctrl | \ + > '-----------------------------------------' '-----------------------------------------' \ + + * The *RAISE* layer contains the symbols. This layer is momentary when the right thumb bar is held. + * Standard symbols can be found on the home row, in the traditional number row order as they occur on a standard keyboard. + * Shifted symbols can be found on the second-from bottom row, abovee the bars - these include brackets, braces, grave and pipe keys. + * At this stage, you need to shift to get to the Tilde key. I'd like to remove the shift requirement as I've done with the Pipe, but we'll see. + * The Terminus_Mini implements the symbols on the top row, with numbers implemented on the home row. Implementing a third set of number keys (Base, *LOWER*, *RAISE*) in this keymap is probably overkill, but the current *RAISE* layout replicates the standard number row, so I don't see reason to change it. + * The bottom row of this layer is a replication of that of the Base layer, except that the **TAP_TOGGLE** *LOWER* key is blocked with **XXXXXXX**. + +### FUNCTION - Function & Media keys + + > ,-----------------------------------------. .-----------------------------------------. \ + > | Esc | Mute | Vol- | Vol+ | | RESET| | POWER| | | | | Ins | \ + > |------+------+------+------+------+------| |------+------+------+------+------+------| \ + > | Caps | Stop | |<< | >/|| | >>| | | | | | | | |PrtSc | \ + > |------+------+------+------+------+------| |------+------+------+------+------+------| \ + > | LSOB | | | | | | | | | | | |ScrLk | \ + > |------+------+------+------+------+------| |------+------+------+------+------+------| \ + > | Ctrl | LGUI | Alt | | Space/Lower | | Enter/Raise | Fn | Mouse| |PsBrk | \ + > '-----------------------------------------' '-----------------------------------------' \ + + * The *FUNCTION* layer contains media keys as well as the F-row. This layer is momentary and requires Fn to be held. + * The media cluster is based on the nav cluster in the *LOWER* layer, with RW, PP & FF in the Left, Down & Right positions. + * Mute, and Vol +/- are next to each other in ascending (L->R) volume order, Stop is below Mute. + * Insert, Print Screen, Scroll Lock & Pause Break are all implemented on the far right column. + I don't really use these keys so their position is not optimised. + * Caps lock is implemented on this layer, in the traditional position, in place of BackSpace on the Base layer. + * The RESET key will reset the Teensy for flashing and the Power key will initiate a shutdown of the PC. I've placed these in the far-reach index positions so that they are least likely to be pressed on accident. The power key is particularly dangerous, so I've placed it conciously on the right hand so that it becomes very awkward to activate with one hand (Fn needs to be held with the middle finger at the same time) + +### MOUSE - Mouse keys: The functionality of this layer is not as optimal as using a true mouse, generally slower but will work in a pinch. + > ,----------------------------------------. .----------------------------------------. + > | Tab | WhlU | WhlL | MsUp | WhlR | | | | M3 | M4 | M5 | | | \ + > |------+------+------+------+------+-----| |-----+------+------+------+------+------| \ + > | | WhlD | MsL | MsDn | MsR | | | |LClick|RClick| | | | \ + > |------+------+------+------+------+-----| |-----+------+------+------+------+------| \ + > | LSPO | | | | | | | | | | | | RSCB | \ + > |------+------+------+------+------+-----| |-----+------+------+------+------+------| \ + > | Ctrl | | | |Sensitivity | | Sensitivity| |MOUSE | | Ctrl | \ + > '----------------------------------------' '----------------------------------------' \ + + * The *MOUSE* layer contains keys replicating functions found on the mouse. + * The navigation cluster (Up, Down, Left, Right) is a replication of the Navigation cluster on the *LOWER* layer. The scroll keys are nalagous to the Page Up & Down keys. + *) The primary click (right & left) buttons are on the right home row (index & middle fingers) + * Secondary click buttons are above the standard keys (M3/Wheel click, M4, M5) but I do not use this function. \ No newline at end of file diff --git a/keyboards/handwired/terminus_mini/keymaps/default/rules.mk b/keyboards/handwired/terminus_mini/keymaps/default/rules.mk new file mode 100644 index 0000000000..1485c08320 --- /dev/null +++ b/keyboards/handwired/terminus_mini/keymaps/default/rules.mk @@ -0,0 +1,34 @@ +# Copyright 2013 Jun Wako +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + + +# QMK Build Options +# change to "no" to disable the options, or define them in the rules.mk in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +TAP_DANCE_ENABLE = no # Enable Tap Dance diff --git a/keyboards/handwired/terminus_mini/rules.mk b/keyboards/handwired/terminus_mini/rules.mk new file mode 100644 index 0000000000..d7acbf7d52 --- /dev/null +++ b/keyboards/handwired/terminus_mini/rules.mk @@ -0,0 +1,69 @@ +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=512 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +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 +TAP_DANCE_ENABLE = no # Enable tap dance diff --git a/keyboards/handwired/terminus_mini/terminus_mini.c b/keyboards/handwired/terminus_mini/terminus_mini.c new file mode 100644 index 0000000000..58edca7687 --- /dev/null +++ b/keyboards/handwired/terminus_mini/terminus_mini.c @@ -0,0 +1,43 @@ +/* Copyright 2017 James Morgan + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "terminus_mini.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/handwired/terminus_mini/terminus_mini.h b/keyboards/handwired/terminus_mini/terminus_mini.h new file mode 100644 index 0000000000..44590a191e --- /dev/null +++ b/keyboards/handwired/terminus_mini/terminus_mini.h @@ -0,0 +1,40 @@ +/* Copyright 2017 James Morgan + * + * 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 TERMINUS_MINI_H +#define TERMINUS_MINI_H + +#include "quantum.h" + +// This a shortcut to help you visually see your layout. +// The following is an example using the Terminus Mini layout +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array +#define TERMINUS_MINI( \ + 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, k35, k37, k38, k39, k3a, 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, k35, KC_NO, k37, k38, k39, k3a, k3b } \ +} + +#define KC_ KC_TRNS + +#endif \ No newline at end of file diff --git a/keyboards/nyquist/keymaps/DivergeJM/README.md b/keyboards/nyquist/keymaps/DivergeJM/README.md new file mode 100644 index 0000000000..37db5d3bae --- /dev/null +++ b/keyboards/nyquist/keymaps/DivergeJM/README.md @@ -0,0 +1,135 @@ +Copyright 2017 James Morgan + +#MogranJM's nyquist layout + + ***NOTE*** - As yet, this keymap has not been tested, I'm waiting on delivery of a plate and base before I assemble the keyboard. Though, the hex file does compile successfully... + +This keymap is based on my Terminus_Mini (../../../terminus_mini/default) layout (credit for the names of these layouts goes to UniKeyboard & reddit's /u/blahlicus) + +The terminus_mini is a handwired 4x12 ortholinear keyboard with two 2U thumb bar keys. This implementation of the layout converts it to a split 5x12 (two halves, each 5x6) keyboard with a 2U thumb key on the inner bottom corner of each half. + +The TERMINUS_MINI layout (../../../terminus_mini/terminus_mini.h) is handwired and the 2U keys are handled using KC_NO to detail that two columns do not have a 4th column. This layout is based on a PCB, so the keymap represents the 2U keys as duplicates of the same 1U key. + +> .----------------------------------------. .-----------------------------------------. \ +> | Esc | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | \ +> |-----+------+------+------+------+------| |------+------+------+------+------+------| \ +> | Tab | Q | W | F | P | G | | J | L | U | Y | ; | \\ | \ +> |-----+------+------+------+------+------| |------+------+------+------+------+------| \ +> | BS | A | R | S | T | D | | H | N | E | I | O | ' | \ +> |-----+------+------+------+------+------| |------+------+------+------+------+------| \ +> | LSPO| Z | X | C | V | B | | K | M | , | \. | / | RSPC | \ +> |-----+------+------+------+------+------| |------+------+------+------+------+------| \ +> | Ctrl| LGUI | LAlt | Lower| Space/Lower | | Enter/Raise | Fn | Mouse| Menu | Ctrl | \ +> '----------------------------------------' '-----------------------------------------' \ +\ +> [_COLEMAK] = KEYMAP( \ +> KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ +> KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS , \ +> KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ +> KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, \ +> KC_LCTL, KC_LGUI, KC_LALT, LWR, SPC_LW, SPC_LW, ENT_RS, ENT_RS, FNC, MSE, KC_APP, KC_RCTL \ +> ), + +##Layers + +### Base Layer - Colemak + * The base layout is Colemak. Since the CapsLock key is replaced with BackSpace, this layout has the delete key in the traditional backspace location. + * QWERTY and Dvorak layers have been removed from the keymap that was initially developed from the default Planck keymap. + * I've implemented COLEMAK = SAFE_RANGE when enumerating the custom_keycodes, but I don't actually know what this does... + + * Space cadet is implemented in the shift keys (hold for shift, tap for respective parentheses) + * I never find myself using the right-modifiers on a standard keyboard, so I've only implemented LGUI and LALT. I have intentions of improving my use of the ctrl key in correct hand alternation, so CTRL is implemented in both outside corners of the home row. + + + #### Layer Shifting + * The 4th key on the bottom row of the left hand PCB is a **TAP_TOGGLE** macro for the *LOWER* layer + * The left 2U key is a **TAP_KEY** macro - Hold for momentary *LOWER* layer, Tap for Space. + * The right 2U key is a **TAP_KEY** macro - Hold for momentary *RAISE* layer, Tap for Enter + * The 2nd key on the bottom row of the right hand PCB is a **LAYER_MOMENTARY** for the *FUNCTION* layer + * The 3rd key on the bottom row of the right hand PCB is a **TAP_TOGGLE** macro for the *MOUSE* layer + +### LOWER - Numpad & Navigation keys + + ,-----------------------------------------. .-----------------------------------------. \ + | Esc | | | | | | | = | / | \* | \- | | Del | \ + |------+------+------+------+------+------| |------+------+------+------+------+------| \ + | Tab | PgUp | Home | Up | End | | | 7 | 8 | 9 | \+ | | \\ | \ + |------+------+------+------+------+------| |------+------+------+------+------+------| \ + | BS | PgDn | Left | Down |Right | | | 4 | 5 | 6 | Enter| | ' | \ + |------+------+------+------+------+------| |------+------+------+------+------+------| \ + | LSPO | Z | X | C | V | | | 1 | 2 | 3 | Enter| | RSPC | \ + |------+------+------+------+-------------| |-------------+------+------+------+------| \ + | Ctrl | LGUI | Alt | LOWER| Space/Lower | | 0 | \. | Fn | Menu | Ctrl | \ + `-----------------------------------------' `-----------------------------------------' \ + + * The *LOWER* layer contains a navigation cluster on the left hand and a numpad on the right. This layer is momentary when the left thumb-bar or LOWER key is held and toggled on/off when the LOWER key is tapped. + + * The Navigation cluster is offset to the right compared to the traditional **WASD** nav cluster. With this implementation, you don't need to move your hand from the home position when navigating. Page Up & Down keys are found on the far left of the cluster. + + + * All unused (blank on the above keymap) keys are locked out using the XXXXXXX filler (KC_NO), all modifiers (edge |_| keys \[except 0, \. & Fn\] on the above keymap) and the ZXCV cluster are transparent (_______) to the Base layer. + + - [] TO DO!! - It would be nice to have a **TAP_DANCE_DOUBLE** implementation whereby a double tap of the right 2U key sends KC_PENT + * Couldn't get this to work in Rev1, produced an error in the Make process. + * When this is done, I can remove the clunky double Enter on the 4th column of the right hand PCB. + +### RAISE - Symbol Layer + + > ,-----------------------------------------. .-----------------------------------------. \ + > | Esc | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | \ + > |------+------+------+------+------+------| |------+------+------+------+------+------| \ + > | Tab | | | | | | | | | | | | \\ | \ + > |------+------+------+------+------+------| |------+------+------+------+------+------| \ + > | BS | \! | @ | \# | $ | % | | ^ | & | \* | \- | \+ | ' | \ + > |------+------+------+------+------+------| |------+------+------+------+------+------| \ + > | LSBO | | | \{ | \[ | \` | | | | \] | \} | \. | ? | RSBC | \ + > |------+------+------+------+------+------| |------+------+------+------+------+------| \ + > | Ctrl | LGUI | Alt | | Space/Lower | | Enter/Raise | Fn | Mouse| Menu | Ctrl | \ + > '-----------------------------------------' '-----------------------------------------' \ + + * The *RAISE* layer contains the symbols. This layer is momentary when the right thumb bar is held. + * Standard symbols can be found on the home row, in the traditional number row order as they occur on a standard keyboard. + * Shifted symbols can be found on the second-from bottom row, abovee the bars - these include brackets, braces, grave and pipe keys. + * At this stage, you need to shift to get to the Tilde key. I'd like to remove the shift requirement as I've done with the Pipe, but we'll see. + * The Terminus_Mini implements the symbols on the top row, with numbers implemented on the home row. Implementing a third set of number keys (Base, *LOWER*, *RAISE*) in this keymap is probably overkill, but the current *RAISE* layout replicates the standard number row, so I don't see reason to change it. + * The bottom row of this layer is a replication of that of the Base layer, except that the **TAP_TOGGLE** *LOWER* key is blocked with **XXXXXXX**. + +### FUNCTION - Function & Media keys + + > ,-----------------------------------------. .-----------------------------------------. \ + > | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | \ + > |------+------+------+------+------+------| |------+------+------+------+------+------| \ + > | Esc | Mute | Vol- | Vol+ | | RESET| | POWER| | | | | Ins | \ + > |------+------+------+------+------+------| |------+------+------+------+------+------| \ + > | Caps | Stop | |<< | >/|| | >>| | | | | | | | |PrtSc | \ + > |------+------+------+------+------+------| |------+------+------+------+------+------| \ + > | LSOB | | | | | | | | | | | |ScrLk | \ + > |------+------+------+------+------+------| |------+------+------+------+------+------| \ + > | Ctrl | LGUI | Alt | | Space/Lower | | Enter/Raise | Fn | Mouse| |PsBrk | \ + > '-----------------------------------------' '-----------------------------------------' \ + + * The *FUNCTION* layer contains media keys as well as the F-row. This layer is momentary and requires Fn to be held. + * The media cluster is based on the nav cluster in the *LOWER* layer, with RW, PP & FF in the Left, Down & Right positions. + * Mute, and Vol +/- are next to each other in ascending (L->R) volume order, Stop is below Mute. + * Insert, Print Screen, Scroll Lock & Pause Break are all implemented on the far right column. + I don't really use these keys so their position is not optimised. + * Caps lock is implemented on this layer, in the traditional position, in place of BackSpace on the Base layer. + * The RESET key will reset the board for flashing and the Power key will initiate a shutdown of the PC. I've placed these in the far-reach index positions so that they are least likely to be pressed on accident. The power key is particularly dangerous, so I've placed it conciously on the right hand so that it becomes very awkward to activate with one hand (Fn needs to be held with the middle finger at the same time) + +### MOUSE - Mouse keys: The functionality of this layer is not as optimal as using a true mouse, generally slower but will work in a pinch. + > ,----------------------------------------. .----------------------------------------. \ + > | Esc | | | | | | | | | | | | Del | \ + > |------+------+------+------+------+-----| |-----+------+------+------+------+------| \ + > | Tab | WhlU | WhlL | MsUp | WhlR | | | | M3 | M4 | M5 | | | \ + > |------+------+------+------+------+-----| |-----+------+------+------+------+------| \ + > | | WhlD | MsL | MsDn | MsR | | | |LClick|RClick| | | | \ + > |------+------+------+------+------+-----| |-----+------+------+------+------+------| \ + > | LSPO | | | | | | | | | | | | RSCB | \ + > |------+------+------+------+------+-----| |-----+------+------+------+------+------| \ + > | Ctrl | | | |Sensitivity | | Sensitivity| |MOUSE | | Ctrl | \ + > '----------------------------------------' '----------------------------------------' \ + + * The *MOUSE* layer contains keys replicating functions found on the mouse. + * The navigation cluster (Up, Down, Left, Right) is a replication of the Navigation cluster on the *LOWER* layer. The scroll keys are analagous to the Page Up & Down keys. + *) The primary click (right & left) buttons are on the right home row (index & middle fingers) + * Secondary click buttons are above the standard keys (M3/Wheel click, M4, M5) but I do not use this function. \ No newline at end of file diff --git a/keyboards/nyquist/keymaps/DivergeJM/config.h b/keyboards/nyquist/keymaps/DivergeJM/config.h new file mode 100644 index 0000000000..03f5b2de76 --- /dev/null +++ b/keyboards/nyquist/keymaps/DivergeJM/config.h @@ -0,0 +1,26 @@ +/* +Copyright 2017 James Morgan + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#define USE_SERIAL + +#define MASTER_LEFT +// #define _MASTER_RIGHT +// #define EE_HANDS + +#ifdef SUBPROJECT_rev1 + #include "../../rev1/config.h" +#endif diff --git a/keyboards/nyquist/keymaps/DivergeJM/keymap.c b/keyboards/nyquist/keymaps/DivergeJM/keymap.c new file mode 100644 index 0000000000..4bfff0d6c7 --- /dev/null +++ b/keyboards/nyquist/keymaps/DivergeJM/keymap.c @@ -0,0 +1,216 @@ +#include "nyquist.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum custom_layers { + _COLEMAK, + _LOWER, + _RAISE, + _FUNCTION, + _MOUSE, + _ADJUST, +}; + +enum custom_keycodes { + COLEMAK = SAFE_RANGE, + LOWER, + RAISE, + FUNCTION, + MOUSE, + ADJUST, +}; +/* +// Tap Dance Declarations +enum { + TD_ZERO_ENT = 0 +}; + +// Tap Dance Definitions + qk_tap_dance_action_t tap_dance_actions[] = { + [TD_ZERO_ENT] = ACTION_TAP_DANCE_DOUBLE(KC_0, KC_ENT) +}; +*/ + // Enable these functions using FUNC(n) macro. + const uint16_t PROGMEM fn_actions[] = { //ACTION_LAYER_TAP_TOGGLE requires that number of taps be defined in *config.h* - default set to 5 + [0] = ACTION_LAYER_TAP_KEY(_LOWER, KC_SPC), //Hold for momentary Lower layer, Tap for Space, + [1] = ACTION_LAYER_TAP_KEY(_RAISE, KC_ENT), //Hold for momentary Mouse layer, Tap for Enter, + [2] = ACTION_LAYER_TAP_TOGGLE(_LOWER), //Hold for momentary Lower, Tap for toggle Lower + [3] = ACTION_LAYER_TAP_TOGGLE(_MOUSE), //Hold for momentary Mouse, Tap for toggle Mouse + [4] = ACTION_LAYER_MOMENTARY(_FUNCTION) //Hold for momentary Function + }; + + +#define SPC_LW FUNC(0) +#define ENT_RS FUNC(1) +#define LWR FUNC(2) +#define MSE FUNC(3) +#define FNC FUNC(4) + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Colemak + * .----------------------------------------. .-----------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | + * |-----+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | Q | W | F | P | G | | J | L | U | Y | ; | \ | + * |-----+------+------+------+------+------| |------+------+------+------+------+------| + * | BS | A | R | S | T | D | | H | N | E | I | O | ' | + * |-----+------+------+------+------+------| |------+------+------+------+------+------| + * | LSPO| Z | X | C | V | B | | K | M | , | . | / | RSPC | + * |-----+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl| LGUI | LAlt | Lower| Space/Lower | | Enter/Raise | Fn | Mouse| Menu | Ctrl | + * `----------------------------------------' `-----------------------------------------' + */ +[_COLEMAK] = KEYMAP( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS , \ + KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, \ + KC_LCTL, KC_LGUI, KC_LALT, LWR, SPC_LW, SPC_LW, ENT_RS, ENT_RS, FNC, MSE, KC_APP, KC_RCTL \ + ), + + +/* Lower + * ,-----------------------------------------. .-----------------------------------------. + * | Esc | | | | | | | = | / | * | - | | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | PgUp | Home | Up | End | | | 7 | 8 | 9 | + | | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | BS | PgDn | Left | Down |Right | | | 4 | 5 | 6 | Enter| | ' | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | LSPO | Z | X | C | V | | | 1 | 2 | 3 | Enter| | RSPC | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | LGUI | Alt | Lower| Space/Lower | | 0 | . | Fn | Menu | Ctrl | + * `-----------------------------------------' `-----------------------------------------' + */ +[_LOWER] = KEYMAP( \ + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PEQL, KC_PSLS, KC_PAST, KC_MINS, XXXXXXX, KC_DEL, \ + _______, KC_PGUP, KC_HOME, KC_UP, KC_END, XXXXXXX, KC_7, KC_8, KC_9, KC_PPLS, XXXXXXX, _______, \ + _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, KC_4, KC_5, KC_6, KC_PENT, XXXXXXX, _______, \ + _______, _______, _______, _______, _______, XXXXXXX, KC_1, KC_2, KC_3, KC_PENT, XXXXXXX, _______, \ + _______, _______, _______, _______, _______, _______, KC_0, KC_0, KC_DOT, FNC, _______, _______ \ +), + + +/* Raise + * ,-----------------------------------------. .-----------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | | | | | | | | | | | | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | BS | ! | @ | # | $ | % | | ^ | & | * | - | + | " | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | LSBO | | | { | [ | ` | | | | ] | } | . | ? | RSBC | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | LGUI | Alt | | Space/Lower | | Enter/Raise | Fn | Mouse| Menu | Ctrl | + * `-----------------------------------------' `-----------------------------------------' +*/ +[_RAISE] = KEYMAP( \ + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSLS, \ + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_MINS, KC_EQL, _______, \ + _______, XXXXXXX, XXXXXXX, KC_LCBR, KC_LBRC, KC_GRV, KC_PIPE, KC_RBRC, KC_RCBR, KC_DOT, KC_SLSH, _______, \ + _______, _______, _______, XXXXXXX, _______, _______, ENT_RS, ENT_RS, FNC, MSE, _______, _______ \ + ), + + +/*Function + * ,-----------------------------------------. .-----------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Esc | Mute | Vol- | Vol+ | | RESET| | POWER| | | | | Ins | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Caps | Stop | |<< | >/|| | >>| | | | | | | | |PrtSc | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | LSOB | | | | | | | | | | | |ScrLk | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | LGUI | Alt | | Space/Lower | | Enter/Raise | Fn | Mouse| |PsBrk | + * `-----------------------------------------' `-----------------------------------------' + */ + +[_FUNCTION] = KEYMAP( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + _______, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, RESET, KC_PWR, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_INS , \ + KC_CAPS, KC_MSTP, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSCR, \ + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLCK, \ + _______, _______, _______, _______, _______, _______, _______, _______, FNC, _______, _______, KC_PAUS \ + ), + +/* MOUSE + * ,----------------------------------------. .----------------------------------------. + * | Esc | | | | | | | | | | | | Del | + * |------+------+------+------+------+-----| |-----+------+------+------+------+------| + * | Tab | WhlU | WhlL | MsUp | WhlR | | | | M1 | M2 | M3 | | | + * |------+------+------+------+------+-----| |-----+------+------+------+------+------| + * | | WhlD | MsL | MsDn | MsR | | | |LClick|RClick| | | | + * |------+------+------+------+------+-----| |-----+------+------+------+------+------| + * | LSPO | | | | | | | | | | | | RSCB | + * |------+------+------+------+------+-----| |-----+------+------+------+------+------| + * | Ctrl | | | |Sensitivity | | Sensitivity| |MOUSE | | Ctrl | + * `----------------------------------------' `----------------------------------------' + */ + +[_MOUSE] = KEYMAP( + KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_DEL, \ + KC_TAB, KC_WH_U, KC_WH_L, KC_MS_U, KC_WH_R, XXXXXXX, XXXXXXX, KC_BTN3, KC_BTN4, KC_BTN5, XXXXXXX, XXXXXXX, \ + KC_BSPC, KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, XXXXXXX, KC_BTN1, KC_BTN2, XXXXXXX, XXXXXXX, XXXXXXX, \ + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RSPC, \ + _______, XXXXXXX, XXXXXXX, XXXXXXX, KC_ACL1, KC_ACL1, KC_ACL0, KC_ACL0, XXXXXXX, MSE, XXXXXXX, KC_RCTL \ + ), + + +}; + +#ifdef AUDIO_ENABLE +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +#endif + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case COLEMAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_colemak, false, 0); + #endif + persistent_default_layer_set(1UL<<_COLEMAK); + } + 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; + } + return true; +} \ No newline at end of file diff --git a/keyboards/nyquist/keymaps/DivergeJM/rules.mk b/keyboards/nyquist/keymaps/DivergeJM/rules.mk new file mode 100644 index 0000000000..654e82a10f --- /dev/null +++ b/keyboards/nyquist/keymaps/DivergeJM/rules.mk @@ -0,0 +1,34 @@ +# Copyright 2017 James Morgan +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + + +# QMK Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +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 support (+2400 to 4200, depending on config) +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +TAP_DANCE_ENABLE = no # Enable Tap Dance From ad49db8cd2557b6c54531059d4d162623520bd17 Mon Sep 17 00:00:00 2001 From: skullydazed Date: Tue, 17 Oct 2017 16:47:49 -0700 Subject: [PATCH 17/52] Address #1689 by using a formula to define the breathing curve (#1692) * Address #1689 by using a formula to define the breathing curve and exposing defines to control the shape of the curve. * Tweak the behavior of breathing for clueboard --- docs/feature_rgblight.md | 6 ++++-- keyboards/clueboard_66/rev2/config.h | 2 ++ keyboards/clueboard_66/rev3/config.h | 2 ++ quantum/rgblight.c | 7 ++++++- quantum/rgblight.h | 8 ++++++++ 5 files changed, 22 insertions(+), 3 deletions(-) diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md index 4ee32f3ec2..c65a499fbe 100644 --- a/docs/feature_rgblight.md +++ b/docs/feature_rgblight.md @@ -49,8 +49,10 @@ If you have `#define RGBLIGHT_ANIMATIONS` in your `config.h` you will have a num | Option | Default Value | Description | |--------|---------------|-------------| | `RGBLIGHT_ANIMATIONS` | | `#define` this to enable animation modes. | -| `RGBLIGHT_EFFECT_SNAKE_LENGTH` | 4 | The number of LEDs to light up for the "snake" mode. | -| `RGBLIGHT_EFFECT_KNIGHT_LENGTH` | 3 | The number of LEDs to light up for the "knight" mode. | +| `RGBLIGHT_EFFECT_BREATHE_CENTER | 1.85 | Used to calculate the curve for the breathing animation. Valid values 1.0-2.7. | +| `RGBLIGHT_EFFECT_BREATHE_MAX | 255 | The maximum brightness for the breathing mode. Valid values 1-255. | +| `RGBLIGHT_EFFECT_SNAKE_LENGTH` | 4 | The number of LEDs to light up for the "snake" animation. | +| `RGBLIGHT_EFFECT_KNIGHT_LENGTH` | 3 | The number of LEDs to light up for the "knight" animation. | | `RGBLIGHT_EFFECT_KNIGHT_OFFSET` | 0 | Start the knight animation this many LEDs from the start of the strip. | | `RGBLIGHT_EFFECT_KNIGHT_LED_NUM` | RGBLED_NUM | The number of LEDs to have the "knight" animation travel. | | `RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL` | 1000 | How long to wait between light changes for the "christmas" animation. Specified in ms. | diff --git a/keyboards/clueboard_66/rev2/config.h b/keyboards/clueboard_66/rev2/config.h index 3c22c5b4a6..3c96f79870 100644 --- a/keyboards/clueboard_66/rev2/config.h +++ b/keyboards/clueboard_66/rev2/config.h @@ -36,6 +36,8 @@ #define RGBLIGHT_VAL_STEP 17 #define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_EFFECT_BREATHE_CENTER 1 +#define RGBLIGHT_EFFECT_BREATHE_MAX 200 #define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 666*2 #define RGBLIGHT_EFFECT_CHRISTMAS_STEP 1 #define RGBLIGHT_EFFECT_KNIGHT_LENGTH 3 // How many LEDs wide to light up diff --git a/keyboards/clueboard_66/rev3/config.h b/keyboards/clueboard_66/rev3/config.h index 5e645c78f0..513dc11696 100644 --- a/keyboards/clueboard_66/rev3/config.h +++ b/keyboards/clueboard_66/rev3/config.h @@ -36,6 +36,8 @@ #define RGBLIGHT_VAL_STEP 17 #define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_EFFECT_BREATHE_CENTER 1 +#define RGBLIGHT_EFFECT_BREATHE_MAX 200 #define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 666*2 #define RGBLIGHT_EFFECT_CHRISTMAS_STEP 1 #define RGBLIGHT_EFFECT_KNIGHT_LENGTH 3 // How many LEDs wide to light up diff --git a/quantum/rgblight.c b/quantum/rgblight.c index 0f02b9a64c..78072a61de 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -13,6 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ +#include #include #include #include @@ -465,13 +466,17 @@ void rgblight_task(void) { void rgblight_effect_breathing(uint8_t interval) { static uint8_t pos = 0; static uint16_t last_timer = 0; + float val; if (timer_elapsed(last_timer) < pgm_read_byte(&RGBLED_BREATHING_INTERVALS[interval])) { return; } last_timer = timer_read(); - rgblight_sethsv_noeeprom(rgblight_config.hue, rgblight_config.sat, pgm_read_byte(&LED_BREATHING_TABLE[pos])); + + // http://sean.voisen.org/blog/2011/10/breathing-led-with-arduino/ + val = (exp(sin((pos/255.0)*M_PI)) - RGBLIGHT_EFFECT_BREATHE_CENTER/M_E)*(RGBLIGHT_EFFECT_BREATHE_MAX/(M_E-1/M_E)); + rgblight_sethsv_noeeprom(rgblight_config.hue, rgblight_config.sat, val); pos = (pos + 1) % 256; } void rgblight_effect_rainbow_mood(uint8_t interval) { diff --git a/quantum/rgblight.h b/quantum/rgblight.h index c1b3378b33..fb79ce6ded 100644 --- a/quantum/rgblight.h +++ b/quantum/rgblight.h @@ -22,6 +22,14 @@ #define RGBLIGHT_MODES 1 #endif +#ifndef RGBLIGHT_EFFECT_BREATHE_CENTER +#define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1-2.7 +#endif + +#ifndef RGBLIGHT_EFFECT_BREATHE_MAX +#define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0-255 +#endif + #ifndef RGBLIGHT_EFFECT_SNAKE_LENGTH #define RGBLIGHT_EFFECT_SNAKE_LENGTH 4 #endif From 3f3fa0791895f14370b4bb3e8512597688c45122 Mon Sep 17 00:00:00 2001 From: skullydazed Date: Tue, 17 Oct 2017 18:05:21 -0700 Subject: [PATCH 18/52] Reorganize clueboard into a single directory (#1855) --- .../{clueboard_17 => clueboard/17}/clueboard_17.c | 0 .../{clueboard_17 => clueboard/17}/clueboard_17.h | 0 keyboards/{clueboard_17 => clueboard/17}/config.h | 0 .../17}/keymaps/default/keymap.c | 0 keyboards/{clueboard_17 => clueboard/17}/readme.md | 9 +++++---- keyboards/{clueboard_17 => clueboard/17}/rules.mk | 0 .../60}/boards/GENERIC_STM32_F303XC/board.c | 0 .../60}/boards/GENERIC_STM32_F303XC/board.h | 0 .../60}/boards/GENERIC_STM32_F303XC/board.mk | 0 .../60}/bootloader_defs.h | 0 keyboards/{clueboard_60 => clueboard/60}/chconf.h | 0 .../{clueboard_60 => clueboard/60}/clueboard_60.c | 0 .../{clueboard_60 => clueboard/60}/clueboard_60.h | 0 keyboards/{clueboard_60 => clueboard/60}/config.h | 0 keyboards/{clueboard_60 => clueboard/60}/halconf.h | 0 .../60}/keymaps/default/keymap.c | 0 .../60}/keymaps/default/readme.md | 0 .../60}/keymaps/default_aek/keymap.c | 0 .../60}/keymaps/default_aek/readme.md | 0 keyboards/{clueboard_60 => clueboard/60}/led.c | 0 keyboards/{clueboard_60 => clueboard/60}/matrix.c | 0 keyboards/{clueboard_60 => clueboard/60}/mcuconf.h | 0 keyboards/{clueboard_60 => clueboard/60}/readme.md | 2 +- keyboards/{clueboard_60 => clueboard/60}/rules.mk | 0 .../{clueboard_66 => clueboard/66}/clueboard_66.c | 0 .../{clueboard_66 => clueboard/66}/clueboard_66.h | 0 keyboards/{clueboard_66 => clueboard/66}/config.h | 4 ++-- .../66}/keymaps/bloodlvst/Makefile | 0 .../66}/keymaps/bloodlvst/config.h | 0 .../66}/keymaps/bloodlvst/keymap.c | 0 .../66}/keymaps/bloodlvst/readme.md | 0 .../66}/keymaps/bloodlvst/rules.mk | 0 .../66}/keymaps/caps_fn/keymap.c | 0 .../66}/keymaps/caps_fn/readme.md | 0 .../66}/keymaps/colemak/keymap.c | 0 .../66}/keymaps/default/keymap.c | 0 .../66}/keymaps/default/readme.md | 0 .../66}/keymaps/jokrik/keymap.c | 0 .../66}/keymaps/jokrik/readme.md | 0 .../66}/keymaps/mac_optimized/keymap.c | 0 .../66}/keymaps/mac_optimized/readme.md | 0 .../66}/keymaps/magicmonty/Makefile | 0 .../66}/keymaps/magicmonty/config.h | 0 .../66}/keymaps/magicmonty/keymap.c | 0 .../66}/keymaps/magicmonty/readme.md | 0 .../66}/keymaps/magicmonty/rules.mk | 0 .../66}/keymaps/maximised/keymap.c | 0 .../66}/keymaps/maximised/readme.md | 0 .../66}/keymaps/mouse_keys/Makefile | 0 .../66}/keymaps/mouse_keys/keymap.c | 0 .../66}/keymaps/mouse_keys/readme.md | 0 .../66}/keymaps/mouse_keys/rules.mk | 0 .../66}/keymaps/serubin/Makefile | 0 .../66}/keymaps/serubin/keymap.c | 0 .../66}/keymaps/serubin/readme.md | 0 .../66}/keymaps/serubin/rules.mk | 0 .../66}/keymaps/shift_fn/keymap.c | 0 .../66}/keymaps/shift_fn/readme.md | 0 .../66}/keymaps/skully/keymap.c | 0 .../66}/keymaps/skully/readme.md | 0 .../66}/keymaps/smt/keymap.c | 0 .../66}/keymaps/smt/readme.md | 0 .../66}/keymaps/tetris/Makefile | 0 .../66}/keymaps/tetris/keymap.c | 0 .../66}/keymaps/tetris/readme.md | 0 .../66}/keymaps/tetris/rules.mk | 0 .../66}/keymaps/tetris/tetris_text.c | 0 .../66}/keymaps/tetris/tetris_text.h | 0 .../66}/keymaps/unix_optimized/keymap.c | 0 .../66}/keymaps/unix_optimized/readme.md | 0 .../66}/keymaps/win_optimized/keymap.c | 0 .../66}/keymaps/win_optimized/readme.md | 0 .../66}/keymaps/xyverz/Makefile | 0 .../66}/keymaps/xyverz/keymap.c | 0 .../66}/keymaps/xyverz/rules.mk | 0 keyboards/{clueboard_66 => clueboard/66}/readme.md | 2 +- .../{clueboard_66 => clueboard/66}/rev1/config.h | 6 +++--- .../{clueboard_66 => clueboard/66}/rev1/rev1.c | 0 .../{clueboard_66 => clueboard/66}/rev1/rev1.h | 0 .../{clueboard_66 => clueboard/66}/rev1/rules.mk | 0 .../{clueboard_66 => clueboard/66}/rev2/config.h | 4 ++-- .../{clueboard_66 => clueboard/66}/rev2/rev2.c | 0 .../{clueboard_66 => clueboard/66}/rev2/rev2.h | 0 .../{clueboard_66 => clueboard/66}/rev2/rules.mk | 0 .../{clueboard_66 => clueboard/66}/rev3/config.h | 4 ++-- .../{clueboard_66 => clueboard/66}/rev3/rev3.c | 0 .../{clueboard_66 => clueboard/66}/rev3/rev3.h | 0 .../{clueboard_66 => clueboard/66}/rev3/rules.mk | 0 keyboards/{clueboard_66 => clueboard/66}/rules.mk | 3 +-- keyboards/{cluecard => clueboard/card}/cluecard.c | 0 keyboards/{cluecard => clueboard/card}/cluecard.h | 0 keyboards/{cluecard => clueboard/card}/config.h | 0 .../card}/keymaps/default/config.h | 0 .../card}/keymaps/default/keymap.c | 0 keyboards/clueboard/card/keymaps/default/readme.md | 3 +++ .../card}/keymaps/default/rules.mk | 0 .../card}/keymaps/rgb_effects/config.h | 0 .../card}/keymaps/rgb_effects/keymap.c | 0 .../card}/keymaps/rgb_effects/readme.md | 4 +--- .../card}/keymaps/rgb_effects/rules.mk | 0 keyboards/{cluecard => clueboard/card}/readme.md | 2 +- keyboards/{cluecard => clueboard/card}/rules.mk | 0 keyboards/clueboard/readme.md | 13 +++++++++++++ keyboards/cluecard/keymaps/default/readme.md | 5 ----- 104 files changed, 35 insertions(+), 26 deletions(-) rename keyboards/{clueboard_17 => clueboard/17}/clueboard_17.c (100%) rename keyboards/{clueboard_17 => clueboard/17}/clueboard_17.h (100%) rename keyboards/{clueboard_17 => clueboard/17}/config.h (100%) rename keyboards/{clueboard_17 => clueboard/17}/keymaps/default/keymap.c (100%) rename keyboards/{clueboard_17 => clueboard/17}/readme.md (59%) rename keyboards/{clueboard_17 => clueboard/17}/rules.mk (100%) rename keyboards/{clueboard_60 => clueboard/60}/boards/GENERIC_STM32_F303XC/board.c (100%) rename keyboards/{clueboard_60 => clueboard/60}/boards/GENERIC_STM32_F303XC/board.h (100%) rename keyboards/{clueboard_60 => clueboard/60}/boards/GENERIC_STM32_F303XC/board.mk (100%) rename keyboards/{clueboard_60 => clueboard/60}/bootloader_defs.h (100%) rename keyboards/{clueboard_60 => clueboard/60}/chconf.h (100%) rename keyboards/{clueboard_60 => clueboard/60}/clueboard_60.c (100%) rename keyboards/{clueboard_60 => clueboard/60}/clueboard_60.h (100%) rename keyboards/{clueboard_60 => clueboard/60}/config.h (100%) rename keyboards/{clueboard_60 => clueboard/60}/halconf.h (100%) rename keyboards/{clueboard_60 => clueboard/60}/keymaps/default/keymap.c (100%) rename keyboards/{clueboard_60 => clueboard/60}/keymaps/default/readme.md (100%) rename keyboards/{clueboard_60 => clueboard/60}/keymaps/default_aek/keymap.c (100%) rename keyboards/{clueboard_60 => clueboard/60}/keymaps/default_aek/readme.md (100%) rename keyboards/{clueboard_60 => clueboard/60}/led.c (100%) rename keyboards/{clueboard_60 => clueboard/60}/matrix.c (100%) rename keyboards/{clueboard_60 => clueboard/60}/mcuconf.h (100%) rename keyboards/{clueboard_60 => clueboard/60}/readme.md (92%) rename keyboards/{clueboard_60 => clueboard/60}/rules.mk (100%) rename keyboards/{clueboard_66 => clueboard/66}/clueboard_66.c (100%) rename keyboards/{clueboard_66 => clueboard/66}/clueboard_66.h (100%) rename keyboards/{clueboard_66 => clueboard/66}/config.h (96%) rename keyboards/{clueboard_66 => clueboard/66}/keymaps/bloodlvst/Makefile (100%) rename keyboards/{clueboard_66 => clueboard/66}/keymaps/bloodlvst/config.h (100%) rename keyboards/{clueboard_66 => clueboard/66}/keymaps/bloodlvst/keymap.c (100%) rename keyboards/{clueboard_66 => clueboard/66}/keymaps/bloodlvst/readme.md (100%) rename keyboards/{clueboard_66 => clueboard/66}/keymaps/bloodlvst/rules.mk (100%) rename keyboards/{clueboard_66 => clueboard/66}/keymaps/caps_fn/keymap.c (100%) rename keyboards/{clueboard_66 => clueboard/66}/keymaps/caps_fn/readme.md (100%) rename keyboards/{clueboard_66 => clueboard/66}/keymaps/colemak/keymap.c (100%) rename keyboards/{clueboard_66 => clueboard/66}/keymaps/default/keymap.c (100%) rename keyboards/{clueboard_66 => clueboard/66}/keymaps/default/readme.md (100%) rename keyboards/{clueboard_66 => clueboard/66}/keymaps/jokrik/keymap.c (100%) rename keyboards/{clueboard_66 => clueboard/66}/keymaps/jokrik/readme.md (100%) rename keyboards/{clueboard_66 => clueboard/66}/keymaps/mac_optimized/keymap.c (100%) rename keyboards/{clueboard_66 => clueboard/66}/keymaps/mac_optimized/readme.md (100%) rename keyboards/{clueboard_66 => clueboard/66}/keymaps/magicmonty/Makefile (100%) rename keyboards/{clueboard_66 => clueboard/66}/keymaps/magicmonty/config.h (100%) rename keyboards/{clueboard_66 => clueboard/66}/keymaps/magicmonty/keymap.c (100%) rename keyboards/{clueboard_66 => clueboard/66}/keymaps/magicmonty/readme.md (100%) rename keyboards/{clueboard_66 => clueboard/66}/keymaps/magicmonty/rules.mk (100%) rename keyboards/{clueboard_66 => clueboard/66}/keymaps/maximised/keymap.c (100%) rename keyboards/{clueboard_66 => clueboard/66}/keymaps/maximised/readme.md (100%) rename keyboards/{clueboard_66 => clueboard/66}/keymaps/mouse_keys/Makefile (100%) rename keyboards/{clueboard_66 => clueboard/66}/keymaps/mouse_keys/keymap.c (100%) rename keyboards/{clueboard_66 => clueboard/66}/keymaps/mouse_keys/readme.md (100%) rename keyboards/{clueboard_66 => clueboard/66}/keymaps/mouse_keys/rules.mk (100%) rename keyboards/{clueboard_66 => clueboard/66}/keymaps/serubin/Makefile (100%) rename keyboards/{clueboard_66 => clueboard/66}/keymaps/serubin/keymap.c (100%) rename keyboards/{clueboard_66 => clueboard/66}/keymaps/serubin/readme.md (100%) rename keyboards/{clueboard_66 => clueboard/66}/keymaps/serubin/rules.mk (100%) rename keyboards/{clueboard_66 => clueboard/66}/keymaps/shift_fn/keymap.c (100%) rename keyboards/{clueboard_66 => clueboard/66}/keymaps/shift_fn/readme.md (100%) rename keyboards/{clueboard_66 => clueboard/66}/keymaps/skully/keymap.c (100%) rename keyboards/{clueboard_66 => clueboard/66}/keymaps/skully/readme.md (100%) rename keyboards/{clueboard_66 => clueboard/66}/keymaps/smt/keymap.c (100%) rename keyboards/{clueboard_66 => clueboard/66}/keymaps/smt/readme.md (100%) rename keyboards/{clueboard_66 => clueboard/66}/keymaps/tetris/Makefile (100%) rename keyboards/{clueboard_66 => clueboard/66}/keymaps/tetris/keymap.c (100%) rename keyboards/{clueboard_66 => clueboard/66}/keymaps/tetris/readme.md (100%) rename keyboards/{clueboard_66 => clueboard/66}/keymaps/tetris/rules.mk (100%) rename keyboards/{clueboard_66 => clueboard/66}/keymaps/tetris/tetris_text.c (100%) rename keyboards/{clueboard_66 => clueboard/66}/keymaps/tetris/tetris_text.h (100%) rename keyboards/{clueboard_66 => clueboard/66}/keymaps/unix_optimized/keymap.c (100%) rename keyboards/{clueboard_66 => clueboard/66}/keymaps/unix_optimized/readme.md (100%) rename keyboards/{clueboard_66 => clueboard/66}/keymaps/win_optimized/keymap.c (100%) rename keyboards/{clueboard_66 => clueboard/66}/keymaps/win_optimized/readme.md (100%) rename keyboards/{clueboard_66 => clueboard/66}/keymaps/xyverz/Makefile (100%) rename keyboards/{clueboard_66 => clueboard/66}/keymaps/xyverz/keymap.c (100%) rename keyboards/{clueboard_66 => clueboard/66}/keymaps/xyverz/rules.mk (100%) rename keyboards/{clueboard_66 => clueboard/66}/readme.md (95%) rename keyboards/{clueboard_66 => clueboard/66}/rev1/config.h (91%) rename keyboards/{clueboard_66 => clueboard/66}/rev1/rev1.c (100%) rename keyboards/{clueboard_66 => clueboard/66}/rev1/rev1.h (100%) rename keyboards/{clueboard_66 => clueboard/66}/rev1/rules.mk (100%) rename keyboards/{clueboard_66 => clueboard/66}/rev2/config.h (94%) rename keyboards/{clueboard_66 => clueboard/66}/rev2/rev2.c (100%) rename keyboards/{clueboard_66 => clueboard/66}/rev2/rev2.h (100%) rename keyboards/{clueboard_66 => clueboard/66}/rev2/rules.mk (100%) rename keyboards/{clueboard_66 => clueboard/66}/rev3/config.h (94%) rename keyboards/{clueboard_66 => clueboard/66}/rev3/rev3.c (100%) rename keyboards/{clueboard_66 => clueboard/66}/rev3/rev3.h (100%) rename keyboards/{clueboard_66 => clueboard/66}/rev3/rules.mk (100%) rename keyboards/{clueboard_66 => clueboard/66}/rules.mk (95%) rename keyboards/{cluecard => clueboard/card}/cluecard.c (100%) rename keyboards/{cluecard => clueboard/card}/cluecard.h (100%) rename keyboards/{cluecard => clueboard/card}/config.h (100%) rename keyboards/{cluecard => clueboard/card}/keymaps/default/config.h (100%) rename keyboards/{cluecard => clueboard/card}/keymaps/default/keymap.c (100%) create mode 100644 keyboards/clueboard/card/keymaps/default/readme.md rename keyboards/{cluecard => clueboard/card}/keymaps/default/rules.mk (100%) rename keyboards/{cluecard => clueboard/card}/keymaps/rgb_effects/config.h (100%) rename keyboards/{cluecard => clueboard/card}/keymaps/rgb_effects/keymap.c (100%) rename keyboards/{cluecard => clueboard/card}/keymaps/rgb_effects/readme.md (53%) rename keyboards/{cluecard => clueboard/card}/keymaps/rgb_effects/rules.mk (100%) rename keyboards/{cluecard => clueboard/card}/readme.md (93%) rename keyboards/{cluecard => clueboard/card}/rules.mk (100%) create mode 100644 keyboards/clueboard/readme.md delete mode 100644 keyboards/cluecard/keymaps/default/readme.md diff --git a/keyboards/clueboard_17/clueboard_17.c b/keyboards/clueboard/17/clueboard_17.c similarity index 100% rename from keyboards/clueboard_17/clueboard_17.c rename to keyboards/clueboard/17/clueboard_17.c diff --git a/keyboards/clueboard_17/clueboard_17.h b/keyboards/clueboard/17/clueboard_17.h similarity index 100% rename from keyboards/clueboard_17/clueboard_17.h rename to keyboards/clueboard/17/clueboard_17.h diff --git a/keyboards/clueboard_17/config.h b/keyboards/clueboard/17/config.h similarity index 100% rename from keyboards/clueboard_17/config.h rename to keyboards/clueboard/17/config.h diff --git a/keyboards/clueboard_17/keymaps/default/keymap.c b/keyboards/clueboard/17/keymaps/default/keymap.c similarity index 100% rename from keyboards/clueboard_17/keymaps/default/keymap.c rename to keyboards/clueboard/17/keymaps/default/keymap.c diff --git a/keyboards/clueboard_17/readme.md b/keyboards/clueboard/17/readme.md similarity index 59% rename from keyboards/clueboard_17/readme.md rename to keyboards/clueboard/17/readme.md index f3590fdbb5..877adc7842 100644 --- a/keyboards/clueboard_17/readme.md +++ b/keyboards/clueboard/17/readme.md @@ -1,15 +1,16 @@ -# Cluepad +# Clueboard 17% (Formerly Cluepad) -![Cluepad](https://static1.squarespace.com/static/55c13bdee4b099be5dcb82eb/5842fbdce3df28eae5ec557e/5844fb2cb8a79bbdfd63bad1/1498501250178/IMGP3931.jpg?format=750w) +![Clueboard 17%](https://static1.squarespace.com/static/55c13bdee4b099be5dcb82eb/5842fbdce3df28eae5ec557e/5844fb2cb8a79bbdfd63bad1/1498501250178/IMGP3931.jpg?format=750w) A basic 17 key numpad PCB. * Keyboard Maintainer: [Zach White](https://github.com/skullydazed) -* Hardware Supported: Cluepad PCB 1.0 +* Hardware Supported: + * Cluepad PCB 1.0 * Hardware Availability: [clueboard.co](https://clueboard.co/) Make example for this keyboard (after setting up your build environment): - make clueboard_17:default + make clueboard/17:default See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/clueboard_17/rules.mk b/keyboards/clueboard/17/rules.mk similarity index 100% rename from keyboards/clueboard_17/rules.mk rename to keyboards/clueboard/17/rules.mk diff --git a/keyboards/clueboard_60/boards/GENERIC_STM32_F303XC/board.c b/keyboards/clueboard/60/boards/GENERIC_STM32_F303XC/board.c similarity index 100% rename from keyboards/clueboard_60/boards/GENERIC_STM32_F303XC/board.c rename to keyboards/clueboard/60/boards/GENERIC_STM32_F303XC/board.c diff --git a/keyboards/clueboard_60/boards/GENERIC_STM32_F303XC/board.h b/keyboards/clueboard/60/boards/GENERIC_STM32_F303XC/board.h similarity index 100% rename from keyboards/clueboard_60/boards/GENERIC_STM32_F303XC/board.h rename to keyboards/clueboard/60/boards/GENERIC_STM32_F303XC/board.h diff --git a/keyboards/clueboard_60/boards/GENERIC_STM32_F303XC/board.mk b/keyboards/clueboard/60/boards/GENERIC_STM32_F303XC/board.mk similarity index 100% rename from keyboards/clueboard_60/boards/GENERIC_STM32_F303XC/board.mk rename to keyboards/clueboard/60/boards/GENERIC_STM32_F303XC/board.mk diff --git a/keyboards/clueboard_60/bootloader_defs.h b/keyboards/clueboard/60/bootloader_defs.h similarity index 100% rename from keyboards/clueboard_60/bootloader_defs.h rename to keyboards/clueboard/60/bootloader_defs.h diff --git a/keyboards/clueboard_60/chconf.h b/keyboards/clueboard/60/chconf.h similarity index 100% rename from keyboards/clueboard_60/chconf.h rename to keyboards/clueboard/60/chconf.h diff --git a/keyboards/clueboard_60/clueboard_60.c b/keyboards/clueboard/60/clueboard_60.c similarity index 100% rename from keyboards/clueboard_60/clueboard_60.c rename to keyboards/clueboard/60/clueboard_60.c diff --git a/keyboards/clueboard_60/clueboard_60.h b/keyboards/clueboard/60/clueboard_60.h similarity index 100% rename from keyboards/clueboard_60/clueboard_60.h rename to keyboards/clueboard/60/clueboard_60.h diff --git a/keyboards/clueboard_60/config.h b/keyboards/clueboard/60/config.h similarity index 100% rename from keyboards/clueboard_60/config.h rename to keyboards/clueboard/60/config.h diff --git a/keyboards/clueboard_60/halconf.h b/keyboards/clueboard/60/halconf.h similarity index 100% rename from keyboards/clueboard_60/halconf.h rename to keyboards/clueboard/60/halconf.h diff --git a/keyboards/clueboard_60/keymaps/default/keymap.c b/keyboards/clueboard/60/keymaps/default/keymap.c similarity index 100% rename from keyboards/clueboard_60/keymaps/default/keymap.c rename to keyboards/clueboard/60/keymaps/default/keymap.c diff --git a/keyboards/clueboard_60/keymaps/default/readme.md b/keyboards/clueboard/60/keymaps/default/readme.md similarity index 100% rename from keyboards/clueboard_60/keymaps/default/readme.md rename to keyboards/clueboard/60/keymaps/default/readme.md diff --git a/keyboards/clueboard_60/keymaps/default_aek/keymap.c b/keyboards/clueboard/60/keymaps/default_aek/keymap.c similarity index 100% rename from keyboards/clueboard_60/keymaps/default_aek/keymap.c rename to keyboards/clueboard/60/keymaps/default_aek/keymap.c diff --git a/keyboards/clueboard_60/keymaps/default_aek/readme.md b/keyboards/clueboard/60/keymaps/default_aek/readme.md similarity index 100% rename from keyboards/clueboard_60/keymaps/default_aek/readme.md rename to keyboards/clueboard/60/keymaps/default_aek/readme.md diff --git a/keyboards/clueboard_60/led.c b/keyboards/clueboard/60/led.c similarity index 100% rename from keyboards/clueboard_60/led.c rename to keyboards/clueboard/60/led.c diff --git a/keyboards/clueboard_60/matrix.c b/keyboards/clueboard/60/matrix.c similarity index 100% rename from keyboards/clueboard_60/matrix.c rename to keyboards/clueboard/60/matrix.c diff --git a/keyboards/clueboard_60/mcuconf.h b/keyboards/clueboard/60/mcuconf.h similarity index 100% rename from keyboards/clueboard_60/mcuconf.h rename to keyboards/clueboard/60/mcuconf.h diff --git a/keyboards/clueboard_60/readme.md b/keyboards/clueboard/60/readme.md similarity index 92% rename from keyboards/clueboard_60/readme.md rename to keyboards/clueboard/60/readme.md index 7221c82039..b81d70d0c3 100644 --- a/keyboards/clueboard_60/readme.md +++ b/keyboards/clueboard/60/readme.md @@ -9,6 +9,6 @@ A fully customizable 60% keyboard. Make example for this keyboard (after setting up your build environment): - make clueboard_60:default:dfu-util + make clueboard/60:default See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/clueboard_60/rules.mk b/keyboards/clueboard/60/rules.mk similarity index 100% rename from keyboards/clueboard_60/rules.mk rename to keyboards/clueboard/60/rules.mk diff --git a/keyboards/clueboard_66/clueboard_66.c b/keyboards/clueboard/66/clueboard_66.c similarity index 100% rename from keyboards/clueboard_66/clueboard_66.c rename to keyboards/clueboard/66/clueboard_66.c diff --git a/keyboards/clueboard_66/clueboard_66.h b/keyboards/clueboard/66/clueboard_66.h similarity index 100% rename from keyboards/clueboard_66/clueboard_66.h rename to keyboards/clueboard/66/clueboard_66.h diff --git a/keyboards/clueboard_66/config.h b/keyboards/clueboard/66/config.h similarity index 96% rename from keyboards/clueboard_66/config.h rename to keyboards/clueboard/66/config.h index eaf3e073fb..dff5c96d0f 100644 --- a/keyboards/clueboard_66/config.h +++ b/keyboards/clueboard/66/config.h @@ -15,8 +15,8 @@ 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 +#ifndef CLUEBOARD_66_CONFIG_H +#define CLUEBOARD_66_CONFIG_H #include "config_common.h" diff --git a/keyboards/clueboard_66/keymaps/bloodlvst/Makefile b/keyboards/clueboard/66/keymaps/bloodlvst/Makefile similarity index 100% rename from keyboards/clueboard_66/keymaps/bloodlvst/Makefile rename to keyboards/clueboard/66/keymaps/bloodlvst/Makefile diff --git a/keyboards/clueboard_66/keymaps/bloodlvst/config.h b/keyboards/clueboard/66/keymaps/bloodlvst/config.h similarity index 100% rename from keyboards/clueboard_66/keymaps/bloodlvst/config.h rename to keyboards/clueboard/66/keymaps/bloodlvst/config.h diff --git a/keyboards/clueboard_66/keymaps/bloodlvst/keymap.c b/keyboards/clueboard/66/keymaps/bloodlvst/keymap.c similarity index 100% rename from keyboards/clueboard_66/keymaps/bloodlvst/keymap.c rename to keyboards/clueboard/66/keymaps/bloodlvst/keymap.c diff --git a/keyboards/clueboard_66/keymaps/bloodlvst/readme.md b/keyboards/clueboard/66/keymaps/bloodlvst/readme.md similarity index 100% rename from keyboards/clueboard_66/keymaps/bloodlvst/readme.md rename to keyboards/clueboard/66/keymaps/bloodlvst/readme.md diff --git a/keyboards/clueboard_66/keymaps/bloodlvst/rules.mk b/keyboards/clueboard/66/keymaps/bloodlvst/rules.mk similarity index 100% rename from keyboards/clueboard_66/keymaps/bloodlvst/rules.mk rename to keyboards/clueboard/66/keymaps/bloodlvst/rules.mk diff --git a/keyboards/clueboard_66/keymaps/caps_fn/keymap.c b/keyboards/clueboard/66/keymaps/caps_fn/keymap.c similarity index 100% rename from keyboards/clueboard_66/keymaps/caps_fn/keymap.c rename to keyboards/clueboard/66/keymaps/caps_fn/keymap.c diff --git a/keyboards/clueboard_66/keymaps/caps_fn/readme.md b/keyboards/clueboard/66/keymaps/caps_fn/readme.md similarity index 100% rename from keyboards/clueboard_66/keymaps/caps_fn/readme.md rename to keyboards/clueboard/66/keymaps/caps_fn/readme.md diff --git a/keyboards/clueboard_66/keymaps/colemak/keymap.c b/keyboards/clueboard/66/keymaps/colemak/keymap.c similarity index 100% rename from keyboards/clueboard_66/keymaps/colemak/keymap.c rename to keyboards/clueboard/66/keymaps/colemak/keymap.c diff --git a/keyboards/clueboard_66/keymaps/default/keymap.c b/keyboards/clueboard/66/keymaps/default/keymap.c similarity index 100% rename from keyboards/clueboard_66/keymaps/default/keymap.c rename to keyboards/clueboard/66/keymaps/default/keymap.c diff --git a/keyboards/clueboard_66/keymaps/default/readme.md b/keyboards/clueboard/66/keymaps/default/readme.md similarity index 100% rename from keyboards/clueboard_66/keymaps/default/readme.md rename to keyboards/clueboard/66/keymaps/default/readme.md diff --git a/keyboards/clueboard_66/keymaps/jokrik/keymap.c b/keyboards/clueboard/66/keymaps/jokrik/keymap.c similarity index 100% rename from keyboards/clueboard_66/keymaps/jokrik/keymap.c rename to keyboards/clueboard/66/keymaps/jokrik/keymap.c diff --git a/keyboards/clueboard_66/keymaps/jokrik/readme.md b/keyboards/clueboard/66/keymaps/jokrik/readme.md similarity index 100% rename from keyboards/clueboard_66/keymaps/jokrik/readme.md rename to keyboards/clueboard/66/keymaps/jokrik/readme.md diff --git a/keyboards/clueboard_66/keymaps/mac_optimized/keymap.c b/keyboards/clueboard/66/keymaps/mac_optimized/keymap.c similarity index 100% rename from keyboards/clueboard_66/keymaps/mac_optimized/keymap.c rename to keyboards/clueboard/66/keymaps/mac_optimized/keymap.c diff --git a/keyboards/clueboard_66/keymaps/mac_optimized/readme.md b/keyboards/clueboard/66/keymaps/mac_optimized/readme.md similarity index 100% rename from keyboards/clueboard_66/keymaps/mac_optimized/readme.md rename to keyboards/clueboard/66/keymaps/mac_optimized/readme.md diff --git a/keyboards/clueboard_66/keymaps/magicmonty/Makefile b/keyboards/clueboard/66/keymaps/magicmonty/Makefile similarity index 100% rename from keyboards/clueboard_66/keymaps/magicmonty/Makefile rename to keyboards/clueboard/66/keymaps/magicmonty/Makefile diff --git a/keyboards/clueboard_66/keymaps/magicmonty/config.h b/keyboards/clueboard/66/keymaps/magicmonty/config.h similarity index 100% rename from keyboards/clueboard_66/keymaps/magicmonty/config.h rename to keyboards/clueboard/66/keymaps/magicmonty/config.h diff --git a/keyboards/clueboard_66/keymaps/magicmonty/keymap.c b/keyboards/clueboard/66/keymaps/magicmonty/keymap.c similarity index 100% rename from keyboards/clueboard_66/keymaps/magicmonty/keymap.c rename to keyboards/clueboard/66/keymaps/magicmonty/keymap.c diff --git a/keyboards/clueboard_66/keymaps/magicmonty/readme.md b/keyboards/clueboard/66/keymaps/magicmonty/readme.md similarity index 100% rename from keyboards/clueboard_66/keymaps/magicmonty/readme.md rename to keyboards/clueboard/66/keymaps/magicmonty/readme.md diff --git a/keyboards/clueboard_66/keymaps/magicmonty/rules.mk b/keyboards/clueboard/66/keymaps/magicmonty/rules.mk similarity index 100% rename from keyboards/clueboard_66/keymaps/magicmonty/rules.mk rename to keyboards/clueboard/66/keymaps/magicmonty/rules.mk diff --git a/keyboards/clueboard_66/keymaps/maximised/keymap.c b/keyboards/clueboard/66/keymaps/maximised/keymap.c similarity index 100% rename from keyboards/clueboard_66/keymaps/maximised/keymap.c rename to keyboards/clueboard/66/keymaps/maximised/keymap.c diff --git a/keyboards/clueboard_66/keymaps/maximised/readme.md b/keyboards/clueboard/66/keymaps/maximised/readme.md similarity index 100% rename from keyboards/clueboard_66/keymaps/maximised/readme.md rename to keyboards/clueboard/66/keymaps/maximised/readme.md diff --git a/keyboards/clueboard_66/keymaps/mouse_keys/Makefile b/keyboards/clueboard/66/keymaps/mouse_keys/Makefile similarity index 100% rename from keyboards/clueboard_66/keymaps/mouse_keys/Makefile rename to keyboards/clueboard/66/keymaps/mouse_keys/Makefile diff --git a/keyboards/clueboard_66/keymaps/mouse_keys/keymap.c b/keyboards/clueboard/66/keymaps/mouse_keys/keymap.c similarity index 100% rename from keyboards/clueboard_66/keymaps/mouse_keys/keymap.c rename to keyboards/clueboard/66/keymaps/mouse_keys/keymap.c diff --git a/keyboards/clueboard_66/keymaps/mouse_keys/readme.md b/keyboards/clueboard/66/keymaps/mouse_keys/readme.md similarity index 100% rename from keyboards/clueboard_66/keymaps/mouse_keys/readme.md rename to keyboards/clueboard/66/keymaps/mouse_keys/readme.md diff --git a/keyboards/clueboard_66/keymaps/mouse_keys/rules.mk b/keyboards/clueboard/66/keymaps/mouse_keys/rules.mk similarity index 100% rename from keyboards/clueboard_66/keymaps/mouse_keys/rules.mk rename to keyboards/clueboard/66/keymaps/mouse_keys/rules.mk diff --git a/keyboards/clueboard_66/keymaps/serubin/Makefile b/keyboards/clueboard/66/keymaps/serubin/Makefile similarity index 100% rename from keyboards/clueboard_66/keymaps/serubin/Makefile rename to keyboards/clueboard/66/keymaps/serubin/Makefile diff --git a/keyboards/clueboard_66/keymaps/serubin/keymap.c b/keyboards/clueboard/66/keymaps/serubin/keymap.c similarity index 100% rename from keyboards/clueboard_66/keymaps/serubin/keymap.c rename to keyboards/clueboard/66/keymaps/serubin/keymap.c diff --git a/keyboards/clueboard_66/keymaps/serubin/readme.md b/keyboards/clueboard/66/keymaps/serubin/readme.md similarity index 100% rename from keyboards/clueboard_66/keymaps/serubin/readme.md rename to keyboards/clueboard/66/keymaps/serubin/readme.md diff --git a/keyboards/clueboard_66/keymaps/serubin/rules.mk b/keyboards/clueboard/66/keymaps/serubin/rules.mk similarity index 100% rename from keyboards/clueboard_66/keymaps/serubin/rules.mk rename to keyboards/clueboard/66/keymaps/serubin/rules.mk diff --git a/keyboards/clueboard_66/keymaps/shift_fn/keymap.c b/keyboards/clueboard/66/keymaps/shift_fn/keymap.c similarity index 100% rename from keyboards/clueboard_66/keymaps/shift_fn/keymap.c rename to keyboards/clueboard/66/keymaps/shift_fn/keymap.c diff --git a/keyboards/clueboard_66/keymaps/shift_fn/readme.md b/keyboards/clueboard/66/keymaps/shift_fn/readme.md similarity index 100% rename from keyboards/clueboard_66/keymaps/shift_fn/readme.md rename to keyboards/clueboard/66/keymaps/shift_fn/readme.md diff --git a/keyboards/clueboard_66/keymaps/skully/keymap.c b/keyboards/clueboard/66/keymaps/skully/keymap.c similarity index 100% rename from keyboards/clueboard_66/keymaps/skully/keymap.c rename to keyboards/clueboard/66/keymaps/skully/keymap.c diff --git a/keyboards/clueboard_66/keymaps/skully/readme.md b/keyboards/clueboard/66/keymaps/skully/readme.md similarity index 100% rename from keyboards/clueboard_66/keymaps/skully/readme.md rename to keyboards/clueboard/66/keymaps/skully/readme.md diff --git a/keyboards/clueboard_66/keymaps/smt/keymap.c b/keyboards/clueboard/66/keymaps/smt/keymap.c similarity index 100% rename from keyboards/clueboard_66/keymaps/smt/keymap.c rename to keyboards/clueboard/66/keymaps/smt/keymap.c diff --git a/keyboards/clueboard_66/keymaps/smt/readme.md b/keyboards/clueboard/66/keymaps/smt/readme.md similarity index 100% rename from keyboards/clueboard_66/keymaps/smt/readme.md rename to keyboards/clueboard/66/keymaps/smt/readme.md diff --git a/keyboards/clueboard_66/keymaps/tetris/Makefile b/keyboards/clueboard/66/keymaps/tetris/Makefile similarity index 100% rename from keyboards/clueboard_66/keymaps/tetris/Makefile rename to keyboards/clueboard/66/keymaps/tetris/Makefile diff --git a/keyboards/clueboard_66/keymaps/tetris/keymap.c b/keyboards/clueboard/66/keymaps/tetris/keymap.c similarity index 100% rename from keyboards/clueboard_66/keymaps/tetris/keymap.c rename to keyboards/clueboard/66/keymaps/tetris/keymap.c diff --git a/keyboards/clueboard_66/keymaps/tetris/readme.md b/keyboards/clueboard/66/keymaps/tetris/readme.md similarity index 100% rename from keyboards/clueboard_66/keymaps/tetris/readme.md rename to keyboards/clueboard/66/keymaps/tetris/readme.md diff --git a/keyboards/clueboard_66/keymaps/tetris/rules.mk b/keyboards/clueboard/66/keymaps/tetris/rules.mk similarity index 100% rename from keyboards/clueboard_66/keymaps/tetris/rules.mk rename to keyboards/clueboard/66/keymaps/tetris/rules.mk diff --git a/keyboards/clueboard_66/keymaps/tetris/tetris_text.c b/keyboards/clueboard/66/keymaps/tetris/tetris_text.c similarity index 100% rename from keyboards/clueboard_66/keymaps/tetris/tetris_text.c rename to keyboards/clueboard/66/keymaps/tetris/tetris_text.c diff --git a/keyboards/clueboard_66/keymaps/tetris/tetris_text.h b/keyboards/clueboard/66/keymaps/tetris/tetris_text.h similarity index 100% rename from keyboards/clueboard_66/keymaps/tetris/tetris_text.h rename to keyboards/clueboard/66/keymaps/tetris/tetris_text.h diff --git a/keyboards/clueboard_66/keymaps/unix_optimized/keymap.c b/keyboards/clueboard/66/keymaps/unix_optimized/keymap.c similarity index 100% rename from keyboards/clueboard_66/keymaps/unix_optimized/keymap.c rename to keyboards/clueboard/66/keymaps/unix_optimized/keymap.c diff --git a/keyboards/clueboard_66/keymaps/unix_optimized/readme.md b/keyboards/clueboard/66/keymaps/unix_optimized/readme.md similarity index 100% rename from keyboards/clueboard_66/keymaps/unix_optimized/readme.md rename to keyboards/clueboard/66/keymaps/unix_optimized/readme.md diff --git a/keyboards/clueboard_66/keymaps/win_optimized/keymap.c b/keyboards/clueboard/66/keymaps/win_optimized/keymap.c similarity index 100% rename from keyboards/clueboard_66/keymaps/win_optimized/keymap.c rename to keyboards/clueboard/66/keymaps/win_optimized/keymap.c diff --git a/keyboards/clueboard_66/keymaps/win_optimized/readme.md b/keyboards/clueboard/66/keymaps/win_optimized/readme.md similarity index 100% rename from keyboards/clueboard_66/keymaps/win_optimized/readme.md rename to keyboards/clueboard/66/keymaps/win_optimized/readme.md diff --git a/keyboards/clueboard_66/keymaps/xyverz/Makefile b/keyboards/clueboard/66/keymaps/xyverz/Makefile similarity index 100% rename from keyboards/clueboard_66/keymaps/xyverz/Makefile rename to keyboards/clueboard/66/keymaps/xyverz/Makefile diff --git a/keyboards/clueboard_66/keymaps/xyverz/keymap.c b/keyboards/clueboard/66/keymaps/xyverz/keymap.c similarity index 100% rename from keyboards/clueboard_66/keymaps/xyverz/keymap.c rename to keyboards/clueboard/66/keymaps/xyverz/keymap.c diff --git a/keyboards/clueboard_66/keymaps/xyverz/rules.mk b/keyboards/clueboard/66/keymaps/xyverz/rules.mk similarity index 100% rename from keyboards/clueboard_66/keymaps/xyverz/rules.mk rename to keyboards/clueboard/66/keymaps/xyverz/rules.mk diff --git a/keyboards/clueboard_66/readme.md b/keyboards/clueboard/66/readme.md similarity index 95% rename from keyboards/clueboard_66/readme.md rename to keyboards/clueboard/66/readme.md index c2423096ec..ad14ae9d69 100644 --- a/keyboards/clueboard_66/readme.md +++ b/keyboards/clueboard/66/readme.md @@ -13,6 +13,6 @@ A fully customizable 66% keyboard. Make example for this keyboard (after setting up your build environment): - make clueboard/rev3:default + make clueboard/66:default See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/clueboard_66/rev1/config.h b/keyboards/clueboard/66/rev1/config.h similarity index 91% rename from keyboards/clueboard_66/rev1/config.h rename to keyboards/clueboard/66/rev1/config.h index 519e4d3ecb..210718d560 100644 --- a/keyboards/clueboard_66/rev1/config.h +++ b/keyboards/clueboard/66/rev1/config.h @@ -1,5 +1,5 @@ -#ifndef REV2_CONFIG_H -#define REV2_CONFIG_H +#ifndef CLUEBOARD_66_REV1_CONFIG_H +#define CLUEBOARD_66_REV1_CONFIG_H #include "config_common.h" @@ -33,4 +33,4 @@ #define RGBLIGHT_VAL_STEP 17 -#endif \ No newline at end of file +#endif diff --git a/keyboards/clueboard_66/rev1/rev1.c b/keyboards/clueboard/66/rev1/rev1.c similarity index 100% rename from keyboards/clueboard_66/rev1/rev1.c rename to keyboards/clueboard/66/rev1/rev1.c diff --git a/keyboards/clueboard_66/rev1/rev1.h b/keyboards/clueboard/66/rev1/rev1.h similarity index 100% rename from keyboards/clueboard_66/rev1/rev1.h rename to keyboards/clueboard/66/rev1/rev1.h diff --git a/keyboards/clueboard_66/rev1/rules.mk b/keyboards/clueboard/66/rev1/rules.mk similarity index 100% rename from keyboards/clueboard_66/rev1/rules.mk rename to keyboards/clueboard/66/rev1/rules.mk diff --git a/keyboards/clueboard_66/rev2/config.h b/keyboards/clueboard/66/rev2/config.h similarity index 94% rename from keyboards/clueboard_66/rev2/config.h rename to keyboards/clueboard/66/rev2/config.h index 3c96f79870..6ab2b1127d 100644 --- a/keyboards/clueboard_66/rev2/config.h +++ b/keyboards/clueboard/66/rev2/config.h @@ -1,5 +1,5 @@ -#ifndef REV2_CONFIG_H -#define REV2_CONFIG_H +#ifndef CLUEBOARD_66_REV2_CONFIG_H +#define CLUEBOARD_66_REV2_CONFIG_H #include "config_common.h" diff --git a/keyboards/clueboard_66/rev2/rev2.c b/keyboards/clueboard/66/rev2/rev2.c similarity index 100% rename from keyboards/clueboard_66/rev2/rev2.c rename to keyboards/clueboard/66/rev2/rev2.c diff --git a/keyboards/clueboard_66/rev2/rev2.h b/keyboards/clueboard/66/rev2/rev2.h similarity index 100% rename from keyboards/clueboard_66/rev2/rev2.h rename to keyboards/clueboard/66/rev2/rev2.h diff --git a/keyboards/clueboard_66/rev2/rules.mk b/keyboards/clueboard/66/rev2/rules.mk similarity index 100% rename from keyboards/clueboard_66/rev2/rules.mk rename to keyboards/clueboard/66/rev2/rules.mk diff --git a/keyboards/clueboard_66/rev3/config.h b/keyboards/clueboard/66/rev3/config.h similarity index 94% rename from keyboards/clueboard_66/rev3/config.h rename to keyboards/clueboard/66/rev3/config.h index 513dc11696..218736a889 100644 --- a/keyboards/clueboard_66/rev3/config.h +++ b/keyboards/clueboard/66/rev3/config.h @@ -1,5 +1,5 @@ -#ifndef REV3_CONFIG_H -#define REV3_CONFIG_H +#ifndef CLUEBOARD_66_REV3_CONFIG_H +#define CLUEBOARD_66_REV3_CONFIG_H #include "config_common.h" diff --git a/keyboards/clueboard_66/rev3/rev3.c b/keyboards/clueboard/66/rev3/rev3.c similarity index 100% rename from keyboards/clueboard_66/rev3/rev3.c rename to keyboards/clueboard/66/rev3/rev3.c diff --git a/keyboards/clueboard_66/rev3/rev3.h b/keyboards/clueboard/66/rev3/rev3.h similarity index 100% rename from keyboards/clueboard_66/rev3/rev3.h rename to keyboards/clueboard/66/rev3/rev3.h diff --git a/keyboards/clueboard_66/rev3/rules.mk b/keyboards/clueboard/66/rev3/rules.mk similarity index 100% rename from keyboards/clueboard_66/rev3/rules.mk rename to keyboards/clueboard/66/rev3/rules.mk diff --git a/keyboards/clueboard_66/rules.mk b/keyboards/clueboard/66/rules.mk similarity index 95% rename from keyboards/clueboard_66/rules.mk rename to keyboards/clueboard/66/rules.mk index abab3bd5b7..d5d8ea0d20 100644 --- a/keyboards/clueboard_66/rules.mk +++ b/keyboards/clueboard/66/rules.mk @@ -1,3 +1,4 @@ +DEFAULT_FOLDER = clueboard/66/rev2 MCU = atmega32u4 F_CPU = 16000000 ARCH = AVR8 @@ -19,5 +20,3 @@ RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID - -DEFAULT_FOLDER = clueboard_66/rev2 diff --git a/keyboards/cluecard/cluecard.c b/keyboards/clueboard/card/cluecard.c similarity index 100% rename from keyboards/cluecard/cluecard.c rename to keyboards/clueboard/card/cluecard.c diff --git a/keyboards/cluecard/cluecard.h b/keyboards/clueboard/card/cluecard.h similarity index 100% rename from keyboards/cluecard/cluecard.h rename to keyboards/clueboard/card/cluecard.h diff --git a/keyboards/cluecard/config.h b/keyboards/clueboard/card/config.h similarity index 100% rename from keyboards/cluecard/config.h rename to keyboards/clueboard/card/config.h diff --git a/keyboards/cluecard/keymaps/default/config.h b/keyboards/clueboard/card/keymaps/default/config.h similarity index 100% rename from keyboards/cluecard/keymaps/default/config.h rename to keyboards/clueboard/card/keymaps/default/config.h diff --git a/keyboards/cluecard/keymaps/default/keymap.c b/keyboards/clueboard/card/keymaps/default/keymap.c similarity index 100% rename from keyboards/cluecard/keymaps/default/keymap.c rename to keyboards/clueboard/card/keymaps/default/keymap.c diff --git a/keyboards/clueboard/card/keymaps/default/readme.md b/keyboards/clueboard/card/keymaps/default/readme.md new file mode 100644 index 0000000000..53ba902536 --- /dev/null +++ b/keyboards/clueboard/card/keymaps/default/readme.md @@ -0,0 +1,3 @@ +# The default keymap for cluecard + +Note that this keymap has audio enabled, so the RGB mode button does not go through the different effects. So the LEDs will still show a static light, that is configurable with the hue, staturation and brightness buttons. You can of course also turn them on and off with the on/off button. diff --git a/keyboards/cluecard/keymaps/default/rules.mk b/keyboards/clueboard/card/keymaps/default/rules.mk similarity index 100% rename from keyboards/cluecard/keymaps/default/rules.mk rename to keyboards/clueboard/card/keymaps/default/rules.mk diff --git a/keyboards/cluecard/keymaps/rgb_effects/config.h b/keyboards/clueboard/card/keymaps/rgb_effects/config.h similarity index 100% rename from keyboards/cluecard/keymaps/rgb_effects/config.h rename to keyboards/clueboard/card/keymaps/rgb_effects/config.h diff --git a/keyboards/cluecard/keymaps/rgb_effects/keymap.c b/keyboards/clueboard/card/keymaps/rgb_effects/keymap.c similarity index 100% rename from keyboards/cluecard/keymaps/rgb_effects/keymap.c rename to keyboards/clueboard/card/keymaps/rgb_effects/keymap.c diff --git a/keyboards/cluecard/keymaps/rgb_effects/readme.md b/keyboards/clueboard/card/keymaps/rgb_effects/readme.md similarity index 53% rename from keyboards/cluecard/keymaps/rgb_effects/readme.md rename to keyboards/clueboard/card/keymaps/rgb_effects/readme.md index 949cac394e..f99dcebf0c 100644 --- a/keyboards/cluecard/keymaps/rgb_effects/readme.md +++ b/keyboards/clueboard/card/keymaps/rgb_effects/readme.md @@ -1,7 +1,5 @@ # RGB effect test keymap for cluecard -This keymap is made for testing the RGB effects. Audio is disabled and the mode buttons goes through each -effect. If you run HID-listen you will be able to see which effect is active. For a list of effects, check -the `rgblight.c` file. +This keymap is made for testing the RGB effects. Audio is disabled and the mode buttons goes through each effect. If you run HID-listen you will be able to see which effect is active. For a list of effects, check the `rgblight.c` file. The hue, saturation and brightness buttons will work depending on which effect is active. diff --git a/keyboards/cluecard/keymaps/rgb_effects/rules.mk b/keyboards/clueboard/card/keymaps/rgb_effects/rules.mk similarity index 100% rename from keyboards/cluecard/keymaps/rgb_effects/rules.mk rename to keyboards/clueboard/card/keymaps/rgb_effects/rules.mk diff --git a/keyboards/cluecard/readme.md b/keyboards/clueboard/card/readme.md similarity index 93% rename from keyboards/cluecard/readme.md rename to keyboards/clueboard/card/readme.md index 589eb57f37..27089d465b 100644 --- a/keyboards/cluecard/readme.md +++ b/keyboards/clueboard/card/readme.md @@ -8,6 +8,6 @@ A simple QMK dev kit. Make example for this keyboard (after setting up your build environment): - make cluecard:default + make clueboard/card:default See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/cluecard/rules.mk b/keyboards/clueboard/card/rules.mk similarity index 100% rename from keyboards/cluecard/rules.mk rename to keyboards/clueboard/card/rules.mk diff --git a/keyboards/clueboard/readme.md b/keyboards/clueboard/readme.md new file mode 100644 index 0000000000..5dfa1e3537 --- /dev/null +++ b/keyboards/clueboard/readme.md @@ -0,0 +1,13 @@ +# Clueboard + +![Clueboard Logo](https://static1.squarespace.com/static/55c13bdee4b099be5dcb82eb/t/59c9703318b27d1ab34f40df/1508257572555/) + +Clueboard makes fully customizable custom keyboards in a variety of formfactors. Inside this directory you'll find support for the entire line of Clueboard products. + +* Maintainer: [Zach White](https://github.com/skullydazed) +* Hardware Supported: + * [`17`](17/): Clueboard "Cluepad" PCB + * [`60`](60/): Clueboard 60% PCB + * [`66`](66/): Clueboard 66% PCB + * [`card`](card/): Special Cluecard PCB +* Hardware Availability: [clueboard.co](https://clueboard.co/) diff --git a/keyboards/cluecard/keymaps/default/readme.md b/keyboards/cluecard/keymaps/default/readme.md deleted file mode 100644 index fa4e8ccad4..0000000000 --- a/keyboards/cluecard/keymaps/default/readme.md +++ /dev/null @@ -1,5 +0,0 @@ -# The default keymap for cluecard - -Note that this keymap has audio enabled, so the RGB mode button does not go through the different effects. -So the LEDs will still show a static light, that is configurable with the hue, staturation and brightness -buttons. You can of course also turn them on and off with the on/off button. From 383e508bc56870aa971c4a881ed43dfe2f44f2ce Mon Sep 17 00:00:00 2001 From: Daniel Gordon Date: Wed, 18 Oct 2017 12:41:28 -0500 Subject: [PATCH 19/52] Quad Function Tap Dance added to TD Doc * Added section to example, detailing how to accomplish the 'quad-function' tap dance. * Refactored TD documentation to clearly separate different complex examples Change-Id: Ifc1495d1142849c771418fdabc458c04c48311e6 --- docs/tap_dance.md | 95 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 90 insertions(+), 5 deletions(-) diff --git a/docs/tap_dance.md b/docs/tap_dance.md index 442162765e..473725414a 100644 --- a/docs/tap_dance.md +++ b/docs/tap_dance.md @@ -63,20 +63,23 @@ qk_tap_dance_action_t tap_dance_actions[] = { TD(TD_ESC_CAPS) ``` -## Complex Example +## Complex Examples -Here's a more complex example involving custom actions: +This section details several complex tap dance examples. +All the enums used in the examples are declared like this: ```c +// Enums defined for all examples: enum { CT_SE = 0, CT_CLN, CT_EGG, CT_FLSH, + X_TAP_DANCE }; - -/* Have the above three on the keymap, TD(CT_SE), etc... */ - +``` +### Example 1: Send `:` on single tap, `;` on double tap +```c void dance_cln_finished (qk_tap_dance_state_t *state, void *user_data) { if (state->count == 1) { register_code (KC_RSFT); @@ -95,6 +98,13 @@ void dance_cln_reset (qk_tap_dance_state_t *state, void *user_data) { } } +//All tap dance functions would go here. Only showing this one. +qk_tap_dance_action_t tap_dance_actions[] = { + [CT_CLN] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, dance_cln_finished, dance_cln_reset) +}; +``` +### Example 2: Send "Safety Dance!" after 100 taps +```c void dance_egg (qk_tap_dance_state_t *state, void *user_data) { if (state->count >= 100) { SEND_STRING ("Safety dance!"); @@ -102,6 +112,14 @@ void dance_egg (qk_tap_dance_state_t *state, void *user_data) { } } +qk_tap_dance_action_t tap_dance_actions[] = { + [CT_EGG] = ACTION_TAP_DANCE_FN (dance_egg) +}; +``` + +### Example 3: Turn LED lights on then off, one at a time + +```c // on each tap, light up one led, from right to left // on the forth tap, turn them off from right to left void dance_flsh_each(qk_tap_dance_state_t *state, void *user_data) { @@ -141,6 +159,7 @@ void dance_flsh_reset(qk_tap_dance_state_t *state, void *user_data) { ergodox_right_led_3_off(); } +//All tap dances now put together. Example 3 is "CT_FLASH" qk_tap_dance_action_t tap_dance_actions[] = { [CT_SE] = ACTION_TAP_DANCE_DOUBLE (KC_SPC, KC_ENT) ,[CT_CLN] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, dance_cln_finished, dance_cln_reset) @@ -148,3 +167,69 @@ qk_tap_dance_action_t tap_dance_actions[] = { ,[CT_FLSH] = ACTION_TAP_DANCE_FN_ADVANCED (dance_flsh_each, dance_flsh_finished, dance_flsh_reset) }; ``` + +### Example 4: 'Quad Function Tap-Dance' + +By @DanielGGordon + +Allow one key to have 4 (or more) functions, depending on number of presses, and if the key is held or tapped. +Below is a specific example: +* Tap = Send `x` +* Hold = Send `Control` +* Double Tap = Send `Escape` +* Double Tap and Hold = Send `Alt` + +The following example can be easily expanded to more than 4 quite easily: +```c +//**************** Definitions needed for quad function to work *********************// +//Enums used to clearly convey the state of the tap dance +enum { + SINGLE_TAP = 1, + SINGLE_HOLD = 2, + DOUBLE_TAP = 3, + DOUBLE_HOLD = 4 + // Add more enums here if you want for triple, quadruple, etc. +}; + +typedef struct { + bool is_press_action; + int state; +} tap; + +int cur_dance (qk_tap_dance_state_t *state) { + if ((state->count == 1) && (!state->pressed)) return SINGLE_TAP; + else if ((state->count == 1) && (state->pressed)) return SINGLE_HOLD; + else if ((state->count == 2) && (!state->pressed)) return DOUBLE_TAP; + else if ((state->count == 2) && (state->pressed)) return DOUBLE_HOLD; + else return 5; //magic number. At some point this method will expand to work for more presses +} +//**************** Definitions needed for quad function to work *********************// + +//instanalize an instance of 'tap' for the 'x' tap dance. +static tap xtap_state = { + .is_press_action = true, + .state = 0 +}; + +void x_finished (qk_tap_dance_state_t *state, void *user_data) { + xtap_state.state = cur_dance(state); + switch (xtap_state.state) { + case SINGLE_TAP: register_code(KC_X); break; + case SINGLE_HOLD: register_code(KC_LCTRL); break; + case DOUBLE_TAP: register_code(KC_ESC); break; + case DOUBLE_HOLD: register_code(KC_LALT); + } +} + +void x_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (xtap_state.state) { + case SINGLE_TAP: unregister_code(KC_X); break; + case SINGLE_HOLD: unregister_code(KC_LCTRL); break; + case DOUBLE_TAP: unregister_code(KC_ESC); break; + case DOUBLE_HOLD: unregister_code(KC_LALT); + } + xtap_state.state = 0; +} +``` +And then simply add this to your list of tap dance functions: +`[X_TAP_DANCE] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, x_finished, x_reset)` From b5464cf20aa21bfe3671bd584dfc727878d508e0 Mon Sep 17 00:00:00 2001 From: Danny Date: Thu, 19 Oct 2017 10:02:00 -0400 Subject: [PATCH 20/52] Add Iris keyboard (#1863) * Clone Nyquist code to Iris and rename * Set keymap and pins * Work in progress Iris default keymap * Add Iris rev2 * Update Iris files to new build system * Add lewisridden keymap --- keyboards/iris/config.h | 23 + keyboards/iris/i2c.c | 162 +++++++ keyboards/iris/i2c.h | 49 ++ keyboards/iris/iris.c | 1 + keyboards/iris/iris.h | 28 ++ keyboards/iris/keymaps/default/config.h | 41 ++ keyboards/iris/keymaps/default/keymap.c | 137 ++++++ keyboards/iris/keymaps/default/rules.mk | 6 + keyboards/iris/keymaps/hexwire/config.h | 43 ++ keyboards/iris/keymaps/hexwire/keymap.c | 143 ++++++ keyboards/iris/keymaps/hexwire/rules.mk | 6 + keyboards/iris/keymaps/lewisridden/config.h | 41 ++ keyboards/iris/keymaps/lewisridden/keymap.c | 137 ++++++ keyboards/iris/keymaps/lewisridden/rules.mk | 6 + keyboards/iris/matrix.c | 477 ++++++++++++++++++++ keyboards/iris/readme.md | 20 + keyboards/iris/rev1/config.h | 92 ++++ keyboards/iris/rev1/rev1.c | 39 ++ keyboards/iris/rev1/rev1.h | 40 ++ keyboards/iris/rev1/rules.mk | 1 + keyboards/iris/rev2/config.h | 92 ++++ keyboards/iris/rev2/rev2.c | 39 ++ keyboards/iris/rev2/rev2.h | 40 ++ keyboards/iris/rev2/rules.mk | 2 + keyboards/iris/rules.mk | 77 ++++ keyboards/iris/serial.c | 228 ++++++++++ keyboards/iris/serial.h | 26 ++ keyboards/iris/split_rgb.c | 41 ++ keyboards/iris/split_rgb.h | 6 + keyboards/iris/split_util.c | 86 ++++ keyboards/iris/split_util.h | 20 + 31 files changed, 2149 insertions(+) create mode 100644 keyboards/iris/config.h create mode 100644 keyboards/iris/i2c.c create mode 100644 keyboards/iris/i2c.h create mode 100644 keyboards/iris/iris.c create mode 100644 keyboards/iris/iris.h create mode 100644 keyboards/iris/keymaps/default/config.h create mode 100644 keyboards/iris/keymaps/default/keymap.c create mode 100644 keyboards/iris/keymaps/default/rules.mk create mode 100644 keyboards/iris/keymaps/hexwire/config.h create mode 100644 keyboards/iris/keymaps/hexwire/keymap.c create mode 100644 keyboards/iris/keymaps/hexwire/rules.mk create mode 100644 keyboards/iris/keymaps/lewisridden/config.h create mode 100644 keyboards/iris/keymaps/lewisridden/keymap.c create mode 100644 keyboards/iris/keymaps/lewisridden/rules.mk create mode 100644 keyboards/iris/matrix.c create mode 100644 keyboards/iris/readme.md create mode 100644 keyboards/iris/rev1/config.h create mode 100644 keyboards/iris/rev1/rev1.c create mode 100644 keyboards/iris/rev1/rev1.h create mode 100644 keyboards/iris/rev1/rules.mk create mode 100644 keyboards/iris/rev2/config.h create mode 100644 keyboards/iris/rev2/rev2.c create mode 100644 keyboards/iris/rev2/rev2.h create mode 100644 keyboards/iris/rev2/rules.mk create mode 100644 keyboards/iris/rules.mk create mode 100644 keyboards/iris/serial.c create mode 100644 keyboards/iris/serial.h create mode 100644 keyboards/iris/split_rgb.c create mode 100644 keyboards/iris/split_rgb.h create mode 100644 keyboards/iris/split_util.c create mode 100644 keyboards/iris/split_util.h diff --git a/keyboards/iris/config.h b/keyboards/iris/config.h new file mode 100644 index 0000000000..863722d7d0 --- /dev/null +++ b/keyboards/iris/config.h @@ -0,0 +1,23 @@ +/* +Copyright 2017 Danny Nguyen + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +#endif // CONFIG_H diff --git a/keyboards/iris/i2c.c b/keyboards/iris/i2c.c new file mode 100644 index 0000000000..084c890c40 --- /dev/null +++ b/keyboards/iris/i2c.c @@ -0,0 +1,162 @@ +#include +#include +#include +#include +#include +#include +#include "i2c.h" + +#ifdef USE_I2C + +// Limits the amount of we wait for any one i2c transaction. +// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is +// 9 bits, a single transaction will take around 90μs to complete. +// +// (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit +// poll loop takes at least 8 clock cycles to execute +#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8 + +#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE) + +volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; + +static volatile uint8_t slave_buffer_pos; +static volatile bool slave_has_register_set = false; + +// Wait for an i2c operation to finish +inline static +void i2c_delay(void) { + uint16_t lim = 0; + while(!(TWCR & (1<10. + // Check datasheets for more info. + TWBR = ((F_CPU/SCL_CLOCK)-16)/2; +} + +// Start a transaction with the given i2c slave address. The direction of the +// transfer is set with I2C_READ and I2C_WRITE. +// returns: 0 => success +// 1 => error +uint8_t i2c_master_start(uint8_t address) { + TWCR = (1< slave ACK +// 1 => slave NACK +uint8_t i2c_master_write(uint8_t data) { + TWDR = data; + TWCR = (1<= SLAVE_BUFFER_SIZE ) { + ack = 0; + slave_buffer_pos = 0; + } + slave_has_register_set = true; + } else { + i2c_slave_buffer[slave_buffer_pos] = TWDR; + BUFFER_POS_INC(); + } + break; + + case TW_ST_SLA_ACK: + case TW_ST_DATA_ACK: + // master has addressed this device as a slave transmitter and is + // requesting data. + TWDR = i2c_slave_buffer[slave_buffer_pos]; + BUFFER_POS_INC(); + break; + + case TW_BUS_ERROR: // something went wrong, reset twi state + TWCR = 0; + default: + break; + } + // Reset everything, so we are ready for the next TWI interrupt + TWCR |= (1< + +#ifndef F_CPU +#define F_CPU 16000000UL +#endif + +#define I2C_READ 1 +#define I2C_WRITE 0 + +#define I2C_ACK 1 +#define I2C_NACK 0 + +#define SLAVE_BUFFER_SIZE 0x10 + +// i2c SCL clock frequency +#define SCL_CLOCK 100000L + +extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; + +void i2c_master_init(void); +uint8_t i2c_master_start(uint8_t address); +void i2c_master_stop(void); +uint8_t i2c_master_write(uint8_t data); +uint8_t i2c_master_read(int); +void i2c_reset_state(void); +void i2c_slave_init(uint8_t address); + + +static inline unsigned char i2c_start_read(unsigned char addr) { + return i2c_master_start((addr << 1) | I2C_READ); +} + +static inline unsigned char i2c_start_write(unsigned char addr) { + return i2c_master_start((addr << 1) | I2C_WRITE); +} + +// from SSD1306 scrips +extern unsigned char i2c_rep_start(unsigned char addr); +extern void i2c_start_wait(unsigned char addr); +extern unsigned char i2c_readAck(void); +extern unsigned char i2c_readNak(void); +extern unsigned char i2c_read(unsigned char ack); + +#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); + +#endif diff --git a/keyboards/iris/iris.c b/keyboards/iris/iris.c new file mode 100644 index 0000000000..fb28b3a6d6 --- /dev/null +++ b/keyboards/iris/iris.c @@ -0,0 +1 @@ +#include "iris.h" diff --git a/keyboards/iris/iris.h b/keyboards/iris/iris.h new file mode 100644 index 0000000000..ec2aabab0b --- /dev/null +++ b/keyboards/iris/iris.h @@ -0,0 +1,28 @@ +#ifndef IRIS_H +#define IRIS_H + +#ifdef KEYBOARD_iris_rev1 + #include "rev1.h" +#else + #include "rev2.h" +#endif + +#include "quantum.h" + +// Used to create a keymap using only KC_ prefixed keys +#define KC_KEYMAP( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, LT4, RT4, R30, R31, R32, R33, R34, R35, \ + LT1, LT2, LT3, RT3, RT2, RT1 \ + ) \ + KEYMAP( \ + KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \ + KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \ + KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \ + KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##LT4, KC_##RT4, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, \ + KC_##LT1, KC_##LT2, KC_##LT3, KC_##RT3, KC_##RT2, KC_##RT1 \ + ) + +#endif \ No newline at end of file diff --git a/keyboards/iris/keymaps/default/config.h b/keyboards/iris/keymaps/default/config.h new file mode 100644 index 0000000000..a6246262e5 --- /dev/null +++ b/keyboards/iris/keymaps/default/config.h @@ -0,0 +1,41 @@ +/* +Copyright 2017 Danny Nguyen + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define _MASTER_RIGHT +// #define EE_HANDS + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 12 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +#endif \ No newline at end of file diff --git a/keyboards/iris/keymaps/default/keymap.c b/keyboards/iris/keymaps/default/keymap.c new file mode 100644 index 0000000000..679eddc2e3 --- /dev/null +++ b/keyboards/iris/keymaps/default/keymap.c @@ -0,0 +1,137 @@ +#include "iris.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +#define _QWERTY 0 +#define _LOWER 1 +#define _RAISE 2 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, +}; + +#define KC_ KC_TRNS +#define _______ KC_TRNS + +#define KC_LOWR LOWER +#define KC_RASE RAISE +#define KC_RST RESET +#define KC_BL_S BL_STEP + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = KC_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + TAB , Q , W , E , R , T , Y , U , I , O , P ,DEL , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + RASE, A , S , D , F , G , H , J , K , L ,SCLN,QUOT, + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + LSFT, Z , X , C , V , B ,SPC , ENT , N , M ,COMM,DOT ,SLSH,RGHT, + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + LCTL,LOWR,SPC , ENT ,LGUI,LALT + // `----+----+----' `----+----+----' + ), + + [_LOWER] = KC_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + RST , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + DEL , ,LEFT,RGHT, UP ,LBRC, RBRC, P4 , P5 , P6 ,PLUS,PIPE, + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + BL_S, , , ,DOWN,LCBR,LPRN, RPRN,RCBR, P1 , P2 , P3 ,MINS, , + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + , ,DEL , DEL , , P0 + // `----+----+----' `----+----+----' + ), + + [_RAISE] = KC_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + ,MPRV,MNXT,VOLU,PGUP,UNDS, EQL ,HOME, , , ,BSLS, + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + MUTE,MSTP,MPLY,VOLD,PGDN,MINS, , ,PLUS,END , , , , , + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + , , , , , + // `----+----+----' `----+----+----' + ), + + [_ADJUST] = KEYMAP( + //,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------. + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + RESET , DEBUG , RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------. ,--------|--------+--------+--------+--------+--------+--------| + BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //`--------+--------+--------+----+---+--------+--------+--------/ \--------+--------+--------+---+----+--------+--------+--------' + _______, _______, _______, _______, _______, _______ + // `--------+--------+--------' `--------+--------+--------' + ) + +}; + +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +#endif + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_qwerty); + #endif + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} diff --git a/keyboards/iris/keymaps/default/rules.mk b/keyboards/iris/keymaps/default/rules.mk new file mode 100644 index 0000000000..22b6ec4766 --- /dev/null +++ b/keyboards/iris/keymaps/default/rules.mk @@ -0,0 +1,6 @@ +RGBLIGHT_ENABLE = yes +BACKLIGHT_ENABLE = yes + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/iris/keymaps/hexwire/config.h b/keyboards/iris/keymaps/hexwire/config.h new file mode 100644 index 0000000000..a85f0d8a9a --- /dev/null +++ b/keyboards/iris/keymaps/hexwire/config.h @@ -0,0 +1,43 @@ +/* +Copyright 2017 Danny Nguyen + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define _MASTER_RIGHT +// #define EE_HANDS + +#define TAPPING_TERM 150 + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 12 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +#endif \ No newline at end of file diff --git a/keyboards/iris/keymaps/hexwire/keymap.c b/keyboards/iris/keymaps/hexwire/keymap.c new file mode 100644 index 0000000000..997d2fcbd7 --- /dev/null +++ b/keyboards/iris/keymaps/hexwire/keymap.c @@ -0,0 +1,143 @@ +#include "iris.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +#define _QWERTY 0 +#define _LOWER 1 +#define _RAISE 2 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, +}; + +#define KC_ KC_TRNS +#define _______ KC_TRNS + +#define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen +#define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen +#define KC_CAPP LGUI(LSFT(KC_4)) // Capture portion of screen +#define KC_CPYP LGUI(LSFT(LCTL(KC_4))) // Copy portion of screen +#define KC_ESCC MT(MOD_LCTL, KC_ESC) +#define KC_LOWR LOWER +#define KC_RASE RAISE +#define KC_RST RESET +#define KC_BL_S BL_STEP +#define KC_ENTS MT(MOD_LSFT, KC_ENT) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = KC_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + TAB , Q , W , E , R , T , Y , U , I , O , P ,QUOT, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + ESCC, A , S , D , F , G , H , J , K , L ,SCLN,ENTS, + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + LSFT, Z , X , C , V , B ,SPC , LCTL, N , M ,COMM,DOT ,SLSH,ENTS, + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + LGUI,LOWR,SPC , BSPC,RASE,LALT + // `----+----+----' `----+----+----' + ), + + [_LOWER] = KC_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + RST , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + DEL ,CAPP,LEFT,RGHT, UP ,LBRC, RBRC, P4 , P5 , P6 ,PLUS,PIPE, + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + BL_S,CPYP, , ,DOWN,LCBR,LPRN, RPRN,RCBR, P1 , P2 , P3 ,MINS, , + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + , ,DEL , DEL , , P0 + // `----+----+----' `----+----+----' + ), + + [_RAISE] = KC_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + DEL ,MPRV,MNXT,VOLU,PGUP,UNDS, EQL ,HOME, , , ,BSLS, + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + MUTE,MSTP,MPLY,VOLD,PGDN,MINS, , ,PLUS,END , , , , , + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + , , , , , + // `----+----+----' `----+----+----' + ), + + [_ADJUST] = KEYMAP( + //,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------. + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + RESET , DEBUG , RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------. ,--------|--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //`--------+--------+--------+----+---+--------+--------+--------/ \--------+--------+--------+---+----+--------+--------+--------' + _______, _______, _______, _______, _______, _______ + // `--------+--------+--------' `--------+--------+--------' + ) + +}; + +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +#endif + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_qwerty); + #endif + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} diff --git a/keyboards/iris/keymaps/hexwire/rules.mk b/keyboards/iris/keymaps/hexwire/rules.mk new file mode 100644 index 0000000000..22b6ec4766 --- /dev/null +++ b/keyboards/iris/keymaps/hexwire/rules.mk @@ -0,0 +1,6 @@ +RGBLIGHT_ENABLE = yes +BACKLIGHT_ENABLE = yes + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/iris/keymaps/lewisridden/config.h b/keyboards/iris/keymaps/lewisridden/config.h new file mode 100644 index 0000000000..2540121754 --- /dev/null +++ b/keyboards/iris/keymaps/lewisridden/config.h @@ -0,0 +1,41 @@ +/* +Copyright 2017 Danny Nguyen + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +/* Use I2C or Serial, not both */ + +//#define USE_SERIAL +#define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define _MASTER_RIGHT +// #define EE_HANDS + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 12 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +#endif diff --git a/keyboards/iris/keymaps/lewisridden/keymap.c b/keyboards/iris/keymaps/lewisridden/keymap.c new file mode 100644 index 0000000000..4c5033d1f8 --- /dev/null +++ b/keyboards/iris/keymaps/lewisridden/keymap.c @@ -0,0 +1,137 @@ +#include "iris.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +#define _QWERTY 0 +#define _LOWER 1 +#define _RAISE 2 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, +}; + +#define KC_ KC_TRNS +#define _______ KC_TRNS + +#define KC_LOWR LOWER +#define KC_RASE RAISE +#define KC_RST RESET +#define KC_BL_S BL_STEP + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = KC_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + TAB , Q , W , E , R , T , Y , U , I , O , P ,DEL , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + RASE, A , S , D , F , G , H , J , K , L ,SCLN,QUOT, + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + LSFT, Z , X , C , V , B ,SPC , PSCR , N , M ,COMM,DOT ,SLSH,RGHT, + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + LCTL,LOWR,SPC , ENT ,LGUI,LALT + // `----+----+----' `----+----+----' + ), + + [_LOWER] = KC_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , ,PGUP, , ,LBRC, RBRC, P7 , P8 , P9 ,PLUS, , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + ,HOME,PGDN,END, ,LPRN, RPRN, P4 , P5 , P6 ,MINS,PIPE, + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + , , , , , , , , , P1 , P2 , P3 ,EQL ,UNDS , + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + , ,DEL , BSPC , , P0 + // `----+----+----' `----+----+----' + +), + [_RAISE] = KC_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , UP , , ,LBRC, RBRC, ,NLCK,INS ,SLCK,MUTE, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + ,LEFT,DOWN,RGHT, ,LPRN, RPRN,MPRV,MPLY,MNXT, ,VOLU, + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + , , , , , , , , , , , , ,VOLD, + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + , , , , , + // `----+----+----' `----+----+----' + ), + + [_ADJUST] = KEYMAP( + //,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------. + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + RESET , DEBUG , RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------. ,--------|--------+--------+--------+--------+--------+--------| + BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //`--------+--------+--------+----+---+--------+--------+--------/ \--------+--------+--------+---+----+--------+--------+--------' + _______, _______, _______, _______, _______, _______ + // `--------+--------+--------' `--------+--------+--------' + ) + +}; + +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +#endif + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_qwerty); + #endif + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} diff --git a/keyboards/iris/keymaps/lewisridden/rules.mk b/keyboards/iris/keymaps/lewisridden/rules.mk new file mode 100644 index 0000000000..22b6ec4766 --- /dev/null +++ b/keyboards/iris/keymaps/lewisridden/rules.mk @@ -0,0 +1,6 @@ +RGBLIGHT_ENABLE = yes +BACKLIGHT_ENABLE = yes + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/iris/matrix.c b/keyboards/iris/matrix.c new file mode 100644 index 0000000000..b83311ce16 --- /dev/null +++ b/keyboards/iris/matrix.c @@ -0,0 +1,477 @@ +/* +Copyright 2017 Danny Nguyen + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +/* + * scan matrix + */ +#include +#include +#include +#include "wait.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "split_util.h" +#include "pro_micro.h" +#include "config.h" +#include "timer.h" +#include "backlight.h" + +#ifdef USE_I2C +# include "i2c.h" +#else // USE_SERIAL +# include "serial.h" +#endif + +#ifndef DEBOUNCING_DELAY +# define DEBOUNCING_DELAY 5 +#endif + +#if (DEBOUNCING_DELAY > 0) + static uint16_t debouncing_time; + static bool debouncing = false; +#endif + +#if (MATRIX_COLS <= 8) +# define print_matrix_header() print("\nr/c 01234567\n") +# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop(matrix[i]) +# define ROW_SHIFTER ((uint8_t)1) +#else +# error "Currently only supports 8 COLS" +#endif +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + +#define ERROR_DISCONNECT_COUNT 5 + +#define SERIAL_LED_ADDR 0x00 + +#define ROWS_PER_HAND (MATRIX_ROWS/2) + +static uint8_t error_count = 0; + +static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; + +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + +#if (DIODE_DIRECTION == COL2ROW) + static void init_cols(void); + static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row); + static void unselect_rows(void); + static void select_row(uint8_t row); + static void unselect_row(uint8_t row); +#elif (DIODE_DIRECTION == ROW2COL) + static void init_rows(void); + static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col); + static void unselect_cols(void); + static void unselect_col(uint8_t col); + static void select_col(uint8_t col); +#endif +__attribute__ ((weak)) +void matrix_init_quantum(void) { + matrix_init_kb(); +} + +__attribute__ ((weak)) +void matrix_scan_quantum(void) { + matrix_scan_kb(); +} + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +__attribute__ ((weak)) +void matrix_init_user(void) { +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +inline +uint8_t matrix_rows(void) +{ + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) +{ + return MATRIX_COLS; +} + +void matrix_init(void) +{ + debug_enable = true; + debug_matrix = true; + debug_mouse = true; + // initialize row and col + unselect_rows(); + init_cols(); + + TX_RX_LED_INIT; + + // initialize matrix state: all keys off + for (uint8_t i=0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + matrix_debouncing[i] = 0; + } + + matrix_init_quantum(); + +} + +uint8_t _matrix_scan(void) +{ + int offset = isLeftHand ? 0 : (ROWS_PER_HAND); +#if (DIODE_DIRECTION == COL2ROW) + // Set row, read cols + for (uint8_t current_row = 0; current_row < ROWS_PER_HAND; current_row++) { +# if (DEBOUNCING_DELAY > 0) + bool matrix_changed = read_cols_on_row(matrix_debouncing+offset, current_row); + + if (matrix_changed) { + debouncing = true; + debouncing_time = timer_read(); + PORTD ^= (1 << 2); + } + +# else + read_cols_on_row(matrix+offset, current_row); +# endif + + } + +#elif (DIODE_DIRECTION == ROW2COL) + // Set col, read rows + for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { +# if (DEBOUNCING_DELAY > 0) + bool matrix_changed = read_rows_on_col(matrix_debouncing+offset, current_col); + if (matrix_changed) { + debouncing = true; + debouncing_time = timer_read(); + } +# else + read_rows_on_col(matrix+offset, current_col); +# endif + + } +#endif + +# if (DEBOUNCING_DELAY > 0) + if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) { + for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { + matrix[i+offset] = matrix_debouncing[i+offset]; + } + debouncing = false; + } +# endif + + return 1; +} + +#ifdef USE_I2C + +// Get rows from other half over i2c +int i2c_transaction(void) { + int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; + + int err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE); + if (err) goto i2c_error; + + // start of matrix stored at 0x00 + err = i2c_master_write(0x00); + if (err) goto i2c_error; + + // Start read + err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ); + if (err) goto i2c_error; + + if (!err) { + int i; + for (i = 0; i < ROWS_PER_HAND-1; ++i) { + matrix[slaveOffset+i] = i2c_master_read(I2C_ACK); + } + matrix[slaveOffset+i] = i2c_master_read(I2C_NACK); + i2c_master_stop(); + } else { +i2c_error: // the cable is disconnceted, or something else went wrong + i2c_reset_state(); + return err; + } + + return 0; +} + +#else // USE_SERIAL + +int serial_transaction(void) { + int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; + + if (serial_update_buffers()) { + return 1; + } + + for (int i = 0; i < ROWS_PER_HAND; ++i) { + matrix[slaveOffset+i] = serial_slave_buffer[i]; + } + +#ifdef BACKLIGHT_ENABLE + // Write backlight level for slave to read + serial_master_buffer[SERIAL_LED_ADDR] = get_backlight_level(); +#endif + return 0; +} +#endif + +uint8_t matrix_scan(void) +{ + uint8_t ret = _matrix_scan(); + +#ifdef USE_I2C + if( i2c_transaction() ) { +#else // USE_SERIAL + if( serial_transaction() ) { +#endif + // turn on the indicator led when halves are disconnected + TXLED1; + + error_count++; + + if (error_count > ERROR_DISCONNECT_COUNT) { + // reset other half if disconnected + int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; + for (int i = 0; i < ROWS_PER_HAND; ++i) { + matrix[slaveOffset+i] = 0; + } + } + } else { + // turn off the indicator led on no error + TXLED0; + error_count = 0; + } + matrix_scan_quantum(); + return ret; +} + +void matrix_slave_scan(void) { + _matrix_scan(); + + int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; + +#ifdef USE_I2C + for (int i = 0; i < ROWS_PER_HAND; ++i) { + i2c_slave_buffer[i] = matrix[offset+i]; + } +#else // USE_SERIAL + for (int i = 0; i < ROWS_PER_HAND; ++i) { + serial_slave_buffer[i] = matrix[offset+i]; + } + +#ifdef BACKLIGHT_ENABLE + // Read backlight level sent from master and update level on slave + backlight_set(serial_master_buffer[SERIAL_LED_ADDR]); +#endif +#endif +} + +bool matrix_is_modified(void) +{ + if (debouncing) return false; + return true; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1<> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + } +} + +static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) +{ + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[current_row]; + + // Clear data in matrix row + current_matrix[current_row] = 0; + + // Select row and wait for row selecton to stabilize + select_row(current_row); + wait_us(30); + + // For each col... + for(uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { + + // Select the col pin to read (active low) + uint8_t pin = col_pins[col_index]; + uint8_t pin_state = (_SFR_IO8(pin >> 4) & _BV(pin & 0xF)); + + // Populate the matrix row with the state of the col pin + current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index); + } + + // Unselect row + unselect_row(current_row); + + return (last_row_value != current_matrix[current_row]); +} + +static void select_row(uint8_t row) +{ + uint8_t pin = row_pins[row]; + _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT + _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW +} + +static void unselect_row(uint8_t row) +{ + uint8_t pin = row_pins[row]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI +} + +static void unselect_rows(void) +{ + for(uint8_t x = 0; x < ROWS_PER_HAND; x++) { + uint8_t pin = row_pins[x]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + } +} + +#elif (DIODE_DIRECTION == ROW2COL) + +static void init_rows(void) +{ + for(uint8_t x = 0; x < ROWS_PER_HAND; x++) { + uint8_t pin = row_pins[x]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + } +} + +static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) +{ + bool matrix_changed = false; + + // Select col and wait for col selecton to stabilize + select_col(current_col); + wait_us(30); + + // For each row... + for(uint8_t row_index = 0; row_index < ROWS_PER_HAND; row_index++) + { + + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[row_index]; + + // Check row pin state + if ((_SFR_IO8(row_pins[row_index] >> 4) & _BV(row_pins[row_index] & 0xF)) == 0) + { + // Pin LO, set col bit + current_matrix[row_index] |= (ROW_SHIFTER << current_col); + } + else + { + // Pin HI, clear col bit + current_matrix[row_index] &= ~(ROW_SHIFTER << current_col); + } + + // Determine if the matrix changed state + if ((last_row_value != current_matrix[row_index]) && !(matrix_changed)) + { + matrix_changed = true; + } + } + + // Unselect col + unselect_col(current_col); + + return matrix_changed; +} + +static void select_col(uint8_t col) +{ + uint8_t pin = col_pins[col]; + _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT + _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW +} + +static void unselect_col(uint8_t col) +{ + uint8_t pin = col_pins[col]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI +} + +static void unselect_cols(void) +{ + for(uint8_t x = 0; x < MATRIX_COLS; x++) { + uint8_t pin = col_pins[x]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + } +} + +#endif diff --git a/keyboards/iris/readme.md b/keyboards/iris/readme.md new file mode 100644 index 0000000000..1ef27f422d --- /dev/null +++ b/keyboards/iris/readme.md @@ -0,0 +1,20 @@ +Iris +==== + +A split ergo 4x6 keyboard with 3 or 4 thumb keys made and sold by Keebio. [More info at Keebio](https://keeb.io). + +Keyboard Maintainer: [Bakingpy/nooges](https://github.com/nooges) +Hardware Supported: Pro Micro +Hardware Availability: [Keebio](https://keeb.io) + +Make example for this keyboard (after setting up your build environment): + + make iris/rev2:default + +Example of flashing this keyboard: + + make iris/rev2:default:avrdude + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. + +A build guide for this keyboard can be found here: [Nyquist Build Guide](https://docs.keeb.io) diff --git a/keyboards/iris/rev1/config.h b/keyboards/iris/rev1/config.h new file mode 100644 index 0000000000..10f435a4fc --- /dev/null +++ b/keyboards/iris/rev1/config.h @@ -0,0 +1,92 @@ +/* +Copyright 2017 Danny Nguyen + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef REV1_CONFIG_H +#define REV1_CONFIG_H + +#include QMK_KEYBOARD_CONFIG_H + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCEEB +#define PRODUCT_ID 0x1256 +#define DEVICE_VER 0x0100 +#define MANUFACTURER Keebio +#define PRODUCT Iris Keyboard +#define DESCRIPTION Split 50 percent ergonomic keyboard + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 10 +#define MATRIX_COLS 6 + +// wiring of each half +#define MATRIX_ROW_PINS { D7, E6, B4, B5, D4 } +#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, F4 } + +#define CATERINA_BOOTLOADER + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +// #define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +#define BACKLIGHT_PIN B6 +#define BACKLIGHT_LEVELS 5 + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 +#define RGBLIGHT_TIMER +#define RGBLED_NUM 12 // Number of LEDs +#define ws2812_PORTREG PORTD +#define ws2812_DDRREG DDRD + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/iris/rev1/rev1.c b/keyboards/iris/rev1/rev1.c new file mode 100644 index 0000000000..99bd781d57 --- /dev/null +++ b/keyboards/iris/rev1/rev1.c @@ -0,0 +1,39 @@ +#include "rev1.h" + +#ifdef AUDIO_ENABLE + float tone_startup[][2] = SONG(STARTUP_SOUND); + float tone_goodbye[][2] = SONG(GOODBYE_SOUND); +#endif + +#ifdef SSD1306OLED +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + led_set_user(usb_led); +} +#endif + +void matrix_init_kb(void) { + + #ifdef AUDIO_ENABLE + _delay_ms(20); // gets rid of tick + PLAY_SONG(tone_startup); + #endif + + // // green led on + // DDRD |= (1<<5); + // PORTD &= ~(1<<5); + + // // orange led on + // DDRB |= (1<<0); + // PORTB &= ~(1<<0); + + matrix_init_user(); +}; + +void shutdown_user(void) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_goodbye); + _delay_ms(150); + stop_all_notes(); + #endif +} diff --git a/keyboards/iris/rev1/rev1.h b/keyboards/iris/rev1/rev1.h new file mode 100644 index 0000000000..6d20536517 --- /dev/null +++ b/keyboards/iris/rev1/rev1.h @@ -0,0 +1,40 @@ +#ifndef REV1_H +#define REV1_H + +#include "iris.h" + +//void promicro_bootloader_jmp(bool program); +#include "quantum.h" + + +#ifdef USE_I2C +#include +#ifdef __AVR__ + #include + #include +#endif +#endif + +//void promicro_bootloader_jmp(bool program); + +#define KEYMAP( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, LT4, RT4, R30, R31, R32, R33, R34, R35, \ + LT1, LT2, LT3, RT3, RT2, RT1 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { KC_NO, KC_NO, LT4, LT1, LT2, LT3 }, \ + { R05, R04, R03, R02, R01, R00 }, \ + { R15, R14, R13, R12, R11, R10 }, \ + { R25, R24, R23, R22, R21, R20 }, \ + { R35, R34, R33, R32, R31, R30 }, \ + { KC_NO, KC_NO, RT4, RT1, RT2, RT3 } \ + } + +#endif diff --git a/keyboards/iris/rev1/rules.mk b/keyboards/iris/rev1/rules.mk new file mode 100644 index 0000000000..7b30c0beff --- /dev/null +++ b/keyboards/iris/rev1/rules.mk @@ -0,0 +1 @@ +BACKLIGHT_ENABLE = no diff --git a/keyboards/iris/rev2/config.h b/keyboards/iris/rev2/config.h new file mode 100644 index 0000000000..4ba21a58a6 --- /dev/null +++ b/keyboards/iris/rev2/config.h @@ -0,0 +1,92 @@ +/* +Copyright 2017 Danny Nguyen + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef REV1_CONFIG_H +#define REV1_CONFIG_H + +#include QMK_KEYBOARD_CONFIG_H + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCEEB +#define PRODUCT_ID 0x1256 +#define DEVICE_VER 0x0200 +#define MANUFACTURER Keebio +#define PRODUCT Iris Keyboard +#define DESCRIPTION Split 50 percent ergonomic keyboard + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 10 +#define MATRIX_COLS 6 + +// wiring of each half +#define MATRIX_ROW_PINS { D7, E6, B4, D2, D4 } +#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 } + +#define CATERINA_BOOTLOADER + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +// #define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +#define BACKLIGHT_PIN B5 +#define BACKLIGHT_LEVELS 5 + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 +#define RGBLIGHT_TIMER +#define RGBLED_NUM 12 // Number of LEDs +#define ws2812_PORTREG PORTD +#define ws2812_DDRREG DDRD + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/iris/rev2/rev2.c b/keyboards/iris/rev2/rev2.c new file mode 100644 index 0000000000..d0a3c771f4 --- /dev/null +++ b/keyboards/iris/rev2/rev2.c @@ -0,0 +1,39 @@ +#include "rev2.h" + +#ifdef AUDIO_ENABLE + float tone_startup[][2] = SONG(STARTUP_SOUND); + float tone_goodbye[][2] = SONG(GOODBYE_SOUND); +#endif + +#ifdef SSD1306OLED +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + led_set_user(usb_led); +} +#endif + +void matrix_init_kb(void) { + + #ifdef AUDIO_ENABLE + _delay_ms(20); // gets rid of tick + PLAY_SONG(tone_startup); + #endif + + // // green led on + // DDRD |= (1<<5); + // PORTD &= ~(1<<5); + + // // orange led on + // DDRB |= (1<<0); + // PORTB &= ~(1<<0); + + matrix_init_user(); +}; + +void shutdown_user(void) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_goodbye); + _delay_ms(150); + stop_all_notes(); + #endif +} diff --git a/keyboards/iris/rev2/rev2.h b/keyboards/iris/rev2/rev2.h new file mode 100644 index 0000000000..6d20536517 --- /dev/null +++ b/keyboards/iris/rev2/rev2.h @@ -0,0 +1,40 @@ +#ifndef REV1_H +#define REV1_H + +#include "iris.h" + +//void promicro_bootloader_jmp(bool program); +#include "quantum.h" + + +#ifdef USE_I2C +#include +#ifdef __AVR__ + #include + #include +#endif +#endif + +//void promicro_bootloader_jmp(bool program); + +#define KEYMAP( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, LT4, RT4, R30, R31, R32, R33, R34, R35, \ + LT1, LT2, LT3, RT3, RT2, RT1 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { KC_NO, KC_NO, LT4, LT1, LT2, LT3 }, \ + { R05, R04, R03, R02, R01, R00 }, \ + { R15, R14, R13, R12, R11, R10 }, \ + { R25, R24, R23, R22, R21, R20 }, \ + { R35, R34, R33, R32, R31, R30 }, \ + { KC_NO, KC_NO, RT4, RT1, RT2, RT3 } \ + } + +#endif diff --git a/keyboards/iris/rev2/rules.mk b/keyboards/iris/rev2/rules.mk new file mode 100644 index 0000000000..d7463419b4 --- /dev/null +++ b/keyboards/iris/rev2/rules.mk @@ -0,0 +1,2 @@ +RGBLIGHT_ENABLE = yes +BACKLIGHT_ENABLE = yes diff --git a/keyboards/iris/rules.mk b/keyboards/iris/rules.mk new file mode 100644 index 0000000000..0280e9d1a6 --- /dev/null +++ b/keyboards/iris/rules.mk @@ -0,0 +1,77 @@ +SRC += matrix.c \ + i2c.c \ + split_util.c \ + serial.c + +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +SUBPROJECT_rev1 = yes +USE_I2C = yes +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +CUSTOM_MATRIX = yes + +DEFAULT_FOLDER = iris/rev2 diff --git a/keyboards/iris/serial.c b/keyboards/iris/serial.c new file mode 100644 index 0000000000..74bcbb6bf6 --- /dev/null +++ b/keyboards/iris/serial.c @@ -0,0 +1,228 @@ +/* + * WARNING: be careful changing this code, it is very timing dependent + */ + +#ifndef F_CPU +#define F_CPU 16000000 +#endif + +#include +#include +#include +#include +#include "serial.h" + +#ifndef USE_I2C + +// Serial pulse period in microseconds. Its probably a bad idea to lower this +// value. +#define SERIAL_DELAY 24 + +uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; +uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; + +#define SLAVE_DATA_CORRUPT (1<<0) +volatile uint8_t status = 0; + +inline static +void serial_delay(void) { + _delay_us(SERIAL_DELAY); +} + +inline static +void serial_output(void) { + SERIAL_PIN_DDR |= SERIAL_PIN_MASK; +} + +// make the serial pin an input with pull-up resistor +inline static +void serial_input(void) { + SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK; + SERIAL_PIN_PORT |= SERIAL_PIN_MASK; +} + +inline static +uint8_t serial_read_pin(void) { + return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK); +} + +inline static +void serial_low(void) { + SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK; +} + +inline static +void serial_high(void) { + SERIAL_PIN_PORT |= SERIAL_PIN_MASK; +} + +void serial_master_init(void) { + serial_output(); + serial_high(); +} + +void serial_slave_init(void) { + serial_input(); + + // Enable INT0 + EIMSK |= _BV(INT0); + // Trigger on falling edge of INT0 + EICRA &= ~(_BV(ISC00) | _BV(ISC01)); +} + +// Used by the master to synchronize timing with the slave. +static +void sync_recv(void) { + serial_input(); + // This shouldn't hang if the slave disconnects because the + // serial line will float to high if the slave does disconnect. + while (!serial_read_pin()); + serial_delay(); +} + +// Used by the slave to send a synchronization signal to the master. +static +void sync_send(void) { + serial_output(); + + serial_low(); + serial_delay(); + + serial_high(); +} + +// Reads a byte from the serial line +static +uint8_t serial_read_byte(void) { + uint8_t byte = 0; + serial_input(); + for ( uint8_t i = 0; i < 8; ++i) { + byte = (byte << 1) | serial_read_pin(); + serial_delay(); + _delay_us(1); + } + + return byte; +} + +// Sends a byte with MSB ordering +static +void serial_write_byte(uint8_t data) { + uint8_t b = 8; + serial_output(); + while( b-- ) { + if(data & (1 << b)) { + serial_high(); + } else { + serial_low(); + } + serial_delay(); + } +} + +// interrupt handle to be used by the slave device +ISR(SERIAL_PIN_INTERRUPT) { + sync_send(); + + uint8_t checksum = 0; + for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { + serial_write_byte(serial_slave_buffer[i]); + sync_send(); + checksum += serial_slave_buffer[i]; + } + serial_write_byte(checksum); + sync_send(); + + // wait for the sync to finish sending + serial_delay(); + + // read the middle of pulses + _delay_us(SERIAL_DELAY/2); + + uint8_t checksum_computed = 0; + for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { + serial_master_buffer[i] = serial_read_byte(); + sync_send(); + checksum_computed += serial_master_buffer[i]; + } + uint8_t checksum_received = serial_read_byte(); + sync_send(); + + serial_input(); // end transaction + + if ( checksum_computed != checksum_received ) { + status |= SLAVE_DATA_CORRUPT; + } else { + status &= ~SLAVE_DATA_CORRUPT; + } +} + +inline +bool serial_slave_DATA_CORRUPT(void) { + return status & SLAVE_DATA_CORRUPT; +} + +// Copies the serial_slave_buffer to the master and sends the +// serial_master_buffer to the slave. +// +// Returns: +// 0 => no error +// 1 => slave did not respond +int serial_update_buffers(void) { + // this code is very time dependent, so we need to disable interrupts + cli(); + + // signal to the slave that we want to start a transaction + serial_output(); + serial_low(); + _delay_us(1); + + // wait for the slaves response + serial_input(); + serial_high(); + _delay_us(SERIAL_DELAY); + + // check if the slave is present + if (serial_read_pin()) { + // slave failed to pull the line low, assume not present + sei(); + return 1; + } + + // if the slave is present syncronize with it + sync_recv(); + + uint8_t checksum_computed = 0; + // receive data from the slave + for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { + serial_slave_buffer[i] = serial_read_byte(); + sync_recv(); + checksum_computed += serial_slave_buffer[i]; + } + uint8_t checksum_received = serial_read_byte(); + sync_recv(); + + if (checksum_computed != checksum_received) { + sei(); + return 1; + } + + uint8_t checksum = 0; + // send data to the slave + for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { + serial_write_byte(serial_master_buffer[i]); + sync_recv(); + checksum += serial_master_buffer[i]; + } + serial_write_byte(checksum); + sync_recv(); + + // always, release the line when not in use + serial_output(); + serial_high(); + + sei(); + return 0; +} + +#endif diff --git a/keyboards/iris/serial.h b/keyboards/iris/serial.h new file mode 100644 index 0000000000..15fe4db7b4 --- /dev/null +++ b/keyboards/iris/serial.h @@ -0,0 +1,26 @@ +#ifndef MY_SERIAL_H +#define MY_SERIAL_H + +#include "config.h" +#include + +/* TODO: some defines for interrupt setup */ +#define SERIAL_PIN_DDR DDRD +#define SERIAL_PIN_PORT PORTD +#define SERIAL_PIN_INPUT PIND +#define SERIAL_PIN_MASK _BV(PD0) +#define SERIAL_PIN_INTERRUPT INT0_vect + +#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 +#define SERIAL_MASTER_BUFFER_LENGTH 1 + +// Buffers for master - slave communication +extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; +extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; + +void serial_master_init(void); +void serial_slave_init(void); +int serial_update_buffers(void); +bool serial_slave_data_corrupt(void); + +#endif diff --git a/keyboards/iris/split_rgb.c b/keyboards/iris/split_rgb.c new file mode 100644 index 0000000000..6d7cb44cf0 --- /dev/null +++ b/keyboards/iris/split_rgb.c @@ -0,0 +1,41 @@ +#include +#include +#include "split_util.h" +#include "progmem.h" +#include "print.h" +#include "rgblight.h" + +#ifdef USE_I2C +# include "i2c.h" +#else // USE_SERIAL +# include "serial.h" +#endif + + +rgblight_config_t rgblight_config; + +void rgblight_slave_update(void) { + //rgblight_effect_christmas(); +} + + +void rgblight_set(void) { + if (rgblight_config.enable) { + #ifdef RGBW + ws2812_setleds_rgbw(led, RGBLED_NUM); + #else + ws2812_setleds(led, RGBLED_NUM); + #endif + } else { + for (uint8_t i = 0; i < RGBLED_NUM; i++) { + led[i].r = 0; + led[i].g = 0; + led[i].b = 0; + } + #ifdef RGBW + ws2812_setleds_rgbw(led, RGBLED_NUM); + #else + ws2812_setleds(led, RGBLED_NUM); + #endif + } +} diff --git a/keyboards/iris/split_rgb.h b/keyboards/iris/split_rgb.h new file mode 100644 index 0000000000..5f552890af --- /dev/null +++ b/keyboards/iris/split_rgb.h @@ -0,0 +1,6 @@ +#ifndef SPLIT_RGB_H +#define SPLIT_RGB_H + +void rgblight_slave_update(void); + +#endif diff --git a/keyboards/iris/split_util.c b/keyboards/iris/split_util.c new file mode 100644 index 0000000000..346cbc9089 --- /dev/null +++ b/keyboards/iris/split_util.c @@ -0,0 +1,86 @@ +#include +#include +#include +#include +#include +#include +#include "split_util.h" +#include "matrix.h" +#include "keyboard.h" +#include "config.h" +#include "timer.h" + +#ifdef USE_I2C +# include "i2c.h" +#else +# include "serial.h" +#endif + +volatile bool isLeftHand = true; + +static void setup_handedness(void) { + #ifdef EE_HANDS + isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS); + #else + // I2C_MASTER_RIGHT is deprecated, use MASTER_RIGHT instead, since this works for both serial and i2c + #if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT) + isLeftHand = !has_usb(); + #else + isLeftHand = has_usb(); + #endif + #endif +} + +static void keyboard_master_setup(void) { +#ifdef USE_I2C + i2c_master_init(); +#ifdef SSD1306OLED + matrix_master_OLED_init (); +#endif +#else + serial_master_init(); +#endif +} + +static void keyboard_slave_setup(void) { + timer_init(); +#ifdef USE_I2C + i2c_slave_init(SLAVE_I2C_ADDRESS); +#else + serial_slave_init(); +#endif +} + +bool has_usb(void) { + USBCON |= (1 << OTGPADE); //enables VBUS pad + _delay_us(5); + return (USBSTA & (1< +#include "eeconfig.h" + +#define SLAVE_I2C_ADDRESS 0x32 + +extern volatile bool isLeftHand; + +// slave version of matix scan, defined in matrix.c +void matrix_slave_scan(void); + +void split_keyboard_setup(void); +bool has_usb(void); +void keyboard_slave_loop(void); + +void matrix_master_OLED_init (void); + +#endif From a860d9d628ae5b99e8c676af4e8226640b53e7d4 Mon Sep 17 00:00:00 2001 From: Jason Milkins Date: Sat, 21 Oct 2017 16:56:47 +0800 Subject: [PATCH 21/52] Fix missing code backticks --- docs/feature_rgblight.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md index c65a499fbe..18f2c74e5e 100644 --- a/docs/feature_rgblight.md +++ b/docs/feature_rgblight.md @@ -49,8 +49,8 @@ If you have `#define RGBLIGHT_ANIMATIONS` in your `config.h` you will have a num | Option | Default Value | Description | |--------|---------------|-------------| | `RGBLIGHT_ANIMATIONS` | | `#define` this to enable animation modes. | -| `RGBLIGHT_EFFECT_BREATHE_CENTER | 1.85 | Used to calculate the curve for the breathing animation. Valid values 1.0-2.7. | -| `RGBLIGHT_EFFECT_BREATHE_MAX | 255 | The maximum brightness for the breathing mode. Valid values 1-255. | +| `RGBLIGHT_EFFECT_BREATHE_CENTER` | 1.85 | Used to calculate the curve for the breathing animation. Valid values 1.0-2.7. | +| `RGBLIGHT_EFFECT_BREATHE_MAX` | 255 | The maximum brightness for the breathing mode. Valid values 1-255. | | `RGBLIGHT_EFFECT_SNAKE_LENGTH` | 4 | The number of LEDs to light up for the "snake" animation. | | `RGBLIGHT_EFFECT_KNIGHT_LENGTH` | 3 | The number of LEDs to light up for the "knight" animation. | | `RGBLIGHT_EFFECT_KNIGHT_OFFSET` | 0 | Start the knight animation this many LEDs from the start of the strip. | From 78923cb8843618388408af64c1bfe53f0caf01b6 Mon Sep 17 00:00:00 2001 From: Jason Milkins Date: Sat, 21 Oct 2017 16:59:13 +0800 Subject: [PATCH 22/52] Fix code backticks on Frequently Asked Build Questions docs --- docs/faq_build.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/faq_build.md b/docs/faq_build.md index 3d732fa986..0658242c36 100644 --- a/docs/faq_build.md +++ b/docs/faq_build.md @@ -62,7 +62,7 @@ https://github.com/tmk/tmk_keyboard/wiki/mbed-cortex-porting#compile-error-cstdd https://developer.mbed.org/forum/mbed/topic/5205/ -## 'clock_prescale_set' and 'clock_div_1' not available +## `clock_prescale_set` and `clock_div_1` not available Your toolchain is too old to support the MCU. For example WinAVR 20100110 doesn't support ATMega32u2. ``` From b25338a8098f1b9988707b5c1a6ad8d99f55baf6 Mon Sep 17 00:00:00 2001 From: heartrobotninja Date: Sat, 21 Oct 2017 12:59:31 -0700 Subject: [PATCH 23/52] heartrobotninja ergodox_ez and lets_split layouts (#1874) --- .../keymaps/heartrobotninja/config.h | 18 + .../keymaps/heartrobotninja/keymap.c | 680 ++++++++++++++++++ .../keymaps/heartrobotninja/rules.mk | 34 + .../keymaps/heartrobotninja/config.h | 58 ++ .../keymaps/heartrobotninja/keymap.c | 183 +++++ .../keymaps/heartrobotninja/rules.mk | 26 + 6 files changed, 999 insertions(+) create mode 100644 keyboards/ergodox_ez/keymaps/heartrobotninja/config.h create mode 100644 keyboards/ergodox_ez/keymaps/heartrobotninja/keymap.c create mode 100644 keyboards/ergodox_ez/keymaps/heartrobotninja/rules.mk create mode 100644 keyboards/lets_split/keymaps/heartrobotninja/config.h create mode 100644 keyboards/lets_split/keymaps/heartrobotninja/keymap.c create mode 100644 keyboards/lets_split/keymaps/heartrobotninja/rules.mk diff --git a/keyboards/ergodox_ez/keymaps/heartrobotninja/config.h b/keyboards/ergodox_ez/keymaps/heartrobotninja/config.h new file mode 100644 index 0000000000..40d80b7018 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/heartrobotninja/config.h @@ -0,0 +1,18 @@ +#ifndef CONFIG_HEARTROBOTNINJA_H +#define CONFIG_HEARTROBOTNINJA_H + +#include "../../config.h" + +#define ONESHOT_TAP_TOGGLE 2 +#define ONESHOT_TIMEOUT 1000 + +#undef LEADER_TIMEOUT +#define LEADER_TIMEOUT 1000 + +#undef TAPPING_TERM +#define TAPPING_TERM 200 + +#undef TAPPING_TOGGLE +#define TAPPING_TOGGLE 2 + +#endif \ No newline at end of file diff --git a/keyboards/ergodox_ez/keymaps/heartrobotninja/keymap.c b/keyboards/ergodox_ez/keymaps/heartrobotninja/keymap.c new file mode 100644 index 0000000000..cc0ffba872 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/heartrobotninja/keymap.c @@ -0,0 +1,680 @@ +#include "action_layer.h" +#include "action_util.h" +#include "debug.h" +#include "eeconfig.h" +#include "ergodox_ez.h" +#include "version.h" +#include "wait.h" + +/* Aliases */ +#define ____ KC_TRNS + +/* Layers */ +enum +{ + COLE = 0, + LOWER, // right hand 10 key + RAISE, // Function keys + AUX, // Things like rebooting the board to be flashed. NUM + RAISE +}; + +/* Macros */ +enum +{ + NONE = 0, + + // OS Functions + F_PASTE, + + // Config Macros + CF_EPRM, + CF_VERS, + + // RGB Macro + RGB_ANI, +}; + +/* Tap Dancery */ +enum +{ + TD_BTK, + TD_TDE, + TD_LPRN, + TD_RPRN, + TD_MIN, + TD_USC, + TD_COPY, + TD_UNDO, + TD_FIND, +}; + +/* OS Identifier */ +enum +{ + OS_WIN = 0, + OS_OSX, + OS_LIN, +}; + +uint8_t os_type = OS_WIN; + +static uint16_t rgb_timer; +bool time_travel = false; +bool skip_leds = false; + +/* Keymaps */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Keymap 0: Colemak Layer + * + * ,-----------------------------------------------------. ,-----------------------------------------------------. + * | Find | 1 ! | 2 @ | 3 # | 4 $ | 5 % | Undo | | VOLUP| 6 ^ | 7 & | 8 * | 9 ( | 0 ) | ---- | + * | | | | | | | | | | | | | | | | + * |-----------+------+------+------+------+------+------| |------+------+------+------+------+------+-----------| + * | ' " ` | Q | W | F | P | G | CCopy| | VOLDN| J | L | U Ü | Y | = + | ~ : ; | + * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| + * | ( [ { | A Ä | R | S ß | T | D |------| |------| H | N | E | I | O Ö | ) ] } | + * |-----------+------+------+------+------+------| Paste| | MUTE |------+------+------+------+------+-----------| + * | - , < | Z | X | C | V | B | | | | K | M | / ? | \ | | ^ | _ . > | + * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' + * | AUX | RAISE | LOWER | LEAD | GUI | | ESC | LOCK | < | v | > | + * `-----------------------------------' `-----------------------------------' + * ,-------------. ,-------------. + * | ALT | CTRL | | HOME | END | + * ,------|------|------| |------+------+------. + * | | | Del | | PGUP | | | + * | Space|Backsp|------| |------| Enter| Shift| + * | | | Tab | | PGDN | | | + * `--------------------' `--------------------' + */ + + [COLE] = KEYMAP( + // Left Hand + TD(TD_FIND), KC_1, KC_2, KC_3, KC_4, KC_5, TD(TD_UNDO), + TD(TD_BTK), KC_Q, KC_W, KC_F, KC_P, KC_G, TD(TD_COPY), + TD(TD_LPRN), KC_A, KC_R, KC_S, KC_T, KC_D, + TD(TD_MIN), KC_Z, KC_X, KC_C, KC_V, KC_B, M(F_PASTE), + TT(AUX), TT(RAISE), TT(LOWER), KC_LEAD, OSM(MOD_LGUI), + OSM(MOD_LALT), OSM(MOD_LCTL), + KC_DEL, + KC_SPC, KC_BSPC, KC_TAB, + + // Right Hand + KC_VOLU, KC_6, KC_7, KC_8, KC_9, KC_0, ____, + KC_VOLD, KC_J, KC_L, KC_U, KC_Y, KC_MINS, TD(TD_TDE), + KC_H, KC_N, KC_E, KC_I, KC_O, TD(TD_RPRN), + KC_MUTE, KC_K, KC_M, KC_SLSH, KC_BSLS, KC_UP, TD(TD_USC), + KC_ESC, LGUI(KC_L), KC_LEFT, KC_DOWN, KC_RGHT, + KC_HOME, KC_END, + KC_PGUP, + KC_PGDOWN, KC_ENT, OSM(MOD_LSFT)), + + /* Keymap 2: LOWER Layer + * + * ,-----------------------------------------------------. ,-----------------------------------------------------. + * | ---- | ---- | ---- | ---- | ---- | ---- | | | | ( | ) | ^ | / | ---- | | + * | | | | | | | ---- | | ---- | | | | | | ---- | + * |-----------+------+------+------+------+------+------| |------+------+------+------+------+------+-----------| + * | ---- | ---- | ---- | ---- | ---- | ---- | | | | 7 | 8 | 9 | * | ---- | ---- | + * |-----------+------+------+------+------+------| ---- | | ---- |------+------+------+------+------+-----------| + * | ---- | ---- | ---- | ---- | ---- | ---- |------| |------| 4 | 5 | 6 | - | ---- | ---- | + * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| + * | ---- | ---- | ---- | ---- | ---- | ---- | ---- | | ---- | 1 | 2 | 3 | + | ---- | ---- | + * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' + * | ---- | ---- | ---- | ---- | ---- | | 0 | = | ---- | ---- | ---- | + * `-----------------------------------' `-------------------------------------' + * ,-------------. ,-------------. + * | ---- | ---- | | ---- | ---- | + * ,------|------|------| |------+------+------. + * | | | ---- | | ---- | | | + * | ---- | ---- |------| |------| ---- | ---- | + * | | | ---- | | ---- | | | + * `--------------------' `--------------------' + */ + [LOWER] = KEYMAP( + // Left Hand + ____, ____, ____, ____, ____, ____, ____, + ____, ____, ____, ____, ____, ____, ____, + ____, ____, ____, ____, ____, ____, + ____, ____, ____, ____, ____, ____, ____, + ____, ____, ____, ____, ____, + ____, ____, + ____, + ____, ____, ____, + + // Right Hand + ____, KC_LPRN, KC_RPRN, KC_CIRC, KC_PSLS, ____, ____, + ____, KC_7, KC_8, KC_9, KC_PAST, ____, ____, + KC_4, KC_5, KC_6, KC_PMNS, ____, ____, + ____, KC_1, KC_2, KC_3, KC_PPLS, ____, ____, + KC_0, KC_PEQL, ____, ____, ____, + ____, ____, + ____, + ____, ____, ____), + + /* Keymap 3: RAISE Layer + * + * ,-----------------------------------------------------. ,-----------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | ---- | | ---- | ! | @ | # | $ | % | ` ~ | + * | | | | | | | | | | | | | | | | + * |-----------+------+------+------+------+------+------| |------+------+------+------+------+------+-----------| + * | F7 | F8 | F9 | F10 | F11 | F12 | ---- | | ---- | ^ | & | * | ( | ) | - _ | + * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| + * | ---- | ---- | ---- | ---- | ---- | ---- |------| |------| [ { | } ] | \ | | ; : | ' " | = + | + * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| + * | ---- | ---- | ---- | ---- | ---- | ---- | ---- | | ---- | , < | > . | / ? | ---- | ---- | ---- | + * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' + * | ---- | ---- | ---- | ---- | ---- | | ---- | ---- | ---- | ---- | ---- | + * `-----------------------------------' `-----------------------------------' + * ,-------------. ,-------------. + * | ---- | ---- | | ---- | ---- | + * ,------|------|------| |------+------+------. + * | | | ---- | | ---- | | | + * | ---- | ---- |------| |------| ---- | ---- | + * | | | ---- | | ---- | | | + * `--------------------' `--------------------' + */ + [RAISE] = KEYMAP( + // Left Hand + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, ____, + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ____, + ____, ____, ____, ____, ____, ____, + ____, ____, ____, ____, ____, ____, ____, + ____, ____, ____, ____, ____, + ____, ____, + ____, + ____, ____, ____, + + // Right Hand + ____, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_GRV, + ____, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_MINS, + KC_LBRC, KC_RBRC, KC_BSLS, KC_SCLN, KC_QUOT, KC_EQL, + ____, KC_COMM, KC_DOT, KC_SLSH, ____, ____, ____, + ____, ____, ____, ____, ____, + ____, ____, + ____, + ____, ____, ____), + + /* Keymap 7: Configuration Layer + * + * ,-----------------------------------------------------. ,-----------------------------------------------------. + * | EEPROM | ---- | ---- | ---- | ---- | ---- | ---- | | PWR | ---- | ---- | ---- | ---- | ---- | | + * | | | | | | | | | | | | | | | VERSION | + * |-----------+------+------+------+------+------+------| |------+------+------+------+------+------+-----------| + * | ---- | ---- | ---- | ---- | ---- | ---- | | | | ---- | ---- | ---- | ---- | ---- | ---- | + * |-----------+------+------+------+------+------| ---- | | SLP |------+------+------+------+------+-----------| + * | ---- | ---- | ---- | ---- | ---- | ---- |------| |------| ---- | ---- | ---- | ---- | ---- | ---- | + * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| + * | ---- | ---- | ---- | ---- | ---- | ---- | ---- | | WAKE | ---- | ---- | ---- | ---- | ---- | ---- | + * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' + * | ---- | ---- | ---- | ---- | ---- | | ---- | ---- | ---- | ---- | ---- | + * `-----------------------------------' `-----------------------------------' + * ,-------------. ,-------------. + * | ---- | ---- | | TOG | ANI | + * ,------|------|------| |------+------+------. + * | | | ---- | | VAI | | | + * | ---- | ---- |------| |------| HUI | HUID | + * | | | ---- | | VAD | | | + * `--------------------' `--------------------' + */ + [AUX] = KEYMAP( + // Left Hand + M(CF_EPRM), ____, ____, ____, ____, ____, KC_PWR, + ____, ____, ____, ____, ____, ____, KC_SLEP, + ____, ____, ____, ____, ____, ____, + ____, ____, ____, ____, ____, ____, KC_WAKE, + ____, ____, ____, ____, ____, + ____, ____, + ____, + ____, ____, ____, + + // Right Hand + KC_PWR, ____, ____, ____, ____, ____, M(CF_VERS), + KC_SLEP, ____, ____, ____, ____, ____, ____, + ____, ____, ____, ____, ____, ____, + KC_WAKE, ____, ____, ____, ____, ____, ____, + ____, ____, ____, ____, ____, + RGB_TOG, M(RGB_ANI), + RGB_VAI, + RGB_VAD, RGB_HUI, RGB_HUD), +}; + +void unredo(qk_tap_dance_state_t *state, void *user_data) +{ + if (state->count > 1) + { + register_code(KC_LCTL); + register_code(KC_Y); + unregister_code(KC_Y); + unregister_code(KC_LCTL); + } + else + { + register_code(KC_LCTL); + register_code(KC_Z); + unregister_code(KC_Z); + unregister_code(KC_LCTL); + } + reset_tap_dance(state); +} + +void ccopy(qk_tap_dance_state_t *state, void *user_data) +{ + if (state->count > 1) + { + register_code(KC_LCTL); + register_code(KC_X); + unregister_code(KC_X); + unregister_code(KC_LCTL); + } + else + { + register_code(KC_LCTL); + register_code(KC_C); + unregister_code(KC_C); + unregister_code(KC_LCTL); + } + reset_tap_dance(state); +} + +void findreplace(qk_tap_dance_state_t *state, void *user_data) +{ + if (state->count > 1) + { + register_code(KC_LCTL); + register_code(KC_H); + unregister_code(KC_H); + unregister_code(KC_LCTL); + } + else + { + register_code(KC_LCTL); + register_code(KC_F); + unregister_code(KC_F); + unregister_code(KC_LCTL); + } + reset_tap_dance(state); +} + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_BTK] = ACTION_TAP_DANCE_DOUBLE(KC_QUOT, KC_GRV), + [TD_TDE] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, KC_TILD), + [TD_LPRN] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_LPRN), + [TD_RPRN] = ACTION_TAP_DANCE_DOUBLE(KC_RBRC, KC_RPRN), + [TD_MIN] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_MINS), + [TD_USC] = ACTION_TAP_DANCE_DOUBLE(KC_DOT, KC_UNDS), + [TD_COPY] = ACTION_TAP_DANCE_FN(ccopy), + [TD_UNDO] = ACTION_TAP_DANCE_FN(unredo), + [TD_FIND] = ACTION_TAP_DANCE_FN(findreplace)}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + switch (id) + { + case F_PASTE: + if (record->event.pressed) + { + register_code(KC_LCTL); + register_code(KC_V); + unregister_code(KC_V); + unregister_code(KC_LCTL); + } + break; + case RGB_ANI: + if (record->event.pressed) + { + rgb_timer = timer_read(); + } + else + { + if (timer_elapsed(rgb_timer) > 300) + { + rgblight_mode(1); + } + else + { + rgblight_step(); + } + } + case CF_EPRM: + if (record->event.pressed) + { + eeconfig_init(); + } + return false; + break; + case CF_VERS: + if (record->event.pressed) + { + SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + break; + } + return MACRO_NONE; +}; + +/* +bool process_record_user(uint16_t keycode, keyrecord_t *record) +{} +*/ + +void tap(uint16_t code) +{ + register_code(code); + unregister_code(code); +} + +LEADER_EXTERNS(); +void matrix_scan_user(void) +{ + + uint8_t layer = biton32(layer_state); + + 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 if (layer == RAISE || layer == AUX) + { + ergodox_right_led_1_set(LED_BRIGHTNESS_LO); + ergodox_right_led_1_on(); + } + else + { + ergodox_right_led_1_off(); + } + + if (keyboard_report->mods & MOD_BIT(KC_LCTL) || + ((get_oneshot_mods() & MOD_BIT(KC_LCTL)) && + !has_oneshot_mods_timed_out())) + { + ergodox_right_led_2_set(LED_BRIGHTNESS_HI); + ergodox_right_led_2_on(); + } + else if (layer == LOWER || layer == AUX) + { + ergodox_right_led_2_set(LED_BRIGHTNESS_LO); + ergodox_right_led_2_on(); + } + else + { + ergodox_right_led_2_off(); + } + + if (keyboard_report->mods & MOD_BIT(KC_LALT) || + ((get_oneshot_mods() & MOD_BIT(KC_LALT)) && + !has_oneshot_mods_timed_out())) + { + ergodox_right_led_3_set(LED_BRIGHTNESS_HI); + ergodox_right_led_3_on(); + } + else if (layer == COLE || layer == AUX) + { + ergodox_right_led_3_set(LED_BRIGHTNESS_LO); + ergodox_right_led_3_on(); + } + else + { + ergodox_right_led_3_off(); + } + + LEADER_DICTIONARY() + { + leading = false; + leader_end(); + + SEQ_THREE_KEYS(KC_W, KC_I, KC_N) { os_type = OS_WIN; }; + SEQ_THREE_KEYS(KC_O, KC_S, KC_X) { os_type = OS_OSX; }; + SEQ_THREE_KEYS(KC_L, KC_I, KC_N) { os_type = OS_LIN; }; + + SEQ_ONE_KEY(KC_A) + { + switch (os_type) + { + case OS_WIN: + tap(KC_NLCK); + register_code(KC_RALT); + tap(KC_KP_0); + tap(KC_KP_2); + tap(KC_KP_2); + tap(KC_KP_8); + unregister_code(KC_RALT); + tap(KC_NLCK); + break; + case OS_OSX: + register_code(KC_RALT); + register_code(KC_RSFT); + register_code(KC_SCLN); + unregister_code(KC_SCLN); + unregister_code(KC_RSFT); + unregister_code(KC_RALT); + tap(KC_A); + break; + case OS_LIN: + tap(KC_RALT); + tap(KC_DQT); + tap(KC_A); + break; + } + } + SEQ_TWO_KEYS(KC_A, KC_A) + { + switch (os_type) + { + case OS_WIN: + tap(KC_NLCK); + register_code(KC_RALT); + tap(KC_KP_0); + tap(KC_KP_1); + tap(KC_KP_9); + tap(KC_KP_6); + unregister_code(KC_RALT); + tap(KC_NLCK); + break; + case OS_OSX: + register_code(KC_RALT); + register_code(KC_RSFT); + register_code(KC_SCLN); + unregister_code(KC_SCLN); + unregister_code(KC_RSFT); + unregister_code(KC_RALT); + register_code(KC_LSFT); + register_code(KC_A); + unregister_code(KC_A); + unregister_code(KC_LSFT); + break; + case OS_LIN: + tap(KC_RALT); + tap(KC_DQT); + register_code(KC_LSFT); + register_code(KC_A); + unregister_code(KC_A); + unregister_code(KC_LSFT); + break; + } + } + SEQ_ONE_KEY(KC_O) + { + switch (os_type) + { + case OS_WIN: + tap(KC_NLCK); + register_code(KC_RALT); + tap(KC_KP_0); + tap(KC_KP_2); + tap(KC_KP_4); + tap(KC_KP_6); + unregister_code(KC_RALT); + tap(KC_NLCK); + break; + case OS_OSX: + register_code(KC_RALT); + register_code(KC_RSFT); + register_code(KC_SCLN); + unregister_code(KC_SCLN); + unregister_code(KC_RSFT); + unregister_code(KC_RALT); + tap(KC_O); + break; + case OS_LIN: + tap(KC_RALT); + tap(KC_DQT); + tap(KC_O); + break; + } + } + SEQ_TWO_KEYS(KC_O, KC_O) + { + switch (os_type) + { + case OS_WIN: + tap(KC_NLCK); + register_code(KC_RALT); + tap(KC_KP_0); + tap(KC_KP_2); + tap(KC_KP_1); + tap(KC_KP_4); + unregister_code(KC_RALT); + tap(KC_NLCK); + break; + case OS_OSX: + register_code(KC_RALT); + register_code(KC_RSFT); + register_code(KC_SCLN); + unregister_code(KC_SCLN); + unregister_code(KC_RSFT); + unregister_code(KC_RALT); + tap(LSFT(KC_O)); + break; + case OS_LIN: + tap(KC_RALT); + tap(KC_DQT); + register_code(KC_LSFT); + register_code(KC_O); + unregister_code(KC_O); + unregister_code(KC_LSFT); + break; + } + } + SEQ_ONE_KEY(KC_U) + { + switch (os_type) + { + case OS_WIN: + tap(KC_NLCK); + register_code(KC_RALT); + tap(KC_KP_0); + tap(KC_KP_2); + tap(KC_KP_5); + tap(KC_KP_2); + unregister_code(KC_RALT); + tap(KC_NLCK); + break; + case OS_OSX: + register_code(KC_RALT); + register_code(KC_RSFT); + register_code(KC_SCLN); + unregister_code(KC_SCLN); + unregister_code(KC_RSFT); + unregister_code(KC_RALT); + tap(KC_U); + break; + case OS_LIN: + tap(KC_RALT); + tap(KC_DQT); + tap(KC_U); + break; + } + } + SEQ_TWO_KEYS(KC_U, KC_U) + { + switch (os_type) + { + case OS_WIN: + tap(KC_NLCK); + register_code(KC_RALT); + tap(KC_KP_0); + tap(KC_KP_2); + tap(KC_KP_2); + tap(KC_KP_0); + unregister_code(KC_RALT); + tap(KC_NLCK); + break; + case OS_OSX: + register_code(KC_RALT); + register_code(KC_RSFT); + register_code(KC_SCLN); + unregister_code(KC_SCLN); + unregister_code(KC_RSFT); + unregister_code(KC_RALT); + tap(LSFT(KC_U)); + break; + case OS_LIN: + tap(KC_RALT); + tap(KC_DQT); + register_code(KC_LSFT); + register_code(KC_U); + unregister_code(KC_U); + unregister_code(KC_LSFT); + break; + } + } + SEQ_ONE_KEY(KC_S) + { + switch (os_type) + { + case OS_WIN: + tap(KC_NLCK); + register_code(KC_RALT); + tap(KC_KP_0); + tap(KC_KP_2); + tap(KC_KP_2); + tap(KC_KP_3); + unregister_code(KC_RALT); + tap(KC_NLCK); + break; + case OS_OSX: + register_code(KC_RALT); + tap(KC_S); + unregister_code(KC_RALT); + break; + case OS_LIN: + tap(KC_RALT); + tap(KC_S); + tap(KC_S); + break; + } + } + } +} + +void matrix_init_user(void) +{ + + ergodox_led_all_on(); + rgblight_init(); + rgblight_enable(); + rgblight_setrgb(255, 0, 0); + for (int i = LED_BRIGHTNESS_HI; i > LED_BRIGHTNESS_LO; i--) + { + ergodox_led_all_set(i); + wait_ms(5); + } + rgblight_setrgb(255, 255, 0); + wait_ms(1000); + for (int i = LED_BRIGHTNESS_LO; i > 0; i--) + { + ergodox_led_all_set(i); + wait_ms(10); + } + rgblight_setrgb(0, 255, 255); + ergodox_led_all_off(); + wait_ms(1000); + + rgblight_effect_knight(50); +} \ No newline at end of file diff --git a/keyboards/ergodox_ez/keymaps/heartrobotninja/rules.mk b/keyboards/ergodox_ez/keymaps/heartrobotninja/rules.mk new file mode 100644 index 0000000000..38112a9065 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/heartrobotninja/rules.mk @@ -0,0 +1,34 @@ +BOOTMAGIC_ENABLE=no +COMMAND_ENABLE=no +SLEEP_LED_ENABLE=no +NKRO_ENABLE = yes +FORCE_NKRO = no +DEBUG_ENABLE = no +CONSOLE_ENABLE = no +TAP_DANCE_ENABLE = yes +KEYLOGGER_ENABLE = no +UCIS_ENABLE = no +MOUSEKEY_ENABLE = no +AUTOLOG_ENABLE = no +RGBLIGHT_ENABLE = yes +RGBLIGHT_ANIMATION = yes +EXTRAKEY_ENABLE = yes + +OPT_DEFS += -DUSER_PRINT + +KEYMAP_VERSION = $(shell \ + if [ -d "${KEYMAP_PATH}/.git" ]; then \ + cd "${KEYMAP_PATH}" && git describe --abbrev=6 --dirty --always --tags --match 'v*' 2>/dev/null; \ + else echo QMK; fi) + +KEYMAP_BRANCH = $(shell \ + if [ -d "${KEYMAP_PATH}/.git" ]; then \ + cd "${KEYMAP_PATH}"; \ + fi; \ + git rev-parse --abbrev-ref HEAD 2>/dev/null) + +OPT_DEFS += -DKEYMAP_VERSION=\"$(KEYMAP_VERSION)\\\#$(KEYMAP_BRANCH)\" + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/lets_split/keymaps/heartrobotninja/config.h b/keyboards/lets_split/keymaps/heartrobotninja/config.h new file mode 100644 index 0000000000..bb3556e574 --- /dev/null +++ b/keyboards/lets_split/keymaps/heartrobotninja/config.h @@ -0,0 +1,58 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL + +/* Select hand configuration */ + +// #define MASTER_LEFT +// #define MASTER_RIGHT +#define EE_HANDS + +#define ONESHOT_TAP_TOGGLE 2 +#define ONESHOT_TIMEOUT 1000 + +#undef LEADER_TIMEOUT +#define LEADER_TIMEOUT 1000 + +#undef TAPPING_TERM +#define TAPPING_TERM 200 + +#undef TAPPING_TOGGLE +#define TAPPING_TOGGLE 2 + +#ifdef SUBPROJECT_rev1 +#include "../../rev1/config.h" +#endif +#ifdef SUBPROJECT_rev2 +#include "../../rev2/config.h" +#endif +#ifdef SUBPROJECT_rev2fliphalf +#include "../../rev2fliphalf/config.h" +#endif + +#endif \ No newline at end of file diff --git a/keyboards/lets_split/keymaps/heartrobotninja/keymap.c b/keyboards/lets_split/keymaps/heartrobotninja/keymap.c new file mode 100644 index 0000000000..aa28ebe925 --- /dev/null +++ b/keyboards/lets_split/keymaps/heartrobotninja/keymap.c @@ -0,0 +1,183 @@ +#include "lets_split.h" +#include "action_layer.h" +#include "action_util.h" +#include "debug.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 _COLE 0 +#define _LOWER 1 +#define _RAISE 2 +#define _AUX 16 + +/* Layers */ +enum +{ + COLE = 0, + LOWER, // right hand 10 key. + RAISE, // left hand Fn, right hand symbols. + AUX, +}; + +/* Tap Dancery */ +enum +{ + TD_BTK, + TD_TDE, + TD_LPRN, + TD_RPRN, + TD_MIN, + TD_USC, +}; + +bool time_travel = false; + +// Fillers to make layering more clear +#define ____ KC_TRNS + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Colemak + * ,-----------------------------------------------------------------------------------. + * | ' " `| Q | W | F | P | G | J | L | U | Y | = + | ~ ; :| + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ( [ {| A | R | S | T | D | H | N | E | I | O | ) ] }| + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | - , <| Z | X | C | V | B | K | M | ? | | | ^ | _ . >| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Lower |Raise | Ctrl | Alt | Bksp | Spc |Enter |LShft | ESC | < | v | > | + * `-----------------------------------------------------------------------------------' + */ + [_COLE] = KEYMAP( + TD(TD_BTK), KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_EQL, TD(TD_TDE), + TD(TD_LPRN), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, TD(TD_RPRN), + TD(TD_MIN), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_SLSH, KC_BSLS, KC_UP, TD(TD_USC), + LOWER, RAISE, OSM(MOD_LCTL), OSM(MOD_LALT), KC_SPC, KC_BSPC, KC_ENT, OSM(MOD_LSFT), KC_ESC, KC_LEFT, KC_DOWN, KC_RGHT), + + /* Lower + * ,-----------------------------------------------------------------------------------. + * | ---- | ---- | ---- | ---- | ---- | ---- | 7 | 8 | 9 | * | / | ^ | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ---- | ---- | ---- | ---- | ---- | ---- | 4 | 5 | 6 | + | - | ---- | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | ---- | ---- | ---- | ---- | ---- | ---- | 1 | 2 | 3 | = | ---- | ---- | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ---- | ---- | ---- | ---- | ---- | ---- | ---- | 0 | . | ---- | ---- | ---- | + * `-----------------------------------------------------------------------------------' + */ + [_LOWER] = KEYMAP( + ____, ____, ____, ____, ____, ____, KC_7, KC_8, KC_9, KC_PAST, KC_PSLS, KC_CIRC, + ____, ____, ____, ____, ____, ____, KC_4, KC_5, KC_6, KC_PPLS, KC_PMNS, ____, + ____, ____, ____, ____, ____, ____, KC_1, KC_2, KC_3, KC_PEQL, ____, ____, + ____, ____, ____, ____, ____, ____, ____, KC_0, KC_MNXT, ____, ____, ____), + + /* Raise + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | ! | @ | # | $ | % | ` ~ | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | F7 | F8 | F9 | F10 | F11 | F12 | ^ | & | * | ( | ) | - _ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | ____ | ____ | ____ | ____ | ____ | ____ | [ { | ] } | \ | | ; : | ' " | = + | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | , < | . > | / ? | + * `-----------------------------------------------------------------------------------' + */ + [_RAISE] = KEYMAP( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_GRV, + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_MINS, + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_LBRC, KC_RBRC, KC_BSLS, KC_SCLN, KC_QUOT, KC_EQL, + ____, ____, ____, ____, ____, ____, ____, ____, ____, KC_COMM, KC_DOT, KC_SLSH), + + /* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | Reset| ____ | ____ | ____ | ____ | ____ | ____ | LOCK | ____ | ____ | ____ | VUP | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ____ | ____ | RUN | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | VDWN | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | PGUP | MUTE | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | HOME | PGDN | END | + * `-----------------------------------------------------------------------------------' + */ + [_AUX] = KEYMAP( + RESET, ____, ____, ____, ____, ____, ____, LGUI(KC_L), ____, ____, ____, KC_VOLU, + ____, ____, LGUI(KC_R), ____, ____, ____, ____, ____, ____, ____, ____, KC_VOLD, + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, KC_PGUP, KC_MUTE, + ____, ____, ____, ____, KC_TAB, KC_DEL, ____, ____, ____, KC_HOME, KC_PGDOWN, KC_END) + +}; + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_BTK] = ACTION_TAP_DANCE_DOUBLE(KC_QUOT, KC_GRV), + [TD_TDE] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, KC_TILD), + [TD_LPRN] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_LPRN), + [TD_RPRN] = ACTION_TAP_DANCE_DOUBLE(KC_RBRC, KC_RPRN), + [TD_MIN] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_MINS), + [TD_USC] = ACTION_TAP_DANCE_DOUBLE(KC_DOT, KC_UNDS)}; + +void persistent_default_layer_set(uint16_t default_layer) +{ + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +}; + +void matrix_scan_user(void){}; + +void matrix_init_user(void){}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) +{ + switch (keycode) + { + case COLE: + if (record->event.pressed) + { + persistent_default_layer_set(1UL << _COLE); + } + return false; + break; + case LOWER: + if (record->event.pressed) + { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _AUX); + } + else + { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _AUX); + } + return false; + break; + case RAISE: + if (record->event.pressed) + { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _AUX); + } + else + { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _AUX); + } + return false; + break; + case AUX: + if (record->event.pressed) + { + layer_on(_AUX); + } + else + { + layer_off(_AUX); + } + return false; + break; + } + return true; +} diff --git a/keyboards/lets_split/keymaps/heartrobotninja/rules.mk b/keyboards/lets_split/keymaps/heartrobotninja/rules.mk new file mode 100644 index 0000000000..d5e58dad46 --- /dev/null +++ b/keyboards/lets_split/keymaps/heartrobotninja/rules.mk @@ -0,0 +1,26 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +TAP_DANCE_ENABLE = yes +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. +ONEHAND_ENABLE = no # Enable one-hand typing + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif + From 57bf00f28f156e7b2d4838970e60ee4bcd6190f4 Mon Sep 17 00:00:00 2001 From: marcostrauss <32447479+marcostrauss@users.noreply.github.com> Date: Sat, 21 Oct 2017 22:00:41 +0200 Subject: [PATCH 24/52] ErgoDone: VID/PID/NKRO (#1872) * - Fancy default PID and option for corresponding VID. - Information about official VID/PID. - Correct manufacturer name. - NKRO enabled by default. * Resolved build error with `#ifndef FORCE_NKRO`. --- keyboards/ergodone/config.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/keyboards/ergodone/config.h b/keyboards/ergodone/config.h index d3e0f80360..1feff26aa7 100644 --- a/keyboards/ergodone/config.h +++ b/keyboards/ergodone/config.h @@ -4,10 +4,11 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x1307 +#define VENDOR_ID 0xFEED // You may want to use 0x47EC for "KTEC", which doesn't seem to be in official use as of October 2017. +#define PRODUCT_ID 0xE60D // For "EGOD"/"ErgoDone". +// The official ErgoDone VID and PID are documented at http://pid.codes/1209/2328/. #define DEVICE_VER 0x0001 -#define MANUFACTURER ErgoDone +#define MANUFACTURER K.T.E.C. #define PRODUCT ErgoDone #define DESCRIPTION QMK keyboard firmware for ErgoDone @@ -56,6 +57,11 @@ #define USB_MAX_POWER_CONSUMPTION 500 +/* NKRO */ +#ifndef FORCE_NKRO + #define FORCE_NKRO // Depends on NKRO_ENABLE. +#endif + /* * Feature disable options * These options are also useful to firmware size reduction. From 50a4b3510bdfe5e8c93d0d32d8c329f0625a0b11 Mon Sep 17 00:00:00 2001 From: CarVac Date: Sat, 21 Oct 2017 16:01:09 -0400 Subject: [PATCH 25/52] Revise carvac_dv keymap for easier alt-tab (#1871) * Add carvac_dv keymap for mitosis * Add mouse keys * move backspace, etc, and fix tab * remove commented-out functions in keymap * Fix scroll buttons and add left/right scrolling * Make num momentary, add comments, and clean up * fix mouse scroll acceleration * Add tab, remove bksp, move print screen Having tab next to control and alt makes for much easier alt-tabbing and ctrl-tabbing. That displaced print screen, but I had never used the non-layer backspace on the right hand, so I moved printscreen over there. --- keyboards/mitosis/keymaps/carvac_dv/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/mitosis/keymaps/carvac_dv/keymap.c b/keyboards/mitosis/keymaps/carvac_dv/keymap.c index 52548bc95e..81b559a46b 100644 --- a/keyboards/mitosis/keymaps/carvac_dv/keymap.c +++ b/keyboards/mitosis/keymaps/carvac_dv/keymap.c @@ -35,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+--------+--------+--------+--------||--------+--------+--------+--------+--------| * | Z | X | C | V | B || N | M | , | . | / | * '--------+--------+--------+--------+--------||--------+--------+--------+--------+--------' - * | PGUP | PSCR | LCTRL | SPACE || LSHIFT | ENTER | UP | BACKSP | + * | PGUP | TAB | LCTRL | SPACE || LSHIFT | ENTER | UP | PSCR | * |--------+--------+--------+--------||--------+--------+--------+--------| * | PGDN | LGUI | LALT | FN || NUM | LEFT | DOWN | RIGHT | * '-----------------------------------''-----------------------------------' @@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P }, {KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN }, {KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH }, - {XXXXXXX, KC_PGUP, KC_PSCR, KC_LCTL, KC_SPC, KC_LSFT, KC_ENT, KC_UP, KC_BSPC, XXXXXXX }, + {XXXXXXX, KC_PGUP, KC_TAB, KC_LCTL, KC_SPC, KC_LSFT, KC_ENT, KC_UP, KC_PSCR, XXXXXXX }, {XXXXXXX, KC_PGDN, KC_LGUI, KC_LALT, MO(_FN), MO(_NUM), KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX } }, From 2f24ed1046b825b9b6d792e4f5767ed93de94a56 Mon Sep 17 00:00:00 2001 From: Jason Rosenman Date: Sat, 14 Oct 2017 18:12:31 -0400 Subject: [PATCH 26/52] Turned off some unnecessary makefile rules --- keyboards/jj40/jj40.c | 19 +------------------ keyboards/jj40/rules.mk | 10 +++++----- 2 files changed, 6 insertions(+), 23 deletions(-) diff --git a/keyboards/jj40/jj40.c b/keyboards/jj40/jj40.c index d44e4f11d5..136e023fa1 100644 --- a/keyboards/jj40/jj40.c +++ b/keyboards/jj40/jj40.c @@ -16,30 +16,13 @@ along with this program. If not, see . */ #include "jj40.h" -#include "rgblight.h" #include #include "action_layer.h" -#include "i2c.h" #include "quantum.h" -extern rgblight_config_t rgblight_config; - -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i = 0; i < RGBLED_NUM; i++) { - led[i].r = 0; - led[i].g = 0; - led[i].b = 0; - } - } - - i2c_init(); - i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM); -} - __attribute__ ((weak)) void matrix_scan_user(void) { - rgblight_task(); + /* Nothing to do here... yet */ } diff --git a/keyboards/jj40/rules.mk b/keyboards/jj40/rules.mk index 68b80040d3..e4fb4e7ead 100644 --- a/keyboards/jj40/rules.mk +++ b/keyboards/jj40/rules.mk @@ -25,14 +25,14 @@ NO_SUSPEND_POWER_DOWN = yes F_CPU = 12000000 # build options -BOOTMAGIC_ENABLE = yes -MOUSEKEY_ENABLE = yes +BOOTMAGIC_ENABLE = no +MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes -CONSOLE_ENABLE = yes +CONSOLE_ENABLE = no COMMAND_ENABLE = yes BACKLIGHT_ENABLE = no -RGBLIGHT_ENABLE = yes -RGBLIGHT_CUSTOM_DRIVER = yes +RGBLIGHT_ENABLE = no +RGBLIGHT_CUSTOM_DRIVER = no OPT_DEFS = -DDEBUG_LEVEL=0 OPT_DEFS += -DBOOTLOADER_SIZE=2048 From 3a1ce56aed65735e396ee7ad56ee39cf94d6378c Mon Sep 17 00:00:00 2001 From: Jason Rosenman Date: Mon, 16 Oct 2017 11:23:32 -0400 Subject: [PATCH 27/52] Added caps lock + key lock --- keyboards/jj40/keymaps/oscillope/keymap.c | 8 ++++---- keyboards/jj40/rules.mk | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/keyboards/jj40/keymaps/oscillope/keymap.c b/keyboards/jj40/keymaps/oscillope/keymap.c index 2badb094a5..c1f341a06b 100644 --- a/keyboards/jj40/keymaps/oscillope/keymap.c +++ b/keyboards/jj40/keymaps/oscillope/keymap.c @@ -56,19 +56,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | | Back | Fwd | | | | | | Mute | Vol- | Vol+ | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Prev | Stop | Play | Next | + * | | | | | Lock | | | Prev | Stop | Play | Next | * `-----------------------------------------------------------------------------------' */ [_LOWER] = KEYMAP( \ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \ KC_DEL, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, \ _______, KC_WBAK, KC_WFWD, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, \ - _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT \ + _______, _______, _______, _______, KC_LOCK, _______, _______, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT \ ), /* Raise * ,-----------------------------------------------------------------------------------. - * | Esc | & | * | _ | ( | ) | 7 | 8 | 9 | = | Bksp | Del | + * | Caps | & | * | _ | ( | ) | 7 | 8 | 9 | = | Bksp | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| * | Ins | $ | % | ^ | [ | ] | 4 | 5 | 6 | - | + | | | * |------+------+------+------+------+------|------+------+------+------+------+------| @@ -78,7 +78,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_RAISE] = KEYMAP( \ - _______, KC_AMPR, KC_ASTR, KC_UNDS, KC_LPRN, KC_RPRN, KC_7, KC_8, KC_9, KC_EQL, KC_BSPC, KC_DEL, \ + KC_CAPS, KC_AMPR, KC_ASTR, KC_UNDS, KC_LPRN, KC_RPRN, KC_7, KC_8, KC_9, KC_EQL, KC_BSPC, KC_DEL, \ KC_INS, KC_DLR, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_4, KC_5, KC_6, KC_MINS, KC_PLUS, KC_PIPE, \ _______, KC_EXLM, KC_AT, KC_HASH, KC_LCBR, KC_RCBR, KC_1, KC_2, KC_3, _______, KC_BSLS, _______, \ _______, _______, _______, _______, _______, _______, KC_0, KC_HOME, KC_PGDN, KC_PGUP, KC_END \ diff --git a/keyboards/jj40/rules.mk b/keyboards/jj40/rules.mk index e4fb4e7ead..4b0a9e1900 100644 --- a/keyboards/jj40/rules.mk +++ b/keyboards/jj40/rules.mk @@ -33,6 +33,7 @@ COMMAND_ENABLE = yes BACKLIGHT_ENABLE = no RGBLIGHT_ENABLE = no RGBLIGHT_CUSTOM_DRIVER = no +KEY_LOCK_ENABLE = yes OPT_DEFS = -DDEBUG_LEVEL=0 OPT_DEFS += -DBOOTLOADER_SIZE=2048 From 3276c4c56a4003f6516a7bb2acd0b94b4db7970a Mon Sep 17 00:00:00 2001 From: James <32029516+broken-username@users.noreply.github.com> Date: Thu, 19 Oct 2017 18:45:39 -0600 Subject: [PATCH 28/52] Minor punctuation and grammar edits. --- docs/dynamic_macros.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/dynamic_macros.md b/docs/dynamic_macros.md index 8fb54c322c..4dd8a39e6f 100644 --- a/docs/dynamic_macros.md +++ b/docs/dynamic_macros.md @@ -1,6 +1,6 @@ # Dynamic macros: record and replay macros in runtime -QMK supports temporarily macros created on the fly. We call these Dynamic Macros. They are defined by the user from the keyboard and are lost when the keyboard is unplugged or otherwise rebooted. +QMK supports temporary macros created on the fly. We call these Dynamic Macros. They are defined by the user from the keyboard and are lost when the keyboard is unplugged or otherwise rebooted. You can store one or two macros and they may have a combined total of 128 keypresses. You can increase this size at the cost of RAM. @@ -22,7 +22,7 @@ enum planck_keycodes { It must be the last element because `dynamic_macros.h` will add some more keycodes after it. -Below it include the `dynamic_macro.h` header: +Below it, include the `dynamic_macro.h` header: ```c #include "dynamic_macro.h"` @@ -58,6 +58,6 @@ For users of the earlier versions of dynamic macros: It is still possible to fin } ``` -If the LED's start blinking during the recording with each keypress, it means there is no more space for the macro in the macro buffer. To fit the macro in, either make the other macro shorter (they share the same buffer) or increase the buffer size by setting the `DYNAMIC_MACRO_SIZE` preprocessor macro (default value: 128; please read the comments for it in the header). +If the LEDs start blinking during the recording with each keypress, it means there is no more space for the macro in the macro buffer. To fit the macro in, either make the other macro shorter (they share the same buffer) or increase the buffer size by setting the `DYNAMIC_MACRO_SIZE` preprocessor macro (default value: 128; please read the comments for it in the header). For the details about the internals of the dynamic macros, please read the comments in the `dynamic_macro.h` header. From 1954ad1fd88dd2fb55041e722eaa64922b06e30a Mon Sep 17 00:00:00 2001 From: Pittyolo Date: Sat, 21 Oct 2017 22:02:51 +0200 Subject: [PATCH 29/52] Added my Let's Split layout (#1867) * Add files via upload * Add files via upload * Add files via upload * Add files via upload * Update keymap.c * Update keymap.c * Update keymap.c * Update keymap.c * Add files via upload * Add files via upload * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Add files via upload * Adding my Let's Split layout As in my Nyquist layout, ISO Hungrian friendly --- keyboards/lets_split/keymaps/pitty/README.md | 91 ++++++++++ keyboards/lets_split/keymaps/pitty/config.h | 26 +++ keyboards/lets_split/keymaps/pitty/keymap.c | 171 +++++++++++++++++++ keyboards/lets_split/keymaps/pitty/rules.mk | 6 + 4 files changed, 294 insertions(+) create mode 100644 keyboards/lets_split/keymaps/pitty/README.md create mode 100644 keyboards/lets_split/keymaps/pitty/config.h create mode 100644 keyboards/lets_split/keymaps/pitty/keymap.c create mode 100644 keyboards/lets_split/keymaps/pitty/rules.mk diff --git a/keyboards/lets_split/keymaps/pitty/README.md b/keyboards/lets_split/keymaps/pitty/README.md new file mode 100644 index 0000000000..1662fce7ab --- /dev/null +++ b/keyboards/lets_split/keymaps/pitty/README.md @@ -0,0 +1,91 @@ +# Pittyolo's Let's Split Layout + +This is my Let's Split layout, modified for my ISO Hungarian taste :) + +Added some layer feedback in the underglow, but it's still a WIP. + +I wrote the keys that will appear when using Hungarian layout in Windows and the respective English keys in brackets. + + + ### Qwerty +``` +,-----------------------------------------------------------------------------------. +| Tab | Q | W | E | R | T | Z(Y)| U | I | O | P | Bksp | +|------+------+------+------+------+-------------+------+------+------+------+------| +| Esc | A | S | D |LTVIMF| G | H | J | K | L | É(;)| Á(") | +|------+------+------+------+------+------|------+------+------+------+------+------| +|Í/Shft| Y(Z) | X | C | V | B | N | M | , | . | -(/)| Shift| +|------+------+------+------+------+------+------+------+------+------+------+------| +| Ctrl | GUI | Alt |ADJUST| Spc | LOWER| Bksp | Ent | Alt | =(&) | GAME | Del | +`-----------------------------------------------------------------------------------' +``` + + Tap left shift writes the missing ISO key, hold is Shift. + + + ### Gaming mode (Toggle layer) +``` +,-----------------------------------------------------------------------------------. +| | | | | | | | | | | |Lower | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | F | | | | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Shift| | | | | | | | | | |QWERTY| +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | Left | Down | Up | Right| +`-----------------------------------------------------------------------------------' +``` + +Disabled some of the functions in the main layer to help with better gaming experience. + + + ### Lower (Hold down right Space) +``` +,-----------------------------------------------------------------------------------. +| 0(') | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Ö(0) | Ü(-) | +|------+------+------+------+------+------+------+------+------+------+------+------| +| F10 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F11 | F12 | +|------+------+------+------+------+-------------+------+------+------+------+------| +| | | | | | | | | Ins | Home | PgUp | Shift| +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | Del | End | PgDn | AltGr| +`-----------------------------------------------------------------------------------' +``` + + Function layer with everything that is missing from the main layer. + + + ### NAV (double tap toggles the layer, and hold for momentary switch) +``` +,-----------------------------------------------------------------------------------. +| | | Up | | F2 | | | 7 | 8 | 9 | / | | +|------+------+------+------+------+------|------+------+------+------+------+------| +| | Left | Down | Right| | | | 4 | 5 | 6 | * | | +|------+------+------+------+------+------|------+------+------+------+------+------| +| Shift| | | | | | | 1 | 2 | 3 | - | | +|------+------+------+------+------+------|------+------+------+------+------+------| +| | | | | | | | 0 | . | = | + | | +`-----------------------------------------------------------------------------------' +``` + + Navigation layer with a numpad on the right side. + + + + ### Vim Movement (Hold down F) +``` +,-----------------------------------------------------------------------------------. +|RGBMOD|RGBTOG| | | | | | Ú | Í | Ó | Ő | Ű | +|------+------+------+------+------+------+------+------+------+------+------+------| +|DM_stp| | | LCTRL| | | Left | Down | Up | Right| | | +|------+------+------+------+------+------+------+------+------+------+------+------| +|DM_REC| | | | | | | | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | LShft| | | | | | | RESET| +`-----------------------------------------------------------------------------------' +``` + + Turns hjkl into vim movement. I moved accented Hungarian letters here. + + + diff --git a/keyboards/lets_split/keymaps/pitty/config.h b/keyboards/lets_split/keymaps/pitty/config.h new file mode 100644 index 0000000000..131493e836 --- /dev/null +++ b/keyboards/lets_split/keymaps/pitty/config.h @@ -0,0 +1,26 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define _MASTER_RIGHT +// #define EE_HANDS + +#define TAPPING_TOGGLE 2 + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 2 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +#endif \ No newline at end of file diff --git a/keyboards/lets_split/keymaps/pitty/keymap.c b/keyboards/lets_split/keymaps/pitty/keymap.c new file mode 100644 index 0000000000..62867b8a9b --- /dev/null +++ b/keyboards/lets_split/keymaps/pitty/keymap.c @@ -0,0 +1,171 @@ +#include "lets_split.h" +#include "action_layer.h" +#include "eeconfig.h" + +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; + +extern keymap_config_t keymap_config; + +#define _QWERTY 0 +#define _GAME 1 +#define _LOWER 2 +#define _NAV 3 +#define _VIM 4 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + GAME, + LOWER, + NAV, + VIM, +}; + + +// 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 | Z(Y)| U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D |LTVIMF| G | H | J | K | L | É(;)| Á(") | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * |Í/Shft| Y(Z) | X | C | V | B | N | M | , | . | -(/)| Shift| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | Alt |ADJUST| Spc | LOWER| Bksp | Ent | Alt | =(&) | GAME | Del | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = KEYMAP( \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + KC_ESC, KC_A, KC_S, KC_D, LT(_VIM, KC_F), KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + MT(MOD_LSFT, KC_NUBS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, TT(_NAV), KC_SPC, LT(_LOWER, KC_SPC), KC_BSPC, KC_ENT, KC_RALT, KC_AMPERSAND, TG(_GAME), KC_DEL \ +), + +/* Gaming mode + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | |Lower | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | F | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| | | | | | | | | | |QWERTY| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Left | Down | Up | Right| + * `-----------------------------------------------------------------------------------' + */ +[_GAME] = KEYMAP( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, OSL(_LOWER), \ + _______, _______, _______, _______, KC_F, _______, _______, _______, _______, _______, _______, _______, \ + KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TO(_QWERTY), \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | 0(') | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Ö(0) | Ü(-) | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | F10 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F11 | F12 | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | Ins | Home | PgUp | Shift| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Del | End | PgDn | AltGr| + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = KEYMAP( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, \ + KC_F10, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F11, KC_F12, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_HOME, KC_PGUP, KC_RSFT, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, KC_END, KC_PGDN, KC_RALT \ +), + + +/* NAV + * ,-----------------------------------------------------------------------------------. + * | | | Up | | F2 | | | 7 | 8 | 9 | / | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | Left | Down | Right| | | | 4 | 5 | 6 | * | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| | | | | | | 1 | 2 | 3 | - | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | 0 | . | = | + | | + * `-----------------------------------------------------------------------------------' + */ +[_NAV] = KEYMAP( \ + _______, _______, KC_UP, _______, KC_F2, _______, _______, KC_7, KC_8, KC_9, KC_KP_SLASH, _______, \ + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, KC_4, KC_5, KC_6, KC_KP_ASTERISK, _______, \ + KC_LSFT, _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, KC_KP_MINUS, _______, \ + _______, _______, _______, _______, _______, _______, _______, KC_GRV, KC_KP_DOT, KC_KP_EQUAL, KC_KP_PLUS, _______ \ +), + +/* Vim Movement (Hold down F) + * ,-----------------------------------------------------------------------------------. + * |RGBMOD|RGBTOG| | | | | | Ú | Í | Ó | Ő | Ű | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |DM_stp| | | LCTRL| | | Left | Down | Up | Right| | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |DM_REC| | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | LShft| | | | | | | RESET| + * `-----------------------------------------------------------------------------------' + */ +[_VIM] = KEYMAP( \ + RGB_MOD, RGB_TOG, _______, _______, _______, _______, _______, KC_RBRC, KC_NUBS, KC_EQL , KC_LBRC, KC_NUHS, \ + _______, _______, _______, KC_LCTL, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, KC_LSFT, _______, _______, _______, _______, _______, _______, RESET \ +) + + +}; + +// define variables for reactive RGB +bool RGB_INIT = false; +bool TOG_STATUS = false; +int RGB_current_mode; + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + + +void matrix_scan_user(void) { + uint8_t layer = biton32(layer_state); + switch (layer) { + case _NAV: + if (RGB_INIT) {} else { + RGB_current_mode = rgblight_config.mode; + RGB_INIT = true; + } + if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false + } else { + TOG_STATUS = !TOG_STATUS; + rgblight_mode(29); + } + break; + case _LOWER: + if (RGB_INIT) {} else { + RGB_current_mode = rgblight_config.mode; + RGB_INIT = true; + } + if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false + } else { + TOG_STATUS = !TOG_STATUS; + rgblight_mode(29); + } + break; + case _QWERTY: + if (RGB_INIT) {} else { + RGB_current_mode = rgblight_config.mode; + RGB_INIT = true; + } + rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change + TOG_STATUS = false; + break; + } + }; + \ No newline at end of file diff --git a/keyboards/lets_split/keymaps/pitty/rules.mk b/keyboards/lets_split/keymaps/pitty/rules.mk new file mode 100644 index 0000000000..8ebc85a44b --- /dev/null +++ b/keyboards/lets_split/keymaps/pitty/rules.mk @@ -0,0 +1,6 @@ +RGBLIGHT_ENABLE = yes +NKRO_ENABLE = yes + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif From ab3dbd8daad0554104862f97e33291973bbef7ed Mon Sep 17 00:00:00 2001 From: James <32029516+broken-username@users.noreply.github.com> Date: Sat, 21 Oct 2017 14:04:35 -0600 Subject: [PATCH 30/52] Additional custom handwired layout - Space Oddity (#1868) * Add existing file * Add new keyboard layout - initial commit * Revised readme.md * Clarified readme.md, reorganized keymap.c, and added license text. * Fixing last incomplete commit * Just a little code cleanup to make things more readable. --- keyboards/handwired/space_oddity/config.h | 66 ++++++++ .../space_oddity/keymaps/default/keymap.c | 156 ++++++++++++++++++ keyboards/handwired/space_oddity/readme.md | 25 +++ keyboards/handwired/space_oddity/rules.mk | 57 +++++++ .../handwired/space_oddity/space_oddity.c | 1 + .../handwired/space_oddity/space_oddity.h | 22 +++ 6 files changed, 327 insertions(+) create mode 100644 keyboards/handwired/space_oddity/config.h create mode 100644 keyboards/handwired/space_oddity/keymaps/default/keymap.c create mode 100644 keyboards/handwired/space_oddity/readme.md create mode 100644 keyboards/handwired/space_oddity/rules.mk create mode 100644 keyboards/handwired/space_oddity/space_oddity.c create mode 100644 keyboards/handwired/space_oddity/space_oddity.h diff --git a/keyboards/handwired/space_oddity/config.h b/keyboards/handwired/space_oddity/config.h new file mode 100644 index 0000000000..88cc5ad00e --- /dev/null +++ b/keyboards/handwired/space_oddity/config.h @@ -0,0 +1,66 @@ +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER James Taylor +#define PRODUCT Space Odyssey +#define DESCRIPTION Keyboard + +#define CATERINA_BOOTLOADER + +#define MOUSEKEY_INTERVAL 16 +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MOUSEKEY_MAX_SPEED 7 +#define MOUSEKEY_WHEEL_DELAY 0 + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 12 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { F4, F5, F6, F7, B1, B3 } +#define MATRIX_COL_PINS { B2, B6, B5, B4, E6, D7, C6, D4, D0, D1, D2, D3 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ + +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 0 +#endif + +/* 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)) \ +) + +/* prevent stuck modifiers */ +#define PREVENT_STUCK_MODIFIERS + + +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 0 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + +#endif diff --git a/keyboards/handwired/space_oddity/keymaps/default/keymap.c b/keyboards/handwired/space_oddity/keymaps/default/keymap.c new file mode 100644 index 0000000000..26be16fbd6 --- /dev/null +++ b/keyboards/handwired/space_oddity/keymaps/default/keymap.c @@ -0,0 +1,156 @@ +/* Keymap for Space Oddity Keyboard + Copyright (C) 2017 James Taylor + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#include "space_oddity.h" + +// Planck keycodes needed for dynamic macros +enum planck_keycodes { + + QWERTY = SAFE_RANGE, + DYNAMIC_MACRO_RANGE, + +}; + +// Tap Dance +enum { + + SFT_CAPS = 0, + +}; + +#include "dynamic_macro.h" + +#define MOUSE_LAYER 2 + +const uint16_t PROGMEM fn_actions[] = { + + [2] = ACTION_LAYER_TOGGLE(MOUSE_LAYER), + +}; + +qk_tap_dance_action_t tap_dance_actions[] = { + + [SFT_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS), + +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + KEYMAP( + M(0), M(1), M(2), M(3), M(4), DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, + 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_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, + CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + TD(SFT_CAPS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT), + MO(2), MO(1), KC_LGUI, KC_RALT, KC_LCTRL, KC_SPC, ALT_T(KC_LEFT), ALL_T(KC_RGHT), LT(1, KC_UP), LT(2, KC_DOWN)), + + KEYMAP( + M(7), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DYN_REC_START1, DYN_REC_START2, + DYN_REC_STOP, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LBRC, KC_P7, KC_P8, KC_P9, KC_ASTR, KC_DEL, + KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_RBRC, KC_P4, KC_P5, KC_P6, KC_PLUS, KC_EQL, + KC_BSLS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_LCBR, KC_P1, KC_P2, KC_P3, KC_MINS, KC_PIPE, + KC_TRNS, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_RCBR, KC_P0, KC_COMM, KC_DOT, KC_SLSH, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + KEYMAP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_TRNS, KC_TRNS, KC_MS_BTN1, KC_MS_BTN3, KC_MS_BTN2, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, F(2)) +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + + switch (id) { + case 0: + if (record->event.pressed) { + SEND_STRING("()"SS_TAP(X_LEFT)); + } + break; + + case 1: + if (record->event.pressed) { + SEND_STRING("[]"SS_TAP(X_LEFT)); + } + break; + + case 2: + if (record->event.pressed) { + SEND_STRING("{}"SS_TAP(X_LEFT)); + } + break; + + case 7: + if (record->event.pressed) { + SEND_STRING("(lambda ())"SS_TAP(X_LEFT)SS_TAP(X_LEFT)); + } + break; + } + + return MACRO_NONE; + +} + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + if (!process_record_dynamic_macro(keycode, record)) { + return false; + } + return true; +} + +void led_set_user(uint8_t usb_led) { + + if (usb_led & (1 << USB_LED_NUM_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_COMPOSE)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_KANA)) { + + } else { + + } + +} diff --git a/keyboards/handwired/space_oddity/readme.md b/keyboards/handwired/space_oddity/readme.md new file mode 100644 index 0000000000..1dadcb8a93 --- /dev/null +++ b/keyboards/handwired/space_oddity/readme.md @@ -0,0 +1,25 @@ +Space Oddity Keyboard +===================== + +This firmware is for an Emacs-focused handwired custom keyboard using an Arduino Pro Micro. + +As originally designed, the top row consists of 2u keys which are used for user-defined macros. The keys for Shift and Enter are 1.75u. + +Some simple example macros are included. To add your own, simply add the number of the macro you want in the appropriate section. + +A picture of the finished product can be found here: https://imgur.com/dE9Y4XK + +## Pinout + +The following pins are used: +- Columns 1-12: B2, B6, B5, B4, E6, D7, C6, D4, D0, D1, D2, D3 +- Rows 1-6: F4, F5, F6, F7, B1, B3 + +## Compiling and loading the firmware + +To build the firmware, run `make handwired/space-oddity` from the toplevel directory. + +On GNU/Linux, you can flash the default layout onto the microcontroller by using `avrdude -p atmega32u4 -P /dev/ttyACM0 -c avr109 -U flash:w:handwired_space_oddity_default.hex`. Note that the device name under `/dev` may be different. + + +This design was conceived by James Taylor. Any requests for further information and/or tips for building your own are welcome! \ No newline at end of file diff --git a/keyboards/handwired/space_oddity/rules.mk b/keyboards/handwired/space_oddity/rules.mk new file mode 100644 index 0000000000..170c64a30e --- /dev/null +++ b/keyboards/handwired/space_oddity/rules.mk @@ -0,0 +1,57 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= no # Console for debug(+400) +COMMAND_ENABLE ?= no # Commands for debug and configuration +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend +NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality +AUDIO_ENABLE ?= no +RGBLIGHT_ENABLE ?= no +TAP_DANCE_ENABLE = yes diff --git a/keyboards/handwired/space_oddity/space_oddity.c b/keyboards/handwired/space_oddity/space_oddity.c new file mode 100644 index 0000000000..9a9a270a43 --- /dev/null +++ b/keyboards/handwired/space_oddity/space_oddity.c @@ -0,0 +1 @@ +#include "space_oddity.h" diff --git a/keyboards/handwired/space_oddity/space_oddity.h b/keyboards/handwired/space_oddity/space_oddity.h new file mode 100644 index 0000000000..e9270d044e --- /dev/null +++ b/keyboards/handwired/space_oddity/space_oddity.h @@ -0,0 +1,22 @@ +#ifndef KB_H +#define KB_H + +#include "quantum.h" + +#define KEYMAP( \ + K000, K002, K004, K006, K008, K010, K011, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, \ + K500, K501, K502, K503, K505, K507, K508, K509, K510, K511 \ +) { \ + { K000, KC_NO, K002, KC_NO, K004, KC_NO, K006, KC_NO, K008, KC_NO, K010, K011 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311 }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411 }, \ + { K500, K501, K502, K503, KC_NO, K505, KC_NO, K507, K508, K509, K510, K511 } \ +} + +#endif \ No newline at end of file From 9bb259b660925c7a5cd64b3a0a4484cdf757b504 Mon Sep 17 00:00:00 2001 From: skullY Date: Sat, 21 Oct 2017 13:51:02 -0700 Subject: [PATCH 31/52] Fix the naming for clueboard files --- docs/contributing.md | 2 +- keyboards/clueboard/17/{clueboard_17.c => 17.c} | 2 +- keyboards/clueboard/17/{clueboard_17.h => 17.h} | 0 keyboards/clueboard/17/keymaps/default/keymap.c | 2 +- keyboards/clueboard/60/{clueboard_60.c => 60.c} | 2 +- keyboards/clueboard/60/{clueboard_60.h => 60.h} | 0 keyboards/clueboard/60/keymaps/default/keymap.c | 2 +- keyboards/clueboard/60/keymaps/default_aek/keymap.c | 2 +- keyboards/clueboard/66/66.c | 1 + keyboards/clueboard/66/{clueboard_66.h => 66.h} | 0 keyboards/clueboard/66/clueboard_66.c | 1 - keyboards/clueboard/66/keymaps/bloodlvst/keymap.c | 2 +- keyboards/clueboard/66/keymaps/caps_fn/keymap.c | 2 +- keyboards/clueboard/66/keymaps/colemak/keymap.c | 2 +- keyboards/clueboard/66/keymaps/default/keymap.c | 2 +- keyboards/clueboard/66/keymaps/jokrik/keymap.c | 2 +- keyboards/clueboard/66/keymaps/mac_optimized/keymap.c | 2 +- keyboards/clueboard/66/keymaps/magicmonty/keymap.c | 2 +- keyboards/clueboard/66/keymaps/maximised/keymap.c | 2 +- keyboards/clueboard/66/keymaps/mouse_keys/keymap.c | 2 +- keyboards/clueboard/66/keymaps/serubin/keymap.c | 2 +- keyboards/clueboard/66/keymaps/shift_fn/keymap.c | 2 +- keyboards/clueboard/66/keymaps/skully/keymap.c | 2 +- keyboards/clueboard/66/keymaps/smt/keymap.c | 2 +- keyboards/clueboard/66/keymaps/tetris/keymap.c | 2 +- keyboards/clueboard/66/keymaps/unix_optimized/keymap.c | 2 +- keyboards/clueboard/66/keymaps/win_optimized/keymap.c | 2 +- keyboards/clueboard/66/keymaps/xyverz/keymap.c | 2 +- keyboards/clueboard/66/rev1/rev1.h | 2 +- keyboards/clueboard/66/rev2/rev2.h | 2 +- keyboards/clueboard/66/rev3/rev3.h | 2 +- keyboards/clueboard/card/{cluecard.c => card.c} | 2 +- keyboards/clueboard/card/{cluecard.h => card.h} | 0 keyboards/clueboard/card/keymaps/default/keymap.c | 2 +- keyboards/clueboard/card/keymaps/rgb_effects/keymap.c | 2 +- 35 files changed, 30 insertions(+), 30 deletions(-) rename keyboards/clueboard/17/{clueboard_17.c => 17.c} (97%) rename keyboards/clueboard/17/{clueboard_17.h => 17.h} (100%) rename keyboards/clueboard/60/{clueboard_60.c => 60.c} (96%) rename keyboards/clueboard/60/{clueboard_60.h => 60.h} (100%) create mode 100644 keyboards/clueboard/66/66.c rename keyboards/clueboard/66/{clueboard_66.h => 66.h} (100%) delete mode 100644 keyboards/clueboard/66/clueboard_66.c rename keyboards/clueboard/card/{cluecard.c => card.c} (98%) rename keyboards/clueboard/card/{cluecard.h => card.h} (100%) diff --git a/docs/contributing.md b/docs/contributing.md index 755dd012f3..58af8ce53b 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -80,7 +80,7 @@ We have a few different types of changes in QMK, each requiring a different leve * Make sure your code change actually compiles. * Keymaps: Make sure that `make keyboard:your_new_keymap` does not return an error * Keyboards: Make sure that `make keyboard:all` does not return any errors - * Core: Make sure that `make allkb` does not return any errors. + * Core: Make sure that `make all` does not return any errors. * Make sure commit messages are understandable on their own. You should put a short description (no more than 70 characters) on the first line, the second line should be empty, and on the 3rd and later lines you should describe your commit in detail, if required. Example: ``` diff --git a/keyboards/clueboard/17/clueboard_17.c b/keyboards/clueboard/17/17.c similarity index 97% rename from keyboards/clueboard/17/clueboard_17.c rename to keyboards/clueboard/17/17.c index 04cc812178..f84e3253e9 100644 --- a/keyboards/clueboard/17/clueboard_17.c +++ b/keyboards/clueboard/17/17.c @@ -1,4 +1,4 @@ -#include "clueboard_17.h" +#include "17.h" int pwm_level; diff --git a/keyboards/clueboard/17/clueboard_17.h b/keyboards/clueboard/17/17.h similarity index 100% rename from keyboards/clueboard/17/clueboard_17.h rename to keyboards/clueboard/17/17.h diff --git a/keyboards/clueboard/17/keymaps/default/keymap.c b/keyboards/clueboard/17/keymaps/default/keymap.c index 7a0d518515..e8f3525a86 100644 --- a/keyboards/clueboard/17/keymaps/default/keymap.c +++ b/keyboards/clueboard/17/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -#include "clueboard_17.h" +#include "17.h" #include "backlight.h" diff --git a/keyboards/clueboard/60/clueboard_60.c b/keyboards/clueboard/60/60.c similarity index 96% rename from keyboards/clueboard/60/clueboard_60.c rename to keyboards/clueboard/60/60.c index a0b74db72f..aac4e94c3d 100644 --- a/keyboards/clueboard/60/clueboard_60.c +++ b/keyboards/clueboard/60/60.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "clueboard_60.h" +#include "60.h" void matrix_init_kb(void) { diff --git a/keyboards/clueboard/60/clueboard_60.h b/keyboards/clueboard/60/60.h similarity index 100% rename from keyboards/clueboard/60/clueboard_60.h rename to keyboards/clueboard/60/60.h diff --git a/keyboards/clueboard/60/keymaps/default/keymap.c b/keyboards/clueboard/60/keymaps/default/keymap.c index e662057f08..1b0c712640 100644 --- a/keyboards/clueboard/60/keymaps/default/keymap.c +++ b/keyboards/clueboard/60/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -#include "clueboard_60.h" +#include "60.h" #define _______ KC_TRNS diff --git a/keyboards/clueboard/60/keymaps/default_aek/keymap.c b/keyboards/clueboard/60/keymaps/default_aek/keymap.c index d2d3db7720..63b1d8ba2e 100644 --- a/keyboards/clueboard/60/keymaps/default_aek/keymap.c +++ b/keyboards/clueboard/60/keymaps/default_aek/keymap.c @@ -1,4 +1,4 @@ -#include "clueboard_60.h" +#include "60.h" #define _______ KC_TRNS diff --git a/keyboards/clueboard/66/66.c b/keyboards/clueboard/66/66.c new file mode 100644 index 0000000000..15d7422f18 --- /dev/null +++ b/keyboards/clueboard/66/66.c @@ -0,0 +1 @@ +#include "66.h" diff --git a/keyboards/clueboard/66/clueboard_66.h b/keyboards/clueboard/66/66.h similarity index 100% rename from keyboards/clueboard/66/clueboard_66.h rename to keyboards/clueboard/66/66.h diff --git a/keyboards/clueboard/66/clueboard_66.c b/keyboards/clueboard/66/clueboard_66.c deleted file mode 100644 index 1e000e62de..0000000000 --- a/keyboards/clueboard/66/clueboard_66.c +++ /dev/null @@ -1 +0,0 @@ -#include "clueboard_66.h" diff --git a/keyboards/clueboard/66/keymaps/bloodlvst/keymap.c b/keyboards/clueboard/66/keymaps/bloodlvst/keymap.c index bc50afa2f2..d23b4cb846 100644 --- a/keyboards/clueboard/66/keymaps/bloodlvst/keymap.c +++ b/keyboards/clueboard/66/keymaps/bloodlvst/keymap.c @@ -1,4 +1,4 @@ -#include "clueboard_66.h" +#include "66.h" // Helpful defines #define _______ KC_TRNS diff --git a/keyboards/clueboard/66/keymaps/caps_fn/keymap.c b/keyboards/clueboard/66/keymaps/caps_fn/keymap.c index 78eb43390e..4a5fa72db1 100644 --- a/keyboards/clueboard/66/keymaps/caps_fn/keymap.c +++ b/keyboards/clueboard/66/keymaps/caps_fn/keymap.c @@ -1,4 +1,4 @@ -#include "clueboard_66.h" +#include "66.h" // Helpful defines #define _______ KC_TRNS diff --git a/keyboards/clueboard/66/keymaps/colemak/keymap.c b/keyboards/clueboard/66/keymaps/colemak/keymap.c index b2921cca24..4759823e8a 100644 --- a/keyboards/clueboard/66/keymaps/colemak/keymap.c +++ b/keyboards/clueboard/66/keymaps/colemak/keymap.c @@ -1,4 +1,4 @@ -#include "clueboard_66.h" +#include "66.h" // Helpful defines #define _______ KC_TRNS diff --git a/keyboards/clueboard/66/keymaps/default/keymap.c b/keyboards/clueboard/66/keymaps/default/keymap.c index ad623c5480..8691653920 100644 --- a/keyboards/clueboard/66/keymaps/default/keymap.c +++ b/keyboards/clueboard/66/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -#include "clueboard_66.h" +#include "66.h" // Helpful defines #define _______ KC_TRNS diff --git a/keyboards/clueboard/66/keymaps/jokrik/keymap.c b/keyboards/clueboard/66/keymaps/jokrik/keymap.c index dd38e904c2..9b03ae3ad5 100644 --- a/keyboards/clueboard/66/keymaps/jokrik/keymap.c +++ b/keyboards/clueboard/66/keymaps/jokrik/keymap.c @@ -1,4 +1,4 @@ -#include "clueboard_66.h" +#include "66.h" // Helpful defines #define _______ KC_TRNS diff --git a/keyboards/clueboard/66/keymaps/mac_optimized/keymap.c b/keyboards/clueboard/66/keymaps/mac_optimized/keymap.c index 8c3568e593..8f54a7bea9 100644 --- a/keyboards/clueboard/66/keymaps/mac_optimized/keymap.c +++ b/keyboards/clueboard/66/keymaps/mac_optimized/keymap.c @@ -1,4 +1,4 @@ -#include "clueboard_66.h" +#include "66.h" // Helpful defines #define _______ KC_TRNS diff --git a/keyboards/clueboard/66/keymaps/magicmonty/keymap.c b/keyboards/clueboard/66/keymaps/magicmonty/keymap.c index 6df7d78697..66915de1be 100644 --- a/keyboards/clueboard/66/keymaps/magicmonty/keymap.c +++ b/keyboards/clueboard/66/keymaps/magicmonty/keymap.c @@ -1,4 +1,4 @@ -#include "clueboard_66.h" +#include "66.h" // Helpful defines #define _______ KC_TRNS diff --git a/keyboards/clueboard/66/keymaps/maximised/keymap.c b/keyboards/clueboard/66/keymaps/maximised/keymap.c index 260f974773..bf577d1aaf 100644 --- a/keyboards/clueboard/66/keymaps/maximised/keymap.c +++ b/keyboards/clueboard/66/keymaps/maximised/keymap.c @@ -1,4 +1,4 @@ -#include "clueboard_66.h" +#include "66.h" // Helpful defines #define _______ KC_TRNS diff --git a/keyboards/clueboard/66/keymaps/mouse_keys/keymap.c b/keyboards/clueboard/66/keymaps/mouse_keys/keymap.c index 15e068aa14..e3422a5a6b 100644 --- a/keyboards/clueboard/66/keymaps/mouse_keys/keymap.c +++ b/keyboards/clueboard/66/keymaps/mouse_keys/keymap.c @@ -1,4 +1,4 @@ -#include "clueboard_66.h" +#include "66.h" // Helpful defines #define _______ KC_TRNS diff --git a/keyboards/clueboard/66/keymaps/serubin/keymap.c b/keyboards/clueboard/66/keymaps/serubin/keymap.c index 112670d662..1c9f21d427 100644 --- a/keyboards/clueboard/66/keymaps/serubin/keymap.c +++ b/keyboards/clueboard/66/keymaps/serubin/keymap.c @@ -1,4 +1,4 @@ -#include "clueboard_66.h" +#include "66.h" // Helpful defines #define _______ KC_TRNS diff --git a/keyboards/clueboard/66/keymaps/shift_fn/keymap.c b/keyboards/clueboard/66/keymaps/shift_fn/keymap.c index 0d57e38a10..cf6223efba 100644 --- a/keyboards/clueboard/66/keymaps/shift_fn/keymap.c +++ b/keyboards/clueboard/66/keymaps/shift_fn/keymap.c @@ -1,4 +1,4 @@ -#include "clueboard_66.h" +#include "66.h" // Helpful defines #define _______ KC_TRNS diff --git a/keyboards/clueboard/66/keymaps/skully/keymap.c b/keyboards/clueboard/66/keymaps/skully/keymap.c index 2e23948b23..8ec2bed077 100644 --- a/keyboards/clueboard/66/keymaps/skully/keymap.c +++ b/keyboards/clueboard/66/keymaps/skully/keymap.c @@ -1,4 +1,4 @@ -#include "clueboard_66.h" +#include "66.h" // Helpful defines #define _______ KC_TRNS diff --git a/keyboards/clueboard/66/keymaps/smt/keymap.c b/keyboards/clueboard/66/keymaps/smt/keymap.c index c61b32f8b6..095623ccc8 100644 --- a/keyboards/clueboard/66/keymaps/smt/keymap.c +++ b/keyboards/clueboard/66/keymaps/smt/keymap.c @@ -1,4 +1,4 @@ -#include "clueboard_66.h" +#include "66.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. diff --git a/keyboards/clueboard/66/keymaps/tetris/keymap.c b/keyboards/clueboard/66/keymaps/tetris/keymap.c index 4bf2465a9f..4eeb719f92 100644 --- a/keyboards/clueboard/66/keymaps/tetris/keymap.c +++ b/keyboards/clueboard/66/keymaps/tetris/keymap.c @@ -1,4 +1,4 @@ -#include "clueboard_66.h" +#include "66.h" #include "tetris_text.h" // Helpful defines diff --git a/keyboards/clueboard/66/keymaps/unix_optimized/keymap.c b/keyboards/clueboard/66/keymaps/unix_optimized/keymap.c index dab959bdc7..91f5250c7e 100644 --- a/keyboards/clueboard/66/keymaps/unix_optimized/keymap.c +++ b/keyboards/clueboard/66/keymaps/unix_optimized/keymap.c @@ -1,4 +1,4 @@ -#include "clueboard_66.h" +#include "66.h" // Helpful defines #define _______ KC_TRNS diff --git a/keyboards/clueboard/66/keymaps/win_optimized/keymap.c b/keyboards/clueboard/66/keymaps/win_optimized/keymap.c index fb83aaa24c..83c9a6716c 100644 --- a/keyboards/clueboard/66/keymaps/win_optimized/keymap.c +++ b/keyboards/clueboard/66/keymaps/win_optimized/keymap.c @@ -1,4 +1,4 @@ -#include "clueboard_66.h" +#include "66.h" // Helpful defines #define _______ KC_TRNS diff --git a/keyboards/clueboard/66/keymaps/xyverz/keymap.c b/keyboards/clueboard/66/keymaps/xyverz/keymap.c index b725b11dd7..d7093f0a3c 100644 --- a/keyboards/clueboard/66/keymaps/xyverz/keymap.c +++ b/keyboards/clueboard/66/keymaps/xyverz/keymap.c @@ -1,7 +1,7 @@ // Xyverz' keymap. // It's based on the default keymap, but Dvorak! -#include "clueboard_66.h" +#include "66.h" // Used for SHIFT_ESC #define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) diff --git a/keyboards/clueboard/66/rev1/rev1.h b/keyboards/clueboard/66/rev1/rev1.h index cc94085f92..ca54df1ec2 100644 --- a/keyboards/clueboard/66/rev1/rev1.h +++ b/keyboards/clueboard/66/rev1/rev1.h @@ -1,7 +1,7 @@ #ifndef REV1_H #define REV1_H -#include "../clueboard_66.h" +#include "../66.h" /* Clueboard matrix layout * ,-----------------------------------------------------------. ,---. diff --git a/keyboards/clueboard/66/rev2/rev2.h b/keyboards/clueboard/66/rev2/rev2.h index da7ce500f9..9a1b727198 100644 --- a/keyboards/clueboard/66/rev2/rev2.h +++ b/keyboards/clueboard/66/rev2/rev2.h @@ -1,7 +1,7 @@ #ifndef REV2_H #define REV2_H -#include "clueboard_66.h" +#include "66.h" /* Clueboard matrix layout * ,-----------------------------------------------------------. ,---. diff --git a/keyboards/clueboard/66/rev3/rev3.h b/keyboards/clueboard/66/rev3/rev3.h index 7fd243c809..9f3cdb1050 100644 --- a/keyboards/clueboard/66/rev3/rev3.h +++ b/keyboards/clueboard/66/rev3/rev3.h @@ -1,7 +1,7 @@ #ifndef REV3_H #define REV3_H -#include "clueboard_66.h" +#include "66.h" /* Clueboard matrix layout * ,-----------------------------------------------------------. ,---. diff --git a/keyboards/clueboard/card/cluecard.c b/keyboards/clueboard/card/card.c similarity index 98% rename from keyboards/clueboard/card/cluecard.c rename to keyboards/clueboard/card/card.c index 81db252d28..9b4b397d92 100644 --- a/keyboards/clueboard/card/cluecard.c +++ b/keyboards/clueboard/card/card.c @@ -1,4 +1,4 @@ -#include "cluecard.h" +#include "card.h" #define BL_RED OCR1B #define BL_GREEN OCR1A #define BL_BLUE OCR1C diff --git a/keyboards/clueboard/card/cluecard.h b/keyboards/clueboard/card/card.h similarity index 100% rename from keyboards/clueboard/card/cluecard.h rename to keyboards/clueboard/card/card.h diff --git a/keyboards/clueboard/card/keymaps/default/keymap.c b/keyboards/clueboard/card/keymaps/default/keymap.c index cd87750a81..5fa6ae20a9 100644 --- a/keyboards/clueboard/card/keymaps/default/keymap.c +++ b/keyboards/clueboard/card/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -#include "cluecard.h" +#include "card.h" #ifdef AUDIO_ENABLE #include "audio.h" #endif diff --git a/keyboards/clueboard/card/keymaps/rgb_effects/keymap.c b/keyboards/clueboard/card/keymaps/rgb_effects/keymap.c index 74c95ce8a8..15cf5325d0 100644 --- a/keyboards/clueboard/card/keymaps/rgb_effects/keymap.c +++ b/keyboards/clueboard/card/keymaps/rgb_effects/keymap.c @@ -1,4 +1,4 @@ -#include "cluecard.h" +#include "card.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = KEYMAP( From 06f196c589b3c8c70c6cda6e95db6d1a2bf6e80b Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Sat, 21 Oct 2017 11:44:11 -1000 Subject: [PATCH 32/52] Creates a userspace for keymaps (#1559) * create a user space * adds example * document, add readme.md * jackhumbert userspace, ergodox keymap --- build_keyboard.mk | 5 +++ docs/_summary.md | 1 + docs/feature_userspace.md | 33 +++++++++++++++++++ .../ergodox/{jack => jackhumbert}/config.h | 0 .../ergodox/{jack => jackhumbert}/keymap.c | 0 users/_example/_example.c | 5 +++ users/_example/_example.h | 8 +++++ users/_example/readme.md | 14 ++++++++ users/_example/rules.mk | 1 + users/jackhumbert/jackhumbert.c | 1 + users/jackhumbert/jackhumbert.h | 6 ++++ users/jackhumbert/readme.md | 14 ++++++++ users/jackhumbert/rules.mk | 1 + users/readme.md | 3 ++ 14 files changed, 92 insertions(+) create mode 100644 docs/feature_userspace.md rename layouts/community/ergodox/{jack => jackhumbert}/config.h (100%) rename layouts/community/ergodox/{jack => jackhumbert}/keymap.c (100%) create mode 100644 users/_example/_example.c create mode 100644 users/_example/_example.h create mode 100644 users/_example/readme.md create mode 100644 users/_example/rules.mk create mode 100644 users/jackhumbert/jackhumbert.c create mode 100644 users/jackhumbert/jackhumbert.h create mode 100644 users/jackhumbert/readme.md create mode 100644 users/jackhumbert/rules.mk create mode 100644 users/readme.md diff --git a/build_keyboard.mk b/build_keyboard.mk index 4502078502..2c86fe55ef 100644 --- a/build_keyboard.mk +++ b/build_keyboard.mk @@ -183,6 +183,10 @@ else # this state should never be reached endif +# User space stuff +USER_PATH := users/$(KEYMAP) +-include $(USER_PATH)/rules.mk + # Object files directory # To put object files in current directory, use a dot (.), do NOT make # this an empty or blank macro! @@ -204,6 +208,7 @@ SRC += $(KEYBOARD_SRC) \ VPATH += $(KEYMAP_PATH) VPATH += $(KEYBOARD_PATHS) VPATH += $(COMMON_VPATH) +VPATH += $(USER_PATH) include common_features.mk include $(TMK_PATH)/protocol.mk diff --git a/docs/_summary.md b/docs/_summary.md index edbf04c1a4..55cfd2ab3d 100644 --- a/docs/_summary.md +++ b/docs/_summary.md @@ -15,6 +15,7 @@ * [Features](features.md) * [Layouts](feature_layouts.md) * [Common Shortcuts](feature_common_shortcuts.md) + * [Userspace](feature_userspace.md) * [Backlight](feature_backlight.md) * [Bootmagic](feature_bootmagic.md) * [Dynamic Macros](dynamic_macros.md) diff --git a/docs/feature_userspace.md b/docs/feature_userspace.md new file mode 100644 index 0000000000..edc9f6e32e --- /dev/null +++ b/docs/feature_userspace.md @@ -0,0 +1,33 @@ +# Userspace: sharing code between keymaps + +If you use more than one keyboard with a similar keymap, you might see the benefit in being able to share code between them. Create your own folder in `users/` named the same as your keymap (ideally your github username, ``) with the following structure: + +* `/users//` (added to the path automatically) + * `readme.md` + * `rules.mk` (included automatically) + * `.h` (optional) + * `.c` (optional) + +`.c` will need to be added to the SRC in `rules.mk` like this: + + SRC += .c + +Additional files may be added in the same way - it's recommended you have one named ``.c/.h though. + +All this only happens when you build a keymap named ``, like this: + + make planck: + +For example, + + make planck:jack + +Will include the `/users/jack/` folder in the path, along with `/users/jack/rules.mk`. + +## Readme + +Please include authorship (your name, github username, email), and optionally [a license that's GPL compatible](https://www.gnu.org/licenses/license-list.html#GPLCompatibleLicenses). + +## Example + +For a brief example, checkout `/users/_example/` until we have more reasonable and useful examples. \ No newline at end of file diff --git a/layouts/community/ergodox/jack/config.h b/layouts/community/ergodox/jackhumbert/config.h similarity index 100% rename from layouts/community/ergodox/jack/config.h rename to layouts/community/ergodox/jackhumbert/config.h diff --git a/layouts/community/ergodox/jack/keymap.c b/layouts/community/ergodox/jackhumbert/keymap.c similarity index 100% rename from layouts/community/ergodox/jack/keymap.c rename to layouts/community/ergodox/jackhumbert/keymap.c diff --git a/users/_example/_example.c b/users/_example/_example.c new file mode 100644 index 0000000000..8e0778b122 --- /dev/null +++ b/users/_example/_example.c @@ -0,0 +1,5 @@ +#include "_example.h" + +void my_custom_function(void) { + +} \ No newline at end of file diff --git a/users/_example/_example.h b/users/_example/_example.h new file mode 100644 index 0000000000..f7c7990257 --- /dev/null +++ b/users/_example/_example.h @@ -0,0 +1,8 @@ +#ifndef USERSPACE +#define USERSPACE + +#include "quantum.h" + +void my_custom_function(void); + +#endif \ No newline at end of file diff --git a/users/_example/readme.md b/users/_example/readme.md new file mode 100644 index 0000000000..fdea33b67a --- /dev/null +++ b/users/_example/readme.md @@ -0,0 +1,14 @@ +Copyright @ + +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 . \ No newline at end of file diff --git a/users/_example/rules.mk b/users/_example/rules.mk new file mode 100644 index 0000000000..250adc3d0d --- /dev/null +++ b/users/_example/rules.mk @@ -0,0 +1 @@ +SRC += _example.c \ No newline at end of file diff --git a/users/jackhumbert/jackhumbert.c b/users/jackhumbert/jackhumbert.c new file mode 100644 index 0000000000..011e0efb8f --- /dev/null +++ b/users/jackhumbert/jackhumbert.c @@ -0,0 +1 @@ +#include "jackhumbert.h" \ No newline at end of file diff --git a/users/jackhumbert/jackhumbert.h b/users/jackhumbert/jackhumbert.h new file mode 100644 index 0000000000..69cfa67451 --- /dev/null +++ b/users/jackhumbert/jackhumbert.h @@ -0,0 +1,6 @@ +#ifndef USERSPACE +#define USERSPACE + +#include "quantum.h" + +#endif \ No newline at end of file diff --git a/users/jackhumbert/readme.md b/users/jackhumbert/readme.md new file mode 100644 index 0000000000..479a64140a --- /dev/null +++ b/users/jackhumbert/readme.md @@ -0,0 +1,14 @@ +Copyright 2017 Jack Humbert @jackhumbert + +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 . \ No newline at end of file diff --git a/users/jackhumbert/rules.mk b/users/jackhumbert/rules.mk new file mode 100644 index 0000000000..f2981bb786 --- /dev/null +++ b/users/jackhumbert/rules.mk @@ -0,0 +1 @@ +SRC += jackhumbert.c \ No newline at end of file diff --git a/users/readme.md b/users/readme.md new file mode 100644 index 0000000000..d8f14d8beb --- /dev/null +++ b/users/readme.md @@ -0,0 +1,3 @@ +# User space + +This is a place for users to put code that they might use between keyboards. If you build the keymap `mine`, `/users/mine/rules.mk` will be included in your build, and `/users/mine/` will be in your path - keep these things in mind when naming your files and referencing them from other places. \ No newline at end of file From 725aa5b8201b058e3a02da049eefd00d859f6bce Mon Sep 17 00:00:00 2001 From: Daniel Gordon Date: Sat, 21 Oct 2017 20:33:51 -0500 Subject: [PATCH 33/52] Update to Tap-Dance Docs for Fast Typists * Quad function tap dance works as intended when typing fast * Example 4 in doc has been updated Change-Id: If33406299e2eed49152c495da92f4977dfdc1e2f --- docs/tap_dance.md | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/docs/tap_dance.md b/docs/tap_dance.md index 473725414a..32dffa9cd3 100644 --- a/docs/tap_dance.md +++ b/docs/tap_dance.md @@ -170,7 +170,7 @@ qk_tap_dance_action_t tap_dance_actions[] = { ### Example 4: 'Quad Function Tap-Dance' -By @DanielGGordon +By [DanielGGordon](https://github.com/danielggordon) Allow one key to have 4 (or more) functions, depending on number of presses, and if the key is held or tapped. Below is a specific example: @@ -187,7 +187,8 @@ enum { SINGLE_TAP = 1, SINGLE_HOLD = 2, DOUBLE_TAP = 3, - DOUBLE_HOLD = 4 + DOUBLE_HOLD = 4, + DOUBLE_SINGLE_TAP = 5 //send SINGLE_TAP twice - NOT DOUBLE_TAP // Add more enums here if you want for triple, quadruple, etc. }; @@ -197,12 +198,21 @@ typedef struct { } tap; int cur_dance (qk_tap_dance_state_t *state) { - if ((state->count == 1) && (!state->pressed)) return SINGLE_TAP; - else if ((state->count == 1) && (state->pressed)) return SINGLE_HOLD; - else if ((state->count == 2) && (!state->pressed)) return DOUBLE_TAP; - else if ((state->count == 2) && (state->pressed)) return DOUBLE_HOLD; - else return 5; //magic number. At some point this method will expand to work for more presses + if (state->count == 1) { + //If count = 1, and it has been interrupted - it doesn't matter if it is pressed or not: Send SINGLE_TAP + if (state->interrupted || state->!pressed) return SINGLE_TAP; + else return SINGLE_HOLD; + } + //If count = 2, and it has been interrupted - assume that user is trying to type the letter associated + //with single tap. In example below, that means to send `xx` instead of `Escape`. + else if (state->count = 2) { + if (state->interrupted) return DOUBLE_SINGLE_TAP; + else if (state->pressed) return DOUBLE_HOLD; + else return DOUBLE_TAP; + } + else return 6; //magic number. At some point this method will expand to work for more presses } + //**************** Definitions needed for quad function to work *********************// //instanalize an instance of 'tap' for the 'x' tap dance. @@ -217,7 +227,11 @@ void x_finished (qk_tap_dance_state_t *state, void *user_data) { case SINGLE_TAP: register_code(KC_X); break; case SINGLE_HOLD: register_code(KC_LCTRL); break; case DOUBLE_TAP: register_code(KC_ESC); break; - case DOUBLE_HOLD: register_code(KC_LALT); + case DOUBLE_HOLD: register_code(KC_LALT); break; + case DOUBLE_SINGLE_TAP: register_code(KC_X); unregister_code(KC_X); register_code(KC_X); + //Last case is for fast typing. Assuming your key is `f`: + //For example, when typing the word `buffer`, and you want to make sure that you send `ff` and not `Esc`. + //In order to type `ff` when typing fast, the next character will have to be hit within the `TAPPING_TERM`, which by default is 200ms. } } @@ -227,6 +241,7 @@ void x_reset (qk_tap_dance_state_t *state, void *user_data) { case SINGLE_HOLD: unregister_code(KC_LCTRL); break; case DOUBLE_TAP: unregister_code(KC_ESC); break; case DOUBLE_HOLD: unregister_code(KC_LALT); + case DOUBLE_SINGLE_TAP: unregister_code(KC_X); } xtap_state.state = 0; } From 736140439dcd448c4ff93fc9d1326b8de68c1308 Mon Sep 17 00:00:00 2001 From: Carlos Filoteo Date: Sat, 21 Oct 2017 20:20:21 -0600 Subject: [PATCH 34/52] Add links to EEPROM files --- keyboards/orthodox/readme.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/keyboards/orthodox/readme.md b/keyboards/orthodox/readme.md index fb591b0070..0c47dd9c43 100644 --- a/keyboards/orthodox/readme.md +++ b/keyboards/orthodox/readme.md @@ -125,13 +125,12 @@ EEPROM for the left and right halves. The EEPROM is used to store whether the half is left handed or right handed. This makes it so that the same firmware -file will run on both hands instead of having to flash left and right handed +file will run on both hands instead of having to flash [left](../lets_split/eeprom-lefthand.eep) and [right](../lets_split/eeprom-righthand.eep) handed versions of the firmware to each half. To flash the EEPROM file for the left half run: ``` avrdude -p atmega32u4 -P $(COM_PORT) -c avr109 -U eeprom:w:eeprom-lefthand.eep // or the equivalent in dfu-programmer - ``` and similarly for right half ``` From 22564d8ee7ac31a867dfabcc2e9bc97f9c72678d Mon Sep 17 00:00:00 2001 From: mondaufgrau Date: Sun, 22 Oct 2017 06:26:05 +0200 Subject: [PATCH 35/52] Added xd60 ISO keymap (#1865) * Added xd60 ISO keymap * renamed ISO to iso * some cleaning * added iso keymap * some cleaning --- keyboards/xd60/keymaps/iso/keymap.c | 49 ++++++++++++++++++++++++++++ keyboards/xd60/keymaps/iso/readme.md | 9 +++++ 2 files changed, 58 insertions(+) create mode 100644 keyboards/xd60/keymaps/iso/keymap.c create mode 100644 keyboards/xd60/keymaps/iso/readme.md diff --git a/keyboards/xd60/keymaps/iso/keymap.c b/keyboards/xd60/keymaps/iso/keymap.c new file mode 100644 index 0000000000..c036d99f78 --- /dev/null +++ b/keyboards/xd60/keymaps/iso/keymap.c @@ -0,0 +1,49 @@ +#include "xd60.h" +#include "action_layer.h" + +#define _BL 0 +#define _FL 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // 0: Base Layer + [_BL] = KEYMAP( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NO, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_NO, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ + KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,KC_DEL, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, F(0), KC_LEFT, KC_DOWN, KC_RIGHT), + + // 1: Function Layer + [_FL] = KEYMAP( + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_NO, \ + KC_NO, KC_VOLD, KC_MUTE, KC_VOLU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, BL_TOGG, BL_DEC, BL_INC, KC_NO, \ + KC_NO, KC_MPLY, KC_MSTP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ENT, \ + KC_LSFT, RGB_TOG, RGB_MOD, KC_CUT, KC_COPY,KC_PASTE,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD, KC_HOME, KC_PGUP, KC_END, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, F(0), KC_NO, KC_PGDOWN, KC_NO), + +}; + +// Custom Actions +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay +}; + +// Macros +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { register_code(KC_RSFT); } + else { unregister_code(KC_RSFT); } + break; + } + + return MACRO_NONE; +}; + +// Loop +void matrix_scan_user(void) { + // Empty +}; diff --git a/keyboards/xd60/keymaps/iso/readme.md b/keyboards/xd60/keymaps/iso/readme.md new file mode 100644 index 0000000000..82c575d981 --- /dev/null +++ b/keyboards/xd60/keymaps/iso/readme.md @@ -0,0 +1,9 @@ +# iso Keymap for XIUDI's 60% XD60 PCB + +![iso Keymap for XD60]() + +## Additional Notes +iso Keymap for XD60. + +## Build +To build the default keymap, simply run `make xd60:iso`. From f3534f999f2493b290c56a27ff062cad4610f4b8 Mon Sep 17 00:00:00 2001 From: drashna Date: Sat, 21 Oct 2017 21:27:54 -0700 Subject: [PATCH 36/52] Updated keymaps (#1853) * Add woodpad * Cleanup * Remove misc layouts for woodpad * Move woodpad to handwired * Updated RGB Underglow info * Cleanup macros * Fix odd merge issue * Tweaked RGB lighting stuff * Start to merge orthodox/ergodox keymaps (persistant layers) * Add forced NKRO * Added Colemak and Dvorak layers to default orthodox keymap * Added default layer (qwerty/colemak/dvorak) detection to RGB Underglow * Updated macros and added workman keymaps * Fixed RGB lighting for Workman layout * Add leader keys * Remove force NKRO * Add Viterbi one handed layout and minor tweaks to others --- .../keymaps/drashna-custom/config.h | 5 - .../keymaps/drashna-custom/keymap.c | 632 ++++++++++-------- .../keymaps/drashna-custom/rules.mk | 4 +- .../woodpad/keymaps/drashna/config.h | 1 + .../woodpad/keymaps/drashna/keymap.c | 2 +- keyboards/orthodox/keymaps/drashna/config.h | 6 - keyboards/orthodox/keymaps/drashna/keymap.c | 128 ++-- keyboards/orthodox/keymaps/drashna/rules.mk | 11 +- keyboards/viterbi/keymaps/drashna/config.h | 41 ++ keyboards/viterbi/keymaps/drashna/keymap.c | 413 ++++++++++++ keyboards/viterbi/keymaps/drashna/rules.mk | 8 + 11 files changed, 889 insertions(+), 362 deletions(-) create mode 100644 keyboards/viterbi/keymaps/drashna/config.h create mode 100644 keyboards/viterbi/keymaps/drashna/keymap.c create mode 100644 keyboards/viterbi/keymaps/drashna/rules.mk diff --git a/keyboards/ergodox_ez/keymaps/drashna-custom/config.h b/keyboards/ergodox_ez/keymaps/drashna-custom/config.h index f4775eeac1..5fef1e0d8c 100644 --- a/keyboards/ergodox_ez/keymaps/drashna-custom/config.h +++ b/keyboards/ergodox_ez/keymaps/drashna-custom/config.h @@ -14,10 +14,5 @@ #endif // RGBLIGHT_ENABLE #define FORCE_NKRO -#ifdef FORCE_NKRO -#define NKRO_EPSIZE 32 -#endif - -#define PERMISSIVE_HOLD #endif \ No newline at end of file diff --git a/keyboards/ergodox_ez/keymaps/drashna-custom/keymap.c b/keyboards/ergodox_ez/keymaps/drashna-custom/keymap.c index 5f0504beb7..5440c33460 100644 --- a/keyboards/ergodox_ez/keymaps/drashna-custom/keymap.c +++ b/keyboards/ergodox_ez/keymaps/drashna-custom/keymap.c @@ -28,21 +28,22 @@ along with this program. If not, see . #define QWERTY 0 #define COLEMAK 1 #define DVORAK 2 -#define SYMB 3 -#define OVERWATCH 4 -#define DIABLO 5 -#define MOUS 6 - - +#define WORKMAN 3 +#define SYMB 8 +#define OVERWATCH 9 +#define DIABLO 10 +#define MOUS 12 + +//Leader Key stuff +#ifdef LEADER_TIMEOUT +#undef LEADER_TIMEOUT +#endif +#define LEADER_TIMEOUT 1500 //define modifiers #define MODS_SHIFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) #define MODS_CTRL_MASK (MOD_BIT(KC_LCTL)|MOD_BIT(KC_RCTRL)) #define MODS_ALT_MASK (MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) - -//define macro keycodes -#define M_VERSION M(0) -#define M_MAKE M(1) //define layer change stuff for underglow indicator bool skip_leds = false; @@ -54,6 +55,7 @@ bool skip_leds = false; #define rgblight_set_teal rgblight_sethsv (0xC3, 0xFF, 0xFF); #define rgblight_set_magenta rgblight_sethsv (0x12C, 0xFF, 0xFF); #define rgblight_set_urine rgblight_sethsv (0x3C, 0xFF, 0xFF); +#define rgblight_set_purple rgblight_sethsv (0x10E, 0xFF, 0xFF); //This is both for underglow, and Diablo 3 macros static uint8_t current_layer = 0; @@ -70,28 +72,30 @@ bool check_dtimer(uint8_t dtimer) { enum custom_keycodes { - PLACEHOLDER = SAFE_RANGE, // can always be here - EPRM, - VRSN, - RGB_SLD, - RGB_0000FF, - RGB_008000, - RGB_FF0000, - RGB_800080, - RGB_00FF90, + PLACEHOLDER = SAFE_RANGE, // can always be here + EPRM, + VRSN, + RGB_SLD, + RGB_0000FF, + RGB_008000, + RGB_FF0000, + RGB_800080, + RGB_00FF90, KC_DIABLO_CLEAR, KC_QWERTY, KC_COLEMAK, - KC_DVORAK + KC_DVORAK, + KC_WORKMAN, + KC_MAKEQMK }; #ifdef TAP_DANCE_ENABLE enum { - TD_FLSH = 0, - TD_DIABLO_1, - TD_DIABLO_2, - TD_DIABLO_3, - TD_DIABLO_4 + TD_FLSH = 0, + TD_DIABLO_1, + TD_DIABLO_2, + TD_DIABLO_3, + TD_DIABLO_4 }; @@ -101,43 +105,43 @@ enum { // on the forth tap, turn them off from right to left void dance_flsh_each(qk_tap_dance_state_t *state, void *user_data) { - if (!skip_leds) { - ergodox_board_led_off(); - ergodox_right_led_1_off(); - ergodox_right_led_2_off(); - ergodox_right_led_3_off(); - skip_leds = true; - } - switch (state->count) { - case 1: - ergodox_right_led_1_on(); + if (!skip_leds) { + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + skip_leds = true; + } + switch (state->count) { + case 1: + ergodox_right_led_1_on(); break; case 2: - ergodox_right_led_2_on(); - break; - case 3: - ergodox_right_led_3_on(); - break; - case 4: - ergodox_right_led_1_off(); - _delay_ms(50); - ergodox_right_led_2_off(); - _delay_ms(50); - ergodox_right_led_3_off(); - - } + ergodox_right_led_2_on(); + break; + case 3: + ergodox_right_led_3_on(); + break; + case 4: + ergodox_right_led_1_off(); + _delay_ms(50); + ergodox_right_led_2_off(); + _delay_ms(50); + ergodox_right_led_3_off(); + + } } // on the fourth tap, set the keyboard on flash state // and set the underglow to red, because red == bad void dance_flsh_finished(qk_tap_dance_state_t *state, void *user_data) { - if (state->count >= 4) { + if (state->count >= 4) { rgblight_enable(); rgblight_mode(1); rgblight_setrgb(0xff,0x00,0x00); - reset_keyboard(); - reset_tap_dance(state); - } + reset_keyboard(); + reset_tap_dance(state); + } } // Cycle through the times for the macro, starting at 0, for disabled. @@ -172,20 +176,20 @@ void diablo_tapdance4 (qk_tap_dance_state_t *state, void *user_data) { // if the flash state didnt happen, then turn off leds, left to right void dance_flsh_reset(qk_tap_dance_state_t *state, void *user_data) { - _delay_ms(200); - ergodox_right_led_3_off(); - _delay_ms(200); - ergodox_right_led_2_off(); - _delay_ms(200); - ergodox_right_led_1_off(); - _delay_ms(500); - skip_leds = false; + _delay_ms(200); + ergodox_right_led_3_off(); + _delay_ms(200); + ergodox_right_led_2_off(); + _delay_ms(200); + ergodox_right_led_1_off(); + _delay_ms(500); + skip_leds = false; } //Tap Dance Definitions qk_tap_dance_action_t tap_dance_actions[] = { - //Once for Blue, Twice for Green, Thrice for Red, and four to flash - [TD_FLSH] = ACTION_TAP_DANCE_FN_ADVANCED (dance_flsh_each, dance_flsh_finished, dance_flsh_reset), + //Once for Blue, Twice for Green, Thrice for Red, and four to flash + [TD_FLSH] = ACTION_TAP_DANCE_FN_ADVANCED (dance_flsh_each, dance_flsh_finished, dance_flsh_reset), // tap once to disable, and more to enable timed micros [TD_DIABLO_1] = ACTION_TAP_DANCE_FN(diablo_tapdance1), [TD_DIABLO_2] = ACTION_TAP_DANCE_FN(diablo_tapdance2), @@ -219,26 +223,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `---------------------' `---------------------' */ [QWERTY] = KEYMAP( - KC_EQUAL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(MOUS), - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(DIABLO), - KC_BSPACE, KC_A, KC_S, KC_D, KC_F, KC_G, - KC_LSHIFT, CTL_T(KC_Z),KC_X, KC_C, KC_V, KC_B, TG(OVERWATCH), - LT(SYMB,KC_GRAVE),KC_QUOTE, KC_LGUI, KC_LBRACKET,KC_RBRACKET, + KC_EQUAL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(MOUS), + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(DIABLO), + KC_BSPACE, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSHIFT, LCTL_T(KC_Z),KC_X, KC_C, KC_V, KC_B, TG(OVERWATCH), + LT(SYMB,KC_GRAVE),KC_QUOTE, KC_LGUI, KC_LBRACKET,KC_RBRACKET, - ALT_T(KC_APPLICATION), KC_LGUI, + ALT_T(KC_APPLICATION), KC_LEAD, KC_HOME, - KC_SPACE, KC_BSPACE, KC_END, - - TG(SYMB), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, - TG(DVORAK), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH, + KC_SPACE, KC_BSPACE, KC_END, + + TG(MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, + TG(DIABLO), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, GUI_T(KC_QUOTE), - TG(COLEMAK), KC_N, KC_M, KC_COMMA, KC_DOT, CTL_T(KC_SLASH),KC_RSHIFT, + TG(OVERWATCH), KC_N, KC_M, KC_COMMA, KC_DOT, RCTL_T(KC_SLASH),KC_RSHIFT, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_FN1, - KC_LALT, CTL_T(KC_ESCAPE), - KC_PGUP, - KC_PGDOWN, KC_DELETE, KC_ENTER - ), -/* Keymap 1: Basic layer + KC_LALT, CTL_T(KC_ESCAPE), + KC_PGUP, + KC_PGDOWN, KC_DELETE, KC_ENTER + ), +/* Keymap 0: Basic layer * * ,--------------------------------------------------. ,--------------------------------------------------. * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - | @@ -264,24 +268,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [COLEMAK] = KEYMAP( // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(MOUS), - KC_DELT, KC_Q, KC_W, KC_F, KC_P, KC_G, TG(DIABLO), + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, TG(DIABLO), KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, - KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, TG(OVERWATCH), + KC_LSFT, LCTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, TG(OVERWATCH), LT(SYMB,KC_GRV),KC_QUOT, KC_LGUI, KC_LBRACKET,KC_RBRACKET, - ALT_T(KC_APP), KC_LGUI, + ALT_T(KC_APP), KC_LEAD, KC_HOME, KC_SPC,KC_BSPC,KC_END, // right hand - KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - TG(DVORAK), KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, - KC_H, KC_N, KC_E, KC_I, LT(MOUS, KC_O), KC_QUOTE, - TG(COLEMAK), KC_K, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLASH),KC_RSHIFT, - KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_FN1, + TG(MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + TG(DIABLO), KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, + KC_H, KC_N, KC_E, KC_I, KC_O, GUI_T(KC_QUOTE), + TG(OVERWATCH),KC_K, KC_M, KC_COMM,KC_DOT, RCTL_T(KC_SLASH), KC_RSHIFT, + KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_FN1, KC_LALT, CTL_T(KC_ESC), KC_PGUP, - KC_PGDN,KC_TAB, KC_ENT + KC_PGDN,KC_DELETE, KC_ENT ), -/* Keymap 2: Basic layer +/* Keymap 0: Basic layer * * ,--------------------------------------------------. ,--------------------------------------------------. * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | \ | @@ -307,22 +311,65 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [DVORAK] = KEYMAP( // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(MOUS), - KC_DELT, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, TG(DIABLO), + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, TG(DIABLO), 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, TG(OVERWATCH), + KC_LSFT, LCTL_T(KC_SCLN), KC_Q, KC_J, KC_K, KC_X, TG(OVERWATCH), LT(SYMB,KC_GRV),KC_QUOT, KC_LGUI, KC_LBRACKET, KC_RBRACKET, - ALT_T(KC_APP), KC_LGUI, + ALT_T(KC_APP), KC_LEAD, KC_HOME, KC_SPC,KC_BSPC,KC_END, // right hand - KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, - TG(DVORAK), KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, - KC_D, KC_H, KC_T, KC_N, LT(MOUS, KC_S), KC_MINS, - TG(COLEMAK), KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z), KC_RSHIFT, - KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_FN1, + TG(MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, + TG(DIABLO), KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, + KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, + TG(OVERWATCH),KC_B, KC_M, KC_W, KC_V, RCTL_T(KC_Z), KC_RSHIFT, + KC_LEFT,KC_DOWN,KC_UP, KC_RIGHT, KC_FN1, KC_LALT, CTL_T(KC_ESC), KC_PGUP, - KC_PGDN,KC_TAB, KC_ENT + KC_PGDN,KC_DELETE, KC_ENT + ), +/* Keymap 0: Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Del | Q | W | F | P | G | L1 | | L1 | J | L | U | Y | ; | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | BkSp | A | R | S | T | D |------| |------| H | N | E | I |O / L2| ' | + * |--------+------+------+------+------+------| OVER | | Meh |------+------+------+------+------+--------| + * | LShift |Z/Ctrl| X | C | V | B | | | | K | 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 | | | + * `--------------------' `----------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[WORKMAN] = KEYMAP( + // left hand + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(MOUS), + KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, TG(DIABLO), + KC_BSPC, KC_A, KC_S, KC_H, KC_T, KC_G, + KC_LSFT, LCTL_T(KC_Z), KC_X, KC_M, KC_C, KC_V, TG(OVERWATCH), + LT(SYMB,KC_GRV),KC_QUOT, KC_LGUI, KC_LBRACKET,KC_RBRACKET, + ALT_T(KC_APP), KC_LEAD, + KC_HOME, + KC_SPC,KC_BSPC,KC_END, + // right hand + TG(MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + TG(DIABLO), KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSLS, + KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOTE, + TG(OVERWATCH),KC_K, KC_L, KC_COMM,KC_DOT, RCTL_T(KC_SLASH), KC_RSHIFT, + KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_FN1, + KC_LALT, CTL_T(KC_ESC), + KC_PGUP, + KC_PGDN,KC_DELETE, KC_ENT ), /* Keymap 3: Symbol Layer @@ -347,24 +394,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ [SYMB] = KEYMAP( - KC_ESCAPE,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, - M_VERSION, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_TRNS, - M_MAKE, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRAVE, - TD(TD_FLSH), KC_PERC, KC_CIRC, KC_LBRACKET,KC_RBRACKET,KC_TILD, KC_TRNS, - KC_NO, KC_AMPR, KC_ASTR, KC_COLN, KC_SCOLON, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, - - KC_QWERTY, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - KC_DVORAK, KC_KP_PLUS, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_ASTERISK, KC_F12, - KC_KP_MINUS, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_SLASH,KC_PSCREEN, - KC_COLEMAK, KC_NUMLOCK, KC_KP_1, KC_KP_2, KC_KP_3, KC_EQUAL, KC_PAUSE, - KC_KP_0, KC_KP_0, KC_KP_DOT, KC_KP_ENTER, KC_TRNS, - RGB_TOG, RGB_SLD, - KC_NO, - KC_KP_DOT, KC_KP_0, KC_KP_ENTER - ), + KC_ESCAPE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_WORKMAN, + VRSN, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_DVORAK, + KC_MAKEQMK, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRAVE, + TD(TD_FLSH), KC_PERC, KC_CIRC, KC_LBRACKET,KC_RBRACKET,KC_TILD, KC_COLEMAK, + KC_NO, KC_AMPR, KC_ASTR, KC_COLN, KC_SCOLON, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + + KC_QWERTY, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_DVORAK, KC_KP_PLUS, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_ASTERISK, KC_F12, + KC_KP_MINUS,KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_SLASH, KC_PSCREEN, + KC_COLEMAK, KC_NUMLOCK, KC_KP_1, KC_KP_2, KC_KP_3, KC_EQUAL, KC_PAUSE, + KC_KP_0, KC_KP_0, KC_KP_DOT, KC_KP_ENTER, KC_TRNS, + RGB_TOG, RGB_SLD, + KC_NO, + KC_KP_DOT, KC_KP_0, KC_KP_ENTER + ), /* Keymap 4: Customized Overwatch Layout * @@ -388,24 +435,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ [OVERWATCH] = KEYMAP( - KC_ESCAPE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_F1, KC_K, KC_Q, KC_W, KC_E, KC_R, KC_T, - KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F, - KC_LCTL, KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_TRNS, - KC_G, KC_U, KC_I, KC_Y, KC_T, + KC_ESCAPE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_F1, KC_K, KC_Q, KC_W, KC_E, KC_R, KC_T, + KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F, + KC_LCTL, KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_TRNS, + KC_G, KC_U, KC_I, KC_Y, KC_T, KC_O, KC_P, KC_LGUI, KC_V, KC_SPACE, KC_H, - - KC_NO, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_NO, KC_N, KC_M, KC_NO, KC_NO, KC_NO, KC_NO, + + KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + TG(OVERWATCH), KC_N, KC_M, KC_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_PGDOWN, KC_DELETE, KC_ENTER - ), + ), /* Keymap 3: * @@ -429,25 +476,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ [DIABLO] = KEYMAP( - KC_ESCAPE, KC_V, KC_D, KC_LALT, KC_NO, KC_NO, KC_NO, - KC_TAB, KC_S, KC_F, KC_I, KC_M, KC_T, KC_TRNS, - KC_Q, KC_1, KC_2, KC_3, KC_4, KC_G, - KC_LCTL, TD(TD_DIABLO_1), TD(TD_DIABLO_2), TD(TD_DIABLO_3), TD(TD_DIABLO_4), KC_Z, KC_NO, - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_ESCAPE, KC_V, KC_D, KC_LALT, KC_NO, KC_NO, KC_NO, + KC_TAB, KC_S, KC_F, KC_I, KC_M, KC_T, KC_TRNS, + KC_Q, KC_1, KC_2, KC_3, KC_4, KC_G, + KC_LCTL, TD(TD_DIABLO_1), TD(TD_DIABLO_2), TD(TD_DIABLO_3), TD(TD_DIABLO_4), KC_Z, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_L, KC_J, KC_F, SFT_T(KC_SPACE), ALT_T(KC_Q), KC_DIABLO_CLEAR, - - - KC_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 - ), + + + + KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_N, KC_M, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, + KC_NO, + KC_PGDOWN, KC_DELETE, KC_ENTER + ), /* Keymap 4: Media and mouse keys * @@ -458,37 +506,37 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | |MsLeft|MsDown|MsRght| | |------| |------| | | Acc0 | Acc1 | Acc2 | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | Acc0 | Acc1 | Acc2 | | | | | | Play | Stop | Mute |VolDn |VolUp | | + * | | Acc0 | Acc1 | Acc2 | | | | | | | Mute |VolDn |VolUp | | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | | | | | | + * | | | | | | | Play | Stop | | | | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | | | | | | * ,------|------|------| |------+------+------. * | | | MWUp | | | | | - * | Lclk | Rclk |------| |------| MBn4 | MBn4 | + * | Lclk | Rclk |------| |------| MBn4 | MBn5 | * | | | MWDn | | Mclk | | | * `--------------------' `--------------------' */ [MOUS] = KEYMAP( - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, - KC_NO, KC_NO, KC_MS_UP, KC_NO, KC_NO, KC_NO, KC_TRNS, - KC_NO, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT,KC_NO, KC_NO, - KC_NO, KC_MS_ACCEL0,KC_MS_ACCEL1,KC_MS_ACCEL2,KC_NO, KC_NO, KC_TRNS, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, + KC_NO, KC_NO, KC_MS_U, KC_NO, KC_NO, KC_NO, KC_TRNS, + KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, KC_NO, + KC_NO, KC_ACL0, KC_ACL1, KC_ACL2, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_NO,KC_NO, - KC_MS_WH_UP, - KC_MS_BTN1,KC_MS_BTN2,KC_MS_WH_DOWN, - - KC_TRNS,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, - KC_TRNS,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, - KC_NO,KC_NO,KC_MS_ACCEL0,KC_MS_ACCEL1,KC_MS_ACCEL2,KC_NO,KC_NO, - KC_TRNS,KC_MEDIA_PLAY_PAUSE,KC_MEDIA_STOP,KC_AUDIO_MUTE,KC_AUDIO_VOL_DOWN,KC_AUDIO_VOL_UP,KC_NO, - KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, - KC_NO,KC_NO, - KC_NO, - KC_MS_BTN3,KC_MS_BTN4,KC_MS_BTN5 - ), + KC_NO, KC_NO, + KC_WH_U, + KC_BTN1, KC_BTN2, KC_WH_D, + + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_ACL0, KC_ACL1, KC_ACL2, KC_NO, KC_NO, + KC_TRNS, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO,KC_NO, + KC_NO, + KC_MS_BTN3,KC_MS_BTN4,KC_MS_BTN5 + ), }; @@ -502,23 +550,6 @@ void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) } -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - switch(id) { - case 0: - if (record->event.pressed) { - // Output Keyboard Firmware info - SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); - return false; - } - case 1: - if (record->event.pressed) { - // make ergodox-ez-drashna-custom-teensy - return MACRO(I(5), T(M), T(A), T(K), T(E), T(SPACE), T(E), T(R), T(G), T(O), T(D), T(O), T(X), D(LSFT), T(MINUS), U(LSFT), T(E), T(Z), T(MINUS), T(D), T(R), T(A), T(S), T(H), T(N), T(A), T(MINUS), T(C), T(U), T(S), T(T), T(O), T(M), T(MINUS), T(T), T(E), T(E), T(N), T(S), T(Y), T(ENTER), END); - } - } - return MACRO_NONE; -}; void persistent_default_layer_set(uint16_t default_layer) { eeconfig_update_default_layer(default_layer); @@ -527,81 +558,81 @@ void persistent_default_layer_set(uint16_t default_layer) { bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - // dynamically generate these. - case EPRM: - if (record->event.pressed) { + switch (keycode) { + // dynamically generate these. + case EPRM: + if (record->event.pressed) { eeconfig_init(); - } - return false; - break; - case VRSN: - if (record->event.pressed) { - SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); - } - return false; - break; - case RGB_SLD: - if (record->event.pressed) { - rgblight_mode(1); - } - return false; - break; - - case RGB_0000FF: - if (record->event.pressed) { - #ifdef RGBLIGHT_ENABLE - rgblight_enable(); - rgblight_mode(1); - rgblight_setrgb(0x00,0x00,0xff); - #endif - } - return false; - break; - - case RGB_008000: - if (record->event.pressed) { - #ifdef RGBLIGHT_ENABLE - rgblight_enable(); - rgblight_mode(1); - rgblight_setrgb(0x00,0x80,0x00); - #endif - } - return false; - break; - - case RGB_FF0000: - if (record->event.pressed) { - #ifdef RGBLIGHT_ENABLE - rgblight_enable(); - rgblight_mode(1); - rgblight_setrgb(0xff,0x00,0x00); - #endif - } - return false; - break; - - case RGB_800080: - if (record->event.pressed) { - #ifdef RGBLIGHT_ENABLE - rgblight_enable(); - rgblight_mode(1); - rgblight_setrgb(0x80,0x00,0x80); - #endif - } - return false; - break; - - case RGB_00FF90: - if (record->event.pressed) { - #ifdef RGBLIGHT_ENABLE - rgblight_enable(); - rgblight_mode(1); - rgblight_setrgb(0x00,0xff,0x90); - #endif - } - return false; - break; + } + return false; + break; + case VRSN: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + break; + case RGB_SLD: + if (record->event.pressed) { + rgblight_mode(1); + } + return false; + break; + + case RGB_0000FF: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + rgblight_enable(); + rgblight_mode(1); + rgblight_setrgb(0x00,0x00,0xff); + #endif + } + return false; + break; + + case RGB_008000: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + rgblight_enable(); + rgblight_mode(1); + rgblight_setrgb(0x00,0x80,0x00); + #endif + } + return false; + break; + + case RGB_FF0000: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + rgblight_enable(); + rgblight_mode(1); + rgblight_setrgb(0xff,0x00,0x00); + #endif + } + return false; + break; + + case RGB_800080: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + rgblight_enable(); + rgblight_mode(1); + rgblight_setrgb(0x80,0x00,0x80); + #endif + } + return false; + break; + + case RGB_00FF90: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + rgblight_enable(); + rgblight_mode(1); + rgblight_setrgb(0x00,0xff,0x90); + #endif + } + return false; + break; case KC_DIABLO_CLEAR: // reset all Diable timers, disabling them if (record->event.pressed) { uint8_t dtime; @@ -630,9 +661,21 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; + case KC_WORKMAN: + if (record->event.pressed) { + persistent_default_layer_set(1UL << WORKMAN); + } + return false; + break; + case KC_MAKEQMK: + if (record->event.pressed) { + SEND_STRING("make ergodox_ez:drashna-custom:teensy"SS_TAP(X_ENTER)); + } + return false; + break; - } - return true; + } + return true; } @@ -674,33 +717,30 @@ void matrix_init_user(void) { // Runs boot tasks for keyboard }; - +LEADER_EXTERNS(); void matrix_scan_user(void) { // runs frequently to update info uint8_t modifiders = get_mods(); uint8_t layer = biton32(layer_state); - bool l_dvorak = false; - bool l_colemak = false; - static bool has_layer_changed = true; - + static bool has_layer_changed = true; - if (!skip_leds) { - ergodox_board_led_off(); - ergodox_right_led_1_off(); - ergodox_right_led_2_off(); - ergodox_right_led_3_off(); + if (!skip_leds) { + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); - // Since we're not using the LEDs here for layer indication anymore, - // then lets use them for modifier indicators. Shame we don't have 4... - // Also, no "else", since we want to know each, independantly. + // Since we're not using the LEDs here for layer indication anymore, + // then lets use them for modifier indicators. Shame we don't have 4... + // Also, no "else", since we want to know each, independantly. if ( modifiders & MODS_SHIFT_MASK) { - ergodox_right_led_1_on(); + ergodox_right_led_2_on(); } if ( modifiders & MODS_CTRL_MASK) { - ergodox_right_led_2_on(); + ergodox_right_led_1_on(); } if ( modifiders & MODS_ALT_MASK) { - ergodox_right_led_3_on(); + ergodox_right_led_3_on(); } } @@ -713,12 +753,6 @@ void matrix_scan_user(void) { // runs frequently to update info uint8_t default_layer = 0; default_layer = eeconfig_read_default_layer(); - if (default_layer & (1UL << DVORAK)) { - l_dvorak = true; - } - else if (default_layer & (1UL << COLEMAK)) { - l_colemak = true; - } switch (layer) { case SYMB: rgblight_set_blue; @@ -734,22 +768,21 @@ void matrix_scan_user(void) { // runs frequently to update info break; case MOUS: rgblight_set_urine; - break; - case COLEMAK: - rgblight_set_magenta; - break; - case DVORAK: - rgblight_set_green; + rgblight_mode(1); break; case 7: rgblight_sethsv (255,255,255); + rgblight_mode(1); break; default: - if (l_colemak) { + if (default_layer & (1UL << COLEMAK)) { + rgblight_set_green; + } + else if (default_layer & (1UL << DVORAK)) { rgblight_set_magenta; } - else if (l_dvorak) { - rgblight_set_green; + else if (default_layer & (1UL << WORKMAN)) { + rgblight_set_purple; } else { rgblight_set_teal; @@ -760,7 +793,28 @@ void matrix_scan_user(void) { // runs frequently to update info has_layer_changed = false; } - // Run Diablo 3 macro checking code. + // Run Diablo 3 macro checking code. run_diablo_macro_check(); +#ifdef LEADER_KEYS + LEADER_DICTIONARY() { + leading = false; + leader_end(); + SEQ_ONE_KEY(KC_C) { + SEND_STRING("Covecube"); + } + SEQ_TWO_KEYS(KC_S, KC_D) { + SEND_STRING("StableBit DrivePool"); + } + SEQ_TWO_KEYS(KC_C, KC_D) { + SEND_STRING("StableBit CloudDrive"); + } + SEQ_TWO_KEYS(KC_S, KC_C) { + SEND_STRING("StableBit Scanner"); + } + SEQ_TWO_KEYS(KC_S, KC_T) { + SEND_STRING("StableBit Troubleshooter"); + } + } +#endif }; diff --git a/keyboards/ergodox_ez/keymaps/drashna-custom/rules.mk b/keyboards/ergodox_ez/keymaps/drashna-custom/rules.mk index 6c78b556b7..5ab769c688 100644 --- a/keyboards/ergodox_ez/keymaps/drashna-custom/rules.mk +++ b/keyboards/ergodox_ez/keymaps/drashna-custom/rules.mk @@ -3,8 +3,8 @@ SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend COMMAND_ENABLE = no # Commands for debug and configuration RGBLIGHT_ENABLE = yes MIDI_ENABLE = no -CONSOLE_ENABLE = yes - +CONSOLE_ENABLE = no +LEADER_KEYS = no ifndef QUANTUM_DIR include ../../../../Makefile endif diff --git a/keyboards/handwired/woodpad/keymaps/drashna/config.h b/keyboards/handwired/woodpad/keymaps/drashna/config.h index e25a10d0b4..2b151606da 100644 --- a/keyboards/handwired/woodpad/keymaps/drashna/config.h +++ b/keyboards/handwired/woodpad/keymaps/drashna/config.h @@ -23,6 +23,7 @@ #define TAPPING_TERM 200 #endif // TAP_DANCE_ENABLE +#define CATERINA_BOOTLOADER #ifdef RGBLIGHT_ENABLE diff --git a/keyboards/handwired/woodpad/keymaps/drashna/keymap.c b/keyboards/handwired/woodpad/keymaps/drashna/keymap.c index f30f3623d8..f6476ef66a 100644 --- a/keyboards/handwired/woodpad/keymaps/drashna/keymap.c +++ b/keyboards/handwired/woodpad/keymaps/drashna/keymap.c @@ -162,7 +162,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_SALT, KC_MORESALT, KC_SALTHARD, KC_GLHF \ ), [_MEDIA] = KEYMAP( /* Base */ - _______, KC_MUTE, KC_VOLD, KC_VOLU,\ + RESET, KC_MUTE, KC_VOLD, KC_VOLU,\ _______, _______, RGB_HUI, RGB_HUD, \ KC_MPLY, KC_MSTP, KC_MPRV, KC_MNXT, \ RGB_TOG, RGB_MOD, RGB_SAI, RGB_VAI, \ diff --git a/keyboards/orthodox/keymaps/drashna/config.h b/keyboards/orthodox/keymaps/drashna/config.h index bcd14a22d1..497f7c80d9 100644 --- a/keyboards/orthodox/keymaps/drashna/config.h +++ b/keyboards/orthodox/keymaps/drashna/config.h @@ -52,11 +52,5 @@ along with this program. If not, see . #define RGBLIGHT_EFFECT_BREATHE_CENTER 1 #endif // RGBLIGHT_ENABLE -#define FORCE_NKRO -#ifdef FORCE_NKRO -#define NKRO_EPSIZE 32 -#endif - -#define PERMISSIVE_HOLD #endif \ No newline at end of file diff --git a/keyboards/orthodox/keymaps/drashna/keymap.c b/keyboards/orthodox/keymaps/drashna/keymap.c index f761265279..a15fa6f753 100644 --- a/keyboards/orthodox/keymaps/drashna/keymap.c +++ b/keyboards/orthodox/keymaps/drashna/keymap.c @@ -32,14 +32,16 @@ extern keymap_config_t keymap_config; #define _QWERTY 0 #define _COLEMAK 1 #define _DVORAK 2 -#define _LOWER 3 -#define _RAISE 4 +#define _WORKMAN 3 +#define _LOWER 8 +#define _RAISE 9 #define _ADJUST 16 enum custom_keycodes { QWERTY = SAFE_RANGE, COLEMAK, DVORAK, + WORKMAN, LOWER, RAISE, ADJUST, @@ -58,6 +60,7 @@ enum custom_keycodes { #define rgblight_set_teal rgblight_sethsv (0xC3, 0xFF, 0xFF); #define rgblight_set_magenta rgblight_sethsv (0x12C, 0xFF, 0xFF); #define rgblight_set_urine rgblight_sethsv (0x3C, 0xFF, 0xFF); +#define rgblight_set_purple rgblight_sethsv (0x10E, 0xFF, 0xFF); //This is both for underglow, and Diablo 3 macros bool has_layer_changed = true; @@ -99,25 +102,30 @@ qk_tap_dance_action_t tap_dance_actions[] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = KEYMAP( \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ - KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_UP, XXXXXXX, KC_DOWN, KC_LEFT, XXXXXXX, KC_RIGHT, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + 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_UP, XXXXXXX, KC_DOWN, KC_LEFT, XXXXXXX, KC_RIGHT, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, LOWER, KC_SPACE, KC_BSPC, KC_DEL, KC_ENT, RAISE, KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLASH), KC_LGUI \ ), [_COLEMAK] = KEYMAP(\ - KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ - KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_UP, XXXXXXX, KC_DOWN, KC_LEFT, XXXXXXX, KC_RIGHT, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ + KC_TAB, KC_A, KC_R, KC_S, KC_T, KC_D, KC_UP, XXXXXXX, KC_DOWN, KC_LEFT, XXXXXXX, KC_RIGHT, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, LOWER, KC_SPACE, KC_BSPC, KC_DEL, KC_ENT, RAISE, KC_K, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLASH), KC_LGUI \ ), [_DVORAK] = KEYMAP(\ - KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ - KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_UP, XXXXXXX, KC_DOWN, KC_LEFT, XXXXXXX, KC_RIGHT, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \ - KC_LSFT, CTL_T(KC_SCLN), KC_Q, KC_J, KC_K, KC_X, LOWER, KC_SPACE, KC_BSPC, KC_DEL, KC_ENT, RAISE, KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z), KC_LGUI \ + KC_ESC, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ + KC_TAB, KC_A, KC_O, KC_E, KC_U, KC_I, KC_UP, XXXXXXX, KC_DOWN, KC_LEFT, XXXXXXX, KC_RIGHT, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \ + KC_LSFT, CTL_T(KC_SCLN), KC_Q, KC_J, KC_K, KC_X, LOWER, KC_SPACE, KC_BSPC, KC_DEL, KC_ENT, RAISE, KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z), KC_LGUI \ +), +[_WORKMAN] = KEYMAP(\ + KC_ESC, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ + KC_TAB, KC_A, KC_O, KC_E, KC_U, KC_I, KC_UP, XXXXXXX, KC_DOWN, KC_LEFT, XXXXXXX, KC_RIGHT, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \ + KC_LSFT, CTL_T(KC_SCLN), KC_Q, KC_J, KC_K, KC_X, LOWER, KC_SPACE, KC_BSPC, KC_DEL, KC_ENT, RAISE, KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z), KC_LGUI \ ), [_LOWER] = KEYMAP( \ - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, XXXXXXX, KC_F12, _______, XXXXXXX, KC_RCTL, KC_F11, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ TD(TD_FLSH),KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, _______, _______, _______, _______, KC_F12, KC_HOME, KC_COMM, KC_DOT, KC_END, _______ \ ), @@ -130,8 +138,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_ADJUST] = KEYMAP( \ _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ - _______, _______, _______, AU_ON, AU_OFF, AG_NORM, _______, XXXXXXX, _______, _______, XXXXXXX, _______, AG_SWAP, QWERTY , COLEMAK, DVORAK, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, _______, XXXXXXX, _______, _______, XXXXXXX, _______, AG_SWAP, QWERTY, COLEMAK, DVORAK, WORKMAN, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, MAGIC_TOGGLE_NKRO, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ ) @@ -169,14 +177,23 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return false; break; case DVORAK: - if (record->event.pressed) { + if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_SONG(tone_dvorak); + PLAY_SONG(tone_dvorak); #endif - persistent_default_layer_set(1UL<<_DVORAK); - } - return false; - break; + persistent_default_layer_set(1UL << _DVORAK); + } + return false; + break; + case WORKMAN: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_dvorak); + #endif + persistent_default_layer_set(1UL << _WORKMAN); + } + return false; + break; case LOWER: if (record->event.pressed) { layer_on(_LOWER); @@ -225,48 +242,45 @@ void matrix_scan_user(void) { // runs frequently to update info uint8_t default_layer = 0; default_layer = eeconfig_read_default_layer(); - if (default_layer & (1UL << _DVORAK)) { - l_dvorak = true; - } - else if (default_layer & (1UL << _COLEMAK)) { - l_colemak = true; - } switch (layer) { - case _QWERTY: - if (l_colemak) { + case _QWERTY: + if (default_layer & (1UL << _COLEMAK)) { + rgblight_set_magenta; + } + else if (default_layer & (1UL << _DVORAK)) { + rgblight_set_green; + } + else if (default_layer & (1UL << _WORKMAN)) { + rgblight_set_purple; + } + else { + rgblight_set_teal; + } + rgblight_mode(1); + break; + case _COLEMAK: rgblight_set_magenta; - } - else if (l_dvorak) { + rgblight_mode(1); + break; + case _DVORAK: rgblight_set_green; - } - else { - rgblight_set_teal; - } - rgblight_mode(1); - break; - case _COLEMAK: - rgblight_set_magenta; - rgblight_mode(1); - break; - case _DVORAK: - rgblight_set_green; - rgblight_mode(1); - break; - case _RAISE: - rgblight_set_blue; - rgblight_mode(2); - break; - case _LOWER: - rgblight_set_orange; - rgblight_mode(3); - break; - case _ADJUST: - rgblight_set_red; - rgblight_mode(17); - break; - case 6: - rgblight_set_urine; - break; + rgblight_mode(1); + break; + case _RAISE: + rgblight_set_blue; + rgblight_mode(2); + break; + case _LOWER: + rgblight_set_orange; + rgblight_mode(3); + break; + case _ADJUST: + rgblight_set_red; + rgblight_mode(17); + break; + case 6: + rgblight_set_urine; + break; } has_layer_changed = false; } diff --git a/keyboards/orthodox/keymaps/drashna/rules.mk b/keyboards/orthodox/keymaps/drashna/rules.mk index 2090afe9a5..4980c0315a 100644 --- a/keyboards/orthodox/keymaps/drashna/rules.mk +++ b/keyboards/orthodox/keymaps/drashna/rules.mk @@ -1,2 +1,9 @@ -CONSOLE_ENABLE = yes -TAP_DANCE_ENABLE = yes \ No newline at end of file +CONSOLE_ENABLE = no +TAP_DANCE_ENABLE = yes +RGBLIGHT_ENABLE = no +MOUSEKEY_ENABLE = no + + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/viterbi/keymaps/drashna/config.h b/keyboards/viterbi/keymaps/drashna/config.h new file mode 100644 index 0000000000..6d409cd2e7 --- /dev/null +++ b/keyboards/viterbi/keymaps/drashna/config.h @@ -0,0 +1,41 @@ +/* +Copyright 2017 Danny Nguyen + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define _MASTER_RIGHT +// #define EE_HANDS + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 12 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +#endif diff --git a/keyboards/viterbi/keymaps/drashna/keymap.c b/keyboards/viterbi/keymaps/drashna/keymap.c new file mode 100644 index 0000000000..e227b472f8 --- /dev/null +++ b/keyboards/viterbi/keymaps/drashna/keymap.c @@ -0,0 +1,413 @@ +#include "viterbi.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 _NUMNAV 0 +#define _DIABLO 1 +#define _MACROS 2 +#define _GAMEPAD 3 +#define _MEDIA 4 + + +enum custom_keycodes { + KC_DIABLO_CLEAR = SAFE_RANGE, + KC_P00, + KC_OVERWATCH, + KC_SALT, + KC_MORESALT, + KC_SALTHARD, + KC_GOODGAME, + KC_SYMM, + KC_DOOMFIST, + KC_JUSTGAME, + KC_GLHF, + KC_TORB +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO +#define MACROS TG(_MACROS) +#define DIABLO TG(_DIABLO) +#define GAMEPAD TG(_GAMEPAD) +#define MEDIA TG(_MEDIA) + + +bool is_overwatch = false; + +//This is both for underglow, and Diablo 3 macros +static uint8_t current_layer = 0; +bool has_layer_changed = true; + + +#define rgblight_set_blue rgblight_sethsv (0xFF, 0xFF, 0xFF); +#define rgblight_set_red rgblight_sethsv(0x00, 0xFF, 0xFF); +#define rgblight_set_green rgblight_sethsv (0x78, 0xFF, 0xFF); +#define rgblight_set_orange rgblight_sethsv (0x1E, 0xFF, 0xFF); +#define rgblight_set_teal rgblight_sethsv (0xC3, 0xFF, 0xFF); +#define rgblight_set_magenta rgblight_sethsv (0x12C, 0xFF, 0xFF); +#define rgblight_set_urine rgblight_sethsv (0x3C, 0xFF, 0xFF); +#define rgblight_set_purple rgblight_sethsv (0x10E, 0xFF, 0xFF); + +#ifdef TAP_DANCE_ENABLE +//define diablo macro timer variables +static uint16_t diablo_timer[4]; +static uint8_t diablo_times[] = { 0, 1, 3, 5, 10, 30 }; +static uint8_t diablo_key_time[4]; + + +bool check_dtimer(uint8_t dtimer) { + // has the correct number of seconds elapsed (as defined by diablo_times) + return (timer_elapsed(diablo_timer[dtimer]) < (diablo_key_time[dtimer] * 1000)) ? false : true; +}; + + +enum { + TD_DIABLO_1 = 0, + TD_DIABLO_2, + TD_DIABLO_3, + TD_DIABLO_4 +}; + + +// Cycle through the times for the macro, starting at 0, for disabled. +// Max of six values, so don't exceed +void diablo_tapdance_master(qk_tap_dance_state_t *state, void *user_data, uint8_t diablo_key) { + if (state->count >= 7) { + diablo_key_time[diablo_key] = diablo_times[0]; + reset_tap_dance(state); + } + else { + diablo_key_time[diablo_key] = diablo_times[state->count - 1]; + } +} + + +// Would rather have one function for all of this, but no idea how to do that... +void diablo_tapdance1(qk_tap_dance_state_t *state, void *user_data) { + diablo_tapdance_master(state, user_data, 0); +} + +void diablo_tapdance2(qk_tap_dance_state_t *state, void *user_data) { + diablo_tapdance_master(state, user_data, 1); +} + +void diablo_tapdance3(qk_tap_dance_state_t *state, void *user_data) { + diablo_tapdance_master(state, user_data, 2); +} + +void diablo_tapdance4(qk_tap_dance_state_t *state, void *user_data) { + diablo_tapdance_master(state, user_data, 3); +} + + + +//Tap Dance Definitions +qk_tap_dance_action_t tap_dance_actions[] = { + // tap once to disable, and more to enable timed micros + [TD_DIABLO_1] = ACTION_TAP_DANCE_FN(diablo_tapdance1), + [TD_DIABLO_2] = ACTION_TAP_DANCE_FN(diablo_tapdance2), + [TD_DIABLO_3] = ACTION_TAP_DANCE_FN(diablo_tapdance3), + [TD_DIABLO_4] = ACTION_TAP_DANCE_FN(diablo_tapdance4), + +}; +#endif + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* QWERTY + * ,------------------------------------------------. ,------------------------------------------------. + * | Ins | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp | Del | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | - | Tab | Q | W | E | R | T | | Y | U | I | O | P | [ | ] | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | = | Esc | A | S | D | F | G | | H | J | K | L | ; | " |Enter | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Pg Up| Shift| Z | X | C | V | B | | N | M | , | . | / | Home | End | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Pg Dn|Adjust| Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up | Right| \ | + * `------------------------------------------------' `------------------------------------------------' + */ + [_NUMNAV] = KEYMAP( + MACROS, DIABLO, GAMEPAD, KC_NLCK, KC_SCLK, KC_PTSC, KC_PSLS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + MEDIA, XXXXXXX, XXXXXXX, KC_P7, KC_P8, KC_P9, KC_PAST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + KC_HOME, KC_DEL, KC_PGUP, KC_P4, KC_P5, KC_P6, KC_PMNS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + KC_END, KC_UP, KC_PGDN, KC_P1, KC_P2, KC_P3, KC_PPLS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_P00, KC_PDOT, KC_PENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ + ), + +/* Lower + * ,------------------------------------------------. ,------------------------------------------------. + * | | ~ | F1 | F3 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | _ | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | { | } | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | + | | F1 | F2 | F3 | F4 | F5 | | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | | F7 | F8 | F9 | F10 | F11 | | F12 | | | | | | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | | | | | | | | | | Next | Vol- | Vol+ | Play | | + * `------------------------------------------------' `------------------------------------------------' + */ + [_DIABLO] = KEYMAP( + _______, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + _______, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + _______, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + _______, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + _______, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ + ), + + + [_MACROS] = KEYMAP( + _______, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + _______, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + _______, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + _______, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + _______, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ + ), + + [_MEDIA] = KEYMAP( + _______, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + _______, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + _______, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + _______, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + _______, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ + ) + +}; + + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + uint16_t kc; + if (is_overwatch) { + kc = KC_BSPC; + } + else { + kc = KC_ENTER; + } + switch (keycode) { +#ifdef TAP_DANCE_ENABLE + case KC_DIABLO_CLEAR: // reset all Diable timers, disabling them + if (record->event.pressed) { + uint8_t dtime; + + for (dtime = 0; dtime < 4; dtime++) { + diablo_key_time[dtime] = diablo_times[0]; + } + } + return false; + break; +#endif + case KC_P00: + if (!record->event.pressed) { + register_code(KC_P0); + unregister_code(KC_P0); + register_code(KC_P0); + unregister_code(KC_P0); + } + return false; + break; + case KC_OVERWATCH: // reset all Diable timers, disabling them + if (record->event.pressed) { + is_overwatch = !is_overwatch; + has_layer_changed = true; + } + return false; + break; + case KC_SALT: + if (!record->event.pressed) { + register_code(kc); + unregister_code(kc); + _delay_ms(50); + SEND_STRING("Salt, salt, salt..."); + register_code(KC_ENTER); + unregister_code(KC_ENTER); + } + return false; + break; + case KC_MORESALT: + if (!record->event.pressed) { + register_code(kc); + unregister_code(kc); + _delay_ms(50); + SEND_STRING("Please sir, can I have some more salt?!"); + register_code(KC_ENTER); + unregister_code(KC_ENTER); + } + return false; + break; + case KC_SALTHARD: + if (!record->event.pressed) { + register_code(kc); + unregister_code(kc); + _delay_ms(50); + SEND_STRING("Your salt only makes my penis that much harder, and even more aggressive!"); + register_code(KC_ENTER); + unregister_code(KC_ENTER); + } + return false; + break; + case KC_GOODGAME: + if (!record->event.pressed) { + register_code(kc); + unregister_code(kc); + _delay_ms(50); + SEND_STRING("Good game, everyone!"); + register_code(KC_ENTER); + unregister_code(KC_ENTER); + } + return false; + break; + case KC_GLHF: + if (!record->event.pressed) { + register_code(kc); + unregister_code(kc); + _delay_ms(50); + SEND_STRING("Good luck, have fun!!!"); + register_code(KC_ENTER); + unregister_code(KC_ENTER); + } + return false; + break; + case KC_SYMM: + if (!record->event.pressed) { + register_code(kc); + unregister_code(kc); + _delay_ms(50); + SEND_STRING("Left click to win!"); + register_code(KC_ENTER); + unregister_code(KC_ENTER); + } + return false; + break; + case KC_DOOMFIST: + if (!record->event.pressed) { + register_code(kc); + unregister_code(kc); + _delay_ms(50); + SEND_STRING("Hey, look at me. I'm Doomfist, and I'm overpowered! All I do is spam punches all day! I'm DPS, tank and defense, rolled into one! All I need is team healing to be complete!"); + register_code(KC_ENTER); + unregister_code(KC_ENTER); + } + return false; + break; + case KC_JUSTGAME: + + if (!record->event.pressed) { + register_code(kc); + unregister_code(kc); + _delay_ms(50); + SEND_STRING("It may be a game, but if you don't want to actually try, please go play AI, so that people that actually want to take the game seriously and \"get good\" have a place to do so without trolls like you throwing games."); + register_code(KC_ENTER); + unregister_code(KC_ENTER); + } + return false; + break; + case KC_TORB: + + if (!record->event.pressed) { + register_code(kc); + unregister_code(kc); + _delay_ms(50); + SEND_STRING("That was positively riveting!"); + register_code(KC_ENTER); + unregister_code(KC_ENTER); + } + return false; + break; + + } + return true; +} + +#ifdef TAP_DANCE_ENABLE + +// Sends the key press to system, but only if on the Diablo layer +void send_diablo_keystroke(uint8_t diablo_key) { + if (current_layer == _DIABLO) { + switch (diablo_key) { + case 0: + SEND_STRING("1"); + break; + case 1: + SEND_STRING("2"); + break; + case 2: + SEND_STRING("3"); + break; + case 3: + SEND_STRING("4"); + break; + } + } +} + +// Checks each of the 4 timers/keys to see if enough time has elapsed +// Runs the "send string" command if enough time has passed, and resets the timer. +void run_diablo_macro_check(void) { + uint8_t dtime; + + for (dtime = 0; dtime < 4; dtime++) { + if (check_dtimer(dtime) && diablo_key_time[dtime]) { + diablo_timer[dtime] = timer_read(); + send_diablo_keystroke(dtime); + } + } + +} +#endif + + +void matrix_scan_user(void) { // runs frequently to update info + uint8_t layer = biton32(layer_state); + + if (layer != current_layer) { + has_layer_changed = true; + current_layer = layer; + } + // Check layer, and apply color if its changed since last check + if (has_layer_changed) { + + switch (layer) { + case _NUMNAV: + rgblight_set_teal; + rgblight_mode(2); + break; + case _MACROS: + rgblight_set_orange; + if (is_overwatch) { + rgblight_mode(17); + } + else { + rgblight_mode(18); + } + break; + case _DIABLO: + rgblight_set_red; + rgblight_mode(5); + break; + case _GAMEPAD: + rgblight_set_urine; + rgblight_mode(1); + break; + case _MEDIA: + rgblight_set_blue; + rgblight_mode(1); + break; + } + has_layer_changed = false; + } + +#ifdef TAP_DANCE_ENABLE + // Run Diablo 3 macro checking code. + run_diablo_macro_check(); +#endif +}; \ No newline at end of file diff --git a/keyboards/viterbi/keymaps/drashna/rules.mk b/keyboards/viterbi/keymaps/drashna/rules.mk new file mode 100644 index 0000000000..f1bb928371 --- /dev/null +++ b/keyboards/viterbi/keymaps/drashna/rules.mk @@ -0,0 +1,8 @@ +CONSOLE_ENABLE = no +TAP_DANCE_ENABLE = yes +RGBLIGHT_ENABLE = yes +MOUSEKEY_ENABLE = no + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif From a66e75609e6c098eead7c1c04c3a720612ad80d1 Mon Sep 17 00:00:00 2001 From: mogranjm <32807665+mogranjm@users.noreply.github.com> Date: Sun, 22 Oct 2017 15:32:35 +1100 Subject: [PATCH 37/52] Added new TKL layout for the Frosty flake - Quickfire Rapid (#1854) * First commit of the Terminus_Mini firmware and the DivergeJM version of the Nyquist firmware * Fix terminus_mini & nyquist/DivergeJM readme files Previously an outdated copy of the default readme. Updated to match the Nyquist/DivergeJM format (DivergeJM is a split 5x12 implementation of the terminus_mini layout) * Update makefiles to rules.mk Renamed both Makefiles to rules.mk, removed references to makefiles * Updated rules.mk Inadvertantly removed important code from the rules.mk in previous commit. This has been restored. Also disabled Tap_Dance in both rules.mk files * Moved terminus_mini to handwired Realised that existing directory was not appropriate for the terminus_mini project, moved to handwired. * New Frosty Flake layout for QFR TKL Added a TKL layout for the Frosty Flake with a navigation cluster on LOWER under the left hand and a similarly functioning MOUSE layer that includes mouse navigation functionality. --- .../frosty_flake/keymaps/QFR_JM/config.h | 8 ++ .../frosty_flake/keymaps/QFR_JM/keymap.c | 60 +++++++++++++++ .../frosty_flake/keymaps/QFR_JM/readme.md | 73 +++++++++++++++++++ .../frosty_flake/keymaps/QFR_JM/rules.mk | 17 +++++ .../terminus_mini/keymaps/default/keymap.c | 9 +-- keyboards/nyquist/keymaps/DivergeJM/README.md | 3 +- 6 files changed, 163 insertions(+), 7 deletions(-) create mode 100644 keyboards/frosty_flake/keymaps/QFR_JM/config.h create mode 100644 keyboards/frosty_flake/keymaps/QFR_JM/keymap.c create mode 100644 keyboards/frosty_flake/keymaps/QFR_JM/readme.md create mode 100644 keyboards/frosty_flake/keymaps/QFR_JM/rules.mk diff --git a/keyboards/frosty_flake/keymaps/QFR_JM/config.h b/keyboards/frosty_flake/keymaps/QFR_JM/config.h new file mode 100644 index 0000000000..8893d122e0 --- /dev/null +++ b/keyboards/frosty_flake/keymaps/QFR_JM/config.h @@ -0,0 +1,8 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here + +#endif diff --git a/keyboards/frosty_flake/keymaps/QFR_JM/keymap.c b/keyboards/frosty_flake/keymaps/QFR_JM/keymap.c new file mode 100644 index 0000000000..2b5444aff3 --- /dev/null +++ b/keyboards/frosty_flake/keymaps/QFR_JM/keymap.c @@ -0,0 +1,60 @@ +#include "frosty_flake.h" +#include "action_layer.h" +#ifdef AUDIO_ENABLE + #include "audio.h" +#endif +#include "eeconfig.h" + +enum QFR_layers { + _COLEMAK, + _LOWER, + _MOUSE +}; + +enum QFR_keycodes { + COLEMAK = SAFE_RANGE, + LOWER, + MOUSE +}; + + const uint16_t PROGMEM fn_actions[] = { //ACTION_LAYER_TAP_TOGGLE requires that number of taps be defined in *config.h* - default set to 5 + [0] = ACTION_LAYER_TAP_KEY(_LOWER, KC_SPC), //Hold for momentary Lower layer, Tap for Space, + [1] = ACTION_LAYER_TAP_TOGGLE(_LOWER), //Hold for momentary Mouse, Tap for toggle Mouse + [2] = ACTION_LAYER_TAP_TOGGLE(_MOUSE), //Hold for momentary Lower, Tap for toggle Lower + }; +#define SPC_LW FUNC(0) +#define LWR FUNC(1) +#define MSE FUNC(2) + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_COLEMAK] = KEYMAP_TKL(\ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,KC_SLCK,KC_PAUS, \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME,KC_PGUP, \ + KC_TAB, KC_Q, KC_W, KC_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, KC_ENT , \ + KC_LSPO,KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, KC_UP, \ + KC_LCTL,KC_LGUI, KC_LALT, SPC_LW, MSE, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT + ), + +[_LOWER] = KEYMAP_TKL(\ + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______,_______, \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LBRC, KC_RBRC, KC_UNDS, KC_PLUS, KC_BSPC, _______,_______,_______, \ + KC_TAB, KC_PGUP, KC_HOME, KC_UP, KC_END, XXXXXXX, XXXXXXX, KC_BTN3, KC_BTN4, KC_BTN5, XXXXXXX, KC_LCBR, KC_RCBR, KC_PIPE, _______,_______,_______, \ + KC_CAPS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_BTN1, KC_BTN2, XXXXXXX, XXXXXXX, _______, _______, \ + _______,XXXXXXX,_______,_______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, KC_RALT, _______, _______, _______, _______,_______,_______ \ + ), + +[_MOUSE] = KEYMAP_TKL(\ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______,_______, \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_DEL, _______,_______,_______, \ + KC_TAB, KC_WH_U, KC_WH_L, KC_MS_U, KC_WH_R, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LBRC, KC_RBRC, KC_BSLS, _______,_______,_______, \ + KC_BSPC, KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, \ + _______,XXXXXXX,KC_Z,KC_X, KC_C, KC_V, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, \ + _______, _______, _______, KC_ACL2, MSE, _______, _______, _______, _______,_______,_______ \ + ) +}; diff --git a/keyboards/frosty_flake/keymaps/QFR_JM/readme.md b/keyboards/frosty_flake/keymaps/QFR_JM/readme.md new file mode 100644 index 0000000000..6c7fabd185 --- /dev/null +++ b/keyboards/frosty_flake/keymaps/QFR_JM/readme.md @@ -0,0 +1,73 @@ +# TKL keymap for frosty_flake + +##Layers + + ,----. ,-------------------. ,-------------------. ,-------------------. ,--------------. + |ESC | | F1 | F2 | F3 | F4 | | F5 | F6 | F7 | F8 | | F9 |F10 |F11 |F12 | |PrSc|ScLk|PsBk| + '----' '-------------------' '-------------------' '-------------------' '--------------' + ,-------------------------------------------------------------------------. ,--------------. + | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bspc | | Ins|Home|PgUp| + |-------------------------------------------------------------------------| |--------------| + | Tab | Q | W | F | P | G | J | L | U | Y | ; | [ | ] | \ | | Del|End |PgDn| + |-------------------------------------------------------------------------| '--------------' + | Bspc | A | R | S | T | D | H | N | E | I | O | ' | Enter | + |-------------------------------------------------------------------------| ,----. + | LSPO | Z | X | C | V | B | K | M | , | . | / | RSPC | | Up | + |-------------------------------------------------------------------------| ,--------------. + |Ctrl|LGUI|LAlt| Space/Lower |MSE |RGUI|Menu|Ctrl| |Left|Down|Rght| + '-------------------------------------------------------------------------' '--------------' + +### Base Layer - Colemak + * The base layout is Colemak. + * I've implemented COLEMAK = SAFE_RANGE when enumerating the custom_keycodes, but I don't actually know what this does... + + * Space cadet is implemented in the shift keys (hold for shift, tap for respective parentheses) + + #### Layer Shifting + * The spacebar is a **TAP_KEY** macro - Hold for momentary *LOWER* layer, Tap for Space. + * The Right hand ALT key is a **TAP_TOGGLE** macro for the *MOUSE* layer (RAlt is accessible through LOWER, if you want...) + +### LOWER + + ,----. ,-------------------. ,-------------------. ,-------------------. ,--------------. + |ESC | | F1 | F2 | F3 | F4 | | F5 | F6 | F7 | F8 | | F9 |F10 |F11 |F12 | |PrSc|ScLk|PsBk| + '----' '-------------------' '-------------------' '-------------------' '--------------' + ,-------------------------------------------------------------------------. ,--------------. + | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | _ | + | Bspc | | Ins|Home|PgUp| + |-------------------------------------------------------------------------| |--------------| + | Tab |PgUp|Home| Up | End| | | | | | | { | } | | | | Del|End |PgDn| + |-------------------------------------------------------------------------| '--------------' + | Bckspc|PgDn|Left|Down|Rght| | | | | | | ' | Enter | + |-------------------------------------------------------------------------| ,----. + | LSPO | Z | X | C | V | | | | , | . | / | RSPC | | Up | + |-------------------------------------------------------------------------| ,--------------. + |Ctrl|LGUI|LAlt| |MSE |RGUI|Menu|Ctrl| |Left|Down|Rght| + '-------------------------------------------------------------------------' '--------------' + + * The *LOWER* layer contains a navigation cluster on the left hand. This layer is momentary when the spacebar or LOWER (RAlt) key is held and toggled on/off when the LOWER key is tapped. + + * The Navigation cluster is offset to the right compared to the traditional **WASD** nav cluster. With this implementation, you don't need to move your hand from the home position when navigating. Page Up & Down keys are found on the far left of the cluster. + + * All unused (blank on the above keymap) keys are locked out using the XXXXXXX filler (KC_NO), all modifiers (edge |_| keys \[except 0, \. & Fn\] on the above keymap) and the ZXCV cluster are transparent (_______) to the Base layer. + +### MOUSE + + ,----. ,-------------------. ,-------------------. ,-------------------. ,--------------. + |ESC | | F1 | F2 | F3 | F4 | | F5 | F6 | F7 | F8 | | F9 |F10 |F11 |F12 | |PrSc|ScLk|PsBk| + '----' '-------------------' '-------------------' '-------------------' '--------------' + ,-------------------------------------------------------------------------. ,--------------. + | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Del | | Ins|Home|PgUp| + |-------------------------------------------------------------------------| |--------------| + | Tab | WhU| WhL| MsU| WhR| | | M3 | M4 | M5 | | [ | ] | \ | | Del|End |PgDn| + |-------------------------------------------------------------------------| '--------------' + | BSPC | WhD| MsL| MsD| MsR| | |LClk |RClk | | | ' | Enter | + |-------------------------------------------------------------------------| ,----. + | LSPO | Z | X | C | V | | | | , | . | / | RSPC | | Up | + |-------------------------------------------------------------------------| ,--------------. + |Ctrl|LGUI|LAlt| Accel ++ |MSE |RGUI|Menu|Ctrl| |Left|Down|Rght| + '-------------------------------------------------------------------------' '--------------' + + * The *MOUSE* layer contains keys replicating functions found on the mouse. + * The navigation cluster (Up, Down, Left, Right) is a replication of the Navigation cluster on the *LOWER* layer. The scroll keys are analagous to the Page Up & Down keys. + * The primary click (right & left) buttons are on the right home row (index & middle fingers) + * Secondary click buttons are above the standard keys (M3/Wheel click, M4, M5) but I do not use this function. diff --git a/keyboards/frosty_flake/keymaps/QFR_JM/rules.mk b/keyboards/frosty_flake/keymaps/QFR_JM/rules.mk new file mode 100644 index 0000000000..f29756f223 --- /dev/null +++ b/keyboards/frosty_flake/keymaps/QFR_JM/rules.mk @@ -0,0 +1,17 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/handwired/terminus_mini/keymaps/default/keymap.c b/keyboards/handwired/terminus_mini/keymaps/default/keymap.c index 5227cb6a99..f37989b10a 100644 --- a/keyboards/handwired/terminus_mini/keymaps/default/keymap.c +++ b/keyboards/handwired/terminus_mini/keymaps/default/keymap.c @@ -29,22 +29,19 @@ extern keymap_config_t keymap_config; enum terminus_mini_layers { _COLEMAK, - _QWERTY, _LOWER, _RAISE, _FUNCTION, _MOUSE, - _ADJUST, + _ADJUST }; enum terminus_mini_keycodes { COLEMAK = SAFE_RANGE, - QWERTY, LOWER, RAISE, FUNCTION, - MOUSE, - ADJUST, + MOUSE }; // Enable these functions using FUNC(n) macro. @@ -159,7 +156,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_WH_U, KC_WH_L, KC_MS_U, KC_WH_R, XXXXXXX, XXXXXXX, KC_BTN3, KC_BTN4, KC_BTN5, XXXXXXX, XXXXXXX, \ KC_BSPC, KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, XXXXXXX, KC_BTN1, KC_BTN2, XXXXXXX, XXXXXXX, XXXXXXX, \ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RSPC, \ - _______, XXXXXXX, XXXXXXX, XXXXXXX, KC_ACL1, KC_ACL0, XXXXXXX, MSE, XXXXXXX, KC_RCTL \ + _______, XXXXXXX, XXXXXXX, XXXXXXX, KC_ACL2, KC_ACL0, XXXXXXX, MSE, XXXXXXX, KC_RCTL \ ), }; diff --git a/keyboards/nyquist/keymaps/DivergeJM/README.md b/keyboards/nyquist/keymaps/DivergeJM/README.md index 37db5d3bae..6de6a1427d 100644 --- a/keyboards/nyquist/keymaps/DivergeJM/README.md +++ b/keyboards/nyquist/keymaps/DivergeJM/README.md @@ -66,7 +66,6 @@ The TERMINUS_MINI layout (../../../terminus_mini/terminus_mini.h) is handwired a * The Navigation cluster is offset to the right compared to the traditional **WASD** nav cluster. With this implementation, you don't need to move your hand from the home position when navigating. Page Up & Down keys are found on the far left of the cluster. - * All unused (blank on the above keymap) keys are locked out using the XXXXXXX filler (KC_NO), all modifiers (edge |_| keys \[except 0, \. & Fn\] on the above keymap) and the ZXCV cluster are transparent (_______) to the Base layer. - [] TO DO!! - It would be nice to have a **TAP_DANCE_DOUBLE** implementation whereby a double tap of the right 2U key sends KC_PENT @@ -131,5 +130,7 @@ The TERMINUS_MINI layout (../../../terminus_mini/terminus_mini.h) is handwired a * The *MOUSE* layer contains keys replicating functions found on the mouse. * The navigation cluster (Up, Down, Left, Right) is a replication of the Navigation cluster on the *LOWER* layer. The scroll keys are analagous to the Page Up & Down keys. + *) The primary click (right & left) buttons are on the right home row (index & middle fingers) + * Secondary click buttons are above the standard keys (M3/Wheel click, M4, M5) but I do not use this function. \ No newline at end of file From 07ec609fadee47df505b9cfbc7d4a019a265d730 Mon Sep 17 00:00:00 2001 From: Dylan Khor Date: Sun, 22 Oct 2017 20:53:00 -0400 Subject: [PATCH 38/52] Missing line break in NIU Mini readme (#1886) * Missing line break * More specific URL to the product --- keyboards/niu_mini/readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/niu_mini/readme.md b/keyboards/niu_mini/readme.md index 71bfae2731..6955343b9f 100644 --- a/keyboards/niu_mini/readme.md +++ b/keyboards/niu_mini/readme.md @@ -5,9 +5,9 @@ NIU Mini A compact 40% (12x4) ortholinear keyboard kit sold by KBDFans. -Keyboard Maintainer: QMK Community +Keyboard Maintainer: QMK Community Hardware Supported: NIU Mini PCB -Hardware Availability: [KBDFans](https://kbdfans.myshopify.com/) +Hardware Availability: [KBDFans](https://kbdfans.myshopify.com/products/niu-mini-40-diy-kit) Make example for this keyboard (after setting up your build environment): From c2b8a47604106af17b37fbe54d7dac02493bba68 Mon Sep 17 00:00:00 2001 From: James <32029516+broken-username@users.noreply.github.com> Date: Mon, 23 Oct 2017 12:26:52 -0600 Subject: [PATCH 39/52] Some finishing touches on space_oddity (#1892) * Add verbose comments, ASCII layout pictures, and re-word readme.md * Fix omission of F(2) on the third layer. --- .../space_oddity/keymaps/default/keymap.c | 87 ++++++++++++++++++- keyboards/handwired/space_oddity/readme.md | 6 +- 2 files changed, 87 insertions(+), 6 deletions(-) diff --git a/keyboards/handwired/space_oddity/keymaps/default/keymap.c b/keyboards/handwired/space_oddity/keymaps/default/keymap.c index 26be16fbd6..4230cdf8db 100644 --- a/keyboards/handwired/space_oddity/keymaps/default/keymap.c +++ b/keyboards/handwired/space_oddity/keymaps/default/keymap.c @@ -17,7 +17,7 @@ #include "space_oddity.h" -// Planck keycodes needed for dynamic macros +// Planck keycodes needed for dynamic macros. enum planck_keycodes { QWERTY = SAFE_RANGE, @@ -25,7 +25,7 @@ enum planck_keycodes { }; -// Tap Dance +// Tap Dance initializer. enum { SFT_CAPS = 0, @@ -36,12 +36,14 @@ enum { #define MOUSE_LAYER 2 +// Toggle MOUSE_LAYER. Additional layers can be added for additional layouts or other special functions. const uint16_t PROGMEM fn_actions[] = { [2] = ACTION_LAYER_TOGGLE(MOUSE_LAYER), }; +// Tap dance actions - double tap for Caps Lock. qk_tap_dance_action_t tap_dance_actions[] = { [SFT_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS), @@ -50,6 +52,29 @@ qk_tap_dance_action_t tap_dance_actions[] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Here is an ASCII version of the base layout. Note that Dynamic Macros 1 and 2 are considered Macro 5 and Macro 6. + + ___________________________________________________________________________________ + | | | | | | Dynamic | Dynamic | + | Macro 0 | Macro 1 | Macro 2 | Macro 3 | Macro 4 | Macro 1 | Macro 2 | + |___________|___________|___________|___________|___________|___________|___________| + | | | | | | | | | | | | | + | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BKSP | + |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| + | | | | | | | | | | | | | + | TAB | Q | W | E | R | T | Y | U | I | O | P | - | + |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| + | | | | | | | | | | | | | + |ESC (CTL_T)| A | S | D | F | G | H | J | K | L | ; | ' | + |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| + | | | | | | | | | | | | | + | SHFT | Z | X | C | V | B | N | M | , | . | / |SHFT(ENT)| + |_________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_________| + | | | | | | | ALT | HYP | LT 1| LT 2| + | M2 | M1 | GUI | ALT | CTRL | SPC |(LFT)|(RGT)| (UP)|(DWN)| + |_____|_____|_____|_____|___________|___________|_____|_____|_____|_____| + */ + KEYMAP( M(0), M(1), M(2), M(3), M(4), DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, @@ -57,6 +82,31 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, TD(SFT_CAPS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT), MO(2), MO(1), KC_LGUI, KC_RALT, KC_LCTRL, KC_SPC, ALT_T(KC_LEFT), ALL_T(KC_RGHT), LT(1, KC_UP), LT(2, KC_DOWN)), + + /* Function layer. + Blank keys correspond to the KC_TRNS keycode. + + ___________________________________________________________________________________ + | | | | | | DYN REC | DYN REC | + | Macro 7 | | | | | 1 | 2 | + |___________|___________|___________|___________|___________|___________|___________| + | DYN REC | | | | | | | | | | | | + | STOP | F1 | F2 | F3 | F4 | F5 | [ | 7 | 8 | 9 | * | DEL | + |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| + | | | | | | | | | | | | | + | | F6 | F7 | F8 | F9 | F10 | ] | 4 | 5 | 6 | + | = | + |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| + | | | | | | | | | | | | | + | \ | F11 | F12 | F13 | F14 | F15 | { | 1 | 2 | 3 | - | | | + |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| + | | | | | | | | | | | | | + | | F16 | F17 | F18 | F19 | F20 | } | 0 | , | . | / | | + |_________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_________| + | | | | | | | | | | | + | | | | | | | | | | | + |_____|_____|_____|_____|___________|___________|_____|_____|_____|_____| + + */ KEYMAP( M(7), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DYN_REC_START1, DYN_REC_START2, @@ -65,6 +115,30 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_BSLS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_LCBR, KC_P1, KC_P2, KC_P3, KC_MINS, KC_PIPE, KC_TRNS, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_RCBR, KC_P0, KC_COMM, KC_DOT, KC_SLSH, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + /* Mouse layer. + + ___________________________________________________________________________________ + | | | | | | | | + | | | | | | | | + |___________|___________|___________|___________|___________|___________|___________| + | | | | MS | | | | | | | | | + | | | | UP | | | | | | | | | + |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| + | | | MS | MS | MS | | | | | | | | + | | | LFT | DWN | RGT | | | MS1 | MS3 | MS2 | | | + |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| + | | | | | | | | | | | | | + | | | | | | | | | | | | | + |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| + | | | | | | | | | | | | | + | |RESET| | | | | | | | | | | + |_________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_________| + | | | | | | | | | | | + | | | | | | | | | | F(2)| + |_____|_____|_____|_____|___________|___________|_____|_____|_____|_____| + + */ KEYMAP( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -75,6 +149,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, F(2)) }; +// Simple macro ideas follow. Each of them is designed to give you a quick way to create pairs of +// delimiters and then position the cursor between them, much like Emacs' ParEdit does. This way, +// you can have some convenient coding "helpers" even when not using Emacs. It is also nice for +// LaTeX editing. +// +// Customize to your heart's content! const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { switch (id) { @@ -95,7 +175,8 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { SEND_STRING("{}"SS_TAP(X_LEFT)); } break; - + + // Probably something only Lisp users will appreciate... case 7: if (record->event.pressed) { SEND_STRING("(lambda ())"SS_TAP(X_LEFT)SS_TAP(X_LEFT)); diff --git a/keyboards/handwired/space_oddity/readme.md b/keyboards/handwired/space_oddity/readme.md index 1dadcb8a93..07ec957faf 100644 --- a/keyboards/handwired/space_oddity/readme.md +++ b/keyboards/handwired/space_oddity/readme.md @@ -5,7 +5,7 @@ This firmware is for an Emacs-focused handwired custom keyboard using an Arduino As originally designed, the top row consists of 2u keys which are used for user-defined macros. The keys for Shift and Enter are 1.75u. -Some simple example macros are included. To add your own, simply add the number of the macro you want in the appropriate section. +Some simple example macros are included. To add your own, just add the number of the macro you want in the appropriate section. A picture of the finished product can be found here: https://imgur.com/dE9Y4XK @@ -17,9 +17,9 @@ The following pins are used: ## Compiling and loading the firmware -To build the firmware, run `make handwired/space-oddity` from the toplevel directory. +To build the firmware, run `make handwired/space_oddity` from the toplevel directory. On GNU/Linux, you can flash the default layout onto the microcontroller by using `avrdude -p atmega32u4 -P /dev/ttyACM0 -c avr109 -U flash:w:handwired_space_oddity_default.hex`. Note that the device name under `/dev` may be different. -This design was conceived by James Taylor. Any requests for further information and/or tips for building your own are welcome! \ No newline at end of file +This design was conceived by James Taylor. Any requests for further information, suggestions, and/or tips for building your own are welcome! \ No newline at end of file From e54c8df45384cff92646b93792b242acc7967c49 Mon Sep 17 00:00:00 2001 From: Damien Date: Mon, 23 Oct 2017 20:27:37 +0200 Subject: [PATCH 40/52] DZ60 changes (#1890) * - Fixed DK60 version in config.h * - Updated dk60 readme with new QMK rules * - Fixed wording in readme * Added dbroqua layout for DZ60 I've also updated dz60.h to add "true HHKD" keymap definition (6U spacebar). With the default HHKB definition r_alt was not mapped and when I pressed r_menu it was r_alt. Regards --- keyboards/dz60/dz60.h | 16 +++++- keyboards/dz60/keymaps/dbroqua/keymap.c | 74 +++++++++++++++++++++++++ 2 files changed, 89 insertions(+), 1 deletion(-) create mode 100644 keyboards/dz60/keymaps/dbroqua/keymap.c diff --git a/keyboards/dz60/dz60.h b/keyboards/dz60/dz60.h index c804b357d2..664aaaaab6 100644 --- a/keyboards/dz60/dz60.h +++ b/keyboards/dz60/dz60.h @@ -32,6 +32,20 @@ { KC_NO, K401, KC_NO, K403, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, KC_NO, K411, KC_NO, K413, KC_NO } \ } +#define KEYMAP_TRUE_HHKB( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ + K401, K403, K406, K410, K411 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \ + { KC_NO, K401, KC_NO, K403, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, KC_NO, KC_NO, KC_NO } \ +} + #define KEYMAP_2_SHIFTS( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ @@ -62,4 +76,4 @@ } -#endif \ No newline at end of file +#endif diff --git a/keyboards/dz60/keymaps/dbroqua/keymap.c b/keyboards/dz60/keymaps/dbroqua/keymap.c new file mode 100644 index 0000000000..d4b25b6c4e --- /dev/null +++ b/keyboards/dz60/keymaps/dbroqua/keymap.c @@ -0,0 +1,74 @@ +#include "dz60.h" + +#define _DEFAULT 0 +#define _FN 1 +#define _SFX 2 + +// Fillers to make layering more clear +#define ______ KC_TRNS + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Qwerty gui/alt/space/alt/gui + * ,-----------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | + * |-----------------------------------------------------------------------------------------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp | + * |-----------------------------------------------------------------------------------------+ + * | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter | + * |-----------------------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | / | RShift | FN | + * |-----------------------------------------------------------------------------------------+ + * |LGUI | LAlt | Space | RAlt |RGUI | + * `-----------------------------------------------------------------' + */ + [_DEFAULT] = KEYMAP_TRUE_HHKB( /* Basic QWERTY */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \ + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, ______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN), \ + KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI \ + ), + +/* FN Layer + * ,-----------------------------------------------------------------------------------------. + * | SFX | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del | + * |-----------------------------------------------------------------------------------------+ + * | CAPS | | | | | | | | Psc | Slck| Paus| Up | | | + * |-----------------------------------------------------------------------------------------+ + * | | Vol-| Vol+| Mute| | | * | / | Home| PgUp| Left|Right| | + * |-----------------------------------------------------------------------------------------+ + * | | Prev| Play| Next| | | + | - | End |PgDn| Down| | | + * |-----------------------------------------------------------------------------------------+ + * | | | | Stop | | + * `-----------------------------------------------------------------' + */ + [_FN] = KEYMAP_TRUE_HHKB( /* Layer 1 */ + TG(_SFX),KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, \ + KC_CAPS, ______, ______, ______, ______, ______, ______, ______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, ______, ______, \ + ______, KC_VOLD, KC_VOLU, KC_MUTE, ______, ______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT,______, \ + ______, ______, KC_MPRV, KC_MPLY, KC_MNXT,______, ______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN,______, ______, \ + ______, ______, ______, KC_MSTP, ______ \ + ), + + +/* SFX Layer + * ,-----------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------------------------------------+ + * | | BL- | BL+ | BL | | | | | | | | | | | + * |-----------------------------------------------------------------------------------------+ + * | | RGBT| RGBM| | | | | | | | | | | + * |-----------------------------------------------------------------------------------------+ + * | | Hue+| Hue-| Sat+| Sat-| Val+| Val-| | | | | | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | + * `-----------------------------------------------------------------' + */ + [_SFX] = KEYMAP_HHKB( + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + ______, BL_TOGG,BL_STEP,BL_DEC, BL_INC, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + ______, RGB_TOG,RGB_MOD,______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + ______, ______, RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD,______, ______, ______, ______, ______, ______, \ + ______, ______, ______, ______, ______ \ + ) +}; From af83c6a4cb76098eb5798324e9727c7d923ce046 Mon Sep 17 00:00:00 2001 From: alex-paget Date: Mon, 23 Oct 2017 10:18:21 +0100 Subject: [PATCH 41/52] My layout to suit my needs --- keyboards/planck/keymaps/paget/config.h | 42 +++++++++++++++ keyboards/planck/keymaps/paget/keymap.c | 69 +++++++++++++++++++++++++ keyboards/planck/keymaps/paget/rules.mk | 3 ++ 3 files changed, 114 insertions(+) create mode 100755 keyboards/planck/keymaps/paget/config.h create mode 100755 keyboards/planck/keymaps/paget/keymap.c create mode 100755 keyboards/planck/keymaps/paget/rules.mk diff --git a/keyboards/planck/keymaps/paget/config.h b/keyboards/planck/keymaps/paget/config.h new file mode 100755 index 0000000000..b406e2fed9 --- /dev/null +++ b/keyboards/planck/keymaps/paget/config.h @@ -0,0 +1,42 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PLANCK_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +#define MUSIC_MASK (keycode != KC_NO) + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +#endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/paget/keymap.c b/keyboards/planck/keymaps/paget/keymap.c new file mode 100755 index 0000000000..02e9fd9f4f --- /dev/null +++ b/keyboards/planck/keymaps/paget/keymap.c @@ -0,0 +1,69 @@ +//Keymap I created to suit my working style + +#include "planck.h" +#include "action_layer.h" + +//Define the layers +#define _QWERTY 0 +#define _LOWER 1 +#define _RAISE 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* QWERTY + * ,-----------------------------------------------------------------------------------. + * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | ; | ' | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Shift | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl |Enter | GUI | Alt |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' +*/ + +[_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}, + {KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, + {KC_LCTL, KC_ENT, KC_LGUI, KC_LALT, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT} +}, + +/* + * ,-----------------------------------------------------------------------------------. + * | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | _ | = | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ` | | | | | | | | | | [ | ] | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| \ | | | | | | | | | # |Shift | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | | | |Lower | Space |Raise | | | | | + * `-----------------------------------------------------------------------------------' +*/ +[_LOWER] = { + {KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL}, + {KC_GRV, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LBRC, KC_RBRC}, + {KC_TRNS, KC_NUBS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NUHS, KC_TRNS}, + {KC_TRNS, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO} +}, + +/* + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | CAPS | | | | | | | |PrtScr| Lock |Break | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| | | | | | | |Insert| Home | PgUp |Shift | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | | | Alt |Lower | Space |Raise |Delete| End | PgDn | | + * `-----------------------------------------------------------------------------------' +*/ + +[_RAISE] = { + {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12}, + {KC_CAPS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_NO}, + {KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_INS, KC_HOME, KC_PGUP, KC_TRNS}, + {KC_TRNS, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_END, KC_PGDN, KC_NO} +} + +}; diff --git a/keyboards/planck/keymaps/paget/rules.mk b/keyboards/planck/keymaps/paget/rules.mk new file mode 100755 index 0000000000..457a3d01d4 --- /dev/null +++ b/keyboards/planck/keymaps/paget/rules.mk @@ -0,0 +1,3 @@ +ifndef QUANTUM_DIR + include ../../../../Makefile +endif From a08287b0a0800e0add34fa9c0c4916d2bf8d5db1 Mon Sep 17 00:00:00 2001 From: ajp10304 Date: Mon, 23 Oct 2017 19:28:52 +0100 Subject: [PATCH 42/52] Added ajp10304 Planck layout (#1887) * Added ajp10304 Planck layout * Removed Makefile from planck ajp10304 keymap --- .gitignore | 1 + keyboards/planck/keymaps/ajp10304/config.h | 8 + keyboards/planck/keymaps/ajp10304/keymap.c | 206 ++++++++++++++++++++ keyboards/planck/keymaps/ajp10304/readme.md | 86 ++++++++ keyboards/planck/keymaps/ajp10304/rules.mk | 5 + 5 files changed, 306 insertions(+) create mode 100644 keyboards/planck/keymaps/ajp10304/config.h create mode 100644 keyboards/planck/keymaps/ajp10304/keymap.c create mode 100644 keyboards/planck/keymaps/ajp10304/readme.md create mode 100644 keyboards/planck/keymaps/ajp10304/rules.mk diff --git a/.gitignore b/.gitignore index fb73d7b7e9..f513ed3af3 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,7 @@ build/ quantum/version.h .idea/ CMakeLists.txt +cmake-build-debug .DS_STORE /util/wsl_downloaded /util/win_downloaded diff --git a/keyboards/planck/keymaps/ajp10304/config.h b/keyboards/planck/keymaps/ajp10304/config.h new file mode 100644 index 0000000000..11cafbefcb --- /dev/null +++ b/keyboards/planck/keymaps/ajp10304/config.h @@ -0,0 +1,8 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#define PREVENT_STUCK_MODIFIERS + +#endif diff --git a/keyboards/planck/keymaps/ajp10304/keymap.c b/keyboards/planck/keymaps/ajp10304/keymap.c new file mode 100644 index 0000000000..84e3a0ab96 --- /dev/null +++ b/keyboards/planck/keymaps/ajp10304/keymap.c @@ -0,0 +1,206 @@ +#include "planck.h" +#include "action_layer.h" +#include "eeconfig.h" +#include "keymap_uk.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 _FUNC 3 +#define _ADJUST 16 +#define _DYN 6 + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + FUNC, + LOWER, + RAISE, + DYNAMIC_MACRO_RANGE +}; + +#include "dynamic_macro.h" + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | ;: | Enter| + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shft | Z | X | C | V | B | N | M | ,< | .> | /? | Shft | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | Shift| MENU | Ctrl | Fn | + * `-----------------------------------------------------------------------------------' + */ +[_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 }, + {MT(MOD_LSFT, KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, MT(MOD_RSFT, KC_ENT) }, + {KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSHIFT }, + {MO(_FUNC), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_SPC, RAISE, KC_LSHIFT, KC_BTN2, KC_RCTL, MO(_FUNC) } +}, + +/* Function + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | 1! | 2" | 3£ | 4$ | 5% | 6^ | 7& | 8* | 9( | 0) | ~ |INSERT| + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| \| | `¬ | #~ | * | -_ | =+ | \| | [{ | ]} | '@ |Shift | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | MENU | Alt | Ctrl | Fn | + * `-----------------------------------------------------------------------------------' + */ +[_FUNC] = { + {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_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, UK_TILD, KC_INSERT }, + {KC_LSHIFT, KC_NONUS_BSLASH, KC_GRAVE, KC_NONUS_HASH, KC_PAST, KC_MINS, KC_EQL, KC_BSLASH, KC_LBRC, KC_RBRC, KC_QUOT, MT(MOD_RSFT, KC_ENT) }, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ } +}, + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | 1! | 2" | 3£ | 4$ | 5% | 6^ | 7& | 8* | 9( | 0) | DEL | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ! | " | £ | $ | % | ^ | & | * | ( | ) |WrdDel|WrdBks| + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| \| | `¬ | #~ | '@ | -_ | =+ | #~ | [{ | ]} | '@ |Shift | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | |Lower | Del |Space | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = { + {KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, KC_BSPC }, + {LSFT(KC_1), LSFT(KC_2), LSFT(KC_3), LSFT(KC_4), LSFT(KC_5), LSFT(KC_6), LSFT(KC_7), LSFT(KC_8), LSFT(KC_9), LSFT(KC_0), LCTL(KC_DEL), LCTL(KC_BSPC) }, + {KC_LSPO, KC_NONUS_BSLASH, KC_GRAVE, KC_NONUS_HASH, KC_QUOT, KC_MINS, KC_EQL, KC_NONUS_HASH, KC_LBRC, KC_RBRC, KC_QUOT, MT(MOD_RSFT, KC_ENT) }, + {_______, _______, _______, _______, _______, KC_DEL, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY } +}, + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | |WRDSEL| [ | ] | | | PGUP | HOME |PGDOWN| |PRNTSC| + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ` | | | ( | ) | | | HOME | UP | END | |ZOOM +| + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | { | } | | |< | LEFT | DOWN |RIGHT | >| |ZOOM -| + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | Alt | Enter|Raise | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = { + {KC_GRV, XXXXXXX, M(1), KC_LBRC, KC_RBRC, XXXXXXX, XXXXXXX, KC_PGUP, KC_HOME, KC_PGDOWN, XXXXXXX, KC_PSCREEN }, + {KC_GRV, XXXXXXX, XXXXXXX, LSFT(KC_9), LSFT(KC_0), XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_END, XXXXXXX, LCTL(LSFT(KC_EQL)) }, + {_______, XXXXXXX, XXXXXXX, LSFT(KC_LBRC), LSFT(KC_RBRC), XXXXXXX, LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT), LCTL(KC_MINS) }, + {_______, _______, _______, _______, _______, KC_LALT, KC_ENT, _______, XXXXXXX, _______, _______, _______ } +}, + + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | ???? | Reset|Qwerty| | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | CAPS | | | | | | | Mute | Vol+ | Play | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | Prev | Vol- | Next | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | DYN | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = { + {M(0), RESET, QWERTY, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL }, + {KC_CAPS, _______, _______, _______, _______, _______, _______, KC_AUDIO_MUTE, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE, _______, _______ }, + {_______, _______, _______, _______, _______, _______, _______, KC_MEDIA_PREV_TRACK, KC_AUDIO_VOL_DOWN, KC_MEDIA_NEXT_TRACK, _______, _______ }, + {_______, _______, _______, _______, _______, _______, _______, _______, MO(_DYN), _______, _______, _______ } +}, + +/* DYN: Macro Recording and Playback + * ,-----------------------------------------------------------------------------------. + * | | | | | | REC1 | REC2 | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | PLAY1| PLAY2| | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | STOP | STOP | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_DYN]= { + {_______, _______, _______, _______, _______, DYN_REC_START1, DYN_REC_START2, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, DYN_REC_STOP, DYN_REC_STOP, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +}, + +}; + + +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) { + + if (!process_record_dynamic_macro(keycode, record)) { + return false; + } + + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_QWERTY); + } + return false; + 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; + 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; + } + return true; +} + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + switch(id) { + // These would trigger when you hit a key mapped as M(0) + case 0: + if (record->event.pressed) { + return MACRO( + // SENSITIVE + END + ); + } + break; + case 1: // Word Select + if (record->event.pressed) { + return MACRO( + DOWN(KC_LCTL), DOWN(KC_RIGHT), UP(KC_RIGHT), DOWN(KC_LSFT), DOWN(KC_LEFT), UP(KC_LEFT), UP(KC_LSFT), UP(KC_LCTL), + END + ); + } + } + return MACRO_NONE; +}; \ No newline at end of file diff --git a/keyboards/planck/keymaps/ajp10304/readme.md b/keyboards/planck/keymaps/ajp10304/readme.md new file mode 100644 index 0000000000..6e6bde014d --- /dev/null +++ b/keyboards/planck/keymaps/ajp10304/readme.md @@ -0,0 +1,86 @@ +# AJP10304 Custom Planck Layout + +**Note:** In the tables below where there are two characters on a key, +the second is the output when shift is applied. + +**Note:** The below tables assume a UK layout. + +##### Main Qwerty Layer + +* Tab: when held, operates as shift. +* Enter: when held, operates as shift. +* MENU: perform right-click + +| | | | | | | | | | | | | +| ---- |:----:| ----:| ----:| ----:| ----:| ----:| ----:| ----:| ----:| ----:| ----:| +| Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | +| Tab | A | S | D | F | G | H | J | K | L | ;: | Enter| +| Shft | Z | X | C | V | B | N | M | ,< | .> | /? | Shft | +| Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | Shift| MENU | Ctrl | Fn | + +##### Function Layer +Activated when `fn` held in the above `qwerty` layer. + +| | | | | | | | | | | | | +| ---- |:----:| ----:| ----:| ----:| ----:| ----:| ----:| ----:| ----:| ----:| ----:| +| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | +| 1! | 2" | 3£ | 4$ | 5% | 6^ | 7& | 8* | 9( | 0) | ~ |INSERT| +| Shift| \| | `¬ | #~ | * | -_ | =+ | \| | [{ | ]} | '@ |Shift | +| Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | MENU | Alt | Ctrl | Fn | + +##### Lower Layer +Activated when `Lower` is held in the above `qwerty` layer. + +* Numbers are along the top row, their shifted counterparts are on row 2. +* WrdBks: `backspace` with `ctrl` applied. I.e. delete a word. +* WrdDel: `delete` with `ctrl` applied. I.e. forward delete a word. + +| | | | | | | | | | | | | +| ---- |:----:| ----:| ----:| ----:| ----:| ----:| ----:| ----:| ----:| ----:| ----:| +| 1! | 2" | 3£ | 4$ | 5% | 6^ | 7& | 8* | 9( | 0) | DEL | Bksp | +| ! | " | £ | $ | % | ^ | & | * | ( | ) |WrdDel|WrdBks| +| Shift| \| | `¬ | #~ | '@ | -_ | =+ | #~ | [{ | ]} | '@ |Shift | +| | | | |Lower | Del |Space | | Next | Vol- | Vol+ | Play | + + ##### Raise Layer + Activated when `Raise` is held in the above `qwerty` layer. + + * Preferred layer for typing brackets. + * Allows for cursor navigation to be used solely with the right hand. + * WRDSEL: Select the word where the cursor is. + * |< and >|: Apply `ctrl` to `left` and `right` respectively for word + +| | | | | | | | | | | | | +| ---- |:----:| ----:| ----:| ----:| ----:| ----:| ----:| ----:| ----:| ----:| -----: +| ` | |WRDSEL| [ | ] | | | PGUP | HOME |PGDOWN| |PRNTSC| +| ` | | | ( | ) | | | HOME | UP | END | |ZOOM +| +| | | | { | } | | |< | LEFT | DOWN |RIGHT | >| |ZOOM -| +| | | | | | Alt | Enter|Raise | | | | | + +##### Lower + Raise +Activated when `Lower` and `Raise` are held together the above `qwerty` layer. + +* Audio controls in the same position as cursor keys from the `Raise` layer. +* ????: Runs a macro for outputting sensitive information. Do not use this store passwords. +* Reset: Enter bootloader for flashing firmware to the keyboard. +* CAPS: Toggle caps lock. +* DYN: Enter `DYN` layer. + +| | | | | | | | | | | | | +| ---- |:----:| ----:| ----:| ----:| ----:| ----:| ----:| ----:| ----:| ----:| -----: +| ???? | Reset|Qwerty| | | | | | | | | Del | +| CAPS | | | | | | | Mute | Vol+ | Play | | | +| | | | | | | | Prev | Vol- | Next | | | +| | | | | | | | DYN | | | | + +##### DYN +Activated when `DYN` held along with `Lower` and `Raise` +Allows recording of macros. To start recording the macro, press either REC1 or REC2. +To finish the recording, press STOP. To replay the macro, press either PLAY1 or PLAY2. + +| | | | | | | | | | | | | +| ---- |:----:| ----:| ----:| ----:| ----:| ----:| ----:| ----:| ----:| ----:| -----: +| | | | | | REC1 | REC2 | | | | | | +| | | | | | PLAY1| PLAY2| | | | | | +| | | | | | STOP | STOP | | | | | | +| | | | | | | | | | | | diff --git a/keyboards/planck/keymaps/ajp10304/rules.mk b/keyboards/planck/keymaps/ajp10304/rules.mk new file mode 100644 index 0000000000..76b36845c6 --- /dev/null +++ b/keyboards/planck/keymaps/ajp10304/rules.mk @@ -0,0 +1,5 @@ +ifndef QUANTUM_DIR + include ../../../../Makefile +endif + +AUDIO_ENABLE = no \ No newline at end of file From 4c960ad7c4b109dda8ddcb5ffe1d2f7e674f8f91 Mon Sep 17 00:00:00 2001 From: Bernardo Farah Date: Tue, 24 Oct 2017 19:08:31 -0700 Subject: [PATCH 43/52] Added berfarah's custom keyboard layout --- layouts/community/ergodox/berfarah/config.h | 13 + layouts/community/ergodox/berfarah/keymap.c | 280 +++++++++++++++++++ layouts/community/ergodox/berfarah/readme.md | 93 ++++++ layouts/community/ergodox/berfarah/rules.mk | 18 ++ 4 files changed, 404 insertions(+) create mode 100644 layouts/community/ergodox/berfarah/config.h create mode 100644 layouts/community/ergodox/berfarah/keymap.c create mode 100644 layouts/community/ergodox/berfarah/readme.md create mode 100644 layouts/community/ergodox/berfarah/rules.mk diff --git a/layouts/community/ergodox/berfarah/config.h b/layouts/community/ergodox/berfarah/config.h new file mode 100644 index 0000000000..4acefdecc7 --- /dev/null +++ b/layouts/community/ergodox/berfarah/config.h @@ -0,0 +1,13 @@ +#ifndef CONFIG_BERFARAH_H +#define CONFIG_BERFARAH_H + +#include QMK_KEYBOARD_CONFIG_H + +#undef TAPPING_TERM +#define TAPPING_TERM 150 + +#define RGBLIGHT_EFFECT_BREATHE_CENTER 1.4 +#define RGBLIGHT_EFFECT_BREATHE_MAX 150 + +#undef IGNORE_MOD_TAP_INTERRUPT +#endif diff --git a/layouts/community/ergodox/berfarah/keymap.c b/layouts/community/ergodox/berfarah/keymap.c new file mode 100644 index 0000000000..bc639b189d --- /dev/null +++ b/layouts/community/ergodox/berfarah/keymap.c @@ -0,0 +1,280 @@ +// Netable differences vs. the default firmware for the ErgoDox EZ: +// 1. The Cmd key is now on the right side, making Cmd+Space easier. +// 2. The media keys work on OSX (But not on Windows). +#include QMK_KEYBOARD_H +#include "action_layer.h" + +enum keyboard_layers { + QWERTY = 0, // default layer + NUMS, // numbers + symbols + MOVE, // vim-like movement + AFK, +}; + +enum custom_keycodes { + BF_AFK = SAFE_RANGE, + BF_WAKE, + BF_NUMS, + BF_MOVE, +}; + +// Dashes (macOS) +#define KC_NDSH LALT(KC_MINS) +#define KC_MDSH S(LALT(KC_MINS)) + +#define VIM_B LALT(KC_LEFT) +#define VIM_W LALT(KC_RIGHT) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap 0: Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | Power| | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * |Ctrl/Esc| A | S | D | F | G |------| |------| H | J | K | L | ; | ' | + * |--------+------+------+------+------+------| ( | | ) |------+------+------+------+------+--------| + * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |Hyper | F19 |AltShf| | NUMS | | NUMS | |Ctrl/E| F19 | Meh | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | V- | V+ | | Next |Play/Pau| + * ,------|------|------| |------+--------+------. + * | | | Vx | | Prev | | | + * | Space| LGUI |------| |------| Bsp | Enter| + * | | | LAlt | | LAlt | | | + * `--------------------' `----------------------' + */ + // If it accepts an argument (i.e, is a function), it doesn't need KC_. + // Otherwise, it needs KC_* + [QWERTY] = KEYMAP( // layer 0 : default + // left hand + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, + CTL_T(KC_ESC),KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, S(KC_9), + ALL_T(KC_NO), KC_F19,KC_LALT,KC_NO, BF_NUMS, + KC_VOLD,KC_VOLU, + KC_MUTE, + KC_SPC,KC_LGUI,KC_LALT, + + // right hand + BF_AFK, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, KC_J, KC_K, KC_L, LT(MOVE, KC_SCLN),KC_QUOT, + S(KC_0), KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, + BF_NUMS,KC_NO, CTL_T(KC_ESC),KC_F19, MEH_T(KC_NO), + KC_MNXT,KC_MPLY, + KC_MPRV, + KC_LALT,KC_BSPC,KC_ENT + ), + + /* Keymap: Number Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | ⌘-` | ` | | | | | | | | | | | - | = | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | 1 | 2 | 3 | 4 | 5 |------| |------| 6 | 7 | 8 | 9 | 0 | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | F11 | F12 | F13 | F14 | F15 | | | | F16 | F17 | F18 | F19 | F20 | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ + [NUMS] = KEYMAP( + // left hand + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + LGUI(KC_GRV),KC_GRV, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, + KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, + KC_TRNS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, 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_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_MINS, KC_EQL, KC_TRNS, + KC_6 , KC_7, KC_8, KC_9, KC_0, KC_TRNS, + KC_TRNS, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_TRNS, + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), + + /* Keymap 2: Movement Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | |VIM W | | | | | | | ⌘ ← | ⌥ ← | ⌥ → | ⌘ → | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | HOME | PGUP | PGDW | END |------| |------| ← | ↓ | ↑ | → | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | |VIM B | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ + [MOVE] = KEYMAP( + // left hand + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,VIM_W, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_HOME,KC_PGUP,KC_PGDOWN,KC_END, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,VIM_B, KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + + // right hand + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, + KC_TRNS,LGUI(KC_LEFT),LALT(KC_LEFT),LALT(KC_RIGHT),LGUI(KC_RIGHT),KC_TRNS,KC_TRNS, + KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS + ), + + /* Keymap: AFK Layer + * All keys wake + */ + [AFK] = KEYMAP( + // left hand + BF_WAKE,BF_WAKE,BF_WAKE,BF_WAKE,BF_WAKE,BF_WAKE,BF_WAKE, + BF_WAKE,BF_WAKE,BF_WAKE,BF_WAKE,BF_WAKE,BF_WAKE,BF_WAKE, + BF_WAKE,BF_WAKE,BF_WAKE,BF_WAKE,BF_WAKE,BF_WAKE, + BF_WAKE,BF_WAKE,BF_WAKE,BF_WAKE,BF_WAKE,BF_WAKE,BF_WAKE, + BF_WAKE,BF_WAKE,BF_WAKE,BF_WAKE,BF_WAKE, + BF_WAKE,BF_WAKE, + BF_WAKE, + BF_WAKE,BF_WAKE,BF_WAKE, + + // right hand + KC_TRNS,BF_WAKE,BF_WAKE,BF_WAKE,BF_WAKE,BF_WAKE,BF_WAKE, + BF_WAKE,BF_WAKE,BF_WAKE,BF_WAKE,BF_WAKE,BF_WAKE,BF_WAKE, + BF_WAKE,BF_WAKE,BF_WAKE,BF_WAKE,BF_WAKE,BF_WAKE, + BF_WAKE,BF_WAKE,BF_WAKE,BF_WAKE,BF_WAKE,BF_WAKE,BF_WAKE, + BF_WAKE,BF_WAKE,BF_WAKE,BF_WAKE,BF_WAKE, + BF_WAKE,BF_WAKE, + BF_WAKE, + BF_WAKE,BF_WAKE,BF_WAKE + ), +}; + +/* + * Led Configuration + */ +extern rgblight_config_t rgblight_config; + +typedef struct { + uint16_t hue :9; + uint8_t sat :8; + uint8_t val :8; + uint8_t mode :6; +} bf_rgb_data; + +bf_rgb_data bf_rgb_config[] = { // color mode + [QWERTY] = { .hue = 274, .sat = 255, .val = 36, .mode = 3 }, // purple breathing + [MOVE] = { .hue = 180, .sat = 255, .val = 75, .mode = 1 }, // teal solid + [NUMS] = { .hue = 120, .sat = 255, .val = 75, .mode = 1 }, // green solid + [AFK] = { .hue = 0, .sat = 255, .val = 150, .mode = 22 }, // red knight +}; + +static inline void bf_set_led(uint8_t layer) { + bf_rgb_data cfg = bf_rgb_config[layer]; + + if (rgblight_config.mode != cfg.mode) { + rgblight_mode(cfg.mode); + } + + rgblight_sethsv(cfg.hue, cfg.sat, cfg.val); +} + +static inline void mod_layer_with_rgb(keyrecord_t *record, uint8_t layer) { + if (record->event.pressed) { + layer_on(layer); + bf_set_led(layer); + } else { + layer_off(layer); + uint8_t currentLayer = biton32(layer_state); + bf_set_led(currentLayer); + }; +}; + +/* + * Custom keycodes + */ +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch(keycode) { + case BF_AFK: + if (record->event.pressed) { + layer_on(AFK); + SEND_STRING(SS_DOWN(X_LCTRL)SS_DOWN(X_LSHIFT)SS_TAP(X_POWER)SS_UP(X_LSHIFT)SS_UP(X_LCTRL)); + } + return false; break; + case BF_WAKE: + if (record->event.pressed) { + layer_off(AFK); + SEND_STRING(" "); + } + return false; break; + case BF_NUMS: + mod_layer_with_rgb(record, NUMS); + return false; break; + case BF_MOVE: + mod_layer_with_rgb(record, MOVE); + return false; break; + } + + return true; +}; + +/* + * Active Routines + */ +void matrix_init_user(void) { + bf_set_led(QWERTY); +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + uint8_t layer = biton32(layer_state); + + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + + switch (layer) { + case NUMS: + ergodox_right_led_2_on(); + break; + case MOVE: + ergodox_right_led_3_on(); + break; + case AFK: + ergodox_right_led_1_on(); + break; + } +}; diff --git a/layouts/community/ergodox/berfarah/readme.md b/layouts/community/ergodox/berfarah/readme.md new file mode 100644 index 0000000000..ccdcb91fbe --- /dev/null +++ b/layouts/community/ergodox/berfarah/readme.md @@ -0,0 +1,93 @@ +# Bernardo's modified version of the OSX defaults + +I map F19 to spotlight so I like having that handy + +## Base + + +``` + ,--------------------------------------------------. ,--------------------------------------------------. + | | | | | | | | | Power| | | | | | | + |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | \ | + |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + |Ctrl/Esc| A | S | D | F | G |------| |------| H | J | K | L |;/MOVE| ' | + |--------+------+------+------+------+------| ( | | ) |------+------+------+------+------+--------| + | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift | + `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + |Hyper | F19 |AltShf| | NUMS | | NUMS | |Ctrl/E| F19 | Meh | + `----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | V- | V+ | | Next |Play/Pau| + ,------|------|------| |------+--------+------. + | | | Vx | | Prev | | | + | Space| LGUI |------| |------| Bsp | Enter| + | | | LAlt | | LAlt | | | + `--------------------' `----------------------' +``` + +## Numbers and Symbols + + +``` +,--------------------------------------------------. ,--------------------------------------------------. +| | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | | +|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| +| ⌘-` | ` | | | | | | | | | | | - | = | | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| | 1 | 2 | 3 | 4 | 5 |------| |------| 6 | 7 | 8 | 9 | 0 | | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| | F11 | F12 | F13 | F14 | F15 | | | | F16 | F17 | F18 | F19 | F20 | | +`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + | | | | | | | | | | | | + `----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | | | | | | + ,------|------|------| |------+------+------. + | | | | | | | | + | | |------| |------| | | + | | | | | | | | + `--------------------' `--------------------' +``` + +## Movement + +``` +,--------------------------------------------------. ,--------------------------------------------------. +| | | | | | | | | | | | | | | | +|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| +| | | ⌥ ← | | | | | | | ⌘ ← | ⌥ ← | ⌥ → | ⌘ → | | | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| | | HOME | PGUP | PGDW | END |------| |------| ← | ↓ | ↑ | → | | | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| | | | | | ⌥ → | | | | | | | | | | +`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + | | | | | | | | | | | | + `----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | | | | | | + ,------|------|------| |------+------+------. + | | | | | | | | + | | |------| |------| | | + | | | | | | | | + `--------------------' `--------------------' +``` + +## Building + +In order to be able to make frequent updates, I maintain this layout [in its own +repository](berfarah:ergodox-layout) + +```sh +git clone https://github.com/qmk/qmk_firmware.git +cd qmk_firmware +git clone https://github.com/berfarah/ergodox-layout.git \ + layouts/community/ergodox/berfarah_master +make ergodox_ez-berfarah_master +``` + +To use this keyboard, run `make ergodox_ez:berfarah` + +## Using on Windows + +The keymap default to forcing NKRO, which seems to upset Windows, and except the modifiers, none of them work. If you experience this problem, recompile the firmware with `FORCE_NKRO=no` added to the `make` command line. diff --git a/layouts/community/ergodox/berfarah/rules.mk b/layouts/community/ergodox/berfarah/rules.mk new file mode 100644 index 0000000000..7153c6ad0f --- /dev/null +++ b/layouts/community/ergodox/berfarah/rules.mk @@ -0,0 +1,18 @@ +BOOTMAGIC_ENABLE = no +COMMAND_ENABLE = no +SLEEP_LED_ENABLE = yes +FORCE_NKRO ?= yes +DEBUG_ENABLE = no +CONSOLE_ENABLE = no +TAP_DANCE_ENABLE = no +MOUSEKEY_ENABLE = no +RGBLIGHT_ENABLE = yes +RGBLIGHT_ANIMATION = yes + +ifeq (${FORCE_NKRO},yes) +OPT_DEFS += -DFORCE_NKRO +endif + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif From 21dfa29c28b8257116b2f1c0b4524c4062658598 Mon Sep 17 00:00:00 2001 From: Gun Pinyo Date: Wed, 25 Oct 2017 02:28:01 +0100 Subject: [PATCH 44/52] Add a layout of planck named GunP, ready for pull request review. --- keyboards/planck/keymaps/gunp/config.h | 42 +++++ keyboards/planck/keymaps/gunp/keymap.c | 175 ++++++++++++++++++ keyboards/planck/keymaps/gunp/readme.md | 18 ++ keyboards/planck/keymaps/gunp/rules.mk | 23 +++ .../planck/keymaps/gunp/upload-and-make.sh | 16 ++ 5 files changed, 274 insertions(+) create mode 100644 keyboards/planck/keymaps/gunp/config.h create mode 100644 keyboards/planck/keymaps/gunp/keymap.c create mode 100644 keyboards/planck/keymaps/gunp/readme.md create mode 100644 keyboards/planck/keymaps/gunp/rules.mk create mode 100755 keyboards/planck/keymaps/gunp/upload-and-make.sh diff --git a/keyboards/planck/keymaps/gunp/config.h b/keyboards/planck/keymaps/gunp/config.h new file mode 100644 index 0000000000..4f99c7eb81 --- /dev/null +++ b/keyboards/planck/keymaps/gunp/config.h @@ -0,0 +1,42 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PLANCK_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +#define MUSIC_MASK (keycode != KC_NO) + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +#endif diff --git a/keyboards/planck/keymaps/gunp/keymap.c b/keyboards/planck/keymaps/gunp/keymap.c new file mode 100644 index 0000000000..9d2fe3eccc --- /dev/null +++ b/keyboards/planck/keymaps/gunp/keymap.c @@ -0,0 +1,175 @@ +/* Copyright 2015-2017 Jack Humbert + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/* modified by Gun Pinyo */ + +#include "planck.h" +#include "action_layer.h" + +extern keymap_config_t keymap_config; + +enum planck_layers { + LY_0000, LY_0001, LY_0010, LY_0011, + LY_0100, LY_0101, LY_0110, LY_0111, + LY_1000, LY_1001, LY_1010, LY_1011, + LY_1100, LY_1101, LY_1110, LY_1111, +}; + +enum planck_keycodes { + FN_A = SAFE_RANGE, + FN_B, + FN_C, + FN_D, + DYNAMIC_MACRO_RANGE, +}; + +#include "dynamic_macro.h" + +#define MFN_R1 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +#define MFN_R2 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +#define MFN_R3 XXXXXXX, FN_A, FN_B, FN_C, XXXXXXX, XXXXXXX +#define MFN_R4 XXXXXXX, KC_LCTL, KC_LSFT, KC_LALT, FN_D, XXXXXXX +#define UNUSED_LAYER {\ + {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MFN_R1},\ + {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MFN_R2},\ + {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MFN_R3},\ + {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MFN_R4}}, +#define MC(kc) LCTL(kc) +#define MA(kc) LALT(kc) +#define MG(kc) LGUI(kc) // ModGui, for i3 shortcuts +#define MSC(kc) LSFT(LCTL(kc)) +#define MSA(kc) LSFT(LALT(kc)) +#define MCA(kc) LCTL(LALT(kc)) +#define XX XXXXXXX + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[LY_0000] = { + {KC_DEL, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_K, KC_TAB}, + {KC_BSPC, 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_M, FN_A, FN_B, FN_C, XX, KC_LSFT}, + {XX,KC_F21,KC_F22,KC_ESC,KC_SPC,KC_F23,KC_F24,KC_LCTL,KC_LSFT,KC_LALT,FN_D,XX} +}, +[LY_1000] = { + {UC(L'∃'), KC_SLSH, KC_RCBR, KC_RPRN, KC_RBRC, KC_GT, MFN_R1}, + {UC(L'∀'), KC_BSLS, KC_LCBR, KC_LPRN, KC_LBRC, KC_LT, MFN_R2}, + {KC_AMPR, KC_PIPE, KC_AT, KC_TILD, KC_DLR, KC_CIRC, MFN_R3}, + {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, MFN_R4}, +}, +[LY_0010] = { + {UC(L'×'), KC_ASTR, KC_QUES, KC_EXLM, KC_GRV, KC_HASH, MFN_R1}, + {UC(L'→'), KC_MINS, KC_COMM, KC_DOT, KC_QUOT, KC_EQL, MFN_R2}, + {UC(L'∘'), KC_PLUS, KC_SCLN, KC_COLN, KC_DQUO, KC_UNDS, MFN_R3}, + {KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, MFN_R4}, +}, +[LY_1010] = { + {UC(L'⊗'), UC(L'⊕'), KC_7, KC_8, KC_9, UC(L'┻'), MFN_R1}, + {UC(L'⊚'), KC_0, KC_1, KC_2, KC_3, UC(L'┃'), MFN_R2}, + {UC(L'┏'), UC(L'┓'), KC_4, KC_5, KC_6, UC(L'┳'), MFN_R3}, + {UC(L'┗'), UC(L'┛'), UC(L'┫'), UC(L'━'), UC(L'┣'), UC(L'╋'), MFN_R4} +}, +[LY_0100] = { + {KC_F13, KC_WSCH, KC_HOME, KC_UP, KC_END, KC_PGUP, MFN_R1}, + {KC_F14, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, MFN_R2}, + {KC_F15, KC_WBAK, KC_WFWD, MC(KC_A), MC(KC_Z), MSC(KC_Z), MFN_R3}, + {KC_F16, MA(KC_LEFT), MC(KC_LEFT), MC(KC_F), MC(KC_RGHT),MA(KC_RGHT), MFN_R4}, +}, +[LY_1100] = { + {KC_F17, MC(KC_WSCH), S(KC_HOME), S(KC_UP), S(KC_END), MC(KC_PGUP), MFN_R1}, + {KC_F18, XXXXXXX, S(KC_LEFT), S(KC_DOWN),S(KC_RGHT), MC(KC_PGDN), MFN_R2}, + {KC_F19, MC(KC_S), MC(KC_X), MC(KC_C), MC(KC_V), MC(KC_L), MFN_R3}, + {KC_F20, MCA(KC_LEFT),MSC(KC_LEFT),MCA(KC_F),MSC(KC_RGHT),MCA(KC_RGHT),MFN_R4}, +}, +[LY_0110] = { + {MC(KC_F1) ,MC(KC_F2) ,MC(KC_F3) ,MC(KC_F4) ,MC(KC_F5) ,MC(KC_F6) , MFN_R1}, + {MC(KC_F7) ,MC(KC_F8) ,MC(KC_F9) ,MC(KC_F10),MC(KC_F11),MC(KC_F12), MFN_R2}, + {MC(KC_F13),MC(KC_F14),MC(KC_F15),MC(KC_F16),MC(KC_F17),MC(KC_F18), MFN_R3}, + {MC(KC_F19),MC(KC_F20),MC(KC_F21),MC(KC_F22),MC(KC_F23),MC(KC_F24), MFN_R4} +}, +[LY_1110] = { + {MG(KC_F1) ,MG(KC_F2) ,MG(KC_F3) ,MG(KC_F4) ,MG(KC_F5) ,MG(KC_F6) , MFN_R1}, + {MG(KC_F7) ,MG(KC_F8) ,MG(KC_F9) ,MG(KC_F10),MG(KC_F11),MG(KC_F12), MFN_R2}, + {MG(KC_F13),MG(KC_F14),MG(KC_F15),MG(KC_F16),MG(KC_F17),MG(KC_F18), MFN_R3}, + {MG(KC_F19),MG(KC_F20),MG(KC_F21),MG(KC_F22),MG(KC_F23),MG(KC_F24), MFN_R4} +}, +[LY_1111] = { + {KC_MPRV, DYN_REC_STOP, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U, MFN_R1}, + {KC_CAPS, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, MFN_R2}, + {KC_MNXT, DYN_MACRO_PLAY2, DYN_MACRO_PLAY1, KC_MPLY, KC_MRWD, KC_MFFD, MFN_R3}, + {KC_MSTP, DYN_REC_START2, DYN_REC_START1, KC_BTN2, KC_BTN1, KC_BTN3, MFN_R4}, +}, +[LY_1101] = { + {XXXXXXX, MU_ON, MU_OFF, PRINT_ON, PRINT_OFF, DEBUG, MFN_R1}, + {XXXXXXX, KC_APP, KC_VOLD, KC_MUTE, KC_VOLU, XXXXXXX, MFN_R2}, + {XXXXXXX, KC_MAIL, S(KC_VOLD), KC_INS, S(KC_VOLU), KC_PSCR, MFN_R3}, + {XXXXXXX, MUV_DE, MUV_IN, AU_ON, AU_OFF, RESET, MFN_R4}, +}, +[LY_0001] = UNUSED_LAYER +[LY_0011] = UNUSED_LAYER +[LY_0101] = UNUSED_LAYER +[LY_0111] = UNUSED_LAYER +[LY_1001] = UNUSED_LAYER +[LY_1011] = UNUSED_LAYER +}; + +#ifdef AUDIO_ENABLE + float plover_song[][2] = SONG(PLOVER_SOUND); + float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); +#endif + +uint16_t cur_layer_code = 0; + +#ifdef AUDIO_ENABLE + +float tone_startup[][2] = SONG(STARTUP_SOUND); +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +float tone_plover[][2] = SONG(PLOVER_SOUND); +float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND); +float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); +float tone_goodbye[][2] = SONG(GOODBYE_SOUND); +#endif + +void startup_user() { + _delay_ms(20); // gets rid of tick + set_unicode_input_mode(UC_LNX); +#ifdef AUDIO_ENABLE + PLAY_SONG(tone_startup); +#endif +} + +void shutdown_user() { +#ifdef AUDIO_ENABLE + PLAY_SONG(tone_goodbye); + _delay_ms(150); + stop_all_notes(); +#endif +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + uint16_t mask = 1 << (3 - (keycode - FN_A)); + if (!process_record_dynamic_macro(keycode, record)) + return false; + if(FN_A <= keycode && keycode <= FN_D) { + if(!(cur_layer_code & mask) == record->event.pressed) { + layer_off(cur_layer_code + LY_0000); + cur_layer_code ^= mask; + layer_on(cur_layer_code + LY_0000); + } + return false; + } + return true; +} diff --git a/keyboards/planck/keymaps/gunp/readme.md b/keyboards/planck/keymaps/gunp/readme.md new file mode 100644 index 0000000000..692bd3578e --- /dev/null +++ b/keyboards/planck/keymaps/gunp/readme.md @@ -0,0 +1,18 @@ +# GunP Planck Layout +## TODO: + - fix the problem between builtin dynamic macros + and my custom layout switching mechanism. + - implement Thai layers. + ``` + {8| Gun Pinyo |8} "with no modifiers or with Shift" {8| Gun Pinyo |8} + {0| Del | Q | W | F | P | G | J | L | U | Y | K | Tab |0} + {0|BkSpc| A | R | S | T | D | H | N | E | I | O |Enter|0} + {0|Shift| Z | X | C | V | B | M |FN_A |FN_B |FN_C |FN_D |Shift|0} + {0| XXX | F21 | F22 | Esc |Space| F23 | F24 | Ctr |Shift| Alt | Gui | XXX |0} + + {8| "with FN_A" |8} {8| "with FN_A, FN_C" |8} {8| "with FN_C" |8} + {0| ∃ / } ) ] > |0} {0| ⊗ ⊕ 7 8 9 ┻ |0} {0| × * ? ! ` # |0} + {0| ∀ \ { ( [ < |0} {0| ⊚ 0 1 2 3 ┃ |0} {0| → - , .\' = |0} + {0| & | @ ~ $ ^ |0} {0| ┏ ┓ 4 5 6 ┳ |0} {0| ∘ + ; :\" _ |0} + {0| F1 ..... F6 |0} {0| ┗ ┛ ┫ ━ ┣ ╋ |0} {0| F7 .... F12 |0} + ``` diff --git a/keyboards/planck/keymaps/gunp/rules.mk b/keyboards/planck/keymaps/gunp/rules.mk new file mode 100644 index 0000000000..1ad30423be --- /dev/null +++ b/keyboards/planck/keymaps/gunp/rules.mk @@ -0,0 +1,23 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = yes # Audio output on port C6 +UNICODE_ENABLE = yes # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/planck/keymaps/gunp/upload-and-make.sh b/keyboards/planck/keymaps/gunp/upload-and-make.sh new file mode 100755 index 0000000000..fd8f34c82d --- /dev/null +++ b/keyboards/planck/keymaps/gunp/upload-and-make.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +pushd ~/git-repos/qmk_firmware/ +rm -rf keyboards/planck/keymaps/gunp/ +cp -rf ~/Documents/qmk-planck/ keyboards/planck/keymaps/gunp/ +if [[ $1 == "dfu" ]]; then + # sudo dfu-programmer atmega32u4 erase --force + # sudo dfu-programmer atmega32u4 flash .build/planck_rev4_gunp.hex + # sudo dfu-programmer atmega32u4 reset + sudo make planck/rev4:gunp:dfu + # bash ~/bin/gunp-kb-layout-reset +else + make planck/rev4:gunp:clean + make planck/rev4:gunp:all +fi +popd From 1f4349592277e6a61e643947665c8b026b7700ed Mon Sep 17 00:00:00 2001 From: Sebastian Kaim Date: Tue, 24 Oct 2017 23:17:47 +0200 Subject: [PATCH 45/52] Added a new keycode for cycling through RBG modes which reverses directions when shift is hold. This commit adds a new keycode `RGB_SMOD` which is the same as `RGB_MOD` (cycle through all modes), but when it is used in combination with shift it will reverse the direction. --- docs/feature_rgblight.md | 1 + quantum/quantum.c | 12 ++++++++++++ quantum/quantum_keycodes.h | 1 + 3 files changed, 14 insertions(+) diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md index 18f2c74e5e..0a5e2a8b15 100644 --- a/docs/feature_rgblight.md +++ b/docs/feature_rgblight.md @@ -88,6 +88,7 @@ These control the RGB Lighting functionality. |-----------|------------|-------------| ||`RGB_TOG`|toggle on/off| ||`RGB_MOD`|cycle through modes| +||`RGB_SMOD`|cycle through modes, use reverse direction when shift is hold| ||`RGB_HUI`|hue increase| ||`RGB_HUD`|hue decrease| ||`RGB_SAI`|saturation increase| diff --git a/quantum/quantum.c b/quantum/quantum.c index a1a1a9d1cb..23873852f5 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -290,6 +290,18 @@ bool process_record_quantum(keyrecord_t *record) { rgblight_step(); } return false; + case RGB_SMOD: + // same as RBG_MOD, but if shift is pressed, it will use the reverese direction instead. + if (record->event.pressed) { + uint8_t shifted = get_mods() & (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)); + if(shifted) { + rgblight_step_reverse(); + } + else { + rgblight_step(); + } + } + return false; case RGB_HUI: if (record->event.pressed) { rgblight_increase_hue(); diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 212fdc67d6..c3c5f16564 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -400,6 +400,7 @@ enum quantum_keycodes { // RGB functionality RGB_TOG, RGB_MOD, + RGB_SMOD, RGB_HUI, RGB_HUD, RGB_SAI, From 9128ed50c2589b93245cd0a09c5dc9cb8fda67cb Mon Sep 17 00:00:00 2001 From: Dylan Khor Date: Tue, 24 Oct 2017 02:14:42 -0400 Subject: [PATCH 46/52] Add macro to sleep Windows 10 --- keyboards/planck/keymaps/khord/keymap.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/keyboards/planck/keymaps/khord/keymap.c b/keyboards/planck/keymaps/khord/keymap.c index c0fd464ad4..c8022a3895 100644 --- a/keyboards/planck/keymaps/khord/keymap.c +++ b/keyboards/planck/keymaps/khord/keymap.c @@ -16,7 +16,8 @@ enum planck_keycodes { RAISE, BACKLIT, ADMIN, - SMSPC1 + SMSPC1, + W10SLP }; // LED backlight breathing @@ -64,7 +65,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+-------------+------+------+------+------+------| * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 | | | End | Home | | + * | | F7 | F8 | F9 | F10 | F11 | F12 | SLP | | End | Home | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' @@ -72,7 +73,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LOWER] = { {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC}, {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, - {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_END, KC_HOME, _______}, + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, W10SLP, _______, KC_END, KC_HOME, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} }, @@ -196,6 +197,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; + case W10SLP: + if (record->event.pressed) { + SEND_STRING(SS_LGUI("x")"us"); + } + return false; + break; } return true; } From 8892c50336fe49fbd3524ed44f2139074dca5ba6 Mon Sep 17 00:00:00 2001 From: heartrobotninja Date: Sat, 21 Oct 2017 21:45:14 -0700 Subject: [PATCH 47/52] Moving LOCK and adding RUN. Fixing equal key to actually use equal keycode. --- keyboards/ergodox_ez/keymaps/heartrobotninja/keymap.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/keyboards/ergodox_ez/keymaps/heartrobotninja/keymap.c b/keyboards/ergodox_ez/keymaps/heartrobotninja/keymap.c index cc0ffba872..f13815256e 100644 --- a/keyboards/ergodox_ez/keymaps/heartrobotninja/keymap.c +++ b/keyboards/ergodox_ez/keymaps/heartrobotninja/keymap.c @@ -69,7 +69,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 0: Colemak Layer * * ,-----------------------------------------------------. ,-----------------------------------------------------. - * | Find | 1 ! | 2 @ | 3 # | 4 $ | 5 % | Undo | | VOLUP| 6 ^ | 7 & | 8 * | 9 ( | 0 ) | ---- | + * | Find | 1 ! | 2 @ | 3 # | 4 $ | 5 % | Undo | | VOLUP| 6 ^ | 7 & | 8 * | 9 ( | 0 ) | LOCK | * | | | | | | | | | | | | | | | | * |-----------+------+------+------+------+------+------| |------+------+------+------+------+------+-----------| * | ' " ` | Q | W | F | P | G | CCopy| | VOLDN| J | L | U Ü | Y | = + | ~ : ; | @@ -78,7 +78,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-----------+------+------+------+------+------| Paste| | MUTE |------+------+------+------+------+-----------| * | - , < | Z | X | C | V | B | | | | K | M | / ? | \ | | ^ | _ . > | * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' - * | AUX | RAISE | LOWER | LEAD | GUI | | ESC | LOCK | < | v | > | + * | AUX | RAISE | LOWER | LEAD | GUI | | ESC | RUN | < | v | > | * `-----------------------------------' `-----------------------------------' * ,-------------. ,-------------. * | ALT | CTRL | | HOME | END | @@ -101,11 +101,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_SPC, KC_BSPC, KC_TAB, // Right Hand - KC_VOLU, KC_6, KC_7, KC_8, KC_9, KC_0, ____, - KC_VOLD, KC_J, KC_L, KC_U, KC_Y, KC_MINS, TD(TD_TDE), + KC_VOLU, KC_6, KC_7, KC_8, KC_9, KC_0, LGUI(KC_L), + KC_VOLD, KC_J, KC_L, KC_U, KC_Y, KC_EQL, TD(TD_TDE), KC_H, KC_N, KC_E, KC_I, KC_O, TD(TD_RPRN), KC_MUTE, KC_K, KC_M, KC_SLSH, KC_BSLS, KC_UP, TD(TD_USC), - KC_ESC, LGUI(KC_L), KC_LEFT, KC_DOWN, KC_RGHT, + KC_ESC, LGUI(KC_R), KC_LEFT, KC_DOWN, KC_RGHT, KC_HOME, KC_END, KC_PGUP, KC_PGDOWN, KC_ENT, OSM(MOD_LSFT)), From 67cc5cebc0430d15169e2c649ea25112a31bfa31 Mon Sep 17 00:00:00 2001 From: skullydazed Date: Tue, 24 Oct 2017 20:34:28 -0700 Subject: [PATCH 48/52] Restructure the hardware and feature docs to make things easier to find (#1888) * fix #1313 by documenting more config.h options * Clean up and organize documentation --- docs/_summary.md | 50 +-- docs/config_options.md | 299 +++++++++++------- docs/contributing.md | 2 +- docs/faq_keymap.md | 11 + ...rtcuts.md => feature_advanced_keycodes.md} | 18 +- ...ic_macros.md => feature_dynamic_macros.md} | 0 docs/{key_lock.md => feature_key_lock.md} | 0 docs/{macros.md => feature_macros.md} | 0 docs/{mouse_keys.md => feature_mouse_keys.md} | 0 ..._cadet_shift.md => feature_space_cadet.md} | 0 docs/{tap_dance.md => feature_tap_dance.md} | 0 docs/{unicode.md => feature_unicode.md} | 0 docs/features.md | 125 ++------ docs/getting_started_make_guide.md | 2 +- docs/glossary.md | 12 +- docs/hardware.md | 8 + docs/hardware_avr.md | 157 +++++++++ docs/hardware_drivers.md | 27 ++ ...qmk.md => hardware_keyboard_guidelines.md} | 34 +- docs/keycodes.md | 36 +-- docs/porting_your_keyboard_to_qmk.md | 63 ---- docs/quantum_keycodes.md | 2 +- docs/redirects.json | 34 +- 23 files changed, 530 insertions(+), 350 deletions(-) rename docs/{feature_common_shortcuts.md => feature_advanced_keycodes.md} (96%) rename docs/{dynamic_macros.md => feature_dynamic_macros.md} (100%) rename docs/{key_lock.md => feature_key_lock.md} (100%) rename docs/{macros.md => feature_macros.md} (100%) rename docs/{mouse_keys.md => feature_mouse_keys.md} (100%) rename docs/{space_cadet_shift.md => feature_space_cadet.md} (100%) rename docs/{tap_dance.md => feature_tap_dance.md} (100%) rename docs/{unicode.md => feature_unicode.md} (100%) create mode 100644 docs/hardware.md create mode 100644 docs/hardware_avr.md create mode 100644 docs/hardware_drivers.md rename docs/{adding_a_keyboard_to_qmk.md => hardware_keyboard_guidelines.md} (54%) delete mode 100644 docs/porting_your_keyboard_to_qmk.md diff --git a/docs/_summary.md b/docs/_summary.md index 55cfd2ab3d..b433181a60 100644 --- a/docs/_summary.md +++ b/docs/_summary.md @@ -12,57 +12,61 @@ * [Debugging/Troubleshooting QMK](faq_debug.md) * [Keymap](faq_keymap.md) +* [Hardware](hardware.md) + * [Keyboard Guidelines](hardware_keyboard_guidelines.md) + * [AVR Processors](hardware_avr.md) + * ARM Processors (TBD) + * [Drivers](hardware_drivers.md) + * [Features](features.md) - * [Layouts](feature_layouts.md) - * [Common Shortcuts](feature_common_shortcuts.md) - * [Userspace](feature_userspace.md) + * [Advanced Keycodes](feature_advanced_keycodes.md) + * [Audio](feature_audio.md) * [Backlight](feature_backlight.md) * [Bootmagic](feature_bootmagic.md) - * [Dynamic Macros](dynamic_macros.md) - * [Key Lock](key_lock.md) + * [Dynamic Macros](feature_dynamic_macros.md) + * [Key Lock](feature_key_lock.md) + * [Layouts](feature_layouts.md) * [Leader Key](feature_leader_key.md) - * [Macros](macros.md) - * [Mouse keys](mouse_keys.md) + * [Macros](feature_macros.md) + * [Mouse keys](feature_mouse_keys.md) * [Pointing Device](feature_pointing_device.md) * [PS2 Mouse](feature_ps2_mouse.md) - * [Space Cadet](space_cadet_shift.md) - * [Tap Dance](tap_dance.md) - * [Audio](feature_audio.md) - * [Thermal Printer](feature_thermal_printer.md) - * [Stenography](stenography.md) - * [Unicode](unicode.md) + * [Space Cadet](feature_space_cadet.md) + * [Stenography](feature_stenography.md) + * [Tap Dance](feature_tap_dance.md) * [Terminal](feature_terminal.md) + * [Thermal Printer](feature_thermal_printer.md) + * [Unicode](feature_unicode.md) + * [Userspace](feature_userspace.md) * Reference + * [Config Options](config_options.md) + * [Customizing Functionality](custom_quantum_functions.md) + * [Documentation Best Practices](documentation_best_practices.md) + * [Documentation Templates](documentation_templates.md) * [Glossary](glossary.md) * [Keymap overview](keymap.md) * [Keycodes](keycodes.md) - * [Basic](keycodes_basic.md) - * [Quantum](quantum_keycodes.md) * [Backlight](feature_backlight.md#backlight-keycodes) + * [Basic](keycodes_basic.md) * [Bluetooth](feature_bluetooth.md#bluetooth-keycodes) * [Bootmagic](feature_bootmagic.md#bootmagic-keycodes) * [Layer Switching](feature_common_shortcuts.md#switching-and-toggling-layers) * [Mod+Key](feature_common_shortcuts.md#modifier-keys) * [Mod Tap](feature_common_shortcuts.md#mod-tap) * [One Shot Keys](feature_common_shortcuts.md#one-shot-keys) - * [Shifted Keys](feature_common_shortcuts.md#shifted-keycodes) - * [Stenography](stenography.md#keycode-reference) + * [Quantum](quantum_keycodes.md) * [RGB Light](feature_rgblight.md#rgblight-keycodes) + * [Shifted Keys](feature_common_shortcuts.md#shifted-keycodes) + * [Stenography](feature_stenography.md#keycode-reference) * [Thermal Printer](feature_thermal_printer.md#thermal-printer-keycodes) * [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md) - * [The `config.h` File](config_options.md) - * [Customizing Functionality](custom_quantum_functions.md) - * [Documentation Best Practices](documentation_best_practices.md) - * [Documentation Templates](documentation_templates.md) * [Unit Testing](unit_testing.md) * For Makers and Modders - * [Adding a keyboard to QMK](adding_a_keyboard_to_qmk.md) * [Hand Wiring Guide](hand_wiring.md) * [ISP flashing guide](isp_flashing_guide.md) * [Modding your keyboard](modding_your_keyboard.md) - * [Porting your keyboard to QMK](porting_your_keyboard_to_qmk.md) * For a Deeper Understanding * [How Keyboards Work](how_keyboards_work.md) diff --git a/docs/config_options.md b/docs/config_options.md index b71dbb8ae9..de67630adc 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -1,129 +1,198 @@ -# The `config.h` file - -This is a c header file that is one of the first things included, and will persist over the whole project (if included). Lots of variables can be set here and accessed elsewhere (namely keymaps). This file can exist at a couple different levels: - -## Keyboard +# Configuring QMK -```c -#ifndef CONFIG_H -#define CONFIG_H +QMK is nearly infinitely configurable. Wherever possible we err on the side of allowing users to customize their keyboard, even at the expense of code size. That level of flexibility makes for a daunting configuration experience, however. -#include "config_common.h" +There are two main types of configuration files in QMK- `config.h` and `rules.mk`. These files exist at various levels in QMK and all files of the same type are combined to build the final configuration. The levels, from lowest priority to highest priority, are: -// config options +* QMK Default +* Keyboard +* Folders (Up to 5 levels deep) +* Keymap -#endif -``` +## QMK Default -This file contains config options that should apply to the whole keyboard, and won't change in revisions, or most keymaps. The revision block here only applies to keyboards with revisions. +Every available setting in QMK has a default. If that setting is not set at the Keyboard, Folder, or Keymap level this is the setting that will be used. -## Revisions - -```c -#ifndef _CONFIG_H -#define _CONFIG_H - -#include "config_common.h" +## Keyboard -// config options +This level contains config options that should apply to the whole keyboard. Some settings won't change in revisions, or most keymaps. Other settings are merely defaults for this keyboard and can be overridden by folders and/or keymaps. -#endif -``` +## Folders -For keyboards that have revisions, this file contains config options that should apply to only that revisions, and won't change in most keymaps. +Some keyboards have folders and sub-folders to allow for different hardware configurations. Most keyboards only go 1 folder deep, but QMK supports structures up to 5 folders deep. Each folder can have its own `config.h` and `rules.mk` files that are incorporated into the final configuration. ## Keymap -```c -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "config_common.h" - -// config options - -#endif -``` - -This file contains all of the options for that particular keymap. If you wish to override a previous declaration, you can use `#undef ` to undefine it, where you can then redefine it without an error. - -# Config Options - -```c -#define VENDOR_ID 0x1234 // defines your VID, and for most DIY projects, can be whatever you want -#define PRODUCT_ID 0x5678 // defines your PID, and for most DIY projects, can be whatever you want -#define DEVICE_VER 0 // defines the device version (often used for revisions) - -#define MANUFACTURER Me // generally who/whatever brand produced the board -#define PRODUCT Board // the name of the keyboard -#define DESCRIPTION a keyboard // a short description of what the keyboard is - -#define MATRIX_ROWS 5 // the number of rows in your keyboard's matrix -#define MATRIX_COLS 15 // the number of columns in your keyboard's matrix - -#define MATRIX_ROW_PINS { D0, D5, B5, B6 } // pins of the rows, from top to bottom -#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 } // pins of the columns, from left to right -#define UNUSED_PINS { D1, D2, D3, B1, B2, B3 } // pins unused by the keyboard for reference -#define MATRIX_HAS_GHOST // define is matrix has ghost (unlikely) -#define DIODE_DIRECTION COL2ROW // COL2ROW or ROW2COL - how your matrix is configured -// COL2ROW means the black mark on your diode is facing to the rows, and between the switch and the rows +This level contains all of the options for that particular keymap. If you wish to override a previous declaration, you can use `#undef ` to undefine it, where you can then redefine it without an error. -#define AUDIO_VOICES // turns on the alternate audio voices (to cycle through) -#define C6_AUDIO // enables audio on pin C6 -#define B5_AUDIO // enables audio on pin B5 (duophony is enable if both are enabled) - -#define BACKLIGHT_PIN B7 // pin of the backlight - B5, B6, B7 use PWM, others use softPWM -#define BACKLIGHT_LEVELS 3 // number of levels your backlight will have (not including off) - -#define DEBOUNCING_DELAY 5 // the delay when reading the value of the pin (5 is default) - -#define LOCKING_SUPPORT_ENABLE // mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap -#define LOCKING_RESYNC_ENABLE // tries to keep switch state consistent with keyboard LED state - -#define IS_COMMAND() ( \ // key combination that allows the use of magic commands (useful for debugging) - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - -// the following options can save on file size at the expense of that feature -#define NO_DEBUG // disable debuging (saves on file size) -#define NO_PRINT // disable printing (saves of file size) -#define NO_ACTION_LAYER // no layers -#define NO_ACTION_TAPPING // no tapping for layers/mods -#define NO_ACTION_ONESHOT // no oneshot for layers/mods -#define NO_ACTION_MACRO // no macros -#define NO_ACTION_FUNCTION // no functions - -#define FORCE_NKRO // NKRO by default requires to be turned on, this forces it to be on always - -#define PREVENT_STUCK_MODIFIERS // when switching layers, this will release all mods - -#define TAPPING_TERM 200 // how long before a tap becomes a hold -#define TAPPING_TOGGLE 2 // how many taps before triggering the toggle - -#define PERMISSIVE_HOLD // makes tap and hold keys work better for fast typers who don't want tapping term set above 500 - -#define LEADER_TIMEOUT 300 // how long before the leader key times out - -#define ONESHOT_TIMEOUT 300 // how long before oneshot times out -#define ONESHOT_TAP_TOGGLE 2 // how many taps before oneshot toggle is triggered - -#define IGNORE_MOD_TAP_INTERRUPT // makes it possible to do rolling combos (zx) with keys that convert to other keys on hold - -// ws2812 options -#define RGB_DI_PIN D7 // pin the DI on the ws2812 is hooked-up to -#define RGBLIGHT_ANIMATIONS // run RGB animations -#define RGBLED_NUM 15 // number of LEDs -#define RGBLIGHT_HUE_STEP 12 // units to step when in/decreasing hue -#define RGBLIGHT_SAT_STEP 25 // units to step when in/decresing saturation -#define RGBLIGHT_VAL_STEP 12 // units to step when in/decreasing value (brightness) - -#define RGBW_BB_TWI // bit-bangs twi to EZ RGBW LEDs (only required for Ergodox EZ) - -// mousekey options (self-describing) -#define MOUSEKEY_INTERVAL 20 -#define MOUSEKEY_DELAY 0 -#define MOUSEKEY_TIME_TO_MAX 60 -#define MOUSEKEY_MAX_SPEED 7 -#define MOUSEKEY_WHEEL_DELAY 0 +# The `config.h` file -``` \ No newline at end of file +This is a C header file that is one of the first things included, and will persist over the whole project (if included). Lots of variables can be set here and accessed elsewhere. + +## `config.h` Options + +### Hardware Options +* `#define VENDOR_ID 0x1234` + * defines your VID, and for most DIY projects, can be whatever you want +* `#define PRODUCT_ID 0x5678` + * defines your PID, and for most DIY projects, can be whatever you want +* `#define DEVICE_VER 0` + * defines the device version (often used for revisions) +* `#define MANUFACTURER Me` + * generally who/whatever brand produced the board +* `#define PRODUCT Board` + * the name of the keyboard +* `#define DESCRIPTION a keyboard` + * a short description of what the keyboard is +* `#define MATRIX_ROWS 5` + * the number of rows in your keyboard's matrix +* `#define MATRIX_COLS 15` + * the number of columns in your keyboard's matrix +* `#define MATRIX_ROW_PINS { D0, D5, B5, B6 }` + * pins of the rows, from top to bottom +* `#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 }` + * pins of the columns, from left to right +* `#define UNUSED_PINS { D1, D2, D3, B1, B2, B3 }` + * pins unused by the keyboard for reference +* `#define MATRIX_HAS_GHOST` + * define is matrix has ghost (unlikely) +* `#define DIODE_DIRECTION COL2ROW` + * COL2ROW or ROW2COL - how your matrix is configured. COL2ROW means the black mark on your diode is facing to the rows, and between the switch and the rows. +* `#define AUDIO_VOICES` + * turns on the alternate audio voices (to cycle through) +* `#define C6_AUDIO` + * enables audio on pin C6 +* `#define B5_AUDIO` + * enables audio on pin B5 (duophony is enable if both are enabled) +* `#define BACKLIGHT_PIN B7` + * pin of the backlight - B5, B6, B7 use PWM, others use softPWM +* `#define BACKLIGHT_LEVELS 3` + * number of levels your backlight will have (not including off) +* `#define DEBOUNCING_DELAY 5` + * the delay when reading the value of the pin (5 is default) +* `#define LOCKING_SUPPORT_ENABLE` + * mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap +* `#define LOCKING_RESYNC_ENABLE` + * tries to keep switch state consistent with keyboard LED state +* `#define IS_COMMAND() ( keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) )` + * key combination that allows the use of magic commands (useful for debugging) + +### Features That Can Be Disabled + +If you define these options you will disable the associated feature, which can save on code size. + +* `#define NO_DEBUG` + * disable debuging +* `#define NO_PRINT` + * disable printing/debugging using hid_listen +* `#define NO_ACTION_LAYER` + * disable layers +* `#define NO_ACTION_TAPPING` + * disable tap dance and other tapping features +* `#define NO_ACTION_ONESHOT` + * disable one-shot modifiers +* `#define NO_ACTION_MACRO` + * disable all macro handling +* `#define NO_ACTION_FUNCTION` + * disable the action function (deprecated) + +### Features That Can Be Enabled + +If you define these options you will enable the associated feature, which may increase your code size. + +* `#define FORCE_NKRO` + * NKRO by default requires to be turned on, this forces it on during keyboard startup regardless of eeprom setting. NKRO can still be turned off but will be turned on again if the keyboard reboots. +* `#define PREVENT_STUCK_MODIFIERS` + * when switching layers, this will release all mods + +### Behaviors That Can Be Configured + +* `#define TAPPING_TERM 200` + * how long before a tap becomes a hold +* `#define TAPPING_TOGGLE 2` + * how many taps before triggering the toggle +* `#define PERMISSIVE_HOLD` + * makes tap and hold keys work better for fast typers who don't want tapping term set above 500 +* `#define LEADER_TIMEOUT 300` + * how long before the leader key times out +* `#define ONESHOT_TIMEOUT 300` + * how long before oneshot times out +* `#define ONESHOT_TAP_TOGGLE 2` + * how many taps before oneshot toggle is triggered +* `#define IGNORE_MOD_TAP_INTERRUPT` + * makes it possible to do rolling combos (zx) with keys that convert to other keys on hold + +### RGB Light Configuration + +* `#define RGB_DI_PIN D7` + * pin the DI on the ws2812 is hooked-up to +* `#define RGBLIGHT_ANIMATIONS` + * run RGB animations +* `#define RGBLED_NUM 15` + * number of LEDs +* `#define RGBLIGHT_HUE_STEP 12` + * units to step when in/decreasing hue +* `#define RGBLIGHT_SAT_STEP 25` + * units to step when in/decresing saturation +* `#define RGBLIGHT_VAL_STEP 12` + * units to step when in/decreasing value (brightness) +* `#define RGBW_BB_TWI` + * bit-bangs twi to EZ RGBW LEDs (only required for Ergodox EZ) + +### Mouse Key Options + +* `#define MOUSEKEY_INTERVAL 20` +* `#define MOUSEKEY_DELAY 0` +* `#define MOUSEKEY_TIME_TO_MAX 60` +* `#define MOUSEKEY_MAX_SPEED 7` +* `#define MOUSEKEY_WHEEL_DELAY 0` + +# The `rules.mk` File + +This is a [make](https://www.gnu.org/software/make/manual/make.html) file that is included by the top-level `Makefile`. It is used to set some information about the MCU that we will be compiling for as well as enabling and disabling certain features. + +## `rules.mk` options + +### Build Options + +* `DEFAULT_FOLDER` + * Used to specify a default folder when a keyboard has more than one sub-folder. +* `SRC` + * Used to add files to the compilation/linking list. +* `LAYOUTS` + * A list of [layouts](feature_layouts.md) this keyboard supports. + +### AVR MCU Options +* `MCU = atmega32u4` +* `F_CPU = 16000000` +* `ARCH = AVR8` +* `F_USB = $(F_CPU)` +* `OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT` +* `OPT_DEFS += -DBOOTLOADER_SIZE=4096` + +### Feature Options + +Use these to enable or disable building certain features. The more you have enabled the bigger your firmware will be, and you run the risk of building a firmware too large for your MCU. + +* `BOOTMAGIC_ENABLE` + * Virtual DIP switch configuration(+1000) +* `MOUSEKEY_ENABLE` + * Mouse keys(+4700) +* `EXTRAKEY_ENABLE` + * Audio control and System control(+450) +* `CONSOLE_ENABLE` + * Console for debug(+400) +* `COMMAND_ENABLE` + * Commands for debug and configuration +* `NKRO_ENABLE` + * USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +* `AUDIO_ENABLE` + * Enable the audio subsystem. +* `RGBLIGHT_ENABLE` + * Enable keyboard underlight functionality +* `MIDI_ENABLE` + * MIDI controls +* `UNICODE_ENABLE` + * Unicode +* `BLUETOOTH_ENABLE` + * Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/docs/contributing.md b/docs/contributing.md index 58af8ce53b..4acbdc1f03 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -144,4 +144,4 @@ To maintain a clear vision of how things are laid out in QMK we try to plan out # What does the Code of Conduct mean for me? -Our Code of Conduct means that you are responsible for treating everyone on the project with respect and courtesy regardless of their identity. If you are the victim of any inappropriate behavior or comments as described in our Code of Conduct, we are here for you and will do the best to ensure that the abuser is reprimanded appropriately, per our code. +Our [Code of Conduct](https://github.com/qmk/qmk_firmware/blob/master/CODE_OF_CONDUCT.md) means that you are responsible for treating everyone on the project with respect and courtesy regardless of their identity. If you are the victim of any inappropriate behavior or comments as described in our Code of Conduct, we are here for you and will do the best to ensure that the abuser is reprimanded appropriately, per our code. diff --git a/docs/faq_keymap.md b/docs/faq_keymap.md index eb49a36996..83eeb235ef 100644 --- a/docs/faq_keymap.md +++ b/docs/faq_keymap.md @@ -7,6 +7,17 @@ See [Keycodes](keycodes.md) for an index of keycodes available to you. These lin Keycodes are actually defined in [common/keycode.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/keycode.h). +## What Are The Default Keycodes? + +There are 3 standard keyboard layouts in use around the world- ANSI, ISO, and JIS. North America primarily uses ANSI, Europe and Africa primarily use ISO, and Japan uses JIS. Regions not mentioned typically use either ANSI or ISO. The keycodes corresponding to these layouts are shown here: + + +![Keyboard Layout Image](https://i.imgur.com/45m4mRf.png) + +## The Menu Key Isn't Working + +The key found on most modern keyboards that is located between `KC_RGUI` and `KC_RCTL` is actually called `KC_APP`. This is because when that key was invented there was already a key named `MENU` in the relevant standards, so MS chose to call that the `APP` key. + ## `KC_SYSREQ` isn't working Use keycode for Print Screen(`KC_PSCREEN` or `KC_PSCR`) instead of `KC_SYSREQ`. Key combination of 'Alt + Print Screen' is recognized as 'System request'. diff --git a/docs/feature_common_shortcuts.md b/docs/feature_advanced_keycodes.md similarity index 96% rename from docs/feature_common_shortcuts.md rename to docs/feature_advanced_keycodes.md index e942b26c8b..95a20340e4 100644 --- a/docs/feature_common_shortcuts.md +++ b/docs/feature_advanced_keycodes.md @@ -1,6 +1,8 @@ -# Common Keymap Shortcuts +# Advanced Keycodes -Your keymap can include shortcuts to common operations, for example shifted keys. This page documents the functions that are available to you. +Your keymap can include keycodes that are more advanced than normal, for example shifted keys. This page documents the functions that are available to you. + +### Assigning Custom Names People often define custom names using `#define`. For example: @@ -15,7 +17,7 @@ This will allow you to use `FN_CAPS` and `ALT_TAB` in your `KEYMAP()`, keeping i Currently, the keycodes able to used with these functions are limited to the [Basic Keycodes](keycodes_basic.html), meaning you can't use keycodes like `KC_TILD`, or anything greater than 0xFF. For a full list of the keycodes able to be used see [Basic Keycodes](keycodes_basic.html). -## Switching and toggling layers +# Switching and toggling layers These functions allow you to activate layers in various ways. @@ -25,7 +27,7 @@ These functions allow you to activate layers in various ways. * `TO(layer)` - Goes to a layer. This code is special, because it lets you go either up or down the stack -- just goes directly to the layer you want. So while other codes only let you go _up_ the stack (from layer 0 to layer 3, for example), `TO(2)` is going to get you to layer 2, no matter where you activate it from -- even if you're currently on layer 5. This gets activated on keydown (as soon as the key is pressed). * `TT(layer)` - Layer Tap-Toggle. If you hold the key down, the layer becomes active, and then deactivates when you let go. And if you tap it, the layer simply becomes active (toggles on). It needs 5 taps by default, but you can set it by defining `TAPPING_TOGGLE`, for example, `#define TAPPING_TOGGLE 2` for just two taps. -## Working With Layers +# Working With Layers Care must be taken when switching layers, it's possible to lock yourself into a layer with no way to deactivate that layer (without unplugging your keyboard.) We've created some guidelines to help users avoid the most common problems. @@ -47,7 +49,7 @@ Once you have a good feel for how layers work and what you can do, you can get m Layers stack on top of each other in numerical order. When determining what a keypress does, QMK scans the layers from the top down, stopping when it reaches the first active layer that is not set to `KC_TRNS`. As a result if you activate a layer that is numerically lower than your current layer, and your current layer (or another layer that is active and higher than your target layer) has something other than `KC_TRNS`, that is the key that will be sent, not the key on the layer you just activated. This is the cause of most people's "why doesn't my layer get switched" problem. -## Modifier keys +# Modifier keys These functions allow you to combine a mod with a keycode. When pressed the keydown for the mod will be sent first, and then *kc* will be sent. When released the keyup for *kc* will be sent and then the mod will be sent. @@ -67,7 +69,7 @@ You can also chain these, like this: LALT(LCTL(KC_DEL)) -- this makes a key that sends Alt, Control, and Delete in a single keypress. -## Shifted Keycodes +# Shifted Keycodes The following shortcuts automatically add `LSFT()` to keycodes to get commonly used symbols. @@ -95,7 +97,7 @@ The following shortcuts automatically add `LSFT()` to keycodes to get commonly u | KC_PIPE | | | | KC_COLN | : | -## Mod Tap +# Mod Tap `MT(mod, kc)` - is *mod* (modifier key - MOD_LCTL, MOD_LSFT) when held, and *kc* when tapped. In other words, you can have a key that sends Esc (or the letter O or whatever) when you tap it, but works as a Control key or a Shift key when you hold it down. @@ -125,7 +127,7 @@ We've added shortcuts to make common modifier/tap (mod-tap) mappings more compac * `LCAG_T(kc)` - is CtrlAltGui when held and *kc* when tapped * `MEH_T(kc)` - is like Hyper, but not as cool -- does not include the Cmd/Win key, so just sends Alt+Ctrl+Shift. -## One Shot Keys +# One Shot Keys One shot keys are keys that remain active until the next key is pressed, and then are releasd. This allows you to type keyboard combinations without pressing more than one key at a time. diff --git a/docs/dynamic_macros.md b/docs/feature_dynamic_macros.md similarity index 100% rename from docs/dynamic_macros.md rename to docs/feature_dynamic_macros.md diff --git a/docs/key_lock.md b/docs/feature_key_lock.md similarity index 100% rename from docs/key_lock.md rename to docs/feature_key_lock.md diff --git a/docs/macros.md b/docs/feature_macros.md similarity index 100% rename from docs/macros.md rename to docs/feature_macros.md diff --git a/docs/mouse_keys.md b/docs/feature_mouse_keys.md similarity index 100% rename from docs/mouse_keys.md rename to docs/feature_mouse_keys.md diff --git a/docs/space_cadet_shift.md b/docs/feature_space_cadet.md similarity index 100% rename from docs/space_cadet_shift.md rename to docs/feature_space_cadet.md diff --git a/docs/tap_dance.md b/docs/feature_tap_dance.md similarity index 100% rename from docs/tap_dance.md rename to docs/feature_tap_dance.md diff --git a/docs/unicode.md b/docs/feature_unicode.md similarity index 100% rename from docs/unicode.md rename to docs/feature_unicode.md diff --git a/docs/features.md b/docs/features.md index 2ef4361563..afffead499 100644 --- a/docs/features.md +++ b/docs/features.md @@ -1,105 +1,24 @@ # QMK Features - -## Space Cadet Shift: The future, built in - -Steve Losh [described](http://stevelosh.com/blog/2012/10/a-modern-space-cadet/) the Space Cadet Shift quite well. Essentially, you hit the left Shift on its own, and you get an opening parenthesis; hit the right Shift on its own, and you get the closing one. When hit with other keys, the Shift key keeps working as it always does. Yes, it's as cool as it sounds. Head on over to the [Space Cadet Shift](space_cadet_shift.md) page to read about it. - -## The Leader key: A new kind of modifier - -Most modifiers have to be held or toggled. But what if you had a key that indicated the start of a sequence? You could press that key and then rapidly press 1-3 more keys to trigger a macro, or enter a special layer, or anything else you might want to do. To learn more about it check out the [Leader Key](feature_leader_key.md) page. - -## Tap Dance: A single key can do 3, 5, or 100 different things - -Hit the semicolon key once, send a semicolon. Hit it twice, rapidly -- send a colon. Hit it three times, and your keyboard's LEDs do a wild dance. That's just one example of what Tap Dance can do. Read more about it on the [Tap Dance](tap_dance.md) page. - -## Temporarily setting the default layer - -`DF(layer)` - sets default layer to _layer_. The default layer is the one at the "bottom" of the layer stack - the ultimate fallback layer. This currently does not persist over power loss. When you plug the keyboard back in, layer 0 will always be the default. It is theoretically possible to work around that, but that's not what `DF` does. - -## Macro shortcuts: Send a whole string when pressing just one key - -How would you like a single keypress to send a whole word, sentence, paragraph, or even document? Head on over to the [Macros](macros.md) page to read up on all aspects of Simple and Dynamic Macros. - -## Additional keycode aliases for software-implemented layouts \(Colemak, Dvorak, etc\) - -Everything is assuming you're in Qwerty \(in software\) by default, but there is built-in support for using a Colemak or Dvorak layout by including this at the top of your keymap: - -``` -#include -``` - -If you use Dvorak, use `keymap_dvorak.h` instead of `keymap_colemak.h` for this line. After including this line, you will get access to: - -* `CM_*` for all of the Colemak-equivalent characters -* `DV_*` for all of the Dvorak-equivalent characters - -These implementations assume you're using Colemak or Dvorak on your OS, not on your keyboard - this is referred to as a software-implemented layout. If your computer is in Qwerty and your keymap is in Colemak or Dvorak, this is referred to as a firmware-implemented layout, and you won't need these features. - -To give an example, if you're using software-implemented Colemak, and want to get an `F`, you would use `CM_F`. Using `KC_F` under these same circumstances would result in `T`. - -## Backlight Breathing - -In order to enable backlight breathing, the following line must be added to your config.h file. - -``` -#define BACKLIGHT_BREATHING -``` - -The following function calls are used to control the breathing effect. - -* `breathing_enable()` - Enable the free-running breathing effect. -* `breathing_disable()` - Disable the free-running breathing effect immediately. -* `breathing_self_disable()` - Disable the free-running breathing effect after the current effect ends. -* `breathing_toggle()` - Toggle the free-running breathing effect. -* `breathing_defaults()` - Reset the speed and brightness settings of the breathing effect. - -The following function calls are used to control the maximum brightness of the breathing effect. - -* `breathing_intensity_set(value)` - Set the brightness of the breathing effect when it is at its max value. -* `breathing_intensity_default()` - Reset the brightness of the breathing effect to the default value based on the current backlight intensity. - -The following function calls are used to control the cycling speed of the breathing effect. - -* `breathing_speed_set(value)` - Set the speed of the breathing effect - how fast it cycles. -* `breathing_speed_inc(value)` - Increase the speed of the breathing effect by a fixed value. -* `breathing_speed_dec(value)` - Decrease the speed of the breathing effect by a fixed value. -* `breathing_speed_default()` - Reset the speed of the breathing effect to the default value. - -The following example shows how to enable the backlight breathing effect when the FUNCTION layer macro button is pressed: - -``` -case MACRO_FUNCTION: - if (record->event.pressed) - { - breathing_speed_set(3); - breathing_enable(); - layer_on(LAYER_FUNCTION); - } - else - { - breathing_speed_set(1); - breathing_self_disable(); - layer_off(LAYER_FUNCTION); - } - break; -``` - -The following example shows how to pulse the backlight on-off-on when the RAISED layer macro button is pressed: - -``` -case MACRO_RAISED: - if (record->event.pressed) - { - layer_on(LAYER_RAISED); - breathing_speed_set(2); - breathing_pulse(); - update_tri_layer(LAYER_LOWER, LAYER_RAISED, LAYER_ADJUST); - } - else - { - layer_off(LAYER_RAISED); - update_tri_layer(LAYER_LOWER, LAYER_RAISED, LAYER_ADJUST); - } - break; -``` \ No newline at end of file +QMK has a staggering number of features for building your keyboard. It can take some time to understand all of them and determine which one will acheive your goal. + + +* [Advanced Keycodes](feature_advanced_keycodes.md) - Change layers, type shifted keys, and more. Go beyond typing simple characters. +* [Audio](feature_audio.md) - Connect a speaker to your keyboard for audio feedback, midi support, and music mode. +* [Backlight](feature_backlight.md) - LED lighting support for your keyboard +* [Bootmagic](feature_bootmagic.md) - Adjust the behavior of your keyboard using hotkeys +* [Dynamic Macros](feature_dynamic_macros.md) - Record and playback macros from the keyboard itself. +* [Key Lock](feature_key_lock.md) - Lock a key in the "down" state. +* [Layouts](feature_layouts.md) - Use one keymap with any keyboard that supports your layout. +* [Leader Key](feature_leader_key.md) - Tap the leader key followed by a sequence to trigger custom behavior. +* [Macros](feature_macros.md) - Send multiple key presses when pressing only one physical key +* [Mouse keys](feature_mouse_keys.md) - Control your mouse pointer from your keyboard +* [Pointing Device](feature_pointing_device.md) - Framework for connecting your custom pointing device to your keyboard. +* [PS2 Mouse](feature_ps2_mouse.md) - Driver for connecting a ps2 mouse directly to your keyboard. +* [Space Cadet](feature_space_cadet_shift.md) - Use your left/right shift keys to type parenthesis and brackets. +* [Stenography](feature_stenography.md) - Put your keyboard into Plover mode for stenography use. +* [Tap Dance](feature_tap_dance.md) - Make a single key do as many things as you want +* [Terminal](feature_terminal.md) - CLI interface to the internals of your keyboard +* [Thermal Printer](feature_thermal_printer.md) - Connect a thermal printer to your keyboard to be able to toggle on a printed log of everything you type. +* [Unicode](feature_unicode.md) - Unicode input support. +* [Userspace](feature_userspace.md) - Share code between different keymaps and keyboards diff --git a/docs/getting_started_make_guide.md b/docs/getting_started_make_guide.md index b6f0f4ee27..29560b8461 100644 --- a/docs/getting_started_make_guide.md +++ b/docs/getting_started_make_guide.md @@ -131,7 +131,7 @@ This consumes about 5390 bytes. `KEY_LOCK_ENABLE` -This enables [key lock](key_lock.md). This consumes an additional 260 bytes. +This enables [key lock](feature_key_lock.md). This consumes an additional 260 bytes. ## Customizing Makefile options on a per-keymap basis diff --git a/docs/glossary.md b/docs/glossary.md index e1103ec94a..67820c7b22 100644 --- a/docs/glossary.md +++ b/docs/glossary.md @@ -36,7 +36,7 @@ An alternative keyboard layout developed by Dr. August Dvorak in the 1930's. A s ## Dynamic Macro A macro which has been recorded on the keyboard and which will be lost when the keyboard is unplugged or the computer rebooted. -* [Dynamic Macro Documentation](dynamic_macros.html) +* [Dynamic Macro Documentation](feature_dynamic_macros.md) ## Eclipse An IDE that is popular with many C developers. @@ -93,7 +93,7 @@ A wiring pattern of columns and rows that enables the MCU to detect keypresses w ## Macro A feature that lets you send muiltple keypress events (hid reports) after having pressed only a single key. -* [Macro Documentation](macros.html) +* [Macro Documentation](feature_macros.md) ## MCU Microcontrol Unit, the processor that powers your keyboard. @@ -104,7 +104,7 @@ A key that is held down while typing another key to modify the action of that ke ## Mousekeys A feature that lets you control your mouse cursor and click from your keyboard. -* [Mousekeys Documentation](mouse_keys.html) +* [Mousekeys Documentation](feature_mouse_keys.html) ## N-Key Rollover (NKRO) A term that applies to keyboards that are capable of reporting any number of key-presses at once. @@ -133,7 +133,7 @@ A 1 byte number that is sent as part of a HID report over USB that represents a ## Space Cadet Shift A special set of shift keys which allow you to type various types of braces by tapping the left or right shift one or more times. -* [Space Cadet Shift Documentation](space_cadet_shift.html) +* [Space Cadet Shift Documentation](feature_space_cadet.html) ## Tap Pressing and releasing a key. In some situations you will need to distinguish between a key down and a key up event, and Tap always refers to both at once. @@ -141,7 +141,7 @@ Pressing and releasing a key. In some situations you will need to distinguish be ## Tap Dance A feature that lets you assign muiltple keycodes to the same key based on how many times you press it. -* [Tap Dance Documentation](tap_dance.md) +* [Tap Dance Documentation](feature_tap_dance.md) ## Teensy A low-cost AVR development board that is commonly used for hand-wired builds. A teensy is often chosen despite costing a few dollors more due to its halfkay bootloader, which makes flashing very simple. @@ -152,7 +152,7 @@ A generic term for LEDs that light the underside of the board. These LED's typic ## Unicode In the larger computer world Unicode is a set of encoding schemes for representing characters in any language. As it relates to QMK it means using various OS schemes to send unicode codepoints instead of scancodes. -* [Unicode Documentation](unicode.md) +* [Unicode Documentation](feature_unicode.md) ## Unit Testing A framework for running automated tests against QMK. Unit testing helps us be confident that our changes do not break anything. diff --git a/docs/hardware.md b/docs/hardware.md new file mode 100644 index 0000000000..cce89c1151 --- /dev/null +++ b/docs/hardware.md @@ -0,0 +1,8 @@ +# Hardware + +QMK runs on a variety of hardware. If your processor can be targetted by [LUFA](http://www.fourwalledcubicle.com/LUFA.php) or [ChibiOS](http://www.chibios.com) you can probably get QMK running on it. This section explores getting QMK running on, and communicating with, hardware of all kinds. + +* [Keyboard Guidelines](hardware_keyboard_guidelines.md) +* [AVR Processors](hardware_avr.md) +* ARM Processors (TBD) +* [Drivers](hardware_drivers.md) diff --git a/docs/hardware_avr.md b/docs/hardware_avr.md new file mode 100644 index 0000000000..23589e4bf7 --- /dev/null +++ b/docs/hardware_avr.md @@ -0,0 +1,157 @@ +# Keyboards With AVR Processors + +This page describes the support for for AVR processors in QMK. AVR processors include the atmega32u4, atmega32u2, at90usb1286, and other processors from Atmel Corporation. AVR processors are 8-bit MCU's that are designed to be easy to work with. The most common AVR processors in keyboards have on-board USB and plenty of GPIO for supporting large keyboard matrices. They are the most popular MCU for use in keyboards today. + +If you have not yet you should read the [Keyboard Guidelines](hardware_keyboard_guidelines.md) to get a sense of how keyboards fit into QMK. + +## Adding Your AVR Keyboard to QMK + +QMK has a number of features to simplify working with AVR keyboards. For most keyboards you don't have to write a single line of code. To get started run the `util/new_project.sh` script: + +``` +$ util/new_project.sh my_awesome_keyboard +###################################################### +# /keyboards/my_awesome_keyboard project created. To start +# working on things, cd into keyboards/my_awesome_keyboard +###################################################### +``` + +This will create all the files needed to support your new keyboard, and populate the settings with default values. Now you just need to customize it for your keyboard. + +## `readme.md` + +This is where you'll describe your keyboard. Please follow the [Keyboard Readme Template](documentation_templates.md#keyboard-readmemd-template) when writing your `readme.md`. You're encouraged to place an image at the top of your `readme.md`, please use an external service such as [Imgur](http://imgur.com) to host the images. + +## `.c` + +This is where all the custom logic for your keyboard goes. Many keyboards do not need to put anything at all in here. You can learn more about writing custom logic in [Custom Quantum Functions](custom_quantum_functions.md). + +## `.h` + +This is the file you define your [Layout Macro(s)](feature_layouts.md) in. At minumum you should have a `#define LAYOUT` for your keyboard that looks something like this: + +``` +#define LAYOUT( \ + k00, k01, k02, \ + k10, k11 \ +) { \ + { k00, k01, k02 }, \ + { k10, KC_NO, k11 }, \ +} +``` + +The first half of the `LAYOUT` pre-processor macro defines the physical arrangement of keys. The second half of the macro defines the matrix the switches are connected to. This allows you to have a physical arrangement of keys that differs from the wiring matrix. + +Each of the `k__` variables needs to be unique, and typically they follow the format `k`. + +The physical matrix (the second half) must have a number of rows equalling `MATRIX_ROWS`, and each row must have exactly `MATRIX_COLS` elements in it. If you do not have this many physical keys you can use `KC_NO` to fill in the blank spots. + +## `config.h` + +The `config.h` file is where you configure the hardware and feature set for your keyboard. There are a lot of options that can be placed in that file, too many to list there. For a complete overview of available options see the [Config Options](config_options.md) page. + +### Hardware Configuration + + +At the top of the `config.h` you'll find USB related settings. These control how your keyboard appears to the Operating System. If you don't have a good reason to change you should leave the `VENDOR_ID` as `0xFEED`. For the `PRODUCT_ID` you should pick a number that is not yet in use. + +Do change the `MANUFACTURER`, `PRODUCT`, and `DESCRIPTION` lines to accurately reflect your keyboard. + +``` +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER You +#define PRODUCT my_awesome_keyboard +#define DESCRIPTION A custom keyboard +``` + +{% hint style='info' %} +Note: On Windows and macOS the `MANUFACTURER`, `PRODUCT`, and `DESCRIPTION` fields will be displayed in the list of USB devices. On Linux these values will not be visible in `lsusb`, since Linux takes that information from the list published by the USB-IF. +{% endhint %} + +### Keyboard Matrix Configuration + +The next section of the `config.h` file deals with your keyboard's matrix. The first thing you should set is the matrix's size. This is usually, but not always, the same number of rows and columns as the physical key arrangement. + +``` +#define MATRIX_ROWS 2 +#define MATRIX_COLS 3 +``` + +Once you've defined the size of your matrix you need to define which pins on your MCU are connected to rows and columns. To do so simply specify the names of those pins: + +``` +#define MATRIX_ROW_PINS { D0, D5 } +#define MATRIX_COL_PINS { F1, F0, B0 } +#define UNUSED_PINS +``` + +The number of `MATRIX_ROW_PINS` entries must be the same as the number you assigned to `MATRIX_ROWS`, and likewise for `MATRIX_COL_PINS` and `MATRIX_COLS`. You do not have to specify `UNUSED_PINS`, but you can if you want to document what pins are open. + +Finally, you can specify the direction your diodes point. This can be `COL2ROW`, `ROW2COL`, or `CUSTOM_MATRIX`. + +``` +#define DIODE_DIRECTION COL2ROW +``` + +### Backlight Configuration + +By default QMK supports backlighting on pins `B5`, `B6`, and `B7`. If you are using one of those you can simply enable it here. For more details see the [Backlight Documentation](feature_backlight.md). + +``` +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 +``` + +{% hint style='info' %} +You can use backlighting on any pin you like, but you will have to do more work to support that. See the [Backlight Documentation](feature_backlight.md) for more details. +{% endhint %} + +### Other Configuration Options + +There are a lot of features that can be configured or tuned in `config.h`. You should see the [Config Options](config_options.md) page for more details. + +## `rules.mk` + +You use the `rules.mk` file to tell QMK what files to build and what features to enable. If you are building around an atmega32u4 you can largely leave these defaults alone. If you are using another MCU you may have to tweak some parameters. + +### MCU Options + +These options tell the build system what CPU to build for. Be very careful if you change any of these settings, you can render your keyboard inoperable. + +``` +MCU = atmega32u4 +F_CPU = 16000000 +ARCH = AVR8 +F_USB = $(F_CPU) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT +``` + +### Bootloader Size + +The bootloader is a special section of your MCU that allows you to upgrade the code stored on the MCU. Think of it like a Rescue Partition for your keyboard. If you are using a teensy 2.0, or a device like the Ergodox EZ that uses the teensy bootloader you should set this to `512`. Most other bootloaders should be set to `4096`, but `1024` and `2048` are other possible values you may encounter. + +#### Teensy 2.0 Bootloader Example + +``` +OPT_DEFS += -DBOOTLOADER_SIZE=512 +``` + +#### Teensy 2.0++ Bootloader Example + +``` +OPT_DEFS += -DBOOTLOADER_SIZE=1024 +``` + +#### Atmel DFU Loader Example + +``` +OPT_DEFS += -DBOOTLOADER_SIZE=4096 +``` + +### Build Options + +There are a number of features that can be turned on or off in `rules.mk`. See the [Config Options](config_options.md#feature-options) page for a detailed list and description. + diff --git a/docs/hardware_drivers.md b/docs/hardware_drivers.md new file mode 100644 index 0000000000..a298a8dc35 --- /dev/null +++ b/docs/hardware_drivers.md @@ -0,0 +1,27 @@ +# QMK Hardware Drivers + +QMK is used on a lot of different hardware. While support for the most common MCU's and matrix configurations is built-in there are a number of drivers that can be added to a keyboard to support additional hardware. Examples include mice and other pointing devices, i/o expanders for split keyboards, bluetooth modules, and LCD, OLED, and TFT screens. + + + +# Available Drivers + +## ProMicro (AVR only) + +Support for addressing pins on the ProMicro by their Arduino name rather than their AVR name. This needs to be better documented, if you are trying to do this and reading the code doesn't help please [open an issue](https://github.com/qmk/qmk_firmware/issues/new) and we can help you through the process. + +## SSD1306 (AVR only) + +Support for SSD1306 based OLED displays. This needs to be better documented, if you are trying to do this and reading the code doesn't help please [open an issue](https://github.com/qmk/qmk_firmware/issues/new) and we can help you through the process. + +## uGFX + +You can make use of uGFX within QMK to drive character and graphic LCD's, LED arrays, OLED, TFT, and other display technologies. This needs to be better documented, if you are trying to do this and reading the code doesn't help please [open an issue](https://github.com/qmk/qmk_firmware/issues/new) and we can help you through the process. + +## WS2812 (AVR only) + +Support for WS2811/WS2812{a,b,c} LED's. For more information see the [RGB Light](feature_rgblight.md) page. diff --git a/docs/adding_a_keyboard_to_qmk.md b/docs/hardware_keyboard_guidelines.md similarity index 54% rename from docs/adding_a_keyboard_to_qmk.md rename to docs/hardware_keyboard_guidelines.md index 5ee2c8ccae..8d348a9449 100644 --- a/docs/adding_a_keyboard_to_qmk.md +++ b/docs/hardware_keyboard_guidelines.md @@ -1,35 +1,49 @@ -# Adding your keyboard to QMK +# QMK Keyboard Guidelines We welcome all keyboard projects into QMK, but ask that you try to stick to a couple guidelines that help us keep things organised and consistent. -## Naming your directory/project +## Naming your keyboard/project -All names should be lowercase alphanumeric, and separated by an underscore (`_`), but not begin with one. Your directory and your `.h` and `.c` files should have exactly the same name. All folders should follow the same format. +All names should be lowercase alphanumeric, and separated by an underscore (`_`), but not begin with one. Your directory and your `.h` and `.c` files should have exactly the same name. All folders should follow the same format. ## `readme.md` -All projects need to have a `readme.md` file that explains what the keyboard is, who made it, where it is available, and links to move information (template coming). +All projects need to have a `readme.md` file that explains what the keyboard is, who made it, where it is available, and links to more information. Please follow the [published template](documentation_templates.md#keyboard-readmemd-template). ## Image/Hardware files -In an effort to keep the repo size down, we're no longer accepting images of any format in the repo, with few exceptions. Hosting them elsewhere (imgur) and linking them in the readme.md is the preferred method. +In an effort to keep the repo size down, we're no longer accepting images of any format in the repo, with few exceptions. Hosting them elsewhere (imgur) and linking them in the `readme.md` is the preferred method. -Any sort of hardware file (plate, case, pcb) can't be stored in qmk_firmware, but we have the [qmk.fm repo](https://github.com/qmk/qmk.fm) where such files (as well as in-depth info) can be store, and viewed on [qmk.fm](http://qmk.fm). Downloadable files are stored in `//` (name follows the same format as above) which are served at `http://qmk.fm//`, and pages are generated from `/_pages//` which are served at the same location (.md files are generated into .html files through Jekyll). Check out the `lets_split` directory for an example. +Any sort of hardware file (plate, case, pcb) can't be stored in qmk_firmware, but we have the [qmk.fm repo](https://github.com/qmk/qmk.fm) where such files (as well as in-depth info) can be stored and viewed on [qmk.fm](http://qmk.fm). Downloadable files are stored in `//` (name follows the same format as above) which are served at `http://qmk.fm//`, and pages are generated from `/_pages//` which are served at the same location (.md files are generated into .html files through Jekyll). Check out the `lets_split` directory for an example. ## Non-production/handwired projects -We're happy to accept any project that uses QMK, including prototypes and handwired ones, but we have a separate `/keyboards/handwired/` folder for them, so the main `/keyboards/` folder doesn't get overcrowded. If a prototype project becomes a production project at some point in the future, we'd be happy to move it to the main `/keyboards/` folder! +We're happy to accept any project that uses QMK, including prototypes and handwired ones, but we have a separate `/keyboards/handwired/` folder for them, so the main `/keyboards/` folder doesn't get overcrowded. If a prototype project becomes a production project at some point in the future, we'd be happy to move it to the main `/keyboards/` folder! ## Warnings as errors When developing your keyboard, keep in mind that all warnings will be treated as errors - these small warnings can build-up and cause larger errors down the road (and keeping them is generally a bad practice). -## Licenses +## Copyright Blurb If you're adapting your keyboard's setup from another project, but not using the same code, but sure to update the copyright header at the top of the files to show your name, in this format: Copyright 2017 Your Name - + +If you are modifying someone else's code and have made only trivial changes you should leave their name in the copyright statement. If you have done significant work on the file you should add your name to theirs, like so: + + Copyright 2017 Their Name Your Name + +The year should be the first year the file is created. If work was done to that file in later years you can reflect that by appending the second year to the first, like so: + + Copyright 2015-2017 Your Name + +## License + +The core of QMK is licensed under the [GNU General Public License](https://www.gnu.org/licenses/licenses.en.html). If you are shipping binaries for AVR processors you may choose either [GPLv2](https://www.gnu.org/licenses/old-licenses/gpl-2.0.html) or [GPLv3](https://www.gnu.org/licenses/gpl.html). If you are shipping binaries for ARM processors you must choose [GPL Version 3](https://www.gnu.org/licenses/gpl.html) to comply with the [ChibiOS](http://www.chibios.org) GPLv3 license. + +If your keyboard makes use of the [uGFX](https://ugfx.io) features within QMK you must comply with the [uGFX License](https://ugfx.io/license.html), which requires a separate commercial license before selling a device containing uGFX. + ## Technical details -If you're looking for more information on making your keyboard work with QMK, [check out this guide](porting_your_keyboard_to_qmk.md)! +If you're looking for more information on making your keyboard work with QMK, [check out the hardware section](hardware.md)! diff --git a/docs/keycodes.md b/docs/keycodes.md index e45cb7da6b..bffdbea614 100644 --- a/docs/keycodes.md +++ b/docs/keycodes.md @@ -187,22 +187,22 @@ When defining a [keymap](keymap.md) each key needs a valid key definition. This |`KC_KP_EQUAL_AS400`||Keypad Equal Sign| |`KC_NO`||Ignore this key. (NOOP) | |`KC_TRNS`||Make this key transparent to find the key on a lower layer.| -|[`KC_MS_UP`](mouse_keys.md)|`KC_MS_U`|Mouse Cursor Up| -|[`KC_MS_DOWN`](mouse_keys.md)|`KC_MS_D`|Mouse Cursor Down| -|[`KC_MS_LEFT`](mouse_keys.md)|`KC_MS_L`|Mouse Cursor Left| -|[`KC_MS_RIGHT`](mouse_keys.md)|`KC_MS_R`|Mouse Cursor Right| -|[`KC_MS_BTN1`](mouse_keys.md)|`KC_BTN1`|Mouse Button 1| -|[`KC_MS_BTN2`](mouse_keys.md)|`KC_BTN2`|Mouse Button 2| -|[`KC_MS_BTN3`](mouse_keys.md)|`KC_BTN3`|Mouse Button 3| -|[`KC_MS_BTN4`](mouse_keys.md)|`KC_BTN4`|Mouse Button 4| -|[`KC_MS_BTN5`](mouse_keys.md)|`KC_BTN5`|Mouse Button 5| -|[`KC_MS_WH_UP`](mouse_keys.md)|`KC_WH_U`|Mouse Wheel Up| -|[`KC_MS_WH_DOWN`](mouse_keys.md)|`KC_WH_D`|Mouse Wheel Down| -|[`KC_MS_WH_LEFT`](mouse_keys.md)|`KC_WH_L`|Mouse Wheel Left| -|[`KC_MS_WH_RIGHT`](mouse_keys.md)|`KC_WH_R`|Mouse Wheel Right| -|[`KC_MS_ACCEL0`](mouse_keys.md)|`KC_ACL0`|Mouse Acceleration 0| -|[`KC_MS_ACCEL1`](mouse_keys.md)|`KC_ACL1`|Mouse Acceleration 1| -|[`KC_MS_ACCEL2`](mouse_keys.md)|`KC_ACL2`|Mouse Acceleration 2| +|[`KC_MS_UP`](feature_mouse_keys.md)|`KC_MS_U`|Mouse Cursor Up| +|[`KC_MS_DOWN`](feature_mouse_keys.md)|`KC_MS_D`|Mouse Cursor Down| +|[`KC_MS_LEFT`](feature_mouse_keys.md)|`KC_MS_L`|Mouse Cursor Left| +|[`KC_MS_RIGHT`](feature_mouse_keys.md)|`KC_MS_R`|Mouse Cursor Right| +|[`KC_MS_BTN1`](feature_mouse_keys.md)|`KC_BTN1`|Mouse Button 1| +|[`KC_MS_BTN2`](feature_mouse_keys.md)|`KC_BTN2`|Mouse Button 2| +|[`KC_MS_BTN3`](feature_mouse_keys.md)|`KC_BTN3`|Mouse Button 3| +|[`KC_MS_BTN4`](feature_mouse_keys.md)|`KC_BTN4`|Mouse Button 4| +|[`KC_MS_BTN5`](feature_mouse_keys.md)|`KC_BTN5`|Mouse Button 5| +|[`KC_MS_WH_UP`](feature_mouse_keys.md)|`KC_WH_U`|Mouse Wheel Up| +|[`KC_MS_WH_DOWN`](feature_mouse_keys.md)|`KC_WH_D`|Mouse Wheel Down| +|[`KC_MS_WH_LEFT`](feature_mouse_keys.md)|`KC_WH_L`|Mouse Wheel Left| +|[`KC_MS_WH_RIGHT`](feature_mouse_keys.md)|`KC_WH_R`|Mouse Wheel Right| +|[`KC_MS_ACCEL0`](feature_mouse_keys.md)|`KC_ACL0`|Mouse Acceleration 0| +|[`KC_MS_ACCEL1`](feature_mouse_keys.md)|`KC_ACL1`|Mouse Acceleration 1| +|[`KC_MS_ACCEL2`](feature_mouse_keys.md)|`KC_ACL2`|Mouse Acceleration 2| |[`RESET`](quantum_keycodes.md#qmk-keycodes)||Put the keyboard into DFU mode for flashing| |[`DEBUG`](quantum_keycodes.md#qmk-keycodes)||Toggles debug mode| |[`KC_GESC`](quantum_keycodes.md#qmk-keycodes)|`GRAVE_ESC`|Acts as escape when pressed normally but when pressed with Shift or GUI will send a `~`| @@ -311,5 +311,5 @@ When defining a [keymap](keymap.md) each key needs a valid key definition. This |[`TT(layer)`](feature_common_shortcuts.md#switching-and-toggling-layers)||tap toggle? idk FIXME`| |[`OSM(mod)`](quantum_keycodes.md#one-shot-keys)||hold mod for one keypress| |[`OSL(layer)`](quantum_keycodes.md#one-shot-keys)||switch to layer for one keypress| -|[`UNICODE(n)`](unicode.md)|[`UC(n)`](unicode.md)|if `UNICODE_ENABLE`, this will send characters up to `0x7FFF`| -|[`X(n)`](unicode.md)||if `UNICODEMAP_ENABLE`, also sends unicode via a different method| +|[`UNICODE(n)`](feature_unicode.md)|[`UC(n)`](feature_unicode.md)|if `UNICODE_ENABLE`, this will send characters up to `0x7FFF`| +|[`X(n)`](feature_unicode.md)||if `UNICODEMAP_ENABLE`, also sends unicode via a different method| diff --git a/docs/porting_your_keyboard_to_qmk.md b/docs/porting_your_keyboard_to_qmk.md deleted file mode 100644 index 3fa08830b2..0000000000 --- a/docs/porting_your_keyboard_to_qmk.md +++ /dev/null @@ -1,63 +0,0 @@ -# Porting your keyboard to QMK - -This page describes the technical details of porting an existing keyboard to QMK. If you're looking to add your keyboard to QMK, please [look through these guidelines](adding_a_keyboard_to_qmk.md)! - -If your keyboard is running an Atmega chip (atmega32u4 and others), it's pretty easy to get things setup for compiling your own firmware to flash onto your board. There is a `/util/new_project.sh ` script to help get you started - you can simply pass your keyboard's name into the script, and all of the necessary files will be created. The components of each are described below. - -## `/keyboards//config.h` - -The `USB Device descriptor parameter` block contains parameters are used to uniquely identify your keyboard, but they don't really matter to the machine. - -Your `MATRIX_ROWS` and `MATRIX_COLS` are the numbers of rows and cols in your keyboard matrix - this may be different than the number of actual rows and columns on your keyboard. There are some tricks you can pull to increase the number of keys in a given matrix, but most keyboards are pretty straight-forward. - -The `MATRIX_ROW_PINS` and `MATRIX_COL_PINS` are the pins your MCU uses on each row/column. Your schematic (if you have one) will have this information on it, and the values will vary depending on your setup. This is one of the most important things to double-check in getting your keyboard setup correctly. - -For the `DIODE_DIRECTION`, most hand-wiring guides will instruct you to wire the diodes in the `COL2ROW` position, but it's possible that they are in the other - people coming from EasyAVR often use `ROW2COL`. Nothing will function if this is incorrect. - -`BACKLIGHT_PIN` is the pin that your PWM-controlled backlight (if one exists) is hooked-up to. Currently only B5, B6, and B7 are supported. - -`BACKLIGHT_BREATHING` is a fancier backlight feature that adds breathing/pulsing/fading effects to the backlight. It uses the same timer as the normal backlight. These breathing effects must be called by code in your keymap. - -`BACKLIGHT_LEVELS` is how many levels exist for your backlight - max is 15, and they are computed automatically from this number. - -## `/keyboards//rules.mk` - -The values at the top likely won't need to be changed, since most boards use the `atmega32u4` chip. The `BOOTLOADER_SIZE` will need to be adjusted based on your MCU type. It's defaulted to the Teensy, since that's the most common controller. Below is quoted from the `Makefile`. - -``` -# 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 -``` - -At the bottom of the file, you'll find lots of features to turn on and off - all of these options should be set with `?=` to allow for the keymap overrides. `?=` only assigns if the variable was previously undefined. For the full documenation of these features, see the [Makefile options](getting_started_make_guide.md#makefile-options). - -## `/keyboards//readme.md` - -This is where you'll describe your keyboard - please write as much as you can about it! Talking about default functionality/features is useful here. Feel free to link to external pages/sites if necessary. Images can be included here as well, as long as they're hosted elsewhere (imgur). - -## `/keyboards//.c` - -This is where all of the custom logic for your keyboard goes - you may not need to put anything in this file, since a lot of things are configured automatically. All of the `*_kb()` functions are defined here. If you modify them, remember to keep the calls to `*_user()`, or things in the keymaps might not work. You can read more about the functions [here](custom_quantum_functions.md). - -## `/keyboards//.h` - -Here is where you can (optionally) define your `KEYMAP` function to remap your matrix into a more readable format. With ortholinear boards, this isn't always necessary, but it can help to accomodate the dead spots on your matrix, where there are keys that take up more than one space (2u, staggering, 6.25u, etc). The example shows the difference between the physical keys, and the matrix design: - -``` -#define KEYMAP( \ - k00, k01, k02, \ - k10, k11 \ -) \ -{ \ - { k00, k01, k02 }, \ - { k10, KC_NO, k11 }, \ -} -``` - -Each of the `kxx` variables needs to be unique, and usually follows the format `k`. You can place `KC_NO` where your dead keys are in your matrix. - diff --git a/docs/quantum_keycodes.md b/docs/quantum_keycodes.md index a5160bf94a..c92dff787a 100644 --- a/docs/quantum_keycodes.md +++ b/docs/quantum_keycodes.md @@ -16,7 +16,7 @@ On this page we have documented keycodes between `0x00FF` and `0xFFFF` which are |`KC_LSPO`|Left shift when held, open paranthesis when tapped| |`KC_RSPC`|Right shift when held, close paranthesis when tapped| |`KC_LEAD`|The [leader key](feature_leader_key.md)| -|`KC_LOCK`|The [lock key](key_lock.md)| +|`KC_LOCK`|The [lock key](feature_key_lock.md)| |`FUNC(n)`/`F(n)`|Call `fn_action(n)` (deprecated)| |`M(n)`|to call macro n| |`MACROTAP(n)`|to macro-tap n idk FIXME| diff --git a/docs/redirects.json b/docs/redirects.json index 11f217a7c9..b848083641 100644 --- a/docs/redirects.json +++ b/docs/redirects.json @@ -1,12 +1,44 @@ { "redirects": [ + { + "from": "adding_a_keyboard_to_qmk.html", + "to": "hardware_keyboard_guidelines.html" + }, { "from": "build_environment_setup.html", "to": "getting_started_build_tools.html" }, + { + "from": "dynamic_macros.html", + "to": "feature_dynamic_macros.html" + }, + { + "from": "feature_common_shortcuts.html", + "to": "feature_advanced_keycodes.html" + }, + { + "from": "key_lock.html", + "to": "feature_key_lock.html" + }, { "from": "make_instructions.html", "to": "getting_started_make_guide.html" + }, + { + "from": "porting_your_keyboard_to_qmk.html", + "to": "hardware_avr.html" + }, + { + "from": "space_cadet_shift.html", + "to": "feature_space_cadet.html" + }, + { + "from": "tap_dance.html", + "to": "feature_tap_dance.html" + }, + { + "from": "unicode.html", + "to": "feature_unicode.html" } ] -} \ No newline at end of file +} From 6c4639bfac98e327fd395898e63670c38cb7721f Mon Sep 17 00:00:00 2001 From: Doug Krieger Date: Tue, 24 Oct 2017 11:45:42 -0400 Subject: [PATCH 49/52] Add RESET to satan:dbroqua mapping --- keyboards/satan/keymaps/dbroqua/keymap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboards/satan/keymaps/dbroqua/keymap.c b/keyboards/satan/keymaps/dbroqua/keymap.c index 5b921e0210..315ed55c05 100644 --- a/keyboards/satan/keymaps/dbroqua/keymap.c +++ b/keyboards/satan/keymaps/dbroqua/keymap.c @@ -58,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* SFX Layer * ,-----------------------------------------------------------------------------------------. - * | | | | | | | | | | | | | | | | + * | | | | | | | | | | | | | | |RESET| * |-----------------------------------------------------------------------------------------+ * | | BL- | BL+ | BL | | | | | | | | | | | * |-----------------------------------------------------------------------------------------+ @@ -70,7 +70,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------' */ [_SFX] = KEYMAP_HHKB( - ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, RESET, \ ______, BL_DEC, BL_INC, BL_TOGG,______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ ______, F(0), F(1), ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ ______, F(2), F(3), F(4), F(5), F(6), F(7), ______, ______, ______, ______, ______, ______, \ @@ -149,4 +149,4 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { } break; } -} \ No newline at end of file +} From a3f53aeaa12e6e6ce9b5087ded35f5e3af4f3190 Mon Sep 17 00:00:00 2001 From: Manassarn Manoonchai Date: Wed, 25 Oct 2017 23:11:07 +0700 Subject: [PATCH 50/52] Add narze keymaps for Ergodox & Planck with SuperDuper mode implementation (#1883) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fork default planck keymap * Esc -> CapsLock * Swap Tilde & Grave in Lower & Raise * Replace Blacklight key with Raise * Add Hyper/Esc & Shift/Enter key * Add super duper mode using S+D combo * Change superduper mode sound * Add more functionality to superduper mode * Fork default * Replace all left shift to shift/parensopen (space cadet) * Super / Underscore * Try superduper on z/slash held * Use function/macro instead, LGUI_UNDS alone not working * ✨ Add mouse layer 🐭 * 🐛 Fix superduper * :sparkles: Fix GUI_UNDS * :bug: Fix registering underscore when releasing too fast * :bug: Fix Shift/( with LT z * ✨ Add superduper for colemak * ✨ Add Qwerty on software Colemak layout & make Superduper available on multile layouts * ✨ Enable/disable superduper mode & fix layer switching * 🐛 Fix superduper not unregister mods * ✨ Update planck-like ergodox (wip) * :bug: Fix return before changing tap count & modify comments * :sparkles: Replace with planck code * 📝 Update readme * ✨ Fix SuperDuper by using intermediate layers * Remove LT from inner lower & raise for ease of use * Change TG to LG * Add options & disable audio * :wrench: Enable ignore mod tap interrupt & shorting tapping term * :memo: Update readme * Remove including quantum makefile * :memo: Update readme * Rename Makefiles --- keyboards/ergodox/keymaps/narze/config.h | 21 + .../ergodox/keymaps/narze/default.png.md | 1 + .../keymaps/narze/default_highres.png.md | 1 + keyboards/ergodox/keymaps/narze/keymap.c | 852 ++++++++++++++++++ keyboards/ergodox/keymaps/narze/readme.md | 45 + keyboards/ergodox/keymaps/narze/rules.mk | 24 + keyboards/ergodox/keymaps/narze/visualizer.c | 94 ++ keyboards/planck/keymaps/narze/config.h | 42 + keyboards/planck/keymaps/narze/keymap.c | 524 +++++++++++ keyboards/planck/keymaps/narze/readme.md | 31 + keyboards/planck/keymaps/narze/rules.mk | 23 + 11 files changed, 1658 insertions(+) create mode 100644 keyboards/ergodox/keymaps/narze/config.h create mode 100644 keyboards/ergodox/keymaps/narze/default.png.md create mode 100644 keyboards/ergodox/keymaps/narze/default_highres.png.md create mode 100644 keyboards/ergodox/keymaps/narze/keymap.c create mode 100644 keyboards/ergodox/keymaps/narze/readme.md create mode 100644 keyboards/ergodox/keymaps/narze/rules.mk create mode 100644 keyboards/ergodox/keymaps/narze/visualizer.c create mode 100644 keyboards/planck/keymaps/narze/config.h create mode 100644 keyboards/planck/keymaps/narze/keymap.c create mode 100644 keyboards/planck/keymaps/narze/readme.md create mode 100644 keyboards/planck/keymaps/narze/rules.mk diff --git a/keyboards/ergodox/keymaps/narze/config.h b/keyboards/ergodox/keymaps/narze/config.h new file mode 100644 index 0000000000..8174edd359 --- /dev/null +++ b/keyboards/ergodox/keymaps/narze/config.h @@ -0,0 +1,21 @@ +#ifndef CONFIG_H_ +#define CONFIG_H_ + +#include "../../config.h" + +#undef TAPPING_TERM +#define TAPPING_TERM 150 + +// Combos not working yet +// #define COMBO_TERM 20 +// #define COMBO_COUNT 1 +// #define COMBO_ALLOW_ACTION_KEYS + +#define IGNORE_MOD_TAP_INTERRUPT +#define PERMISSIVE_HOLD +#define PREVENT_STUCK_MODIFIERS + +#undef MOUSEKEY_DELAY +#define MOUSEKEY_DELAY 100 + +#endif diff --git a/keyboards/ergodox/keymaps/narze/default.png.md b/keyboards/ergodox/keymaps/narze/default.png.md new file mode 100644 index 0000000000..744e7d172a --- /dev/null +++ b/keyboards/ergodox/keymaps/narze/default.png.md @@ -0,0 +1 @@ +https://i.imgur.com/fKX0Zbs.png diff --git a/keyboards/ergodox/keymaps/narze/default_highres.png.md b/keyboards/ergodox/keymaps/narze/default_highres.png.md new file mode 100644 index 0000000000..074e0634d2 --- /dev/null +++ b/keyboards/ergodox/keymaps/narze/default_highres.png.md @@ -0,0 +1 @@ +https://i.imgur.com/giAc3M9.jpg diff --git a/keyboards/ergodox/keymaps/narze/keymap.c b/keyboards/ergodox/keymaps/narze/keymap.c new file mode 100644 index 0000000000..5871c221a2 --- /dev/null +++ b/keyboards/ergodox/keymaps/narze/keymap.c @@ -0,0 +1,852 @@ +#include "ergodox.h" +// #include "debug.h" +#include "action_layer.h" +#include "version.h" +#include "eeconfig.h" +#include "eeprom.h" +#include "keymap_colemak.h" + +extern keymap_config_t keymap_config; + +enum ergodox_layers { + _QWERTY, + _COLEMAK, + _QWOC, + _LOWER, + _RAISE, + _PLOVER, +// Intermediate layers for SuperDuper (Combo keys does not work on Infinity yet) + _SUPER, + _DUPER, + _SUPERDUPER, + _MOUSE, + _ADJUST, + _MDIA, + _SYMB, +}; + +enum ergodox_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + QWOC, + PLOVER, + SUPER, + DUPER, + SUPERDUPER, + MOUSE, + LOWER, + RAISE, + BACKLIT, + EXT_PLV, + SDTOGG, // Toggle SuperDuper + EPRM, + VRSN, + RGB_SLD +}; + +enum functions { + M_GUI_UNDS, // Simulate GUI_T(KC_UNDS) + M_SFT_PO, // SFT_T(KC_LPRN) + M_SFT_PC, // SFT_T(KC_RPRN) +}; + +// Timer for custom mod tap +static uint16_t m_gui_unds_timer; +static uint16_t m_sft_po_timer; +static uint16_t m_sft_pc_timer; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +// Narze : Custom Macros +#define HPR_ESC ALL_T(KC_ESC) +#define SFT_ENT SFT_T(KC_ENT) +#define SFT_PO F(M_SFT_PO) +#define SFT_PC F(M_SFT_PC) +#define GUI_MINS GUI_T(KC_MINS) +#define GUI_UNDS F(M_GUI_UNDS) + +// Combo : SuperDuper layer from S+D (R+S in Colemak) +// #define COMBO_COUNT 1 +// #define SUPERDUPER_COMBO_COUNT 3 +// #define EECONFIG_SUPERDUPER_INDEX (uint8_t *) 19 + +// enum process_combo_event { +// CB_SUPERDUPER, +// }; + +// const uint16_t PROGMEM superduper_combos[SUPERDUPER_COMBO_COUNT][3] = { +// [_QWERTY] = {KC_S, KC_D, COMBO_END}, +// [_COLEMAK] = {KC_R, KC_S, COMBO_END}, +// [_QWOC] = {CM_S, CM_D, COMBO_END}, +// }; + +// combo_t PROGMEM key_combos[COMBO_COUNT] = { +// [CB_SUPERDUPER] = COMBO_ACTION(superduper_combos[_QWERTY]), +// }; + +// volatile bool superduper_enabled = true; + +// const uint16_t empty_combo[] = {COMBO_END}; + +// void set_superduper_key_combos(void); +// void clear_superduper_key_combos(void); + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Qwerty + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | Mdia | | Mdia | 6 | 7 | 8 | 9 | 0 | - | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | E | R | T | Symb | | Symb | Y | U | I | O | P | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Hp/Esc | A | S | D | F | G |------| |------| H | J | K | L | ; | ' | + * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| + * | Sft/( | Z/Mo | X | C | V | B | | | | N | M | , | . | SD-/ | Sft/) | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |Rse/[ | Ctrl | Alt | Gui/_| Lwr | | Rse | GUI/-| Alt | Ctrl | Low/] | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | Enter| LGui | | Alt |Ctrl/Esc| + * ,------|------|------| |------+--------+------. + * | | | Home | | PgUp | | | + * | Space| Back |------| |------| Back |Enter | + * | | Space| End | | PgDn | Space | | + * `--------------------' `----------------------' + */ +[_QWERTY] = KEYMAP( + // left hand + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, LT(_MDIA, KC_NO), + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, LT(_SYMB, KC_NO), + HPR_ESC, KC_A, LT(_SUPER, KC_S), LT(_DUPER, KC_D), KC_F, KC_G, + SFT_PO, LT(_MOUSE, KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), + LT(_RAISE, KC_LBRC),KC_LCTL, KC_LALT, GUI_UNDS, LOWER, + KC_ENT, KC_LGUI, + KC_HOME, + KC_SPC,KC_BSPC,KC_END, + // right hand + LT(_MDIA, KC_NO), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + LT(_SYMB, KC_NO), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, LT(_SUPERDUPER, KC_SLSH), SFT_PC, + RAISE, GUI_MINS,KC_RALT,KC_RCTL, LT(_LOWER, KC_RBRC), + KC_LALT, CTL_T(KC_ESC), + KC_PGUP, + KC_PGDN,KC_BSPC, KC_ENT + ), +/* Colemak + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | Mdia | | Mdia | 6 | 7 | 8 | 9 | 0 | - | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | F | P | G | Symb | | Symb | J | L | U | Y | ; | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Hp/Esc | A | R | S | T | D |------| |------| H | N | E | I | O | ' | + * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| + * | Sft/( | Z/Mo | X | C | V | B | | | | K | M | , | . | SD-/ | Sft/) | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |Rse/[ | Ctrl | Alt | Gui/_| Lwr | | Rse | GUI/-| Alt | Ctrl | Low/] | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | Enter| LGui | | Alt |Ctrl/Esc| + * ,------|------|------| |------+--------+------. + * | | | Home | | PgUp | | | + * | Space| Back |------| |------| Back |Enter | + * | | Space| End | | PgDn | Space | | + * `--------------------' `----------------------' + */ +[_COLEMAK] = KEYMAP( + // left hand + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, LT(_MDIA, KC_NO), + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, LT(_SYMB, KC_NO), + HPR_ESC, KC_A, LT(_SUPER,KC_R), LT(_DUPER,KC_S), KC_T, KC_D, + SFT_PO, LT(_MOUSE, KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), + LT(_RAISE, KC_LBRC),KC_LCTL, KC_LALT, GUI_UNDS, LOWER, + KC_ENT, KC_LGUI, + KC_HOME, + KC_SPC,KC_BSPC,KC_END, + // right hand + LT(_MDIA, KC_NO), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + LT(_SYMB, KC_NO), KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, + KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + MEH_T(KC_NO),KC_K, KC_M, KC_COMM,KC_DOT, LT(_SUPERDUPER, KC_SLSH), SFT_PC, + RAISE, GUI_MINS,KC_RALT,KC_RCTL, LT(_LOWER, KC_RBRC), + KC_LALT, CTL_T(KC_ESC), + KC_PGUP, + KC_PGDN,KC_BSPC, KC_ENT + ), +/* Qwerty on software Colemak : Useful for gaming with qwerty keymaps! */ +[_QWOC] = KEYMAP( + // left hand + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, LT(_MDIA, KC_NO), + KC_TAB, CM_Q, CM_W, CM_E, CM_R, CM_T, LT(_SYMB, KC_NO), + HPR_ESC, CM_A, LT(_SUPER,CM_S), LT(_DUPER,CM_D), CM_F, CM_G, + SFT_PO, LT(_MOUSE, CM_Z), CM_X, CM_C, CM_V, CM_B, ALL_T(KC_NO), + LT(_RAISE, KC_LBRC),KC_LCTL, KC_LALT, GUI_UNDS, LOWER, + KC_ENT, KC_LGUI, + KC_HOME, + KC_SPC,KC_BSPC,KC_END, + // right hand + LT(_MDIA, KC_NO), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + LT(_SYMB, KC_NO), CM_Y, CM_U, CM_I, CM_O, CM_P, KC_BSLS, + CM_H, CM_J, CM_K, CM_L, CM_SCLN, KC_QUOT, + MEH_T(KC_NO),CM_N, CM_M, CM_COMM,CM_DOT, LT(_SUPERDUPER, KC_SLSH), SFT_PC, + RAISE, GUI_MINS,KC_RALT,KC_RCTL, LT(_LOWER, KC_RBRC), + KC_LALT, CTL_T(KC_ESC), + KC_PGUP, + KC_PGDN,KC_BSPC, KC_ENT + ), +/* Lower + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | ! | @ | # | $ | % | | | | ^ | & | * | ( | ) | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | F1 | F2 | F3 | F4 | F5 |------| |------| F6 | _ | + | { | } | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | F7 | F8 | F9 | F10 | F11 | | | | F12 |ISO ~ |ISO | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[_LOWER] = KEYMAP( + _______, _______, _______, _______, _______, _______, _______, + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, + _______, _______, _______, KC_BTN1, KC_BTN2, + _______, _______, + _______, + _______, _______, _______, + // right hand + _______, _______, _______, _______, _______, _______, _______, + _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, KC_F12,S(KC_NUHS),S(KC_NUBS), _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______ +), +/* Raise + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | F1 | F2 | F3 | F4 | F5 |------| |------| F6 | - | = | [ | ] | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | F7 | F8 | F9 | F10 | F11 | | | | F12 |ISO ~ |ISO | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[_RAISE] = KEYMAP( + _______, _______, _______, _______, _______, _______, _______, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, _______, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, + _______, _______, _______, KC_BTN1, KC_BTN2, + _______, _______, + _______, + _______, _______, _______, + // right hand + _______, _______, _______, _______, _______, _______, _______, + _______, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F12,S(KC_NUHS),S(KC_NUBS), _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______ +), + +/* Plover + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | # | # | # | # | # | # | | | | # | # | # | # | # | # | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | # | # | # | # | # | | | | # | # | # | # | # | # | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Hp/Esc | S | T | P | H | * |------| |------| * | F | P | L | T | D | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Sft/( | S | K | W | R | * | | | | * | R | B | G | S | Z | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | Exit | | | A | O | | E | U | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | Enter| LGui | | Alt |Ctrl/Esc| + * ,------|------|------| |------+--------+------. + * | | | Home | | PgUp | | | + * | Space| Back |------| |------| Back |Enter | + * | | Space| End | | PgDn | Space | | + * `--------------------' `----------------------' + */ +[_PLOVER] = KEYMAP( + // left hand + KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, XXXXXXX, + XXXXXXX, KC_1, KC_1, KC_1, KC_1, KC_1, XXXXXXX, + XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, + XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, XXXXXXX, + EXT_PLV, XXXXXXX, XXXXXXX,KC_C, KC_V, + KC_ENT, KC_LGUI, + KC_HOME, + KC_SPC,KC_BSPC,KC_END, + // right hand + XXXXXXX, KC_1, KC_1, KC_1, KC_1, KC_1, XXXXXXX, + XXXXXXX, KC_1, KC_1, KC_1, KC_1, KC_1, XXXXXXX, + KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + XXXXXXX, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_N, KC_M,XXXXXXX,XXXXXXX, XXXXXXX, + KC_LALT, CTL_T(KC_ESC), + KC_PGUP, + KC_PGDN,KC_BSPC, KC_ENT + ), + +/* SuperDuper : https://gist.github.com/narze/861e2167784842d38771 + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | | | T← | T→ | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | A | [SuperDuper]| Bksp | Gui |------| |------| ← | ↓ | ↑ | → | Del | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+--------+------. + * | | | | | | | | + * | Shift| |------| |------| |Shift | + * | | | | | | | | + * `--------------------' `----------------------' + */ +[_SUPERDUPER] = KEYMAP( + // left hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, KC_LALT, _______, _______, KC_BSPC, KC_LGUI, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + KC_LSFT,_______,_______, + // right hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, S(LGUI(KC_LBRC)), S(LGUI(KC_RBRC)), _______, _______, + KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_DEL, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______,_______, KC_LSFT + ), +// Intermediate keymaps for SuperDuper (Combo keys does not work on Infinity yet) +[_SUPER] = KEYMAP( + // left hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, DUPER, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______,_______,_______, + // right hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______,_______, _______ + ), +[_DUPER] = KEYMAP( + // left hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, SUPER, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______,_______,_______, + // right hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______,_______, _______ + ), + +/* Mouse + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | S↑ | M↑ | S↓ | | | | | | | S↑ | S↓ | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | M← | M↓ | M→ | |------| |------| M← | M↓ | M↑ | M→ | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | |[Mouse| | | | M3 | | | | M3 | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | M2 | | M2 | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+--------+------. + * | | | | | | | | + * | Left | |------| |------| | Left | + * | Click| | | | | | Click| + * `--------------------' `----------------------' + */ +[_MOUSE] = KEYMAP( + // left hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_WH_U, KC_MS_U, KC_WH_D, _______, _______, + _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, + _______, _______, _______, _______, _______, KC_BTN3, _______, + _______, _______, _______, _______, KC_BTN2, + _______, _______, + _______, + KC_BTN1,_______,_______, + // right hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_WH_U, KC_WH_D, _______, _______, + KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, _______, _______, + _______, KC_BTN3, _______, _______, _______, _______, _______, + KC_BTN2, _______, _______, _______, _______, + _______, _______, + _______, + _______,_______, KC_BTN1 + ), + +/* Adjust (Lower + Raise) + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | |Reset | | | | | | | | | | | | | Del | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | |AGnorm|------| |------|AGswap|Qwerty|Colemk|QwOnCo|Plover| | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | |SDTogg| | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+--------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `----------------------' + */ +[_ADJUST] = KEYMAP( + // left hand + _______, _______, _______, _______, _______, _______, _______, + _______, RESET, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, AG_NORM, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______,_______,_______, + // right hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_DEL, + AG_SWAP, QWERTY, COLEMAK, QWOC, PLOVER, _______, + _______, SDTOGG, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______,_______, _______ + ), + +/* Layers below are not actively used but kept for future reference */ + +/* Symbol + * ,---------------------------------------------------. ,--------------------------------------------------. + * |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | + * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| + * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | + * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | EPRM | | | | | | | . | 0 | = | | + * `-----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * |Animat| | |Toggle|Solid | + * ,------|------|------| |------+------+------. + * |Bright|Bright| | | |Hue- |Hue+ | + * |ness- |ness+ |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[_SYMB] = KEYMAP( + // left hand + VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + _______,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,_______, + _______,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV, + _______,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,_______, + EPRM,_______,_______,_______,_______, + RGB_MOD,_______, + _______, + RGB_VAD,RGB_VAI,_______, + // right hand + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, + KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, _______, + _______, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, _______, + _______,KC_DOT, KC_0, KC_EQL, _______, + RGB_TOG, RGB_SLD, + _______, + _______, RGB_HUD, RGB_HUI +), +/* Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | MsUp | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | Prev | Next | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | |Brwser| + * | | |------| |------| |Back | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// MEDIA AND MOUSE +[_MDIA] = KEYMAP( + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_MS_U, _______, _______, _______, + _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_BTN1, KC_BTN2, + _______, _______, + _______, + _______, _______, _______, + // right hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, KC_MPLY, + _______, _______, _______, KC_MPRV, KC_MNXT, _______, _______, + KC_VOLU, KC_VOLD, KC_MUTE, _______, _______, + _______, _______, + _______, + _______, _______, KC_WBAK +) +}; + +void persistant_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_QWERTY); + + // key_combos[CB_SUPERDUPER].keys = superduper_combos[_QWERTY]; + // eeprom_update_byte(EECONFIG_SUPERDUPER_INDEX, _QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_COLEMAK); + + // key_combos[CB_SUPERDUPER].keys = superduper_combos[_COLEMAK]; + // eeprom_update_byte(EECONFIG_SUPERDUPER_INDEX, _COLEMAK); + } + return false; + break; + case QWOC: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_QWOC); + + // key_combos[CB_SUPERDUPER].keys = superduper_combos[_QWOC]; + // eeprom_update_byte(EECONFIG_SUPERDUPER_INDEX, _QWOC); + } + 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 SUPER: + if (record->event.pressed) { + layer_on(_SUPER); + update_tri_layer(_SUPER, _DUPER, _SUPERDUPER); + } else { + layer_off(_SUPER); + update_tri_layer(_SUPER, _DUPER, _SUPERDUPER); + } + return false; + break; + case DUPER: + if (record->event.pressed) { + layer_on(_DUPER); + update_tri_layer(_SUPER, _DUPER, _SUPERDUPER); + } else { + layer_off(_DUPER); + update_tri_layer(_SUPER, _DUPER, _SUPERDUPER); + } + 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) { + 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) { + layer_off(_PLOVER); + } + return false; + break; + case SDTOGG: + if (record->event.pressed) { + // superduper_enabled = !superduper_enabled; + + // if (superduper_enabled) { + // set_superduper_key_combos(); + // } else { + // clear_superduper_key_combos(); + // } + } + return false; + break; + case EPRM: + if (record->event.pressed) { + eeconfig_init(); + } + return false; + break; + case VRSN: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + break; + case RGB_SLD: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + rgblight_mode(1); + #endif + } + return false; + break; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_setup(void) { + // set_superduper_key_combos(); +} + +// void set_superduper_key_combos(void) { +// uint8_t layer = eeprom_read_byte(EECONFIG_SUPERDUPER_INDEX); + +// switch (layer) { +// case _QWERTY: +// case _COLEMAK: +// case _QWOC: +// key_combos[CB_SUPERDUPER].keys = superduper_combos[layer]; +// break; +// } +// } + +// void clear_superduper_key_combos(void) { +// key_combos[CB_SUPERDUPER].keys = empty_combo; +// } + +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; + // } +} + +// Combos + +// void process_combo_event(uint8_t combo_index, bool pressed) { +// if (pressed) { +// switch(combo_index) { +// case CB_SUPERDUPER: +// layer_on(_SUPERDUPER); +// ergodox_board_led_on(); +// break; +// } +// } else { +// layer_off(_SUPERDUPER); +// ergodox_board_led_off(); +// unregister_mods(MOD_BIT(KC_LGUI) | MOD_BIT(KC_LCTL) | MOD_BIT(KC_LALT)); // Sometimes mods are held, unregister them +// } +// } + +// Macros + +const uint16_t PROGMEM fn_actions[] = { + [M_GUI_UNDS] = ACTION_MACRO_TAP(M_GUI_UNDS), + [M_SFT_PO] = ACTION_MACRO_TAP(M_SFT_PO), + [M_SFT_PC] = ACTION_MACRO_TAP(M_SFT_PC), +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + bool tap_not_interrupted = record->tap.count > 0 && !record->tap.interrupted; + + switch(id) { + // Hold for LGUI, tap for Underscore + case M_GUI_UNDS: + if (record->event.pressed) { + m_gui_unds_timer = timer_read(); + + if (!tap_not_interrupted) { + register_mods(MOD_BIT(KC_LGUI)); + } + } else { + if (tap_not_interrupted && timer_elapsed(m_gui_unds_timer) < TAPPING_TERM) { + + add_weak_mods(MOD_BIT(KC_LSFT)); + send_keyboard_report(); + register_code(KC_MINS); + unregister_code(KC_MINS); + del_weak_mods(MOD_BIT(KC_LSFT)); + send_keyboard_report(); + record->tap.count = 0; // ad hoc: cancel tap + } else { + unregister_mods(MOD_BIT(KC_LGUI)); + } + } + break; + // Hold for LSHIFT, tap for Parens open + case M_SFT_PO: + if (record->event.pressed) { + m_sft_po_timer = timer_read(); + + if (!tap_not_interrupted) { + register_mods(MOD_BIT(KC_LSFT)); + } + } else { + if (tap_not_interrupted && timer_elapsed(m_sft_po_timer) < TAPPING_TERM) { + record->tap.count = 0; + return MACRO(D(RSFT), T(9), U(RSFT), END); + } else { + unregister_mods(MOD_BIT(KC_LSFT)); + } + } + break; + // Hold for RSHIFT, tap for Parens close + case M_SFT_PC: + if (record->event.pressed) { + m_sft_pc_timer = timer_read(); + + if (!tap_not_interrupted) { + register_mods(MOD_BIT(KC_RSFT)); + } + } else { + if (tap_not_interrupted && timer_elapsed(m_sft_pc_timer) < TAPPING_TERM) { + record->tap.count = 0; + return MACRO(D(LSFT), T(0), U(LSFT), END); + } else { + unregister_mods(MOD_BIT(KC_RSFT)); + } + } + break; + } + return MACRO_NONE; +}; diff --git a/keyboards/ergodox/keymaps/narze/readme.md b/keyboards/ergodox/keymaps/narze/readme.md new file mode 100644 index 0000000000..03a72f1ac3 --- /dev/null +++ b/keyboards/ergodox/keymaps/narze/readme.md @@ -0,0 +1,45 @@ +# narze's layout + +## Notes +- SuperDuper mode for Ergodox is still under development, since combo keys does not work very well on Ergodox firmware. + Now it is using multiple layers as a workaround. Actual implementation using combos are on my Planck layout. + +## Key features +- Qwerty + [Colemak](https://colemak.com) layouts, and you can type Qwerty on software-level Colemak as well. Very useful for gaming or when your friend wanna type something but don't use Colemak. +- [(S)uper (D)uper Mode](https://github.com/jasonrudolph/keyboard#super-duper-mode) inspired by [jasonrudolph](https://github.com/jasonrudolph), with [some extensions](https://gist.github.com/narze/861e2167784842d38771) such as backspace & forward delete. +- Mouse keys with Z + +## (S)uper (D)uper Mode +Press `S+D` simultaneously and hold, then... +- `H/J/K/L` for Vim-like movement +- `I/O` to move between browser tabs (Not working on Windows yet) +- `A` for `Option (Alt)` +- `F/;` for `Backspace/Forward delete` +- `A` with `H/L` to move to previous/next word +- `A` with `G/;` to delete to previous/next word +- `G` for `Cmd` (Gui/Windows) +- Available for all layouts (but plover) using physical S & D keys position in qwerty +- `Spacebar` for `Shift` (it's easier when already holding A with your pinky) +- Disable with `Raise+Lower+M` +- You can edit or add more useful keys in SUPERDUPER layer +- It can be activated by holding `/` as well, but it's slower since `LT()` uses `TAPPING_TERM` of 200ms but `S+D` uses `COMBO_TERM` of only 20ms (Can be changed within config.h) + +## Build instructions +- `cd /path/to/qmk_firmware` + +#### Left side + ``` +docker run -e keymap=narze -e subproject=infinity -e keyboard=ergodox --rm -v $('pwd'):/qmk:rw edasque/qmk_firmware +avr-objcopy -Iihex -Obinary .build/ergodox_infinity_narze.hex .build/ergodox_infinity_narze_left.bin +dfu-util --device 1c11:b007 -D .build/ergodox_infinity_narze_left.bin +``` + +#### Right side +``` +docker run -e keymap=narze -e subproject=infinity -e keyboard=ergodox -e MASTER=right --rm -v $('pwd'):/qmk:rw edasque/qmk_firmware +avr-objcopy -Iihex -Obinary .build/ergodox_infinity_narze.hex .build/ergodox_infinity_narze_right.bin +dfu-util --device 1c11:b007 -D .build/ergodox_infinity_narze_right.bin +``` + +## TODO +- [ ] Make SuperDuper mode fully-compatible in Windows by swapping GUI with Ctrl diff --git a/keyboards/ergodox/keymaps/narze/rules.mk b/keyboards/ergodox/keymaps/narze/rules.mk new file mode 100644 index 0000000000..7d2e00d0e9 --- /dev/null +++ b/keyboards/ergodox/keymaps/narze/rules.mk @@ -0,0 +1,24 @@ + + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +# Combos not working yet +COMBO_ENABLE = no diff --git a/keyboards/ergodox/keymaps/narze/visualizer.c b/keyboards/ergodox/keymaps/narze/visualizer.c new file mode 100644 index 0000000000..88f658d6b9 --- /dev/null +++ b/keyboards/ergodox/keymaps/narze/visualizer.c @@ -0,0 +1,94 @@ +/* +Copyright 2017 Fred Sundvik + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "simple_visualizer.h" +#include "util.h" + +// Copied from keymap.c +enum ergodox_layers { + _QWERTY, + _COLEMAK, + _QWOC, + _LOWER, + _RAISE, + _PLOVER, +// Intermediate layers for SuperDuper (Combo keys does not work on Infinity yet) + _SUPER, + _DUPER, + _SUPERDUPER, + _MOUSE, + _ADJUST, + _MDIA, + _SYMB, +}; + +// This function should be implemented by the keymap visualizer +// Don't change anything else than state->target_lcd_color and state->layer_text as that's the only thing +// that the simple_visualizer assumes that you are updating +// Also make sure that the buffer passed to state->layer_text remains valid until the previous animation is +// stopped. This can be done by either double buffering it or by using constant strings +static void get_visualizer_layer_and_color(visualizer_state_t* state) { + uint8_t saturation = 255; + + uint8_t layer = biton32(state->status.layer); + state->target_lcd_color = LCD_COLOR(layer << 2, saturation, 0xFF); + + switch(layer) { + case _QWERTY: + state->layer_text = "QWERTY"; + break; + case _COLEMAK: + state->layer_text = "COLEMAK"; + break; + case _QWOC: + state->layer_text = "QWERTY on COLEMAK"; + break; + case _LOWER: + state->layer_text = "LOWER"; + break; + case _RAISE: + state->layer_text = "RAISE"; + break; + case _PLOVER: + state->layer_text = "PLOVER"; + break; + case _SUPERDUPER: + state->layer_text = "SUPERDUPER"; + break; + case _SUPER: + state->layer_text = "SUPER"; + break; + case _DUPER: + state->layer_text = "DUPER"; + break; + case _MOUSE: + state->layer_text = "MOUSE"; + break; + case _ADJUST: + state->layer_text = "ADJUST"; + break; + case _MDIA: + state->layer_text = "MDIA"; + break; + case _SYMB: + state->layer_text = "SYMB"; + break; + default: + state->layer_text = "NONE"; + break; + } +} diff --git a/keyboards/planck/keymaps/narze/config.h b/keyboards/planck/keymaps/narze/config.h new file mode 100644 index 0000000000..e081a93b53 --- /dev/null +++ b/keyboards/planck/keymaps/narze/config.h @@ -0,0 +1,42 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +#define TAPPING_TERM 200 + +#define COMBO_TERM 20 +#define COMBO_COUNT 1 + +#define IGNORE_MOD_TAP_INTERRUPT +#define PERMISSIVE_HOLD +#define PREVENT_STUCK_MODIFIERS + +#define SUPER_DUPER_SOUND S__NOTE(_B1) + +#define MOUSEKEY_DELAY 100 + +#endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/narze/keymap.c b/keyboards/planck/keymaps/narze/keymap.c new file mode 100644 index 0000000000..c5703f58d9 --- /dev/null +++ b/keyboards/planck/keymaps/narze/keymap.c @@ -0,0 +1,524 @@ +// 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" +#include "keymap_colemak.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. + +enum planck_layers { + _QWERTY, + _COLEMAK, + _QWOC, + _LOWER, + _RAISE, + _PLOVER, + _SUPERDUPER, + _MOUSE, + _ADJUST +}; + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + QWOC, + PLOVER, + SUPERDUPER, + MOUSE, + LOWER, + RAISE, + BACKLIT, + EXT_PLV, + SDTOGG, // Toggle SuperDuper +}; + +enum functions { + M_GUI_UNDS, // Simulate GUI_T(KC_UNDS) + M_SFT_PO, // SFT_T(KC_LPRN) +}; + +// Timer for custom mod tap +static uint16_t m_gui_unds_timer; +static uint16_t m_sft_po_timer; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +// Narze : Custom Macros +#define HPR_ESC ALL_T(KC_ESC) +#define SFT_ENT SFT_T(KC_ENT) +#define SFT_PO F(M_SFT_PO) +#define GUI_MINS GUI_T(KC_MINS) +#define GUI_UNDS F(M_GUI_UNDS) + +// Combo : SuperDuper layer from S+D (R+S in Colemak) +#define SUPERDUPER_COMBO_COUNT 3 +#define EECONFIG_SUPERDUPER_INDEX (uint8_t *) 19 + +enum process_combo_event { + CB_SUPERDUPER, +}; + +const uint16_t PROGMEM superduper_combos[SUPERDUPER_COMBO_COUNT][3] = { + [_QWERTY] = {KC_S, KC_D, COMBO_END}, + [_COLEMAK] = {KC_R, KC_S, COMBO_END}, + [_QWOC] = {CM_S, CM_D, COMBO_END}, +}; + +combo_t key_combos[COMBO_COUNT] = { + [CB_SUPERDUPER] = COMBO_ACTION(superduper_combos[_QWERTY]), +}; + +volatile bool superduper_enabled = true; + +const uint16_t empty_combo[] = {COMBO_END}; + +void set_superduper_key_combos(void); +void clear_superduper_key_combos(void); + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Hp/Ec| A | S | D | F | G | H | J | K | L | ; | ' | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Sft/(| Z/Mo | X | C | V | B | N | M | , | . | SD-/ |Sft/Ent| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Rse/[| Ctrl | Alt | GUI/_|Lower | Space |Raise | GUI/-| Alt | Ctrl | Low/]| + * `-----------------------------------------------------------------------------------' + */ +[_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}, + {HPR_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {SFT_PO, LT(_MOUSE, KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, LT(_SUPERDUPER, KC_SLSH), SFT_ENT}, + {LT(_RAISE, KC_LBRC), KC_LCTL, KC_LALT, GUI_UNDS, LOWER, KC_SPC, KC_SPC, RAISE, GUI_MINS, KC_RALT, KC_RCTL, LT(_LOWER, KC_RBRC)} +}, + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Hp/Ec| A | R | S | T | D | H | N | E | I | O | ' | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Sft/(| Z/Mo | X | C | V | B | K | M | , | . | SD-/ |Sft/Ent| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI/_|Lower | Space |Raise | GUI/-| Alt | Ctrl | Low/]| + * `-----------------------------------------------------------------------------------' + */ +[_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}, + {HPR_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, + {SFT_PO, LT(_MOUSE, KC_Z), KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, LT(_SUPERDUPER, KC_SLSH), SFT_ENT}, + {LT(_RAISE, KC_LBRC), KC_LCTL, KC_LALT, GUI_UNDS, LOWER, KC_SPC, KC_SPC, RAISE, GUI_MINS, KC_RALT, KC_RCTL, LT(_LOWER, KC_RBRC)} +}, + +/* Qwerty on software Colemak : Useful for gaming with qwerty keymaps! */ +[_QWOC] = { + {KC_TAB, CM_Q, CM_W, CM_E, CM_R, CM_T, CM_Y, CM_U, CM_I, CM_O, CM_P, KC_BSPC}, + {HPR_ESC, CM_A, CM_S, CM_D, CM_F, CM_G, CM_H, CM_J, CM_K, CM_L, CM_SCLN, KC_QUOT}, + {SFT_PO, LT(_MOUSE, CM_Z), CM_X, CM_C, CM_V, CM_B, CM_N, CM_M, CM_COMM, CM_DOT, LT(_SUPERDUPER, CM_SLSH), SFT_ENT}, + {LT(_RAISE, KC_LBRC), KC_LCTL, KC_LALT, GUI_UNDS, LOWER, KC_SPC, KC_SPC, RAISE, GUI_MINS, KC_RALT, KC_RCTL, LT(_LOWER, KC_RBRC)} +}, + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ` | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Sft/Ent| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = { + {KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC}, + {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} +}, + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Sft/Ent| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = { + {KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, + {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} +}, + +/* Plover layer (http://opensteno.org) + * ,-----------------------------------------------------------------------------------. + * | # | # | # | # | # | # | # | # | # | # | # | # | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | S | T | P | H | * | * | F | P | L | T | D | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * |TogOut| S | K | W | R | * | * | R | B | G | S | Z | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Exit | | | A | O | | E | U | | | | + * `-----------------------------------------------------------------------------------' + */ + +[_PLOVER] = { + {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 }, + {XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC}, + {XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX} +}, + +/* SuperDuper : https://gist.github.com/narze/861e2167784842d38771 + * /-----------------------------------------------------------------------------------\ + * | | | | | | | | | T← | T→ | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | Alt | [SuperDuper]| Bksp | Gui | ← | ↓ | ↑ | → | Del | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | Shift | | | | | | + * \-----------------------------------------------------------------------------------/ + */ +[_SUPERDUPER] = { + {_______, _______, _______, _______, _______, _______, _______, _______, S(LGUI(KC_LBRC)), S(LGUI(KC_RBRC)), _______, _______}, + {_______, KC_LALT, _______, _______, KC_BSPC, KC_LGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_DEL, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, KC_LSFT, KC_LSFT, _______, _______, _______, _______, _______} +}, + +/* Mouse + * /-----------------------------------------------------------------------------------\ + * | | | S↑ | M↑ | S↓ | | | | S↑ | S↓ | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | M← | M↓ | M→ | | M← | M↓ | M↑ | M→ | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |[Mouse| | | | M3 | M3 | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | M2 | LeftClick | M2 | | | | | + * \-----------------------------------------------------------------------------------/ + */ +[_MOUSE] = { + {_______, _______, KC_WH_U, KC_MS_U, KC_WH_D, _______, _______, _______, KC_WH_U, KC_WH_D, _______, _______}, + {_______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, _______, _______}, + {_______, _______, _______, _______, _______, KC_BTN3, KC_BTN3, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, KC_BTN2, KC_BTN1, KC_BTN1, KC_BTN2, _______, _______, _______, _______} +}, + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|QwOnCo|Plover| | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof|SDtogg| | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = { + {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, + {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, QWOC, PLOVER, _______}, + {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, SDTOGG, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +} + +}; + +#ifdef AUDIO_ENABLE + float tone_startup[][2] = SONG(STARTUP_SOUND); + float tone_qwerty[][2] = SONG(QWERTY_SOUND); + float tone_qwoc[][2] = SONG(DVORAK_SOUND); + float tone_colemak[][2] = SONG(COLEMAK_SOUND); + float tone_plover[][2] = SONG(PLOVER_SOUND); + float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND); + float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); + float tone_coin[][2] = SONG(COIN_SOUND); + float tone_sonic_ring[][2] = SONG(SONIC_RING); + + float tone_goodbye[][2] = SONG(GOODBYE_SOUND); + float tone_superduper[][2] = SONG(SUPER_DUPER_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); + + key_combos[CB_SUPERDUPER].keys = superduper_combos[_QWERTY]; + eeprom_update_byte(EECONFIG_SUPERDUPER_INDEX, _QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_colemak, false, 0); + #endif + persistant_default_layer_set(1UL<<_COLEMAK); + + key_combos[CB_SUPERDUPER].keys = superduper_combos[_COLEMAK]; + eeprom_update_byte(EECONFIG_SUPERDUPER_INDEX, _COLEMAK); + } + return false; + break; + case QWOC: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_qwoc, false, 0); + #endif + persistant_default_layer_set(1UL<<_QWOC); + + key_combos[CB_SUPERDUPER].keys = superduper_combos[_QWOC]; + eeprom_update_byte(EECONFIG_SUPERDUPER_INDEX, _QWOC); + } + 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; + case SDTOGG: + if (record->event.pressed) { + superduper_enabled = !superduper_enabled; + + if (superduper_enabled) { + set_superduper_key_combos(); + + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_sonic_ring, false, 0); + #endif + } else { + clear_superduper_key_combos(); + + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_coin, false, 0); + #endif + } + } + return false; + break; + } + return true; +} + +void matrix_init_user(void) { + #ifdef AUDIO_ENABLE + startup_user(); + #endif +} + +void matrix_setup(void) { + set_superduper_key_combos(); +} + +void set_superduper_key_combos(void) { + uint8_t layer = eeprom_read_byte(EECONFIG_SUPERDUPER_INDEX); + + switch (layer) { + case _QWERTY: + case _COLEMAK: + case _QWOC: + key_combos[CB_SUPERDUPER].keys = superduper_combos[layer]; + break; + } +} + +void clear_superduper_key_combos(void) { + key_combos[CB_SUPERDUPER].keys = empty_combo; +} + +void matrix_scan_user(void) { +} + +#ifdef AUDIO_ENABLE + +void startup_user() +{ + _delay_ms(20); // gets rid of tick + PLAY_NOTE_ARRAY(tone_startup, false, 0); +} + +void shutdown_user() +{ + PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + _delay_ms(150); + stop_all_notes(); +} + +void music_on_user(void) +{ + music_scale_user(); +} + +void music_scale_user(void) +{ + PLAY_NOTE_ARRAY(music_scale, false, 0); +} + +#endif + +// Combos + +void process_combo_event(uint8_t combo_index, bool pressed) { + if (pressed) { + switch(combo_index) { + case CB_SUPERDUPER: + layer_on(_SUPERDUPER); + + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_superduper, false, 0); + #endif + break; + } + } else { + layer_off(_SUPERDUPER); + unregister_mods(MOD_BIT(KC_LGUI) | MOD_BIT(KC_LCTL) | MOD_BIT(KC_LALT)); // Sometimes mods are held, unregister them + } +} + +// Macros + +const uint16_t PROGMEM fn_actions[] = { + [M_GUI_UNDS] = ACTION_MACRO_TAP(M_GUI_UNDS), + [M_SFT_PO] = ACTION_MACRO_TAP(M_SFT_PO), +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + bool tap_not_interrupted = record->tap.count > 0 && !record->tap.interrupted; + + switch(id) { + // Hold for LGUI, tap for Underscore + case M_GUI_UNDS: + if (record->event.pressed) { + m_gui_unds_timer = timer_read(); + + if (!tap_not_interrupted) { + register_mods(MOD_BIT(KC_LGUI)); + } + } else { + if (tap_not_interrupted && timer_elapsed(m_gui_unds_timer) < TAPPING_TERM) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_superduper, false, 0); + #endif + + add_weak_mods(MOD_BIT(KC_LSFT)); + send_keyboard_report(); + register_code(KC_MINS); + unregister_code(KC_MINS); + del_weak_mods(MOD_BIT(KC_LSFT)); + send_keyboard_report(); + record->tap.count = 0; // ad hoc: cancel tap + } else { + unregister_mods(MOD_BIT(KC_LGUI)); + } + } + break; + // Hold for LSHIFT, tap for Parens open + case M_SFT_PO: + if (record->event.pressed) { + m_sft_po_timer = timer_read(); + + if (!tap_not_interrupted) { + register_mods(MOD_BIT(KC_LSFT)); + } + } else { + if (tap_not_interrupted && timer_elapsed(m_sft_po_timer) < TAPPING_TERM) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_superduper, false, 0); + #endif + + record->tap.count = 0; + return MACRO(D(RSFT), T(9), U(RSFT), END); + } else { + unregister_mods(MOD_BIT(KC_LSFT)); + } + } + break; + } + return MACRO_NONE; +}; diff --git a/keyboards/planck/keymaps/narze/readme.md b/keyboards/planck/keymaps/narze/readme.md new file mode 100644 index 0000000000..6824251e88 --- /dev/null +++ b/keyboards/planck/keymaps/narze/readme.md @@ -0,0 +1,31 @@ +# narze's layout + +## Key features +- Qwerty + [Colemak](https://colemak.com) layouts, and you can type Qwerty on software-level Colemak as well. Very useful for gaming or when your friend wanna type something but don't use Colemak. +- [(S)uper (D)uper Mode](https://github.com/jasonrudolph/keyboard#super-duper-mode) inspired by [jasonrudolph](https://github.com/jasonrudolph), with [some extensions](https://gist.github.com/narze/861e2167784842d38771) such as backspace & forward delete. +- Mouse keys with Z + +## (S)uper (D)uper Mode +Press `S+D` simultaneously and hold, then... +- `H/J/K/L` for Vim-like movement +- `I/O` to move between browser tabs (Not working on Windows yet) +- `A` for `Option (Alt)` +- `F/;` for `Backspace/Forward delete` +- `A` with `H/L` to move to previous/next word +- `A` with `G/;` to delete to previous/next word +- `G` for `Cmd` (Gui/Windows) +- Available for all layouts (but plover) using physical S & D keys position in qwerty +- `Spacebar` for `Shift` (it's easier when already holding A with your pinky) +- Disable with `Raise+Lower+M` +- You can edit or add more useful keys in SUPERDUPER layer +- It can be activated by holding `/` as well, but it's slower since `LT()` uses `TAPPING_TERM` of 200ms but `S+D` uses `COMBO_TERM` of only 20ms (Can be changed within config.h) + +## Build instructions +- `cd /path/to/qmk_firmware` +- `docker run -e keymap=narze -e subproject=rev4 -e keyboard=planck --rm -v $('pwd'):/qmk:rw edasque/qmk_firmware` +- `dfu-programmer atmega32u4 erase && dfu-programmer atmega32u4 flash .build/planck_rev4_narze.hex` + +## TODO +- [] Make SuperDuper mode fully-compatible in Windows by swapping GUI with Ctrl + + diff --git a/keyboards/planck/keymaps/narze/rules.mk b/keyboards/planck/keymaps/narze/rules.mk new file mode 100644 index 0000000000..05c2ce455f --- /dev/null +++ b/keyboards/planck/keymaps/narze/rules.mk @@ -0,0 +1,23 @@ + + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +COMBO_ENABLE = yes From 7b754e1a5a902abd51ad314c68ef1606d89adf95 Mon Sep 17 00:00:00 2001 From: Sebastian Kaim Date: Thu, 26 Oct 2017 01:01:02 +0200 Subject: [PATCH 51/52] added bfake support as a subproject (#1903) * added bfake support as a subproject also moved existing bmini stuff to a subproject fixed columns minor keymap update making this a subproject remove old stuff got subproject stuff figured out * travis was upset because a board didn't have a default keymap --- keyboards/ps2avrGB/bfake/bfake.h | 41 +++++++++++++ keyboards/ps2avrGB/bfake/config.h | 34 +++++++++++ .../ps2avrGB/bfake/keymaps/default/keymap.c | 43 +++++++++++++ keyboards/ps2avrGB/bfake/rules.mk | 0 keyboards/ps2avrGB/bmini_x2/bmini_x2.h | 61 +++++++++++++++++++ keyboards/ps2avrGB/bmini_x2/config.h | 27 ++++++++ .../{ => bmini_x2}/keymaps/default/keymap.c | 10 +-- keyboards/ps2avrGB/bmini_x2/rules.mk | 0 keyboards/ps2avrGB/config.h | 9 +-- keyboards/ps2avrGB/matrix.c | 2 +- keyboards/ps2avrGB/ps2avrGB.h | 49 +++------------ 11 files changed, 220 insertions(+), 56 deletions(-) create mode 100644 keyboards/ps2avrGB/bfake/bfake.h create mode 100644 keyboards/ps2avrGB/bfake/config.h create mode 100644 keyboards/ps2avrGB/bfake/keymaps/default/keymap.c create mode 100644 keyboards/ps2avrGB/bfake/rules.mk create mode 100644 keyboards/ps2avrGB/bmini_x2/bmini_x2.h create mode 100644 keyboards/ps2avrGB/bmini_x2/config.h rename keyboards/ps2avrGB/{ => bmini_x2}/keymaps/default/keymap.c (88%) create mode 100644 keyboards/ps2avrGB/bmini_x2/rules.mk diff --git a/keyboards/ps2avrGB/bfake/bfake.h b/keyboards/ps2avrGB/bfake/bfake.h new file mode 100644 index 0000000000..7d26a369a8 --- /dev/null +++ b/keyboards/ps2avrGB/bfake/bfake.h @@ -0,0 +1,41 @@ +/* +Copyright 2017 Luiz Ribeiro + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef BFAKE_H +#define BFAKE_H + +#include "quantum.h" +#include "ps2avrGB.h" + +#define KEYMAP( \ + K61, K71, K72, K73, K74, K64, K65, K75, K76, K77, K78, K68, K66, K10, K60,\ + K11, K01, K02, K03, K04, K14, K15, K05, K06, K07, K08, K18, K16, K20, \ + K12, K21, K22, K23, K24, K34, K35, K25, K26, K27, K28, K38, K40, \ + K19, K13, K41, K42, K43, K44, K54, K55, K45, K46, K47, K58, K49, K50,\ + K09, K00, K39, K30, K59, K69, K37, K29\ +){ \ + { KC_NO, K01, K02, K03, K04, K05, K06, K07, K08, K09, K00}, \ + { KC_NO, K11, K12, K13, K14, K15, K16, KC_NO, K18, K19, K10}, \ + { KC_NO, K21, K22, K23, K24, K25, K26, K27, K28, K29, K20}, \ + { KC_NO, KC_NO, KC_NO, KC_NO, K34, K35, KC_NO, K37, K38, K39, K30}, \ + { KC_NO, K41, K42, K43, K44, K45, K46, K47, KC_NO, K49, K40}, \ + { KC_NO, KC_NO, KC_NO, KC_NO, K54, K55, KC_NO, KC_NO, K58, K59, K50}, \ + { KC_NO, K61, KC_NO, KC_NO, K64, K65, K66, KC_NO, K68, K69, K60}, \ + { KC_NO, K71, K72, K73, K74, K75, K76, K77, K78, KC_NO, KC_NO}, \ +} + +#endif diff --git a/keyboards/ps2avrGB/bfake/config.h b/keyboards/ps2avrGB/bfake/config.h new file mode 100644 index 0000000000..3559a12da9 --- /dev/null +++ b/keyboards/ps2avrGB/bfake/config.h @@ -0,0 +1,34 @@ +/* +Copyright 2017 Luiz Ribeiro + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#ifndef BFAKE_CONFIG_H +#define BFAKE_CONFIG_H + +#include "config_common.h" + +#define MANUFACTURER NotActuallyWinkeyless + +#define MATRIX_ROWS 8 +#define MATRIX_COLS 11 + +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6} +#define UNUSED_PINS + +#define DIODE_DIRECTION COL2ROW +#define DEBOUNCING_DELAY 5 + +#endif diff --git a/keyboards/ps2avrGB/bfake/keymaps/default/keymap.c b/keyboards/ps2avrGB/bfake/keymaps/default/keymap.c new file mode 100644 index 0000000000..239fdf427f --- /dev/null +++ b/keyboards/ps2avrGB/bfake/keymaps/default/keymap.c @@ -0,0 +1,43 @@ +/* +Copyright 2017 Luiz Ribeiro + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "bfake.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = KEYMAP( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_RALT, KC_RGUI, KC_MENU, KC_RCTL + ), + [1] = KEYMAP( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, KC_DEL, + MO(1), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGDN, KC_TRNS, KC_TRNS, MO(2), + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = KEYMAP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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, + MO(1), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; + diff --git a/keyboards/ps2avrGB/bfake/rules.mk b/keyboards/ps2avrGB/bfake/rules.mk new file mode 100644 index 0000000000..e69de29bb2 diff --git a/keyboards/ps2avrGB/bmini_x2/bmini_x2.h b/keyboards/ps2avrGB/bmini_x2/bmini_x2.h new file mode 100644 index 0000000000..4e9da2314e --- /dev/null +++ b/keyboards/ps2avrGB/bmini_x2/bmini_x2.h @@ -0,0 +1,61 @@ +/* +Copyright 2017 Luiz Ribeiro + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef BMINI_H +#define BMINI_H + +#include "quantum.h" +#include "ps2avrGB.h" + +#define KEYMAP( \ + K05, K25, K35, K45, K55, K06, KA6, KA7, K07, KB5, KC5, KD5, KE5, KD1, KE1, KE2, \ + K04, K14, K24, K34, K44, K54, K16, KB6, KB7, K17, KA4, KB4, KC4, KE4, KD0, \ + K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3, KC3, KD3, K67, \ + K02, K12, K22, K32, K42, K52, K36, KD6, KD7, K37, KA2, KB2, KD2, KE0, \ + K01, K11, K21, K31, K41, K51, K46, KE6, KE7, K47, KA1, KB1, K86, K77, \ + K00, K10, K20, K56, K57, KB0, KC0, K66, K76, K96 \ +){ \ + { K00, K10, K20, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KB0, KC0, KD0, KE0 }, \ + { K01, K11, K21, K31, K41, K51, KC_NO, KC_NO, KC_NO, KC_NO, KA1, KB1, KC_NO, KD1, KE1 }, \ + { K02, K12, K22, K32, K42, K52, KC_NO, KC_NO, KC_NO, KC_NO, KA2, KB2, KC_NO, KD2, KE2 }, \ + { K03, K13, K23, K33, K43, K53, KC_NO, KC_NO, KC_NO, KC_NO, KA3, KB3, KC3, KD3, KC_NO }, \ + { K04, K14, K24, K34, K44, K54, KC_NO, KC_NO, KC_NO, KC_NO, KA4, KB4, KC4, KC_NO, KE4 }, \ + { K05, KC_NO, K25, K35, K45, K55, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KB5, KC5, KD5, KE5 }, \ + { K06, K16, K26, K36, K46, K56, K66, K76, K86, K96, KA6, KB6, KC6, KD6, KE6 }, \ + { K07, K17, K27, K37, K47, K57, K67, K77, KC_NO, KC_NO, KA7, KB7, KC7, KD7, KE7 } \ +} + +#define KC_KEYMAP( \ + K05, K25, K35, K45, K55, K06, KA6, KA7, K07, KB5, KC5, KD5, KE5, KD1, KE1, KE2, \ + K04, K14, K24, K34, K44, K54, K16, KB6, KB7, K17, KA4, KB4, KC4, KE4, KD0, \ + K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3, KC3, KD3, K67, \ + K02, K12, K22, K32, K42, K52, K36, KD6, KD7, K37, KA2, KB2, KD2, KE0, \ + K01, K11, K21, K31, K41, K51, K46, KE6, KE7, K47, KA1, KB1, K86, K77, \ + K00, K10, K20, K56, K57, KB0, KC0, K66, K76, K96 \ +) \ +{ \ + { KC_##K00, KC_##K10, KC_##K20, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KB0, KC_##KC0, KC_##KD0, KC_##KE0 }, \ + { KC_##K01, KC_##K11, KC_##K21, KC_##K31, KC_##K41, KC_##K51, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA1, KC_##KB1, KC_NO, KC_##KD1, KC_##KE1 }, \ + { KC_##K02, KC_##K12, KC_##K22, KC_##K32, KC_##K42, KC_##K52, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA2, KC_##KB2, KC_NO, KC_##KD2, KC_##KE2 }, \ + { KC_##K03, KC_##K13, KC_##K23, KC_##K33, KC_##K43, KC_##K53, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA3, KC_##KB3, KC_##KC3, KC_##KD3, KC_NO }, \ + { KC_##K04, KC_##K14, KC_##K24, KC_##K34, KC_##K44, KC_##K54, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA4, KC_##KB4, KC_##KC4, KC_NO, KC_##KE4 }, \ + { KC_##K05, KC_NO, KC_##K25, KC_##K35, KC_##K45, KC_##K55, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KB5, KC_##KC5, KC_##KD5, KC_##KE5 }, \ + { KC_##K06, KC_##K16, KC_##K26, KC_##K36, KC_##K46, KC_##K56, KC_##K66, KC_##K76, KC_##K86, KC_##K96, KC_##KA6, KC_##KB6, KC_##KC6, KC_##KD6, KC_##KE6 }, \ + { KC_##K07, KC_##K17, KC_##K27, KC_##K37, KC_##K47, KC_##K57, KC_##K67, KC_##K77, KC_NO, KC_NO, KC_##KA7, KC_##KB7, KC_##KC7, KC_##KD7, KC_##KE7 } \ +} + +#endif diff --git a/keyboards/ps2avrGB/bmini_x2/config.h b/keyboards/ps2avrGB/bmini_x2/config.h new file mode 100644 index 0000000000..edd2f0ee95 --- /dev/null +++ b/keyboards/ps2avrGB/bmini_x2/config.h @@ -0,0 +1,27 @@ +/* +Copyright 2017 Luiz Ribeiro + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef BMINI_CONFIG_H +#define BMINI_CONFIG_H + +#define MANUFACTURER winkeyless.kr + +/* matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 15 + +#endif diff --git a/keyboards/ps2avrGB/keymaps/default/keymap.c b/keyboards/ps2avrGB/bmini_x2/keymaps/default/keymap.c similarity index 88% rename from keyboards/ps2avrGB/keymaps/default/keymap.c rename to keyboards/ps2avrGB/bmini_x2/keymaps/default/keymap.c index 4650ff633f..325ec3665d 100644 --- a/keyboards/ps2avrGB/keymaps/default/keymap.c +++ b/keyboards/ps2avrGB/bmini_x2/keymaps/default/keymap.c @@ -15,16 +15,14 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "ps2avrGB.h" -#include "action_layer.h" -#include "rgblight.h" +#include "bmini_x2.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = KEYMAP( KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,KC_HOME,KC_END, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSPC, KC_DEL, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSLS, KC_INS, - KC_FN0, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_ENT, KC_PGUP, + MO(0), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_ENT, KC_PGUP, KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT, KC_UP, KC_PGDN, KC_LCTL,KC_LALT,KC_LGUI, KC_SPC, KC_RGUI,KC_RALT,KC_RCTL,KC_LEFT,KC_DOWN,KC_RGHT ), @@ -37,7 +35,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_RGHT ), }; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), -}; diff --git a/keyboards/ps2avrGB/bmini_x2/rules.mk b/keyboards/ps2avrGB/bmini_x2/rules.mk new file mode 100644 index 0000000000..e69de29bb2 diff --git a/keyboards/ps2avrGB/config.h b/keyboards/ps2avrGB/config.h index fc17b5d5e2..6d44dc3900 100644 --- a/keyboards/ps2avrGB/config.h +++ b/keyboards/ps2avrGB/config.h @@ -18,17 +18,12 @@ along with this program. If not, see . #ifndef CONFIG_H #define CONFIG_H +#include "config_common.h" + #define VENDOR_ID 0x20A0 #define PRODUCT_ID 0x422D -// TODO: share these strings with usbconfig.h -// Edit usbconfig.h to change these. -#define MANUFACTURER winkeyless.kr #define PRODUCT ps2avrGB -/* matrix size */ -#define MATRIX_ROWS 8 -#define MATRIX_COLS 15 - #define RGBLED_NUM 16 #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/ps2avrGB/matrix.c b/keyboards/ps2avrGB/matrix.c index 140026013f..57aa36b5ff 100644 --- a/keyboards/ps2avrGB/matrix.c +++ b/keyboards/ps2avrGB/matrix.c @@ -21,7 +21,7 @@ along with this program. If not, see . #include "matrix.h" #ifndef DEBOUNCE -# define DEBOUNCE 5 +#define DEBOUNCE 5 #endif static uint8_t debouncing = DEBOUNCE; diff --git a/keyboards/ps2avrGB/ps2avrGB.h b/keyboards/ps2avrGB/ps2avrGB.h index 35902cff4d..e83861e1f2 100644 --- a/keyboards/ps2avrGB/ps2avrGB.h +++ b/keyboards/ps2avrGB/ps2avrGB.h @@ -18,45 +18,14 @@ along with this program. If not, see . #ifndef KEYMAP_COMMON_H #define KEYMAP_COMMON_H -#include "quantum_keycodes.h" -#include "keycode.h" -#include "action.h" - -#define KEYMAP( \ - K05, K25, K35, K45, K55, K06, KA6, KA7, K07, KB5, KC5, KD5, KE5, KD1, KE1, KE2, \ - K04, K14, K24, K34, K44, K54, K16, KB6, KB7, K17, KA4, KB4, KC4, KE4, KD0, \ - K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3, KC3, KD3, K67, \ - K02, K12, K22, K32, K42, K52, K36, KD6, KD7, K37, KA2, KB2, KD2, KE0, \ - K01, K11, K21, K31, K41, K51, K46, KE6, KE7, K47, KA1, KB1, K86, K77, \ - K00, K10, K20, K56, K57, KB0, KC0, K66, K76, K96 \ -){ \ - { K00, K10, K20, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KB0, KC0, KD0, KE0 }, \ - { K01, K11, K21, K31, K41, K51, KC_NO, KC_NO, KC_NO, KC_NO, KA1, KB1, KC_NO, KD1, KE1 }, \ - { K02, K12, K22, K32, K42, K52, KC_NO, KC_NO, KC_NO, KC_NO, KA2, KB2, KC_NO, KD2, KE2 }, \ - { K03, K13, K23, K33, K43, K53, KC_NO, KC_NO, KC_NO, KC_NO, KA3, KB3, KC3, KD3, KC_NO }, \ - { K04, K14, K24, K34, K44, K54, KC_NO, KC_NO, KC_NO, KC_NO, KA4, KB4, KC4, KC_NO, KE4 }, \ - { K05, KC_NO, K25, K35, K45, K55, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KB5, KC5, KD5, KE5 }, \ - { K06, K16, K26, K36, K46, K56, K66, K76, K86, K96, KA6, KB6, KC6, KD6, KE6 }, \ - { K07, K17, K27, K37, K47, K57, K67, K77, KC_NO, KC_NO, KA7, KB7, KC7, KD7, KE7 } \ -} - -#define KC_KEYMAP( \ - K05, K25, K35, K45, K55, K06, KA6, KA7, K07, KB5, KC5, KD5, KE5, KD1, KE1, KE2, \ - K04, K14, K24, K34, K44, K54, K16, KB6, KB7, K17, KA4, KB4, KC4, KE4, KD0, \ - K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3, KC3, KD3, K67, \ - K02, K12, K22, K32, K42, K52, K36, KD6, KD7, K37, KA2, KB2, KD2, KE0, \ - K01, K11, K21, K31, K41, K51, K46, KE6, KE7, K47, KA1, KB1, K86, K77, \ - K00, K10, K20, K56, K57, KB0, KC0, K66, K76, K96 \ -) \ -{ \ - { KC_##K00, KC_##K10, KC_##K20, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KB0, KC_##KC0, KC_##KD0, KC_##KE0 }, \ - { KC_##K01, KC_##K11, KC_##K21, KC_##K31, KC_##K41, KC_##K51, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA1, KC_##KB1, KC_NO, KC_##KD1, KC_##KE1 }, \ - { KC_##K02, KC_##K12, KC_##K22, KC_##K32, KC_##K42, KC_##K52, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA2, KC_##KB2, KC_NO, KC_##KD2, KC_##KE2 }, \ - { KC_##K03, KC_##K13, KC_##K23, KC_##K33, KC_##K43, KC_##K53, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA3, KC_##KB3, KC_##KC3, KC_##KD3, KC_NO }, \ - { KC_##K04, KC_##K14, KC_##K24, KC_##K34, KC_##K44, KC_##K54, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA4, KC_##KB4, KC_##KC4, KC_NO, KC_##KE4 }, \ - { KC_##K05, KC_NO, KC_##K25, KC_##K35, KC_##K45, KC_##K55, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KB5, KC_##KC5, KC_##KD5, KC_##KE5 }, \ - { KC_##K06, KC_##K16, KC_##K26, KC_##K36, KC_##K46, KC_##K56, KC_##K66, KC_##K76, KC_##K86, KC_##K96, KC_##KA6, KC_##KB6, KC_##KC6, KC_##KD6, KC_##KE6 }, \ - { KC_##K07, KC_##K17, KC_##K27, KC_##K37, KC_##K47, KC_##K57, KC_##K67, KC_##K77, KC_NO, KC_NO, KC_##KA7, KC_##KB7, KC_##KC7, KC_##KD7, KC_##KE7 } \ -} +#include "quantum.h" + +#ifdef KEYBOARD_ps2avrGB_bfake + #include "bfake.h" +#endif + +#ifdef KEYBOARD_ps2avrGB_bmini_x2 + #include "bmini_x2.h" +#endif #endif From b45b22338925a48354b611d21c3cf3359e008e1e Mon Sep 17 00:00:00 2001 From: Ethan Madden Date: Wed, 25 Oct 2017 16:01:47 -0700 Subject: [PATCH 52/52] Small documentation and keymap tweaks for my minivan layout (#1891) * Added personal minivan keymap more consistent layer setup documentation! slide some things around more doc jiggling * Small layout and documentation tweaks Small documentation updates dropped Makefile that for some reason was still in my branch * found and removed extra makefile --- keyboards/tv44/keymaps/jetpacktuxedo/config.h | 5 ++--- keyboards/tv44/keymaps/jetpacktuxedo/keymap.c | 14 ++++++-------- keyboards/tv44/keymaps/jetpacktuxedo/readme.md | 6 +++--- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/keyboards/tv44/keymaps/jetpacktuxedo/config.h b/keyboards/tv44/keymaps/jetpacktuxedo/config.h index df06a26206..5f5872becc 100644 --- a/keyboards/tv44/keymaps/jetpacktuxedo/config.h +++ b/keyboards/tv44/keymaps/jetpacktuxedo/config.h @@ -3,6 +3,5 @@ #include "../../config.h" -// place overrides here - -#endif \ No newline at end of file +#define PERMISSIVE_HOLD +#endif diff --git a/keyboards/tv44/keymaps/jetpacktuxedo/keymap.c b/keyboards/tv44/keymaps/jetpacktuxedo/keymap.c index b8ba918f4a..f10cd6222f 100644 --- a/keyboards/tv44/keymaps/jetpacktuxedo/keymap.c +++ b/keyboards/tv44/keymaps/jetpacktuxedo/keymap.c @@ -1,26 +1,24 @@ #include "tv44.h" -#include "action_layer.h" -#include "eeconfig.h" extern keymap_config_t keymap_config; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = KEYMAP_ARROW_COMMAND( /* Qwerty */ - KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, - LT(2, KC_TAB), 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_UP, KC_SLSH, - KC_LCTL, KC_LGUI, KC_LALT, MO(3), MO(1), KC_SPC, MO(4), KC_LEFT, KC_DOWN, KC_RIGHT + KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + LT(2, KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, LT(2, KC_ENT), + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, MT(MOD_RSFT, KC_SLSH), + KC_LCTL, KC_LGUI, KC_LALT, MO(3), LT(1, KC_SPC), KC_SPC, MO(4), KC_LEFT, KC_DOWN, KC_RIGHT ), [1] = KEYMAP_ARROW_COMMAND( /* LAYER 2 */ 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_QUOT, 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_BSLS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_PGUP, KC_BSLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END ), [2] = KEYMAP_ARROW_COMMAND( /* LAYER 1 */ 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UNDS, KC_PLUS, KC_DQUO, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_PGUP, KC_PIPE, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LCBR, KC_RCBR, KC_PGUP, KC_PIPE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END ), [3] = KEYMAP_ARROW_COMMAND( /* LAYER 3 */ diff --git a/keyboards/tv44/keymaps/jetpacktuxedo/readme.md b/keyboards/tv44/keymaps/jetpacktuxedo/readme.md index a6cce3e3d0..937d3b4b17 100644 --- a/keyboards/tv44/keymaps/jetpacktuxedo/readme.md +++ b/keyboards/tv44/keymaps/jetpacktuxedo/readme.md @@ -4,7 +4,7 @@ This differs quite a bit from the stock layout but leaves keys in a more familia ## Base Layer (0) -The base layer is pretty simple, straight qwerty layout where available. Of note: /? is to the right of the arrow keys. Yes this is kinda weird sometimes, but you get used to it. Tab is tab when pressed and fn2 when held. GESC is esc when used alone, but ~ when shifted. +The base layer is pretty simple, straight qwerty layout where available. Of note: /? is to the right of the arrow keys. Yes this is kinda weird sometimes, but you get used to it. Tab is tab when pressed and fn2 when held, Enter is the same. GESC is esc when used alone, but ~ when shifted. Tapping FN 1 is space ``` |GESC| Q | W | E | R | T | Y | U | I | O | P | BSPC | | TAB | A | S | D | F | G | H | J | K | L | ; |ENTER| @@ -17,7 +17,7 @@ This layer has the numrow as well as swapping the arrow keys for a nav cluster, ``` | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | DEL | | | | | | | | | | - | = | ' | | -| | | | | | | | | | |PGUP| \ | +| | | | | | | | | [ | ] |PGUP| \ | | | | | | | | |HOME|PGDN|END | ``` ## Symbolic Layer (2) @@ -26,7 +26,7 @@ I don't want to be using two key combos constantly, so I also added this symbol ``` | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | DEL | | | | | | | | | | _ | + | " | | -| | | | | | | | | | |PGUP| | | +| | | | | | | | | { | } |PGUP| | | | | | | | | | |HOME|PGDN|END | ``` ## Fkeys (3)