From 4c71b329a228738f5c39eb07ed806ce14fbe97af Mon Sep 17 00:00:00 2001 From: Fabian Topfstedt Date: Mon, 26 Jun 2017 22:33:14 +0200 Subject: [PATCH 01/52] clone smt layout --- keyboards/lets_split/keymaps/fabian/config.h | 34 +++ keyboards/lets_split/keymaps/fabian/keymap.c | 219 ++++++++++++++++++ keyboards/lets_split/keymaps/fabian/readme.md | 88 +++++++ 3 files changed, 341 insertions(+) create mode 100644 keyboards/lets_split/keymaps/fabian/config.h create mode 100644 keyboards/lets_split/keymaps/fabian/keymap.c create mode 100644 keyboards/lets_split/keymaps/fabian/readme.md diff --git a/keyboards/lets_split/keymaps/fabian/config.h b/keyboards/lets_split/keymaps/fabian/config.h new file mode 100644 index 000000000..ba271d1ac --- /dev/null +++ b/keyboards/lets_split/keymaps/fabian/config.h @@ -0,0 +1,34 @@ +/* +Copyright 2012 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + + +#define USE_SERIAL + +#define MASTER_LEFT +// #define _MASTER_RIGHT +// #define EE_HANDS + + +#ifdef SUBPROJECT_rev1 + #include "../../rev1/config.h" +#endif +#ifdef SUBPROJECT_rev2 + #include "../../rev2/config.h" +#endif +#ifdef SUBPROJECT_rev2fliphalf + #include "../../rev2fliphalf/config.h" +#endif diff --git a/keyboards/lets_split/keymaps/fabian/keymap.c b/keyboards/lets_split/keymaps/fabian/keymap.c new file mode 100644 index 000000000..18d409f08 --- /dev/null +++ b/keyboards/lets_split/keymaps/fabian/keymap.c @@ -0,0 +1,219 @@ +#include "lets_split.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 0 +#define _COLEMAK 1 +#define _DVORAK 2 +#define _LOWER 3 +#define _RAISE 4 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + ADJUST, +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +// Custom macros +#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl +#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift +#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Alt+Shift) +#define MEH_GRV MEH_T(KC_GRV) // Tap for Backtick, hold for Meh (Ctrl+Alt+Shift) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------. ,-----------------------------------------. + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Esc | A | S | D | F | G | | H | J | K | L | ; | " | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | | N | M | , | . | / |Enter | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ` | Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------' `-----------------------------------------' + */ +[_QWERTY] = KEYMAP( \ + HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, \ + MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Colemak + * ,-----------------------------------------. ,-----------------------------------------. + * | Tab | Q | W | F | P | G | | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Esc | A | R | S | T | D | | H | N | E | I | O | " | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | | K | M | , | . | / |Enter | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ` | Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------' `-----------------------------------------' + */ +[_COLEMAK] = KEYMAP( \ + HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ + CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, \ + MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Dvorak + * ,-----------------------------------------. ,-----------------------------------------. + * | Tab | " | , | . | P | Y | | F | G | C | R | L | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Esc | A | O | E | U | I | | D | H | T | N | S | - | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ` | Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------' `-----------------------------------------' + */ +[_DVORAK] = KEYMAP( \ + HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ + CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \ + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT, \ + MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------. ,-----------------------------------------. + * | 0 | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | $ | F1 | F2 | F3 | F4 | F5 | | F6 | 4 | 5 | 6 | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | | F12 | 1 | 2 | 3 | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------' `-----------------------------------------' + */ +[_LOWER] = KEYMAP( \ + ALL_T(KC_0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ + CTL_T(KC_DLR), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_4, KC_5, KC_6, _______, _______, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise + * ,-----------------------------------------. ,-----------------------------------------. + * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | _ | ? | + | { | } | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | - | / | = | [ | ] | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | Home |PageDn|PageUp| End | + * `-----------------------------------------' `-----------------------------------------' + */ +[_RAISE] = KEYMAP( \ + ALL_T(KC_TILD), KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ + _______, _______, _______, _______, _______, _______, KC_UNDS, KC_QUES, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ + _______, _______, _______, _______, _______, _______, KC_MINS, KC_SLSH, KC_EQL, KC_LBRC, KC_RBRC, SFT_T(KC_BSLS), \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------. ,-----------------------------------------. + * | | Reset| | | | | | | | | | | Reset| + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm| |AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * `-----------------------------------------' `-----------------------------------------' + */ +[_ADJUST] = KEYMAP( \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +#endif + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + #endif + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case 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 DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + #endif + persistent_default_layer_set(1UL<<_DVORAK); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} diff --git a/keyboards/lets_split/keymaps/fabian/readme.md b/keyboards/lets_split/keymaps/fabian/readme.md new file mode 100644 index 000000000..20bc662f0 --- /dev/null +++ b/keyboards/lets_split/keymaps/fabian/readme.md @@ -0,0 +1,88 @@ +# smt's Let's Split keymap + +This keymap is ported from my Planck keymap. + + +## Qwerty + +``` +,-----------------------------------------. ,-----------------------------------------. +| Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| Esc | A | S | D | F | G | | H | J | K | L | ; | " | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| Shift| Z | X | C | V | B | | N | M | , | . | / |Enter | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| ` | Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right | +`-----------------------------------------' `-----------------------------------------' +``` + +## Colemak + +``` +,-----------------------------------------. ,-----------------------------------------. +| Tab | Q | W | F | P | G | | J | L | U | Y | ; | Bksp | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| Esc | A | R | S | T | D | | H | N | E | I | O | " | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| Shift| Z | X | C | V | B | | K | M | , | . | / |Enter | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| ` | Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right | +`-----------------------------------------' `-----------------------------------------' +``` + +## Dvorak + +``` +,-----------------------------------------. ,-----------------------------------------. +| Tab | " | , | . | P | Y | | F | G | C | R | L | Bksp | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| Esc | A | O | E | U | I | | D | H | T | N | S | - | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| Shift| ; | Q | J | K | X | | B | M | W | V | Z |Enter | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| ` | Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right | +`-----------------------------------------' `-----------------------------------------' +``` + +## Lower + +``` +,-----------------------------------------. ,-----------------------------------------. +| 0 | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| $ | F1 | F2 | F3 | F4 | F5 | | F6 | 4 | 5 | 6 | | | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | F7 | F8 | F9 | F10 | F11 | | F12 | 1 | 2 | 3 | | | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | | | | | | | | | Next | Vol- | Vol+ | Play | +`-----------------------------------------' `-----------------------------------------' +``` + +## Raise + +``` +,-----------------------------------------. ,-----------------------------------------. +| ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Del | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | | | | | | | _ | ? | + | { | } | | | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | | | | | | | - | / | = | [ | ] | \ | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | | | | | | | | | Home |PageDn|PageUp| End | +`-----------------------------------------' `-----------------------------------------' +``` + +## Adjust (Lower + Raise) + +``` +,-----------------------------------------. ,-----------------------------------------. +| | Reset| | | | | | | | | | | Reset| +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | | |Aud on|Audoff|AGnorm| |AGswap|Qwerty|Colemk|Dvorak| | | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | | | | | | | | | | | | | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | | | | | | | | | | | | | +`-----------------------------------------' `-----------------------------------------' +``` From 786eb4e73d92cbca81e7893095f9c689f4577d91 Mon Sep 17 00:00:00 2001 From: Fabian Topfstedt Date: Tue, 27 Jun 2017 09:14:04 +0200 Subject: [PATCH 02/52] my layout --- keyboards/lets_split/keymaps/fabian/keymap.c | 63 ++++++++++---------- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/keyboards/lets_split/keymaps/fabian/keymap.c b/keyboards/lets_split/keymaps/fabian/keymap.c index 18d409f08..1793bcc05 100644 --- a/keyboards/lets_split/keymaps/fabian/keymap.c +++ b/keyboards/lets_split/keymaps/fabian/keymap.c @@ -31,6 +31,7 @@ enum custom_keycodes { // Custom macros #define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl #define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift +#define SFT_BSP SFT_T(KC_BSPC) // Tap for Backspace, hold for Shift #define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Alt+Shift) #define MEH_GRV MEH_T(KC_GRV) // Tap for Backtick, hold for Meh (Ctrl+Alt+Shift) @@ -44,14 +45,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------| |------+------+------+------+------+------| * | Shift| Z | X | C | V | B | | N | M | , | . | / |Enter | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | ` | Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right | + * | ` | Ctrl | Alt | GUI |Lower |Space | | Bksp |Raise | GUI |AltGr | Ctrl | | * `-----------------------------------------' `-----------------------------------------' */ [_QWERTY] = KEYMAP( \ HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, \ - MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, SFT_BSP, RAISE, KC_RGUI, KC_RALT, KC_RCTL, _______ ), /* Colemak @@ -62,14 +63,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------| |------+------+------+------+------+------| * | Shift| Z | X | C | V | B | | K | M | , | . | / |Enter | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | ` | Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right | + * | ` | Ctrl | Alt | GUI |Lower |Space | | Bksp |Raise | GUI |AltGr | Ctrl | | * `-----------------------------------------' `-----------------------------------------' */ [_COLEMAK] = KEYMAP( \ HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, \ - MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, SFT_BSP, RAISE, KC_RGUI, KC_RALT, KC_RCTL, _______ ), /* Dvorak @@ -80,52 +81,52 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------| |------+------+------+------+------+------| * | Shift| ; | Q | J | K | X | | B | M | W | V | Z |Enter | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | ` | Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right | + * | ` | Ctrl | Alt | GUI |Lower |Space | | Bksp |Raise | GUI |AltGr | Ctrl | | * `-----------------------------------------' `-----------------------------------------' */ [_DVORAK] = KEYMAP( \ HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT, \ - MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, SFT_BSP, RAISE, KC_RGUI, KC_RALT, KC_RCTL, _______ ), /* Lower * ,-----------------------------------------. ,-----------------------------------------. - * | 0 | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | + * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Bksp | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | $ | F1 | F2 | F3 | F4 | F5 | | F6 | 4 | 5 | 6 | | | + * | Del | F1 | F2 | F3 | F4 | F5 | | F6 | _ | + | { | } | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | | F12 | 1 | 2 | 3 | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------' `-----------------------------------------' - */ -[_LOWER] = KEYMAP( \ - ALL_T(KC_0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ - CTL_T(KC_DLR), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_4, KC_5, KC_6, _______, _______, \ - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY -), - -/* Raise - * ,-----------------------------------------. ,-----------------------------------------. - * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Del | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | _ | ? | + | { | } | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | - | / | = | [ | ] | \ | + * | | F7 | F8 | F9 | F10 | F11 | | F12 | Left | Down | Up |Right | | * |------+------+------+------+------+------| |------+------+------+------+------+------| * | | | | | | | | | | Home |PageDn|PageUp| End | * `-----------------------------------------' `-----------------------------------------' */ -[_RAISE] = KEYMAP( \ - ALL_T(KC_TILD), KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ - _______, _______, _______, _______, _______, _______, KC_UNDS, KC_QUES, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ - _______, _______, _______, _______, _______, _______, KC_MINS, KC_SLSH, KC_EQL, KC_LBRC, KC_RBRC, SFT_T(KC_BSLS), \ +[_LOWER] = KEYMAP( \ + ALL_T(KC_TILD), KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_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_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END ), +/* Raise + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | | F12 | Left | Down | Up | Right| | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------' `-----------------------------------------' + */ +[_RAISE] = KEYMAP( \ + ALL_T(KC_GRV), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_BSLS, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + /* Adjust (Lower + Raise) * ,-----------------------------------------. ,-----------------------------------------. * | | Reset| | | | | | | | | | | Reset| From 7d0a471051551c3ef9d8a60dbf4bc5b1b2d70cea Mon Sep 17 00:00:00 2001 From: Fabian Topfstedt Date: Tue, 27 Jun 2017 09:18:05 +0200 Subject: [PATCH 03/52] removed wrong readme --- keyboards/lets_split/keymaps/fabian/readme.md | 88 ------------------- 1 file changed, 88 deletions(-) delete mode 100644 keyboards/lets_split/keymaps/fabian/readme.md diff --git a/keyboards/lets_split/keymaps/fabian/readme.md b/keyboards/lets_split/keymaps/fabian/readme.md deleted file mode 100644 index 20bc662f0..000000000 --- a/keyboards/lets_split/keymaps/fabian/readme.md +++ /dev/null @@ -1,88 +0,0 @@ -# smt's Let's Split keymap - -This keymap is ported from my Planck keymap. - - -## Qwerty - -``` -,-----------------------------------------. ,-----------------------------------------. -| Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | -|------+------+------+------+------+------| |------+------+------+------+------+------| -| Esc | A | S | D | F | G | | H | J | K | L | ; | " | -|------+------+------+------+------+------| |------+------+------+------+------+------| -| Shift| Z | X | C | V | B | | N | M | , | . | / |Enter | -|------+------+------+------+------+------| |------+------+------+------+------+------| -| ` | Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right | -`-----------------------------------------' `-----------------------------------------' -``` - -## Colemak - -``` -,-----------------------------------------. ,-----------------------------------------. -| Tab | Q | W | F | P | G | | J | L | U | Y | ; | Bksp | -|------+------+------+------+------+------| |------+------+------+------+------+------| -| Esc | A | R | S | T | D | | H | N | E | I | O | " | -|------+------+------+------+------+------| |------+------+------+------+------+------| -| Shift| Z | X | C | V | B | | K | M | , | . | / |Enter | -|------+------+------+------+------+------| |------+------+------+------+------+------| -| ` | Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right | -`-----------------------------------------' `-----------------------------------------' -``` - -## Dvorak - -``` -,-----------------------------------------. ,-----------------------------------------. -| Tab | " | , | . | P | Y | | F | G | C | R | L | Bksp | -|------+------+------+------+------+------| |------+------+------+------+------+------| -| Esc | A | O | E | U | I | | D | H | T | N | S | - | -|------+------+------+------+------+------| |------+------+------+------+------+------| -| Shift| ; | Q | J | K | X | | B | M | W | V | Z |Enter | -|------+------+------+------+------+------| |------+------+------+------+------+------| -| ` | Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right | -`-----------------------------------------' `-----------------------------------------' -``` - -## Lower - -``` -,-----------------------------------------. ,-----------------------------------------. -| 0 | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | -|------+------+------+------+------+------| |------+------+------+------+------+------| -| $ | F1 | F2 | F3 | F4 | F5 | | F6 | 4 | 5 | 6 | | | -|------+------+------+------+------+------| |------+------+------+------+------+------| -| | F7 | F8 | F9 | F10 | F11 | | F12 | 1 | 2 | 3 | | | -|------+------+------+------+------+------| |------+------+------+------+------+------| -| | | | | | | | | | Next | Vol- | Vol+ | Play | -`-----------------------------------------' `-----------------------------------------' -``` - -## Raise - -``` -,-----------------------------------------. ,-----------------------------------------. -| ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Del | -|------+------+------+------+------+------| |------+------+------+------+------+------| -| | | | | | | | _ | ? | + | { | } | | | -|------+------+------+------+------+------| |------+------+------+------+------+------| -| | | | | | | | - | / | = | [ | ] | \ | -|------+------+------+------+------+------| |------+------+------+------+------+------| -| | | | | | | | | | Home |PageDn|PageUp| End | -`-----------------------------------------' `-----------------------------------------' -``` - -## Adjust (Lower + Raise) - -``` -,-----------------------------------------. ,-----------------------------------------. -| | Reset| | | | | | | | | | | Reset| -|------+------+------+------+------+------| |------+------+------+------+------+------| -| | | |Aud on|Audoff|AGnorm| |AGswap|Qwerty|Colemk|Dvorak| | | -|------+------+------+------+------+------| |------+------+------+------+------+------| -| | | | | | | | | | | | | | -|------+------+------+------+------+------| |------+------+------+------+------+------| -| | | | | | | | | | | | | | -`-----------------------------------------' `-----------------------------------------' -``` From 9aa748df2a65517b7216ea5bd10aa64bfbf62c2a Mon Sep 17 00:00:00 2001 From: Fabian Topfstedt Date: Tue, 27 Jun 2017 10:36:00 +0200 Subject: [PATCH 04/52] my layout --- keyboards/lets_split/keymaps/fabian/keymap.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/keyboards/lets_split/keymaps/fabian/keymap.c b/keyboards/lets_split/keymaps/fabian/keymap.c index 1793bcc05..d448bb04b 100644 --- a/keyboards/lets_split/keymaps/fabian/keymap.c +++ b/keyboards/lets_split/keymaps/fabian/keymap.c @@ -45,14 +45,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------| |------+------+------+------+------+------| * | Shift| Z | X | C | V | B | | N | M | , | . | / |Enter | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | ` | Ctrl | Alt | GUI |Lower |Space | | Bksp |Raise | GUI |AltGr | Ctrl | | + * | GUI | Ctrl | Alt | GUI |Lower |Space | | Bksp |Raise | GUI |AltGr | Ctrl | GUI | * `-----------------------------------------' `-----------------------------------------' */ [_QWERTY] = KEYMAP( \ HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, \ - MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, SFT_BSP, RAISE, KC_RGUI, KC_RALT, KC_RCTL, _______ + KC_LGUI, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, SFT_BSP, RAISE, KC_RGUI, KC_RALT, KC_RCTL, KC_RGUI ), /* Colemak @@ -63,14 +63,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------| |------+------+------+------+------+------| * | Shift| Z | X | C | V | B | | K | M | , | . | / |Enter | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | ` | Ctrl | Alt | GUI |Lower |Space | | Bksp |Raise | GUI |AltGr | Ctrl | | + * | GUI | Ctrl | Alt | GUI |Lower |Space | | Bksp |Raise | GUI |AltGr | Ctrl | GUI | * `-----------------------------------------' `-----------------------------------------' */ [_COLEMAK] = KEYMAP( \ HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, \ - MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, SFT_BSP, RAISE, KC_RGUI, KC_RALT, KC_RCTL, _______ + KC_LGUI, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, SFT_BSP, RAISE, KC_RGUI, KC_RALT, KC_RCTL, KC_RGUI ), /* Dvorak @@ -81,14 +81,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------| |------+------+------+------+------+------| * | Shift| ; | Q | J | K | X | | B | M | W | V | Z |Enter | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | ` | Ctrl | Alt | GUI |Lower |Space | | Bksp |Raise | GUI |AltGr | Ctrl | | + * | GUI | Ctrl | Alt | GUI |Lower |Space | | Bksp |Raise | GUI |AltGr | Ctrl | GUI | * `-----------------------------------------' `-----------------------------------------' */ [_DVORAK] = KEYMAP( \ HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT, \ - MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, SFT_BSP, RAISE, KC_RGUI, KC_RALT, KC_RCTL, _______ + KC_LGUI, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, SFT_BSP, RAISE, KC_RGUI, KC_RALT, KC_RCTL, KC_RGUI ), /* Lower From 99b6e918eab31d4f53cabc04a995da945335ac7f Mon Sep 17 00:00:00 2001 From: Fabian Topfstedt Date: Tue, 27 Jun 2017 16:20:17 +0200 Subject: [PATCH 05/52] fixed brackets --- keyboards/lets_split/keymaps/fabian/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/lets_split/keymaps/fabian/keymap.c b/keyboards/lets_split/keymaps/fabian/keymap.c index d448bb04b..b3e19aaea 100644 --- a/keyboards/lets_split/keymaps/fabian/keymap.c +++ b/keyboards/lets_split/keymaps/fabian/keymap.c @@ -122,7 +122,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_RAISE] = KEYMAP( \ ALL_T(KC_GRV), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ - KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_BSLS, \ + 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_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY ), From e256468e486ef705be107ee46d8128aa2d9638bd Mon Sep 17 00:00:00 2001 From: That-Canadian Date: Tue, 4 Jul 2017 14:14:26 -0400 Subject: [PATCH 06/52] Added ECO keyboard folder and configuration files. Also added my (That-Canadian) keymap folder and files. --- keyboards/eco/Makefile | 5 + keyboards/eco/config.h | 68 ++++++ keyboards/eco/eco.c | 1 + keyboards/eco/eco.h | 10 + keyboards/eco/keymaps/that-canadian/Makefile | 25 ++ keyboards/eco/keymaps/that-canadian/keymap.c | 217 ++++++++++++++++++ keyboards/eco/keymaps/that-canadian/readme.md | 1 + keyboards/eco/readme.md | 9 + keyboards/eco/rev1/Makefile | 3 + keyboards/eco/rev1/config.h | 79 +++++++ keyboards/eco/rev1/rev1.c | 1 + keyboards/eco/rev1/rev1.h | 24 ++ keyboards/eco/rev1/rules.mk | 5 + keyboards/eco/rules.mk | 68 ++++++ 14 files changed, 516 insertions(+) create mode 100644 keyboards/eco/Makefile create mode 100644 keyboards/eco/config.h create mode 100644 keyboards/eco/eco.c create mode 100644 keyboards/eco/eco.h create mode 100644 keyboards/eco/keymaps/that-canadian/Makefile create mode 100644 keyboards/eco/keymaps/that-canadian/keymap.c create mode 100644 keyboards/eco/keymaps/that-canadian/readme.md create mode 100644 keyboards/eco/readme.md create mode 100644 keyboards/eco/rev1/Makefile create mode 100644 keyboards/eco/rev1/config.h create mode 100644 keyboards/eco/rev1/rev1.c create mode 100644 keyboards/eco/rev1/rev1.h create mode 100644 keyboards/eco/rev1/rules.mk create mode 100644 keyboards/eco/rules.mk diff --git a/keyboards/eco/Makefile b/keyboards/eco/Makefile new file mode 100644 index 000000000..30b43c4ea --- /dev/null +++ b/keyboards/eco/Makefile @@ -0,0 +1,5 @@ +SUBPROJECT_DEFAULT = rev1 + +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif \ No newline at end of file diff --git a/keyboards/eco/config.h b/keyboards/eco/config.h new file mode 100644 index 000000000..b5676d5af --- /dev/null +++ b/keyboards/eco/config.h @@ -0,0 +1,68 @@ +/* +Copyright 2012 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x1337 +#define PRODUCT_ID 0x6006 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Bishop Keyboards +#define PRODUCT The ECO Keyboard +#define DESCRIPTION An economical ortholinear keyboard + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* + * 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/eco/eco.c b/keyboards/eco/eco.c new file mode 100644 index 000000000..84097652d --- /dev/null +++ b/keyboards/eco/eco.c @@ -0,0 +1 @@ +#include "eco.h" diff --git a/keyboards/eco/eco.h b/keyboards/eco/eco.h new file mode 100644 index 000000000..9da33b9b8 --- /dev/null +++ b/keyboards/eco/eco.h @@ -0,0 +1,10 @@ +#ifndef ECO_H +#define ECO_H + +#ifdef SUBPROJECT_rev1 + #include "rev1.h" +#endif + +#include "quantum.h" + +#endif \ No newline at end of file diff --git a/keyboards/eco/keymaps/that-canadian/Makefile b/keyboards/eco/keymaps/that-canadian/Makefile new file mode 100644 index 000000000..7dab97942 --- /dev/null +++ b/keyboards/eco/keymaps/that-canadian/Makefile @@ -0,0 +1,25 @@ + + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = 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/eco/keymaps/that-canadian/keymap.c b/keyboards/eco/keymaps/that-canadian/keymap.c new file mode 100644 index 000000000..37637bce3 --- /dev/null +++ b/keyboards/eco/keymaps/that-canadian/keymap.c @@ -0,0 +1,217 @@ +// 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 + +#include "eco.h" +#include "action_layer.h" +#ifdef AUDIO_ENABLE + #include "audio.h" +#endif +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 0 +#define _LOWER 2 +#define _RAISE 3 + +#define _FUNCTION 15 +#define _ADJUST 16 + +enum eco_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +// Defines for task manager and such +#define CALTDEL LCTL(LALT(KC_DEL)) +#define TSKMGR LCTL(LSFT(KC_ESC)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-------------------------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | ( | ) | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Func | A | S | D | F | G | [ | ] | H | J | K | L | ; | Enter| + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | { | } | N | M | , | . | / | ' | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | ` | GUI | Alt |Lower | Space|Pg-dwn| Pg-up| Space|Raise | Left | Down | Up |Right | + * `-------------------------------------------------------------------------------------------------' + */ +[_QWERTY] = { + {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LPRN, KC_RPRN, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, + {MO(_FUNCTION), KC_A, KC_S, KC_D, KC_F, KC_G, KC_LBRC, KC_RBRC, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT}, + {OSM(MOD_LSFT), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LCBR, KC_RCBR, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT}, + {KC_LCTL, KC_GRV, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_PGDN, KC_PGUP, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +/* Lower + * ,-------------------------------------------------------------------------------------------------. + * | Esc | ! | @ | # | $ | % | | | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | | | F6 | _ | + | { | } |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | | | F12 | | | Mute | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | |Lower | | | | Bksp |Raise | Next | Vol- | Vol+ | Play | + * `-------------------------------------------------------------------------------------------------' + */ +[_LOWER] = { + {KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, + {_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______}, + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, KC_F12, _______, _______, KC_MUTE, _______, KC_PIPE}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_BSPC, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} +}, + +/* Raise + * ,-------------------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | | | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | 4 | 5 | 6 | + | | | | | - | = | [ | ] |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |Enter | 7 | 8 | 9 | - | | | | | | | Mute | | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | , | 0 | . |Lower | Bksp | | | |Raise | Next | Vol- | Vol+ | Play | + * `-------------------------------------------------------------------------------------------------' + */ +[_RAISE] = { + {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_4, KC_5, KC_6, KC_PLUS, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______}, + {KC_ENT, KC_7, KC_8, KC_9, KC_MINS, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, KC_BSLS}, + {_______, KC_COMM, KC_0, KC_DOT, _______, KC_BSPC, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} +}, + +/* Adjust (Lower + Raise) + * ,-------------------------------------------------------------------------------------------------. + * |Taskmg| Reset| | | | | | | | | | | |caltde| + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | |qqqqqqqqq + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | + * `-------------------------------------------------------------------------------------------------' + */ +[_ADJUST] = { + {TSKMGR, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CALTDEL}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +}, + +/* Function + * ,-------------------------------------------------------------------------------------------------. + * | | | | | | | | | | | Up | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | Left | Down |Right | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Caps | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | + * `-------------------------------------------------------------------------------------------------' + */ +[_FUNCTION] = { + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______}, + {KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +} + +}; + +#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 music_scale[][2] = SONG(MUSIC_SCALE_SOUND); + +float tone_goodbye[][2] = SONG(GOODBYE_SOUND); +#endif + + +void persistant_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + #endif + persistant_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + } + return true; +} + +void matrix_init_user(void) { + #ifdef AUDIO_ENABLE + startup_user(); + #endif +} + +#ifdef AUDIO_ENABLE + +void startup_user() +{ + _delay_ms(20); // gets rid of tick + PLAY_NOTE_ARRAY(tone_startup, false, 0); +} + +void shutdown_user() +{ + PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + _delay_ms(150); + stop_all_notes(); +} + +void music_on_user(void) +{ + music_scale_user(); +} + +void music_scale_user(void) +{ + PLAY_NOTE_ARRAY(music_scale, false, 0); +} + +#endif diff --git a/keyboards/eco/keymaps/that-canadian/readme.md b/keyboards/eco/keymaps/that-canadian/readme.md new file mode 100644 index 000000000..aa3316af0 --- /dev/null +++ b/keyboards/eco/keymaps/that-canadian/readme.md @@ -0,0 +1 @@ +# ECO Layout by u/That-Canadian \ No newline at end of file diff --git a/keyboards/eco/readme.md b/keyboards/eco/readme.md new file mode 100644 index 000000000..3f6bc2d28 --- /dev/null +++ b/keyboards/eco/readme.md @@ -0,0 +1,9 @@ +ECO +=== + +![Planck](http://i.imgur.com/q2M3uEU.jpg) + +An economical 4x14 ortholinear keyboard + +Design and concept by : BishopKeyboards +PCB by : u/That-Canadian diff --git a/keyboards/eco/rev1/Makefile b/keyboards/eco/rev1/Makefile new file mode 100644 index 000000000..4e2a6f00f --- /dev/null +++ b/keyboards/eco/rev1/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif \ No newline at end of file diff --git a/keyboards/eco/rev1/config.h b/keyboards/eco/rev1/config.h new file mode 100644 index 000000000..c25723e84 --- /dev/null +++ b/keyboards/eco/rev1/config.h @@ -0,0 +1,79 @@ +/* +Copyright 2012 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x1337 +#define PRODUCT_ID 0x6006 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Bishop Keyboards +#define PRODUCT The ECO Keyboard +#define DESCRIPTION An economical ortholinear keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 14 + +/* Planck PCB default pin-out */ +#define MATRIX_ROW_PINS { B1, B6, B2, B3 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B5, B4, E6, D7, C6, D4, D0, D1, D2, D3 } +#define UNUSED_PINS + +#define CATERINA_BOOTLOADER + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* + * 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/eco/rev1/rev1.c b/keyboards/eco/rev1/rev1.c new file mode 100644 index 000000000..84097652d --- /dev/null +++ b/keyboards/eco/rev1/rev1.c @@ -0,0 +1 @@ +#include "eco.h" diff --git a/keyboards/eco/rev1/rev1.h b/keyboards/eco/rev1/rev1.h new file mode 100644 index 000000000..41541ac05 --- /dev/null +++ b/keyboards/eco/rev1/rev1.h @@ -0,0 +1,24 @@ +#ifndef REV1_H +#define REV1_H + +#include "../eco.h" + +//void promicro_bootloader_jmp(bool program); +#include "quantum.h" + +//void promicro_bootloader_jmp(bool program); + +#define KEYMAP( \ + k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, k014, \ + k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114, \ + k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, k214, \ + k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, k314 \ + ) \ + { \ + { k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, k014 }, \ + { k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114 }, \ + { k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, k214 }, \ + { k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, k314 } \ + } + +#endif \ No newline at end of file diff --git a/keyboards/eco/rev1/rules.mk b/keyboards/eco/rev1/rules.mk new file mode 100644 index 000000000..a0825b4ef --- /dev/null +++ b/keyboards/eco/rev1/rules.mk @@ -0,0 +1,5 @@ +BACKLIGHT_ENABLE = no + +ifndef QUANTUM_DIR + include ../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/eco/rules.mk b/keyboards/eco/rules.mk new file mode 100644 index 000000000..cf26cdc0d --- /dev/null +++ b/keyboards/eco/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 = 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 = yes # MIDI controls +AUDIO_ENABLE = yes # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +API_SYSEX_ENABLE = 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 f9e8d25e2ed7540075e30c07be20a45480969431 Mon Sep 17 00:00:00 2001 From: That-Canadian Date: Tue, 4 Jul 2017 14:19:49 -0400 Subject: [PATCH 07/52] Updated ECO readme file, includes picture of ECO now. --- keyboards/eco/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/eco/readme.md b/keyboards/eco/readme.md index 3f6bc2d28..942e1800a 100644 --- a/keyboards/eco/readme.md +++ b/keyboards/eco/readme.md @@ -1,7 +1,7 @@ ECO === -![Planck](http://i.imgur.com/q2M3uEU.jpg) +![ECO](http://i.imgur.com/YligKxr.jpg) An economical 4x14 ortholinear keyboard From c534c3e734abc7335f92d2038804e18d02823e93 Mon Sep 17 00:00:00 2001 From: That-Canadian Date: Tue, 4 Jul 2017 15:26:25 -0400 Subject: [PATCH 08/52] Updated ECO files to follow proper formatting. Also updated that-canadian keymap to take out extraneous characters. --- keyboards/eco/config.h | 11 +++- keyboards/eco/keymaps/that-canadian/keymap.c | 2 +- keyboards/eco/readme.md | 10 +++- keyboards/eco/rev1/config.h | 57 ++------------------ 4 files changed, 23 insertions(+), 57 deletions(-) diff --git a/keyboards/eco/config.h b/keyboards/eco/config.h index b5676d5af..af7e1822c 100644 --- a/keyboards/eco/config.h +++ b/keyboards/eco/config.h @@ -23,11 +23,16 @@ along with this program. If not, see . /* USB Device descriptor parameter */ #define VENDOR_ID 0x1337 #define PRODUCT_ID 0x6006 -#define DEVICE_VER 0x0001 #define MANUFACTURER Bishop Keyboards #define PRODUCT The ECO Keyboard #define DESCRIPTION An economical ortholinear keyboard +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 14 + +#define CATERINA_BOOTLOADER + /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW @@ -65,4 +70,8 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION +#ifdef SUBPROJECT_rev1 + #include "rev1/config.h" +#endif + #endif diff --git a/keyboards/eco/keymaps/that-canadian/keymap.c b/keyboards/eco/keymaps/that-canadian/keymap.c index 37637bce3..87f859e8e 100644 --- a/keyboards/eco/keymaps/that-canadian/keymap.c +++ b/keyboards/eco/keymaps/that-canadian/keymap.c @@ -99,7 +99,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | | |qqqqqqqqq + * | | | | | | | | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | | | | * `-------------------------------------------------------------------------------------------------' diff --git a/keyboards/eco/readme.md b/keyboards/eco/readme.md index 942e1800a..819648a2a 100644 --- a/keyboards/eco/readme.md +++ b/keyboards/eco/readme.md @@ -5,5 +5,11 @@ ECO An economical 4x14 ortholinear keyboard -Design and concept by : BishopKeyboards -PCB by : u/That-Canadian +Keyboard Maintainer: BishopKeyboards and That-Canadian +Hardware Supported: ECO PCB rev1 Pro Micro + +Make example for this keyboard (after setting up your build environment): + + make eco-rev1-that-canadian + +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. \ No newline at end of file diff --git a/keyboards/eco/rev1/config.h b/keyboards/eco/rev1/config.h index c25723e84..1e97a703d 100644 --- a/keyboards/eco/rev1/config.h +++ b/keyboards/eco/rev1/config.h @@ -15,65 +15,16 @@ 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 REV1_CONFIG_H +#define REV1_CONFIG_H -#include "config_common.h" +#include "../config.h" -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x1337 -#define PRODUCT_ID 0x6006 #define DEVICE_VER 0x0001 -#define MANUFACTURER Bishop Keyboards -#define PRODUCT The ECO Keyboard -#define DESCRIPTION An economical ortholinear keyboard -/* key matrix size */ -#define MATRIX_ROWS 4 -#define MATRIX_COLS 14 - -/* Planck PCB default pin-out */ +/* ECO V1 pin-out */ #define MATRIX_ROW_PINS { B1, B6, B2, B3 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B5, B4, E6, D7, C6, D4, D0, D1, D2, D3 } #define UNUSED_PINS -#define CATERINA_BOOTLOADER - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE - -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - -/* - * 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 From db5bb7dbbfa2d2eb4f41aa4c768c3c5c8d73f563 Mon Sep 17 00:00:00 2001 From: That-Canadian Date: Tue, 4 Jul 2017 15:41:14 -0400 Subject: [PATCH 09/52] Changed - to _ for keymap that-canadian for compatability reasons. --- keyboards/eco/keymaps/{that-canadian => that_canadian}/Makefile | 0 keyboards/eco/keymaps/{that-canadian => that_canadian}/keymap.c | 0 .../eco/keymaps/{that-canadian => that_canadian}/readme.md | 0 keyboards/eco/readme.md | 2 +- 4 files changed, 1 insertion(+), 1 deletion(-) rename keyboards/eco/keymaps/{that-canadian => that_canadian}/Makefile (100%) rename keyboards/eco/keymaps/{that-canadian => that_canadian}/keymap.c (100%) rename keyboards/eco/keymaps/{that-canadian => that_canadian}/readme.md (100%) diff --git a/keyboards/eco/keymaps/that-canadian/Makefile b/keyboards/eco/keymaps/that_canadian/Makefile similarity index 100% rename from keyboards/eco/keymaps/that-canadian/Makefile rename to keyboards/eco/keymaps/that_canadian/Makefile diff --git a/keyboards/eco/keymaps/that-canadian/keymap.c b/keyboards/eco/keymaps/that_canadian/keymap.c similarity index 100% rename from keyboards/eco/keymaps/that-canadian/keymap.c rename to keyboards/eco/keymaps/that_canadian/keymap.c diff --git a/keyboards/eco/keymaps/that-canadian/readme.md b/keyboards/eco/keymaps/that_canadian/readme.md similarity index 100% rename from keyboards/eco/keymaps/that-canadian/readme.md rename to keyboards/eco/keymaps/that_canadian/readme.md diff --git a/keyboards/eco/readme.md b/keyboards/eco/readme.md index 819648a2a..8fef3a1ce 100644 --- a/keyboards/eco/readme.md +++ b/keyboards/eco/readme.md @@ -10,6 +10,6 @@ Hardware Supported: ECO PCB rev1 Pro Micro Make example for this keyboard (after setting up your build environment): - make eco-rev1-that-canadian + make eco-rev1-that_canadian 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. \ No newline at end of file From cb9e59152e30f3cd543963282b1fa616cb8b037b Mon Sep 17 00:00:00 2001 From: skullY Date: Sat, 8 Jul 2017 19:59:20 -0700 Subject: [PATCH 10/52] Flesh out the glossary --- docs/glossary.md | 139 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 138 insertions(+), 1 deletion(-) diff --git a/docs/glossary.md b/docs/glossary.md index fac1952a6..101fabccb 100644 --- a/docs/glossary.md +++ b/docs/glossary.md @@ -1,29 +1,166 @@ # Glossary of QMK terms +## ARM +A line of 32-bit MCU's produced by a number of companies, such as Atmel, Cypress, Kinetis, NXP, ST, and TI. + +## AVR +A line of 8-bit MCU's produced by [Atmel](http://atmel.com). AVR was the original platform that TMK supported. + +## AZERTY +The standard Français (French) keyboard layout. Named for the first 6 keys on the keyboard. + +## Backlight +A generic term for lighting on a keyboard. The backlight is typically, but not always, an array of LED's that shine through keycaps and/or switches. + +## Bluetooth +A short range peer to peer wireless protocol. Most common wireless protocol for a keyboard. + +## Bootloader +A special program that is written to a protected area of your MCU that allows the MCU to upgrade its own firmware, typically over USB. + +## Bootmagic +A feature that allows for various keyboard behavior changes to happen on the fly, such as swapping or disabling common keys. + +## C +A low-level programming language suitable for system code. Most QMK code is written in C. + +## Colemak +An alternative keyboard layout that is gaining in popularity. + +## Compile +The process of turning human readable code into machine code your MCU can run. + +## Dvorak +An alternative keyboard layout developed by Dr. August Dvorak in the 1930's. A shortened form of the Dvorak Simplified Keyboard. + ## 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) + +## Eclipse +An IDE that is popular with many C developers. + +* [Eclipse Setup Instructions](eclipse.html) + +## Firmware +The software that controls your MCU. + +## FLIP +Software provided by Atmel for flashing AVR devices. We generally recommend [QMK Flasher](https://github.com/qmk/qmk_flasher) instead, but for some advanced use cases FLIP is required. + ## git Versioning software used at the commandline +## GitHub +The website that hosts most of the QMK project. It provides integration with git, issue tracking, and other features that help us run QMK. + +## ISP +In-system programming, a method of programming an AVR chip using external hardware and the JTAG pins. + +## hid_listen +An interface for receiving debugging messages from your keyboard. You can view these messages using [QMK Flasher](https://github.com/qmk/qmk_flasher) or [PJRC's hid_listen](https://www.pjrc.com/teensy/hid_listen.html) + ## Keycode A 2-byte number that represents a particular key. `0x00`-`0xFF` are used for [Basic Keycodes](keycodes.html) while `0x100`-`0xFFFF` are used for [Quantum Keycodes](quantum_keycodes.html). +## Key Down +An event that happens when a key is pressed down, but is completed before a key is released. + +## Key Up +An event that happens when a key is released. + ## Keymap An array of keycodes mapped to a physical keyboard layout, which are processed on key presses and releases +## Layer +An abstraction used to allow a key to serve multiple purposes. The highest active layer takes precedence. + +## Leader Key +A feature that allows you to tap the leader key followed by a sequence of 1, 2, or 3 keys to activate key presses or other quantum features. + +* [Leader Key Documentation](leader_key.html) + +## LED +Light Emitting Diode, the most common device used for indicators on a keyboard. + +## Make +Software package that is used to compile all the source files. You run `make` with various options to compile your keyboard firmware. + ## Matrix -A wiring pattern of columns and rows (and usually diodes) that enables the MCU to detect keypresses with a fewer number of pins +A wiring pattern of columns and rows that enables the MCU to detect keypresses with a fewer number of pins. The matrix often incorporates diodes to allow for NKRO. ## Macro A feature that lets you send muiltple keypress events (hid reports) after having pressed only a single key. +* [Macro Documentation](macros.html) + +## MCU +Microcontrol Unit, the processor that powers your keyboard. + +## Modifier +A key that is held down while typing another key to modify the action of that key. Examples include Ctrl, Alt, and Shift. + ## Mousekeys A feature that lets you control your mouse cursor and click from your keyboard. * [Mousekeys Documentation](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. + +## Oneshot Modifier +A modifier that acts as if it is held down until another key is released, so you can press the mod and then press the key, rather than holding the mod while pressing the key. + +## ProMicro +A low cost AVR development board. Clones of this device are often found on ebay very inexpensively (under $5) but people often struggle with flashing their pro micros. + +## Pull Request +A request to submit code to QMK. We encourage all users to submit Pull Requests for their personal keymaps. + +## QWERTY +The standard English keyboard layout, and often a shortcut for other language's standard layouts. Named for the first 6 letters on the keyboard. + +## QWERTZ +The standard Deutsche (German) keyboard layout. Named for the first 6 letters on the keyboard. + +## Rollover +The term for pressing a key while a key is already held down. Variants include 2KRO, 6KRO, and NKRO. + +## Scancode +A 1 byte number that is sent as part of a HID report over USB that represents a single key. These numbers are documented in the [HID Usage Tables](http://www.usb.org/developers/hidpage/Hut1_12v2.pdf) published by the [USB-IF](http://www.usb.org/). + +## 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) + +## 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. + ## 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.html) + +## 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. + +## Underlight +A generic term for LEDs that light the underside of the board. These LED's typically shine away from the bottom of the PCB and towards the surface the keyboard rests on. + +## 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.html) + +## Unit Testing +A framework for running automated tests against QMK. Unit testing helps us be confident that our changes do not break anything. + +* [Unit Testing Documentation](unit_testing.html) + +## USB +Universal Serial Bus, the most common wired interface for a keyboard. + +## USB Host (or simply Host) +The USB Host is your computer, or whatever device your keyboard is plugged into. From 5810bb67e4280582ef2811a7246f90d5f0bf292d Mon Sep 17 00:00:00 2001 From: skullY Date: Sat, 8 Jul 2017 19:59:07 -0700 Subject: [PATCH 11/52] Rearrange the faq a bit --- docs/faq.md | 110 ++++++++++++++++++++++++++-------------------------- 1 file changed, 56 insertions(+), 54 deletions(-) diff --git a/docs/faq.md b/docs/faq.md index d7f2a6f4f..3287578ac 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -1,10 +1,16 @@ # Frequently Asked Questions -## What is QMK? +## General + +### What is QMK? [QMK](https://github.com/qmk), short for Quantum Mechanical Keyboard, is a group of people building tools for custom keyboards. We started with the [QMK firmware](https://github.com/qmk/qmk_firmware), a heavily modified fork of [TMK](https://github.com/tmk/tmk_keyboard). -## What Differences Are There Between QMK and TMK? +### Why the name Quantum? + + + +### What Differences Are There Between QMK and TMK? TMK was originally designed and implemented by [Jun Wako](https://github.com/tmk). QMK started as [Jack Humbert's](https://github.com/jackhumbert) fork of TMK for the Planck. After a while Jack's fork had diverged quite a bit from TMK, and in 2015 Jack decided to rename his fork to QMK. @@ -14,8 +20,22 @@ From a project and community management standpoint TMK maintains all the officia Both approaches have their merits and their drawbacks, and code flows freely between TMK and QMK when it makes sense. -# Debug Console -## hid_listen can't recognize device +# Building + +## Windows + +### I'm on Windows Vista, 7, or 8, how do I setup my build environment? + +Follow the build instructions to [install MHV AVR Tools](https://docs.qmk.fm/build_environment_setup.html#windows-vista-and-later). + +### I'm on Windows 10 without the Creators Update. Do I have to install it? + +No, but if you don't install the creators update you will not be able to build and flash with a single command. You will be able to build but to flash you will have to use a separate program, such as [QMK Flasher](https://github.com/qmk/qmk_flasher). + +# Troubleshooting + +## Debug Console +### hid_listen can't recognize device When debug console of your device is not ready you will see like this: ``` @@ -34,7 +54,7 @@ If you can't get this 'Listening:' message try building with `CONSOLE_ENABLE=yes You may need privilege to access the device on OS like Linux. - try `sudo hid_listen` -## Can't get message on console +### Can't get message on console Check: - *hid_listen* finds your device. See above. - Enable debug with pressing **Magic**+d. See [Magic Commands](https://github.com/tmk/tmk_keyboard#magic-commands). @@ -42,7 +62,7 @@ Check: - try using 'print' function instead of debug print. See **common/print.h**. - disconnect other devices with console function. See [Issue #97](https://github.com/tmk/tmk_keyboard/issues/97). -## Linux or UNIX like system requires Super User privilege +### Linux or UNIX like system requires Super User privilege Just use 'sudo' to execute *hid_listen* with privilege. ``` $ sudo hid_listen @@ -56,10 +76,9 @@ File: /etc/udev/rules.d/52-tmk-keyboard.rules(in case of Ubuntu) SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666" ``` -*** +## Software Issues -# Miscellaneous -## NKRO Doesn't work +### NKRO Doesn't work First you have to compile frimware with this build option `NKRO_ENABLE` in **Makefile**. Try `Magic` **N** command(`LShift+RShift+N` by default) when **NKRO** still doesn't work. You can use this command to toggle between **NKRO** and **6KRO** mode temporarily. In some situations **NKRO** doesn't work you need to switch to **6KRO** mode, in particular when you are in BIOS. @@ -68,15 +87,7 @@ If your firmeare built with `BOOTMAGIC_ENABLE` you need to turn its switch on by https://github.com/tmk/tmk_keyboard#boot-magic-configuration---virtual-dip-switch - -## TrackPoint needs reset circuit(PS/2 mouse support) -Without reset circuit you will have inconsistent reuslt due to improper initialize of the hardware. See circuit schematic of TPM754. - -- http://geekhack.org/index.php?topic=50176.msg1127447#msg1127447 -- http://www.mikrocontroller.net/attachment/52583/tpm754.pdf - - -## Can't read column of matrix beyond 16 +### Can't read column of matrix beyond 16 Use `1UL<<16` instead of `1<<16` in `read_cols()` in [matrix.h] when your columns goes beyond 16. In C `1` means one of [int] type which is [16bit] in case of AVR so you can't shift left more than 15. You will get unexpected zero when you say `1<<16`. You have to use [unsigned long] type with `1UL`. @@ -84,16 +95,16 @@ In C `1` means one of [int] type which is [16bit] in case of AVR so you can't sh http://deskthority.net/workshop-f7/rebuilding-and-redesigning-a-classic-thinkpad-keyboard-t6181-60.html#p146279 -## Bootloader jump doesn't work +### Bootloader jump doesn't work Properly configure bootloader size in **Makefile**. With wrong section size bootloader won't probably start with **Magic command** and **Boot Magic**. ``` # Size of Bootloaders in bytes: -# Atmel DFU loader(ATmega32U4) 4096 -# Atmel DFU loader(AT90USB128) 8192 -# LUFA bootloader(ATmega32U4) 4096 -# Arduino Caterina(ATmega32U4) 4096 -# USBaspLoader(ATmega***) 2048 -# Teensy halfKay(ATmega32U4) 512 +# Atmel DFU loader(ATmega32U4) 4096 +# Atmel DFU loader(AT90USB128) 8192 +# LUFA bootloader(ATmega32U4) 4096 +# Arduino Caterina(ATmega32U4) 4096 +# USBaspLoader(ATmega***) 2048 +# Teensy halfKay(ATmega32U4) 512 # Teensy++ halfKay(AT90USB128) 2048 OPT_DEFS += -DBOOTLOADER_SIZE=4096 ``` @@ -107,14 +118,14 @@ byte Atmel/LUFA(ATMega32u4) byte Atmel(AT90SUB1286) | | | | | | | | | Application | | Application | - | | | | + | | | | = = = = | | 32KB-4KB | | 128KB-8KB 0x6000 +---------------+ 0x1E000 +---------------+ | Bootloader | 4KB | Bootloader | 8KB 0x7FFF +---------------+ 0x1FFFF +---------------+ - + byte Teensy(ATMega32u4) byte Teensy++(AT90SUB1286) 0x0000 +---------------+ 0x00000 +---------------+ | | | | @@ -132,20 +143,28 @@ And see this discussion for further reference. https://github.com/tmk/tmk_keyboard/issues/179 -## Special Extra key doesn't work(System, Audio control keys) +### Special Extra key doesn't work(System, Audio control keys) You need to define `EXTRAKEY_ENABLE` in `rules.mk` to use them in QMK. ``` EXTRAKEY_ENABLE = yes # Audio control and System control ``` -## Wakeup from sleep doesn't work +### Wakeup from sleep doesn't work In Windows check `Allow this device to wake the computer` setting in Power **Management property** tab of **Device Manager**. Also check BIOS setting. Pressing any key during sleep should wake host. -## Using Arduino? +## Hardware Issues + +### TrackPoint needs reset circuit(PS/2 mouse support) +Without reset circuit you will have inconsistent reuslt due to improper initialize of the hardware. See circuit schematic of TPM754. + +- http://geekhack.org/index.php?topic=50176.msg1127447#msg1127447 +- http://www.mikrocontroller.net/attachment/52583/tpm754.pdf + +### Using Arduino? **Note that Arduino pin naming is different from actual chip.** For example, Arduino pin `D0` is not `PD0`. Check circuit with its schematics yourself. @@ -154,8 +173,7 @@ Pressing any key during sleep should wake host. Arduino leonardo and micro have **ATMega32U4** and can be used for TMK, though Arduino bootloader may be a problem. - -## Using PF4-7 pins of USB AVR? +### Using PF4-7 pins of USB AVR? You need to set JTD bit of MCUCR yourself to use PF4-7 as GPIO. Those pins are configured to serve JTAG function by default. MCUs like ATMega*U* or AT90USB* are affeteced with this. If you are using Teensy this isn't needed. Teensy is shipped with JTAGEN fuse bit unprogrammed to disable the function. @@ -171,12 +189,7 @@ https://github.com/tmk/tmk_keyboard/blob/master/keyboard/hbkb/matrix.c#L67 And read **26.5.1 MCU Control Register – MCUCR** of ATMega32U4 datasheet. -## Adding LED indicators of Lock keys -You need your own LED indicators for CapsLock, ScrollLock and NumLock? See this post. - -http://deskthority.net/workshop-f7/tmk-keyboard-firmware-collection-t4478-120.html#p191560 - -## Program Arduino Micro/Leonardo +### Program Arduino Micro/Leonardo Push reset button and then run command like this within 8 seconds. ``` @@ -188,27 +201,16 @@ Device name will vary depending on your system. http://arduino.cc/en/Main/ArduinoBoardMicro https://geekhack.org/index.php?topic=14290.msg1563867#msg1563867 - -## USB 3 compatibility -I heard some people have a problem with USB 3 port, try USB 2 port. - - -## Mac compatibility -### OS X 10.11 and Hub -https://geekhack.org/index.php?topic=14290.msg1884034#msg1884034 - - -## Problem on BIOS(UEFI)/Resume(Sleep&Wake)/Power cycles +### Problem on BIOS(UEFI)/Resume(Sleep&Wake)/Power cycles Some people reported their keyboard stops working on BIOS and/or after resume(power cycles). -As of now root of its cause is not clear but some build options seem to be related. In Makefile try to disable those options like `CONSOLE_ENABLE`, `NKRO_ENABLE`, `SLEEP_LED_ENABLE` and/or others. +As of now root of its cause is not clear but some build options seem to be related. In Makefile try to disable those options like `CONSOLE_ENABLE`, `NKRO_ENABLE`, `SLEEP_LED_ENABLE` and/or others. https://github.com/tmk/tmk_keyboard/issues/266 https://geekhack.org/index.php?topic=41989.msg1967778#msg1967778 +## Flashing Problems +### Can't use dfu-programmer or QMK Flasher to flash on Windows -## FLIP doesn't work -### AtLibUsbDfu.dll not found -Remove current driver and reinstall one FLIP provides from DeviceManager. -http://imgur.com/a/bnwzy +Windows requires a driver to support the keyboard in DFU mode. You can use [QMK Driver Installer](https://github.com/qmk/qmk_driver_installer/releases) to install the necessary drivers. From 4c7c7747a3a4f4abea3bdaf73e37edd42cfb6446 Mon Sep 17 00:00:00 2001 From: skullY Date: Sat, 8 Jul 2017 22:39:17 -0700 Subject: [PATCH 12/52] Add terminal examples to doc best practices --- docs/documentation_best_practices.md | 38 ++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/docs/documentation_best_practices.md b/docs/documentation_best_practices.md index 8c5b4795a..f30793181 100644 --- a/docs/documentation_best_practices.md +++ b/docs/documentation_best_practices.md @@ -22,6 +22,14 @@ Your page should generally have multiple "H1" headings. Only H1 and H2 headings You can have styled hint blocks drawn around text to draw attention to it. +``` +{% hint style='info' %} +This uses `hint style='info'` +{% endhint %} +``` + +### Examples: + {% hint style='info' %} This uses `hint style='info'` {% endhint %} @@ -37,3 +45,33 @@ This uses `hint style='danger'` {% hint style='working' %} This uses `hint style='working'` {% endhint %} + +# Styled Terminal Blocks + +You can present styled terminal blocks by including special tokens inside your text block. + +``` +\`\`\` +**[terminal] +**[prompt foo@joe]**[path ~]**[delimiter $ ]**[command ./myscript] +Normal output line. Nothing special here... +But... +You can add some colors. What about a warning message? +**[warning [WARNING] The color depends on the theme. Could look normal too] +What about an error message? +**[error [ERROR] This is not the error you are looking for] +\`\`\` +``` + +### Example + +``` +**[terminal] +**[prompt foo@joe]**[path ~]**[delimiter $ ]**[command ./myscript] +Normal output line. Nothing special here... +But... +You can add some colors. What about a warning message? +**[warning [WARNING] The color depends on the theme. Could look normal too] +What about an error message? +**[error [ERROR] This is not the error you are looking for] +``` From 2dea401a8ebd6059354d79eb0fde9e1e725f12b3 Mon Sep 17 00:00:00 2001 From: skullY Date: Sat, 8 Jul 2017 22:39:32 -0700 Subject: [PATCH 13/52] play around with plugin settings --- book.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/book.json b/book.json index 887d2a643..8462846e3 100644 --- a/book.json +++ b/book.json @@ -6,10 +6,9 @@ "anchors", "edit-link", "forkmegithub", - "git-author", "hints", - "numbered-headings", "page-toc", + "numbered-headings", "terminal", "toolbar" ], @@ -25,6 +24,11 @@ "page-toc": { "selector": ".markdown-section h1, .markdown-section h2" }, + "terminal": { + "copyButtons": true, + "fade": false, + "style": "flat" + }, "toolbar": { "buttons": [ { From 7583136d739267bf0d2a3659128e89d15bddfbed Mon Sep 17 00:00:00 2001 From: skullY Date: Sat, 8 Jul 2017 22:44:18 -0700 Subject: [PATCH 14/52] try removing the anchor plugin --- book.json | 1 - 1 file changed, 1 deletion(-) diff --git a/book.json b/book.json index 8462846e3..c063fa933 100644 --- a/book.json +++ b/book.json @@ -3,7 +3,6 @@ "summary": "_summary.md" }, "plugins" : [ - "anchors", "edit-link", "forkmegithub", "hints", From d90dc05ddbecb7eb468ebc2292823c44116e1f2b Mon Sep 17 00:00:00 2001 From: skullY Date: Sat, 8 Jul 2017 22:51:16 -0700 Subject: [PATCH 15/52] try swapping toc and numbered headings --- book.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book.json b/book.json index c063fa933..e80fbe268 100644 --- a/book.json +++ b/book.json @@ -6,8 +6,8 @@ "edit-link", "forkmegithub", "hints", - "page-toc", "numbered-headings", + "page-toc", "terminal", "toolbar" ], From ddc3d3b64bf588cedebac3afe87a33b782849efa Mon Sep 17 00:00:00 2001 From: skullY Date: Sat, 8 Jul 2017 22:53:43 -0700 Subject: [PATCH 16/52] remove numbered headings --- book.json | 1 - 1 file changed, 1 deletion(-) diff --git a/book.json b/book.json index e80fbe268..09e1bfd94 100644 --- a/book.json +++ b/book.json @@ -6,7 +6,6 @@ "edit-link", "forkmegithub", "hints", - "numbered-headings", "page-toc", "terminal", "toolbar" From 585f140052897dd0daa094e12fc725625340caa5 Mon Sep 17 00:00:00 2001 From: Erez Zukerman Date: Mon, 10 Jul 2017 20:51:46 -0400 Subject: [PATCH 17/52] Invites contributions --- docs/glossary.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/glossary.md b/docs/glossary.md index 101fabccb..2fd53ca97 100644 --- a/docs/glossary.md +++ b/docs/glossary.md @@ -164,3 +164,7 @@ Universal Serial Bus, the most common wired interface for a keyboard. ## USB Host (or simply Host) The USB Host is your computer, or whatever device your keyboard is plugged into. + +# Couldn't find the term you're looking for? + +[Open an issue](https://github.com/qmk/qmk_firmware/issues) with your question and the term in question could be added here. Better still, open a pull request with the definition. :) From c7ea65c6d3c0fe50e7c77831c68b435d440be73d Mon Sep 17 00:00:00 2001 From: Fabian Topfstedt Date: Wed, 26 Jul 2017 11:09:29 +0200 Subject: [PATCH 18/52] default based customizations --- keyboards/lets_split/keymaps/fabian/keymap.c | 159 ++++++++++--------- 1 file changed, 80 insertions(+), 79 deletions(-) diff --git a/keyboards/lets_split/keymaps/fabian/keymap.c b/keyboards/lets_split/keymaps/fabian/keymap.c index b3e19aaea..c15c9724e 100644 --- a/keyboards/lets_split/keymaps/fabian/keymap.c +++ b/keyboards/lets_split/keymaps/fabian/keymap.c @@ -28,123 +28,124 @@ enum custom_keycodes { #define _______ KC_TRNS #define XXXXXXX KC_NO -// Custom macros -#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl -#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift -#define SFT_BSP SFT_T(KC_BSPC) // Tap for Backspace, hold for Shift -#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Alt+Shift) -#define MEH_GRV MEH_T(KC_GRV) // Tap for Backtick, hold for Meh (Ctrl+Alt+Shift) +// Custom +#define CTL_ESC CTL_T(KC_ESC) // Tap for Escape, hold for Control +#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift +#define SFT_BSP SFT_T(KC_BSPC) // Tap for Backspace, hold for Shift +#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Alt+Shift) +// #define MEH_GRV MEH_T(KC_GRV) // Tap for Backtick, hold for Meh (Ctrl+Alt+Shift) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty - * ,-----------------------------------------. ,-----------------------------------------. - * | 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 | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | GUI | Ctrl | Alt | GUI |Lower |Space | | Bksp |Raise | GUI |AltGr | Ctrl | GUI | - * `-----------------------------------------' `-----------------------------------------' + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space | Bksp |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' */ [_QWERTY] = KEYMAP( \ HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, \ - KC_LGUI, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, SFT_BSP, RAISE, KC_RGUI, KC_RALT, KC_RCTL, KC_RGUI + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, SFT_BSP, 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 | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | GUI | Ctrl | Alt | GUI |Lower |Space | | Bksp |Raise | GUI |AltGr | Ctrl | GUI | - * `-----------------------------------------' `-----------------------------------------' + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space | Bksp |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' */ [_COLEMAK] = KEYMAP( \ HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, \ - KC_LGUI, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, SFT_BSP, RAISE, KC_RGUI, KC_RALT, KC_RCTL, KC_RGUI + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, SFT_BSP, 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 | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | GUI | Ctrl | Alt | GUI |Lower |Space | | Bksp |Raise | GUI |AltGr | Ctrl | GUI | - * `-----------------------------------------' `-----------------------------------------' + * ,-----------------------------------------------------------------------------------. + * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space | Bksp |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' */ [_DVORAK] = KEYMAP( \ HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ - CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \ - KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT, \ - KC_LGUI, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, SFT_BSP, RAISE, KC_RGUI, KC_RALT, KC_RCTL, KC_RGUI + CTL_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, SFT_ENT , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, SFT_BSP, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ), /* Lower - * ,-----------------------------------------. ,-----------------------------------------. - * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Bksp | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | | F6 | _ | + | { | } | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | | F12 | Left | Down | Up |Right | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | | | Home |PageDn|PageUp| End | - * `-----------------------------------------' `-----------------------------------------' + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | MS L | MS D |MS U | MS R |MS Btn| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' */ [_LOWER] = KEYMAP( \ - ALL_T(KC_TILD), KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_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_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END + 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_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_BTN1, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ ), /* Raise - * ,-----------------------------------------. ,-----------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | | F12 | Left | Down | Up | Right| | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------' `-----------------------------------------' + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | Left | Down | Up | Rght |MS_BN2| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' */ [_RAISE] = KEYMAP( \ - ALL_T(KC_GRV), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ - KC_DEL, 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_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + 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_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_BTN2, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ ), /* Adjust (Lower + Raise) - * ,-----------------------------------------. ,-----------------------------------------. - * | | Reset| | | | | | | | | | | Reset| - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | |Aud on|Audoff|AGnorm| |AGswap|Qwerty|Colemk|Dvorak| | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | | | | | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | | | | | | | - * `-----------------------------------------' `-----------------------------------------' + * ,-----------------------------------------------------------------------------------. + * | |Reset | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Reset | Del | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = KEYMAP( \ - _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, \ - _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ +[_ADJUST] = KEYMAP( \ + _______, RESET, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, RESET, KC_DEL, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ) + }; #ifdef AUDIO_ENABLE From 75677655ad1546e5c75cdeafc136d59b99f26480 Mon Sep 17 00:00:00 2001 From: Fabian Topfstedt Date: Wed, 26 Jul 2017 11:11:13 +0200 Subject: [PATCH 19/52] left shift is backspace on tap --- keyboards/lets_split/keymaps/fabian/keymap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboards/lets_split/keymaps/fabian/keymap.c b/keyboards/lets_split/keymaps/fabian/keymap.c index c15c9724e..b253dbfc1 100644 --- a/keyboards/lets_split/keymaps/fabian/keymap.c +++ b/keyboards/lets_split/keymaps/fabian/keymap.c @@ -51,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = KEYMAP( \ HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT , \ + SFT_BSP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT , \ ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, SFT_BSP, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ), @@ -69,7 +69,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_COLEMAK] = KEYMAP( \ HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT , \ + SFT_BSP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT , \ ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, SFT_BSP, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ), @@ -87,7 +87,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DVORAK] = KEYMAP( \ HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ CTL_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, SFT_ENT , \ + SFT_BSP, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT , \ ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, SFT_BSP, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ), From 3b05183deb37dd39a7dcc9d989da1e7ee61c19a5 Mon Sep 17 00:00:00 2001 From: Fabian Topfstedt Date: Wed, 26 Jul 2017 12:18:40 +0200 Subject: [PATCH 20/52] symmetric modifiers in bottom row --- keyboards/lets_split/keymaps/fabian/keymap.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/keyboards/lets_split/keymaps/fabian/keymap.c b/keyboards/lets_split/keymaps/fabian/keymap.c index b253dbfc1..0af505b47 100644 --- a/keyboards/lets_split/keymaps/fabian/keymap.c +++ b/keyboards/lets_split/keymaps/fabian/keymap.c @@ -45,14 +45,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------| - * |Adjust| Ctrl | Alt | GUI |Lower |Space | Bksp |Raise | Left | Down | Up |Right | + * |Adjust| Ctrl | Alt | GUI |Lower |Space | Bksp |Raise | GUI |AltGr | Ctrl |Adjust| * `-----------------------------------------------------------------------------------' */ [_QWERTY] = KEYMAP( \ HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ SFT_BSP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT , \ - ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, SFT_BSP, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, SFT_BSP, RAISE, KC_RGUI, KC_RALT, KC_RCTL, ADJUST \ ), /* Colemak @@ -63,14 +63,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------| - * |Adjust| Ctrl | Alt | GUI |Lower |Space | Bksp |Raise | Left | Down | Up |Right | + * |Adjust| Ctrl | Alt | GUI |Lower |Space | Bksp |Raise | GUI |AltGr | Ctrl |Adjust| * `-----------------------------------------------------------------------------------' */ [_COLEMAK] = KEYMAP( \ HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ SFT_BSP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT , \ - ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, SFT_BSP, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, SFT_BSP, RAISE, KC_RGUI, KC_RALT, KC_RCTL, ADJUST \ ), /* Dvorak @@ -81,14 +81,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------| - * |Adjust| Ctrl | Alt | GUI |Lower |Space | Bksp |Raise | Left | Down | Up |Right | + * |Adjust| Ctrl | Alt | GUI |Lower |Space | Bksp |Raise | GUI |AltGr | Ctrl |Adjust| * `-----------------------------------------------------------------------------------' */ [_DVORAK] = KEYMAP( \ HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ SFT_BSP, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT , \ - ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, SFT_BSP, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, SFT_BSP, RAISE, KC_RGUI, KC_RALT, KC_RCTL, ADJUST \ ), /* Lower From de9331c50cb8ec769f7f4fb2eb7a73a435fc4db2 Mon Sep 17 00:00:00 2001 From: Fabian Topfstedt Date: Wed, 26 Jul 2017 12:19:13 +0200 Subject: [PATCH 21/52] custom makefile --- keyboards/lets_split/keymaps/fabian/Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 keyboards/lets_split/keymaps/fabian/Makefile diff --git a/keyboards/lets_split/keymaps/fabian/Makefile b/keyboards/lets_split/keymaps/fabian/Makefile new file mode 100644 index 000000000..b8c82cb99 --- /dev/null +++ b/keyboards/lets_split/keymaps/fabian/Makefile @@ -0,0 +1,9 @@ +# 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 +# +# UNICODE_ENABLE = yes + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif From 4a1f701d9f3569061d0613599fced54be32b5a54 Mon Sep 17 00:00:00 2001 From: Fabian Topfstedt Date: Wed, 26 Jul 2017 12:46:04 +0200 Subject: [PATCH 22/52] included amj40 implementation of nhou7 from https://github.com/nhou7/qmk_firmware_amj40 --- keyboards/amj40/Makefile | 3 + keyboards/amj40/amj40.c | 30 +++ keyboards/amj40/amj40.h | 38 ++++ keyboards/amj40/config.h | 94 ++++++++++ keyboards/amj40/keymaps/default/Makefile | 27 +++ keyboards/amj40/keymaps/default/build.sh | 42 +++++ keyboards/amj40/keymaps/default/keymap.c | 173 ++++++++++++++++++ keyboards/amj40/keymaps/default/readme.md | 11 ++ .../amj40/keymaps/default/updatemerge.sh | 4 + keyboards/amj40/readme.md | 35 ++++ keyboards/amj40/rules.mk | 66 +++++++ 11 files changed, 523 insertions(+) create mode 100755 keyboards/amj40/Makefile create mode 100755 keyboards/amj40/amj40.c create mode 100755 keyboards/amj40/amj40.h create mode 100755 keyboards/amj40/config.h create mode 100755 keyboards/amj40/keymaps/default/Makefile create mode 100755 keyboards/amj40/keymaps/default/build.sh create mode 100755 keyboards/amj40/keymaps/default/keymap.c create mode 100755 keyboards/amj40/keymaps/default/readme.md create mode 100755 keyboards/amj40/keymaps/default/updatemerge.sh create mode 100755 keyboards/amj40/readme.md create mode 100755 keyboards/amj40/rules.mk diff --git a/keyboards/amj40/Makefile b/keyboards/amj40/Makefile new file mode 100755 index 000000000..4e2a6f00f --- /dev/null +++ b/keyboards/amj40/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif \ No newline at end of file diff --git a/keyboards/amj40/amj40.c b/keyboards/amj40/amj40.c new file mode 100755 index 000000000..5a2376999 --- /dev/null +++ b/keyboards/amj40/amj40.c @@ -0,0 +1,30 @@ +#include "amj40.h" +#include "led.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + matrix_init_user(); + led_init_ports(); +}; + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + matrix_scan_user(); +}; + +void led_init_ports(void) { + // * Set our LED pins as output + DDRB |= (1<<2); +} + +void led_set_kb(uint8_t usb_led) { + if (usb_led & (1< + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6072 +#define DEVICE_VER 0x0002 +#define MANUFACTURER Han Chen +#define PRODUCT AMJ40 +#define DESCRIPTION qmk port of AMJ40 v2 PCB + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +// ROWS: Top to bottom, COLS: Left to right + +#define MATRIX_ROW_PINS { F4, F5, F6, F7} +#define MATRIX_COL_PINS { F1, F0, E6, C7, C6, B0, D4, B1, B7, B5, B4, D7} +#define UNUSED_PINS + +#define BACKLIGHT_PIN B6 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* Backlight configuration + */ +#define BACKLIGHT_LEVELS 4 + +/* Underlight configuration + */ + +#define RGB_DI_PIN D3 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 4 // Number of LEDs +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/amj40/keymaps/default/Makefile b/keyboards/amj40/keymaps/default/Makefile new file mode 100755 index 000000000..034e697bc --- /dev/null +++ b/keyboards/amj40/keymaps/default/Makefile @@ -0,0 +1,27 @@ +# 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 = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +#define ws2812_PORTREG PORTD +#define ws2812_DDRREG DDRD + + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/amj40/keymaps/default/build.sh b/keyboards/amj40/keymaps/default/build.sh new file mode 100755 index 000000000..6b4b4568f --- /dev/null +++ b/keyboards/amj40/keymaps/default/build.sh @@ -0,0 +1,42 @@ +#!/bin/bash +# adjust for cpu +# -j 16 gave best result on a hyperthreaded quad core core i7 + +LIMIT=10 +THREADS="-j 16" +KMAP=iso_split_rshift + +echo "We need sudo later" +sudo ls 2>&1 /dev/null + +function wait_bootloader { + echo "Waiting for Bootloader..." + local STARTTIME=$(date +"%s") + local REMIND=0 + local EXEC=dfu-programmer + local TARGET=atmega32u4 + while true + do + sudo $EXEC $TARGET get > /dev/null 2>&1 + [ $? -eq 0 ] && break + ENDTIME=$(date +"%s") + DURATION=$(($ENDTIME-$STARTTIME)) + if [ $REMIND -eq 0 -a $DURATION -gt $LIMIT ] + then + echo "Did you forget to press the reset button?" + REMIND=1 + fi + sleep 1 + done +} +make clean +make KEYMAP=${KMAP} ${THREADS} +if [[ $? -eq 0 ]] +then + echo "please trigger flashing!" + wait_bootloader + sudo make KEYMAP=${KMAP} dfu ${THREADS} +else + echo "make failed" + exit 77 +fi diff --git a/keyboards/amj40/keymaps/default/keymap.c b/keyboards/amj40/keymaps/default/keymap.c new file mode 100755 index 000000000..13b48c2ad --- /dev/null +++ b/keyboards/amj40/keymaps/default/keymap.c @@ -0,0 +1,173 @@ + + +// 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" + +// 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 _ADJUST 3 + + + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, +}; + + + + + +// increase readability +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Default Layer + * ,-----------------------------------------------------------. + * | Esc| Q | W | E | R | T | Y | U | I | O | P | BS | + * |-----------------------------------------------------------| + * | Tab | A | S | D | F | G | H | J | K | L | Ent | + * |-----------------------------------------------------------| + * | LSft | Z | X | C | V | B | N | M | , | . | /? | + * |-----------------------------------------------------------| + * | LCtl | LGui| LAlt| spc fn0 | spc fn1 |fn2|RAlt|RCtl | + * `-----------------------------------------------------------' + */ + [_QWERTY] = KEYMAP( \ + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,\ + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT,\ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,\ + KC_LCTL, KC_LGUI, KC_LALT, F(0), F(1), F(2), KC_RALT, KC_RCTL \ + ), + + /* Function Layer 1 HHKB style + * ,-----------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bkspc| + * |-----------------------------------------------------------| + * | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | [ | ] | Pipe | + * |-----------------------------------------------------------| + * | F7 | F8 | F9 | F10 | F11 | F12 | End|PgDn| ↓ | | | + * |-----------------------------------------------------------| + * | | | | | | Stop| App| | + * `-----------------------------------------------------------' + */ + [_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_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),BL_TOGG, BL_INC, BL_DEC, \ + _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + ), + + /* Function Layer 1 HHKB style + * ,-----------------------------------------------------------. + * |Caps| |MSel| ⏮ | ⏯ | ⏭ |PSCR|SkLk|Paus| ↑ | Ins| Del| + * |-----------------------------------------------------------| + * | | 🔇 | ⏏ | | * | / |Hone|PgUp| ← | → | | + * |-----------------------------------------------------------| + * | | 🔉 | 🔊 | | + | - | End|PgDn| ↓ | | | + * |-----------------------------------------------------------| + * | | | | | | Stop| App| | + * `-----------------------------------------------------------' + */ + [_RAISE] = KEYMAP( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_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_DEL, \ + _______, KC_TRNS, _______, KC_TRNS, KC_TRNS, _______, _______, RGB_TOG \ + ), + + /* Function Layer 1 HHKB style + * ,-----------------------------------------------------------. + * |Caps| |MSel| ⏮ | ⏯ | ⏭ |PSCR|SkLk|Paus| ↑ | Ins| Del| + * |-----------------------------------------------------------| + * | | 🔇 | ⏏ | | * | / |Hone|PgUp| ← | → | | + * |-----------------------------------------------------------| + * | | 🔉 | 🔊 | | + | - | End|PgDn| ↓ | | | + * |-----------------------------------------------------------| + * | | | | | | Stop| App| | + * `-----------------------------------------------------------' + */ + [_ADJUST] = KEYMAP( \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, \ + _______, _______, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, \ + KC_SYSTEM_SLEEP, _______, _______, _______, _______, _______, _______, _______ \ + ), + + + +}; + + + + +enum function_id { + LAUNCH, + RGBLED_TOGGLE, +}; + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_TAP_KEY(_LOWER, KC_SPC), + [1] = ACTION_LAYER_TAP_KEY(_RAISE, KC_SPC), + [2] = ACTION_LAYER_TAP_KEY(_ADJUST, KC_LGUI), + +}; + + + + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + + return MACRO_NONE; +}; + + + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + switch (keycode) { + + 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/amj40/keymaps/default/readme.md b/keyboards/amj40/keymaps/default/readme.md new file mode 100755 index 000000000..2659292ae --- /dev/null +++ b/keyboards/amj40/keymaps/default/readme.md @@ -0,0 +1,11 @@ +AMJ40 Default Layout +===================== + +##Quantum MK Firmware +For the full Quantum feature list, see the parent readme.md. + +# Features +* Based on a combination of the original AMJ40 keymap from the TMK firmware as well as the Planck Ortholinear keyboard's "Lower," "Raise," and "Adjust" layers. +* View the keymap.c file to understand they layout of the keymap. +* Has keys to toggle both the switch LEDs and underglow LEDs. + diff --git a/keyboards/amj40/keymaps/default/updatemerge.sh b/keyboards/amj40/keymaps/default/updatemerge.sh new file mode 100755 index 000000000..da5457e19 --- /dev/null +++ b/keyboards/amj40/keymaps/default/updatemerge.sh @@ -0,0 +1,4 @@ +#!/bin/bash +git checkout amj60 # gets you on branch amj60 +git fetch origin # gets you up to date with origin +git merge origin/master diff --git a/keyboards/amj40/readme.md b/keyboards/amj40/readme.md new file mode 100755 index 000000000..e705f20fe --- /dev/null +++ b/keyboards/amj40/readme.md @@ -0,0 +1,35 @@ +AMJ40 keyboard firmware +====================== +DIY/Assembled compact 40% keyboard. + +Ported by N.Hou from the original TMK firmware. + +*Supports both backlight LEDs as well as RGB underglow. + +*For reference, the AMJ40 uses pin D3 for underglow lighting. + +## Quantum MK Firmware + +For the full Quantum feature list, see [the parent readme.md](/readme.md). + +## Building + +Download or clone the whole firmware and navigate to the keyboards/amj40 +folder. Once your dev env is setup, you'll be able to type `make` to generate +your .hex - you can then use `make dfu` to program your PCB once you hit the +reset button. + +Depending on which keymap you would like to use, you will have to compile +slightly differently. + +### Default +To build with the default keymap, simply run `sudo make all`. +The .hex file will appear in the root of the qmk firmware folder. + + + + +### Original tmk firmware +The original firmware that was used to port to qmk can be found [here](https://github.com/AMJKeyboard/AMJ40). + + diff --git a/keyboards/amj40/rules.mk b/keyboards/amj40/rules.mk new file mode 100755 index 000000000..18403ac32 --- /dev/null +++ b/keyboards/amj40/rules.mk @@ -0,0 +1,66 @@ + +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= no # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= yes # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +RGBLIGHT_ENABLE ?= yes # Enable keyboard underlight functionality (+4870) +BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality (+1150) +MIDI_ENABLE ?= no # MIDI controls +AUDIO_ENABLE ?= no +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID From 619081559ba464f2b03f8bbbcf4d109249979aba Mon Sep 17 00:00:00 2001 From: Fabian Topfstedt Date: Wed, 26 Jul 2017 12:47:40 +0200 Subject: [PATCH 23/52] added my amj40 custom layout --- keyboards/amj40/keymaps/fabian/Makefile | 27 ++++++ keyboards/amj40/keymaps/fabian/keymap.c | 116 ++++++++++++++++++++++++ keyboards/amj40/keymaps/fabian/t | 38 ++++++++ 3 files changed, 181 insertions(+) create mode 100755 keyboards/amj40/keymaps/fabian/Makefile create mode 100755 keyboards/amj40/keymaps/fabian/keymap.c create mode 100755 keyboards/amj40/keymaps/fabian/t diff --git a/keyboards/amj40/keymaps/fabian/Makefile b/keyboards/amj40/keymaps/fabian/Makefile new file mode 100755 index 000000000..034e697bc --- /dev/null +++ b/keyboards/amj40/keymaps/fabian/Makefile @@ -0,0 +1,27 @@ +# 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 = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +#define ws2812_PORTREG PORTD +#define ws2812_DDRREG DDRD + + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/amj40/keymaps/fabian/keymap.c b/keyboards/amj40/keymaps/fabian/keymap.c new file mode 100755 index 000000000..aa62d0406 --- /dev/null +++ b/keyboards/amj40/keymaps/fabian/keymap.c @@ -0,0 +1,116 @@ +#include "amj40.h" + +#undef KEYMAP +#define KEYMAP( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, 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, XXX, XXX, XXX, k39, k3a, k3b} \ +} + +#define _______ KC_TRNS +#define XXXXXXX KC_NO +#define TCTLESC CTL_T(KC_ESC) +#define TSFTBSP SFT_T(KC_BSPC) +#define TSFTENT SFT_T(KC_ENT) + + +#define _BASE 0 +#define _LOWER 1 +#define _RAISE 2 +#define _ADJUST 3 + + +enum custom_keycodes { + BASE = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = 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, \ + TCTLESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + TSFTBSP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, TSFTENT, \ + F(2), KC_LCTL, KC_LALT, KC_LGUI, F(0), F(1), KC_RGUI, KC_RALT, KC_RCTL \ + ), + [_LOWER] = KEYMAP( \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_HOME, KC_END, _______, \ + _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + ), + [_RAISE] = KEYMAP( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, \ + BL_STEP, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MPLY \ + ), + [_ADJUST] = KEYMAP( \ + RESET , _______, _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, \ + _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_COMM \ + ), +}; + + +enum function_id { + LAUNCH, + RGBLED_TOGGLE, +}; + + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_TAP_KEY(_LOWER, KC_SPC), + [1] = ACTION_LAYER_TAP_KEY(_RAISE, KC_SPC), + [2] = ACTION_LAYER_TAP_KEY(_ADJUST, KC_LGUI), +}; + + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + return MACRO_NONE; +}; + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + 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/amj40/keymaps/fabian/t b/keyboards/amj40/keymaps/fabian/t new file mode 100755 index 000000000..7f6469a95 --- /dev/null +++ b/keyboards/amj40/keymaps/fabian/t @@ -0,0 +1,38 @@ +#ifndef AMJ40_H +#define AMJ40_H + +#include "quantum.h" + +// readability +#define XXX KC_NO + +/* AMJ40 ver2.0 layout1 配列一 + * ,-----------------------------------------------------------. + * | 00 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 0A | 0B | + * |-----------------------------------------------------------| + * | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 1B | + * |-----------------------------------------------------------| + * | 20 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 2A | 2B | + * |-----------------------------------------------------------| + * | 30 | 31 | 32 | 34 | 35 | 39 | 3A | 3B | + * `-----------------------------------------------------------' + */ +#define KEYMAP( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, 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, XXX, XXX, XXX, k39, k3a, k3b} \ +} + + + + +void matrix_init_user(void); +void matrix_scan_user(void); + +#endif From 20b3ac49b73e1f1a4395dd4d2d24a2607975885c Mon Sep 17 00:00:00 2001 From: Fabian Topfstedt Date: Wed, 26 Jul 2017 12:48:13 +0200 Subject: [PATCH 24/52] deleted file --- keyboards/amj40/keymaps/fabian/t | 38 -------------------------------- 1 file changed, 38 deletions(-) delete mode 100755 keyboards/amj40/keymaps/fabian/t diff --git a/keyboards/amj40/keymaps/fabian/t b/keyboards/amj40/keymaps/fabian/t deleted file mode 100755 index 7f6469a95..000000000 --- a/keyboards/amj40/keymaps/fabian/t +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef AMJ40_H -#define AMJ40_H - -#include "quantum.h" - -// readability -#define XXX KC_NO - -/* AMJ40 ver2.0 layout1 配列一 - * ,-----------------------------------------------------------. - * | 00 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 0A | 0B | - * |-----------------------------------------------------------| - * | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 1B | - * |-----------------------------------------------------------| - * | 20 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 2A | 2B | - * |-----------------------------------------------------------| - * | 30 | 31 | 32 | 34 | 35 | 39 | 3A | 3B | - * `-----------------------------------------------------------' - */ -#define KEYMAP( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k34, k35, 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, XXX, XXX, XXX, k39, k3a, k3b} \ -} - - - - -void matrix_init_user(void); -void matrix_scan_user(void); - -#endif From 661106bac466f99341edea9d2e38e2f8c75746d9 Mon Sep 17 00:00:00 2001 From: Fabian Topfstedt Date: Mon, 31 Jul 2017 21:16:55 +0200 Subject: [PATCH 25/52] layout updates and cleanups --- keyboards/amj40/keymaps/fabian/keymap.c | 204 +++++++++++++++++++----- 1 file changed, 162 insertions(+), 42 deletions(-) diff --git a/keyboards/amj40/keymaps/fabian/keymap.c b/keyboards/amj40/keymaps/fabian/keymap.c index aa62d0406..57b4d957b 100755 --- a/keyboards/amj40/keymaps/fabian/keymap.c +++ b/keyboards/amj40/keymaps/fabian/keymap.c @@ -1,5 +1,6 @@ #include "amj40.h" +// Set the custom keymap #undef KEYMAP #define KEYMAP( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ @@ -13,76 +14,195 @@ {k30, k31, k32, k33, k34, k35, XXX, XXX, XXX, k39, k3a, k3b} \ } +// Fillers to make layering more clear #define _______ KC_TRNS #define XXXXXXX KC_NO -#define TCTLESC CTL_T(KC_ESC) -#define TSFTBSP SFT_T(KC_BSPC) -#define TSFTENT SFT_T(KC_ENT) +// Custom +#define CTL_ESC CTL_T(KC_ESC) // Tap for Escape, hold for Control +#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift +#define SFT_BSP SFT_T(KC_BSPC) // Tap for Backspace, hold for Shift +#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Alt+Shift) +// #define MEH_GRV MEH_T(KC_GRV) // Tap for Backtick, hold for Meh (Ctrl+Alt+Shift) -#define _BASE 0 -#define _LOWER 1 -#define _RAISE 2 -#define _ADJUST 3 - +#define _QWERTY 0 +#define _COLEMAK 1 +#define _DVORAK 2 +#define _LOWER 3 +#define _RAISE 4 +#define _ADJUST 16 enum custom_keycodes { - BASE = SAFE_RANGE, + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, LOWER, RAISE, ADJUST, }; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BASE] = 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, \ - TCTLESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ - TSFTBSP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, TSFTENT, \ - F(2), KC_LCTL, KC_LALT, KC_LGUI, F(0), F(1), KC_RGUI, KC_RALT, KC_RCTL \ - ), - [_LOWER] = KEYMAP( \ - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ - KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_HOME, KC_END, _______, \ - _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ - ), - [_RAISE] = KEYMAP( \ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ - KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, \ - BL_STEP, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MPLY \ - ), - [_ADJUST] = KEYMAP( \ - RESET , _______, _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, \ - _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_COMM \ - ), +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI | Lower and Space | Raise and Bksp | GUI |AltGr | Ctrl | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = KEYMAP( \ + HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + SFT_BSP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT , \ + F(2), KC_LCTL, KC_LALT, KC_LGUI, F(0), F(1), KC_RGUI, KC_RALT, KC_RCTL \ +), + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI | Lower and Space | Raise and Bksp | GUI |AltGr | Ctrl | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = KEYMAP( \ + HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ + CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + SFT_BSP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT , \ + F(2), KC_LCTL, KC_LALT, KC_LGUI, F(0), F(1), KC_RGUI, KC_RALT, KC_RCTL \ +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI | Lower and Space | Raise and Bksp | GUI |AltGr | Ctrl | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = KEYMAP( \ + HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ + CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ + SFT_BSP, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT , \ + F(2), KC_LCTL, KC_LALT, KC_LGUI, F(0), F(1), KC_RGUI, KC_RALT, KC_RCTL \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | MS L | MS D |MS U | MS R |MS Btn| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = KEYMAP( \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_BTN1, \ + _______, _______, _______, _______, _______, _______, 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 | Left | Down | Up | Rght |MS_BN2| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = KEYMAP( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_BTN2, \ + _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | |Reset | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Reset | Del | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = KEYMAP( \ + _______, RESET, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, RESET, KC_DEL, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + }; +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +#endif -enum function_id { - LAUNCH, - RGBLED_TOGGLE, -}; - +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} const uint16_t PROGMEM fn_actions[] = { [0] = ACTION_LAYER_TAP_KEY(_LOWER, KC_SPC), - [1] = ACTION_LAYER_TAP_KEY(_RAISE, KC_SPC), + [1] = ACTION_LAYER_TAP_KEY(_RAISE, KC_BSPC), [2] = ACTION_LAYER_TAP_KEY(_ADJUST, KC_LGUI), }; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { return MACRO_NONE; }; - bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + #endif + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case 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 DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + #endif + persistent_default_layer_set(1UL<<_DVORAK); + } + return false; + break; case LOWER: if (record->event.pressed) { layer_on(_LOWER); From 015bf30d9b827692f387a09e1c24549e2a25c863 Mon Sep 17 00:00:00 2001 From: Fabian Topfstedt Date: Mon, 31 Jul 2017 22:01:35 +0200 Subject: [PATCH 26/52] changed adjust layer to emulate mouse on rignt hand --- keyboards/amj40/keymaps/fabian/Makefile | 2 +- keyboards/amj40/keymaps/fabian/keymap.c | 14 +- keyboards/deltasplit75/i2c.c | 324 ++++----- keyboards/deltasplit75/i2c.h | 62 +- .../deltasplit75/keymaps/default/config.h | 62 +- keyboards/deltasplit75/matrix.c | 636 +++++++++--------- keyboards/deltasplit75/serial.c | 456 ++++++------- keyboards/deltasplit75/serial.h | 52 +- keyboards/deltasplit75/split_util.c | 162 ++--- keyboards/deltasplit75/split_util.h | 44 +- 10 files changed, 907 insertions(+), 907 deletions(-) diff --git a/keyboards/amj40/keymaps/fabian/Makefile b/keyboards/amj40/keymaps/fabian/Makefile index 034e697bc..a914e4c0c 100755 --- a/keyboards/amj40/keymaps/fabian/Makefile +++ b/keyboards/amj40/keymaps/fabian/Makefile @@ -3,7 +3,7 @@ # the appropriate keymap folder that will get included automatically # BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration diff --git a/keyboards/amj40/keymaps/fabian/keymap.c b/keyboards/amj40/keymaps/fabian/keymap.c index 57b4d957b..aef514153 100755 --- a/keyboards/amj40/keymaps/fabian/keymap.c +++ b/keyboards/amj40/keymaps/fabian/keymap.c @@ -134,19 +134,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. - * | |Reset | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Reset | Del | + * |Reset |Colemk|Qwerty|Dvorak| | | | | MU | | |Reset | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | | | | | | | | + * | |AGNorm|AGSwap| | | | | ML | MD | MR | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | + * | |AudOn |AudOff| | | | |MBtn1 |MBtn2 |MBtn3 | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = KEYMAP( \ - _______, RESET, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, RESET, KC_DEL, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ +[_ADJUST] = KEYMAP( \ + RESET, COLEMAK, QWERTY, DVORAK, _______, _______, _______, _______, KC_MS_U, _______, _______, RESET, \ + _______, AG_NORM, AG_SWAP, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, \ + _______, AU_ON, AU_OFF, _______, _______, _______, _______, KC_BTN1, KC_BTN2, KC_BTN3, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ) diff --git a/keyboards/deltasplit75/i2c.c b/keyboards/deltasplit75/i2c.c index af806c75b..084c890c4 100644 --- a/keyboards/deltasplit75/i2c.c +++ b/keyboards/deltasplit75/i2c.c @@ -1,162 +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< +#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); - -#endif +#ifndef I2C_H +#define I2C_H + +#include + +#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); + +#endif diff --git a/keyboards/deltasplit75/keymaps/default/config.h b/keyboards/deltasplit75/keymaps/default/config.h index c72c00e68..4fb2554e0 100644 --- a/keyboards/deltasplit75/keymaps/default/config.h +++ b/keyboards/deltasplit75/keymaps/default/config.h @@ -1,31 +1,31 @@ -/* -Copyright 2012 Jun Wako - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - - -#define USE_SERIAL - -#define MASTER_LEFT -// #define _MASTER_RIGHT -// #define EE_HANDS - - -#ifdef SUBPROJECT_v2 - #include "../../v2/config.h" -#endif -#ifdef SUBPROJECT_protosplit - #include "../../protosplit/config.h" -#endif +/* +Copyright 2012 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + + +#define USE_SERIAL + +#define MASTER_LEFT +// #define _MASTER_RIGHT +// #define EE_HANDS + + +#ifdef SUBPROJECT_v2 + #include "../../v2/config.h" +#endif +#ifdef SUBPROJECT_protosplit + #include "../../protosplit/config.h" +#endif diff --git a/keyboards/deltasplit75/matrix.c b/keyboards/deltasplit75/matrix.c index c3bb0b058..138969004 100644 --- a/keyboards/deltasplit75/matrix.c +++ b/keyboards/deltasplit75/matrix.c @@ -1,318 +1,318 @@ -/* -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 . -*/ - -/* - * scan matrix - */ -#include -#include -#include -#include -#include -#include -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" -#include "split_util.h" -#include "pro_micro.h" -#include "config.h" - -#ifdef USE_I2C -# include "i2c.h" -#else // USE_SERIAL -# include "serial.h" -#endif - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif - -#define ERROR_DISCONNECT_COUNT 5 - -static uint8_t debouncing = DEBOUNCE; -static const int 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]; - -static matrix_row_t read_cols(void); -static void init_cols(void); -static void unselect_rows(void); -static void select_row(uint8_t row); - -__attribute__ ((weak)) -void matrix_init_quantum(void) { - matrix_init_kb(); -} - -__attribute__ ((weak)) -void matrix_scan_quantum(void) { - matrix_scan_kb(); -} - -__attribute__ ((weak)) -void matrix_init_kb(void) { - matrix_init_user(); -} - -__attribute__ ((weak)) -void matrix_scan_kb(void) { - matrix_scan_user(); -} - -__attribute__ ((weak)) -void matrix_init_user(void) { -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} - -inline -uint8_t matrix_rows(void) -{ - return MATRIX_ROWS; -} - -inline -uint8_t matrix_cols(void) -{ - return MATRIX_COLS; -} - -void matrix_init(void) -{ - debug_enable = true; - 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) -{ - // Right hand is stored after the left in the matirx so, we need to offset it - int offset = isLeftHand ? 0 : (ROWS_PER_HAND); - - for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { - select_row(i); - _delay_us(30); // without this wait read unstable value. - matrix_row_t cols = read_cols(); - if (matrix_debouncing[i+offset] != cols) { - matrix_debouncing[i+offset] = cols; - debouncing = DEBOUNCE; - } - unselect_rows(); - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { - matrix[i+offset] = matrix_debouncing[i+offset]; - } - } - } - - 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]; - } - return 0; -} -#endif - -uint8_t matrix_scan(void) -{ - int 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 : (MATRIX_ROWS / 2); - -#ifdef USE_I2C - for (int i = 0; i < ROWS_PER_HAND; ++i) { - /* i2c_slave_buffer[i] = matrix[offset+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]; - } -#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(col_pins[x] & 0xF); - _SFR_IO8((col_pins[x] >> 4) + 2) |= _BV(col_pins[x] & 0xF); - } -} - -static matrix_row_t read_cols(void) -{ - matrix_row_t result = 0; - for(int x = 0; x < MATRIX_COLS; x++) { - result |= (_SFR_IO8(col_pins[x] >> 4) & _BV(col_pins[x] & 0xF)) ? 0 : (1 << x); - } - return result; -} - -static void unselect_rows(void) -{ - for(int x = 0; x < ROWS_PER_HAND; x++) { - _SFR_IO8((row_pins[x] >> 4) + 1) &= ~_BV(row_pins[x] & 0xF); - _SFR_IO8((row_pins[x] >> 4) + 2) |= _BV(row_pins[x] & 0xF); - } -} - -static void select_row(uint8_t row) -{ - _SFR_IO8((row_pins[row] >> 4) + 1) |= _BV(row_pins[row] & 0xF); - _SFR_IO8((row_pins[row] >> 4) + 2) &= ~_BV(row_pins[row] & 0xF); -} +/* +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 . +*/ + +/* + * scan matrix + */ +#include +#include +#include +#include +#include +#include +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "split_util.h" +#include "pro_micro.h" +#include "config.h" + +#ifdef USE_I2C +# include "i2c.h" +#else // USE_SERIAL +# include "serial.h" +#endif + +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif + +#define ERROR_DISCONNECT_COUNT 5 + +static uint8_t debouncing = DEBOUNCE; +static const int 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]; + +static matrix_row_t read_cols(void); +static void init_cols(void); +static void unselect_rows(void); +static void select_row(uint8_t row); + +__attribute__ ((weak)) +void matrix_init_quantum(void) { + matrix_init_kb(); +} + +__attribute__ ((weak)) +void matrix_scan_quantum(void) { + matrix_scan_kb(); +} + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +__attribute__ ((weak)) +void matrix_init_user(void) { +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +inline +uint8_t matrix_rows(void) +{ + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) +{ + return MATRIX_COLS; +} + +void matrix_init(void) +{ + debug_enable = true; + 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) +{ + // Right hand is stored after the left in the matirx so, we need to offset it + int offset = isLeftHand ? 0 : (ROWS_PER_HAND); + + for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { + select_row(i); + _delay_us(30); // without this wait read unstable value. + matrix_row_t cols = read_cols(); + if (matrix_debouncing[i+offset] != cols) { + matrix_debouncing[i+offset] = cols; + debouncing = DEBOUNCE; + } + unselect_rows(); + } + + if (debouncing) { + if (--debouncing) { + _delay_ms(1); + } else { + for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { + matrix[i+offset] = matrix_debouncing[i+offset]; + } + } + } + + 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]; + } + return 0; +} +#endif + +uint8_t matrix_scan(void) +{ + int 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 : (MATRIX_ROWS / 2); + +#ifdef USE_I2C + for (int i = 0; i < ROWS_PER_HAND; ++i) { + /* i2c_slave_buffer[i] = matrix[offset+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]; + } +#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(col_pins[x] & 0xF); + _SFR_IO8((col_pins[x] >> 4) + 2) |= _BV(col_pins[x] & 0xF); + } +} + +static matrix_row_t read_cols(void) +{ + matrix_row_t result = 0; + for(int x = 0; x < MATRIX_COLS; x++) { + result |= (_SFR_IO8(col_pins[x] >> 4) & _BV(col_pins[x] & 0xF)) ? 0 : (1 << x); + } + return result; +} + +static void unselect_rows(void) +{ + for(int x = 0; x < ROWS_PER_HAND; x++) { + _SFR_IO8((row_pins[x] >> 4) + 1) &= ~_BV(row_pins[x] & 0xF); + _SFR_IO8((row_pins[x] >> 4) + 2) |= _BV(row_pins[x] & 0xF); + } +} + +static void select_row(uint8_t row) +{ + _SFR_IO8((row_pins[row] >> 4) + 1) |= _BV(row_pins[row] & 0xF); + _SFR_IO8((row_pins[row] >> 4) + 2) &= ~_BV(row_pins[row] & 0xF); +} diff --git a/keyboards/deltasplit75/serial.c b/keyboards/deltasplit75/serial.c index 898ef7d42..6faed09ce 100644 --- a/keyboards/deltasplit75/serial.c +++ b/keyboards/deltasplit75/serial.c @@ -1,228 +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" - -#ifdef USE_SERIAL - -// 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 +/* + * 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" + +#ifdef USE_SERIAL + +// 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/deltasplit75/serial.h b/keyboards/deltasplit75/serial.h index ab2ea0a09..6ef52019a 100644 --- a/keyboards/deltasplit75/serial.h +++ b/keyboards/deltasplit75/serial.h @@ -1,26 +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_COLS+7)/8 *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 +#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_COLS+7)/8 *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/deltasplit75/split_util.c b/keyboards/deltasplit75/split_util.c index a636f60db..226dc1881 100644 --- a/keyboards/deltasplit75/split_util.c +++ b/keyboards/deltasplit75/split_util.c @@ -1,81 +1,81 @@ -#include -#include -#include -#include -#include -#include -#include "split_util.h" -#include "matrix.h" -#include "keyboard.h" -#include "config.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(); -#else - serial_master_init(); -#endif -} - -static void keyboard_slave_setup(void) { -#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 +#include +#include +#include +#include +#include "split_util.h" +#include "matrix.h" +#include "keyboard.h" +#include "config.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(); +#else + serial_master_init(); +#endif +} + +static void keyboard_slave_setup(void) { +#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< - -#ifdef EE_HANDS - #define EECONFIG_BOOTMAGIC_END (uint8_t *)10 - #define EECONFIG_HANDEDNESS EECONFIG_BOOTMAGIC_END -#endif - -#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); - -#endif +#ifndef SPLIT_KEYBOARD_UTIL_H +#define SPLIT_KEYBOARD_UTIL_H + +#include + +#ifdef EE_HANDS + #define EECONFIG_BOOTMAGIC_END (uint8_t *)10 + #define EECONFIG_HANDEDNESS EECONFIG_BOOTMAGIC_END +#endif + +#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); + +#endif From 7371209ffb71da745424f2842000facef45d35e6 Mon Sep 17 00:00:00 2001 From: Eagleheardt Date: Wed, 2 Aug 2017 20:23:36 -0500 Subject: [PATCH 27/52] Adds Eagleheardt's XD60 keymap (#1528) * Add files via upload * Update readme.md * Update readme.md * Add files via upload --- keyboards/xd60/keymaps/BASE/keymap.c | 46 +++++++++++++++++++++++++++ keyboards/xd60/keymaps/BASE/readme.md | 5 +++ keyboards/xd60/keymaps/base/keymap.c | 46 +++++++++++++++++++++++++++ keyboards/xd60/keymaps/base/readme.md | 9 ++++++ 4 files changed, 106 insertions(+) create mode 100644 keyboards/xd60/keymaps/BASE/keymap.c create mode 100644 keyboards/xd60/keymaps/BASE/readme.md create mode 100644 keyboards/xd60/keymaps/base/keymap.c create mode 100644 keyboards/xd60/keymaps/base/readme.md diff --git a/keyboards/xd60/keymaps/BASE/keymap.c b/keyboards/xd60/keymaps/BASE/keymap.c new file mode 100644 index 000000000..b3ccd5e58 --- /dev/null +++ b/keyboards/xd60/keymaps/BASE/keymap.c @@ -0,0 +1,46 @@ +#include "xd60.h" +#include "action_layer.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // 0: Base Layer + 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_BSLS, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \ + KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_NO, 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 + 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_NO, KC_NO, \ + KC_NO, KC_WH_U, KC_UP, KC_WH_D, KC_BSPC,KC_HOME,KC_CALC,KC_NO, KC_INS, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_DEL, \ + KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, KC_END, KC_PGDN,KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGUP, KC_NO, KC_ENT, \ + KC_LSFT, KC_NO, KC_NO, KC_APP, BL_STEP,KC_NO, KC_NO, KC_VOLD,KC_VOLU,KC_MUTE, KC_END, KC_RSFT, KC_NO ,KC_PGUP, KC_INS, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, F(0), KC_HOME, KC_PGDOWN,KC_END), + +}; + +// Custom Actions +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay +}; + +// Macros +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + + // MACRODOWN only works in this function + 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/BASE/readme.md b/keyboards/xd60/keymaps/BASE/readme.md new file mode 100644 index 000000000..89f9acaa9 --- /dev/null +++ b/keyboards/xd60/keymaps/BASE/readme.md @@ -0,0 +1,5 @@ +![Uses this layout](https://i.redd.it/v64eqwsrk8jx.jpg) + +All of the keys which CAN have a function should be assigned one. + +The keys with KC_NO cannot be assigned a value diff --git a/keyboards/xd60/keymaps/base/keymap.c b/keyboards/xd60/keymaps/base/keymap.c new file mode 100644 index 000000000..b3ccd5e58 --- /dev/null +++ b/keyboards/xd60/keymaps/base/keymap.c @@ -0,0 +1,46 @@ +#include "xd60.h" +#include "action_layer.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // 0: Base Layer + 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_BSLS, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \ + KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_NO, 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 + 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_NO, KC_NO, \ + KC_NO, KC_WH_U, KC_UP, KC_WH_D, KC_BSPC,KC_HOME,KC_CALC,KC_NO, KC_INS, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_DEL, \ + KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, KC_END, KC_PGDN,KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGUP, KC_NO, KC_ENT, \ + KC_LSFT, KC_NO, KC_NO, KC_APP, BL_STEP,KC_NO, KC_NO, KC_VOLD,KC_VOLU,KC_MUTE, KC_END, KC_RSFT, KC_NO ,KC_PGUP, KC_INS, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, F(0), KC_HOME, KC_PGDOWN,KC_END), + +}; + +// Custom Actions +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay +}; + +// Macros +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + + // MACRODOWN only works in this function + 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/base/readme.md b/keyboards/xd60/keymaps/base/readme.md new file mode 100644 index 000000000..d2a87bd72 --- /dev/null +++ b/keyboards/xd60/keymaps/base/readme.md @@ -0,0 +1,9 @@ +# Default Keymap for XIUDI's 60% XD60 PCB + +![Default Keymap for XD60](https://img.alicdn.com/imgextra/i1/1713761720/TB2K0gTalPxQeBjy1XcXXXHzVXa_!!1713761720.png) + +## Additional Notes +Default Keymap for XD60 as indicated on the original sale page. + +## Build +To build the default keymap, simply run `make xd60-default`. From b6280f979ca26e5d2c4685eb8d102ae532735642 Mon Sep 17 00:00:00 2001 From: Eagleheardt Date: Wed, 2 Aug 2017 20:29:22 -0500 Subject: [PATCH 28/52] Picture and details update I fixed the picture of the layout and added a bit of an explanation. It now matches the readme file from the uppercase BASE folder --- keyboards/xd60/keymaps/base/readme.md | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/keyboards/xd60/keymaps/base/readme.md b/keyboards/xd60/keymaps/base/readme.md index d2a87bd72..89f9acaa9 100644 --- a/keyboards/xd60/keymaps/base/readme.md +++ b/keyboards/xd60/keymaps/base/readme.md @@ -1,9 +1,5 @@ -# Default Keymap for XIUDI's 60% XD60 PCB +![Uses this layout](https://i.redd.it/v64eqwsrk8jx.jpg) -![Default Keymap for XD60](https://img.alicdn.com/imgextra/i1/1713761720/TB2K0gTalPxQeBjy1XcXXXHzVXa_!!1713761720.png) +All of the keys which CAN have a function should be assigned one. -## Additional Notes -Default Keymap for XD60 as indicated on the original sale page. - -## Build -To build the default keymap, simply run `make xd60-default`. +The keys with KC_NO cannot be assigned a value From 07ba06d0b6e516bcfa4cbccbed9cfd8dc131072a Mon Sep 17 00:00:00 2001 From: Balz Guenat Date: Thu, 3 Aug 2017 03:58:01 +0200 Subject: [PATCH 29/52] fix section in porting guide that refered to Makefile instead of rules.mk --- docs/porting_your_keyboard_to_qmk.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/porting_your_keyboard_to_qmk.md b/docs/porting_your_keyboard_to_qmk.md index 05787042f..5a5025c35 100644 --- a/docs/porting_your_keyboard_to_qmk.md +++ b/docs/porting_your_keyboard_to_qmk.md @@ -20,7 +20,7 @@ For the `DIODE_DIRECTION`, most hand-wiring guides will instruct you to wire the `BACKLIGHT_LEVELS` is how many levels exist for your backlight - max is 15, and they are computed automatically from this number. -## `/keyboards//Makefile` +## `/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`. From 8765751f7045ff25a036d8a782bab8e7de0eed16 Mon Sep 17 00:00:00 2001 From: That-Canadian Date: Thu, 3 Aug 2017 11:02:52 -0400 Subject: [PATCH 30/52] Added V2 files for the ECO board, also changed default from rev1 to rev2. --- keyboards/eco/Makefile | 2 +- keyboards/eco/config.h | 3 +++ keyboards/eco/eco.h | 4 ++++ keyboards/eco/readme.md | 2 +- keyboards/eco/rev2/Makefile | 3 +++ keyboards/eco/rev2/config.h | 30 ++++++++++++++++++++++++++++++ keyboards/eco/rev2/rev2.c | 1 + keyboards/eco/rev2/rev2.h | 24 ++++++++++++++++++++++++ keyboards/eco/rev2/rules.mk | 5 +++++ 9 files changed, 72 insertions(+), 2 deletions(-) create mode 100644 keyboards/eco/rev2/Makefile create mode 100644 keyboards/eco/rev2/config.h create mode 100644 keyboards/eco/rev2/rev2.c create mode 100644 keyboards/eco/rev2/rev2.h create mode 100644 keyboards/eco/rev2/rules.mk diff --git a/keyboards/eco/Makefile b/keyboards/eco/Makefile index 30b43c4ea..b9bada8f8 100644 --- a/keyboards/eco/Makefile +++ b/keyboards/eco/Makefile @@ -1,4 +1,4 @@ -SUBPROJECT_DEFAULT = rev1 +SUBPROJECT_DEFAULT = rev2 ifndef MAKEFILE_INCLUDED include ../../Makefile diff --git a/keyboards/eco/config.h b/keyboards/eco/config.h index af7e1822c..99b057496 100644 --- a/keyboards/eco/config.h +++ b/keyboards/eco/config.h @@ -73,5 +73,8 @@ along with this program. If not, see . #ifdef SUBPROJECT_rev1 #include "rev1/config.h" #endif +#ifdef SUBPROJECT_rev2 + #include "rev2/config.h" +#endif #endif diff --git a/keyboards/eco/eco.h b/keyboards/eco/eco.h index 9da33b9b8..2cfb8df26 100644 --- a/keyboards/eco/eco.h +++ b/keyboards/eco/eco.h @@ -4,6 +4,10 @@ #ifdef SUBPROJECT_rev1 #include "rev1.h" #endif +#ifdef SUBPROJECT_rev2 + #include "rev2.h" +#endif + #include "quantum.h" diff --git a/keyboards/eco/readme.md b/keyboards/eco/readme.md index 8fef3a1ce..d29aa8ece 100644 --- a/keyboards/eco/readme.md +++ b/keyboards/eco/readme.md @@ -10,6 +10,6 @@ Hardware Supported: ECO PCB rev1 Pro Micro Make example for this keyboard (after setting up your build environment): - make eco-rev1-that_canadian + make eco-rev2-that_canadian 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. \ No newline at end of file diff --git a/keyboards/eco/rev2/Makefile b/keyboards/eco/rev2/Makefile new file mode 100644 index 000000000..4e2a6f00f --- /dev/null +++ b/keyboards/eco/rev2/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif \ No newline at end of file diff --git a/keyboards/eco/rev2/config.h b/keyboards/eco/rev2/config.h new file mode 100644 index 000000000..83f2defc9 --- /dev/null +++ b/keyboards/eco/rev2/config.h @@ -0,0 +1,30 @@ +/* +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 REV2_CONFIG_H +#define REV2_CONFIG_H + +#include "../config.h" + +#define DEVICE_VER 0x0002 + +/* ECO V2.1 pin-out */ +#define MATRIX_ROW_PINS { D7, B5, B4, E6 } +#define MATRIX_COL_PINS { D1, D0, D4, C6, B6, B2, B3, B1, F7, F6, F5, F4, D2, D3 } +#define UNUSED_PINS + +#endif diff --git a/keyboards/eco/rev2/rev2.c b/keyboards/eco/rev2/rev2.c new file mode 100644 index 000000000..84097652d --- /dev/null +++ b/keyboards/eco/rev2/rev2.c @@ -0,0 +1 @@ +#include "eco.h" diff --git a/keyboards/eco/rev2/rev2.h b/keyboards/eco/rev2/rev2.h new file mode 100644 index 000000000..5b377f290 --- /dev/null +++ b/keyboards/eco/rev2/rev2.h @@ -0,0 +1,24 @@ +#ifndef REV2_H +#define REV2_H + +#include "../eco.h" + +//void promicro_bootloader_jmp(bool program); +#include "quantum.h" + +//void promicro_bootloader_jmp(bool program); + +#define KEYMAP( \ + k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, k014, \ + k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114, \ + k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, k214, \ + k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, k314 \ + ) \ + { \ + { k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, k014 }, \ + { k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114 }, \ + { k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, k214 }, \ + { k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, k314 } \ + } + +#endif \ No newline at end of file diff --git a/keyboards/eco/rev2/rules.mk b/keyboards/eco/rev2/rules.mk new file mode 100644 index 000000000..a0825b4ef --- /dev/null +++ b/keyboards/eco/rev2/rules.mk @@ -0,0 +1,5 @@ +BACKLIGHT_ENABLE = no + +ifndef QUANTUM_DIR + include ../../../Makefile +endif \ No newline at end of file From 83b35bf6f68d16910b2acfaffa21c82f4ffbfd3a Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Thu, 3 Aug 2017 11:57:18 -0400 Subject: [PATCH 31/52] Update readme.md --- readme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.md b/readme.md index 6cdce7240..781b9f615 100644 --- a/readme.md +++ b/readme.md @@ -1,5 +1,6 @@ # Quantum Mechanical Keyboard Firmware +[![Current Version](https://img.shields.io/github/tag/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/tags) [![Build Status](https://travis-ci.org/qmk/qmk_firmware.svg?branch=master)](https://travis-ci.org/qmk/qmk_firmware) [![Gitter](https://img.shields.io/gitter/room/qmk/qmk_firmware.js.svg)](https://gitter.im/qmk/qmk_firmware) [![Docs Status](https://img.shields.io/badge/docs-ready-orange.svg)](https://docs.qmk.fm) From 088dfb7db5b62831570c20f7e438ba0f0a612b74 Mon Sep 17 00:00:00 2001 From: Fabian Topfstedt Date: Thu, 3 Aug 2017 21:05:09 +0200 Subject: [PATCH 32/52] added a clone of my lets split grid layout on a re75 --- keyboards/xd75/keymaps/fabian/Makefile | 37 ++++ keyboards/xd75/keymaps/fabian/config.h | 24 +++ keyboards/xd75/keymaps/fabian/keymap.c | 237 +++++++++++++++++++++++++ 3 files changed, 298 insertions(+) create mode 100644 keyboards/xd75/keymaps/fabian/Makefile create mode 100644 keyboards/xd75/keymaps/fabian/config.h create mode 100644 keyboards/xd75/keymaps/fabian/keymap.c diff --git a/keyboards/xd75/keymaps/fabian/Makefile b/keyboards/xd75/keymaps/fabian/Makefile new file mode 100644 index 000000000..6e8941fdf --- /dev/null +++ b/keyboards/xd75/keymaps/fabian/Makefile @@ -0,0 +1,37 @@ +# Copyright 2013 Jun Wako +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + + +# QMK Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI 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 = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/xd75/keymaps/fabian/config.h b/keyboards/xd75/keymaps/fabian/config.h new file mode 100644 index 000000000..f52a97bbc --- /dev/null +++ b/keyboards/xd75/keymaps/fabian/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/xd75/keymaps/fabian/keymap.c b/keyboards/xd75/keymaps/fabian/keymap.c new file mode 100644 index 000000000..f6cc95ba2 --- /dev/null +++ b/keyboards/xd75/keymaps/fabian/keymap.c @@ -0,0 +1,237 @@ +#include "xd75.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 0 +#define _COLEMAK 1 +#define _DVORAK 2 +#define _LOWER 3 +#define _RAISE 4 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + ADJUST, +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +// Custom +#define CTL_ESC CTL_T(KC_ESC) // Tap for Escape, hold for Control +#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift +#define SFT_BSP SFT_T(KC_BSPC) // Tap for Backspace, hold for Shift +#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Alt+Shift) +// #define MEH_GRV MEH_T(KC_GRV) // Tap for Backtick, hold for Meh (Ctrl+Alt+Shift) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,--------------------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | | | | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | A | S | D | F | G | | | | H | J | K | L | ; | " | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | | | | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space | | | | Bksp |Raise | GUI |AltGr | Ctrl |Adjust| + * `--------------------------------------------------------------------------------------------------------' + */ +[_QWERTY] = { + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, _______, _______, _______, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC }, + { CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, _______, _______, _______, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT }, + { SFT_BSP, KC_Z, KC_X, KC_C, KC_V, KC_B, _______, _______, _______, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT }, + { ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, _______, _______, _______, SFT_BSP, RAISE, KC_RGUI, KC_RALT, KC_RCTL, ADJUST }, +}, + +/* Colemak + * ,--------------------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | F | P | G | | | | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | | | | H | N | E | I | O | " | + * |------+------+------+------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | | | | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space | | | | Bksp |Raise | GUI |AltGr | Ctrl |Adjust| + * `--------------------------------------------------------------------------------------------------------' + */ +[_COLEMAK] = { + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, _______, _______, _______, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC }, + { CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, _______, _______, _______, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT }, + { SFT_BSP, KC_Z, KC_X, KC_C, KC_V, KC_B, _______, _______, _______, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT }, + { ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, _______, _______, _______, SFT_BSP, RAISE, KC_RGUI, KC_RALT, KC_RCTL, ADJUST }, +}, + +/* Dvorak + * ,--------------------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | " | , | . | P | Y | | | | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------| + * | Esc | A | O | E | U | I | | | | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | | | | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space | | | | Bksp |Raise | GUI |AltGr | Ctrl |Adjust| + * `--------------------------------------------------------------------------------------------------------' + */ +[_DVORAK] = { + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, _______, _______, _______, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC }, + { CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, _______, _______, _______, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH }, + { SFT_BSP, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, _______, _______, _______, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT }, + { ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, _______, _______, _______, SFT_BSP, RAISE, KC_RGUI, KC_RALT, KC_RCTL, ADJUST }, +}, + +/* Lower + * ,--------------------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | | | | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | | | | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | | | | F12 | MS L | MS D |MS U | MS R |MS Btn| + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | 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, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_BTN1 }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, 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 | Left | Down | Up | Rght |MS_BN2| + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | 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_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_BTN2 }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY }, +}, + +/* Adjust (Lower + Raise) + * ,--------------------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | |Reset | |Aud on|Audoff|AGnorm| | | |AGswap|Qwerty|Colemk|Dvorak|Reset | Del | + * |------+------+------+------+------+------|------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | | + * `--------------------------------------------------------------------------------------------------------' + */ +[_ADJUST] = { + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { _______, RESET, _______, AU_ON, AU_OFF, AG_NORM, _______, _______, _______, AG_SWAP, QWERTY, COLEMAK, DVORAK, RESET, KC_DEL }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, +}, +}; + +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +#endif + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + #endif + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case 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 DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + #endif + persistent_default_layer_set(1UL<<_DVORAK); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} From e0caf94323d5cc0baae38af11984902fb1a5375f Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Thu, 3 Aug 2017 14:23:12 -0400 Subject: [PATCH 33/52] Move avrdude flashing script from individual keyboard rules.mk to common location and improve script. Port detection script is now more informative and better handles first time flashing of a Pro Micro --- keyboards/deltasplit75/rules.mk | 12 ------------ keyboards/handwired/atreus50/rules.mk | 12 ------------ keyboards/handwired/magicforce61/rules.mk | 12 ------------ keyboards/handwired/magicforce68/rules.mk | 12 ------------ keyboards/handwired/numpad20/rules.mk | 12 ------------ keyboards/handwired/ortho5x13/rules.mk | 12 ------------ keyboards/lets_split/rules.mk | 12 ------------ keyboards/nyquist/rules.mk | 12 ------------ keyboards/orthodox/rules.mk | 12 ------------ tmk_core/avr.mk | 14 ++++++++++++++ 10 files changed, 14 insertions(+), 108 deletions(-) diff --git a/keyboards/deltasplit75/rules.mk b/keyboards/deltasplit75/rules.mk index 0efa78550..1aee5313c 100644 --- a/keyboards/deltasplit75/rules.mk +++ b/keyboards/deltasplit75/rules.mk @@ -73,15 +73,3 @@ USE_I2C ?= yes SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes - -avrdude: build - ls /dev/tty* > /tmp/1; \ - echo "Reset your Pro Micro now"; \ - while [[ -z $$USB ]]; do \ - sleep 1; \ - ls /dev/tty* > /tmp/2; \ - USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \ - done; \ - avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex - -.PHONY: avrdude diff --git a/keyboards/handwired/atreus50/rules.mk b/keyboards/handwired/atreus50/rules.mk index 5e808dfa7..2e2d48f6a 100644 --- a/keyboards/handwired/atreus50/rules.mk +++ b/keyboards/handwired/atreus50/rules.mk @@ -67,15 +67,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -avrdude: build - ls /dev/tty* > /tmp/1; \ - echo "Reset your Pro Micro now"; \ - while [[ -z $$USB ]]; do \ - sleep 1; \ - ls /dev/tty* > /tmp/2; \ - USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \ - done; \ - avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex - -.PHONY: avrdude diff --git a/keyboards/handwired/magicforce61/rules.mk b/keyboards/handwired/magicforce61/rules.mk index 913bcb93e..a3fdd3d70 100644 --- a/keyboards/handwired/magicforce61/rules.mk +++ b/keyboards/handwired/magicforce61/rules.mk @@ -69,15 +69,3 @@ AUDIO_ENABLE ?= no # Audio output on port C6 ifndef QUANTUM_DIR include ../../../Makefile endif - -avrdude: build - ls /dev/tty* > /tmp/1; \ - echo "Reset your Pro Micro now"; \ - while [[ -z $$USB ]]; do \ - sleep 1; \ - ls /dev/tty* > /tmp/2; \ - USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \ - done; \ - avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex - -.PHONY: avrdude diff --git a/keyboards/handwired/magicforce68/rules.mk b/keyboards/handwired/magicforce68/rules.mk index 0e07bde40..0d21623ce 100644 --- a/keyboards/handwired/magicforce68/rules.mk +++ b/keyboards/handwired/magicforce68/rules.mk @@ -69,15 +69,3 @@ AUDIO_ENABLE = no # Audio output on port C6 ifndef QUANTUM_DIR include ../../../Makefile endif - -avrdude: build - ls /dev/tty* > /tmp/1; \ - echo "Reset your Pro Micro now"; \ - while [[ -z $$USB ]]; do \ - sleep 1; \ - ls /dev/tty* > /tmp/2; \ - USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \ - done; \ - avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex - -.PHONY: avrdude diff --git a/keyboards/handwired/numpad20/rules.mk b/keyboards/handwired/numpad20/rules.mk index 0e07bde40..0d21623ce 100644 --- a/keyboards/handwired/numpad20/rules.mk +++ b/keyboards/handwired/numpad20/rules.mk @@ -69,15 +69,3 @@ AUDIO_ENABLE = no # Audio output on port C6 ifndef QUANTUM_DIR include ../../../Makefile endif - -avrdude: build - ls /dev/tty* > /tmp/1; \ - echo "Reset your Pro Micro now"; \ - while [[ -z $$USB ]]; do \ - sleep 1; \ - ls /dev/tty* > /tmp/2; \ - USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \ - done; \ - avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex - -.PHONY: avrdude diff --git a/keyboards/handwired/ortho5x13/rules.mk b/keyboards/handwired/ortho5x13/rules.mk index 0e07bde40..0d21623ce 100644 --- a/keyboards/handwired/ortho5x13/rules.mk +++ b/keyboards/handwired/ortho5x13/rules.mk @@ -69,15 +69,3 @@ AUDIO_ENABLE = no # Audio output on port C6 ifndef QUANTUM_DIR include ../../../Makefile endif - -avrdude: build - ls /dev/tty* > /tmp/1; \ - echo "Reset your Pro Micro now"; \ - while [[ -z $$USB ]]; do \ - sleep 1; \ - ls /dev/tty* > /tmp/2; \ - USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \ - done; \ - avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex - -.PHONY: avrdude diff --git a/keyboards/lets_split/rules.mk b/keyboards/lets_split/rules.mk index cc87ee31c..c2b7d556e 100644 --- a/keyboards/lets_split/rules.mk +++ b/keyboards/lets_split/rules.mk @@ -74,15 +74,3 @@ USE_I2C = yes SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes - -avrdude: build - ls /dev/tty* > /tmp/1; \ - echo "Reset your Pro Micro now"; \ - while [ -z $$USB ]; do \ - sleep 1; \ - ls /dev/tty* > /tmp/2; \ - USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \ - done; \ - avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex - -.PHONY: avrdude diff --git a/keyboards/nyquist/rules.mk b/keyboards/nyquist/rules.mk index dfcff1d90..3f40ff2f8 100644 --- a/keyboards/nyquist/rules.mk +++ b/keyboards/nyquist/rules.mk @@ -73,15 +73,3 @@ USE_I2C = yes SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes - -avrdude: build - ls /dev/tty* > /tmp/1; \ - echo "Reset your Pro Micro now"; \ - while [[ -z $$USB ]]; do \ - sleep 1; \ - ls /dev/tty* > /tmp/2; \ - USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \ - done; \ - avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex - -.PHONY: avrdude diff --git a/keyboards/orthodox/rules.mk b/keyboards/orthodox/rules.mk index dfcff1d90..3f40ff2f8 100644 --- a/keyboards/orthodox/rules.mk +++ b/keyboards/orthodox/rules.mk @@ -73,15 +73,3 @@ USE_I2C = yes SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes - -avrdude: build - ls /dev/tty* > /tmp/1; \ - echo "Reset your Pro Micro now"; \ - while [[ -z $$USB ]]; do \ - sleep 1; \ - ls /dev/tty* > /tmp/2; \ - USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \ - done; \ - avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex - -.PHONY: avrdude diff --git a/tmk_core/avr.mk b/tmk_core/avr.mk index 4af34ba57..0d0eec3bf 100644 --- a/tmk_core/avr.mk +++ b/tmk_core/avr.mk @@ -144,6 +144,20 @@ dfu-ee: $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).eep fi $(DFU_PROGRAMMER) $(MCU) reset +avrdude: $(BUILD_DIR)/$(TARGET).hex + ls /dev/tty* > /tmp/1; \ + echo "Detecting Pro Micro port, reset your Pro Micro now.\c"; \ + while [ -z $$USB ]; do \ + sleep 1; \ + echo ".\c"; \ + ls /dev/tty* > /tmp/2; \ + USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \ + done; \ + echo ""; \ + echo "Detected Pro Micro port at $$USB"; \ + sleep 1; \ + avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex + # Convert hex to bin. flashbin: $(BUILD_DIR)/$(TARGET).hex $(OBJCOPY) -Iihex -Obinary $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).bin From 479139f9d4ef981a2f10918f0fb5a2c148ca0c8b Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Thu, 3 Aug 2017 14:33:55 -0400 Subject: [PATCH 34/52] Fix location of where the make command should be run --- keyboards/lets_split/readme.md | 4 ++-- keyboards/minidox/readme.md | 4 ++-- keyboards/nyquist/readme.md | 4 +++- keyboards/orthodox/readme.md | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/keyboards/lets_split/readme.md b/keyboards/lets_split/readme.md index 610b776ee..0ef7ff59d 100644 --- a/keyboards/lets_split/readme.md +++ b/keyboards/lets_split/readme.md @@ -106,7 +106,7 @@ Notes on Software Configuration ------------------------------- Configuring the firmware is similar to any other QMK project. One thing -to note is that `MATIX_ROWS` in `config.h` is the total number of rows between +to note is that `MATRIX_ROWS` in `config.h` is the total number of rows between the two halves, i.e. if your split keyboard has 4 rows in each half, then `MATRIX_ROWS=8`. @@ -115,7 +115,7 @@ not be very difficult to adapt it to support more if required. Flashing ------- -From the keymap directory run `make SUBPROJECT-KEYMAP-avrdude` for automatic serial port resolution and flashing. +From the `lets_split` directory run `make SUBPROJECT-KEYMAP-avrdude` for automatic serial port resolution and flashing. Example: `make rev2-default-avrdude` diff --git a/keyboards/minidox/readme.md b/keyboards/minidox/readme.md index da8971486..c15fd244a 100644 --- a/keyboards/minidox/readme.md +++ b/keyboards/minidox/readme.md @@ -1,7 +1,7 @@ MiniDox ===== -![MimiDox](http://i.imgur.com/iWb3yO0.jpg) +![MiniDox](http://i.imgur.com/iWb3yO0.jpg) A compact version of the ErgoDox @@ -22,7 +22,7 @@ Flashing ------- Note: Most of this is copied from the Let's Split readme, because it is awesome -From the keymap directory run `make SUBPROJECT-KEYMAP-avrdude` for automatic serial port resolution and flashing. +From the `minidox` directory run `make SUBPROJECT-KEYMAP-avrdude` for automatic serial port resolution and flashing. Example: `make rev1-default-avrdude` Choosing which board to plug the USB cable into (choosing Master) diff --git a/keyboards/nyquist/readme.md b/keyboards/nyquist/readme.md index c70bf0257..61b9317d5 100644 --- a/keyboards/nyquist/readme.md +++ b/keyboards/nyquist/readme.md @@ -6,6 +6,8 @@ The Nyquist is a 60% split ortholinear board by [Keebio](https://keeb.io). It ha ## Build Guide +A build log of the Nyquist can be found here: [Nyquist Build Log](http://imgur.com/a/dD4sX). + Since the design is very similar to the Let's Split v2, the build guide for that can be used while the build guide for the Nyquist is being fully developed. A build guide for putting together the Let's Split v2 can be found here: [An Overly Verbose Guide to Building a Let's Split Keyboard](https://github.com/nicinabox/lets-split-guide) There is additional information there about flashing and adding RGB underglow. @@ -98,7 +100,7 @@ unnecessary in simple use cases. Flashing ------- -From the keymap directory run `make SUBPROJECT-KEYMAP-avrdude` for automatic serial port resolution and flashing. +From the `nyquist` directory run `make SUBPROJECT-KEYMAP-avrdude` for automatic serial port resolution and flashing. Example: `make rev1-serial-avrdude` diff --git a/keyboards/orthodox/readme.md b/keyboards/orthodox/readme.md index 57e940b0f..e1fbf94ba 100644 --- a/keyboards/orthodox/readme.md +++ b/keyboards/orthodox/readme.md @@ -96,7 +96,7 @@ the two halves, i.e. if your split keyboard has 3 rows in each half, then Flashing ------- -From the keymap directory run `make SUBPROJECT-KEYMAP-avrdude` for automatic serial port resolution and flashing. +From the `orthodox` directory run `make SUBPROJECT-KEYMAP-avrdude` for automatic serial port resolution and flashing. Example: `make rev2-default-avrdude` From 525b3deadf8c6d063f2f62d900ae8b4d738b62fd Mon Sep 17 00:00:00 2001 From: Balz Guenat Date: Fri, 4 Aug 2017 01:55:35 +0200 Subject: [PATCH 35/52] add short name for locking mods to docs. --- docs/basic_keycodes.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/basic_keycodes.md b/docs/basic_keycodes.md index 2be3ada15..4f84647a2 100644 --- a/docs/basic_keycodes.md +++ b/docs/basic_keycodes.md @@ -51,9 +51,9 @@ |KC_RSHIFT|KC_RSFT|RightShift| |KC_RALT||RightAlt| |KC_RGUI||Right GUI(Windows/Apple/Meta key)| -|KC_LOCKING_CAPS||Locking Caps Lock| -|KC_LOCKING_NUM||Locking Num Lock| -|KC_LOCKING_SCROLL||Locking Scroll Lock| +|KC_LOCKING_CAPS|KC_LCAP|Locking Caps Lock| +|KC_LOCKING_NUM|KC_LNUM|Locking Num Lock| +|KC_LOCKING_SCROLL|KC_LSCR|Locking Scroll Lock| |KC_INT4|KC_HENK|JIS Henken| |KC_INT5|KC_MHEN|JIS Muhenken| @@ -183,4 +183,4 @@ Windows and Mac use different key codes for next track and previous track. Make |KC_MS_WH_RIGHT|KC_WH_R|Mouse Wheel Right| |KC_MS_ACCEL0|KC_ACL0|Mouse Acceleration 0| |KC_MS_ACCEL1|KC_ACL1|Mouse Acceleration 1| -|KC_MS_ACCEL2|KC_ACL2|Mouse Acceleration 2| \ No newline at end of file +|KC_MS_ACCEL2|KC_ACL2|Mouse Acceleration 2| From 05351ce8b354952354b6aa3426088b266a9d23e9 Mon Sep 17 00:00:00 2001 From: Rozakiin Date: Sun, 6 Aug 2017 22:23:40 +0100 Subject: [PATCH 36/52] Add files via upload --- keyboards/uk78/Makefile | 3 + keyboards/uk78/config.h | 76 +++++++++++++++ keyboards/uk78/keymaps/default/keymap.c | 119 ++++++++++++++++++++++++ keyboards/uk78/readme.md | 16 ++++ keyboards/uk78/rules.mk | 56 +++++++++++ keyboards/uk78/uk78.c | 1 + keyboards/uk78/uk78.h | 20 ++++ 7 files changed, 291 insertions(+) create mode 100644 keyboards/uk78/Makefile create mode 100644 keyboards/uk78/config.h create mode 100644 keyboards/uk78/keymaps/default/keymap.c create mode 100644 keyboards/uk78/readme.md create mode 100644 keyboards/uk78/rules.mk create mode 100644 keyboards/uk78/uk78.c create mode 100644 keyboards/uk78/uk78.h diff --git a/keyboards/uk78/Makefile b/keyboards/uk78/Makefile new file mode 100644 index 000000000..57b2ef62e --- /dev/null +++ b/keyboards/uk78/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif diff --git a/keyboards/uk78/config.h b/keyboards/uk78/config.h new file mode 100644 index 000000000..081f6b407 --- /dev/null +++ b/keyboards/uk78/config.h @@ -0,0 +1,76 @@ +/* +Copyright 2012 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x554B /* Ascii */ +#define PRODUCT_ID 0x004E +#define DEVICE_VER 0x0002 +#define MANUFACTURER UK Keyboards +#define PRODUCT UK78 +#define DESCRIPTION QMK keyboard firmware for UK78 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 19 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { F3, F2, F1, F0, A0 } +#define MATRIX_COL_PINS { A2, A1, F5, F4, E6, E7, E5, E4, B7, D0, D1, D2, D3, D4, D5, D6, D7, B5, E0 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ +#define BACKLIGHT_PIN B6 +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 3 +#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 + +/* ws2812b options */ +#define RGB_DI_PIN F6 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 20 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + +#endif \ No newline at end of file diff --git a/keyboards/uk78/keymaps/default/keymap.c b/keyboards/uk78/keymaps/default/keymap.c new file mode 100644 index 000000000..759b4120a --- /dev/null +++ b/keyboards/uk78/keymaps/default/keymap.c @@ -0,0 +1,119 @@ +#include "uk78.h" + +// Helpful defines +#define _______ KC_TRNS + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _BL 0 +#define _FL1 1 +#define _FL2 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* _BL: Base Layer(Default) - For ISO enter use ANSI \ + * ,-------------------------------------------------------------------------------. + * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| /|BSpc| Del| P/| P*| P-| + * |-------------------------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | P7| P8| P9| P=| + * |-------------------------------------------------------------------------------| + * |CAPS | A| S| D| F| G| H| J| K| L| ;| '| #| Ent| P4| P5| P6| P+| + * |-------------------------------------------------------------------------------| + * |Shift| \| Z| X| C| V| B| N| M| ,| .| /|Shift | Up| P1| P2| P3|SLck| + * |-------------------------------------------------------------------------------| + * |Ctrl|Win |Alt | Space |Alt|Mo(1)|Ctrl|Lef|Dow| Rig| P0| P.|PEnt| + * `-------------------------------------------------------------------------------' + */ + [_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_BSLS, KC_BSPC, KC_DEL, KC_PSLS, KC_PAST, KC_PMNS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PEQL, + 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_PPLS, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_SLCK, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), + /* _FL1: Function Layer 1 - For ISO enter use ANSI \ + * ,-------------------------------------------------------------------------------. + * | `|F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|PScr|Ins|NLck| | | | + * |-------------------------------------------------------------------------------| + * | | | | |RST| | | | | | | | | | | | | | + * |-------------------------------------------------------------------------------| + * | | | | | | |Hu+|Va+|Sa+| | | | | | | | | | + * |-------------------------------------------------------------------------------| + * | | | | | |RGB|Hu-|Va-|Sa-|Bl-|Bl+| |Mute|Vol+| | | | | + * |-------------------------------------------------------------------------------| + * | | | | BL_Toggle | | | | |Vol-| | | | | + * `-------------------------------------------------------------------------------' + */ + [_FL1] = 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_PSCR, KC_INS, KC_NLCK, 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, RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, BL_DEC, BL_INC, KC_TRNS, KC_MUTE, KC_MUTE, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, BL_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + /* _FL2: Function Layer 2 - For ISO enter use ANSI \ + * ,-------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | | | | | + * |-------------------------------------------------------------------------------| + * | | | | | | | | | | | | | | | | | | | + * |-------------------------------------------------------------------------------| + * | | | | | | | | | | | | | | | | | | | + * |-------------------------------------------------------------------------------| + * | | | | | | | | | | | | | | | | | | | + * |-------------------------------------------------------------------------------| + * | | | | | | | | | | | | | | + * `-------------------------------------------------------------------------------' + */ + [_FL2] = KEYMAP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + +}; + + +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)) { + DDRA |= (1 << 3); PORTA |= (1 << 3); + } else { + DDRA &= ~(1 << 3); PORTA &= ~(1 << 3); + } + + 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 { + + } + +} \ No newline at end of file diff --git a/keyboards/uk78/readme.md b/keyboards/uk78/readme.md new file mode 100644 index 000000000..ac163e5e0 --- /dev/null +++ b/keyboards/uk78/readme.md @@ -0,0 +1,16 @@ +# UK78 + +![UK78](http://i.imgur.com/42pg6RS.png) + +A fully customizable 60%+numpad keyboard. + +* Keyboard Maintainer: [Rozakiin](https://github.com/rozakiin) +* Hardware Supported: UK78 PCB + * rev2 +* Hardware Availability: [ukkeyboards.](https://clueboard.co/) + +Make example for this keyboard (after setting up your build environment): + + make uk78-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/uk78/rules.mk b/keyboards/uk78/rules.mk new file mode 100644 index 000000000..4e8d14812 --- /dev/null +++ b/keyboards/uk78/rules.mk @@ -0,0 +1,56 @@ +# MCU name +MCU = at90usb1286 + +# 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=8192 + + +# 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 ?= yes # Enable keyboard backlight functionality +AUDIO_ENABLE ?= no +RGBLIGHT_ENABLE ?= yes \ No newline at end of file diff --git a/keyboards/uk78/uk78.c b/keyboards/uk78/uk78.c new file mode 100644 index 000000000..3611427d0 --- /dev/null +++ b/keyboards/uk78/uk78.c @@ -0,0 +1 @@ +#include "uk78.h" diff --git a/keyboards/uk78/uk78.h b/keyboards/uk78/uk78.h new file mode 100644 index 000000000..6cc5eee47 --- /dev/null +++ b/keyboards/uk78/uk78.h @@ -0,0 +1,20 @@ +#ifndef UK78_H +#define UK78_H + +#include "quantum.h" + +#define KEYMAP( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K018, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, K116, K117, K118, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, K216, K217, K218, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, K318, \ + K400, K401, K402, K406, K410, K411, K412, K413, K414, K415, K416, K417, K418 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K018 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, K114, K115, K116, K117, K118 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214, K215, K216, K217, K218 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, K318 }, \ + { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413, K414, K415, K416, K417, K418 } \ +} + +#endif \ No newline at end of file From 5fbd25db6232744ea7213f40710a63c3211b9c8c Mon Sep 17 00:00:00 2001 From: Rozakiin Date: Sun, 6 Aug 2017 22:25:33 +0100 Subject: [PATCH 37/52] Update readme.md --- keyboards/uk78/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/uk78/readme.md b/keyboards/uk78/readme.md index ac163e5e0..22cbcabc4 100644 --- a/keyboards/uk78/readme.md +++ b/keyboards/uk78/readme.md @@ -7,7 +7,7 @@ A fully customizable 60%+numpad keyboard. * Keyboard Maintainer: [Rozakiin](https://github.com/rozakiin) * Hardware Supported: UK78 PCB * rev2 -* Hardware Availability: [ukkeyboards.](https://clueboard.co/) +* Hardware Availability: [ukkeyboards.](http://ukkeyboards.bigcartel.com/) Make example for this keyboard (after setting up your build environment): From 396f97068beba45a84ac01e47128b40d2e24d9e5 Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Fri, 4 Aug 2017 14:55:42 -0400 Subject: [PATCH 38/52] Add RGB commands to default Nyquist keymap --- keyboards/nyquist/keymaps/default/Makefile | 2 ++ keyboards/nyquist/keymaps/default/config.h | 7 +++++++ keyboards/nyquist/keymaps/default/keymap.c | 4 ++-- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/keyboards/nyquist/keymaps/default/Makefile b/keyboards/nyquist/keymaps/default/Makefile index 457a3d01d..1e5761278 100644 --- a/keyboards/nyquist/keymaps/default/Makefile +++ b/keyboards/nyquist/keymaps/default/Makefile @@ -1,3 +1,5 @@ +RGBLIGHT_ENABLE = yes + ifndef QUANTUM_DIR include ../../../../Makefile endif diff --git a/keyboards/nyquist/keymaps/default/config.h b/keyboards/nyquist/keymaps/default/config.h index 624d284ca..072d4a7ce 100644 --- a/keyboards/nyquist/keymaps/default/config.h +++ b/keyboards/nyquist/keymaps/default/config.h @@ -31,4 +31,11 @@ along with this program. If not, see . // #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/nyquist/keymaps/default/keymap.c b/keyboards/nyquist/keymaps/default/keymap.c index dcb68a6e0..97fee4e1e 100644 --- a/keyboards/nyquist/keymaps/default/keymap.c +++ b/keyboards/nyquist/keymaps/default/keymap.c @@ -139,7 +139,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | Reset| | | | | | | | | | Del | + * | | Reset|RGB Tg|RGB Md|Hue Up|Hue Dn|Sat Up|Sat Dn|Val Up|Val Dn| | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | * |------+------+------+------+------+------|------+------+------+------+------+------| @@ -150,7 +150,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_ADJUST] = KEYMAP( \ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ - _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, RESET , RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, KC_DEL, \ _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ From b20a87e3cc7079e1ab92692d9c89126547551528 Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Fri, 4 Aug 2017 14:58:52 -0400 Subject: [PATCH 39/52] Add .eep files for setting hands --- keyboards/nyquist/eeprom-lefthand.eep | 2 ++ keyboards/nyquist/eeprom-righthand.eep | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 keyboards/nyquist/eeprom-lefthand.eep create mode 100644 keyboards/nyquist/eeprom-righthand.eep diff --git a/keyboards/nyquist/eeprom-lefthand.eep b/keyboards/nyquist/eeprom-lefthand.eep new file mode 100644 index 000000000..b9666a74c --- /dev/null +++ b/keyboards/nyquist/eeprom-lefthand.eep @@ -0,0 +1,2 @@ +:0B0000000000000000000000000001F4 +:00000001FF diff --git a/keyboards/nyquist/eeprom-righthand.eep b/keyboards/nyquist/eeprom-righthand.eep new file mode 100644 index 000000000..94cc5be7f --- /dev/null +++ b/keyboards/nyquist/eeprom-righthand.eep @@ -0,0 +1,2 @@ +:0B0000000000000000000000000000F5 +:00000001FF From 7b5f02aa6a6d5c4fe4bff0d32c2dbb0abf20e51c Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Fri, 4 Aug 2017 15:32:45 -0400 Subject: [PATCH 40/52] Port updated debouncing algorithm from Let's Split to Nyquist --- keyboards/nyquist/matrix.c | 248 ++++++++++++++++++++++++++------- keyboards/nyquist/split_util.c | 2 + 2 files changed, 200 insertions(+), 50 deletions(-) diff --git a/keyboards/nyquist/matrix.c b/keyboards/nyquist/matrix.c index dcb94c67c..21eef9456 100644 --- a/keyboards/nyquist/matrix.c +++ b/keyboards/nyquist/matrix.c @@ -21,9 +21,7 @@ along with this program. If not, see . #include #include #include -#include -#include -#include +#include "wait.h" #include "print.h" #include "debug.h" #include "util.h" @@ -31,6 +29,7 @@ along with this program. If not, see . #include "split_util.h" #include "pro_micro.h" #include "config.h" +#include "timer.h" #ifdef USE_I2C # include "i2c.h" @@ -38,14 +37,29 @@ along with this program. If not, see . # include "serial.h" #endif -#ifndef DEBOUNCE -# define DEBOUNCE 5 +#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 -static uint8_t debouncing = DEBOUNCE; -static const int ROWS_PER_HAND = MATRIX_ROWS/2; +#define ROWS_PER_HAND (MATRIX_ROWS/2) + static uint8_t error_count = 0; static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; @@ -55,11 +69,19 @@ static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; static matrix_row_t matrix[MATRIX_ROWS]; static matrix_row_t matrix_debouncing[MATRIX_ROWS]; -static matrix_row_t read_cols(void); -static void init_cols(void); -static void unselect_rows(void); -static void select_row(uint8_t row); - +#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(); @@ -118,33 +140,54 @@ void matrix_init(void) } matrix_init_quantum(); + } uint8_t _matrix_scan(void) { - // Right hand is stored after the left in the matirx so, we need to offset it 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 - for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { - select_row(i); - _delay_us(30); // without this wait read unstable value. - matrix_row_t cols = read_cols(); - if (matrix_debouncing[i+offset] != cols) { - matrix_debouncing[i+offset] = cols; - debouncing = DEBOUNCE; - } - unselect_rows(); } - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { +#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; } @@ -200,9 +243,7 @@ int serial_transaction(void) { uint8_t matrix_scan(void) { - int ret = _matrix_scan(); - - + uint8_t ret = _matrix_scan(); #ifdef USE_I2C if( i2c_transaction() ) { @@ -233,11 +274,10 @@ uint8_t matrix_scan(void) void matrix_slave_scan(void) { _matrix_scan(); - int offset = (isLeftHand) ? 0 : (MATRIX_ROWS / 2); + 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]; */ i2c_slave_buffer[i] = matrix[offset+i]; } #else // USE_SERIAL @@ -284,33 +324,141 @@ uint8_t matrix_key_count(void) return count; } -static void init_cols(void) +#if (DIODE_DIRECTION == COL2ROW) + +static void init_cols(void) { - for(int x = 0; x < MATRIX_COLS; x++) { - _SFR_IO8((col_pins[x] >> 4) + 1) &= ~_BV(col_pins[x] & 0xF); - _SFR_IO8((col_pins[x] >> 4) + 2) |= _BV(col_pins[x] & 0xF); + 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 } } -static matrix_row_t read_cols(void) +static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { - matrix_row_t result = 0; - for(int x = 0; x < MATRIX_COLS; x++) { - result |= (_SFR_IO8(col_pins[x] >> 4) & _BV(col_pins[x] & 0xF)) ? 0 : (1 << x); - } - return result; -} + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[current_row]; -static void unselect_rows(void) -{ - for(int x = 0; x < ROWS_PER_HAND; x++) { - _SFR_IO8((row_pins[x] >> 4) + 1) &= ~_BV(row_pins[x] & 0xF); - _SFR_IO8((row_pins[x] >> 4) + 2) |= _BV(row_pins[x] & 0xF); + // 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) { - _SFR_IO8((row_pins[row] >> 4) + 1) |= _BV(row_pins[row] & 0xF); - _SFR_IO8((row_pins[row] >> 4) + 2) &= ~_BV(row_pins[row] & 0xF); + 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/nyquist/split_util.c b/keyboards/nyquist/split_util.c index 39639c3b4..346cbc908 100644 --- a/keyboards/nyquist/split_util.c +++ b/keyboards/nyquist/split_util.c @@ -8,6 +8,7 @@ #include "matrix.h" #include "keyboard.h" #include "config.h" +#include "timer.h" #ifdef USE_I2C # include "i2c.h" @@ -42,6 +43,7 @@ static void keyboard_master_setup(void) { } static void keyboard_slave_setup(void) { + timer_init(); #ifdef USE_I2C i2c_slave_init(SLAVE_I2C_ADDRESS); #else From 1fc9eabd08136554e4f27f3d21cf5e002441abfe Mon Sep 17 00:00:00 2001 From: Gareth Pye Date: Sat, 5 Aug 2017 20:55:06 +1000 Subject: [PATCH 41/52] Fixed a layout comment to match layout array --- keyboards/satan/keymaps/poker/keymap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboards/satan/keymaps/poker/keymap.c b/keyboards/satan/keymaps/poker/keymap.c index 9da7d29b7..b7e6fac21 100644 --- a/keyboards/satan/keymaps/poker/keymap.c +++ b/keyboards/satan/keymaps/poker/keymap.c @@ -36,7 +36,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------. * | ~ | F1|F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12| DEL | * |-----------------------------------------------------------| - * | | Up| | | | |Cal| |Ins| |PrSc|Sclk|Paus| | + * | | |Up| | | |Cal| |Ins| |PrSc|Sclk|Paus| | * |-----------------------------------------------------------| * | |Left|Down|Rig| | | | | | |Home|PgUp| | * |-----------------------------------------------------------| @@ -51,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_APP, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_END, KC_PGDN, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - + /* Keymap _RL: Function Layer * ,-----------------------------------------------------------. * | | | | | | | | | | | | | | RESET| @@ -63,7 +63,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | F1|F2 | F3|F4 | F5| F6| F7| F8| | | | * |-----------------------------------------------------------| * | | | | | | | | | - * `-----------------------------------------------------------' + * `-----------------------------------------------------------' */ [_RL] = KEYMAP_ANSI( #ifdef RGBLIGHT_ENABLE From 087fbe0628652ed6ac81a03748b9bac747edcacc Mon Sep 17 00:00:00 2001 From: Nic Aitch Date: Sun, 6 Aug 2017 20:13:29 -0500 Subject: [PATCH 42/52] Port main keyboard parts --- keyboards/bananasplit/Makefile | 3 + keyboards/bananasplit/README.md | 3 + keyboards/bananasplit/bananasplit.c | 28 +++++++++ keyboards/bananasplit/bananasplit.h | 92 +++++++++++++++++++++++++++++ keyboards/bananasplit/config.h | 81 +++++++++++++++++++++++++ keyboards/bananasplit/rules.mk | 65 ++++++++++++++++++++ 6 files changed, 272 insertions(+) create mode 100644 keyboards/bananasplit/Makefile create mode 100644 keyboards/bananasplit/README.md create mode 100644 keyboards/bananasplit/bananasplit.c create mode 100644 keyboards/bananasplit/bananasplit.h create mode 100644 keyboards/bananasplit/config.h create mode 100644 keyboards/bananasplit/rules.mk diff --git a/keyboards/bananasplit/Makefile b/keyboards/bananasplit/Makefile new file mode 100644 index 000000000..57b2ef62e --- /dev/null +++ b/keyboards/bananasplit/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif diff --git a/keyboards/bananasplit/README.md b/keyboards/bananasplit/README.md new file mode 100644 index 000000000..667a02f29 --- /dev/null +++ b/keyboards/bananasplit/README.md @@ -0,0 +1,3 @@ +# BananaSplit60 + +Ported from evangs/tmk_keyboard diff --git a/keyboards/bananasplit/bananasplit.c b/keyboards/bananasplit/bananasplit.c new file mode 100644 index 000000000..1aa8fb174 --- /dev/null +++ b/keyboards/bananasplit/bananasplit.c @@ -0,0 +1,28 @@ +#include "bananasplit.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/bananasplit/bananasplit.h b/keyboards/bananasplit/bananasplit.h new file mode 100644 index 000000000..082d04aed --- /dev/null +++ b/keyboards/bananasplit/bananasplit.h @@ -0,0 +1,92 @@ +/* +Copyright 2012,2013 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#ifndef BANANASPLIT_H +#define BANANASPLIT_H + +#include "quantum.h" + +#define KEYMAP( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ + K40, K41, K42, K44, K45, K46, K48, K49, K4A, K4B, K4C \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, KC_NO }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ + { K40, K41, K42, KC_NO, K44, K45, K46, KC_NO, K48, K49, K4A, K4B, K4C } \ +} + +#define KEYMAP_HHKBANANA( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ + K40, K41, K42, K44, K45, K46, K48, K49, K4A, K4B, K4C \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO }, \ + { K40, K41, K42, KC_NO, K44, K45, K46, KC_NO, K48, K49, K4A, K4B, K4C } \ +} + +#define KEYMAP_ANSI( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ + K40, K41, K42, K45, K48, K49, K4B, K4C \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, KC_NO }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO }, \ + { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, K48, K49, KC_NO, K4B, K4C } \ +} + +#define KEYMAP_ISO( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ + K40, K41, K42, K45, K48, K49, K4B, K4C \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, KC_NO }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO }, \ + { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, K48, K49, KC_NO, K4B, K4C } \ +} + +#define KEYMAP_ALL( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D,\ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D,\ + K40, K41, K42, K44, K45, K46, K48, K49, K4A, K4B, K4C \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ + { K40, K41, K42, KC_NO, K44, K45, K46, KC_NO, K48, K49, K4A, K4B, K4C } \ +} + +#endif diff --git a/keyboards/bananasplit/config.h b/keyboards/bananasplit/config.h new file mode 100644 index 000000000..bf8d9377c --- /dev/null +++ b/keyboards/bananasplit/config.h @@ -0,0 +1,81 @@ +/* +Copyright 2012 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEAE +#define PRODUCT_ID 0x8870 +#define DEVICE_VER 0x0001 +#define MANUFACTURER TheVan Keyboards +#define PRODUCT BananaSplit 60 +#define DESCRIPTION keyboard firmware for BananaSplit 60 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +#define MATRIX_ROW_PINS { B0, B2, B4, B5, B6 } +#define MATRIX_COL_PINS { F5, B1, F0, F1, F4, B3, D7, D6, D4, D5, D3, D2, D1, D0 } +#define UNUSED_PINS + +#define DIODE_DIRECTION ROW2COL + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 1 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 +#define TAPPING_TERM 175 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + + + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/bananasplit/rules.mk b/keyboards/bananasplit/rules.mk new file mode 100644 index 000000000..04579d4ce --- /dev/null +++ b/keyboards/bananasplit/rules.mk @@ -0,0 +1,65 @@ +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA +BACKLIGHT_ENABLE = yes + + +# Optimize size but this may cause error "relocation truncated to fit" +#EXTRALDFLAGS = -Wl,--relax From 4a5c9485613c29cbea64ba0c998c3285a3b29ab5 Mon Sep 17 00:00:00 2001 From: Nic Aitch Date: Sun, 6 Aug 2017 20:14:16 -0500 Subject: [PATCH 43/52] Port true_banana as default --- .../bananasplit/keymaps/default/keymap.c | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 keyboards/bananasplit/keymaps/default/keymap.c diff --git a/keyboards/bananasplit/keymaps/default/keymap.c b/keyboards/bananasplit/keymaps/default/keymap.c new file mode 100644 index 000000000..f07278df9 --- /dev/null +++ b/keyboards/bananasplit/keymaps/default/keymap.c @@ -0,0 +1,25 @@ +#include "bananasplit.h" + +#define DEFAULT_LAYER 0 +#define LAYER_1 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [DEFAULT_LAYER] = KEYMAP( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SLSH), KC_UP, _______, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_ENT, MO(LAYER_1), KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT + ), + + [LAYER_1] = KEYMAP( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), +}; + +const uint16_t PROGMEM fn_actions[] = { +}; From ba59b2d97ef99291e1c825b283bd40711edc4c79 Mon Sep 17 00:00:00 2001 From: Nic Aitch Date: Sun, 6 Aug 2017 20:14:27 -0500 Subject: [PATCH 44/52] Port hhkbanana --- .../bananasplit/keymaps/hhkbanana/keymap.c | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 keyboards/bananasplit/keymaps/hhkbanana/keymap.c diff --git a/keyboards/bananasplit/keymaps/hhkbanana/keymap.c b/keyboards/bananasplit/keymaps/hhkbanana/keymap.c new file mode 100644 index 000000000..b6c1d268b --- /dev/null +++ b/keyboards/bananasplit/keymaps/hhkbanana/keymap.c @@ -0,0 +1,25 @@ +#include "bananasplit.h" + +#define DEFAULT_LAYER 0 +#define LAYER_1 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [DEFAULT_LAYER] = KEYMAP_HHKBANANA( \ + 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_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_PSCR, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_ENT, MO(LAYER_1), KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT \ + ), + + [LAYER_1] = KEYMAP_HHKBANANA( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), +}; + +const uint16_t PROGMEM fn_actions[] = { +}; From c93975ac94f0f95eafdaebc752e7789dfb70d7be Mon Sep 17 00:00:00 2001 From: Nic Aitch Date: Sun, 6 Aug 2017 20:16:20 -0500 Subject: [PATCH 45/52] Add "hhkb with arrows" macro --- keyboards/bananasplit/bananasplit.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/keyboards/bananasplit/bananasplit.h b/keyboards/bananasplit/bananasplit.h index 082d04aed..5be3d881a 100644 --- a/keyboards/bananasplit/bananasplit.h +++ b/keyboards/bananasplit/bananasplit.h @@ -89,4 +89,19 @@ along with this program. If not, see . { K40, K41, K42, KC_NO, K44, K45, K46, KC_NO, K48, K49, K4A, K4B, K4C } \ } +#define KEYMAP_HHKB_ARROW( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D,\ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D,\ + K40, K41, K42, K44, K45, K46, K48, K49, K4A, K4B, K4C \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ + { K40, K41, K42, KC_NO, K44, K45, K46, KC_NO, K48, K49, K4A, K4B, K4C } \ +} + + #endif From fb0d4e96e89c1219480f3f79a6e18be484089ea9 Mon Sep 17 00:00:00 2001 From: Nic Aitch Date: Sun, 6 Aug 2017 20:16:30 -0500 Subject: [PATCH 46/52] Add nic keymap --- keyboards/bananasplit/keymaps/nic/keymap.c | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 keyboards/bananasplit/keymaps/nic/keymap.c diff --git a/keyboards/bananasplit/keymaps/nic/keymap.c b/keyboards/bananasplit/keymaps/nic/keymap.c new file mode 100644 index 000000000..58d7d02bd --- /dev/null +++ b/keyboards/bananasplit/keymaps/nic/keymap.c @@ -0,0 +1,43 @@ +#include "bananasplit.h" + +#define DEFAULT_LAYER 0 +#define THUMB_LAYER 1 +#define NORMAN_LAYER 2 +#define MOD_LAYER 3 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [DEFAULT_LAYER] = KEYMAP_HHKB_ARROW( \ + 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_BSLS, \ + 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, \ + 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, KC_ENT, KC_DEL, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SLSH), KC_UP, TG(NORMAN_LAYER), \ + KC_HYPR, KC_LALT, KC_LGUI, KC_SPC, MO(THUMB_LAYER), KC_SPC, KC_LGUI, KC_LALT, KC_LEFT, KC_DOWN, KC_RIGHT \ + ), + + [THUMB_LAYER] = KEYMAP_HHKB_ARROW( \ + MO(MOD_LAYER), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + + [NORMAN_LAYER] = KEYMAP_HHKB_ARROW( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, KC_D, KC_F, KC_K, KC_J, KC_U, KC_R, KC_L, KC_SCLN, _______, _______, _______, \ + _______, _______, _______, KC_E, KC_T, _______, KC_Y, KC_N, KC_I, KC_O, KC_H, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, KC_P, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + + [MOD_LAYER] = KEYMAP_HHKB_ARROW( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), +}; + +const uint16_t PROGMEM fn_actions[] = { +}; From b529d5923fc304fc0a5d7cdbb6f3497afc812f48 Mon Sep 17 00:00:00 2001 From: Nic Aitch Date: Sun, 6 Aug 2017 20:22:27 -0500 Subject: [PATCH 47/52] Update readme --- keyboards/bananasplit/README.md | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/keyboards/bananasplit/README.md b/keyboards/bananasplit/README.md index 667a02f29..b059a0834 100644 --- a/keyboards/bananasplit/README.md +++ b/keyboards/bananasplit/README.md @@ -1,3 +1,29 @@ -# BananaSplit60 +# BananaSplit60 keyboard firmware Ported from evangs/tmk_keyboard + +## Quantum MK Firmware + +For the full Quantum feature list, see [the parent readme](/). + +## Building + +Download or clone the whole firmware and navigate to the keyboards/bananasplit folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. + +Depending on which keymap you would like to use, you will have to compile slightly differently. + +### Default + +To build with the default keymap, simply run `make default`. + +### Other Keymaps + +Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files. + +To build the firmware binary hex file with a keymap just do `make` with a keymap like this: + +``` +$ make [default|jack|] +``` + +Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. From 7f3921bcb3ab1b2cb992b38920120ae448793d02 Mon Sep 17 00:00:00 2001 From: Nic Aitch Date: Sun, 6 Aug 2017 20:55:03 -0500 Subject: [PATCH 48/52] Update nic keymap --- keyboards/bananasplit/keymaps/nic/keymap.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/keyboards/bananasplit/keymaps/nic/keymap.c b/keyboards/bananasplit/keymaps/nic/keymap.c index 58d7d02bd..d8a5d0b17 100644 --- a/keyboards/bananasplit/keymaps/nic/keymap.c +++ b/keyboards/bananasplit/keymaps/nic/keymap.c @@ -5,19 +5,21 @@ #define NORMAN_LAYER 2 #define MOD_LAYER 3 +#define HYPER_TAB ALL_T(KC_TAB) + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [DEFAULT_LAYER] = KEYMAP_HHKB_ARROW( \ 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_BSLS, \ - 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, \ + HYPER_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, \ 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, KC_ENT, KC_DEL, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SLSH), KC_UP, TG(NORMAN_LAYER), \ - KC_HYPR, KC_LALT, KC_LGUI, KC_SPC, MO(THUMB_LAYER), KC_SPC, KC_LGUI, KC_LALT, KC_LEFT, KC_DOWN, KC_RIGHT \ + KC_CAPS, KC_LALT, KC_LGUI, KC_SPC, MO(THUMB_LAYER), KC_SPC, KC_LGUI, KC_LALT, KC_LEFT, KC_DOWN, KC_RIGHT \ ), [THUMB_LAYER] = KEYMAP_HHKB_ARROW( \ - MO(MOD_LAYER), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + MO(MOD_LAYER), 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_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), From 93b850048a45aca8a0758cb7be6d8c1e31f24d40 Mon Sep 17 00:00:00 2001 From: That-Canadian Date: Mon, 7 Aug 2017 07:49:43 -0400 Subject: [PATCH 49/52] Changed my personal keymap and config. --- keyboards/minidox/keymaps/that_canadian/config.h | 2 +- keyboards/minidox/keymaps/that_canadian/keymap.c | 15 ++------------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/keyboards/minidox/keymaps/that_canadian/config.h b/keyboards/minidox/keymaps/that_canadian/config.h index aad7ed1e6..5832d1866 100644 --- a/keyboards/minidox/keymaps/that_canadian/config.h +++ b/keyboards/minidox/keymaps/that_canadian/config.h @@ -30,7 +30,7 @@ along with this program. If not, see . /* ws2812 RGB LED */ #define RGB_DI_PIN D7 #define RGBLIGHT_TIMER -#define RGBLED_NUM 4 // Number of LEDs +#define RGBLED_NUM 8 // Number of LEDs #define RGBLIGHT_ANIMATIONS #define RGBLIGHT_HUE_STEP 10 #define RGBLIGHT_SAT_STEP 17 diff --git a/keyboards/minidox/keymaps/that_canadian/keymap.c b/keyboards/minidox/keymaps/that_canadian/keymap.c index 5d55d1825..b1ca139b7 100644 --- a/keyboards/minidox/keymaps/that_canadian/keymap.c +++ b/keyboards/minidox/keymaps/that_canadian/keymap.c @@ -40,11 +40,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Z | X | C | V | B | | N | M | , | . | / | * `----------------------------------' `----------------------------------' * ,--------------------. ,------,-------------. -<<<<<<< HEAD * | Shift| LOWER| | | | RAISE| Ctrl | -======= - * | Ctrl | LOWER| | | | RAISE| Shift| ->>>>>>> a4958a532da154b9dd6f6144836a73f9de641f74 * `-------------| Space| |BckSpc|------+------. * | | | | * `------' `------' @@ -105,9 +101,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,----------------------------------. ,----------------------------------. * | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | Up | F9 | F10 | * |------+------+------+------+------| |------+------+------+------+------| - * | F11 | F12 | | | | | | Left | Down |Right |caltde| + * | F11 | F12 | |RGBSAI|RGBSAD| | | Left | Down |Right |caltde| * |------+------+------+------+------| |------+------+------+------+------| - * | Reset| | | | | | | | F8 |Taskmg| | + * | Reset|RGBTOG|RGBMOD|RGBHUI|RGBHUD| |RGBVAI|RGBVAD| F8 |Taskmg| | * `----------------------------------' `----------------------------------' * ,--------------------. ,------,-------------. * | | LOWER| | | | RAISE| | @@ -123,10 +119,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -#ifdef AUDIO_ENABLE -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -#endif - void persistant_default_layer_set(uint16_t default_layer) { eeconfig_update_default_layer(default_layer); default_layer_set(default_layer); @@ -136,9 +128,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case QWERTY: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); - #endif persistant_default_layer_set(1UL<<_QWERTY); } return false; From 4fd5ee410c55857a4a5aae1e04079aae41fc32f7 Mon Sep 17 00:00:00 2001 From: That-Canadian Date: Mon, 7 Aug 2017 07:55:33 -0400 Subject: [PATCH 50/52] Modified gitignore file to allow the left and right hand eeprom files for the MiniDox to be added. They need to be there for proper flashing of the board. They do not change between builds, so no need to re-build them. --- .gitignore | 5 ++++- keyboards/minidox/eeprom-lefthand.eep | 2 ++ keyboards/minidox/eeprom-righthand.eep | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 keyboards/minidox/eeprom-lefthand.eep create mode 100644 keyboards/minidox/eeprom-righthand.eep diff --git a/.gitignore b/.gitignore index e40308193..da6579504 100644 --- a/.gitignore +++ b/.gitignore @@ -41,4 +41,7 @@ util/Win_Check_Output.txt # ignore image files *.png *.jpg -*.gif \ No newline at end of file +*.gif + +# Do not ignore MiniDox left/right hand eeprom files +!keyboards/minidox/*.eep \ No newline at end of file diff --git a/keyboards/minidox/eeprom-lefthand.eep b/keyboards/minidox/eeprom-lefthand.eep new file mode 100644 index 000000000..b9666a74c --- /dev/null +++ b/keyboards/minidox/eeprom-lefthand.eep @@ -0,0 +1,2 @@ +:0B0000000000000000000000000001F4 +:00000001FF diff --git a/keyboards/minidox/eeprom-righthand.eep b/keyboards/minidox/eeprom-righthand.eep new file mode 100644 index 000000000..94cc5be7f --- /dev/null +++ b/keyboards/minidox/eeprom-righthand.eep @@ -0,0 +1,2 @@ +:0B0000000000000000000000000000F5 +:00000001FF From 5f58a8f8421f04f6d00cfbe6cd7cb09f1ce84a28 Mon Sep 17 00:00:00 2001 From: That-Canadian Date: Mon, 7 Aug 2017 07:59:29 -0400 Subject: [PATCH 51/52] Line endings issue for uk78? --- keyboards/uk78/config.h | 30 +-- keyboards/uk78/keymaps/default/keymap.c | 236 ++++++++++++------------ keyboards/uk78/readme.md | 32 ++-- 3 files changed, 149 insertions(+), 149 deletions(-) diff --git a/keyboards/uk78/config.h b/keyboards/uk78/config.h index 081f6b407..859fbf90f 100644 --- a/keyboards/uk78/config.h +++ b/keyboards/uk78/config.h @@ -1,18 +1,18 @@ -/* -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 . +/* +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 diff --git a/keyboards/uk78/keymaps/default/keymap.c b/keyboards/uk78/keymaps/default/keymap.c index 759b4120a..b01beae18 100644 --- a/keyboards/uk78/keymaps/default/keymap.c +++ b/keyboards/uk78/keymaps/default/keymap.c @@ -1,119 +1,119 @@ -#include "uk78.h" - -// Helpful defines -#define _______ KC_TRNS - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _BL 0 -#define _FL1 1 -#define _FL2 2 - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* _BL: Base Layer(Default) - For ISO enter use ANSI \ - * ,-------------------------------------------------------------------------------. - * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| /|BSpc| Del| P/| P*| P-| - * |-------------------------------------------------------------------------------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | P7| P8| P9| P=| - * |-------------------------------------------------------------------------------| - * |CAPS | A| S| D| F| G| H| J| K| L| ;| '| #| Ent| P4| P5| P6| P+| - * |-------------------------------------------------------------------------------| - * |Shift| \| Z| X| C| V| B| N| M| ,| .| /|Shift | Up| P1| P2| P3|SLck| - * |-------------------------------------------------------------------------------| - * |Ctrl|Win |Alt | Space |Alt|Mo(1)|Ctrl|Lef|Dow| Rig| P0| P.|PEnt| - * `-------------------------------------------------------------------------------' - */ - [_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_BSLS, KC_BSPC, KC_DEL, KC_PSLS, KC_PAST, KC_PMNS, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PEQL, - 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_PPLS, - KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_SLCK, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), - /* _FL1: Function Layer 1 - For ISO enter use ANSI \ - * ,-------------------------------------------------------------------------------. - * | `|F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|PScr|Ins|NLck| | | | - * |-------------------------------------------------------------------------------| - * | | | | |RST| | | | | | | | | | | | | | - * |-------------------------------------------------------------------------------| - * | | | | | | |Hu+|Va+|Sa+| | | | | | | | | | - * |-------------------------------------------------------------------------------| - * | | | | | |RGB|Hu-|Va-|Sa-|Bl-|Bl+| |Mute|Vol+| | | | | - * |-------------------------------------------------------------------------------| - * | | | | BL_Toggle | | | | |Vol-| | | | | - * `-------------------------------------------------------------------------------' - */ - [_FL1] = 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_PSCR, KC_INS, KC_NLCK, 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, RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, BL_DEC, BL_INC, KC_TRNS, KC_MUTE, KC_MUTE, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, BL_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - /* _FL2: Function Layer 2 - For ISO enter use ANSI \ - * ,-------------------------------------------------------------------------------. - * | | | | | | | | | | | | | | | | | | | | - * |-------------------------------------------------------------------------------| - * | | | | | | | | | | | | | | | | | | | - * |-------------------------------------------------------------------------------| - * | | | | | | | | | | | | | | | | | | | - * |-------------------------------------------------------------------------------| - * | | | | | | | | | | | | | | | | | | | - * |-------------------------------------------------------------------------------| - * | | | | | | | | | | | | | | - * `-------------------------------------------------------------------------------' - */ - [_FL2] = KEYMAP( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - -}; - - -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)) { - DDRA |= (1 << 3); PORTA |= (1 << 3); - } else { - DDRA &= ~(1 << 3); PORTA &= ~(1 << 3); - } - - 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 { - - } - +#include "uk78.h" + +// Helpful defines +#define _______ KC_TRNS + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _BL 0 +#define _FL1 1 +#define _FL2 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* _BL: Base Layer(Default) - For ISO enter use ANSI \ + * ,-------------------------------------------------------------------------------. + * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| /|BSpc| Del| P/| P*| P-| + * |-------------------------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | P7| P8| P9| P=| + * |-------------------------------------------------------------------------------| + * |CAPS | A| S| D| F| G| H| J| K| L| ;| '| #| Ent| P4| P5| P6| P+| + * |-------------------------------------------------------------------------------| + * |Shift| \| Z| X| C| V| B| N| M| ,| .| /|Shift | Up| P1| P2| P3|SLck| + * |-------------------------------------------------------------------------------| + * |Ctrl|Win |Alt | Space |Alt|Mo(1)|Ctrl|Lef|Dow| Rig| P0| P.|PEnt| + * `-------------------------------------------------------------------------------' + */ + [_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_BSLS, KC_BSPC, KC_DEL, KC_PSLS, KC_PAST, KC_PMNS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PEQL, + 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_PPLS, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_SLCK, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), + /* _FL1: Function Layer 1 - For ISO enter use ANSI \ + * ,-------------------------------------------------------------------------------. + * | `|F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|PScr|Ins|NLck| | | | + * |-------------------------------------------------------------------------------| + * | | | | |RST| | | | | | | | | | | | | | + * |-------------------------------------------------------------------------------| + * | | | | | | |Hu+|Va+|Sa+| | | | | | | | | | + * |-------------------------------------------------------------------------------| + * | | | | | |RGB|Hu-|Va-|Sa-|Bl-|Bl+| |Mute|Vol+| | | | | + * |-------------------------------------------------------------------------------| + * | | | | BL_Toggle | | | | |Vol-| | | | | + * `-------------------------------------------------------------------------------' + */ + [_FL1] = 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_PSCR, KC_INS, KC_NLCK, 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, RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, BL_DEC, BL_INC, KC_TRNS, KC_MUTE, KC_MUTE, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, BL_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + /* _FL2: Function Layer 2 - For ISO enter use ANSI \ + * ,-------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | | | | | + * |-------------------------------------------------------------------------------| + * | | | | | | | | | | | | | | | | | | | + * |-------------------------------------------------------------------------------| + * | | | | | | | | | | | | | | | | | | | + * |-------------------------------------------------------------------------------| + * | | | | | | | | | | | | | | | | | | | + * |-------------------------------------------------------------------------------| + * | | | | | | | | | | | | | | + * `-------------------------------------------------------------------------------' + */ + [_FL2] = KEYMAP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + +}; + + +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)) { + DDRA |= (1 << 3); PORTA |= (1 << 3); + } else { + DDRA &= ~(1 << 3); PORTA &= ~(1 << 3); + } + + 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 { + + } + } \ No newline at end of file diff --git a/keyboards/uk78/readme.md b/keyboards/uk78/readme.md index 22cbcabc4..46f293614 100644 --- a/keyboards/uk78/readme.md +++ b/keyboards/uk78/readme.md @@ -1,16 +1,16 @@ -# UK78 - -![UK78](http://i.imgur.com/42pg6RS.png) - -A fully customizable 60%+numpad keyboard. - -* Keyboard Maintainer: [Rozakiin](https://github.com/rozakiin) -* Hardware Supported: UK78 PCB - * rev2 -* Hardware Availability: [ukkeyboards.](http://ukkeyboards.bigcartel.com/) - -Make example for this keyboard (after setting up your build environment): - - make uk78-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. +# UK78 + +![UK78](http://i.imgur.com/42pg6RS.png) + +A fully customizable 60%+numpad keyboard. + +* Keyboard Maintainer: [Rozakiin](https://github.com/rozakiin) +* Hardware Supported: UK78 PCB + * rev2 +* Hardware Availability: [ukkeyboards.](http://ukkeyboards.bigcartel.com/) + +Make example for this keyboard (after setting up your build environment): + + make uk78-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. From 933701c2129c0c585ecd8ba37c41b091a7dc687f Mon Sep 17 00:00:00 2001 From: That-Canadian Date: Mon, 7 Aug 2017 08:05:35 -0400 Subject: [PATCH 52/52] Updated .gitignore to properly have the master changes --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index da6579504..a1f3ce471 100644 --- a/.gitignore +++ b/.gitignore @@ -44,4 +44,4 @@ util/Win_Check_Output.txt *.gif # Do not ignore MiniDox left/right hand eeprom files -!keyboards/minidox/*.eep \ No newline at end of file +!keyboards/minidox/*.eep \ No newline at end of file