Merge remote-tracking branch 'upstream/master'
@ -1,7 +1,7 @@
|
|||||||
#define ONESHOT_TIMEOUT 3000
|
#define ONESHOT_TIMEOUT 3000
|
||||||
#define TAPPING_TERM 200
|
#define TAPPING_TERM 200
|
||||||
#define PREVENT_STUCK_MODIFIERS
|
#define PREVENT_STUCK_MODIFIERS
|
||||||
|
#define FORCE_NKRO
|
||||||
#define LEADER_TIMEOUT 1000
|
#define LEADER_TIMEOUT 1000
|
||||||
|
|
||||||
#include "../../config.h"
|
#include "../../config.h"
|
||||||
|
Before Width: | Height: | Size: 448 KiB After Width: | Height: | Size: 446 KiB |
Before Width: | Height: | Size: 420 KiB After Width: | Height: | Size: 415 KiB |
Before Width: | Height: | Size: 423 KiB After Width: | Height: | Size: 423 KiB |
@ -0,0 +1,5 @@
|
|||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
|
||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../../Makefile
|
||||||
|
endif
|
@ -0,0 +1,12 @@
|
|||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
/* using UK layout for space-cadet-shift */
|
||||||
|
#define LSPO_KEY KC_9
|
||||||
|
#define RSPC_KEY KC_0
|
||||||
|
|
||||||
|
#define LEADER_TIMEOUT 800 // leader key sequence timeout in millis
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,661 @@
|
|||||||
|
#include "ergodox.h"
|
||||||
|
#include "debug.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
/* use UK keymap */
|
||||||
|
|
||||||
|
#define UK_HASH KC_NONUS_HASH
|
||||||
|
#define UK_BSLS KC_NONUS_BSLASH
|
||||||
|
#define UK_PIPE LSFT(UK_BSLS)
|
||||||
|
|
||||||
|
#define BASE 0 // default layer
|
||||||
|
#define SYMB 1 // symbols
|
||||||
|
#define NUMB 2 // numbers and hex
|
||||||
|
#define CRSR 3 // cursor keys
|
||||||
|
#define MOUS 4 // mouse keys
|
||||||
|
#define KEYW 5 // keyword macros
|
||||||
|
#define EMAC 6 // emacs
|
||||||
|
|
||||||
|
// my macros
|
||||||
|
#define UM_ECET M(0) // { }
|
||||||
|
#define UM_0x M(1)
|
||||||
|
#define UM_PUB M(2)
|
||||||
|
#define UM_PRO M(3)
|
||||||
|
#define UM_PRV M(4)
|
||||||
|
#define UM_CLS M(5)
|
||||||
|
#define UM_STR M(6)
|
||||||
|
#define UM_RET M(7)
|
||||||
|
#define UM_INC M(8)
|
||||||
|
#define UM_OBJ M(9)
|
||||||
|
#define UM_GITLOG M(10)
|
||||||
|
#define UM_GOODM M(11)
|
||||||
|
#define UM_NAMESP M(12)
|
||||||
|
#define UM_EMTR M(14) // emacs toggle read-only
|
||||||
|
#define UM_EMWR M(15) // emacs write buffer (save)
|
||||||
|
#define UM_EMUN M(16) // emacs undo
|
||||||
|
#define UM_EMRE M(17) // emacs redo
|
||||||
|
#define UM_EMPB M(18) // emacs previous buffer
|
||||||
|
#define UM_EMNB M(19) // emacs next buffer
|
||||||
|
#define UM_GOODN M(20)
|
||||||
|
#define UM_ECETS M(22) // { };
|
||||||
|
#define UM_TMPL M(23)
|
||||||
|
#define UM_TYPN M(24)
|
||||||
|
#define UM_CONT M(25)
|
||||||
|
#define UM_BREAK M(26)
|
||||||
|
#define UM_CONST M(27)
|
||||||
|
#define UM_SMILY M(28)
|
||||||
|
#define UM_SADF M(29)
|
||||||
|
#define UM_SCARF M(30)
|
||||||
|
#define UM_DECAF M(31)
|
||||||
|
#define UM_OPER M(32)
|
||||||
|
#define UM_NULP M(33)
|
||||||
|
#define UM_EXTR M(34)
|
||||||
|
#define UM_VIRT M(35)
|
||||||
|
#define UM_EMFB M(36) // emacs font bigger
|
||||||
|
#define UM_EMFS M(37) // emacs font smaller
|
||||||
|
#define UM_VOLAT M(38)
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Keymap 0: Base layer
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | ESC | 1 | 2 | 3 | 4 | 5 | SfLt | | SfRt | 6 | 7 | 8 | 9 | 0 | BkSp |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | Tab | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | Del |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | Caps/L2| A | S | D | F | G |------| |------| H | J | K | L | ; |Enter/L2|
|
||||||
|
* |--------+------+------+------+------+------| L6 | | L6 |------+------+------+------+------+--------|
|
||||||
|
* | LSft/( | Z | X | C | V/L3 | B/L4 | | | | N/L4 | M/L3 | , | . | / | RSft/) |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* |Ctrl/[| Alt/]| # | Left |Right | | Up | Down | - | Alt/[|Ctrl/]|
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | L2 | lead | | lead | Ins |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | Space| BkSp | Home | | PgUp | Enter|Space |
|
||||||
|
* | / | / |------| |------| / | / |
|
||||||
|
* | Ctrl | Alt |End/L5| |PDn/L5| Alt | Ctrl |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
[BASE] = KEYMAP( // layer 0 : default
|
||||||
|
// left hand
|
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, LSFT(KC_LEFT),
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, MO(SYMB),
|
||||||
|
LT(NUMB, KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||||
|
KC_LSPO, KC_Z, KC_X, KC_C, LT(CRSR, KC_V), LT(MOUS, KC_B), MO(EMAC),
|
||||||
|
CTL_T(KC_LBRC), ALT_T(KC_RBRC), UK_HASH, KC_LEFT, KC_RGHT,
|
||||||
|
TG(NUMB), KC_LEAD,
|
||||||
|
KC_HOME,
|
||||||
|
CTL_T(KC_SPC), ALT_T(KC_BSPC), LT(KEYW, KC_END),
|
||||||
|
// right hand
|
||||||
|
LSFT(KC_RGHT), KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
|
||||||
|
MO(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DELT,
|
||||||
|
KC_H, KC_J, KC_K, KC_L, KC_SCLN, LT(NUMB, KC_ENT),
|
||||||
|
MO(EMAC), LT(MOUS, KC_N), LT(CRSR, KC_M), KC_COMM, KC_DOT, KC_SLSH, KC_RSPC,
|
||||||
|
KC_UP, KC_DOWN, KC_MINS, ALT_T(KC_LBRC), CTL_T(KC_RBRC),
|
||||||
|
KC_LEAD, KC_INS,
|
||||||
|
KC_PGUP,
|
||||||
|
LT(KEYW, KC_PGDN), ALT_T(KC_ENT), CTL_T(KC_SPC)
|
||||||
|
),
|
||||||
|
/* Keymap 1: Symbol Layer with F keys
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | ## | F1 | F2 | F3 | F4 | F5 | ## | | ## | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||||
|
* |--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
|
||||||
|
* | ## | ! | " | £ | $ | % | ## | | ## | - | + | = | @ | ~ | F12 |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | ## | ^ | & | * | _ | # |------| |------| { | } | ; | ' | # | ## |
|
||||||
|
* |--------+------+------+------+------+------| ## | | ## |------+------+------+------+------+--------|
|
||||||
|
* | ## | \ | | | ` | - | / | | | | [ | ] | < | > | ? | ## |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | ## | ## | ## | ## | ## | | ## | ## | ## | ## | ## |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | ## | ## | | ## | ## |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | ## | | ## | | |
|
||||||
|
* | ## | ## |------| |------| ## | ## |
|
||||||
|
* | | | ## | | ## | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
[SYMB] = KEYMAP(
|
||||||
|
// left hand
|
||||||
|
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
|
||||||
|
KC_TRNS, KC_EXLM, LSFT(KC_2), LSFT(KC_3), LSFT(KC_4), LSFT(KC_5), KC_TRNS,
|
||||||
|
KC_TRNS, LSFT(KC_6), LSFT(KC_7), LSFT(KC_8), LSFT(KC_MINS), UK_HASH,
|
||||||
|
KC_TRNS, UK_BSLS, UK_PIPE, KC_GRV, KC_MINS, KC_SLSH, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
// right hand
|
||||||
|
KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||||
|
KC_TRNS, KC_MINS, KC_PLUS, KC_EQL, LSFT(KC_QUOT), LSFT(UK_HASH), KC_F12,
|
||||||
|
KC_LCBR, KC_RCBR, KC_SCLN, KC_QUOT, UK_HASH, KC_TRNS,
|
||||||
|
KC_TRNS, KC_LBRC, KC_RBRC, LSFT(KC_COMM), LSFT(KC_DOT), LSFT(KC_SLSH), KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
/* Keymap 2: Numerics and hex
|
||||||
|
*
|
||||||
|
* ,---------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | ## | A | B | C | D | E | F | | A | B | C | D | E | F | ## |
|
||||||
|
* |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
|
||||||
|
* | ## | * | 7 | 8 | 9 | * | 0x | | 0x | * | 7 | 8 | 9 | * | ## |
|
||||||
|
* |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | ## | / | 4 | 5 | 6 | / |------| |------| / | 4 | 5 | 6 | / | ## |
|
||||||
|
* |---------+------+------+------+------+------| ## | | ## |------+------+------+------+------+--------|
|
||||||
|
* | ## | - | 1 | 2 | 3 | - | | | | - | 1 | 2 | 3 | - | ## |
|
||||||
|
* `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | = | + | 0 | , | . | | 0 | , | . | + | = |
|
||||||
|
* `-----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | ## | ## | | ## | ## |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | ## | | ## | | |
|
||||||
|
* | ## | ## |------| |------| ## | ## |
|
||||||
|
* | | | ## | | ## | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
[NUMB] = KEYMAP(
|
||||||
|
// left hand
|
||||||
|
KC_TRNS, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F,
|
||||||
|
KC_TRNS, KC_ASTR, KC_7, KC_8, KC_9, KC_ASTR, UM_0x,
|
||||||
|
KC_TRNS, KC_SLSH, KC_4, KC_5, KC_6, KC_SLSH,
|
||||||
|
KC_TRNS, KC_MINS, KC_1, KC_2, KC_3, KC_MINS, KC_TRNS,
|
||||||
|
KC_EQL, KC_PLUS, KC_0, KC_COMM, KC_DOT,
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
// right hand
|
||||||
|
KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_TRNS,
|
||||||
|
UM_0x, KC_ASTR, KC_7, KC_8, KC_9, KC_ASTR, KC_TRNS,
|
||||||
|
KC_SLSH, KC_4, KC_5, KC_6, KC_SLSH, KC_TRNS,
|
||||||
|
KC_TRNS, KC_MINS, KC_1, KC_2, KC_3, KC_MINS, KC_TRNS,
|
||||||
|
KC_0, KC_COMM, KC_DOT, KC_PLUS, KC_EQL,
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
/* Keymap 3: Cursor movement
|
||||||
|
*
|
||||||
|
* ,---------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
|
||||||
|
* | | Home | | Up | | PgUp | | | | PgUp | | Up | | Home | |
|
||||||
|
* |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | End | Left | Down | Right| PgDn |------| |------| PgDn | Left | Down | Right| End | |
|
||||||
|
* |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | ## | Up | | Down | ## | | | | | | ## | Down | | Up | ## |
|
||||||
|
* `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | Left | Down | Right| | | | | | Left | Down | Right|
|
||||||
|
* `-----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | | | | | |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | | | | | |
|
||||||
|
* | ## | ## |------| |------| ## | ## |
|
||||||
|
* | | | | | | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
[CRSR] = KEYMAP(
|
||||||
|
// left hand
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_NO, KC_HOME, KC_NO, KC_UP, KC_NO, KC_PGUP, KC_NO,
|
||||||
|
KC_NO, KC_END, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN,
|
||||||
|
KC_TRNS, KC_UP, KC_NO, KC_DOWN, KC_TRNS, KC_NO, KC_NO,
|
||||||
|
KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO,
|
||||||
|
KC_NO, KC_NO,
|
||||||
|
KC_NO,
|
||||||
|
KC_TRNS, KC_TRNS, KC_NO,
|
||||||
|
// right hand
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_NO, KC_PGUP, KC_NO, KC_UP, KC_NO, KC_HOME, KC_NO,
|
||||||
|
KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_NO,
|
||||||
|
KC_NO, KC_NO, KC_TRNS, KC_DOWN, KC_NO, KC_UP, KC_TRNS,
|
||||||
|
KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT,
|
||||||
|
KC_NO, KC_NO,
|
||||||
|
KC_NO,
|
||||||
|
KC_NO, KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
/* Keymap 4: Media and mouse keys
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | | | Lclk | MsUp | Rclk | | | | | | Lclk | MsUp | Rclk | | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | |MsLeft|MsDown|MsRght| |------| |------| |MsLeft|MsDown|MsRght| | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | Lclk | MsUp | Rclk |MsDown| | ## | | | | ## | |MsDown| Lclk | MsUp | Rclk |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* |MsLeft|MsDown|MsRight | | | | |MsLeft|MsDown|MsRght|
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | | | | | |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | | | | | |
|
||||||
|
* | | |------| |------| | |
|
||||||
|
* | | | | | | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
[MOUS] = KEYMAP(
|
||||||
|
// left hand
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_NO, KC_NO, KC_BTN1, KC_MS_U, KC_BTN2, KC_NO, KC_NO,
|
||||||
|
KC_NO, KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO,
|
||||||
|
KC_BTN1, KC_MS_U, KC_BTN2, KC_MS_D, KC_NO, KC_TRNS, KC_NO,
|
||||||
|
KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, KC_NO,
|
||||||
|
KC_NO, KC_NO,
|
||||||
|
KC_NO,
|
||||||
|
KC_NO, KC_NO, KC_NO,
|
||||||
|
// right hand
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_NO, KC_NO, KC_BTN1, KC_MS_U, KC_BTN2, KC_NO, KC_NO,
|
||||||
|
KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, KC_NO,
|
||||||
|
KC_NO, KC_TRNS, KC_NO, KC_MS_D, KC_BTN1, KC_MS_U, KC_BTN2,
|
||||||
|
KC_NO, KC_NO, KC_MS_L, KC_MS_D, KC_MS_R,
|
||||||
|
KC_NO, KC_NO,
|
||||||
|
KC_NO,
|
||||||
|
KC_NO, KC_NO, KC_NO
|
||||||
|
),
|
||||||
|
/* Keymap 5: Keywords
|
||||||
|
*
|
||||||
|
* ,---------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | | | | scarf| sadf | smily| | | | decaf| | | | | |
|
||||||
|
* |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
|
||||||
|
* | | const| volat| oper | ret | tmpl | | | | typen| cont | prv | pro | pub | |
|
||||||
|
* |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | | str | obj | | gitl |------| |------| | | | nulp | | |
|
||||||
|
* |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | | extr | cls | virt | break| | | |namesp| goodm| goodn| | | |
|
||||||
|
* `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | | inc | | | | | | | | |
|
||||||
|
* `-----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | | | | ecet | ecets|
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | | | | | |
|
||||||
|
* | | |------| |------| | |
|
||||||
|
* | | | ## | | ## | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
[KEYW] = KEYMAP(
|
||||||
|
// left hand
|
||||||
|
KC_NO, KC_NO, KC_NO, UM_SCARF, UM_SADF, UM_SMILY, KC_NO,
|
||||||
|
KC_NO, UM_CONST, UM_VOLAT, UM_OPER, UM_RET, UM_TMPL, KC_NO,
|
||||||
|
KC_NO, KC_NO, UM_STR, UM_OBJ, KC_NO, UM_GITLOG,
|
||||||
|
KC_NO, KC_NO, UM_EXTR, UM_CLS, UM_VIRT, UM_BREAK, KC_NO,
|
||||||
|
KC_NO, KC_NO, UM_INC, KC_NO, KC_NO,
|
||||||
|
KC_NO, KC_NO,
|
||||||
|
KC_NO,
|
||||||
|
KC_NO, KC_NO, KC_TRNS,
|
||||||
|
// right hand
|
||||||
|
KC_NO, UM_DECAF, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_NO, UM_TYPN, UM_CONT, UM_PRV, UM_PRO, UM_PUB, KC_NO,
|
||||||
|
KC_NO, KC_NO, KC_NO, UM_NULP, KC_NO, KC_NO,
|
||||||
|
KC_NO, UM_NAMESP, UM_GOODM, UM_GOODN, KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
|
UM_ECET, UM_ECETS,
|
||||||
|
KC_NO,
|
||||||
|
KC_TRNS, KC_NO, KC_NO
|
||||||
|
),
|
||||||
|
/* Keymap 6: emacs
|
||||||
|
*
|
||||||
|
* ,---------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | | | | | | | empb | | emnb | emfs | emfb | | | | |
|
||||||
|
* |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
|
||||||
|
* | | emtr | | | | | | | | emun | emre | w-up | | | |
|
||||||
|
* |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | | emwr | | | |------| |------| |w-left|w-down|w-rght| | |
|
||||||
|
* |---------+------+------+------+------+------| ## | | ## |------+------+------+------+------+--------|
|
||||||
|
* | | | | | | | | | | | |w-down| | | |
|
||||||
|
* `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | | | | | | | | | | |
|
||||||
|
* `-----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | | | | | |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | | | | | |
|
||||||
|
* | | |------| |------| | |
|
||||||
|
* | | | | | | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
[EMAC] = KEYMAP(
|
||||||
|
// left hand
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, UM_EMPB,
|
||||||
|
KC_NO, UM_EMTR, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_NO, KC_NO, UM_EMWR, KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS,
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_NO, KC_NO,
|
||||||
|
KC_NO,
|
||||||
|
KC_NO, KC_NO, KC_NO,
|
||||||
|
// right hand
|
||||||
|
UM_EMNB, UM_EMFS, UM_EMFB, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_NO, UM_EMUN, UM_EMRE, LSFT(KC_UP), KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_NO, LSFT(KC_LEFT), LSFT(KC_DOWN), LSFT(KC_RGHT), KC_NO, KC_NO,
|
||||||
|
KC_TRNS, KC_NO, KC_NO, LSFT(KC_DOWN), KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_NO, KC_NO,
|
||||||
|
KC_NO,
|
||||||
|
KC_NO, KC_NO, KC_NO
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
enum next_key_down_up {
|
||||||
|
NK_DOWN_UP,
|
||||||
|
NK_DOWN,
|
||||||
|
NK_UP // a bit of a hack, this works as long as NK_UP < KC_A
|
||||||
|
};
|
||||||
|
|
||||||
|
void send_keystrokes(uint8_t key, ...)
|
||||||
|
{
|
||||||
|
va_list vl;
|
||||||
|
va_start(vl, key);
|
||||||
|
enum next_key_down_up nkdu = NK_DOWN_UP;
|
||||||
|
while (key != KC_NO) {
|
||||||
|
if (key < KC_A) {
|
||||||
|
nkdu = key;
|
||||||
|
} else {
|
||||||
|
switch (nkdu) {
|
||||||
|
case NK_DOWN_UP:
|
||||||
|
register_code(key);
|
||||||
|
case NK_UP:
|
||||||
|
unregister_code(key);
|
||||||
|
break;
|
||||||
|
case NK_DOWN:
|
||||||
|
register_code(key);
|
||||||
|
}
|
||||||
|
nkdu = NK_DOWN_UP;
|
||||||
|
}
|
||||||
|
key = va_arg(vl, int);
|
||||||
|
}
|
||||||
|
va_end(vl);
|
||||||
|
}
|
||||||
|
|
||||||
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||||
|
{
|
||||||
|
// MACRODOWN only works in this function
|
||||||
|
switch(id) {
|
||||||
|
case 0: // { }
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO(T(ENT), D(LSFT), T(LBRC), U(LSFT), T(ENT),
|
||||||
|
D(LSFT), T(RBRC), U(LSFT), T(UP),
|
||||||
|
T(TAB), END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO(T(0), T(X), END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING("public");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING("protected");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING("private");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 5: // class
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO(T(C), T(L), T(A), T(S), T(S), T(ENT),
|
||||||
|
D(LSFT), T(LBRC), U(LSFT), T(ENT),
|
||||||
|
T(P), T(U), T(B), T(L), T(I), T(C),
|
||||||
|
D(LSFT), T(SCLN), U(LSFT), T(ENT), T(ENT),
|
||||||
|
T(P), T(R), T(I), T(V), T(A), T(T), T(E),
|
||||||
|
D(LSFT), T(SCLN), U(LSFT), T(ENT),
|
||||||
|
D(LSFT), T(RBRC), U(LSFT), T(SCLN), T(ENT),
|
||||||
|
T(UP), T(UP), T(UP), T(UP), T(UP), T(UP), T(UP),
|
||||||
|
T(END), T(SPC), END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 6: // struct
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO(T(S), T(T), T(R), T(U), T(C), T(T), T(ENT),
|
||||||
|
D(LSFT), T(LBRC), U(LSFT), T(ENT),
|
||||||
|
D(LSFT), T(RBRC), U(LSFT), T(SCLN), T(ENT),
|
||||||
|
T(UP), T(UP), T(UP), T(UP),
|
||||||
|
T(END), T(SPC), END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING("return");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 8: // #include
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO(T(NONUS_HASH), T(I), T(N), T(C), T(L), T(U), T(D), T(E), END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 9:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING("objdump -CT -x -d");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING("git log --oneline --graph --decorate=short");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 11:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING("good morning");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 12:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING("namespace");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 14: // emacs toggle read-only
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO(D(LCTL), T(X), T(Q), U(LCTL), END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 15: // emacs write buffer
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO(D(LCTL), T(X), T(S), U(LCTL), END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 16: // emacs undo
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO(D(LCTL), D(LSFT), T(MINS), U(LSFT), U(LCTL), END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 17: // emacs redo
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO(D(LALT), D(LSFT), T(MINS), U(LSFT), U(LALT), END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 18: // emacs previous buffer
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO(D(LCTL), T(X), U(LCTL), T(LEFT), END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 19: // emacs next buffer
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO(D(LCTL), T(X), U(LCTL), T(RGHT), END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 20:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING("good night");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 22: // { };
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO(T(ENT), D(LSFT), T(LBRC), U(LSFT), T(ENT),
|
||||||
|
D(LSFT), T(RBRC), U(LSFT), T(SCLN), T(UP),
|
||||||
|
T(TAB), END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 23:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING("template");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 24:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING("typename");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 25:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING("continue");
|
||||||
|
return MACRO(T(SCLN), END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 26:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING("break");
|
||||||
|
return MACRO(T(SCLN), END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 27:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING("const");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 28:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING(":-)");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 29:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING(":-(");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 30: // dazed
|
||||||
|
if (record->event.pressed) {
|
||||||
|
send_keystrokes(NK_DOWN, KC_LSFT, KC_8, KC_MINS, KC_8, NK_UP, KC_LSFT, KC_NO);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 31: // decaf
|
||||||
|
if (record->event.pressed) {
|
||||||
|
send_keystrokes(NK_DOWN, KC_LSFT, KC_C, KC_9, KC_MINS, KC_0, NK_UP, KC_LSFT, KC_NO);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 32:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING("operator");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 33:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING("nullptr");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 34:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING("extern");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 35:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING("virtual");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 36: // emacs font smaller
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO(D(LCTL), T(X), T(EQL), U(LCTL), END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 37: // emacs font bigger
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO(D(LCTL), T(X), T(MINS), U(LCTL), END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 38:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING("volatile");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return MACRO_NONE;
|
||||||
|
}
|
||||||
|
|
||||||
|
LEADER_EXTERNS();
|
||||||
|
|
||||||
|
// Runs constantly in the background, in a loop.
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
|
||||||
|
LEADER_DICTIONARY() {
|
||||||
|
leading = false;
|
||||||
|
leader_end();
|
||||||
|
|
||||||
|
SEQ_TWO_KEYS(KC_G, KC_A) {
|
||||||
|
SEND_STRING("git add .");
|
||||||
|
}
|
||||||
|
SEQ_TWO_KEYS(KC_G, KC_D) {
|
||||||
|
SEND_STRING("git diff");
|
||||||
|
}
|
||||||
|
SEQ_THREE_KEYS(KC_G, KC_D, KC_S) {
|
||||||
|
SEND_STRING("git diff --staged");
|
||||||
|
}
|
||||||
|
SEQ_TWO_KEYS(KC_G, KC_L) {
|
||||||
|
SEND_STRING("git log");
|
||||||
|
}
|
||||||
|
SEQ_THREE_KEYS(KC_G, KC_L, KC_O) {
|
||||||
|
SEND_STRING("git log --oneline");
|
||||||
|
}
|
||||||
|
SEQ_TWO_KEYS(KC_G, KC_F) {
|
||||||
|
SEND_STRING("git fetch");
|
||||||
|
}
|
||||||
|
SEQ_TWO_KEYS(KC_G, KC_O) {
|
||||||
|
SEND_STRING("git checkout");
|
||||||
|
}
|
||||||
|
SEQ_TWO_KEYS(KC_G, KC_P) {
|
||||||
|
SEND_STRING("git pull");
|
||||||
|
}
|
||||||
|
SEQ_TWO_KEYS(KC_G, KC_S) {
|
||||||
|
SEND_STRING("git status");
|
||||||
|
}
|
||||||
|
SEQ_TWO_KEYS(KC_G, KC_C) {
|
||||||
|
SEND_STRING("git commit -m ''");
|
||||||
|
send_keystrokes(KC_LEFT, KC_NO);
|
||||||
|
}
|
||||||
|
SEQ_THREE_KEYS(KC_G, KC_C, KC_A) {
|
||||||
|
SEND_STRING("git commit --amend");
|
||||||
|
}
|
||||||
|
|
||||||
|
SEQ_TWO_KEYS(KC_C, KC_C) {
|
||||||
|
SEND_STRING("const_cast<>");
|
||||||
|
send_keystrokes(KC_LEFT, KC_NO);
|
||||||
|
}
|
||||||
|
SEQ_TWO_KEYS(KC_C, KC_D) {
|
||||||
|
SEND_STRING("dynamic_cast<>");
|
||||||
|
send_keystrokes(KC_LEFT, KC_NO);
|
||||||
|
}
|
||||||
|
SEQ_TWO_KEYS(KC_C, KC_R) {
|
||||||
|
SEND_STRING("reinterpret_cast<>");
|
||||||
|
send_keystrokes(KC_LEFT, KC_NO);
|
||||||
|
}
|
||||||
|
SEQ_TWO_KEYS(KC_C, KC_S) {
|
||||||
|
SEND_STRING("static_cast<>");
|
||||||
|
send_keystrokes(KC_LEFT, KC_NO);
|
||||||
|
}
|
||||||
|
|
||||||
|
SEQ_ONE_KEY(KC_SLSH) {
|
||||||
|
send_keystrokes(KC_SLSH, NK_DOWN, KC_LSFT, KC_8, KC_8, NK_UP, KC_LSFT, KC_ENT,
|
||||||
|
NK_DOWN, KC_LSFT, KC_8, NK_UP, KC_LSFT, KC_ENT,
|
||||||
|
NK_DOWN, KC_LSFT, KC_8, NK_UP, KC_LSFT, KC_SLSH, KC_UP, KC_END, KC_SPC,
|
||||||
|
KC_NO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,188 @@
|
|||||||
|
# ErgoDox EZ Configuration for typing like a boss.
|
||||||
|
|
||||||
|
This layout has 7 layers:
|
||||||
|
0. Base layers
|
||||||
|
1. Symbols and F-keys
|
||||||
|
2. Number pad (with hexadecimal)
|
||||||
|
3. Cursor keys
|
||||||
|
4. Mouse movement and clicks
|
||||||
|
5. Keyword macros
|
||||||
|
6. Emacs
|
||||||
|
|
||||||
|
There are also some leader keys defined for frequently used commands (git etc).
|
||||||
|
|
||||||
|
## The layers
|
||||||
|
|
||||||
|
Double hashes (`##`) indicate transparent keys (`KC_TRNS`) and blanks indicate no key (`KC_NO`).
|
||||||
|
|
||||||
|
### 0. Base layer
|
||||||
|
|
||||||
|
```
|
||||||
|
,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
| ESC | 1 | 2 | 3 | 4 | 5 | SfLt | | SfRt | 6 | 7 | 8 | 9 | 0 | BkSp |
|
||||||
|
|--------|------|------|------|------|-------------| |------|------|------|------|------|------|--------|
|
||||||
|
| Tab | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | Del |
|
||||||
|
|--------|------|------|------|------|------| | | |------|------|------|------|------|--------|
|
||||||
|
| Caps/L2| A | S | D | F | G |------| |------| H | J | K | L | ; |Enter/L2|
|
||||||
|
|--------|------|------|------|------|------| L6 | | L6 |------|------|------|------|------|--------|
|
||||||
|
| LSft/( | Z | X | C | V/L3 | B/L4 | | | | N/L4 | M/L3 | , | . | / | RSft/) |
|
||||||
|
`--------|------|------|------|------|-------------' `-------------|------|------|------|------|--------'
|
||||||
|
|Ctrl/[| Alt/]| # | Left |Right | | Up | Down | - | Alt/[|Ctrl/]|
|
||||||
|
`----------------------------------' `----------------------------------'
|
||||||
|
,-------------. ,-------------.
|
||||||
|
| L2 | lead | | lead | Ins |
|
||||||
|
,------|------|------| |------|------|------.
|
||||||
|
| Space| BkSp | Home | | PgUp | Enter|Space |
|
||||||
|
| / | / |------| |------| / | / |
|
||||||
|
| Ctrl | Alt |End/L5| |PDn/L5| Alt | Ctrl |
|
||||||
|
`--------------------' `--------------------'
|
||||||
|
```
|
||||||
|
|
||||||
|
Space Cadet shift is enabled. Ctrl and Alt doubles up as normal keys when tapped.
|
||||||
|
SfLt and SfRt sends Shift + left and Shift + Right respectively - for use with emacs with `windmove-default-keybindings`.
|
||||||
|
Caps and Enter may be held down to activate layer 2 (hexadecimal number pad).
|
||||||
|
Please see `matrix_scan_user` function in `keymap.c` for list of commands available via `lead` key.
|
||||||
|
|
||||||
|
### 1. Symbols and F-keys
|
||||||
|
|
||||||
|
```
|
||||||
|
,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
| ## | F1 | F2 | F3 | F4 | F5 | ## | | ## | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||||
|
|--------|------|------|------|------|------|------| |------|------|------|------|------|------|--------|
|
||||||
|
| ## | ! | " | £ | $ | % | ## | | ## | - | + | = | @ | ~ | F12 |
|
||||||
|
|--------|------|------|------|------|------| | | |------|------|------|------|------|--------|
|
||||||
|
| ## | ^ | & | * | _ | # |------| |------| { | } | ; | ' | # | ## |
|
||||||
|
|--------|------|------|------|------|------| ## | | ## |------|------|------|------|------|--------|
|
||||||
|
| ## | \ | | | ` | - | / | | | | [ | ] | < | > | ? | ## |
|
||||||
|
`--------|------|------|------|------|-------------' `-------------|------|------|------|------|--------'
|
||||||
|
| ## | ## | ## | ## | ## | | ## | ## | ## | ## | ## |
|
||||||
|
`----------------------------------' `----------------------------------'
|
||||||
|
,-------------. ,-------------.
|
||||||
|
| ## | ## | | ## | ## |
|
||||||
|
,------|------|------| |------|------|------.
|
||||||
|
| | | ## | | ## | | |
|
||||||
|
| ## | ## |------| |------| ## | ## |
|
||||||
|
| | | ## | | ## | | |
|
||||||
|
`--------------------' `--------------------'
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. Number pad (with hexadecimal)
|
||||||
|
|
||||||
|
```
|
||||||
|
,---------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
| ## | A | B | C | D | E | F | | A | B | C | D | E | F | ## |
|
||||||
|
|---------|------|------|------|------|------|------| |------|------|------|------|------|------|--------|
|
||||||
|
| ## | * | 7 | 8 | 9 | * | 0x | | 0x | * | 7 | 8 | 9 | * | ## |
|
||||||
|
|---------|------|------|------|------|------| | | |------|------|------|------|------|--------|
|
||||||
|
| ## | / | 4 | 5 | 6 | / |------| |------| / | 4 | 5 | 6 | / | ## |
|
||||||
|
|---------|------|------|------|------|------| ## | | ## |------|------|------|------|------|--------|
|
||||||
|
| ## | - | 1 | 2 | 3 | - | | | | - | 1 | 2 | 3 | - | ## |
|
||||||
|
`---------|------|------|------|------|-------------' `-------------|------|------|------|------|--------'
|
||||||
|
| = | + | 0 | , | . | | 0 | , | . | + | = |
|
||||||
|
`-----------------------------------' `----------------------------------'
|
||||||
|
,-------------. ,-------------.
|
||||||
|
| ## | ## | | ## | ## |
|
||||||
|
,------|------|------| |------|------|------.
|
||||||
|
| | | ## | | ## | | |
|
||||||
|
| ## | ## |------| |------| ## | ## |
|
||||||
|
| | | ## | | ## | | |
|
||||||
|
`--------------------' `--------------------'
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3. Cursor keys
|
||||||
|
|
||||||
|
```
|
||||||
|
,---------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
| | | | | | | | | | | | | | | |
|
||||||
|
|---------|------|------|------|------|------|------| |------|------|------|------|------|------|--------|
|
||||||
|
| | Home | | Up | | PgUp | | | | PgUp | | Up | | Home | |
|
||||||
|
|---------|------|------|------|------|------| | | |------|------|------|------|------|--------|
|
||||||
|
| | End | Left | Down | Right| PgDn |------| |------| PgDn | Left | Down | Right| End | |
|
||||||
|
|---------|------|------|------|------|------| | | |------|------|------|------|------|--------|
|
||||||
|
| ## | Up | | Down | ## | | | | | | ## | Down | | Up | ## |
|
||||||
|
`---------|------|------|------|------|-------------' `-------------|------|------|------|------|--------'
|
||||||
|
| Left | Down | Right| | | | | | Left | Down | Right|
|
||||||
|
`-----------------------------------' `----------------------------------'
|
||||||
|
,-------------. ,-------------.
|
||||||
|
| | | | | |
|
||||||
|
,------|------|------| |------|------|------.
|
||||||
|
| | | | | | | |
|
||||||
|
| ## | ## |------| |------| ## | ## |
|
||||||
|
| | | | | | | |
|
||||||
|
`--------------------' `--------------------'
|
||||||
|
```
|
||||||
|
|
||||||
|
### 4. Mouse movement and clicks
|
||||||
|
|
||||||
|
```
|
||||||
|
,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
| | | | | | | | | | | | | | | |
|
||||||
|
|--------|------|------|------|------|-------------| |------|------|------|------|------|------|--------|
|
||||||
|
| | | Lclk | MsUp | Rclk | | | | | | Lclk | MsUp | Rclk | | |
|
||||||
|
|--------|------|------|------|------|------| | | |------|------|------|------|------|--------|
|
||||||
|
| | |MsLeft|MsDown|MsRght| |------| |------| |MsLeft|MsDown|MsRght| | |
|
||||||
|
|--------|------|------|------|------|------| | | |------|------|------|------|------|--------|
|
||||||
|
| Lclk | MsUp | Rclk |MsDown| | ## | | | | ## | |MsDown| Lclk | MsUp | Rclk |
|
||||||
|
`--------|------|------|------|------|-------------' `-------------|------|------|------|------|--------'
|
||||||
|
|MsLeft|MsDown|MsRight | | | | |MsLeft|MsDown|MsRght|
|
||||||
|
`----------------------------------' `----------------------------------'
|
||||||
|
,-------------. ,-------------.
|
||||||
|
| | | | | |
|
||||||
|
,------|------|------| |------|------|------.
|
||||||
|
| | | | | | | |
|
||||||
|
| | |------| |------| | |
|
||||||
|
| | | | | | | |
|
||||||
|
`--------------------' `--------------------'
|
||||||
|
```
|
||||||
|
|
||||||
|
### 5. Keyword macros
|
||||||
|
|
||||||
|
```
|
||||||
|
,---------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
| | | | scarf| sadf | smily| | | | decaf| | | | | |
|
||||||
|
|---------|------|------|------|------|------|------| |------|------|------|------|------|------|--------|
|
||||||
|
| | const| volat| oper | ret | tmpl | | | | typen| cont | prv | pro | pub | |
|
||||||
|
|---------|------|------|------|------|------| | | |------|------|------|------|------|--------|
|
||||||
|
| | | str | obj | | gitl |------| |------| | | | nulp | | |
|
||||||
|
|---------|------|------|------|------|------| | | |------|------|------|------|------|--------|
|
||||||
|
| | | extr | cls | virt | break| | | |namesp| goodm| goodn| | | |
|
||||||
|
`---------|------|------|------|------|-------------' `-------------|------|------|------|------|--------'
|
||||||
|
| | | inc | | | | | | | | |
|
||||||
|
`-----------------------------------' `----------------------------------'
|
||||||
|
,-------------. ,-------------.
|
||||||
|
| | | | ecet | ecets|
|
||||||
|
,------|------|------| |------|------|------.
|
||||||
|
| | | | | | | |
|
||||||
|
| | |------| |------| | |
|
||||||
|
| | | ## | | ## | | |
|
||||||
|
`--------------------' `--------------------'
|
||||||
|
```
|
||||||
|
Please see `keymap.c` for the keywords/commands.
|
||||||
|
Some are const, volatile, operator, return, template, typename, continue, private,
|
||||||
|
protected, public, struct, class, extern, virtual, break, namespace.
|
||||||
|
Also a git log command I use a lot (`git log --oneline --graph --decorate=short` (I know git can be configured but that is boring)).
|
||||||
|
|
||||||
|
### 6. Emacs
|
||||||
|
|
||||||
|
```
|
||||||
|
,---------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
| | | | | | | empb | | emnb | emfs | emfb | | | | |
|
||||||
|
|---------|------|------|------|------|------|------| |------|------|------|------|------|------|--------|
|
||||||
|
| | emtr | | | | | | | | emun | emre | w-up | | | |
|
||||||
|
|---------|------|------|------|------|------| | | |------|------|------|------|------|--------|
|
||||||
|
| | | emwr | | | |------| |------| |w-left|w-down|w-rght| | |
|
||||||
|
|---------|------|------|------|------|------| ## | | ## |------|------|------|------|------|--------|
|
||||||
|
| | | | | | | | | | | |w-down| | | |
|
||||||
|
`---------|------|------|------|------|-------------' `-------------|------|------|------|------|--------'
|
||||||
|
| | | | | | | | | | | |
|
||||||
|
`-----------------------------------' `----------------------------------'
|
||||||
|
,-------------. ,-------------.
|
||||||
|
| | | | | |
|
||||||
|
,------|------|------| |------|------|------.
|
||||||
|
| | | | | | | |
|
||||||
|
| | |------| |------| | |
|
||||||
|
| | | | | | | |
|
||||||
|
`--------------------' `--------------------'
|
||||||
|
```
|
||||||
|
Some emacs shortcuts like toggle read/write mode (emtr), write file (emwr), previous-buffer (empb),
|
||||||
|
next-buffer (emnb), smaller font(emfs), larger font (emfb), undo (emun), redo (emre) and switching between windows in a frame.
|
@ -0,0 +1 @@
|
|||||||
|
UNICODE_ENABLE = yes
|
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 78 KiB |
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 78 KiB |
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 61 KiB |
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 58 KiB |
@ -0,0 +1,3 @@
|
|||||||
|
ifndef MAKEFILE_INCLUDED
|
||||||
|
include ../../Makefile
|
||||||
|
endif
|
@ -0,0 +1,43 @@
|
|||||||
|
#ifndef CONFIG_H
|
||||||
|
#define CONFIG_H
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x6060
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER GON
|
||||||
|
#define PRODUCT NerD
|
||||||
|
#define DESCRIPTION QMK port for the GON Nerd PCB
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 10
|
||||||
|
#define MATRIX_COLS 9
|
||||||
|
|
||||||
|
/* backlight */
|
||||||
|
#define BACKLIGHT_PIN B7
|
||||||
|
#define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
|
/* matrix pins */
|
||||||
|
#define MATRIX_ROW_PINS { B4, E2, F4, F7, F1, F6, C6, F5, D7, C7 }
|
||||||
|
#define MATRIX_COL_PINS { E6, B0, B1, B2, B3, F0, D0, D5, D1 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* COL2ROW or ROW2COL */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
|
#define DEBOUNCING_DELAY 5
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
/* key combination for magic key command */
|
||||||
|
#define IS_COMMAND() ( \
|
||||||
|
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||||
|
)
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1 @@
|
|||||||
|
#include "gonnerd.h"
|
@ -0,0 +1,42 @@
|
|||||||
|
#ifndef GONNERD_H
|
||||||
|
#define GONNERD_H
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define KEYMAP_TKL( \
|
||||||
|
K08, K09, K18, K19, K28, K29, K38, K39, K48, K49, K58, K59, K68, K69, K88, K89, \
|
||||||
|
K00, K01, K10, K11, K20, K21, K30, K31, K40, K41, K50, K51, K60, K61, K80, K81, K84, \
|
||||||
|
K02, K03, K12, K13, K22, K23, K32, K33, K42, K43, K52, K53, K62, K63, K82, K83, K85, \
|
||||||
|
K04, K14, K15, K24, K25, K34, K35, K44, K45, K54, K55, K64, K71, K65, \
|
||||||
|
K07, K79, K16, K17, K26, K27, K36, K37, K46, K47, K56, K57, K66, K67, K86, \
|
||||||
|
K06, K05, K78, K70, K72, K73, K74, K75, K76, K77, K87 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ K00, K10, K20, K30, K40, K50, K60, K70, K80 }, \
|
||||||
|
{ K01, K11, K21, K31, K41, K51, K61, K71, K81 }, \
|
||||||
|
{ K02, K12, K22, K32, K42, K52, K62, K72, K82 }, \
|
||||||
|
{ K03, K13, K23, K33, K43, K53, K63, K73, K83 }, \
|
||||||
|
{ K04, K14, K24, K34, K44, K54, K64, K74, K84 }, \
|
||||||
|
{ K05, K15, K25, K35, K45, K55, K65, K75, K85 }, \
|
||||||
|
{ K06, K16, K26, K36, K46, K56, K66, K76, K86 }, \
|
||||||
|
{ K07, K17, K27, K37, K47, K57, K67, K77, K87 }, \
|
||||||
|
{ K08, K18, K28, K38, K48, K58, K68, K78, K88 }, \
|
||||||
|
{ K09, K19, K29, K39, K49, K59, K69, K79, K89 } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define KEYMAP_60( \
|
||||||
|
K08, K01, K10, K11, K20, K21, K30, K31, K40, K41, K50, K51, K60, K61, \
|
||||||
|
K02, K03, K12, K13, K22, K23, K32, K33, K42, K43, K52, K53, K62, K63, \
|
||||||
|
K04, K14, K15, K24, K25, K34, K35, K44, K45, K54, K55, K64, K71, K65, \
|
||||||
|
K07, K79, K16, K17, K26, K27, K36, K37, K46, K47, K56, K57, K66, K67, \
|
||||||
|
K06, K05, K78, K70, K72, K73, K74, K75 \
|
||||||
|
) KEYMAP_TKL( \
|
||||||
|
K08, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \
|
||||||
|
KC_NO, K01, K10, K11, K20, K21, K30, K31, K40, K41, K50, K51, K60, K61, KC_NO, KC_NO, KC_NO, \
|
||||||
|
K02, K03, K12, K13, K22, K23, K32, K33, K42, K43, K52, K53, K62, K63, KC_NO, KC_NO, KC_NO, \
|
||||||
|
K04, K14, K15, K24, K25, K34, K35, K44, K45, K54, K55, K64, K71, K65, \
|
||||||
|
K07, K79, K16, K17, K26, K27, K36, K37, K46, K47, K56, K57, K66, K67, KC_NO, \
|
||||||
|
K06, K05, K78, K70, K72, K73, K74, K75, KC_NO, KC_NO, KC_NO \
|
||||||
|
)
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,21 @@
|
|||||||
|
# Build Options
|
||||||
|
# change to "no" to disable the options, or define them in the Makefile in
|
||||||
|
# the appropriate keymap folder that will get included automatically
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
|
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
MIDI_ENABLE = no # MIDI controls
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|
||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../../Makefile
|
||||||
|
endif
|
@ -0,0 +1,16 @@
|
|||||||
|
#include "gonnerd.h"
|
||||||
|
|
||||||
|
// Keymap layers
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = KEYMAP_60( /* Base */
|
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSPC,\
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSLS,\
|
||||||
|
KC_LCTL,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_NO, KC_ENT, \
|
||||||
|
KC_LSFT,KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT,KC_NO, \
|
||||||
|
KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,MO(1), KC_RCTL),
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
|
||||||
|
};
|
@ -0,0 +1,21 @@
|
|||||||
|
# Build Options
|
||||||
|
# change to "no" to disable the options, or define them in the Makefile in
|
||||||
|
# the appropriate keymap folder that will get included automatically
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
|
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
MIDI_ENABLE = no # MIDI controls
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|
||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../../Makefile
|
||||||
|
endif
|
@ -0,0 +1,78 @@
|
|||||||
|
#include "gonnerd.h"
|
||||||
|
|
||||||
|
// Keymap layers
|
||||||
|
#define BASE_LAYER 0
|
||||||
|
#define FUNCTION_LAYER 1
|
||||||
|
#define SYSTEM_LAYER 2
|
||||||
|
|
||||||
|
// Key aliases
|
||||||
|
#define __x__ KC_NO
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Layer 0: Default Layer
|
||||||
|
* ,-----------------------------------------------------------.
|
||||||
|
* |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| = | BSp |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \|
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Funct | A| S| D| F| G| H| J| K| L| ;| '|Enter |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Shift | Z| X| C| V| B| N| M| ,| .| /| Shift |
|
||||||
|
* |-----------------------------------------------------------'
|
||||||
|
* | Ctl|Alt|Gui | Space |Gui |Alt| F2| Ctl |
|
||||||
|
* `-----------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[BASE_LAYER] = KEYMAP_60(
|
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \
|
||||||
|
MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, __x__, KC_ENT, \
|
||||||
|
KC_LSFT, __x__, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, __x__, \
|
||||||
|
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, MO(3), KC_RCTL \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Layer 1: Function Layer
|
||||||
|
* ,-----------------------------------------------------------.
|
||||||
|
* | | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11| F12| Del |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | |Prv|Ply|Nxt| | |Pg^|Hme|Up |End| |Br-|Br+| |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Hold |Mte|Vl-|Vl+| | |Pgv|Lft|Dwn|Rgt| | | |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | | | | | | | | | | | | |
|
||||||
|
* |-----------------------------------------------------------'
|
||||||
|
* | | | | | | | | |
|
||||||
|
* `-----------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[FUNCTION_LAYER] = KEYMAP_60(
|
||||||
|
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \
|
||||||
|
__x__, KC_MPRV, KC_MPLY, KC_MNXT, __x__, __x__, KC_PGUP, KC_HOME, KC_UP, KC_END, __x__, KC_SLCK, KC_PAUS, __x__, \
|
||||||
|
KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, __x__, __x__, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, __x__, __x__, __x__, __x__, \
|
||||||
|
KC_LSFT, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \
|
||||||
|
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, __x__, __x__, __x__, __x__ \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Layer 2: System Layer
|
||||||
|
* ,-----------------------------------------------------------.
|
||||||
|
* |Reset| | | | | | | | | | | | | |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | | | | | | | | | | | | | | |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | | | | | | | | | | | | | |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | | | | | | | | | | | | |
|
||||||
|
* |-----------------------------------------------------------'
|
||||||
|
* | | | | | | | | |
|
||||||
|
* `-----------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[SYSTEM_LAYER] = KEYMAP_60(
|
||||||
|
RESET, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \
|
||||||
|
__x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \
|
||||||
|
__x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \
|
||||||
|
__x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \
|
||||||
|
__x__, __x__, __x__, __x__, __x__, __x__, KC_TRNS, __x__ \
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
|
||||||
|
};
|
@ -0,0 +1,5 @@
|
|||||||
|
# Mauin's keymap for the GON NerD
|
||||||
|
|
||||||
|
This layout is based on a Pok3r style layout with a standard base layer.
|
||||||
|
|
||||||
|
Function layers provide access to navigation and media keys.
|
@ -0,0 +1,34 @@
|
|||||||
|
GON NerD keyboard firmware
|
||||||
|
======================
|
||||||
|
|
||||||
|
## Changing Bootloader
|
||||||
|
|
||||||
|
It's not possible to simply flash this firmware on the GON NerD keyboard as the original bootloader does not support DFU connections.
|
||||||
|
|
||||||
|
It is possible to change the bootloader of the GON NerD with an ISP programmer. A guide on how to change the bootloader on your GON NerD can be found here:
|
||||||
|
[Converting NerD60 to TMK](https://deskthority.net/wiki/Converting_NerD60_to_TMK). After changing the bootloader you can flash your QMK keymap onto the keyboard.
|
||||||
|
|
||||||
|
_After changing the bootloader on your GON NerD PCB you will not be able to go back to the original firmware and the official configuration software will
|
||||||
|
not work anymore. You will lose your warranty and official support from GON!_
|
||||||
|
|
||||||
|
## Building
|
||||||
|
|
||||||
|
Download or clone the whole firmware and navigate to the keyboards/gonnerd folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file.
|
||||||
|
|
||||||
|
Depending on which keymap you would like to use, you will have to compile slightly differently.
|
||||||
|
|
||||||
|
### Default
|
||||||
|
|
||||||
|
To build with the default keymap, simply run `make default`.
|
||||||
|
|
||||||
|
### Other Keymaps
|
||||||
|
|
||||||
|
Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files.
|
||||||
|
|
||||||
|
To build the firmware binary hex file with a keymap just do `make` with a keymap like this:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ make [default|jack|<name>]
|
||||||
|
```
|
||||||
|
|
||||||
|
Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.
|
@ -0,0 +1,66 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Processor frequency.
|
||||||
|
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||||
|
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||||
|
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||||
|
# automatically to create a 32-bit value in your source code.
|
||||||
|
#
|
||||||
|
# This will be an integer division of F_USB below, as it is sourced by
|
||||||
|
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||||
|
# does not *change* the processor frequency - it should merely be updated to
|
||||||
|
# reflect the processor speed set externally so that the code can use accurate
|
||||||
|
# software delays.
|
||||||
|
F_CPU = 8000000
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# LUFA specific
|
||||||
|
#
|
||||||
|
# Target architecture (see library "Board Types" documentation).
|
||||||
|
ARCH = AVR8
|
||||||
|
|
||||||
|
# Input clock frequency.
|
||||||
|
# This will define a symbol, F_USB, in all source code files equal to the
|
||||||
|
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||||
|
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||||
|
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||||
|
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||||
|
# at the end, this will be done automatically to create a 32-bit value in your
|
||||||
|
# source code.
|
||||||
|
#
|
||||||
|
# If no clock division is performed on the input clock inside the AVR (via the
|
||||||
|
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||||
|
F_USB = $(F_CPU)
|
||||||
|
|
||||||
|
# Interrupt driven control endpoint task(+60)
|
||||||
|
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||||
|
|
||||||
|
|
||||||
|
# Boot Section Size in *bytes*
|
||||||
|
# Teensy halfKay 512
|
||||||
|
# Teensy++ halfKay 1024
|
||||||
|
# Atmel DFU loader 4096
|
||||||
|
# LUFA bootloader 4096
|
||||||
|
# USBaspLoader 2048
|
||||||
|
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||||
|
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE ?= no # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE ?= yes # Commands for debug and configuration
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE ?= no # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality on B7 by default
|
||||||
|
MIDI_ENABLE ?= no # MIDI controls
|
||||||
|
UNICODE_ENABLE ?= no # Unicode
|
||||||
|
BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
AUDIO_ENABLE ?= no # Audio output on port C6
|
@ -1,5 +1,5 @@
|
|||||||
#include "onekey.h"
|
#include "onekey.h"
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
{ KC_A }
|
{{ KC_A }}
|
||||||
};
|
};
|
||||||
|
@ -1,6 +1,38 @@
|
|||||||
#include "promethium.h"
|
#include "promethium.h"
|
||||||
|
#include "analog.h"
|
||||||
|
#include "timer.h"
|
||||||
|
#include "matrix.h"
|
||||||
|
|
||||||
void matrix_init_kb(void) {
|
// cubic fit {3.3, 0}, {3.5, 2.9}, {3.6, 5}, {3.7, 8.6}, {3.8, 36}, {3.9, 62}, {4.0, 73}, {4.05, 83}, {4.1, 89}, {4.15, 94}, {4.2, 100}
|
||||||
|
|
||||||
|
uint8_t battery_level(void) {
|
||||||
|
float voltage = analogRead(BATTERY_PIN) * 2 * 3.3 / 1024;
|
||||||
|
if (voltage < MIN_VOLTAGE) return 0;
|
||||||
|
if (voltage > MAX_VOLTAGE) return 255;
|
||||||
|
return (voltage - MIN_VOLTAGE) / (MAX_VOLTAGE - MIN_VOLTAGE) * 255;
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void battery_poll(uint8_t level) {
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_init_kb(void) {
|
||||||
matrix_init_user();
|
matrix_init_user();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void matrix_scan_kb(void) {
|
||||||
|
static uint16_t counter = BATTERY_POLL;
|
||||||
|
counter++;
|
||||||
|
|
||||||
|
if (counter > BATTERY_POLL) {
|
||||||
|
counter = 0;
|
||||||
|
battery_poll(battery_level());
|
||||||
|
}
|
||||||
|
|
||||||
|
matrix_scan_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_kb(uint8_t usb_led) {
|
||||||
|
led_set_user(usb_led);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
void rgbsps_set(uint8_t index, uint8_t r, uint8_t g, uint8_t b);
|
void rgbsps_set(uint8_t index, uint8_t r, uint8_t g, uint8_t b);
|
||||||
void rgbsps_setall(uint8_t r, uint8_t g, uint8_t b);
|
void rgbsps_setall(uint8_t r, uint8_t g, uint8_t b);
|
||||||
void rgbsps_turnoff(void);
|
void rgbsps_turnoff(void);
|
||||||
void rgbsps_send(void);
|
void rgbsps_send(void);
|
||||||
|
void rgbsps_sethsv(uint8_t index, uint16_t hue, uint8_t sat, uint8_t val);
|
@ -0,0 +1,3 @@
|
|||||||
|
ifndef MAKEFILE_INCLUDED
|
||||||
|
include ../../../Makefile
|
||||||
|
endif
|
@ -0,0 +1,162 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||||
|
|
||||||
|
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 <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef CONFIG_H
|
||||||
|
#define CONFIG_H
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x6060
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER upils
|
||||||
|
#define PRODUCT reddot
|
||||||
|
#define DESCRIPTION A custom keyboard
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 5
|
||||||
|
#define MATRIX_COLS 19
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Keyboard Matrix Assignments
|
||||||
|
*
|
||||||
|
* Change this to how you wired your keyboard
|
||||||
|
* COLS: AVR pins used for columns, left to right
|
||||||
|
* ROWS: AVR pins used for rows, top to bottom
|
||||||
|
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||||
|
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#define MATRIX_ROW_PINS { B0, B1, B2, B3, E6 }
|
||||||
|
#define MATRIX_COL_PINS { B7, D0, D1, D2, D3, C6, C7, D5, D4, D7, B4, B5, B6, F7, F6, F5, F4, F1, F0 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
|
||||||
|
/* COL2ROW or ROW2COL */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
// #define BACKLIGHT_PIN B7
|
||||||
|
// #define BACKLIGHT_BREATHING
|
||||||
|
// #define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
|
|
||||||
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
|
#define DEBOUNCING_DELAY 5
|
||||||
|
|
||||||
|
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||||
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
//#define LOCKING_SUPPORT_ENABLE
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Force NKRO
|
||||||
|
*
|
||||||
|
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
|
||||||
|
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
|
||||||
|
* makefile for this to work.)
|
||||||
|
*
|
||||||
|
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
|
||||||
|
* until the next keyboard reset.
|
||||||
|
*
|
||||||
|
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
|
||||||
|
* fully operational during normal computer usage.
|
||||||
|
*
|
||||||
|
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
|
||||||
|
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
|
||||||
|
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
|
||||||
|
* power-up.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
//#define FORCE_NKRO
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Magic Key Options
|
||||||
|
*
|
||||||
|
* Magic keys are hotkey commands that allow control over firmware functions of
|
||||||
|
* the keyboard. They are best used in combination with the HID Listen program,
|
||||||
|
* found here: https://www.pjrc.com/teensy/hid_listen.html
|
||||||
|
*
|
||||||
|
* The options below allow the magic key functionality to be changed. This is
|
||||||
|
* useful if your keyboard/keypad is missing keys and you want magic key support.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* key combination for magic key command */
|
||||||
|
#define IS_COMMAND() ( \
|
||||||
|
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||||
|
)
|
||||||
|
|
||||||
|
/* control how magic key switches layers */
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
|
||||||
|
|
||||||
|
/* override magic key keymap */
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
|
||||||
|
//#define MAGIC_KEY_HELP1 H
|
||||||
|
//#define MAGIC_KEY_HELP2 SLASH
|
||||||
|
//#define MAGIC_KEY_DEBUG D
|
||||||
|
//#define MAGIC_KEY_DEBUG_MATRIX X
|
||||||
|
//#define MAGIC_KEY_DEBUG_KBD K
|
||||||
|
//#define MAGIC_KEY_DEBUG_MOUSE M
|
||||||
|
//#define MAGIC_KEY_VERSION V
|
||||||
|
//#define MAGIC_KEY_STATUS S
|
||||||
|
//#define MAGIC_KEY_CONSOLE C
|
||||||
|
//#define MAGIC_KEY_LAYER0_ALT1 ESC
|
||||||
|
//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
|
||||||
|
//#define MAGIC_KEY_LAYER0 0
|
||||||
|
//#define MAGIC_KEY_LAYER1 1
|
||||||
|
//#define MAGIC_KEY_LAYER2 2
|
||||||
|
//#define MAGIC_KEY_LAYER3 3
|
||||||
|
//#define MAGIC_KEY_LAYER4 4
|
||||||
|
//#define MAGIC_KEY_LAYER5 5
|
||||||
|
//#define MAGIC_KEY_LAYER6 6
|
||||||
|
//#define MAGIC_KEY_LAYER7 7
|
||||||
|
//#define MAGIC_KEY_LAYER8 8
|
||||||
|
//#define MAGIC_KEY_LAYER9 9
|
||||||
|
//#define MAGIC_KEY_BOOTLOADER PAUSE
|
||||||
|
//#define MAGIC_KEY_LOCK CAPS
|
||||||
|
//#define MAGIC_KEY_EEPROM E
|
||||||
|
//#define MAGIC_KEY_NKRO N
|
||||||
|
//#define MAGIC_KEY_SLEEP_LED Z
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Feature disable options
|
||||||
|
* These options are also useful to firmware size reduction.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* disable debug print */
|
||||||
|
//#define NO_DEBUG
|
||||||
|
|
||||||
|
/* disable print */
|
||||||
|
//#define NO_PRINT
|
||||||
|
|
||||||
|
/* disable action features */
|
||||||
|
//#define NO_ACTION_LAYER
|
||||||
|
//#define NO_ACTION_TAPPING
|
||||||
|
//#define NO_ACTION_ONESHOT
|
||||||
|
//#define NO_ACTION_MACRO
|
||||||
|
//#define NO_ACTION_FUNCTION
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,29 @@
|
|||||||
|
#include "reddot.h"
|
||||||
|
#include "../../../../../quantum/keymap_extras/keymap_french.h"
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
[0] = KEYMAP(
|
||||||
|
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TAB, KC_CAPS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_FN0, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS,\
|
||||||
|
KC_LALT, FR_AMP, FR_EACU, FR_QUOT, FR_APOS, FR_LPRN, KC_BSPACE, KC_DELETE, FR_MINS, FR_EGRV, FR_UNDS, FR_CCED, FR_AGRV, FR_RPRN, FR_EQL, KC_INSERT, KC_HOME, KC_PGUP,\
|
||||||
|
KC_LGUI, FR_A, FR_Z, KC_E, KC_R, KC_T, KC_LSFT, KC_ENT, KC_Y, KC_U, KC_I, KC_O, KC_P, FR_CIRC, FR_DLR, KC_DELETE, KC_END, KC_PGDOWN, KC_KP_PLUS,\
|
||||||
|
KC_LCTL, FR_Q, KC_S, KC_D, KC_F, KC_G, KC_ENT, KC_H, KC_J, KC_K, KC_L, FR_M, FR_UGRV, FR_ASTR, KC_KP_1, KC_UP, KC_KP_3,\
|
||||||
|
FR_LESS, FR_W, KC_X, KC_C, KC_V, KC_B, KC_SPACE, KC_SPACE, KC_N, FR_COMM, FR_SCLN, FR_COLN, FR_EXLM, NO_ALGR, KC_LEFT, KC_DOWN, KC_RIGHT, KC_KP_ENTER),
|
||||||
|
|
||||||
|
[1] = KEYMAP(
|
||||||
|
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TAB, KC_CAPS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_FN0, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS,\
|
||||||
|
KC_LALT, FR_AMP, FR_EACU, FR_QUOT, FR_APOS, FR_LPRN, KC_BSPACE, KC_DELETE, FR_MINS, FR_EGRV, FR_UNDS, FR_CCED, FR_AGRV, FR_RPRN, FR_EQL, KC_7, KC_8, KC_9,\
|
||||||
|
KC_LGUI, FR_A, FR_Z, KC_E, KC_R, KC_T, KC_LSFT, KC_ENT, KC_Y, KC_U, KC_I, KC_O, KC_P, FR_CIRC, FR_DLR, KC_4, KC_5, KC_6, KC_KP_PLUS,\
|
||||||
|
KC_LCTL, FR_Q, KC_S, KC_D, KC_F, KC_G, KC_ENT, KC_H, KC_J, KC_K, KC_L, FR_M, FR_UGRV, FR_ASTR, KC_1, KC_2, KC_3,\
|
||||||
|
FR_LESS, FR_W, KC_X, KC_C, KC_V, KC_B, KC_SPACE, KC_SPACE, KC_N, FR_COMM, FR_SCLN, FR_COLN, FR_EXLM, NO_ALGR, KC_LEFT, KC_DOWN, KC_RIGHT, KC_KP_ENTER),
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
ACTION_LAYER_TOGGLE(1),
|
||||||
|
};
|
||||||
|
|
||||||
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||||
|
return MACRO_NONE;
|
||||||
|
};
|
||||||
|
|
@ -0,0 +1 @@
|
|||||||
|
# The default keymap for handwired/reddot
|
@ -0,0 +1,24 @@
|
|||||||
|
## RedDot Specific Info ##
|
||||||
|
|
||||||
|
|
||||||
|
## Quantum MK Firmware
|
||||||
|
|
||||||
|
For the full Quantum feature list, see [the parent README.md](/README.md).
|
||||||
|
|
||||||
|
## Building
|
||||||
|
|
||||||
|
Download or clone the whole firmware and navigate to the keyboard/reddot folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file.
|
||||||
|
|
||||||
|
Depending on which keymap you would like to use, you will have to compile slightly differently.
|
||||||
|
|
||||||
|
### Default
|
||||||
|
To build with the default keymap, simply run `make`.
|
||||||
|
|
||||||
|
### Other Keymaps
|
||||||
|
Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `<name>.c` and see keymap document (you can find in top README.md) and existent keymap files.
|
||||||
|
|
||||||
|
To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like:
|
||||||
|
```
|
||||||
|
$ make KEYMAP=[default|jack|<name>]
|
||||||
|
```
|
||||||
|
Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.
|
@ -0,0 +1,7 @@
|
|||||||
|
#include "reddot.h"
|
||||||
|
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
|
||||||
|
matrix_init_user();
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,20 @@
|
|||||||
|
#ifndef REDDOT_H
|
||||||
|
#define REDDOT_H
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define KEYMAP( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k10, k11, k12, k13, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k30, k31, k32, \
|
||||||
|
k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k50, k51, k52, k53, \
|
||||||
|
k60, k61, k62, k63, k64, k65, k66, k68, k69, k6A, k6B, k6C, k6D, k6E, k70, k71, k72, \
|
||||||
|
k80, k81, k82, k83, k84, k85, k86, k88, k89, k8A, k8B, k8C, k8D, k8E, k90, k91, k92, k93\
|
||||||
|
) { \
|
||||||
|
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k10, k11, k12, k13 }, \
|
||||||
|
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k30, k31, k32, KC_NO }, \
|
||||||
|
{ k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k50, k51, k52, k53 }, \
|
||||||
|
{ k60, k61, k62, k63, k64, k65, k66, KC_NO, k68, k69, k6A, k6B, k6C, k6D, k6E, k70, k71, k72, KC_NO }, \
|
||||||
|
{ k80, k81, k82, k83, k84, k85, k86, KC_NO, k88, k89, k8A, k8B, k8C, k8D, k8E, k90, k91, k92, k93 } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,88 @@
|
|||||||
|
|
||||||
|
#MCU = at90usb1287
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Processor frequency.
|
||||||
|
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||||
|
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||||
|
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||||
|
# automatically to create a 32-bit value in your source code.
|
||||||
|
#
|
||||||
|
# This will be an integer division of F_USB below, as it is sourced by
|
||||||
|
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||||
|
# does not *change* the processor frequency - it should merely be updated to
|
||||||
|
# reflect the processor speed set externally so that the code can use accurate
|
||||||
|
# software delays.
|
||||||
|
F_CPU = 16000000
|
||||||
|
|
||||||
|
# for avr upload
|
||||||
|
USB ?= /dev/cu.usbmodem1421
|
||||||
|
#
|
||||||
|
# LUFA specific
|
||||||
|
#
|
||||||
|
# Target architecture (see library "Board Types" documentation).
|
||||||
|
ARCH = AVR8
|
||||||
|
|
||||||
|
# Input clock frequency.
|
||||||
|
# This will define a symbol, F_USB, in all source code files equal to the
|
||||||
|
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||||
|
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||||
|
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||||
|
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||||
|
# at the end, this will be done automatically to create a 32-bit value in your
|
||||||
|
# source code.
|
||||||
|
#
|
||||||
|
# If no clock division is performed on the input clock inside the AVR (via the
|
||||||
|
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||||
|
F_USB = $(F_CPU)
|
||||||
|
|
||||||
|
|
||||||
|
ifdef TEENSY2
|
||||||
|
OPT_DEFS += -DATREUS_TEENSY2
|
||||||
|
ATREUS_UPLOAD_COMMAND = teensy_loader_cli -w -mmcu=$(MCU) $(TARGET).hex
|
||||||
|
else
|
||||||
|
OPT_DEFS += -DATREUS_ASTAR
|
||||||
|
OPT_DEFS += -DCATERINA_BOOTLOADER
|
||||||
|
ATREUS_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \
|
||||||
|
avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB)
|
||||||
|
endif
|
||||||
|
# Interrupt driven control endpoint task(+60)
|
||||||
|
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||||
|
|
||||||
|
|
||||||
|
# MCU name
|
||||||
|
|
||||||
|
# Boot Section Size in *bytes*
|
||||||
|
# Teensy halfKay 512
|
||||||
|
# Teensy++ halfKay 1024
|
||||||
|
# Atmel DFU loader 4096
|
||||||
|
# LUFA bootloader 4096
|
||||||
|
# USBaspLoader 2048
|
||||||
|
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||||
|
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE ?= no # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE ?= no # Commands for debug and configuration
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE ?= no # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default
|
||||||
|
MIDI_ENABLE ?= no # MIDI controls
|
||||||
|
UNICODE_ENABLE ?= no # Unicode
|
||||||
|
BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
AUDIO_ENABLE ?= no # Audio output on port C6
|
||||||
|
|
||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../Makefile
|
||||||
|
endif
|
||||||
|
|
||||||
|
upload: build
|
||||||
|
$(ATREUS_UPLOAD_COMMAND)
|
||||||
|
|
@ -1 +1,16 @@
|
|||||||
#include "kc60.h"
|
#include "kc60.h"
|
||||||
|
|
||||||
|
void led_set_kb(uint8_t usb_led)
|
||||||
|
{
|
||||||
|
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
||||||
|
// output low
|
||||||
|
DDRB |= (1<<2);
|
||||||
|
PORTB &= ~(1<<2);
|
||||||
|
} else {
|
||||||
|
// Hi-Z
|
||||||
|
DDRB &= ~(1<<2);
|
||||||
|
PORTB &= ~(1<<2);
|
||||||
|
}
|
||||||
|
|
||||||
|
led_set_user(usb_led);
|
||||||
|
}
|
@ -1,3 +1,5 @@
|
|||||||
|
SUBPROJECT_DEFAULT = rev2
|
||||||
|
|
||||||
ifndef MAKEFILE_INCLUDED
|
ifndef MAKEFILE_INCLUDED
|
||||||
include ../../Makefile
|
include ../../Makefile
|
||||||
endif
|
endif
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
:080000000000000000000001F7
|
:0B0000000000000000000000000001F4
|
||||||
:00000001FF
|
:00000001FF
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
:080000000000000000000000F8
|
:0B0000000000000000000000000000F5
|
||||||
:00000001FF
|
:00000001FF
|
||||||
|
@ -0,0 +1,3 @@
|
|||||||
|
ifndef MAKEFILE_INCLUDED
|
||||||
|
include ../../Makefile
|
||||||
|
endif
|
@ -0,0 +1,91 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||||
|
|
||||||
|
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 <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef CONFIG_H
|
||||||
|
#define CONFIG_H
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x3060
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER Wootpatoot
|
||||||
|
#define PRODUCT Lets Split v2
|
||||||
|
#define DESCRIPTION A split keyboard for the cheap makers
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
// Rows are doubled-up
|
||||||
|
#define MATRIX_ROWS 8
|
||||||
|
#define MATRIX_COLS 6
|
||||||
|
|
||||||
|
// wiring of each half
|
||||||
|
#define MATRIX_ROW_PINS { D7, E6, B4, B5 }
|
||||||
|
//#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 }
|
||||||
|
#define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6 } //uncomment this line and comment line above if you need to reverse left-to-right key order
|
||||||
|
|
||||||
|
//#define CATERINA_BOOTLOADER
|
||||||
|
|
||||||
|
/* COL2ROW or ROW2COL */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
/* define if matrix has ghost */
|
||||||
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
|
/* number of backlight levels */
|
||||||
|
// #define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
|
/* Set 0 if debouncing isn't needed */
|
||||||
|
#define DEBOUNCING_DELAY 5
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
/* key combination for command */
|
||||||
|
#define IS_COMMAND() ( \
|
||||||
|
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||||
|
)
|
||||||
|
|
||||||
|
/* ws2812 RGB LED */
|
||||||
|
#define RGB_DI_PIN D3
|
||||||
|
#define RGBLIGHT_TIMER
|
||||||
|
#define RGBLED_NUM 12 // Number of LEDs
|
||||||
|
#define ws2812_PORTREG PORTD
|
||||||
|
#define ws2812_DDRREG DDRD
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Feature disable options
|
||||||
|
* These options are also useful to firmware size reduction.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* disable debug print */
|
||||||
|
// #define NO_DEBUG
|
||||||
|
|
||||||
|
/* disable print */
|
||||||
|
// #define NO_PRINT
|
||||||
|
|
||||||
|
/* disable action features */
|
||||||
|
//#define NO_ACTION_LAYER
|
||||||
|
//#define NO_ACTION_TAPPING
|
||||||
|
//#define NO_ACTION_ONESHOT
|
||||||
|
//#define NO_ACTION_MACRO
|
||||||
|
//#define NO_ACTION_FUNCTION
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,32 @@
|
|||||||
|
#include "lets_split.h"
|
||||||
|
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||||
|
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
_delay_ms(20); // gets rid of tick
|
||||||
|
PLAY_NOTE_ARRAY(tone_startup, false, 0);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// // green led on
|
||||||
|
// DDRD |= (1<<5);
|
||||||
|
// PORTD &= ~(1<<5);
|
||||||
|
|
||||||
|
// // orange led on
|
||||||
|
// DDRB |= (1<<0);
|
||||||
|
// PORTB &= ~(1<<0);
|
||||||
|
|
||||||
|
matrix_init_user();
|
||||||
|
};
|
||||||
|
|
||||||
|
void shutdown_user(void) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
|
||||||
|
_delay_ms(150);
|
||||||
|
stop_all_notes();
|
||||||
|
#endif
|
||||||
|
}
|
@ -0,0 +1,28 @@
|
|||||||
|
#ifndef REV2FLIPHALF_H
|
||||||
|
#define REV2FLIPHALF_H
|
||||||
|
|
||||||
|
#include "../lets_split.h"
|
||||||
|
|
||||||
|
//void promicro_bootloader_jmp(bool program);
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
//void promicro_bootloader_jmp(bool program);
|
||||||
|
|
||||||
|
#define KEYMAP( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k50, k51, k52, k53, k54, k55, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \
|
||||||
|
k30, k31, k32, k33, k34, k35, k70, k71, k72, k73, k74, k75 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ k00, k01, k02, k03, k04, k05 }, \
|
||||||
|
{ k10, k11, k12, k13, k14, k15 }, \
|
||||||
|
{ k20, k21, k22, k23, k24, k25 }, \
|
||||||
|
{ k30, k31, k32, k33, k34, k35 }, \
|
||||||
|
{ k40, k41, k42, k43, k44, k45 }, \
|
||||||
|
{ k50, k51, k52, k53, k54, k55 }, \
|
||||||
|
{ k60, k61, k62, k63, k64, k65 }, \
|
||||||
|
{ k70, k71, k72, k73, k74, k75 } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,5 @@
|
|||||||
|
BACKLIGHT_ENABLE = no
|
||||||
|
|
||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../Makefile
|
||||||
|
endif
|
@ -1,7 +1,8 @@
|
|||||||
#ifndef CONFIG_USER_H
|
#ifndef CONFIG_USER_H
|
||||||
#define CONFIG_USER_H
|
#define CONFIG_USER_H
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "../../config.h"
|
#include "../../config.h"
|
||||||
|
|
||||||
#define PREVENT_STUCK_MODIFIERS
|
#define PREVENT_STUCK_MODIFIERS
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,63 @@
|
|||||||
|
#----------------------------------------------------------------------------
|
||||||
|
# On command line:
|
||||||
|
#
|
||||||
|
# make all = Make software.
|
||||||
|
#
|
||||||
|
# make clean = Clean out built project files.
|
||||||
|
#
|
||||||
|
# make coff = Convert ELF to AVR COFF.
|
||||||
|
#
|
||||||
|
# make extcoff = Convert ELF to AVR Extended COFF.
|
||||||
|
#
|
||||||
|
# make program = Download the hex file to the device.
|
||||||
|
# Please customize your programmer settings(PROGRAM_CMD)
|
||||||
|
#
|
||||||
|
# make teensy = Download the hex file to the device, using teensy_loader_cli.
|
||||||
|
# (must have teensy_loader_cli installed).
|
||||||
|
#
|
||||||
|
# make dfu = Download the hex file to the device, using dfu-programmer (must
|
||||||
|
# have dfu-programmer installed).
|
||||||
|
#
|
||||||
|
# make flip = Download the hex file to the device, using Atmel FLIP (must
|
||||||
|
# have Atmel FLIP installed).
|
||||||
|
#
|
||||||
|
# make dfu-ee = Download the eeprom file to the device, using dfu-programmer
|
||||||
|
# (must have dfu-programmer installed).
|
||||||
|
#
|
||||||
|
# make flip-ee = Download the eeprom file to the device, using Atmel FLIP
|
||||||
|
# (must have Atmel FLIP installed).
|
||||||
|
#
|
||||||
|
# make debug = Start either simulavr or avarice as specified for debugging,
|
||||||
|
# with avr-gdb or avr-insight as the front end for debugging.
|
||||||
|
#
|
||||||
|
# make filename.s = Just compile filename.c into the assembler code only.
|
||||||
|
#
|
||||||
|
# make filename.i = Create a preprocessed source file for use in submitting
|
||||||
|
# bug reports to the GCC project.
|
||||||
|
#
|
||||||
|
# To rebuild project do "make clean" then "make all".
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change to "no" to disable the options, or define them in the makefile.mk in
|
||||||
|
# the appropriate keymap folder that will get included automatically
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
|
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||||
|
MIDI_ENABLE = no # MIDI controls
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||||
|
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|
||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../../Makefile
|
||||||
|
endif
|
After Width: | Height: | Size: 52 KiB |