Merge remote-tracking branch 'refs/remotes/origin/master' into vision_division_dev
93
.gitattributes
vendored
Normal file
|
@ -0,0 +1,93 @@
|
||||||
|
# auto for anything unspecified
|
||||||
|
* text=auto
|
||||||
|
|
||||||
|
# sources
|
||||||
|
*.c text
|
||||||
|
*.cc text
|
||||||
|
*.cxx text
|
||||||
|
*.cpp text
|
||||||
|
*.c++ text
|
||||||
|
*.hpp text
|
||||||
|
*.h text
|
||||||
|
*.h++ text
|
||||||
|
*.hh text
|
||||||
|
*.bat text
|
||||||
|
*.coffee text
|
||||||
|
*.css text
|
||||||
|
*.htm text
|
||||||
|
*.html text
|
||||||
|
*.inc text
|
||||||
|
*.ini text
|
||||||
|
*.js text
|
||||||
|
*.jsx text
|
||||||
|
*.json text
|
||||||
|
*.less text
|
||||||
|
*.php text
|
||||||
|
*.pl text
|
||||||
|
*.py text
|
||||||
|
*.rb text
|
||||||
|
*.sass text
|
||||||
|
*.scm text
|
||||||
|
*.scss text
|
||||||
|
*.sh text
|
||||||
|
*.sql text
|
||||||
|
*.styl text
|
||||||
|
*.ts text
|
||||||
|
*.xml text
|
||||||
|
*.xhtml text
|
||||||
|
|
||||||
|
# make files (need to always use lf for compatibility with Windows 10 bash)
|
||||||
|
Makefile eol=lf
|
||||||
|
*.mk eol=lf
|
||||||
|
|
||||||
|
# make files (need to always use lf for compatibility with Windows 10 bash)
|
||||||
|
*.sh eol=lf
|
||||||
|
|
||||||
|
# documentation
|
||||||
|
*.markdown text
|
||||||
|
*.md text
|
||||||
|
*.mdwn text
|
||||||
|
*.mdown text
|
||||||
|
*.mkd text
|
||||||
|
*.mkdn text
|
||||||
|
*.mdtxt text
|
||||||
|
*.mdtext text
|
||||||
|
*.txt text
|
||||||
|
AUTHORS text
|
||||||
|
CHANGELOG text
|
||||||
|
CHANGES text
|
||||||
|
CONTRIBUTING text
|
||||||
|
COPYING text
|
||||||
|
INSTALL text
|
||||||
|
license text
|
||||||
|
LICENSE text
|
||||||
|
NEWS text
|
||||||
|
readme text
|
||||||
|
*README* text
|
||||||
|
TODO text
|
||||||
|
|
||||||
|
GRAPHICS
|
||||||
|
*.ai binary
|
||||||
|
*.bmp binary
|
||||||
|
*.eps binary
|
||||||
|
*.gif binary
|
||||||
|
*.ico binary
|
||||||
|
*.jng binary
|
||||||
|
*.jp2 binary
|
||||||
|
*.jpg binary
|
||||||
|
*.jpeg binary
|
||||||
|
*.jpx binary
|
||||||
|
*.jxr binary
|
||||||
|
*.pdf binary
|
||||||
|
*.png binary
|
||||||
|
*.psb binary
|
||||||
|
*.psd binary
|
||||||
|
*.svg text
|
||||||
|
*.svgz binary
|
||||||
|
*.tif binary
|
||||||
|
*.tiff binary
|
||||||
|
*.wbmp binary
|
||||||
|
*.webp binary
|
||||||
|
|
||||||
|
# hex files
|
||||||
|
*.hex binary
|
4
Makefile
|
@ -190,6 +190,10 @@ ifeq ($(strip $(MIDI_ENABLE)), yes)
|
||||||
SRC += $(QUANTUM_DIR)/process_keycode/process_midi.c
|
SRC += $(QUANTUM_DIR)/process_keycode/process_midi.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(VIRTSER_ENABLE)), yes)
|
||||||
|
OPT_DEFS += -DVIRTSER_ENABLE
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(AUDIO_ENABLE)), yes)
|
ifeq ($(strip $(AUDIO_ENABLE)), yes)
|
||||||
OPT_DEFS += -DAUDIO_ENABLE
|
OPT_DEFS += -DAUDIO_ENABLE
|
||||||
SRC += $(QUANTUM_DIR)/process_keycode/process_music.c
|
SRC += $(QUANTUM_DIR)/process_keycode/process_music.c
|
||||||
|
|
|
@ -455,6 +455,35 @@ Turn the backlight on and off without changing level.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### 2.6 Swap-Hands Action
|
||||||
|
The swap-hands action allows support for one-handed keyboards without requiring a separate layer. Set `ONEHAND_ENABLE` in the Makefile and define a `hand_swap_config` entry in your keymap. Now whenever the `ACTION_SWAP_HANDS` command key is pressed the keyboard is mirrored. For instance, to type "Hello, World" on QWERTY you would type `^Ge^s^s^w^c W^wr^sd`
|
||||||
|
|
||||||
|
### 2.6.1 Configuration
|
||||||
|
The configuration table is a simple 2-dimensional array to map from column/row to new column/row. Example `hand_swap_config` for Planck:
|
||||||
|
|
||||||
|
```
|
||||||
|
const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
{{11, 0}, {10, 0}, {9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}},
|
||||||
|
{{11, 1}, {10, 1}, {9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}},
|
||||||
|
{{11, 2}, {10, 2}, {9, 2}, {8, 2}, {7, 2}, {6, 2}, {5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}},
|
||||||
|
{{11, 3}, {10, 3}, {9, 3}, {8, 3}, {7, 3}, {6, 3}, {5, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}},
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
Note that the array indices are reversed same as the matrix and the values are of type `keypos_t` which is `{col, row}` and all values are zero-based. In the example above, `hand_swap_config[2][4]` (third row, fifth column) would return {7, 2} (third row, eighth column).
|
||||||
|
|
||||||
|
### 2.6.2 Advanced Swap Commands
|
||||||
|
- **`ACTION_SWAP_HANDS()`** Swaps hands when pressed, returns to normal when released (momentary).
|
||||||
|
- **`ACTION_SWAP_HANDS_TOGGLE()`** Toggles swap on and off with every keypress.
|
||||||
|
- **`ACTION_SWAP_HANDS_TAP_TOGGLE()`** Toggles with a tap; momentary when held.
|
||||||
|
- **`ACTION_SWAP_HANDS_TAP_KEY(key)`** Sends `key` with a tap; momentary swap when held.
|
||||||
|
- **`ACTION_SWAP_HANDS_ON_OFF()`** Alias for `ACTION_SWAP_HANDS()`
|
||||||
|
- **`ACTION_SWAP_HANDS_OFF_ON()`** Momentarily turns off swap.
|
||||||
|
- **`ACTION_SWAP_HANDS_ON()`** Turns on swapping and leaves it on.
|
||||||
|
- **`ACTION_SWAP_HANDS_OFF()`** Turn off swapping and leaves it off. Good for returning to a known state.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## 3. Layer switching Example
|
## 3. Layer switching Example
|
||||||
There are some ways to switch layer with 'Layer' actions.
|
There are some ways to switch layer with 'Layer' actions.
|
||||||
|
|
||||||
|
|
3
keyboards/ergodox/ez/keymaps/steno/Makefile
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
VIRTSER_ENABLE = yes
|
||||||
|
# Not enough interupts, so something has to go
|
||||||
|
MOUSEKEY_ENABLE = no
|
324
keyboards/ergodox/ez/keymaps/steno/keymap.c
Normal file
|
@ -0,0 +1,324 @@
|
||||||
|
#include "ergodox.h"
|
||||||
|
#include "debug.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
#include "sendchar.h"
|
||||||
|
#include "virtser.h"
|
||||||
|
|
||||||
|
#define BASE 0 // default layer
|
||||||
|
#define SYMB 1 // symbols
|
||||||
|
#define MDIA 2 // media keys
|
||||||
|
#define TXBOLT 3 // TxBolt Steno Virtual Serial
|
||||||
|
#define TXBOLT2 4 // TxBolt Steno Virtual Serial Alternative Layout
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Keymap 0: Basic layer
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | Del | Q | W | E | R | T | L1 | | TX | Y | U | I | O | P | \ |
|
||||||
|
* |--------+------+------+------+------+------| | | BOLT |------+------+------+------+------+--------|
|
||||||
|
* | BkSp | A | S | D | F | G |------| |------| H | J | K | L |; / L2|' / Cmd |
|
||||||
|
* |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
|
||||||
|
* | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | App | LGui | | Alt |Ctrl/Esc|
|
||||||
|
* ,------|------|------| |------+--------+------.
|
||||||
|
* | | | Home | | PgUp | | |
|
||||||
|
* | Space|Backsp|------| |------| Tab |Enter |
|
||||||
|
* | |ace | End | | PgDn | | |
|
||||||
|
* `--------------------' `----------------------'
|
||||||
|
*/
|
||||||
|
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||||
|
// Otherwise, it needs KC_*
|
||||||
|
[BASE] = KEYMAP( // layer 0 : default
|
||||||
|
// left hand
|
||||||
|
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT,
|
||||||
|
KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
|
||||||
|
KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||||
|
KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO),
|
||||||
|
LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT,
|
||||||
|
ALT_T(KC_APP), KC_LGUI,
|
||||||
|
KC_HOME,
|
||||||
|
KC_SPC,KC_BSPC,KC_END,
|
||||||
|
// right hand
|
||||||
|
KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||||
|
TG(TXBOLT), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||||
|
KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT),
|
||||||
|
MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT,
|
||||||
|
KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1,
|
||||||
|
KC_LALT, CTL_T(KC_ESC),
|
||||||
|
KC_PGUP,
|
||||||
|
KC_PGDN,KC_TAB, KC_ENT
|
||||||
|
),
|
||||||
|
/* Keymap 1: Symbol Layer
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | | | | | | | . | 0 | = | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | | | | | |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | | | | | |
|
||||||
|
* | | |------| |------| | |
|
||||||
|
* | | | | | | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
// SYMBOLS
|
||||||
|
[SYMB] = KEYMAP(
|
||||||
|
// left hand
|
||||||
|
M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
|
||||||
|
KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS,
|
||||||
|
KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV,
|
||||||
|
KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
// right hand
|
||||||
|
KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||||
|
KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12,
|
||||||
|
KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS,
|
||||||
|
KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
/* Keymap 2: Media and mouse keys
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | RESET | | | | | | | | | | | | | | |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | | | | MsUp | | | | | | | | | | | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | | | | | | | | | | | Prev | Next | | |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | | | | | |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | | | | |Brwser|
|
||||||
|
* | | |------| |------| |Back |
|
||||||
|
* | | | | | | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
// MEDIA AND MOUSE
|
||||||
|
[MDIA] = KEYMAP(
|
||||||
|
RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2,
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
// right hand
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
|
||||||
|
KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_WBAK
|
||||||
|
),
|
||||||
|
// TxBolt Codes
|
||||||
|
#define Sl 0b00000001
|
||||||
|
#define Tl 0b00000010
|
||||||
|
#define Kl 0b00000100
|
||||||
|
#define Pl 0b00001000
|
||||||
|
#define Wl 0b00010000
|
||||||
|
#define Hl 0b00100000
|
||||||
|
#define Rl 0b01000001
|
||||||
|
#define Al 0b01000010
|
||||||
|
#define Ol 0b01000100
|
||||||
|
#define X 0b01001000
|
||||||
|
#define Er 0b01010000
|
||||||
|
#define Ur 0b01100000
|
||||||
|
#define Fr 0b10000001
|
||||||
|
#define Rr 0b10000010
|
||||||
|
#define Pr 0b10000100
|
||||||
|
#define Br 0b10001000
|
||||||
|
#define Lr 0b10010000
|
||||||
|
#define Gr 0b10100000
|
||||||
|
#define Tr 0b11000001
|
||||||
|
#define Sr 0b11000010
|
||||||
|
#define Dr 0b11000100
|
||||||
|
#define Zr 0b11001000
|
||||||
|
#define NM 0b11010000
|
||||||
|
#define GRPMASK 0b11000000
|
||||||
|
#define GRP0 0b00000000
|
||||||
|
#define GRP1 0b01000000
|
||||||
|
#define GRP2 0b10000000
|
||||||
|
#define GRP3 0b11000000
|
||||||
|
/* Keymap 3: TxBolt (Serial)
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | BKSPC | | | | | | | | | | | | | | |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | | # | # | # | # | # | | | | # | # | # | # | # | # |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | S | T | P | H | * |------| |------| * | F | P | L | T | D |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | S | K | W | R | * | | | | * | R | B | G | S | Z |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | | | | | | | | | | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | | | | | |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | | | | | |
|
||||||
|
* | A | O |------| |------| E | U |
|
||||||
|
* | | | | | | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
// TxBolt over Serial
|
||||||
|
[TXBOLT] = KEYMAP(
|
||||||
|
KC_BSPC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_NO, M(NM), M(NM), M(NM), M(NM), M(NM), KC_NO,
|
||||||
|
KC_NO, M(Sl), M(Tl), M(Pl), M(Hl), M(X),
|
||||||
|
KC_NO, M(Sl), M(Kl), M(Wl), M(Rl), M(X), KC_NO,
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_NO, KC_NO,
|
||||||
|
KC_NO,
|
||||||
|
M(Al), M(Ol), KC_NO,
|
||||||
|
// right hand
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_TRNS, M(NM), M(NM), M(NM), M(NM), M(NM), M(NM),
|
||||||
|
M(X), M(Fr), M(Pr), M(Lr), M(Tr), M(Dr),
|
||||||
|
KC_NO, M(X), M(Rr), M(Br), M(Gr), M(Sr), M(Zr),
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_NO, KC_NO,
|
||||||
|
KC_NO,
|
||||||
|
KC_NO, M(Er), M(Ur)
|
||||||
|
),
|
||||||
|
/* Keymap 4: TxBolt (Serial) Alternative
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | | # | # | # | # | # | | | | # | # | # | # | # | # |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | | S | T | P | H | * | | | | * | F | P | L | T | D |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | S | K | W | R | * |------| |------| * | R | B | G | S | Z |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | | | A | O | | E | U | | | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | | | | | |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | | | | | |
|
||||||
|
* | | |------| |------| | |
|
||||||
|
* | | | | | | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
// TxBolt over Serial
|
||||||
|
[TXBOLT2] = KEYMAP(
|
||||||
|
KC_NO, M(NM), M(NM), M(NM), M(NM), M(NM), KC_NO,
|
||||||
|
KC_NO, M(Sl), M(Tl), M(Pl), M(Hl), M(X), KC_NO,
|
||||||
|
KC_NO, M(Sl), M(Kl), M(Wl), M(Rl), M(X),
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_NO, KC_NO, KC_NO, M(Al), M(Ol),
|
||||||
|
KC_NO, KC_NO,
|
||||||
|
KC_NO,
|
||||||
|
KC_NO, KC_NO, KC_NO,
|
||||||
|
// right hand
|
||||||
|
KC_NO, M(NM), M(NM), M(NM), M(NM), M(NM), M(NM),
|
||||||
|
KC_TRNS, M(X), M(Fr), M(Pr), M(Lr), M(Tr), M(Dr),
|
||||||
|
M(X), M(Rr), M(Br), M(Gr), M(Sr), M(Zr),
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
|
M(Er), M(Ur), KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_NO, KC_NO,
|
||||||
|
KC_NO,
|
||||||
|
KC_NO, KC_NO, KC_NO
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
[1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols)
|
||||||
|
};
|
||||||
|
|
||||||
|
uint8_t chord[4] = {0,0,0,0};
|
||||||
|
uint8_t pressed_count = 0;
|
||||||
|
|
||||||
|
void send_chord(void)
|
||||||
|
{
|
||||||
|
for(uint8_t i = 0; i < 4; i++)
|
||||||
|
{
|
||||||
|
if(chord[i])
|
||||||
|
virtser_send(chord[i]);
|
||||||
|
}
|
||||||
|
virtser_send(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record)
|
||||||
|
{
|
||||||
|
// We need to track keypresses in all modes, in case the user
|
||||||
|
// changes mode whilst pressing other keys.
|
||||||
|
if (record->event.pressed)
|
||||||
|
pressed_count++;
|
||||||
|
else
|
||||||
|
pressed_count--;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||||
|
{
|
||||||
|
// MACRODOWN only works in this function
|
||||||
|
|
||||||
|
if (record->event.pressed) {
|
||||||
|
uint8_t grp = (id & GRPMASK) >> 6;
|
||||||
|
chord[grp] |= id;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (pressed_count == 0) {
|
||||||
|
send_chord();
|
||||||
|
chord[0] = chord[1] = chord[2] = chord[3] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return MACRO_NONE;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Runs just one time when the keyboard initializes.
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
};
|
||||||
|
|
||||||
|
// Runs constantly in the background, in a loop.
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
|
||||||
|
uint8_t layer = biton32(layer_state);
|
||||||
|
|
||||||
|
ergodox_board_led_off();
|
||||||
|
ergodox_right_led_1_off();
|
||||||
|
ergodox_right_led_2_off();
|
||||||
|
ergodox_right_led_3_off();
|
||||||
|
switch (layer) {
|
||||||
|
// TODO: Make this relevant to the ErgoDox EZ.
|
||||||
|
case 1:
|
||||||
|
ergodox_right_led_1_on();
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
ergodox_right_led_2_on();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
// none
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
92
keyboards/ergodox/ez/keymaps/steno/readme.md
Normal file
|
@ -0,0 +1,92 @@
|
||||||
|
# ErgoDox EZ Steno Configuration
|
||||||
|
|
||||||
|
This layout has a layer that uses the TxBolt Stenograph protocol over a Virtual Serial port. It requires something like Plover in order to function.
|
||||||
|
|
||||||
|
In Plover, you can select TX Bolt as the Stenotype Machine, and find the COM port that was assigned. In this way, your regular keyboard will still function normally, and you can switch back and forth between the Steno and Keyboard layers.
|
||||||
|
|
||||||
|
<pre><code>
|
||||||
|
/* Keymap 0: Basic layer
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | Del | Q | W | E | R | T | L1 | | TX | Y | U | I | O | P | \ |
|
||||||
|
* |--------+------+------+------+------+------| | | BOLT |------+------+------+------+------+--------|
|
||||||
|
* | BkSp | A | S | D | F | G |------| |------| H | J | K | L |; / L2|' / Cmd |
|
||||||
|
* |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
|
||||||
|
* | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | App | LGui | | Alt |Ctrl/Esc|
|
||||||
|
* ,------|------|------| |------+--------+------.
|
||||||
|
* | | | Home | | PgUp | | |
|
||||||
|
* | Space|Backsp|------| |------| Tab |Enter |
|
||||||
|
* | |ace | End | | PgDn | | |
|
||||||
|
* `--------------------' `----------------------'
|
||||||
|
*/
|
||||||
|
/* Keymap 1: Symbol Layer
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | | | | | | | . | 0 | = | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | | | | | |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | | | | | |
|
||||||
|
* | | |------| |------| | |
|
||||||
|
* | | | | | | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
/* Keymap 2: Media keys
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | RESET | | | | | | | | | | | | | | |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | | | | | |------| |------| | | | | | Play |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | | | | | | | | | | | Prev | Next | | |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | | | | | |VolUp |VolDn | Mute | | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | | | | | |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | | | | |Brwser|
|
||||||
|
* | | |------| |------| |Back |
|
||||||
|
* | | | | | | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
/* Keymap 3: TxBolt (Serial)
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | BKSPC | | | | | | | | | | | | | | |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | | # | # | # | # | # | | | | # | # | # | # | # | # |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | S | T | P | H | * |------| |------| * | F | P | L | T | D |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | S | K | W | R | * | | | | * | R | B | G | S | Z |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | | | | | | | | | | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | | | | | |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | | | | | |
|
||||||
|
* | A | O |------| |------| E | U |
|
||||||
|
* | | | | | | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
</code></pre>
|
|
@ -130,3 +130,27 @@ void ergodox_right_led_3_off(void){
|
||||||
|
|
||||||
void ergodox_right_led_off(uint8_t led){
|
void ergodox_right_led_off(uint8_t led){
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef ONEHAND_ENABLE
|
||||||
|
__attribute__ ((weak))
|
||||||
|
const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
{{0, 9}, {1, 9}, {2, 9}, {3, 9}, {4, 9}},
|
||||||
|
{{0, 10}, {1, 10}, {2, 10}, {3, 10}, {4, 10}},
|
||||||
|
{{0, 11}, {1, 11}, {2, 11}, {3, 11}, {4, 11}},
|
||||||
|
{{0, 12}, {1, 12}, {2, 12}, {3, 12}, {4, 12}},
|
||||||
|
{{0, 13}, {1, 13}, {2, 13}, {3, 13}, {4, 13}},
|
||||||
|
{{0, 14}, {1, 14}, {2, 14}, {3, 14}, {4, 14}},
|
||||||
|
{{0, 15}, {1, 15}, {2, 15}, {3, 15}, {4, 15}},
|
||||||
|
{{0, 16}, {1, 16}, {2, 16}, {3, 16}, {4, 16}},
|
||||||
|
{{0, 17}, {1, 17}, {2, 17}, {3, 17}, {4, 17}},
|
||||||
|
{{0, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0}},
|
||||||
|
{{0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1}},
|
||||||
|
{{0, 2}, {1, 2}, {2, 2}, {3, 2}, {4, 2}},
|
||||||
|
{{0, 3}, {1, 3}, {2, 3}, {3, 3}, {4, 3}},
|
||||||
|
{{0, 4}, {1, 4}, {2, 4}, {3, 4}, {4, 4}},
|
||||||
|
{{0, 5}, {1, 5}, {2, 5}, {3, 5}, {4, 5}},
|
||||||
|
{{0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}},
|
||||||
|
{{0, 7}, {1, 7}, {2, 7}, {3, 7}, {4, 7}},
|
||||||
|
{{0, 8}, {1, 8}, {2, 8}, {3, 8}, {4, 8}},
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
10
keyboards/ergodox/keymaps/jafo/jafo-Notes
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
These are notes on how to build and deploy the firmware to Ez, but they are
|
||||||
|
from before the qmk restructuring.
|
||||||
|
|
||||||
|
cd qmk_firmware/keyboard/ergodox_ez
|
||||||
|
make KEYMAP=jafo
|
||||||
|
cp ergodox_ez.hex keymaps/jafo/
|
||||||
|
/tmp/teensy.64bit
|
||||||
|
Open hex keymap file
|
||||||
|
Program
|
||||||
|
Upload
|
BIN
keyboards/ergodox/keymaps/jafo/jafo-layout.pdf
Normal file
BIN
keyboards/ergodox/keymaps/jafo/jafo_highres.png
Normal file
After Width: | Height: | Size: 175 KiB |
183
keyboards/ergodox/keymaps/jafo/keymap.c
Normal file
|
@ -0,0 +1,183 @@
|
||||||
|
#include "ergodox.h"
|
||||||
|
#include "debug.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
|
#define BASE 0 // default layer
|
||||||
|
#define SYMB 1 // symbols
|
||||||
|
#define MDIA 2 // media keys
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Keymap 0: Basic layer
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | Grv | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | = | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | Esc/Cmd| A | S | D | F | G |------| |------| H | J | K | L |; / L2|' / Cmd |
|
||||||
|
* |--------+------+------+------+------+------| L2 | | L2 |------+------+------+------+------+--------|
|
||||||
|
* | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* |Grv/L1| '" | Del | Left | Right| | Up | Down | [ | ] | ~L1 |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* |Ctrl/Esc| Alt| | Alt |Ctrl/Esc|
|
||||||
|
* ,------|------|------| |------+--------+------.
|
||||||
|
* | | | Home | | PgUp | | |
|
||||||
|
* | Space|Backsp|------| |------| Tab |Enter |
|
||||||
|
* | |ace | End | | PgDn | | |
|
||||||
|
* `--------------------' `----------------------'
|
||||||
|
*/
|
||||||
|
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||||
|
// Otherwise, it needs KC_*
|
||||||
|
[BASE] = KEYMAP( // layer 0 : default
|
||||||
|
// left hand
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT,
|
||||||
|
KC_EQL, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
|
||||||
|
GUI_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||||
|
KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, TG(MDIA),
|
||||||
|
LT(SYMB,KC_GRV),KC_QUOT, KC_DELT, KC_LEFT,KC_RGHT,
|
||||||
|
CTL_T(KC_ESC), KC_LALT,
|
||||||
|
KC_HOME,
|
||||||
|
KC_SPC,KC_BSPC,KC_END,
|
||||||
|
// right hand
|
||||||
|
KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||||
|
TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||||
|
KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT),
|
||||||
|
TG(MDIA), KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT,
|
||||||
|
KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1,
|
||||||
|
KC_LALT, CTL_T(KC_ESC),
|
||||||
|
KC_PGUP,
|
||||||
|
KC_PGDN,KC_TAB, KC_ENT
|
||||||
|
),
|
||||||
|
/* Keymap 1: Symbol Layer
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | | | | | | | . | 0 | = | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | | | | | |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | | | | | |
|
||||||
|
* | | |------| |------| | |
|
||||||
|
* | | | | | | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
// SYMBOLS
|
||||||
|
[SYMB] = KEYMAP(
|
||||||
|
// left hand
|
||||||
|
KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
|
||||||
|
KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS,
|
||||||
|
KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV,
|
||||||
|
KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
// right hand
|
||||||
|
KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||||
|
KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12,
|
||||||
|
KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS,
|
||||||
|
KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
/* Keymap 2: Media and mouse keys
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | | | | MsUp | | | | | | | | | | | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | |MsLeft|MsDown|MsRght| |------| |------| LEFT | DOWN | UP | RIGHT| | Play |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | | | | | | | | | | | Prev | Next | | |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | | Lclk | Mclk | Rclk | |VolUp |VolDn | Mute | | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | | | | | |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | | | | |Brwser|
|
||||||
|
* | | |------| |------| |Back |
|
||||||
|
* | | | | | | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
// MEDIA AND MOUSE
|
||||||
|
[MDIA] = KEYMAP(
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN3, KC_BTN2,
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
// right hand
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TRNS, KC_MPLY,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
|
||||||
|
KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_WBAK
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
[1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols)
|
||||||
|
};
|
||||||
|
|
||||||
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||||
|
{
|
||||||
|
// MACRODOWN only works in this function
|
||||||
|
switch(id) {
|
||||||
|
case 0:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return MACRO_NONE;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Runs just one time when the keyboard initializes.
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
// Runs constantly in the background, in a loop.
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
|
||||||
|
uint8_t layer = biton32(layer_state);
|
||||||
|
|
||||||
|
ergodox_board_led_off();
|
||||||
|
ergodox_right_led_1_off();
|
||||||
|
ergodox_right_led_2_off();
|
||||||
|
ergodox_right_led_3_off();
|
||||||
|
switch (layer) {
|
||||||
|
// TODO: Make this relevant to the ErgoDox EZ.
|
||||||
|
case 1:
|
||||||
|
ergodox_right_led_1_on();
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
ergodox_right_led_2_on();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
// none
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
20
keyboards/ergodox/keymaps/jafo/readme.md
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
# ErgoDox EZ "jafo" Configuration
|
||||||
|
|
||||||
|
This is a layout based on the ErgoDox Ez default layout, but with some
|
||||||
|
customizations I made for my use-case. I use Linux, vi and the i3 window
|
||||||
|
manager, so I made these changes:
|
||||||
|
|
||||||
|
- Arrow keys laid out in vi positions in media layer.
|
||||||
|
|
||||||
|
- Esc (tap) and Win (held) to the left of A. i3 uses Win key for navigation
|
||||||
|
and having that be symmetric on the left and right makes it easier.
|
||||||
|
|
||||||
|
- Grave accent below equals, I was having a hard time using ~
|
||||||
|
|
||||||
|
- Layer 2 switch below the L1 switch, so I can go into a mode where I get
|
||||||
|
arrow keys under my vi motion fingers.
|
||||||
|
|
||||||
|
- Making the Ctrl (held) and Esc (tap) on my thumbs symmetric. Not sure I
|
||||||
|
need that with the Esc left of A and Ctrl on the Z and / keys when held...
|
||||||
|
|
||||||
|
![Jafo](jafo_highres.png)
|
|
@ -3,21 +3,18 @@
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "action_layer.h"
|
#include "action_layer.h"
|
||||||
#include "action_util.h"
|
#include "action_util.h"
|
||||||
#include "mousekey.h"
|
|
||||||
|
|
||||||
#define BASE 0 // default layer
|
#define BASE 0 // default layer
|
||||||
#define SYMB 1 // symbols layer
|
#define SYMB 1 // symbols layer
|
||||||
#define MDIA 2 // media layer
|
#define MDIA 2 // media layer
|
||||||
#define SPEC 3 // special layer
|
#define SPEC 3 // special layer
|
||||||
|
|
||||||
#define LCaps 10 // left caps-shift key
|
#define LSymb 10 // left symbol-shift key
|
||||||
#define LSymb 11 // left symbol-shift key
|
#define LMdia 11 // left media-shift key
|
||||||
#define LMdia 12 // left media-shift key
|
#define LSpec 12 // left special-shift key
|
||||||
#define LSpec 13 // left special-shift key
|
#define RSymb 13 // right symbol-shift key
|
||||||
#define RCaps 14 // right caps-shift key
|
#define RMdia 14 // right media-shift key
|
||||||
#define RSymb 15 // right symbol-shift key
|
#define RSpec 15 // right special-shift key
|
||||||
#define RMdia 16 // right media-shift key
|
|
||||||
#define RSpec 17 // right special-shift key
|
|
||||||
|
|
||||||
#define MUL 20 // mouse up left
|
#define MUL 20 // mouse up left
|
||||||
#define MUR 21 // mouse up right
|
#define MUR 21 // mouse up right
|
||||||
|
@ -25,81 +22,82 @@
|
||||||
#define MDR 23 // mouse down right
|
#define MDR 23 // mouse down right
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The Ordinary Layout for the Ergodox EZ keyboard, v4
|
* The Ordinary Layout for the Ergodox EZ keyboard, v4.20
|
||||||
*
|
*
|
||||||
* Modifications from default by Nicholas Keene ergodoxez@nicholaskeene.com
|
* Modifications from default by Nicholas Keene ergodoxez@nicholaskeene.com
|
||||||
*
|
*
|
||||||
* No rights reserved. This software is in the public domain.
|
* No rights reserved. This software is in the public domain.
|
||||||
* Credit me if you are friendly but if you're a jerk don't bother.
|
* Credit me if you are friendly but if you're a jerk don't bother.
|
||||||
|
* If you use or modify this layout I would love to hear from you.
|
||||||
*
|
*
|
||||||
* Details: readme.md
|
* Details: readme.md
|
||||||
* https://github.com/nrrkeene/qmk_firmware/tree/master/keyboard/ergodox_ez/keymaps/ordinary
|
* https://github.com/nrrkeene/qmk_firmware/tree/master/keyboards/ergodox/keymaps/ordinary
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
/******* Base Layer ********************************************************************************************************
|
/******* Base Layer ****************************************************************************************************
|
||||||
*
|
*
|
||||||
* ,------------------------------------------------------. ,------------------------------------------------------.
|
* ,------------------------------------------------------. ,------------------------------------------------------.
|
||||||
* | Special `~ | 1 | 2 | 3 | 4 | 5 | ESC | | - | 6 | 7 | 8 | 9 | 0 | =+ Special |
|
* | Special `~ | 1 | 2 | 3 | 4 | 5 | ESC | | - | 6 | 7 | 8 | 9 | 0 | =+ Special |
|
||||||
* |------------+------+------+------+------+-------------| |------+------+------+------+------+------+------------|
|
* |------------+------+------+------+------+-------------| |------+------+------+------+------+------+------------|
|
||||||
* | Media Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | \| Media |
|
* | Media Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | \| Media |
|
||||||
* |------------+------+------+------+------+------| | | |------+------+------+------+------+------------|
|
* |------------+------+------+------+------+------| | | |------+------+------+------+------+------------|
|
||||||
* | Symbol | A | S | D | F | G |------| |------| H | J | K | L | ; | '" Symbol |
|
* | Symbol | A | S | D | F | G |------| |------| H | J | K | L | ; | '" Symbol |
|
||||||
* |------------+------+------+------+------+------|Shift | | Tab |------+------+------+------+------+------------|
|
* |------------+------+------+------+------+------|Shift | | Tab |------+------+------+------+------+------------|
|
||||||
* | Capitals | Z | X | C | V | B | -Tab | | | N | M | , | . | / | Capitals |
|
* | Capitals | Z | X | C | V | B | -Tab | | | N | M | , | . | / | Capitals |
|
||||||
* `------------+------+------+------+------+-------------' `-------------+------+------+------+------+------------'
|
* `------------+------+------+------+------+-------------' `-------------+------+------+------+------+------------'
|
||||||
* | LCtrl | Meh |Hyper | LAlt | LGui | | RGui | RAlt | Hyper| Meh | RCtrl |
|
* | LCtrl | Meh |Hyper | LAlt | LGui | | RGui | RAlt | Hyper| Meh | RCtrl |
|
||||||
* `-----------------------------------' `-----------------------------------'
|
* `-----------------------------------' `-----------------------------------'
|
||||||
* ,-------------. ,-------------.
|
* ,-------------. ,-------------.
|
||||||
* | Home | End | | Left | Right|
|
* | Home | End | | Left | Right|
|
||||||
* ,------|------|------| |------+------+------.
|
* ,------|------|------| |------+------+------.
|
||||||
* | | | PgUp | | Up | | |
|
* | | | PgUp | | Up | | |
|
||||||
* |Backsp| Del |------| |------| Enter| Space|
|
* |Backsp| Del |------| |------| Enter| Space|
|
||||||
* | | | PgDn | | Down | | |
|
* | | | PgDn | | Down | | |
|
||||||
* `--------------------' `--------------------'
|
* `--------------------' `--------------------'
|
||||||
*/
|
*/
|
||||||
[BASE] = KEYMAP(
|
[BASE] = KEYMAP(
|
||||||
// left hand
|
// left hand
|
||||||
F(LSpec),KC_1,KC_2,KC_3 ,KC_4 ,KC_5 ,KC_ESC
|
F(LSpec) ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_ESC
|
||||||
,F(LMdia) ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_LBRC
|
,F(LMdia) ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_LBRC
|
||||||
,M(LSymb) ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G
|
,M(LSymb) ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G
|
||||||
,M(LCaps) ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,LSFT(KC_TAB)
|
,KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,LSFT(KC_TAB)
|
||||||
,KC_LCTL ,KC_MEH ,KC_HYPR,KC_LALT,KC_LGUI
|
,KC_LCTL ,KC_MEH ,KC_HYPR,KC_LALT,KC_LGUI
|
||||||
,KC_HOME,KC_END
|
,KC_HOME,KC_END
|
||||||
,KC_PGUP
|
,KC_PGUP
|
||||||
,KC_BSPC,KC_DEL ,KC_PGDN
|
,KC_BSPC,KC_DEL ,KC_PGDN
|
||||||
// right hand
|
// right hand
|
||||||
,KC_MINS ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,F(RSpec)
|
,KC_MINS ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,F(RSpec)
|
||||||
,KC_RBRC ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,F(RMdia)
|
,KC_RBRC ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,F(RMdia)
|
||||||
,KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,F(RSymb)
|
,KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,F(RSymb)
|
||||||
,KC_TAB ,KC_N ,KC_M ,KC_COMM,KC_DOT ,KC_SLSH ,M(RCaps)
|
,KC_TAB ,KC_N ,KC_M ,KC_COMM,KC_DOT ,KC_SLSH ,KC_RSFT
|
||||||
,KC_RGUI,KC_RALT,KC_HYPR ,KC_MEH ,KC_RCTL
|
,KC_RGUI,KC_RALT,KC_HYPR ,KC_MEH ,KC_RCTL
|
||||||
,KC_LEFT ,KC_RGHT
|
,KC_LEFT ,KC_RGHT
|
||||||
,KC_UP
|
,KC_UP
|
||||||
,KC_DOWN ,KC_ENT ,KC_SPC
|
,KC_DOWN ,KC_ENT ,KC_SPC
|
||||||
),
|
),
|
||||||
|
|
||||||
/******* Symbols Layer *****************************************************************************************************
|
/******* Symbols Layer *************************************************************************************************
|
||||||
*
|
*
|
||||||
* ,-----------------------------------------------------. ,-----------------------------------------------------.
|
* ,-----------------------------------------------------. ,-----------------------------------------------------.
|
||||||
* | | F1 | F2 | F3 | F4 | F5 | Esc | | - | F6 | F7 | F8 | F9 | F10 | |
|
* | | F1 | F2 | F3 | F4 | F5 | Esc | | - | F6 | F7 | F8 | F9 | F10 | |
|
||||||
* |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------|
|
* |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------|
|
||||||
* | | ! | @ | { | } | & | < | | > | | | 7 | 8 | 9 | / | |
|
* | | ! | @ | { | } | & | < | | > | | | 7 | 8 | 9 | / | |
|
||||||
* |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------|
|
* |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------|
|
||||||
* | | # | $ | ( | ) | ` |------| |------| / | 4 | 5 | 6 | * | |
|
* | | # | $ | ( | ) | ` |------| |------| / | 4 | 5 | 6 | * | |
|
||||||
* |-----------+------+------+------+------+------| Tab | | Shift|------+------+------+------+------+-----------|
|
* |-----------+------+------+------+------+------| Tab | | Shift|------+------+------+------+------+-----------|
|
||||||
* | | % | ^ | [ | ] | ~ | | | -Tab| \ | 1 | 2 | 3 | - | |
|
* | | % | ^ | [ | ] | ~ | | | -Tab| \ | 1 | 2 | 3 | - | |
|
||||||
* `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------'
|
* `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------'
|
||||||
* | LCtrl | Meh |Hyper | LAlt | LGui | |RGui/0|RAlt/.|Hypr/=|Meh/+ |RCtrl/Ent|
|
* | LCtrl | Meh |Hyper | LAlt | LGui | | 0 | . | = | + | Ent |
|
||||||
* `-----------------------------------' `-------------------------------------'
|
* `-----------------------------------' `-----------------------------------'
|
||||||
* ,-------------. ,-------------.
|
* ,-------------. ,-------------.
|
||||||
* | Left | Right| | Home | End |
|
* | Left | Right| | Home | End |
|
||||||
* ,------|------|------| |------+------+------.
|
* ,------|------|------| |------+------+------.
|
||||||
* | | | Up | | PgUp | | |
|
* | | | Up | | PgUp | | |
|
||||||
* |Space |Enter |------| |------|BackSp| Del |
|
* |Space |Enter |------| |------|BackSp| Del |
|
||||||
* | | | Down | | PgDn | | |
|
* | | | Down | | PgDn | | |
|
||||||
* `--------------------' `--------------------'
|
* `--------------------' `--------------------'
|
||||||
*/
|
*/
|
||||||
[SYMB] = KEYMAP(
|
[SYMB] = KEYMAP(
|
||||||
// left hand
|
// left hand
|
||||||
|
@ -107,41 +105,41 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
,KC_TRNS ,KC_EXLM ,KC_AT ,KC_LCBR ,KC_RCBR ,KC_AMPR ,LSFT(KC_COMM)
|
,KC_TRNS ,KC_EXLM ,KC_AT ,KC_LCBR ,KC_RCBR ,KC_AMPR ,LSFT(KC_COMM)
|
||||||
,KC_TRNS ,KC_HASH ,KC_DLR ,KC_LPRN ,KC_RPRN ,KC_GRV
|
,KC_TRNS ,KC_HASH ,KC_DLR ,KC_LPRN ,KC_RPRN ,KC_GRV
|
||||||
,KC_TRNS ,KC_PERC ,KC_CIRC ,KC_LBRC ,KC_RBRC ,KC_TILD ,KC_TAB
|
,KC_TRNS ,KC_PERC ,KC_CIRC ,KC_LBRC ,KC_RBRC ,KC_TILD ,KC_TAB
|
||||||
,KC_LCTL ,KC_MEH ,KC_HYPR,KC_LALT ,KC_LGUI
|
,KC_LCTL ,KC_MEH ,KC_HYPR ,KC_LALT ,KC_LGUI
|
||||||
,KC_LEFT ,KC_RGHT
|
,KC_LEFT ,KC_RGHT
|
||||||
,KC_UP
|
,KC_UP
|
||||||
,KC_SPC ,KC_ENT ,KC_DOWN
|
,KC_SPC ,KC_ENT ,KC_DOWN
|
||||||
// right hand
|
// right hand
|
||||||
,KC_MINS ,KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_TRNS
|
,KC_MINS ,KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_TRNS
|
||||||
,LSFT(KC_DOT),KC_PIPE ,KC_7 ,KC_8 ,KC_9 ,KC_SLSH ,KC_TRNS
|
,LSFT(KC_DOT),KC_PIPE ,KC_7 ,KC_8 ,KC_9 ,KC_SLSH ,KC_TRNS
|
||||||
,KC_SLSH ,KC_4 ,KC_5 ,KC_6 ,KC_ASTR ,KC_TRNS
|
,KC_SLSH ,KC_4 ,KC_5 ,KC_6 ,KC_ASTR ,KC_TRNS
|
||||||
,LSFT(KC_TAB),KC_BSLS ,KC_1 ,KC_2 ,KC_3 ,KC_MINS ,KC_TRNS
|
,LSFT(KC_TAB),KC_BSLS ,KC_1 ,KC_2 ,KC_3 ,KC_MINS ,KC_TRNS
|
||||||
,GUI_T(KC_0),ALT_T(KC_DOT),ALL_T(KC_EQL),MEH_T(KC_PLUS),CTL_T(KC_ENT)
|
,KC_0 ,KC_DOT ,KC_EQL,KC_PLUS ,KC_ENT
|
||||||
,KC_HOME ,KC_END
|
,KC_HOME ,KC_END
|
||||||
,KC_PGUP
|
,KC_PGUP
|
||||||
,KC_PGDN ,KC_BSPC ,KC_DEL
|
,KC_PGDN ,KC_BSPC ,KC_DEL
|
||||||
),
|
),
|
||||||
|
|
||||||
/******* Media Layer *******************************************************************************************************
|
/******* Media Layer *******************************************************************************************************
|
||||||
*
|
*
|
||||||
* ,---------------------------------------------------------------. ,---------------------------------------------------------------.
|
* ,---------------------------------------------------------------. ,---------------------------------------------------------------.
|
||||||
* | | F11 | F12 | F13 | F14 | F15 | Esc | | | F16 | F17 | F18 | F19 | F20 | |
|
* | | F11 | F12 | F13 | F14 | F15 | Esc | | | F16 | F17 | F18 | F19 | F20 | |
|
||||||
* |------+---------+---------+---------+---------+----------------| |------+---------+---------+---------+---------+---------+------|
|
* |------+---------+---------+---------+---------+----------------| |------+---------+---------+---------+---------+---------+------|
|
||||||
* | |Shut Down|MouseUpLf|Mouse Up |MouseUpRg|Volume Up|Scroll| |Scroll|PrintScrn| Home | Up | PgUp | Mail | |
|
* | |Shut Down|MouseUpLf|Mouse Up |MouseUpRg|Volume Up|Scroll| |Scroll|PrintScrn| Home | Up | PgUp | Mail | |
|
||||||
* |------+---------+---------+---------+---------+---------| Up | | Up |---------+---------+---------+---------+---------+------|
|
* |------+---------+---------+---------+---------+---------| Up | | Up |---------+---------+---------+---------+---------+------|
|
||||||
* | | Sleep |MouseLeft|MouseDown|MouseRght|Volume Dn|------| |------| Num Lock| Left | Down | Right | MyComp | |
|
* | | Sleep |MouseLeft|MouseDown|MouseRght|Volume Dn|------| |------| Num Lock| Left | Down | Right | MyComp | |
|
||||||
* |------+---------+---------+---------+---------+---------|Scroll| |Scroll|---------+---------+---------+---------+---------+------|
|
* |------+---------+---------+---------+---------+---------|Scroll| |Scroll|---------+---------+---------+---------+---------+------|
|
||||||
* | | |MouseDnLf|MouseDown|MouseDnRg| Mute | Down | | Down | | End | Down | PgDn | | |
|
* | | |MouseDnLf|MouseDown|MouseDnRg| Mute | Down | | Down | | End | Down | PgDn | | |
|
||||||
* `------+---------+---------+---------+---------+----------------' `----------------+---------+---------+---------+---------+------'
|
* `------+---------+---------+---------+---------+----------------' `----------------+---------+---------+---------+---------+------'
|
||||||
* |LCtrl| Meh | MClick | LClick | R Click| |Cmd/Insrt|Optn/Del | Hyper | Meh |RCtrl|
|
* |LCtrl| Meh | MClick | LClick | R Click| |Cmd/Insrt|Optn/Del | Hyper | Meh |RCtrl|
|
||||||
* `---------------------------------------------' `---------------------------------------------'
|
* `---------------------------------------------' `---------------------------------------------'
|
||||||
* ,-------------. ,-------------.
|
* ,-------------. ,-------------.
|
||||||
* | Stop |Refrsh| | Prev | Next |
|
* | Stop |Refrsh| | Prev | Next |
|
||||||
* ,------|------|------| |------+------+------.
|
* ,------|------|------| |------+------+------.
|
||||||
* |Brwser|Brwser|Search| |VolUp | | |
|
* |Brwser|Brwser|Search| |VolUp | | |
|
||||||
* |Back | Fwd |------| |------| Stop | Play-|
|
* |Back | Fwd |------| |------| Stop | Play-|
|
||||||
* | | | Home | |VolDn | | Pause|
|
* | | | Home | |VolDn | | Pause|
|
||||||
* `--------------------' `--------------------'
|
* `--------------------' `--------------------'
|
||||||
*/
|
*/
|
||||||
[MDIA] = KEYMAP(
|
[MDIA] = KEYMAP(
|
||||||
// left hand
|
// left hand
|
||||||
|
@ -166,67 +164,63 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
/******* Special Layer *****************************************************************************************************
|
/******* Special Layer *****************************************************************************************************
|
||||||
*
|
*
|
||||||
* ,-----------------------------------------------------. ,-----------------------------------------------------.
|
* ,-------------------------------------------------------. ,-------------------------------------------------------.
|
||||||
* | | Esc | | | | | | | | | | | | Bspc | |
|
* | | Esc | | | | | | | | | | | - | Bspc | |
|
||||||
* |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------|
|
* |-------------+------+------+------+------+-------------| |------+------+------+------+------+------+-------------|
|
||||||
* | | | | | | | | | | | | | | | |
|
* | Media Lock | | | | | | | | | | | | [ | ] | Media Lock |
|
||||||
* |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------|
|
* |-------------+------+------+------+------+------| | | |------+------+------+------+------+-------------|
|
||||||
* | | | | | | |------| |------| | | | | | |
|
* | Symbol Lock | | | | | |------| |------| | | | | | Symbol Lock |
|
||||||
* |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------|
|
* |-------------+------+------+------+------+------| | | |------+------+------+------+------+-------------|
|
||||||
* | | | | | | | | | | | | | | | RShift |
|
* | Caps Lock | | | | | | | | | | | | | | Caps Lock |
|
||||||
* `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------'
|
* `-------------+------+------+------+------+-------------' `-------------+------+------+------+------+-------------'
|
||||||
* | | | | | | | | | | | |
|
* | | | | | | | | | | | |
|
||||||
* `----------------------------------' `----------------------------------'
|
* `------------------------------------' `------------------------------------'
|
||||||
* ,-------------. ,-------------.
|
* ,-------------. ,-------------.
|
||||||
* | | | | | |
|
* | | | | | |
|
||||||
* ,------|------|------| |------+------+------.
|
* ,------|------|------| |------+------+------.
|
||||||
* | | | | | | | |
|
* | | | | | | | |
|
||||||
* | | |------| |------| | |
|
* | | |------| |------| | |
|
||||||
* | | | | | | | |
|
* | | | | | | | |
|
||||||
* `--------------------' `--------------------'
|
* `--------------------' `--------------------'
|
||||||
*/
|
*/
|
||||||
[SPEC] = KEYMAP(
|
[SPEC] = KEYMAP(
|
||||||
// left hand
|
// left hand
|
||||||
KC_TRNS ,KC_ESC ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
|
KC_TRNS ,KC_ESC ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||||
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
|
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||||
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
|
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||||
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
|
,KC_CAPS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||||
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
|
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||||
|
|
||||||
,KC_TRNS ,KC_TRNS
|
,KC_TRNS ,KC_TRNS
|
||||||
,KC_TRNS
|
,KC_TRNS
|
||||||
,KC_TRNS,KC_TRNS ,KC_TRNS
|
,KC_TRNS,KC_TRNS ,KC_TRNS
|
||||||
// right hand
|
// right hand
|
||||||
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_BSPC ,KC_TRNS
|
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_MINS ,KC_BSPC ,KC_TRNS
|
||||||
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
|
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_LBRC ,KC_RBRC ,KC_TRNS
|
||||||
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
|
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||||
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_RSFT
|
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_CAPS
|
||||||
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
|
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||||
|
,KC_TRNS ,KC_TRNS
|
||||||
,KC_TRNS ,KC_TRNS
|
,KC_TRNS
|
||||||
,KC_TRNS
|
,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||||
,KC_TRNS ,KC_TRNS ,KC_TRNS
|
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint16_t PROGMEM fn_actions[] = {
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
// the faux shift keys are implemented as macro taps
|
// the faux shift keys are implemented as macro taps
|
||||||
[LCaps] = ACTION_MACRO_TAP(LCaps)
|
[LSymb] = ACTION_MACRO_TAP(LSymb)
|
||||||
,[LSymb] = ACTION_MACRO_TAP(LSymb)
|
|
||||||
,[LMdia] = ACTION_MACRO_TAP(LMdia)
|
,[LMdia] = ACTION_MACRO_TAP(LMdia)
|
||||||
,[LSpec] = ACTION_MACRO_TAP(LSpec)
|
,[LSpec] = ACTION_MACRO_TAP(LSpec)
|
||||||
,[RCaps] = ACTION_MACRO_TAP(RCaps)
|
|
||||||
,[RSymb] = ACTION_MACRO_TAP(RSymb)
|
,[RSymb] = ACTION_MACRO_TAP(RSymb)
|
||||||
,[RMdia] = ACTION_MACRO_TAP(RMdia)
|
,[RMdia] = ACTION_MACRO_TAP(RMdia)
|
||||||
,[RSpec] = ACTION_MACRO_TAP(RSpec)
|
,[RSpec] = ACTION_MACRO_TAP(RSpec)
|
||||||
};
|
};
|
||||||
|
|
||||||
uint16_t caps_shift = 0;
|
|
||||||
uint16_t symb_shift = 0;
|
uint16_t symb_shift = 0;
|
||||||
uint16_t mdia_shift = 0;
|
uint16_t mdia_shift = 0;
|
||||||
|
uint16_t spec_shift = 0;
|
||||||
|
|
||||||
bool symb_lock = false;
|
|
||||||
bool mdia_lock = false;
|
bool mdia_lock = false;
|
||||||
|
bool symb_lock = false;
|
||||||
|
|
||||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||||
{
|
{
|
||||||
|
@ -237,50 +231,28 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||||
// only because sometimes rapid pressing led to irregular events; this way the states
|
// only because sometimes rapid pressing led to irregular events; this way the states
|
||||||
// are self healing during use.
|
// are self healing during use.
|
||||||
|
|
||||||
case LCaps: // both caps-shift keys trigger Left Shift
|
case LSymb: //
|
||||||
case RCaps: // so they don't interfere with the magic combo
|
if (record->event.pressed) { // when the LSymb button is pressed
|
||||||
if (record->event.pressed && !record->tap.count) {
|
if(++symb_shift > 2) mdia_shift = 2; // increment the symb shift count, max two
|
||||||
if(++caps_shift > 2) caps_shift = 2;
|
if(spec_shift) symb_lock = !symb_lock; // if the Special layer is on, toggle the shift lock
|
||||||
if(caps_shift == 2) {
|
layer_on(SYMB); // in any case, turn on the Symbols layer
|
||||||
register_code(KC_CAPS);
|
} else { // when the LSymb button is released
|
||||||
unregister_code(KC_CAPS);
|
if(--symb_shift < 0) symb_shift = 0; // decrement the shift count, minimum zero
|
||||||
} else if(caps_shift == 1) {
|
if((!symb_shift) && (!symb_lock)) layer_off(SYMB); // if both shifts are released and the lock is off, turn off the Symbols layer
|
||||||
register_code(KC_LSFT);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if(--caps_shift < 0) caps_shift = 0;
|
|
||||||
if(caps_shift == 0) unregister_code(KC_LSFT);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case LSymb:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
if(++symb_shift > 2) symb_shift = 2;
|
|
||||||
if(symb_shift == 2) {
|
|
||||||
symb_lock = !symb_lock;
|
|
||||||
} else if(symb_shift == 1) {
|
|
||||||
layer_on(SYMB);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if(--symb_shift < 0) symb_shift = 0;
|
|
||||||
if((symb_shift == 0) && (!symb_lock)) layer_off(SYMB);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LMdia:
|
case LMdia:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (record->tap.count && (!mdia_shift) && (!mdia_lock)) {
|
if (record->tap.count && (!mdia_shift) && (!mdia_lock) && (!spec_shift)) {
|
||||||
register_code(KC_TAB);
|
register_code(KC_TAB);
|
||||||
} else {
|
} else {
|
||||||
|
if(spec_shift) mdia_lock = !mdia_lock;
|
||||||
if(++mdia_shift > 2) mdia_shift = 2;
|
if(++mdia_shift > 2) mdia_shift = 2;
|
||||||
if(mdia_shift == 2) {
|
layer_on(MDIA);
|
||||||
mdia_lock = !mdia_lock;
|
|
||||||
} else if(mdia_shift == 1) {
|
|
||||||
layer_on(MDIA);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(record->tap.count && (!mdia_shift) && (!mdia_lock)) {
|
if(record->tap.count && (!mdia_shift) && (!mdia_lock) && (!spec_shift)) {
|
||||||
unregister_code(KC_TAB);
|
unregister_code(KC_TAB);
|
||||||
} else {
|
} else {
|
||||||
if(--mdia_shift < 0) mdia_shift = 0;
|
if(--mdia_shift < 0) mdia_shift = 0;
|
||||||
|
@ -290,35 +262,36 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LSpec:
|
case LSpec:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) { // when the LSpec button is pressed
|
||||||
if (record->tap.count && !record->tap.interrupted) {
|
if(symb_shift) symb_lock == !symb_lock; // if another layer button is engaged, then
|
||||||
register_code(KC_GRV);
|
else if(mdia_shift) mdia_lock = !mdia_lock; // lock that layer, be it caps or symb or mdia
|
||||||
|
else if (record->tap.count && !record->tap.interrupted && (!spec_shift)) {
|
||||||
|
register_code(KC_GRV); // otherwise, if it's an uninterrupted tap, emit a char
|
||||||
} else {
|
} else {
|
||||||
layer_on(SPEC);
|
if(++spec_shift > 2) spec_shift = 2;
|
||||||
|
layer_on(SPEC); // otherwise, turn on the Special layer
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(record->tap.count && !record->tap.interrupted) {
|
if(record->tap.count && !record->tap.interrupted && (!spec_shift)) {
|
||||||
unregister_code(KC_GRV);
|
unregister_code(KC_GRV);
|
||||||
} else {
|
} else {
|
||||||
layer_off(SPEC);
|
if(--spec_shift < 0) spec_shift = 0;
|
||||||
|
if(!spec_shift) layer_off(SPEC);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RSymb:
|
case RSymb:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (record->tap.count && (!symb_shift) && (!symb_lock)) {
|
if (record->tap.count && (!symb_shift) && (!symb_lock) && (!spec_shift)) {
|
||||||
register_code(KC_QUOT);
|
register_code(KC_QUOT);
|
||||||
} else {
|
} else {
|
||||||
if(++symb_shift > 2) symb_shift = 2;
|
if(++symb_shift > 2) symb_shift = 2;
|
||||||
if(symb_shift == 2) {
|
if(spec_shift) symb_lock = !symb_lock;
|
||||||
symb_lock = !symb_lock;
|
layer_on(SYMB);
|
||||||
} else if(symb_shift == 1) {
|
|
||||||
layer_on(SYMB);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(record->tap.count && symb_shift == 0) {
|
if(record->tap.count && (!symb_shift) && (!symb_lock) && (!spec_shift)) {
|
||||||
unregister_code(KC_QUOT);
|
unregister_code(KC_QUOT);
|
||||||
} else {
|
} else {
|
||||||
if(--symb_shift < 0) symb_shift = 0;
|
if(--symb_shift < 0) symb_shift = 0;
|
||||||
|
@ -329,18 +302,15 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||||
|
|
||||||
case RMdia:
|
case RMdia:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (record->tap.count && (!mdia_shift) && (!mdia_lock)) {
|
if (record->tap.count && (!mdia_shift) && (!mdia_lock) && (!spec_shift)) {
|
||||||
register_code(KC_BSLS);
|
register_code(KC_BSLS);
|
||||||
} else {
|
} else {
|
||||||
if(++mdia_shift > 2) mdia_shift = 2;
|
if(++mdia_shift > 2) mdia_shift = 2;
|
||||||
if(mdia_shift == 2) {
|
if(spec_shift) mdia_lock = !mdia_lock;
|
||||||
mdia_lock = !mdia_lock;
|
layer_on(MDIA);
|
||||||
} else if(mdia_shift == 1) {
|
|
||||||
layer_on(MDIA);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(record->tap.count && (!mdia_shift) && (!mdia_lock)) {
|
if(record->tap.count && (!mdia_shift) && (!mdia_lock) && (!spec_shift)) {
|
||||||
unregister_code(KC_BSLS);
|
unregister_code(KC_BSLS);
|
||||||
} else {
|
} else {
|
||||||
if(--mdia_shift < 0) mdia_shift = 0;
|
if(--mdia_shift < 0) mdia_shift = 0;
|
||||||
|
@ -351,16 +321,20 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||||
|
|
||||||
case RSpec:
|
case RSpec:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (record->tap.count && !record->tap.interrupted) {
|
if(symb_shift) symb_lock = !symb_lock;
|
||||||
|
else if(mdia_shift) mdia_lock = !mdia_lock;
|
||||||
|
else if (record->tap.count && !record->tap.interrupted && (!spec_shift)) {
|
||||||
register_code(KC_EQL);
|
register_code(KC_EQL);
|
||||||
} else {
|
} else {
|
||||||
|
if(++spec_shift > 2) spec_shift = 2;
|
||||||
layer_on(SPEC);
|
layer_on(SPEC);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(record->tap.count && !record->tap.interrupted) {
|
if(record->tap.count && !record->tap.interrupted && (!spec_shift)) {
|
||||||
unregister_code(KC_EQL);
|
unregister_code(KC_EQL);
|
||||||
} else {
|
} else {
|
||||||
layer_off(SPEC);
|
if(--spec_shift < 0) spec_shift = 0;
|
||||||
|
if(!spec_shift) layer_off(SPEC);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -431,7 +405,9 @@ void matrix_init_user(void) {
|
||||||
// Runs constantly in the background, in a loop.
|
// Runs constantly in the background, in a loop.
|
||||||
void matrix_scan_user(void) {
|
void matrix_scan_user(void) {
|
||||||
// shift or caps lock turns on red light
|
// shift or caps lock turns on red light
|
||||||
if(caps_shift || (keyboard_report->mods & MOD_BIT(KC_RSFT)) || (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK))) {
|
if((keyboard_report->mods & MOD_BIT(KC_LSFT))
|
||||||
|
|| (keyboard_report->mods & MOD_BIT(KC_RSFT))
|
||||||
|
|| (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK))) {
|
||||||
ergodox_right_led_1_on();
|
ergodox_right_led_1_on();
|
||||||
} else {
|
} else {
|
||||||
ergodox_right_led_1_off();
|
ergodox_right_led_1_off();
|
||||||
|
@ -451,4 +427,3 @@ void matrix_scan_user(void) {
|
||||||
ergodox_right_led_3_off();
|
ergodox_right_led_3_off();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Before Width: | Height: | Size: 97 KiB After Width: | Height: | Size: 96 KiB |
|
@ -1,24 +1,24 @@
|
||||||
[{x:3.5},"#\n3",{x:10.5},"*\n8"],
|
[{x:3.5},"#\n3",{x:10.5},"*\n8"],
|
||||||
[{y:-0.875,x:2.5},"@\n2",{x:1},"$\n4",{x:8.5},"&\n7",{x:1},"(\n9"],
|
[{y:-0.875,x:2.5},"@\n2",{x:1},"$\n4",{x:8.5},"&\n7",{x:1},"(\n9"],
|
||||||
[{y:-0.875,x:5.5},"%\n5",{c:"#ff4444"},"Esc",{x:4.5,c:"#cccccc"},"_\n\n\n\n\n\n-","^\n6"],
|
[{y:-0.875,x:5.5},"%\n5",{c:"#ff4444"},"Esc",{x:4.5,c:"#cccccc"},"_\n\n\n\n\n\n-","^\n6"],
|
||||||
[{y:-0.875,c:"#2277ff",w:1.5},"Special\n\n~\n\n\n\nShift\n`",{c:"#cccccc"},"!\n1",{x:14.5},")\n0",{c:"#2277ff",w:1.5},"+\n\nSpecial\n\n\n\n=\nShift"],
|
[{y:-0.875,c:"#c6c600",w:1.5},"Special\n\n~\n\n\n\nShift\n`",{c:"#cccccc"},"!\n1",{x:14.5},")\n0",{c:"#c6c600",w:1.5},"+\n\nSpecial\n\n\n\n=\nShift"],
|
||||||
[{y:-0.375,x:3.5,c:"#cccccc"},"E",{x:10.5},"I"],
|
[{y:-0.375,x:3.5,c:"#cccccc"},"E",{x:10.5},"I"],
|
||||||
[{y:-0.875,x:2.5},"W",{x:1},"R",{x:8.5},"U",{x:1},"O"],
|
[{y:-0.875,x:2.5},"W",{x:1},"R",{x:8.5},"U",{x:1},"O"],
|
||||||
[{y:-0.875,x:5.5},"T",{h:1.5},"{\n\n\n\n\n\n[",{x:4.5,h:1.5},"}\n\n\n\n\n\n]","Y"],
|
[{y:-0.875,x:5.5},"T",{h:1.5},"{\n\n\n\n\n\n[",{x:4.5,h:1.5},"}\n\n\n\n\n\n]","Y"],
|
||||||
[{y:-0.875,c:"#2277ff",w:1.5},"Media\n\nTab\n\n\n\nShift",{c:"#cccccc"},"Q",{x:14.5},"P",{c:"#2277ff",w:1.5},"|\n\\\nMedia\n\n\n\n\nShift"],
|
[{y:-0.875,c:"#c6c600",t:"#002299",w:1.5},"Media\n\nTab\n\n\n\nShift",{c:"#cccccc",t:"#000000"},"Q",{x:14.5},"P",{c:"#c6c600",t:"#002299",w:1.5},"|\n\\\nMedia\n\n\n\n\nShift"],
|
||||||
[{y:-0.375,x:3.5,c:"#cccccc"},"D",{x:10.5},"K"],
|
[{y:-0.375,x:3.5,c:"#cccccc",t:"#000000"},"D",{x:10.5},"K"],
|
||||||
[{y:-0.875,x:2.5},"S",{x:1},"F",{x:8.5},"J",{x:1},"L"],
|
[{y:-0.875,x:2.5},"S",{x:1},"F",{x:8.5},"J",{x:1},"L"],
|
||||||
[{y:-0.875,x:5.5},"G",{x:6.5},"H"],
|
[{y:-0.875,x:5.5},"G",{x:6.5},"H"],
|
||||||
[{y:-0.875,c:"#2277ff",w:1.5},"Symbols\n\n\n\n\n\nShift",{c:"#cccccc"},"A",{x:14.5},":\n;",{c:"#2277ff",w:1.5},"\"\n'\nSymbols\n\n\n\n\nShift"],
|
[{y:-0.875,c:"#c6c600",t:"#007d00",w:1.5},"Symbols\n\n\n\n\n\nShift",{c:"#cccccc",t:"#000000"},"A",{x:14.5},":\n;",{c:"#c6c600",t:"#007d00",w:1.5},"\"\n'\nSymbols\n\n\n\n\nShift"],
|
||||||
[{y:-0.625,x:6.5,c:"#54d6de",fa:[0,0,0,1],h:1.5},"< Tab\n\n\nShift Tab",{x:4.5,h:1.5},"Tab >\n\n\nTab"],
|
[{y:-0.625,x:6.5,c:"#ff8500",t:"#000000",fa:[0,0,0,1],h:1.5},"< Tab\n\n\nShift Tab",{x:4.5,h:1.5},"Tab >\n\n\nTab"],
|
||||||
[{y:-0.75,x:3.5,c:"#cccccc"},"C",{x:10.5},"<\n,"],
|
[{y:-0.75,x:3.5,c:"#cccccc"},"C",{x:10.5},"<\n,"],
|
||||||
[{y:-0.875,x:2.5},"X",{x:1},"V",{x:8.5},"M",{x:1},">\n."],
|
[{y:-0.875,x:2.5},"X",{x:1},"V",{x:8.5},"M",{x:1},">\n."],
|
||||||
[{y:-0.875,x:5.5},"B",{x:6.5},"N"],
|
[{y:-0.875,x:5.5},"B",{x:6.5},"N"],
|
||||||
[{y:-0.875,c:"#2277ff",w:1.5},"Capitals\n\n\n\n\n\nShift",{c:"#cccccc"},"Z",{x:14.5},"?\n/",{c:"#2277ff",w:1.5},"\n\nCapitals\n\n\n\n\nShift"],
|
[{y:-0.875,c:"#c6c600",t:"#9e0000",w:1.5},"Capitals\n\n\n\n\n\nShift",{c:"#cccccc",t:"#000000"},"Z",{x:14.5},"?\n/",{c:"#c6c600",t:"#9e0000",w:1.5},"\n\nCapitals\n\n\n\n\nShift"],
|
||||||
[{y:-0.375,x:3.5,c:"#77aaff"},"Option\n\n\nLAlt",{x:10.5},"Option\n\n\nRAlt"],
|
[{y:-0.375,x:3.5,c:"#dddd77",t:"#000000"},"Option\n\n\nLAlt",{x:10.5},"Option\n\n\nRAlt"],
|
||||||
[{y:-0.875,x:2.5},"Hyper",{x:1},"Cmd\n\n\nSuper",{x:8.5},"Cmd\n\n\nSuper",{x:1},"Hyper"],
|
[{y:-0.875,x:2.5},"Hyper",{x:1},"Cmd\n\n\nSuper",{x:8.5},"Cmd\n\n\nSuper",{x:1},"Hyper"],
|
||||||
[{y:-0.75,x:0.5},"Ctrl\n\n\nLCtrl","Meh",{x:14.5},"Meh","Ctrl\n\n\nRCtrl"],
|
[{y:-0.75,x:0.5},"Ctrl\n\n\nLCtrl","Meh",{x:14.5},"Meh","Ctrl\n\n\nRCtrl"],
|
||||||
[{r:30,rx:6.5,ry:4.25,y:-1,x:1,c:"#54d6de"},"Home","End"],
|
[{r:30,rx:6.5,ry:4.25,y:-1,x:1,c:"#ff8500"},"Home","End"],
|
||||||
[{h:2},"< Del\n\n\nBackspace",{h:2},"Del >\n\n\nDelete","Page\n\n\n\n\n\nUp"],
|
[{h:2},"< Del\n\n\nBackspace",{h:2},"Del >\n\n\nDelete","Page\n\n\n\n\n\nUp"],
|
||||||
[{x:2},"Page\n\n\n\n\n\nDown"],
|
[{x:2},"Page\n\n\n\n\n\nDown"],
|
||||||
[{r:-30,rx:13,y:-1,x:-3},"Left","Right"],
|
[{r:-30,rx:13,y:-1,x:-3},"Left","Right"],
|
||||||
|
|
Before Width: | Height: | Size: 121 KiB After Width: | Height: | Size: 120 KiB |
|
@ -1,27 +1,27 @@
|
||||||
[{x:3.5,c:"#99de2a"},"F13",{x:10.5},"F18"],
|
[{x:3.5,c:"#99de2a"},"F13",{x:10.5},"F18"],
|
||||||
[{y:-0.875,x:2.5},"F12",{x:1},"F14",{x:8.5},"F17",{x:1},"F19"],
|
[{y:-0.875,x:2.5},"F12",{x:1},"F14",{x:8.5},"F17",{x:1},"F19"],
|
||||||
[{y:-0.875,x:5.5},"F15",{c:"#ff4444"},"Esc",{x:4.5,c:"#737373",a:7},"",{c:"#99de2a",a:4},"F16"],
|
[{y:-0.875,x:5.5},"F15",{c:"#ff4444"},"Esc",{x:4.5,c:"#737373",a:7},"",{c:"#99de2a",a:4},"F16"],
|
||||||
[{y:-0.875,c:"#2277ff",w:1.5},"Special\n\n\n\n\n\nShift",{c:"#99de2a"},"F11",{x:14.5},"F20",{c:"#2277ff",w:1.5},"\n\nSpecial\n\n\n\n\nShift"],
|
[{y:-0.875,c:"#c6c600",w:1.5},"Shift\n\n\n\n\n\nLock",{c:"#99de2a"},"F11",{x:14.5},"F20",{c:"#c6c600",w:1.5},"\n\nShift\n\n\n\n\nLock"],
|
||||||
[{y:-0.375,x:3.5,c:"#ff8500"},"Mouse\n\n\n\n\n\nUp",{x:10.5},"Cursor\n\n\n\n\n\nUp"],
|
[{y:-0.375,x:3.5,c:"#0066cc"},"Mouse\n\n\n\n\n\nUp",{x:10.5},"Cursor\n\n\n\n\n\nUp"],
|
||||||
[{y:-0.875,x:2.5},"Mouse\n\n\n\n\n\nUpLeft",{x:1},"Mouse\n\n\n\n\n\nUpRgt",{x:8.5,c:"#ffb063"},"Home",{x:1},"Page\n\n\n\n\n\nUp"],
|
[{y:-0.875,x:2.5},"Mouse\n\n\n\n\n\nUpLeft",{x:1},"Mouse\n\n\n\n\n\nUpRgt",{x:8.5,c:"#1e8fff"},"Home",{x:1},"Page\n\n\n\n\n\nUp"],
|
||||||
[{y:-0.875,x:5.5,c:"#e6e067"},"Vol\n\n\n\n\n\nUp",{c:"#ffb063",h:1.5},"Scroll\n\n\n\n\n\nUp",{x:4.5,h:1.5},"Scroll\n\n\n\n\n\nUp",{c:"#e6e067"},"Print\n\n\n\n\n\nScreen"],
|
[{y:-0.875,x:5.5,c:"#9977ee"},"Vol\n\n\n\n\n\nUp",{c:"#1e8fff",h:1.5},"Scroll\n\n\n\n\n\nUp",{x:4.5,h:1.5},"Scroll\n\n\n\n\n\nUp",{c:"#9977ee"},"Print\n\n\n\n\n\nScreen"],
|
||||||
[{y:-0.875,c:"#000000",t:"#ff0000",w:1.5},"Media\n\n\n\n\n\nShift",{c:"#e6e067",t:"#000000"},"Shut\n\n\n\n\n\nDown",{x:14.5},"Mail",{c:"#000000",t:"#ff0000",w:1.5},"\n\nMedia\n\n\n\n\nShift"],
|
[{y:-0.875,c:"#000000",t:"#3f68ff",w:1.5},"Media\n\n\n\n\n\nShift",{c:"#9977ee",t:"#000000"},"Shut\n\n\n\n\n\nDown",{x:14.5},"Mail",{c:"#000000",t:"#3f68ff",w:1.5},"\n\nMedia\n\n\n\n\nShift"],
|
||||||
[{y:-0.375,x:3.5,c:"#ff8500",t:"#000000"},"Mouse\n\n\n\n\n\nDown",{x:10.5},"Cursor\n\n\n\n\n\nDown"],
|
[{y:-0.375,x:3.5,c:"#0066cc",t:"#000000"},"Mouse\n\n\n\n\n\nDown",{x:10.5},"Cursor\n\n\n\n\n\nDown"],
|
||||||
[{y:-0.875,x:2.5},"Mouse\n\n\n\n\n\nLeft",{x:1},"Mouse\n\n\n\n\n\nRight",{x:8.5},"Cursor\n\n\n\n\n\nLeft",{x:1},"Cursor\n\n\n\n\n\nRight"],
|
[{y:-0.875,x:2.5},"Mouse\n\n\n\n\n\nLeft",{x:1},"Mouse\n\n\n\n\n\nRight",{x:8.5},"Cursor\n\n\n\n\n\nLeft",{x:1},"Cursor\n\n\n\n\n\nRight"],
|
||||||
[{y:-0.875,x:5.5,c:"#e6e067"},"Vol\n\n\n\n\n\nDown",{x:6.5},"Num\n\n\n\n\n\nLock"],
|
[{y:-0.875,x:5.5,c:"#9977ee"},"Vol\n\n\n\n\n\nDown",{x:6.5},"Num\n\n\n\n\n\nLock"],
|
||||||
[{y:-0.875,c:"#2277ff",w:1.5},"Symbols\n\n\n\n\n\nShift",{c:"#e6e067"},"Sleep",{x:14.5},"My\n\n\n\n\n\nComp",{c:"#2277ff",w:1.5},"\n\nSymbols\n\n\n\n\nShift"],
|
[{y:-0.875,c:"#c6c600",t:"#007d00",w:1.5},"Symbols\n\n\n\n\n\nShift",{c:"#9977ee",t:"#000000"},"Sleep",{x:14.5},"My\n\n\n\n\n\nComp",{c:"#c6c600",t:"#007d00",w:1.5},"\n\nSymbols\n\n\n\n\nShift"],
|
||||||
[{y:-0.625,x:6.5,c:"#ffb063",h:1.5},"Scroll\n\n\n\n\n\nDown",{x:4.5,h:1.5},"Scroll\n\n\n\n\n\nDown"],
|
[{y:-0.625,x:6.5,c:"#1e8fff",t:"#000000",h:1.5},"Scroll\n\n\n\n\n\nDown",{x:4.5,h:1.5},"Scroll\n\n\n\n\n\nDown"],
|
||||||
[{y:-0.75,x:3.5,c:"#ff8500"},"Mouse\n\n\n\n\n\nDown",{x:10.5},"Cursor\n\n\n\n\n\nDown"],
|
[{y:-0.75,x:3.5,c:"#0066cc"},"Mouse\n\n\n\n\n\nDown",{x:10.5},"Cursor\n\n\n\n\n\nDown"],
|
||||||
[{y:-0.875,x:2.5},"Mouse\n\n\n\n\n\nDnLeft",{x:1},"Mouse\n\n\n\n\n\nDnRgt",{x:8.5,c:"#ffb063"},"End",{x:1},"Page\n\n\n\n\n\nDown"],
|
[{y:-0.875,x:2.5},"Mouse\n\n\n\n\n\nDnLeft",{x:1},"Mouse\n\n\n\n\n\nDnRgt",{x:8.5,c:"#1e8fff"},"End",{x:1},"Page\n\n\n\n\n\nDown"],
|
||||||
[{y:-0.875,x:5.5,c:"#e6e067"},"Mute",{x:6.5,c:"#737373",a:7},""],
|
[{y:-0.875,x:5.5,c:"#9977ee"},"Mute",{x:6.5,c:"#737373",a:7},""],
|
||||||
[{y:-0.875,c:"#2277ff",a:4,w:1.5},"Capitals\n\n\n\n\n\nShift",{c:"#737373",a:7},"",{x:14.5},"",{c:"#2277ff",a:4,w:1.5},"\n\nCapitals\n\n\n\n\nShift"],
|
[{y:-0.875,c:"#c6c600",t:"#9e0000",a:4,w:1.5},"Capitals\n\n\n\n\n\nShift",{c:"#737373",t:"#000000",a:7},"",{x:14.5},"",{c:"#c6c600",t:"#9e0000",a:4,w:1.5},"\n\nCapitals\n\n\n\n\nShift"],
|
||||||
[{y:-0.375,x:3.5,c:"#ff8500"},"Middle\n\n\n\n\n\nClick",{x:10.5,c:"#ffb063",fa:[0,0,0,1]},"Delete\n\n\nOption"],
|
[{y:-0.375,x:3.5,c:"#0066cc",t:"#000000"},"Middle\n\n\n\n\n\nClick",{x:10.5,c:"#1e8fff",fa:[0,0,0,1]},"Delete\n\n\nOption"],
|
||||||
[{y:-0.875,x:2.5,c:"#ff8500"},"Left\n\n\n\n\n\nClick",{x:1},"Right\n\n\n\n\n\nClick",{x:8.5,c:"#ffb063"},"Insert\n\n\nCmd",{x:1,c:"#77aaff"},"Hyper"],
|
[{y:-0.875,x:2.5,c:"#0066cc"},"Left\n\n\n\n\n\nClick",{x:1},"Right\n\n\n\n\n\nClick",{x:8.5,c:"#1e8fff"},"Insert\n\n\nCmd",{x:1,c:"#dddd77"},"Hyper"],
|
||||||
[{y:-0.75,x:0.5},"Ctrl\n\n\nLCtrl","Meh",{x:14.5},"Meh","Crtl\n\n\nRCtrl"],
|
[{y:-0.75,x:0.5},"Ctrl\n\n\nLCtrl","Meh",{x:14.5},"Meh","Crtl\n\n\nRCtrl"],
|
||||||
[{r:30,rx:6.5,ry:4.25,y:-1,x:1,c:"#ccbb00"},"Stop\n\n\nBrowser","Reload\n\n\nBrowser"],
|
[{r:30,rx:6.5,ry:4.25,y:-1,x:1,c:"#6633ee"},"Stop\n\n\nBrowser","Reload\n\n\nBrowser"],
|
||||||
[{h:2},"< Web\n\n\nBrowser",{h:2},"Web >\n\n\nBrowser","Search\n\n\nBrowser"],
|
[{h:2},"< Web\n\n\nBrowser",{h:2},"Web >\n\n\nBrowser","Search\n\n\nBrowser"],
|
||||||
[{x:2},"Home\n\n\nBrowser"],
|
[{x:2},"Home\n\n\nBrowser"],
|
||||||
[{r:-30,rx:13,y:-1,x:-3},"Prev\n\n\nAudio\n\n\nTrack","Next\n\n\nAudio\n\n\nTrack"],
|
[{r:-30,rx:13,y:-1,x:-3},"Prev\n\n\nAudio\n\n\nTrack","Next\n\n\nAudio\n\n\nTrack"],
|
||||||
[{x:-3,c:"#e6e067"},"Vol\n\n\n\n\n\nUp",{c:"#ccbb00",h:2},"Stop\n\n\nAudio",{h:2},"Play\n\n\nAudio\n\n\nPause"],
|
[{x:-3,c:"#9977ee"},"Vol\n\n\n\n\n\nUp",{c:"#6633ee",h:2},"Stop\n\n\nAudio",{h:2},"Play\n\n\nAudio\n\n\nPause"],
|
||||||
[{x:-3,c:"#e6e067"},"Vol\n\n\n\n\n\nDown"]
|
[{x:-3,c:"#9977ee"},"Vol\n\n\n\n\n\nDown"]
|
||||||
|
|
||||||
|
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 67 KiB |
|
@ -1,21 +1,21 @@
|
||||||
[{x:3.5,a:7},"",{x:10.5},""],
|
[{x:3.5,a:7},"",{x:10.5},""],
|
||||||
[{y:-0.875,x:2.5},"",{x:1},"",{x:8.5},"",{x:1},""],
|
[{y:-0.875,x:2.5},"",{x:1},"",{x:8.5},"",{x:1,a:4},"_\n\n\n\n\n\n-"],
|
||||||
[{y:-0.875,x:5.5},"",{c:"#ff4444",a:4},"Esc",{x:4.5,c:"#cccccc",a:7},"",""],
|
[{y:-0.875,x:5.5,a:7},"",{c:"#ff4444",a:4},"Esc",{x:4.5,c:"#cccccc",a:7},"",""],
|
||||||
[{y:-0.875,c:"#000000",t:"#ff0000",a:4,w:1.5},"Special\n\n\n\n\n\nShift",{c:"#ff4444",t:"#000000"},"Esc",{x:14.5,c:"#54d6de"},"Back\n\n\n\n\n\nspace",{c:"#000000",t:"#ff0000",w:1.5},"\n\nSpecial\n\n\n\n\nShift"],
|
[{y:-0.875,c:"#000000",t:"#ff0000",a:4,w:1.5},"Special\n\n\n\n\n\nShift",{c:"#ff4444",t:"#000000"},"Esc",{x:14.5,c:"#ff8500"},"Back\n\n\n\n\n\nspace",{c:"#000000",t:"#ff0000",w:1.5},"\n\nSpecial\n\n\n\n\nShift"],
|
||||||
|
[{y:-0.375,x:3.5,c:"#cccccc",t:"#000000",a:7},"",{x:10.5},""],
|
||||||
|
[{y:-0.875,x:2.5},"",{x:1},"",{x:8.5},"",{x:1,a:4},"{\n["],
|
||||||
|
[{y:-0.875,x:5.5,a:7},"",{h:1.5},"",{x:4.5,h:1.5},"",""],
|
||||||
|
[{y:-0.875,c:"#c6c600",t:"#002299",a:4,w:1.5},"Media\n\n\n\n\n\nLock",{c:"#cccccc",t:"#000000",a:7},"",{x:14.5,a:4},"\n\n}\n]",{c:"#c6c600",t:"#002299",w:1.5},"Media\n\n\n\n\n\nLock"],
|
||||||
[{y:-0.375,x:3.5,c:"#cccccc",t:"#000000",a:7},"",{x:10.5},""],
|
[{y:-0.375,x:3.5,c:"#cccccc",t:"#000000",a:7},"",{x:10.5},""],
|
||||||
[{y:-0.875,x:2.5},"",{x:1},"",{x:8.5},"",{x:1},""],
|
[{y:-0.875,x:2.5},"",{x:1},"",{x:8.5},"",{x:1},""],
|
||||||
[{y:-0.875,x:5.5},"",{h:1.5},"",{x:4.5,h:1.5},"",""],
|
|
||||||
[{y:-0.875,w:1.5},"","",{x:14.5},"",{w:1.5},""],
|
|
||||||
[{y:-0.375,x:3.5},"",{x:10.5},""],
|
|
||||||
[{y:-0.875,x:2.5},"",{x:1},"",{x:8.5},"",{x:1},""],
|
|
||||||
[{y:-0.875,x:5.5},"",{x:6.5},""],
|
[{y:-0.875,x:5.5},"",{x:6.5},""],
|
||||||
[{y:-0.875,w:1.5},"","",{x:14.5},"",{w:1.5},""],
|
[{y:-0.875,c:"#c6c600",t:"#007d00",a:4,w:1.5},"Symbols\n\n\n\n\n\nLock",{c:"#cccccc",t:"#000000",a:7},"",{x:14.5},"",{c:"#c6c600",t:"#007d00",a:4,w:1.5},"Symbols\n\n\n\n\n\nLock"],
|
||||||
[{y:-0.625,x:6.5,h:1.5},"",{x:4.5,h:1.5},""],
|
[{y:-0.625,x:6.5,c:"#cccccc",t:"#000000",a:7,h:1.5},"",{x:4.5,h:1.5},""],
|
||||||
[{y:-0.75,x:3.5},"",{x:10.5},""],
|
[{y:-0.75,x:3.5},"",{x:10.5},""],
|
||||||
[{y:-0.875,x:2.5},"",{x:1},"",{x:8.5},"",{x:1},""],
|
[{y:-0.875,x:2.5},"",{x:1},"",{x:8.5},"",{x:1},""],
|
||||||
[{y:-0.875,x:5.5},"",{x:6.5},""],
|
[{y:-0.875,x:5.5},"",{x:6.5},""],
|
||||||
[{y:-0.875,w:1.5},"","",{x:14.5},"",{c:"#2277ff",w:1.5},"RShift"],
|
[{y:-0.875,c:"#c6c600",t:"#9e0000",a:4,w:1.5},"Capitals\n\n\n\n\n\nLock",{c:"#cccccc",t:"#000000",a:7},"",{x:14.5},"",{c:"#c6c600",t:"#9e0000",a:4,w:1.5},"Capitals\n\n\n\n\n\nLock"],
|
||||||
[{y:-0.375,x:3.5,c:"#cccccc"},"",{x:10.5},""],
|
[{y:-0.375,x:3.5,c:"#cccccc",t:"#000000",a:7},"",{x:10.5},""],
|
||||||
[{y:-0.875,x:2.5},"",{x:1},"",{x:8.5},"",{x:1},""],
|
[{y:-0.875,x:2.5},"",{x:1},"",{x:8.5},"",{x:1},""],
|
||||||
[{y:-0.75,x:0.5},"","",{x:14.5},"",""],
|
[{y:-0.75,x:0.5},"","",{x:14.5},"",""],
|
||||||
[{r:30,rx:6.5,ry:4.25,y:-1,x:1},"",""],
|
[{r:30,rx:6.5,ry:4.25,y:-1,x:1},"",""],
|
||||||
|
|
Before Width: | Height: | Size: 101 KiB After Width: | Height: | Size: 99 KiB |
|
@ -1,24 +1,24 @@
|
||||||
[{x:3.5,c:"#99de2a"},"F3",{x:10.5},"F8"],
|
[{x:3.5,c:"#99de2a"},"F3",{x:10.5},"F8"],
|
||||||
[{y:-0.875,x:2.5},"F2",{x:1},"F4",{x:8.5},"F7",{x:1},"F9"],
|
[{y:-0.875,x:2.5},"F2",{x:1},"F4",{x:8.5},"F7",{x:1},"F9"],
|
||||||
[{y:-0.875,x:5.5},"F5",{c:"#ff4444"},"Esc",{x:4.5,c:"#bbddbb"},"_\n\n\n\n\n\n-",{c:"#99de2a"},"F6"],
|
[{y:-0.875,x:5.5},"F5",{c:"#ff4444"},"Esc",{x:4.5,c:"#bbddbb"},"_\n\n\n\n\n\n-",{c:"#99de2a"},"F6"],
|
||||||
[{y:-0.875,c:"#2277ff",w:1.5},"Special\n\n\n\n\n\nShift",{c:"#99de2a"},"F1",{x:14.5},"F10",{c:"#2277ff",w:1.5},"\n\nSpecial\n\n\n\n\nShift"],
|
[{y:-0.875,c:"#c6c600",w:1.5},"Shift\n\n\n\n\n\nLock",{c:"#99de2a"},"F1",{x:14.5},"F10",{c:"#c6c600",w:1.5},"\n\nShift\n\n\n\n\nLock"],
|
||||||
[{y:-0.375,x:3.5,c:"#bbddbb"},"{",{x:10.5,c:"#89b087"},"8"],
|
[{y:-0.375,x:3.5,c:"#bbddbb"},"{",{x:10.5,c:"#89b087"},"8"],
|
||||||
[{y:-0.875,x:2.5,c:"#bbddbb"},"@",{x:1},"}",{x:8.5,c:"#89b087"},"7",{x:1},"9"],
|
[{y:-0.875,x:2.5,c:"#bbddbb"},"@",{x:1},"}",{x:8.5,c:"#89b087"},"7",{x:1},"9"],
|
||||||
[{y:-0.875,x:5.5,c:"#bbddbb"},"&",{h:1.5},"<",{x:4.5,h:1.5},">","|"],
|
[{y:-0.875,x:5.5,c:"#bbddbb"},"&",{h:1.5},"<",{x:4.5,h:1.5},">","|"],
|
||||||
[{y:-0.875,c:"#2277ff",w:1.5},"Media\n\n\n\n\n\nShift",{c:"#bbddbb"},"!",{x:14.5,c:"#89b087"},"/",{c:"#2277ff",w:1.5},"\n\nMedia\n\n\n\n\nShift"],
|
[{y:-0.875,c:"#c6c600",t:"#002299",w:1.5},"Media\n\n\n\n\n\nShift",{c:"#bbddbb",t:"#000000"},"!",{x:14.5,c:"#89b087"},"/",{c:"#c6c600",t:"#002299",w:1.5},"\n\nMedia\n\n\n\n\nShift"],
|
||||||
[{y:-0.375,x:3.5,c:"#bbddbb"},"(",{x:10.5,c:"#89b087"},"5"],
|
[{y:-0.375,x:3.5,c:"#bbddbb",t:"#000000"},"(",{x:10.5,c:"#89b087"},"5"],
|
||||||
[{y:-0.875,x:2.5,c:"#bbddbb"},"$",{x:1},")",{x:8.5,c:"#89b087"},"4",{x:1},"6"],
|
[{y:-0.875,x:2.5,c:"#bbddbb"},"$",{x:1},")",{x:8.5,c:"#89b087"},"4",{x:1},"6"],
|
||||||
[{y:-0.875,x:5.5,c:"#bbddbb"},"`",{x:6.5},"/"],
|
[{y:-0.875,x:5.5,c:"#bbddbb"},"`",{x:6.5},"/"],
|
||||||
[{y:-0.875,c:"#000000",t:"#ff0000",w:1.5},"Symbols\n\n\n\n\n\nShift",{c:"#bbddbb",t:"#000000"},"#",{x:14.5,c:"#89b087"},"*",{c:"#000000",t:"#ff0000",w:1.5},"\n\nSymbols\n\n\n\n\nShift"],
|
[{y:-0.875,c:"#000000",t:"#007d00",w:1.5},"Symbols\n\n\n\n\n\nShift",{c:"#bbddbb",t:"#000000"},"#",{x:14.5,c:"#89b087"},"*",{c:"#000000",t:"#007d00",w:1.5},"\n\nSymbols\n\n\n\n\nShift"],
|
||||||
[{y:-0.625,x:6.5,c:"#54d6de",t:"#000000",fa:[0,0,0,1],h:1.5},"Tab >\n\n\nTab",{x:4.5,h:1.5},"< Tab\n\n\nShift Tab"],
|
[{y:-0.625,x:6.5,c:"#ff8500",t:"#000000",fa:[0,0,0,1],h:1.5},"Tab >\n\n\nTab",{x:4.5,h:1.5},"< Tab\n\n\nShift Tab"],
|
||||||
[{y:-0.75,x:3.5,c:"#bbddbb"},"[",{x:10.5,c:"#89b087"},"2"],
|
[{y:-0.75,x:3.5,c:"#bbddbb"},"[",{x:10.5,c:"#89b087"},"2"],
|
||||||
[{y:-0.875,x:2.5,c:"#bbddbb"},"^",{x:1},"]",{x:8.5,c:"#89b087"},"1",{x:1},"3"],
|
[{y:-0.875,x:2.5,c:"#bbddbb"},"^",{x:1},"]",{x:8.5,c:"#89b087"},"1",{x:1},"3"],
|
||||||
[{y:-0.875,x:5.5,c:"#bbddbb"},"~",{x:6.5},"\\"],
|
[{y:-0.875,x:5.5,c:"#bbddbb"},"~",{x:6.5},"\\"],
|
||||||
[{y:-0.875,c:"#2277ff",w:1.5},"Capitals\n\n\n\n\n\nShift",{c:"#bbddbb"},"%",{x:14.5,c:"#89b087"},"-",{c:"#2277ff",w:1.5},"\n\nCapitals\n\n\n\n\nShift"],
|
[{y:-0.875,c:"#c6c600",t:"#9e0000",w:1.5},"Capitals\n\n\n\n\n\nShift",{c:"#bbddbb",t:"#000000"},"%",{x:14.5,c:"#89b087"},"-",{c:"#c6c600",t:"#9e0000",w:1.5},"\n\nCapitals\n\n\n\n\nShift"],
|
||||||
[{y:-0.375,x:3.5,c:"#77aaff"},"Option\n\n\nLAlt",{x:10.5,c:"#89b087"},".\n\n\nOption"],
|
[{y:-0.375,x:3.5,c:"#dddd77",t:"#000000"},"Option\n\n\nLAlt",{x:10.5,c:"#89b087"},"."],
|
||||||
[{y:-0.875,x:2.5,c:"#77aaff"},"Hyper",{x:1},"Cmd\n\n\nSuper",{x:8.5,c:"#89b087"},"0\n\n\nCmd",{x:1},"=\n\n\nHyper"],
|
[{y:-0.875,x:2.5,c:"#dddd77"},"Hyper",{x:1},"Cmd\n\n\nSuper",{x:8.5,c:"#89b087"},"0",{x:1},"="],
|
||||||
[{y:-0.75,x:0.5,c:"#77aaff"},"Ctrl\n\n\nLCtrl","Meh",{x:14.5,c:"#89b087"},"+\n\n\nMeh","Enter\n\n\nCtrl"],
|
[{y:-0.75,x:0.5,c:"#dddd77"},"Ctrl\n\n\nLCtrl","Meh",{x:14.5,c:"#89b087"},"+","Enter"],
|
||||||
[{r:30,rx:6.5,ry:4.25,y:-1,x:1,c:"#54d6de"},"Left","Right"],
|
[{r:30,rx:6.5,ry:4.25,y:-1,x:1,c:"#ff8500"},"Left","Right"],
|
||||||
[{h:2},"Space",{h:2},"Enter","Up"],
|
[{h:2},"Space",{h:2},"Enter","Up"],
|
||||||
[{x:2},"Down"],
|
[{x:2},"Down"],
|
||||||
[{r:-30,rx:13,y:-1,x:-3},"Home","End"],
|
[{r:-30,rx:13,y:-1,x:-3},"Home","End"],
|
||||||
|
|
|
@ -10,66 +10,51 @@ no rights reserved, use for any purposes, credit me if you are a nice person
|
||||||
|
|
||||||
## The Base Layout ##
|
## The Base Layout ##
|
||||||
|
|
||||||
* The light blue keys are modifiers: traditional Control, Option, and Command keys, plus Hyper and Meh
|
* *White Keys* are all the normal characters and symbols in all the normal locations (except for the brackets).
|
||||||
* The dark blue keys are Shift keys: Capitals Shift (traditional shift), Symbol Shift, and Media Shift; plus a Shift Lock key
|
* *Modifier Keys* are light yellow and in the traditional location: Control, Option, Command, plus Hyper and Meh.
|
||||||
* Several dark blue keys double for entry of characters which would typically be in those locations
|
* *Shift Keys* are dark yellow, found on the outsides of the keyboard. Capitals Shift (traditional shift) is found in the usual place and above that is found Symbol Shift, Media Shift, and Special Shift (Shift Lock).
|
||||||
* The turquoise keys are text navigation and manipulation
|
* Several of the shift keys double for entry of characters which would typically be in those locations.
|
||||||
* The red keys is Escape and it is always found in that location no matter what
|
* *Thumb Keys* shown in orange are for text navigation and manipulation.
|
||||||
|
* *Escape* is red and it is always found in that location no matter what.
|
||||||
|
|
||||||
![Ordinary base layout](ordinary-base.png)
|
![Ordinary base layout](ordinary-base.png)
|
||||||
|
|
||||||
This layout puts the modifier keys along the bottom of the keyboard where they are on most keyboards. They are in the regular order, with the addition of Hyper and Meh keys. The modifier keys are all in the same place on all layers, although some layers also assign symbols on those buttons. On the outside edges are the Shift keys. The traditional shift key is called Capitals Shift and it is in the normal location. Above that are Symbols Shift and Media Shift. Each Shift key momentarily switches the layout to that layer, and if you use the Shift Lock button you can lock the layout to that layer.
|
The four big orange keys are arranged differently than in the default Ergodox EZ layout. The Ordinary Layout here copies the design of the old Fingerworks TouchStream keyboard, but also reflects the natural presumptions of the author -- me! I type the space character with my right hand, and to me it makes sense for the two delete keys to be next to one another.
|
||||||
|
|
||||||
Touch typists will also find tilde, tab, equals/plus, slash/pipe, and quote/double-quote sharing space on those Shift keys where they would probably be on a common keyboard. Other than the turquoise keys the only buttons which move to new locations are the Brackets and Dash and Escape. Most touch typists dont touch-type brackets or dash anyway so only Escape really requires retraining of muscle memory, and see below for the Special Escape Sequence.
|
|
||||||
|
|
||||||
The four big turquoise keys are arranged differently than in the default Ergodox EZ layout. The Ordinary Layout here copies the design of the old Fingerworks TouchStream keyboard, but also reflects the natural presumptions of the author -- me! I type the space character with my right hand, and to me it makes sense for the two delete keys to be next to one another.
|
|
||||||
|
|
||||||
The Forward Tab and Backward Tab keys are in their locations mostly because I ended up with two extra buttons and needed something to do with them. My muscle memory from using the Truly Ergonomic Keyboard makes me look for the Tab key with my right index finger, so it is handy to have this redundant Tab, and the idea with the Backward Tab key is that it becomes easy to navigate text fields in forms, or to indent/unindent code.
|
The Forward Tab and Backward Tab keys are in their locations mostly because I ended up with two extra buttons and needed something to do with them. My muscle memory from using the Truly Ergonomic Keyboard makes me look for the Tab key with my right index finger, so it is handy to have this redundant Tab, and the idea with the Backward Tab key is that it becomes easy to navigate text fields in forms, or to indent/unindent code.
|
||||||
|
|
||||||
## The Symbols Layer ##
|
## The Symbols Layer ##
|
||||||
|
|
||||||
* The light green keys are the eponymous symbols
|
* *Symbols* shown in light green. All kinds of brackets are available on this layer. Ampersand and Pipe justapose each other. Pipe, slash, and backslash are arranged in a column.
|
||||||
* The bright green keys are F-Keys
|
* *F-Keys* are bright green and overlay the row of numerals.
|
||||||
* The dark green keys constitute a number pad
|
* *Number pad* in dark green under the right hand includes all four arithmetic operations in the same order found on most number pads and features an Enter key. The keycodes emitted here are normal numeric keycodes, not the number-pad specific keycodes emitted by most number pads so that NumLock is not needed.
|
||||||
* The turquoise keys are the *reverse* of the turquoise keys on the base layer
|
* *Thumb keys* on this layer are the *reverse* of the orange keys on the base layer, with the keys either mirrored or shifted. This is powerful! Often I find myself using the mouse with my right hand, and the left hand needs to press Enter. Instead of reaching the left hand over to the right side of the keyboard, now I simply tap Symbols to reverse the turquoise keys, and Enter is right where it should be.
|
||||||
|
|
||||||
![Ordinary symbol layout](ordinary-symbol.png)
|
![Ordinary symbol layout](ordinary-symbol.png)
|
||||||
|
|
||||||
The Ergodox EZ ships with the "Coder Layer" which I like to call the Symbols layer. There are some significant improvements in The Ordinary Layout over the default layout.
|
The Symbols Layer is based on the Coder Layer from the default Ergodox EZ layout. I slightly rearranged the symbols, added some symbols, expanded the number pad, and straightened out the F-Keys. It's very handy to have the symbols directly underneath the normal typing keys.
|
||||||
|
|
||||||
The symbol keys are mostly the same as on the default layout, which did a good job in this regard, but with a few enhancements:
|
|
||||||
|
|
||||||
* Angle brackets on this layer mean that curly, square, and angle brackets are all available on different layers of the same two buttons. Also, they mean that all kinds of brackets, including parentheses, are available on both the Base and Symbols layers.
|
|
||||||
* The slash, backslash, and pipe characters are grouped together as a memory aid.
|
|
||||||
* The & and | symbols are juxtaposed as a memory aid
|
|
||||||
|
|
||||||
The number pad area here, in green, includes all four arithmetic operations in the same order found on most number pads and features an Enter key. The keycodes emitted here are normal numeric keycodes, not the number-pad specific keycodes emitted by most number pads, because this layout does not use a Num Lock key to switch the buttons between numeric keycodes and navigational keycodes. See the explanation in The Media Layout section about navigation using these same buttons.
|
|
||||||
|
|
||||||
Finally, consider the turquoise text-nav keys. Here in the Symbols layer, these are *reversed* from the base layer, with the keys either mirrored or shifted. This is powerful! Often I find myself using the mouse with my right hand, and the left hand needs to press Enter. Instead of reaching the left hand over to the right side of the keyboard, now I simply tap Symbols to reverse the turquoise keys, and Enter is right where it should be.
|
|
||||||
|
|
||||||
## The Media Layer ##
|
## The Media Layer ##
|
||||||
|
|
||||||
* The dark orange keys on the left move the mouse cursor
|
* *Mouse Cursor Keys* are under the left hand, shown in dark blue. Diagonal keys won't automatically repeat unless combined with other keys. Buttons to left- middle- and right-click the mouse are also featured.
|
||||||
* The dark orange keys on the right move the text cursor
|
* *Text Cursor Keys* are under the right hand, shown in dark blue. They overlay the numberpad from the Symbols Layer, such that in the Media Layer the same keys can be used as if they were a number pad in navigational mode (Num Lock off). For instance, in traditional number pads the '3' key became 'Page Down', and so it is here. This means a user can do text navigation without moving either hand.
|
||||||
* The light orange keys are for scrolling and paging
|
* *Scrolling and Paging* keys are shown in light blue and have some useful redundancy across the layout.
|
||||||
* The bright green keys are more F-keys
|
* Higher-order *F-Keys* are shown in bright green overylaying the numerals.
|
||||||
* The dark yellow keys signal Web and Audio applications
|
* *Application Keys* to control web browsers and audio players are dark purple but don't get too excited because these have weak support on operating systems I've looked at. Good luck.
|
||||||
* The light yellow keys signal the operating system
|
* The light purple keys are various operating system keys such as NumLock and Mute and a button to navigate to My Computer (usually your home dir).
|
||||||
* The dark gray keys do nothing in case you bump them by accident
|
* The dark gray keys do nothing in case you bump them by accident
|
||||||
|
|
||||||
![Ordinary media layout](ordinary-media.png)
|
![Ordinary media layout](ordinary-media.png)
|
||||||
|
|
||||||
This layer was inspired by the Media layer on the Ergodox EZ but takes it farther. The Fingerworks TouchStream keyboard had a very useful feature for controlling the text cursor easily and this layer does something similar. The left hand can move the mouse, the right hand moves the text cursor, in all four directions, in small or large increments. This greatly enhances navigation in text documents.
|
This layer is a substantial extension of the Media layer on the Ergodox EZ default layout. The Fingerworks TouchStream keyboard had a very useful feature for controlling the text cursor easily and this layer does something similar. The left hand can move the mouse, the right hand moves the text cursor, in all four directions, in small or large increments. This greatly enhances navigation in text documents.
|
||||||
|
|
||||||
Moreover, the orange keys on the right overlay the numberpad from the Symbols Layer, such that in the Media Layer the same keys can be used as if they were a number pad in navigational mode (Num Lock off). For instance, in traditional number pads the '3' key became 'Page Down', and so it is here. This means a user can do text navigation without moving either hand.
|
Keys to directly interact with the operating system are also found on this layer, such as volume and shutdown.
|
||||||
|
|
||||||
Alas, the yellow keys have at best spotty success with common software. Good luck with those but don't expect too much.
|
|
||||||
|
|
||||||
## Switching Between Layers ##
|
## Switching Between Layers ##
|
||||||
|
|
||||||
In addition to Symbols and Media there is the Capitals layer which is exactly the same as pressing the shift key. Each layer is accessed by a shift key on each edge of the keyboard and corresponds to one of the three LEDs on the keyboard: Capitals (red), Symbols (green), Media (blue). The color of a layer illuminates when the layer is active.
|
In addition to Symbols and Media there is the Capitals layer which is exactly the same as pressing the shift key. Each layer is accessed by a shift key on each edge of the keyboard and corresponds to one of the three LEDs on the keyboard: Capitals (red), Symbols (green), Media (blue). The color of a layer illuminates when the layer is active.
|
||||||
|
|
||||||
Shift buttons work in the expected way: press them and all of the keys switch to that layer; release them and the keys switch back to the base layer. If you press both of a pair of shift keys, the layer will lock on until you press both shift keys again. For instance, the widely and rightly loathed Caps Lock is engaged by pressing both Capitals Shift buttons. All the Shift keys work this way.
|
Shift buttons work in the expected way: press them and all of the keys switch to that layer; release them and the keys switch back to the base layer. Lock the shift keys using the Shift Lock button, which is the same as the Special Shift button.
|
||||||
|
|
||||||
Multiple layers can be turned on at once. The Capitals layer will affect characters on other layers to capitalize. Other layers, however, don't 'mix': Symbols blankets the base layout; Media blankets Symbols.
|
Multiple layers can be turned on at once. The Capitals layer will affect characters on other layers to capitalize. Other layers, however, don't 'mix': Symbols blankets the base layout; Media blankets Symbols.
|
||||||
|
|
||||||
|
@ -77,27 +62,29 @@ Multiple layers can be turned on at once. The Capitals layer will affect charact
|
||||||
|
|
||||||
![Ordinary special layout](ordinary-special.png)
|
![Ordinary special layout](ordinary-special.png)
|
||||||
|
|
||||||
|
The Special Shift layer is mostly used to lock the shift keys but in order to make this layout more _ordinary_ there are a few special sequences which put some keys near their most common traditional locations.
|
||||||
|
|
||||||
### Escape ###
|
### Escape ###
|
||||||
|
|
||||||
The One True Location for the Escape key is segregated way up on the top left of the keyboard. The Ergodox does not have a physical button in such a location and the nearest one is home to the tilde (er, grave) which is commonly found there. In the Ordinary layout the Escape key is found on all layers in the prominent location in the corner next to the 5, whnich is easy to remember, and yet it isn't natural for those of us with muscle memory flicking our wrists up and to the left looking for Escape.
|
The One True Location for the Escape key is segregated way up on the top left of the keyboard. The Ergodox does not have a physical button in such a location and the nearest one is home to the tilde (er, grave) which is commonly found there. In the Ordinary layout the Escape key is found on all layers in the prominent location in the corner next to the 5, which is easy to remember, and yet it isn't natural for those of us with muscle memory flicking our wrists up and to the left looking for Escape.
|
||||||
|
|
||||||
The Ordinary layout offers as a consolation prize a Special sequence for Escape: Special Shift + 1. This is natural so you can tap the top left button, then the button next to it and get Escape. This gesture works in all layers.
|
The Ordinary layout offers as a consolation prize a Special sequence for Escape: Special Shift + 1. This is natural so you can tap the top left button, then the button next to it and get Escape. This gesture works in all layers.
|
||||||
|
|
||||||
### Backspace ###
|
### Backspace ###
|
||||||
|
|
||||||
At the top right corner of the Ergodox EZ you can a gesture similar to the special Escape sequence, using the 0 key, to produce a Backspace. Users of this keyboard and this layout are well advised to learn to use their thumbs for deleting text, but sometimes you are doing other computery things and just want to flick your digits up to the right and press backspace a bunch times.
|
At the top right corner of the Ergodox EZ you can a gesture similar to the special Escape sequence using the 0 key to produce a Backspace. Users of this keyboard and this layout are well advised to learn to use their thumbs for deleting text, but sometimes you are doing other computery things and just want to flick your digits up to the right and press backspace a bunch times.
|
||||||
|
|
||||||
### RShift ###
|
### Other Characters ###
|
||||||
|
|
||||||
The Ordinary Layout locks layers by pressing both of a pair of shift keys. This interferes with the QMK firmware magic sequence, which is LShift+RShift. To work around this, both of the Capitals Shift keys produce a *Left Shift* keystroke. If for some reason a person needs *Right Shift* they can find it by pressing a Special Shift key, then the Capitals Shift key on the right side of the keyboard.
|
The Escape and Backspace special sequences are so useful why not have a few more? You can find dash under 9, left bracket under o, and right bracket under p. That's pretty much all the characters from the top right corner of the keyboard which moved to make room for the columnar layout.
|
||||||
|
|
||||||
****
|
****
|
||||||
|
|
||||||
The Ordinary Layout for the Ergodox EZ keyboard, v4
|
The Ordinary Layout for the Ergodox EZ keyboard, v4.20
|
||||||
|
|
||||||
Modifications from default by Nicholas Keene ergodoxez@nicholaskeene.com
|
Modifications from default by Nicholas Keene ergodoxez@nicholaskeene.com
|
||||||
|
|
||||||
No rights reserved. This software is in the public domain. Credit me if you are friendly but if you're a jerk don't bother.
|
No rights reserved. This software is in the public domain. Credit me if you are friendly but if you're a jerk don't bother.
|
||||||
|
|
||||||
Details: readme.md
|
Details: readme.md
|
||||||
https://github.com/nrrkeene/qmk_firmware/tree/master/keyboard/ergodox_ez/keymaps/ordinary
|
https://github.com/nrrkeene/qmk_firmware/tree/master/keyboards/ergodox/keymaps/ordinary
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
/*
|
/*
|
||||||
* PLEASE NOTE: This keymap will NOT work with the Infinity ErgoDox due to the fact that the mappings are
|
|
||||||
* based on the Matrix Layout in the ez.h file. If you want to use this for the infinity, you'll need to
|
|
||||||
* figure out where the keys are in the matrix and redo the layout arrays below.
|
|
||||||
*
|
|
||||||
* About this keymap:
|
* About this keymap:
|
||||||
*
|
*
|
||||||
* The Dvorak layout shown herestems from my early Kinesis years, using the Contour PS/2 with a Dvorak
|
* The Dvorak layout shown herestems from my early Kinesis years, using the Contour PS/2 with a Dvorak
|
||||||
|
@ -15,9 +11,6 @@
|
||||||
* I've enabled persistent keymaps for Qwerty, Dvorak and Colemak layers, similar to the default Planck
|
* I've enabled persistent keymaps for Qwerty, Dvorak and Colemak layers, similar to the default Planck
|
||||||
* layouts.
|
* layouts.
|
||||||
*
|
*
|
||||||
* For a better explanation of the layout matrices shown below, take a look at ../../ez/ez.h where the
|
|
||||||
* keymap is defined, beginning on line 81.
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "ergodox.h"
|
#include "ergodox.h"
|
||||||
|
@ -38,213 +31,222 @@ extern keymap_config_t keymap_config;
|
||||||
#define QWERTY M(_QW)
|
#define QWERTY M(_QW)
|
||||||
#define COLEMAK M(_CM)
|
#define COLEMAK M(_CM)
|
||||||
|
|
||||||
|
// Fillers to make layering more clear
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
#define XXXXXXX KC_NO
|
||||||
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
[_DV] = { // layer 0 : Dvorak
|
/* Layer 0 : Dvorak
|
||||||
/*
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
* | ] | 1 | 2 | 3 | 4 | 5 | ESC | | ESC | 6 | 7 | 8 | 9 | 0 | [ |
|
||||||
* | ] | 1 | 2 | 3 | 4 | 5 | ESC | | ESC | 6 | 7 | 8 | 9 | 0 | [ |
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
* | Tab | ' | , | . | P | Y | | | | F | G | C | R | L | \ |
|
||||||
* | Tab | ' | , | . | Y | Y | | | | F | G | C | R | L | \ |
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
* | CapsLk | A | O | E | U | I |------| |------| D | H | T | N | S | - |
|
||||||
* | CapsLk | A | O | E | U | I |------| |------| D | H | T | N | S | - |
|
* |--------+------+------+------+------+------| _MD | | _KP |------+------+------+------+------+--------|
|
||||||
* |--------+------+------+------+------+------| _MD | | _KP |------+------+------+------+------+--------|
|
* | LShift | ; | Q | J | K | X | | | | B | M | W | V | Z | RShift |
|
||||||
* | LShift | Z | X | C | V | X | | | | B | M | W | V | Z | RShift |
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
* | LGUI | ` | INS | Left | Rght | | Up | Dn | / | = | RGUI |
|
||||||
* | LGUI | ` | INS | Left | Rght | | Up | Dn | / | = | RGUI |
|
* `----------------------------------' `----------------------------------'
|
||||||
* `----------------------------------' `----------------------------------'
|
* ,-------------. ,-------------.
|
||||||
* ,-------------. ,-------------.
|
* | LCTL | LALT | | RALT | RCTL |
|
||||||
* | LCtr | LAlt | | Ralt | RCtr |
|
* ,------|------|------| |------+------+------.
|
||||||
* ,------|------|------| |------+------+------.
|
* | | | Home | | PgUp | | |
|
||||||
* | | | Home | | PgUp | | |
|
* | BkSp | Del |------| |------| Enter| Space|
|
||||||
* | BkSp | Del |------| |------| Enter| Space|
|
* | | | End | | PgDn | | |
|
||||||
* | | | End | | PgDn | | |
|
* `--------------------' `--------------------'
|
||||||
* `--------------------' `--------------------'
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
[_DV] = KEYMAP(
|
||||||
// left hand
|
// left hand
|
||||||
{KC_RBRC, KC_TAB, KC_CAPS, KC_LSFT, KC_LGUI, KC_NO },
|
KC_RBRC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC,
|
||||||
{KC_1, KC_QUOT, KC_A, KC_SCLN, KC_GRV, KC_END },
|
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, XXXXXXX,
|
||||||
{KC_2, KC_COMM, KC_O, KC_Q, KC_INS, KC_DEL },
|
KC_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I,
|
||||||
{KC_3, KC_DOT, KC_E, KC_J, KC_LEFT, KC_BSPC},
|
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, MO(_MD),
|
||||||
{KC_4, KC_P, KC_U, KC_K, KC_RGHT, KC_HOME},
|
KC_LGUI, KC_GRV, KC_INS, KC_LEFT, KC_RGHT,
|
||||||
{KC_5, KC_Y, KC_I, KC_X, KC_NO, KC_LCTL},
|
KC_LCTL, KC_LALT,
|
||||||
{KC_ESC, KC_NO, KC_NO, MO(_MD), KC_NO, KC_LALT},
|
KC_HOME,
|
||||||
|
KC_BSPC, KC_DEL, KC_END,
|
||||||
// right hand
|
// right hand
|
||||||
{KC_ESC, KC_NO, KC_NO, MO(_KP), KC_NO, KC_RALT},
|
KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC,
|
||||||
{KC_6, KC_F, KC_D, KC_B, KC_NO, KC_RCTL},
|
XXXXXXX, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSLS,
|
||||||
{KC_7, KC_G, KC_H, KC_M, KC_UP, KC_PGUP},
|
KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS,
|
||||||
{KC_8, KC_C, KC_T, KC_W, KC_DOWN, KC_SPC },
|
MO(_KP), KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT,
|
||||||
{KC_9, KC_R, KC_N, KC_V, KC_SLSH, KC_ENT },
|
KC_UP, KC_DOWN, KC_SLSH, KC_EQL, KC_RGUI,
|
||||||
{KC_0, KC_L, KC_S, KC_Z, KC_EQL, KC_PGDN},
|
KC_RALT, KC_RCTL,
|
||||||
{KC_LBRC, KC_BSLS, KC_MINS, KC_RSFT, KC_RGUI, KC_NO }
|
KC_PGUP,
|
||||||
},
|
KC_PGDN, KC_ENT, KC_SPC
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
[_QW] = { // layer 1 : QWERTY
|
/* Layer 1: QWERTY
|
||||||
/*
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
* | = | 1 | 2 | 3 | 4 | 5 | ESC | | ESC | 6 | 7 | 8 | 9 | 0 | - |
|
||||||
* | = | 1 | 2 | 3 | 4 | 5 | ESC | | ESC | 6 | 7 | 8 | 9 | 0 | - |
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
* | Tab | Q | W | E | R | T | | | | Y | U | I | O | P | \ |
|
||||||
* | Tab | Q | W | E | R | T | | | | Y | U | I | O | P | \ |
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
* | CapsLk | A | S | D | F | G |------| |------| H | J | K | L | ; | ' |
|
||||||
* | CapsLk | A | S | D | F | G |------| |------| H | J | K | L | ; | ' |
|
* |--------+------+------+------+------+------| _MD | | _KP |------+------+------+------+------+--------|
|
||||||
* |--------+------+------+------+------+------| _MD | | _KP |------+------+------+------+------+--------|
|
* | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift |
|
||||||
* | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift |
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
* | LGUI | ` | INS | Left | Rght | | Up | Dn | / | = | RGUI |
|
||||||
* | LGUI | ` | INS | Left | Rght | | Up | Dn | [ | ] | RGUI |
|
* `----------------------------------' `----------------------------------'
|
||||||
* `----------------------------------' `----------------------------------'
|
* ,-------------. ,-------------.
|
||||||
* ,-------------. ,-------------.
|
* | LCTL | LALT | | RALT | RCTL |
|
||||||
* | LCtr | LAlt | | Ralt | RCtr |
|
* ,------|------|------| |------+------+------.
|
||||||
* ,------|------|------| |------+------+------.
|
* | | | Home | | PgUp | | |
|
||||||
* | | | Home | | PgUp | | |
|
* | BkSp | Del |------| |------| Enter| Space|
|
||||||
* | BkSp | Del |------| |------| Enter| Space|
|
* | | | End | | PgDn | | |
|
||||||
* | | | End | | PgDn | | |
|
* `--------------------' `--------------------'
|
||||||
* `--------------------' `--------------------'
|
|
||||||
*/
|
*/
|
||||||
|
[_QW] = KEYMAP(
|
||||||
// left hand
|
// left hand
|
||||||
{KC_EQL, KC_TAB, KC_CAPS, KC_LSFT, KC_LGUI, KC_NO },
|
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT,
|
||||||
{KC_1, KC_Q, KC_A, KC_Z, KC_GRV, KC_END },
|
KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, XXXXXXX,
|
||||||
{KC_2, KC_W, KC_S, KC_X, KC_INS, KC_DEL },
|
KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||||
{KC_3, KC_E, KC_D, KC_C, KC_LEFT, KC_BSPC},
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(_MD),
|
||||||
{KC_4, KC_R, KC_F, KC_V, KC_RGHT, KC_HOME},
|
KC_LGUI, KC_GRV, KC_INS, KC_LEFT, KC_RGHT,
|
||||||
{KC_5, KC_T, KC_G, KC_B, KC_NO, KC_LCTL},
|
KC_LCTL, KC_LALT,
|
||||||
{KC_ESC, KC_NO, KC_NO, MO(_MD), KC_NO, KC_LALT},
|
KC_HOME,
|
||||||
|
KC_BSPC, KC_DEL, KC_END,
|
||||||
// right hand
|
// right hand
|
||||||
{KC_ESC, KC_NO, KC_NO, MO(_KP), KC_NO, KC_RALT},
|
KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||||
{KC_6, KC_Y, KC_H, KC_N, KC_NO, KC_RCTL},
|
XXXXXXX, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||||
{KC_7, KC_U, KC_J, KC_M, KC_UP, KC_PGUP},
|
KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||||
{KC_8, KC_I, KC_K, KC_COMM, KC_DOWN, KC_SPC },
|
MO(_KP), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
||||||
{KC_9, KC_O, KC_L, KC_DOT, KC_LBRC, KC_ENT },
|
KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, KC_RGUI,
|
||||||
{KC_0, KC_P, KC_SCLN, KC_SLSH, KC_RBRC, KC_PGDN},
|
KC_LALT, KC_LCTL,
|
||||||
{KC_MINS, KC_BSLS, KC_QUOT, KC_RSFT, KC_RGUI, KC_NO }
|
KC_PGUP,
|
||||||
},
|
KC_PGDN, KC_ENT, KC_SPC
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
[_CM] = { // layer 2 : Colemak
|
/* Layer 2 : Colemak
|
||||||
/*
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
* | = | 1 | 2 | 3 | 4 | 5 | ESC | | ESC | 6 | 7 | 8 | 9 | 0 | - |
|
||||||
* | = | 1 | 2 | 3 | 4 | 5 | ESC | | ESC | 6 | 7 | 8 | 9 | 0 | - |
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
* | Tab | Q | W | F | P | G | | | | J | L | U | Y | ; | \ |
|
||||||
* | Tab | Q | W | F | P | G | | | | J | L | U | Y | ; | \ |
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
* | BkSpc | A | R | S | T | D |------| |------| H | N | E | I | O | ' |
|
||||||
* | BkSpc | A | R | S | T | D |------| |------| H | N | E | I | O | ' |
|
* |--------+------+------+------+------+------| _MD | | _KP |------+------+------+------+------+--------|
|
||||||
* |--------+------+------+------+------+------| _MD | | _KP |------+------+------+------+------+--------|
|
* | LShift | Z | X | C | V | B | | | | K | M | , | . | / | RShift |
|
||||||
* | LShift | Z | X | C | V | B | | | | K | M | , | . | / | RShift |
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
* | LGUI | ` | INS | Left | Rght | | Up | Dn | / | = | RGUI |
|
||||||
* | LGUI | ` | INS | Left | Rght | | Up | Dn | [ | ] | RGUI |
|
* `----------------------------------' `----------------------------------'
|
||||||
* `----------------------------------' `----------------------------------'
|
* ,-------------. ,-------------.
|
||||||
* ,-------------. ,-------------.
|
* | LCTL | LALT | | RALT | RCTL |
|
||||||
* | LCtr | LAlt | | Ralt | RCtr |
|
* ,------|------|------| |------+------+------.
|
||||||
* ,------|------|------| |------+------+------.
|
* | | | Home | | PgUp | | |
|
||||||
* | | | Home | | PgUp | | |
|
* | BkSp | Del |------| |------| Enter| Space|
|
||||||
* | BkSp | Del |------| |------| Enter| Space|
|
* | | | End | | PgDn | | |
|
||||||
* | | | End | | PgDn | | |
|
* `--------------------' `--------------------'
|
||||||
* `--------------------' `--------------------'
|
|
||||||
*/
|
*/
|
||||||
|
[_CM] = KEYMAP(
|
||||||
// left hand
|
// left hand
|
||||||
{KC_EQL, KC_TAB, KC_BSPC, KC_LSFT, KC_LGUI, KC_NO },
|
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT,
|
||||||
{KC_1, KC_Q, KC_A, KC_Z, KC_GRV, KC_END },
|
KC_DELT, KC_Q, KC_W, KC_F, KC_P, KC_G, XXXXXXX,
|
||||||
{KC_2, KC_W, KC_R, KC_X, KC_INS, KC_DEL },
|
KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D,
|
||||||
{KC_3, KC_F, KC_S, KC_C, KC_LEFT, KC_BSPC},
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(_MD),
|
||||||
{KC_4, KC_P, KC_T, KC_V, KC_RGHT, KC_HOME},
|
KC_LGUI, KC_GRV, KC_INS, KC_LEFT, KC_RGHT,
|
||||||
{KC_5, KC_G, KC_D, KC_B, KC_NO, KC_LCTL},
|
KC_LCTL, KC_LALT,
|
||||||
{KC_ESC, KC_NO, KC_NO, MO(_MD), KC_NO, KC_LALT},
|
KC_HOME,
|
||||||
|
KC_BSPC, KC_DEL, KC_END,
|
||||||
// right hand
|
// right hand
|
||||||
{KC_ESC, KC_NO, KC_NO, MO(_KP), KC_NO, KC_RALT},
|
KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||||
{KC_6, KC_J, KC_H, KC_K, KC_NO, KC_RCTL},
|
XXXXXXX, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS,
|
||||||
{KC_7, KC_L, KC_N, KC_M, KC_UP, KC_PGUP},
|
KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
|
||||||
{KC_8, KC_U, KC_E, KC_COMM, KC_DOWN, KC_SPC },
|
MO(_KP), KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
||||||
{KC_9, KC_Y, KC_I, KC_DOT, KC_LBRC, KC_ENT },
|
KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, KC_RGUI,
|
||||||
{KC_0, KC_SCLN, KC_O, KC_SLSH, KC_RBRC, KC_PGDN},
|
KC_LALT, KC_LCTL,
|
||||||
{KC_MINS, KC_BSLS, KC_QUOT, KC_RSFT, KC_RGUI, KC_NO }
|
KC_PGUP,
|
||||||
},
|
KC_PGDN, KC_ENT, KC_SPC
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
[_MD] = { // layer 3 : Media layer
|
/* Layer 3 : Media layer
|
||||||
/*
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
* | TEENSY | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | F10 | |
|
||||||
* | TEENSY | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | F10 | |
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
* | | | PrSc | ScLk | Paus | | | | | | Mute | Vol- | Vol+ | | |
|
||||||
* | | | PrSc | ScLk | Paus | | | | | | Mute | Vol- | Vol+ | | |
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
* | | | | | | |------| |------| Stop | Prev | Play | Next | Sel | |
|
||||||
* | | | | | | |------| |------| Stop | Prev | Play | Next | Sel | |
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
* | | |Dvorak|Qwerty|Colemk| | | | | | | | | | |
|
||||||
* | | |Dvorak|Qwerty|Colemk| | | | | | | | | | |
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
* | | | | | | | | | | | |
|
||||||
* | | | | | | | | | | | |
|
* `----------------------------------' `----------------------------------'
|
||||||
* `----------------------------------' `----------------------------------'
|
* ,-------------. ,-------------.
|
||||||
* ,-------------. ,-------------.
|
* | | | | | |
|
||||||
* | | | | | |
|
* ,------|------|------| |------+------+------.
|
||||||
* ,------|------|------| |------+------+------.
|
* | | | | | | | |
|
||||||
* | | | | | | | |
|
* | | |------| |------| | |
|
||||||
* | | |------| |------| | |
|
* | | | | | | | |
|
||||||
* | | | | | | | |
|
* `--------------------' `--------------------'
|
||||||
* `--------------------' `--------------------'
|
|
||||||
*/
|
*/
|
||||||
|
[_MD] = KEYMAP(
|
||||||
// left hand
|
// left hand
|
||||||
{RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO },
|
RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11,
|
||||||
{KC_F1, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
|
_______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______,
|
||||||
{KC_F2, KC_PSCR, KC_TRNS, DVORAK, KC_TRNS, KC_TRNS},
|
_______, _______, _______, _______, _______, _______,
|
||||||
{KC_F3, KC_SLCK, KC_TRNS, QWERTY, KC_TRNS, KC_TRNS},
|
_______, _______, DVORAK, QWERTY, COLEMAK, _______, _______,
|
||||||
{KC_F4, KC_PAUS, KC_TRNS, COLEMAK, KC_TRNS, KC_TRNS},
|
_______, _______, _______, _______, _______,
|
||||||
{KC_F5, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS},
|
_______, _______,
|
||||||
{KC_F11, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_TRNS},
|
_______,
|
||||||
|
_______, _______, _______,
|
||||||
// right hand
|
// right hand
|
||||||
{KC_F12, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_TRNS},
|
KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______,
|
||||||
{KC_F6, KC_TRNS, KC_MSTP, KC_TRNS, KC_NO, KC_TRNS},
|
_______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______,
|
||||||
{KC_F7, KC_MUTE, KC_MPRV, KC_TRNS, KC_TRNS, KC_TRNS},
|
KC_MSTP, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSEL, _______,
|
||||||
{KC_F8, KC_VOLD, KC_MPLY, KC_TRNS, KC_TRNS, KC_TRNS},
|
_______, _______, _______, _______, _______, _______, _______,
|
||||||
{KC_F9, KC_VOLU, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS},
|
_______, _______, _______, _______, _______,
|
||||||
{KC_F10, KC_TRNS, KC_MSEL, KC_TRNS, KC_TRNS, KC_TRNS},
|
_______, _______,
|
||||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO }
|
_______,
|
||||||
},
|
_______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
[_KP] = { // layer 4 : Keypad layer
|
/* Layer 4 : Keypad layer
|
||||||
/*
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
* | Power | | | | | | | | | | NmLk | KP = | KP / | KP * | |
|
||||||
* | Power | | | | | | | | | | NmLk | KP / | KP * | KP - | |
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
* | Sleep | | | | | | | | | | KP 7 | KP 8 | KP 9 | KP - | |
|
||||||
* | Sleep | | | | | | | | | | KP 7 | KP 8 | KP 9 | KP + | |
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
* | Wake | | | | | |------| |------| | KP 4 | KP 5 | KP 6 | KP + | |
|
||||||
* | Wake | | | | | |------| |------| | KP 4 | KP 5 | KP 6 | KP + | |
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
* | | | | | | | | | | | KP 1 | KP 2 | KP 3 |KP Ent| |
|
||||||
* | | | | | | | | | | | KP 1 | KP 2 | KP 3 |KP Ent| |
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
* | | | | | | | KP 0 | | KP . |KP Ent| |
|
||||||
* | | | | | | | KP 0 | | KP . |KP Ent| |
|
* `----------------------------------' `----------------------------------'
|
||||||
* `----------------------------------' `----------------------------------'
|
* ,-------------. ,-------------.
|
||||||
* ,-------------. ,-------------.
|
* | | | | | |
|
||||||
* | | | | | |
|
* ,------|------|------| |------+------+------.
|
||||||
* ,------|------|------| |------+------+------.
|
* | | | | | | | |
|
||||||
* | | | | | | | |
|
* | | |------| |------| | |
|
||||||
* | | |------| |------| | |
|
* | | | | | | | |
|
||||||
* | | | | | | | |
|
* `--------------------' `--------------------'
|
||||||
* `--------------------' `--------------------'
|
|
||||||
*/
|
*/
|
||||||
|
[_KP] = KEYMAP(
|
||||||
// left hand
|
// left hand
|
||||||
{KC_PWR, KC_SLEP, KC_WAKE, KC_TRNS, KC_TRNS, KC_NO },
|
KC_PWR, _______, _______, _______, _______, _______, _______,
|
||||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
|
KC_SLEP, _______, _______, _______, _______, _______, _______,
|
||||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
|
KC_WAKE, _______, _______, _______, _______, _______,
|
||||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
|
_______, _______, _______, _______, _______, _______, _______,
|
||||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
|
_______, _______, _______, _______, _______,
|
||||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS},
|
_______, _______,
|
||||||
{KC_TRNS, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_TRNS},
|
_______,
|
||||||
|
_______, _______, _______,
|
||||||
// right hand
|
// right hand
|
||||||
{KC_TRNS, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_TRNS},
|
_______, _______, KC_NLCK, KC_PEQL, KC_PSLS, KC_PAST, _______,
|
||||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS},
|
_______, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, _______,
|
||||||
{KC_NLCK, KC_P7, KC_P4, KC_P1, KC_P0, KC_TRNS},
|
_______, KC_P4, KC_P5, KC_P6, KC_PPLS, _______,
|
||||||
{KC_PSLS, KC_P8, KC_P5, KC_P2, KC_NO, KC_TRNS},
|
_______, _______, KC_P1, KC_P2, KC_P3, KC_PENT, _______,
|
||||||
{KC_PAST, KC_P9, KC_P6, KC_P3, KC_PDOT, KC_TRNS},
|
KC_P0, _______, KC_PDOT, KC_PENT, _______,
|
||||||
{KC_PMNS, KC_PPLS, KC_PPLS, KC_PENT, KC_PENT, KC_TRNS},
|
_______, _______,
|
||||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO }
|
_______,
|
||||||
},
|
_______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
# Xyverz's ErgoDox EZ Keymap
|
# Xyverz's ErgoDox EZ Keymap
|
||||||
|
|
||||||
## Please Note:
|
|
||||||
|
|
||||||
This keymap will probably **not** work with the Infinity ErgoDox. It will need **substantial** modification in order to work on the Infinity. This is due to the fact that the mappings are based on the matrix positions in the keymap definition in the ez.h file. If you want to use this for the infinity, you'll need to figure out where the keys are in the matrix and redo the layout arrays below.
|
|
||||||
|
|
||||||
## About this keymap:
|
## About this keymap:
|
||||||
|
|
||||||
The Dvorak layout shown herestems from my early Kinesis years, using the Contour PS/2 with a Dvorak software layout. Because of this, the RBRC and LBRC were on opposite sides of the board in the corner keys. I've decided to continue using this layout with my ErgoDox.
|
The Dvorak layout shown herestems from my early Kinesis years, using the Contour PS/2 with a Dvorak software layout. Because of this, the RBRC and LBRC were on opposite sides of the board in the corner keys. I've decided to continue using this layout with my ErgoDox.
|
||||||
|
@ -12,7 +8,11 @@ The QWERTY layout shown here is based entirely on the Kinesis Advantage layout,
|
||||||
|
|
||||||
I've enabled persistent keymaps for Qwerty, Dvorak and Colemak layers, similar to the default Planck layouts.
|
I've enabled persistent keymaps for Qwerty, Dvorak and Colemak layers, similar to the default Planck layouts.
|
||||||
|
|
||||||
For a better explanation of the layout matrices shown below, take a look at ../../ez/ez.h where the keymap is defined, beginning on line 81.
|
## Still to do:
|
||||||
|
|
||||||
|
* Need to figure out a better position for the ESC key.
|
||||||
|
* Come up with a function for the empty keys shown in the alpha layers below.
|
||||||
|
* Fix the CapsLock, NumLock, and ScrLck LEDs.
|
||||||
|
|
||||||
### Layer 0: Dvorak layer
|
### Layer 0: Dvorak layer
|
||||||
|
|
||||||
|
@ -103,9 +103,9 @@ For a better explanation of the layout matrices shown below, take a look at ../.
|
||||||
### Keymap 4: Keypad layer
|
### Keymap 4: Keypad layer
|
||||||
|
|
||||||
,--------------------------------------------------.,--------------------------------------------------.
|
,--------------------------------------------------.,--------------------------------------------------.
|
||||||
| Power | | | | | | || | | NmLk | KP / | KP * | KP - | |
|
| Power | | | | | | || | | NmLk | KP = | KP / | KP * | |
|
||||||
|--------+------+------+------+------+-------------||------+------+------+------+------+------+--------|
|
|--------+------+------+------+------+-------------||------+------+------+------+------+------+--------|
|
||||||
| Sleep | | | | | | || | | KP 7 | KP 8 | KP 9 | KP + | |
|
| Sleep | | | | | | || | | KP 7 | KP 8 | KP 9 | KP - | |
|
||||||
|--------+------+------+------+------+------| || |------+------+------+------+------+--------|
|
|--------+------+------+------+------+------| || |------+------+------+------+------+--------|
|
||||||
| Wake | | | | | |------||------| | KP 4 | KP 5 | KP 6 | KP + | |
|
| Wake | | | | | |------||------| | KP 4 | KP 5 | KP 6 | KP + | |
|
||||||
|--------+------+------+------+------+------| || |------+------+------+------+------+--------|
|
|--------+------+------+------+------+------| || |------+------+------+------+------+--------|
|
||||||
|
|
77
keyboards/kitten_paw/Makefile
Normal file
|
@ -0,0 +1,77 @@
|
||||||
|
|
||||||
|
|
||||||
|
# MCU name
|
||||||
|
#MCU = at90usb1287
|
||||||
|
MCU = atmega32u2
|
||||||
|
|
||||||
|
# Processor frequency.
|
||||||
|
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||||
|
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||||
|
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||||
|
# automatically to create a 32-bit value in your source code.
|
||||||
|
#
|
||||||
|
# This will be an integer division of F_USB below, as it is sourced by
|
||||||
|
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||||
|
# does not *change* the processor frequency - it should merely be updated to
|
||||||
|
# reflect the processor speed set externally so that the code can use accurate
|
||||||
|
# software delays.
|
||||||
|
F_CPU = 16000000
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# LUFA specific
|
||||||
|
#
|
||||||
|
# Target architecture (see library "Board Types" documentation).
|
||||||
|
ARCH = AVR8
|
||||||
|
|
||||||
|
# Input clock frequency.
|
||||||
|
# This will define a symbol, F_USB, in all source code files equal to the
|
||||||
|
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||||
|
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||||
|
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||||
|
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||||
|
# at the end, this will be done automatically to create a 32-bit value in your
|
||||||
|
# source code.
|
||||||
|
#
|
||||||
|
# If no clock division is performed on the input clock inside the AVR (via the
|
||||||
|
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||||
|
F_USB = $(F_CPU)
|
||||||
|
|
||||||
|
# Interrupt driven control endpoint task(+60)
|
||||||
|
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||||
|
|
||||||
|
|
||||||
|
# Boot Section Size in *bytes*
|
||||||
|
# Teensy halfKay 512
|
||||||
|
# Teensy++ halfKay 1024
|
||||||
|
# Atmel DFU loader 4096
|
||||||
|
# LUFA bootloader 4096
|
||||||
|
# USBaspLoader 2048
|
||||||
|
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||||
|
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE ?= yes # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE ?= yes # Commands for debug and configuration
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE ?= no # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default
|
||||||
|
MIDI_ENABLE ?= no # MIDI controls
|
||||||
|
UNICODE_ENABLE ?= no # Unicode
|
||||||
|
BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
AUDIO_ENABLE ?= no # Audio output on port C6
|
||||||
|
|
||||||
|
CUSTOM_MATRIX = yes
|
||||||
|
SRC += matrix.c led.c
|
||||||
|
|
||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../Makefile
|
||||||
|
endif
|
||||||
|
|
162
keyboards/kitten_paw/config.h
Normal file
|
@ -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 0x6050
|
||||||
|
#define DEVICE_VER 0x0104
|
||||||
|
#define MANUFACTURER Costar
|
||||||
|
#define PRODUCT Majestouch
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 8
|
||||||
|
#define MATRIX_COLS 18
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Keyboard Matrix Assignments
|
||||||
|
*
|
||||||
|
* Change this to how you wired your keyboard
|
||||||
|
* COLS: AVR pins used for columns, left to right
|
||||||
|
* ROWS: AVR pins used for rows, top to bottom
|
||||||
|
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||||
|
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
//#define MATRIX_ROW_PINS { D0, D5 }
|
||||||
|
//#define MATRIX_COL_PINS { F1, F0, B0 }
|
||||||
|
//#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* COL2ROW or ROW2COL */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
// #define BACKLIGHT_PIN B7
|
||||||
|
// #define BACKLIGHT_BREATHING
|
||||||
|
// #define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
|
|
||||||
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
|
#define DEBOUNCING_DELAY 5
|
||||||
|
|
||||||
|
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||||
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
|
/* number of backlight levels */
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Force NKRO
|
||||||
|
*
|
||||||
|
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
|
||||||
|
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
|
||||||
|
* makefile for this to work.)
|
||||||
|
*
|
||||||
|
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
|
||||||
|
* until the next keyboard reset.
|
||||||
|
*
|
||||||
|
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
|
||||||
|
* fully operational during normal computer usage.
|
||||||
|
*
|
||||||
|
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
|
||||||
|
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
|
||||||
|
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
|
||||||
|
* power-up.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
//#define FORCE_NKRO
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Magic Key Options
|
||||||
|
*
|
||||||
|
* Magic keys are hotkey commands that allow control over firmware functions of
|
||||||
|
* the keyboard. They are best used in combination with the HID Listen program,
|
||||||
|
* found here: https://www.pjrc.com/teensy/hid_listen.html
|
||||||
|
*
|
||||||
|
* The options below allow the magic key functionality to be changed. This is
|
||||||
|
* useful if your keyboard/keypad is missing keys and you want magic key support.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* key combination for magic key command */
|
||||||
|
#define IS_COMMAND() ( \
|
||||||
|
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||||
|
)
|
||||||
|
|
||||||
|
/* control how magic key switches layers */
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
|
||||||
|
|
||||||
|
/* override magic key keymap */
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
|
||||||
|
//#define MAGIC_KEY_HELP1 H
|
||||||
|
//#define MAGIC_KEY_HELP2 SLASH
|
||||||
|
//#define MAGIC_KEY_DEBUG D
|
||||||
|
//#define MAGIC_KEY_DEBUG_MATRIX X
|
||||||
|
//#define MAGIC_KEY_DEBUG_KBD K
|
||||||
|
//#define MAGIC_KEY_DEBUG_MOUSE M
|
||||||
|
//#define MAGIC_KEY_VERSION V
|
||||||
|
//#define MAGIC_KEY_STATUS S
|
||||||
|
//#define MAGIC_KEY_CONSOLE C
|
||||||
|
//#define MAGIC_KEY_LAYER0_ALT1 ESC
|
||||||
|
//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
|
||||||
|
//#define MAGIC_KEY_LAYER0 0
|
||||||
|
//#define MAGIC_KEY_LAYER1 1
|
||||||
|
//#define MAGIC_KEY_LAYER2 2
|
||||||
|
//#define MAGIC_KEY_LAYER3 3
|
||||||
|
//#define MAGIC_KEY_LAYER4 4
|
||||||
|
//#define MAGIC_KEY_LAYER5 5
|
||||||
|
//#define MAGIC_KEY_LAYER6 6
|
||||||
|
//#define MAGIC_KEY_LAYER7 7
|
||||||
|
//#define MAGIC_KEY_LAYER8 8
|
||||||
|
//#define MAGIC_KEY_LAYER9 9
|
||||||
|
//#define MAGIC_KEY_BOOTLOADER PAUSE
|
||||||
|
//#define MAGIC_KEY_LOCK CAPS
|
||||||
|
//#define MAGIC_KEY_EEPROM E
|
||||||
|
//#define MAGIC_KEY_NKRO N
|
||||||
|
//#define MAGIC_KEY_SLEEP_LED Z
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Feature disable options
|
||||||
|
* These options are also useful to firmware size reduction.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* disable debug print */
|
||||||
|
//#define NO_DEBUG
|
||||||
|
|
||||||
|
/* disable print */
|
||||||
|
//#define NO_PRINT
|
||||||
|
|
||||||
|
/* disable action features */
|
||||||
|
//#define NO_ACTION_LAYER
|
||||||
|
//#define NO_ACTION_TAPPING
|
||||||
|
//#define NO_ACTION_ONESHOT
|
||||||
|
//#define NO_ACTION_MACRO
|
||||||
|
//#define NO_ACTION_FUNCTION
|
||||||
|
|
||||||
|
#endif
|
51
keyboards/kitten_paw/keymaps/default/keymap.c
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
#include "kitten_paw.h"
|
||||||
|
|
||||||
|
enum layers {
|
||||||
|
DEFAULT,
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[DEFAULT] = KEYMAP(\
|
||||||
|
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,KC_SLCK,KC_PAUS, \
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,KC_MINS, KC_EQL,KC_BSPC, KC_INS,KC_HOME,KC_PGUP, KC_NLCK,KC_PSLS,KC_PAST,KC_PMNS, \
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,KC_LBRC,KC_RBRC,KC_BSLS, KC_DEL, KC_END,KC_PGDN, KC_P7, KC_P8, KC_P9,KC_PPLS, \
|
||||||
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L,KC_SCLN,KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, \
|
||||||
|
KC_LSFT,KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM, KC_DOT,KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3,KC_PENT, \
|
||||||
|
KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,KC_MENU,KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT, KC_P0,KC_PDOT)
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||||
|
{
|
||||||
|
// MACRODOWN only works in this function
|
||||||
|
switch(id) {
|
||||||
|
case 0:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
} else {
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return MACRO_NONE;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
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) {
|
||||||
|
|
||||||
|
}
|
30
keyboards/kitten_paw/kitten_paw.c
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
#include "kitten_paw.h"
|
||||||
|
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
// put your keyboard start-up code here
|
||||||
|
// runs once when the firmware starts up
|
||||||
|
|
||||||
|
matrix_init_quantum();
|
||||||
|
matrix_init_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_kb(void) {
|
||||||
|
// put your looping keyboard code here
|
||||||
|
// runs every cycle (a lot)
|
||||||
|
|
||||||
|
matrix_scan_quantum();
|
||||||
|
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);
|
||||||
|
}
|
47
keyboards/kitten_paw/kitten_paw.h
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
#ifndef KITTEN_PAW_H
|
||||||
|
#define KITTEN_PAW_H
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
// This a shortcut to help you visually see your layout.
|
||||||
|
// The first section contains all of the arguements
|
||||||
|
// The second converts the arguments into a two-dimensional array
|
||||||
|
/*
|
||||||
|
Matrix col/row mapping
|
||||||
|
|
||||||
|
,----. ,-------------------. ,-------------------. ,-------------------. ,--------------.
|
||||||
|
| J6 | | I4 | H4 | H2 | H6 | | A7 | E6 | D2 | D4 | | B4 | B7 | B6 | B0 | | C7 | C5 | A5 |
|
||||||
|
`----' `-------------------' `-------------------' `-------------------' `--------------'
|
||||||
|
,-------------------------------------------------------------------------. ,--------------. ,-------------------.
|
||||||
|
| J4 | J7 | I7 | H7 | G7 | G4 | F4 | F7 | E7 | D7 | R7 | R4 | E4 | B2 | | L4 | O4 | Q4 | | K1 | L1 | Q1 | Q0 |
|
||||||
|
|-------------------------------------------------------------------------| |--------------| |-------------------|
|
||||||
|
| J2 | J5 | I5 | H5 | G5 | G2 | F2 | F5 | E5 | D5 | R5 | R2 | E2 | B3 | | K4 | O7 | Q7 | | K5 | L5 | Q5 | O5 |
|
||||||
|
|-------------------------------------------------------------------------| '--------------' |-------------- |
|
||||||
|
| O5 | J3 | I3 | H3 | G3 | G6 | F6 | F3 | E3 | D3 | R3 | R6 | B1 | | K2 | L2 | Q2 | |
|
||||||
|
|-------------------------------------------------------------------------| ,----. |-------------------|
|
||||||
|
| N2 | J1 | I1 | H1 | G1 | G0 | F0 | F1 | E1 | D1 | R0 | N3 | | O6 | | K3 | L3 | Q3 | O3 |
|
||||||
|
|-------------------------------------------------------------------------| ,--------------. |-------------- |
|
||||||
|
| A4 | P2 | C6 | K6 | C0 | M3 | D0 | A1 | | O0 | K0 | L0 | | L6 | Q6 | |
|
||||||
|
`-------------------------------------------------------------------------' `--------------' `-------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define KEYMAP( \
|
||||||
|
KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \
|
||||||
|
KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KL4, KO4, KQ4, KK1, KL1, KQ1, KQ0, \
|
||||||
|
KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, KK5, KL5, KQ5, KO5, \
|
||||||
|
KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, KK2, KL2, KQ2, \
|
||||||
|
KN2, KI6, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, KK3, KL3, KQ3, KO3, \
|
||||||
|
KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0, KL6, KQ6 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{KC_NO, KB0, KC0, KD0,KC_NO, KF0, KG0,KC_NO,KC_NO,KC_NO, KK0, KL0,KC_NO,KC_NO, KO0,KC_NO, KQ0, KR0}, \
|
||||||
|
{ KA1, KB1,KC_NO, KD1, KE1, KF1, KG1, KH1, KI1, KJ1, KK1, KL1,KC_NO,KC_NO,KC_NO,KC_NO, KQ1,KC_NO}, \
|
||||||
|
{KC_NO, KB2,KC_NO, KD2, KE2, KF2, KG2, KH2, KI2, KJ2, KK2, KL2,KC_NO, KN2,KC_NO, KP2, KQ2, KR2}, \
|
||||||
|
{KC_NO, KB3,KC_NO, KD3, KE3, KF3, KG3, KH3, KI3, KJ3, KK3, KL3, KM3, KN3, KO3,KC_NO, KQ3, KR3}, \
|
||||||
|
{ KA4, KB4,KC_NO, KD4, KE4, KF4, KG4, KH4, KI4, KJ4, KK4, KL4,KC_NO,KC_NO, KO4,KC_NO, KQ4, KR4}, \
|
||||||
|
{ KA5,KC_NO, KC5, KD5, KE5, KF5, KG5, KH5, KI5, KJ5, KK5, KL5,KC_NO,KC_NO, KO5,KC_NO, KQ5, KR5}, \
|
||||||
|
{KC_NO, KB6, KC6,KC_NO, KE6, KF6, KG6, KH6, KI6, KJ6, KK6, KL6,KC_NO,KC_NO, KO6,KC_NO, KQ6, KR6}, \
|
||||||
|
{ KA7, KB7, KC7, KD7, KE7, KF7, KG7, KH7, KI7, KJ7,KC_NO,KC_NO,KC_NO,KC_NO, KO7,KC_NO, KQ7, KR7} \
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
47
keyboards/kitten_paw/led.c
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
/*
|
||||||
|
Copyright 2014 Ralf Schmitt <ralf@bunkertor.net>
|
||||||
|
|
||||||
|
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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <avr/io.h>
|
||||||
|
#include "stdint.h"
|
||||||
|
#include "led.h"
|
||||||
|
|
||||||
|
/* LED pin configuration
|
||||||
|
*
|
||||||
|
* Scroll Lock PC5
|
||||||
|
* Caps Lock PC6
|
||||||
|
* Num Lock PB7
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
void led_set(uint8_t usb_led) {
|
||||||
|
DDRB |= (1<<7);
|
||||||
|
DDRC |= (1<<5) | (1<<6);
|
||||||
|
|
||||||
|
if (usb_led & (1<<USB_LED_CAPS_LOCK))
|
||||||
|
PORTC &= ~(1<<6);
|
||||||
|
else
|
||||||
|
PORTC |= (1<<6);
|
||||||
|
|
||||||
|
if (usb_led & (1<<USB_LED_NUM_LOCK))
|
||||||
|
PORTB &= ~(1<<7);
|
||||||
|
else
|
||||||
|
PORTB |= (1<<7);
|
||||||
|
|
||||||
|
if (usb_led & (1<<USB_LED_SCROLL_LOCK))
|
||||||
|
PORTC &= ~(1<<5);
|
||||||
|
else
|
||||||
|
PORTC |= (1<<5);
|
||||||
|
}
|
164
keyboards/kitten_paw/matrix.c
Normal file
|
@ -0,0 +1,164 @@
|
||||||
|
/*
|
||||||
|
Copyright 2014 Ralf Schmitt <ralf@bunkertor.net>
|
||||||
|
|
||||||
|
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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <avr/io.h>
|
||||||
|
#include <util/delay.h>
|
||||||
|
#include "print.h"
|
||||||
|
#include "debug.h"
|
||||||
|
#include "util.h"
|
||||||
|
#include "matrix.h"
|
||||||
|
|
||||||
|
#ifndef DEBOUNCING_DELAY
|
||||||
|
# define DEBOUNCING_DELAY 5
|
||||||
|
#endif
|
||||||
|
static uint8_t debouncing = DEBOUNCING_DELAY;
|
||||||
|
|
||||||
|
static matrix_row_t matrix[MATRIX_ROWS];
|
||||||
|
static matrix_row_t matrix_debouncing[MATRIX_ROWS];
|
||||||
|
|
||||||
|
static uint8_t read_rows(void);
|
||||||
|
static void select_col(uint8_t col);
|
||||||
|
|
||||||
|
inline uint8_t matrix_rows(void) {
|
||||||
|
return MATRIX_ROWS;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline uint8_t matrix_cols(void) {
|
||||||
|
return MATRIX_COLS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Column pin configuration
|
||||||
|
*
|
||||||
|
* col: 0 1 2 3 4 5 6 7
|
||||||
|
* pin: PC7 PD5 PD3 PD1 PC2 PD6 PD4 PD2
|
||||||
|
*
|
||||||
|
* Rrr pin configuration
|
||||||
|
*
|
||||||
|
* These rrrs uses one 74HC154 4 to 16 bit demultiplexer (low
|
||||||
|
* active), together with 2 rrrs driven directly from the micro
|
||||||
|
* controller, to control the 18 rrrs. The rrrs are driven from
|
||||||
|
* pins B6,5,4,3,2,1,0.
|
||||||
|
*/
|
||||||
|
void matrix_init(void) {
|
||||||
|
DDRC &= ~0b10000100; // Row input pins
|
||||||
|
DDRD &= ~0b01111110;
|
||||||
|
PORTC |= 0b10000100;
|
||||||
|
PORTD |= 0b01111110;
|
||||||
|
|
||||||
|
DDRB |= 0b01111111; // Column output pins
|
||||||
|
|
||||||
|
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
|
||||||
|
matrix[i] = 0;
|
||||||
|
matrix_debouncing[i] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t matrix_scan(void) {
|
||||||
|
for (uint8_t col = 0; col < MATRIX_COLS; col++) {
|
||||||
|
select_col(col);
|
||||||
|
_delay_us(3);
|
||||||
|
uint8_t rows = read_rows();
|
||||||
|
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
||||||
|
bool prev_bit = matrix_debouncing[row] & ((matrix_row_t)1<<col);
|
||||||
|
bool curr_bit = rows & (1<<row);
|
||||||
|
if (prev_bit != curr_bit) {
|
||||||
|
matrix_debouncing[row] ^= ((matrix_row_t)1<<col);
|
||||||
|
debouncing = DEBOUNCING_DELAY;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (debouncing) {
|
||||||
|
if (--debouncing) {
|
||||||
|
_delay_ms(1);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||||
|
matrix[i] = matrix_debouncing[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool matrix_is_modified(void) {
|
||||||
|
if (debouncing)
|
||||||
|
return false;
|
||||||
|
else
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline bool matrix_is_on(uint8_t row, uint8_t col) {
|
||||||
|
return (matrix[row] & ((matrix_row_t)1<<col));
|
||||||
|
}
|
||||||
|
|
||||||
|
inline matrix_row_t matrix_get_row(uint8_t row) {
|
||||||
|
return matrix[row];
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_print(void) {
|
||||||
|
print("\nr/c 0123456789ABCDEF\n");
|
||||||
|
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
||||||
|
xprintf("%02X: %032lb\n", row, bitrev32(matrix_get_row(row)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t matrix_key_count(void) {
|
||||||
|
uint8_t count = 0;
|
||||||
|
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||||
|
count += bitpop32(matrix[i]);
|
||||||
|
}
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|
||||||
|
static uint8_t read_rows(void) {
|
||||||
|
return
|
||||||
|
(PINC&(1<<7) ? 0 : (1<<0)) |
|
||||||
|
(PIND&(1<<5) ? 0 : (1<<1)) |
|
||||||
|
(PIND&(1<<3) ? 0 : (1<<2)) |
|
||||||
|
(PIND&(1<<1) ? 0 : (1<<3)) |
|
||||||
|
(PINC&(1<<2) ? 0 : (1<<4)) |
|
||||||
|
(PIND&(1<<2) ? 0 : (1<<5)) |
|
||||||
|
(PIND&(1<<4) ? 0 : (1<<6)) |
|
||||||
|
(PIND&(1<<6) ? 0 : (1<<7));
|
||||||
|
}
|
||||||
|
|
||||||
|
static void select_col(uint8_t col) {
|
||||||
|
switch (col) {
|
||||||
|
case 0: PORTB = (PORTB & ~0b01111111) | 0b01100100; break;
|
||||||
|
case 1: PORTB = (PORTB & ~0b01111111) | 0b01101100; break;
|
||||||
|
case 2: PORTB = (PORTB & ~0b01111111) | 0b01100010; break;
|
||||||
|
case 3: PORTB = (PORTB & ~0b01111111) | 0b01111010; break;
|
||||||
|
case 4: PORTB = (PORTB & ~0b01111111) | 0b01100110; break;
|
||||||
|
case 5: PORTB = (PORTB & ~0b01111111) | 0b01110110; break;
|
||||||
|
case 6: PORTB = (PORTB & ~0b01111111) | 0b01101110; break;
|
||||||
|
case 7: PORTB = (PORTB & ~0b01111111) | 0b01111110; break;
|
||||||
|
case 8: PORTB = (PORTB & ~0b01111111) | 0b01000001; break;
|
||||||
|
case 9: PORTB = (PORTB & ~0b01111111) | 0b00100001; break;
|
||||||
|
case 10: PORTB = (PORTB & ~0b01111111) | 0b01101010; break;
|
||||||
|
case 11: PORTB = (PORTB & ~0b01111111) | 0b01110010; break;
|
||||||
|
case 12: PORTB = (PORTB & ~0b01111111) | 0b01111100; break;
|
||||||
|
case 13: PORTB = (PORTB & ~0b01111111) | 0b01110100; break;
|
||||||
|
case 14: PORTB = (PORTB & ~0b01111111) | 0b01111000; break;
|
||||||
|
case 15: PORTB = (PORTB & ~0b01111111) | 0b01110000; break;
|
||||||
|
case 16: PORTB = (PORTB & ~0b01111111) | 0b01100000; break;
|
||||||
|
case 17: PORTB = (PORTB & ~0b01111111) | 0b01101000; break;
|
||||||
|
}
|
||||||
|
}
|
32
keyboards/kitten_paw/readme.md
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
kitten_paw keyboard firmware
|
||||||
|
======================
|
||||||
|
This is the firmware for the 2016 revision of the Kitten Paw controller by Bathroom Epiphanies.
|
||||||
|
Most of the boilerplate code is the work of [BathroomEpiphanies](https://github.com/BathroomEpiphanies).
|
||||||
|
|
||||||
|
NKRO doesn't work at the moment, I don't know if I will take the time to find out how to fix this, so far 6KRO is enough for me.
|
||||||
|
|
||||||
|
## Quantum MK Firmware
|
||||||
|
|
||||||
|
For the full Quantum feature list, see [the parent readme.md](/doc/readme.md).
|
||||||
|
|
||||||
|
## Building
|
||||||
|
|
||||||
|
Download or clone the whole firmware and navigate to the keyboards/kitten_paw folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file.
|
||||||
|
|
||||||
|
Depending on which keymap you would like to use, you will have to compile slightly differently.
|
||||||
|
|
||||||
|
### Default
|
||||||
|
|
||||||
|
To build with the default keymap, simply run `make`.
|
||||||
|
|
||||||
|
### Other Keymaps
|
||||||
|
|
||||||
|
Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files.
|
||||||
|
|
||||||
|
To build the firmware binary hex file with a keymap just do `make` with `keymap` option like:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ make keymap=[default|jack|<name>]
|
||||||
|
```
|
||||||
|
|
||||||
|
Keymaps follow the format **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/`
|
|
@ -16,6 +16,7 @@ AUDIO_ENABLE = no # Audio output on port C6
|
||||||
UNICODE_ENABLE = no # Unicode
|
UNICODE_ENABLE = no # Unicode
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
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.
|
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||||
|
ONEHAND_ENABLE = yes # Enable one-hand typing
|
||||||
|
|
||||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|
|
@ -70,7 +70,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
{KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
|
{KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
|
||||||
{KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
|
{KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
|
||||||
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
|
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
|
||||||
{KC_LEAD, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
{KC_LEAD, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_FN0, KC_FN0, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||||
},
|
},
|
||||||
|
|
||||||
/* Colemak
|
/* Colemak
|
||||||
|
@ -88,7 +88,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
{KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC},
|
{KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC},
|
||||||
{KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT},
|
{KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT},
|
||||||
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
|
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
|
||||||
{KC_LEAD, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
{KC_LEAD, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_FN0, KC_FN0, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||||
},
|
},
|
||||||
|
|
||||||
/* Dvorak
|
/* Dvorak
|
||||||
|
@ -106,7 +106,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
{KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC},
|
{KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC},
|
||||||
{KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH},
|
{KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH},
|
||||||
{KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT },
|
{KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT },
|
||||||
{KC_LEAD, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
{KC_LEAD, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_FN0, KC_FN0, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||||
},
|
},
|
||||||
|
|
||||||
/* Lower
|
/* Lower
|
||||||
|
@ -186,7 +186,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint16_t PROGMEM fn_actions[] = {
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
ACTION_SWAP_HANDS_TAP_KEY(KC_SPC),
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef AUDIO_ENABLE
|
#ifdef AUDIO_ENABLE
|
||||||
|
|
|
@ -1,5 +1,15 @@
|
||||||
#include "planck.h"
|
#include "planck.h"
|
||||||
|
|
||||||
|
#ifdef ONEHAND_ENABLE
|
||||||
|
__attribute__ ((weak))
|
||||||
|
const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
{{11, 0}, {10, 0}, {9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}},
|
||||||
|
{{11, 1}, {10, 1}, {9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}},
|
||||||
|
{{11, 2}, {10, 2}, {9, 2}, {8, 2}, {7, 2}, {6, 2}, {5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}},
|
||||||
|
{{11, 3}, {10, 3}, {9, 3}, {8, 3}, {7, 3}, {6, 3}, {5, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}},
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
void matrix_init_kb(void) {
|
void matrix_init_kb(void) {
|
||||||
// Turn status LED on
|
// Turn status LED on
|
||||||
DDRE |= (1<<6);
|
DDRE |= (1<<6);
|
||||||
|
|
|
@ -1,5 +1,16 @@
|
||||||
#include "preonic.h"
|
#include "preonic.h"
|
||||||
|
|
||||||
|
#ifdef ONEHAND_ENABLE
|
||||||
|
__attribute__ ((weak))
|
||||||
|
const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
{{11, 0}, {10, 0}, {9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}},
|
||||||
|
{{11, 1}, {10, 1}, {9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}},
|
||||||
|
{{11, 2}, {10, 2}, {9, 2}, {8, 2}, {7, 2}, {6, 2}, {5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}},
|
||||||
|
{{11, 3}, {10, 3}, {9, 3}, {8, 3}, {7, 3}, {6, 3}, {5, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}},
|
||||||
|
{{11, 4}, {10, 4}, {9, 4}, {8, 4}, {7, 4}, {6, 4}, {5, 4}, {4, 4}, {3, 4}, {2, 4}, {1, 4}, {0, 4}},
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
void matrix_init_kb(void) {
|
void matrix_init_kb(void) {
|
||||||
|
|
||||||
// Turn status LED on
|
// Turn status LED on
|
||||||
|
|
|
@ -39,6 +39,7 @@ These keyboards are part of the QMK repository, but their manufacturers are not
|
||||||
* [hhkb](/keyboards/hhkb) — The Happy Hacking keyboard can be hacked with a custom controller to run QMK.
|
* [hhkb](/keyboards/hhkb) — The Happy Hacking keyboard can be hacked with a custom controller to run QMK.
|
||||||
* [jd45](/keyboards/jd45) — Another Geekhack community project, designed by jdcarpe.
|
* [jd45](/keyboards/jd45) — Another Geekhack community project, designed by jdcarpe.
|
||||||
* [kc60](/keyboards/kc60) — A programmable Chinese-made keyboard, lost in the mists of time.
|
* [kc60](/keyboards/kc60) — A programmable Chinese-made keyboard, lost in the mists of time.
|
||||||
|
* [kitten_paw](/keyboards/kitten_paw) — A replacement controller (2016 revision) for the Filco Majestouch by [Bathroom Epiphanies](https://github.com/BathroomEpiphanies)
|
||||||
* [phantom](/keyboards/phantom) — A tenkeyless kit by Teel, also from Geekhack.
|
* [phantom](/keyboards/phantom) — A tenkeyless kit by Teel, also from Geekhack.
|
||||||
* [retro_refit](/keyboards/retro_refit) — Another creation by IBNobody.
|
* [retro_refit](/keyboards/retro_refit) — Another creation by IBNobody.
|
||||||
* [satan](/keyboards/satan) — A GH60 variant.
|
* [satan](/keyboards/satan) — A GH60 variant.
|
||||||
|
|
|
@ -34,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
{KC_LCTL, MO(_L2), KC_LGUI, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, KC_RALT, KC_ESC, XXXXXXX, TG(_L3) }
|
{KC_LCTL, MO(_L2), KC_LGUI, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, KC_RALT, KC_ESC, XXXXXXX, TG(_L3) }
|
||||||
},
|
},
|
||||||
[_DV] = { /* Dvorak */
|
[_DV] = { /* Dvorak */
|
||||||
{KC_TAB, KC_COMM, KC_DOT, KC_SLSH, KC_Q, KC_Q, KC_Q, KC_Q, KC_Q, KC_Q, KC_Q, KC_BSPC },
|
{KC_TAB, KC_SLSH, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC },
|
||||||
{MO(_L1), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, MO(_L1) },
|
{MO(_L1), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, MO(_L1) },
|
||||||
{KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, MO(_L2) },
|
{KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, MO(_L2) },
|
||||||
{KC_LCTL, MO(_L2), KC_LGUI, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, KC_RALT, KC_ESC, XXXXXXX, TG(_L3) }
|
{KC_LCTL, MO(_L2), KC_LGUI, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, KC_RALT, KC_ESC, XXXXXXX, TG(_L3) }
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \
|
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \
|
||||||
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \
|
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \
|
||||||
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \
|
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \
|
||||||
K30, K31, K32, K33, K37, K38, K39, K3B \
|
K30, K31, K32, K33, K37, K38, K39, K3A, K3B \
|
||||||
) \
|
) \
|
||||||
{ \
|
{ \
|
||||||
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \
|
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \
|
||||||
|
|
|
@ -18,6 +18,7 @@ void set_unicode_input_mode(uint8_t os_target)
|
||||||
input_mode = os_target;
|
input_mode = os_target;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__attribute__((weak))
|
||||||
void unicode_input_start (void) {
|
void unicode_input_start (void) {
|
||||||
switch(input_mode) {
|
switch(input_mode) {
|
||||||
case UC_OSX:
|
case UC_OSX:
|
||||||
|
@ -40,6 +41,7 @@ void unicode_input_start (void) {
|
||||||
wait_ms(UNICODE_TYPE_DELAY);
|
wait_ms(UNICODE_TYPE_DELAY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__attribute__((weak))
|
||||||
void unicode_input_finish (void) {
|
void unicode_input_finish (void) {
|
||||||
switch(input_mode) {
|
switch(input_mode) {
|
||||||
case UC_OSX:
|
case UC_OSX:
|
||||||
|
|
51
readme.md
|
@ -43,6 +43,29 @@ Before you are able to compile, you'll need to install an environment for AVR de
|
||||||
|
|
||||||
## Build Environment Setup
|
## Build Environment Setup
|
||||||
|
|
||||||
|
### Windows 10
|
||||||
|
|
||||||
|
It's still recommended to use the method for Vista and later below. The reason for this is that the Windows 10 Subsystem for Linux lacks [USB support](https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo/suggestions/13355724-unable-to-access-usb-devices-from-bash), so it's not possible to flash the firmware to the keyboard. Please add your vote to the link!
|
||||||
|
|
||||||
|
That said, it's still possible to use it for compilation. And recommended, if you need to compile much, since it's much faster than at least Cygwin (which is also supported, but currently lacking documentation). I haven't tried the method below, so I'm unable to tell.
|
||||||
|
|
||||||
|
Here are the steps
|
||||||
|
|
||||||
|
1. Install the Windows 10 subsystem for Linux, following [these instructions](http://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/).
|
||||||
|
2. If you have previously cloned the repository using the normal Git bash, you will need to clean up the line endings. If you have cloned it after 20th of August 2016, you are likely fine. To clean up the line endings do the following
|
||||||
|
1. Make sure that you have no changes you haven't committed by running `git status`, if you do commit them first
|
||||||
|
2. From within the Git bash run ´git rm --cached -r .`
|
||||||
|
3. Followed by `git reset --hard`
|
||||||
|
3. Start the "Bash On Ubuntu On Windows" from the start menu
|
||||||
|
4. With the bash open, navigate to your git checkout. The harddisk can be accessed from `/mnt` for example `/mnt/c` for the `c:\` drive.
|
||||||
|
5. Run `sudo util/install_dependencies.sh`.
|
||||||
|
6. After a while the installation will finish, and you are good to go
|
||||||
|
|
||||||
|
**Note** From time to time, the dependencies might change, so just run `install_dependencies.sh` again if things are not working.
|
||||||
|
|
||||||
|
**Warning:** If you edit Makefiles or shell scripts, make sure you are using an editor that saves the files with Unix line endings. Otherwise the compilation might not work.
|
||||||
|
|
||||||
|
|
||||||
### Windows (Vista and later)
|
### Windows (Vista and later)
|
||||||
1. If you have ever installed WinAVR, uninstall it.
|
1. If you have ever installed WinAVR, uninstall it.
|
||||||
2. Install [MHV AVR Tools](https://infernoembedded.com/sites/default/files/project/MHV_AVR_Tools_20131101.exe). Disable smatch, but **be sure to leave the option to add the tools to the PATH checked**.
|
2. Install [MHV AVR Tools](https://infernoembedded.com/sites/default/files/project/MHV_AVR_Tools_20131101.exe). Disable smatch, but **be sure to leave the option to add the tools to the PATH checked**.
|
||||||
|
@ -68,12 +91,36 @@ You can also try these instructions:
|
||||||
3. Install [DFU-Programmer][dfu-prog].
|
3. Install [DFU-Programmer][dfu-prog].
|
||||||
|
|
||||||
### Linux
|
### Linux
|
||||||
Install AVR GCC, AVR libc, and dfu-progammer with your favorite package manager.
|
|
||||||
|
To ensure you are always up to date, you can just run `sudo utils/install_dependencies.sh`. That should always install all the dependencies needed.
|
||||||
|
|
||||||
|
You can also install things manually, but this documentation might not be always up to date with all requirements.
|
||||||
|
|
||||||
|
The current requirements are the following, but not all might be needed depending on what you do. Also note that some systems might not have all the dependencies available as packages, or they might be named differently.
|
||||||
|
|
||||||
|
```
|
||||||
|
build-essential
|
||||||
|
gcc
|
||||||
|
unzip
|
||||||
|
wget
|
||||||
|
zip
|
||||||
|
gcc-avr
|
||||||
|
binutils-avr
|
||||||
|
avr-libc
|
||||||
|
dfu-programmer
|
||||||
|
dfu-util
|
||||||
|
gcc-arm-none-eabi
|
||||||
|
binutils-arm-none-eabi
|
||||||
|
libnewlib-arm-none-eabi
|
||||||
|
git
|
||||||
|
```
|
||||||
|
|
||||||
|
Install the dependencies with your favorite package manager.
|
||||||
|
|
||||||
Debian/Ubuntu example:
|
Debian/Ubuntu example:
|
||||||
|
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install gcc-avr avr-libc dfu-programmer
|
sudo apt-get install gcc unzip wget zip gcc-avr binutils-avr avr-libc dfu-programmer dfu-util gcc-arm-none-eabi binutils-arm-none-eabi libnewlib-arm-none-eabi
|
||||||
|
|
||||||
### Docker
|
### Docker
|
||||||
|
|
||||||
|
|
|
@ -85,6 +85,10 @@ ifeq ($(strip $(BLUETOOTH_ENABLE)), yes)
|
||||||
OPT_DEFS += -DBLUETOOTH_ENABLE
|
OPT_DEFS += -DBLUETOOTH_ENABLE
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(ONEHAND_ENABLE)), yes)
|
||||||
|
OPT_DEFS += -DONEHAND_ENABLE
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(KEYMAP_SECTION_ENABLE)), yes)
|
ifeq ($(strip $(KEYMAP_SECTION_ENABLE)), yes)
|
||||||
OPT_DEFS += -DKEYMAP_SECTION_ENABLE
|
OPT_DEFS += -DKEYMAP_SECTION_ENABLE
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,12 @@ void action_exec(keyevent_t event)
|
||||||
dprint("EVENT: "); debug_event(event); dprintln();
|
dprint("EVENT: "); debug_event(event); dprintln();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef ONEHAND_ENABLE
|
||||||
|
if (!IS_NOEVENT(event)) {
|
||||||
|
process_hand_swap(&event);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
keyrecord_t record = { .event = event };
|
keyrecord_t record = { .event = event };
|
||||||
|
|
||||||
#ifndef NO_ACTION_TAPPING
|
#ifndef NO_ACTION_TAPPING
|
||||||
|
@ -53,6 +59,26 @@ void action_exec(keyevent_t event)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef ONEHAND_ENABLE
|
||||||
|
bool swap_hands = false;
|
||||||
|
|
||||||
|
void process_hand_swap(keyevent_t *event) {
|
||||||
|
static swap_state_row_t swap_state[MATRIX_ROWS];
|
||||||
|
|
||||||
|
keypos_t pos = event->key;
|
||||||
|
swap_state_row_t col_bit = (swap_state_row_t)1<<pos.col;
|
||||||
|
bool do_swap = event->pressed ? swap_hands :
|
||||||
|
swap_state[pos.row] & (col_bit);
|
||||||
|
|
||||||
|
if (do_swap) {
|
||||||
|
event->key = hand_swap_config[pos.row][pos.col];
|
||||||
|
swap_state[pos.row] |= col_bit;
|
||||||
|
} else {
|
||||||
|
swap_state[pos.row] &= ~(col_bit);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !defined(NO_ACTION_LAYER) && defined(PREVENT_STUCK_MODIFIERS)
|
#if !defined(NO_ACTION_LAYER) && defined(PREVENT_STUCK_MODIFIERS)
|
||||||
bool disable_action_cache = false;
|
bool disable_action_cache = false;
|
||||||
|
|
||||||
|
@ -440,6 +466,54 @@ void process_action(keyrecord_t *record, action_t action)
|
||||||
#endif
|
#endif
|
||||||
case ACT_COMMAND:
|
case ACT_COMMAND:
|
||||||
break;
|
break;
|
||||||
|
#ifdef ONEHAND_ENABLE
|
||||||
|
case ACT_SWAP_HANDS:
|
||||||
|
switch (action.swap.code) {
|
||||||
|
case OP_SH_TOGGLE:
|
||||||
|
if (event.pressed) {
|
||||||
|
swap_hands = !swap_hands;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case OP_SH_ON_OFF:
|
||||||
|
swap_hands = event.pressed;
|
||||||
|
break;
|
||||||
|
case OP_SH_OFF_ON:
|
||||||
|
swap_hands = !event.pressed;
|
||||||
|
break;
|
||||||
|
case OP_SH_ON:
|
||||||
|
if (!event.pressed) {
|
||||||
|
swap_hands = true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case OP_SH_OFF:
|
||||||
|
if (!event.pressed) {
|
||||||
|
swap_hands = false;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
#ifndef NO_ACTION_TAPPING
|
||||||
|
case OP_SH_TAP_TOGGLE:
|
||||||
|
/* tap toggle */
|
||||||
|
if (tap_count > 0) {
|
||||||
|
if (!event.pressed) {
|
||||||
|
swap_hands = !swap_hands;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
swap_hands = event.pressed;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
if (tap_count > 0) {
|
||||||
|
if (event.pressed) {
|
||||||
|
register_code(action.swap.code);
|
||||||
|
} else {
|
||||||
|
unregister_code(action.swap.code);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
swap_hands = event.pressed;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
#endif
|
||||||
#ifndef NO_ACTION_FUNCTION
|
#ifndef NO_ACTION_FUNCTION
|
||||||
case ACT_FUNCTION:
|
case ACT_FUNCTION:
|
||||||
action_function(record, action.func.id, action.func.opt);
|
action_function(record, action.func.id, action.func.opt);
|
||||||
|
@ -652,6 +726,13 @@ bool is_tap_key(keypos_t key)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
case ACT_SWAP_HANDS:
|
||||||
|
switch (action.swap.code) {
|
||||||
|
case 0x00 ... 0xdf:
|
||||||
|
case OP_SH_TAP_TOGGLE:
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
case ACT_MACRO:
|
case ACT_MACRO:
|
||||||
case ACT_FUNCTION:
|
case ACT_FUNCTION:
|
||||||
if (action.func.opt & FUNC_TAP) { return true; }
|
if (action.func.opt & FUNC_TAP) { return true; }
|
||||||
|
@ -692,6 +773,7 @@ void debug_action(action_t action)
|
||||||
case ACT_MACRO: dprint("ACT_MACRO"); break;
|
case ACT_MACRO: dprint("ACT_MACRO"); break;
|
||||||
case ACT_COMMAND: dprint("ACT_COMMAND"); break;
|
case ACT_COMMAND: dprint("ACT_COMMAND"); break;
|
||||||
case ACT_FUNCTION: dprint("ACT_FUNCTION"); break;
|
case ACT_FUNCTION: dprint("ACT_FUNCTION"); break;
|
||||||
|
case ACT_SWAP_HANDS: dprint("ACT_SWAP_HANDS"); break;
|
||||||
default: dprint("UNKNOWN"); break;
|
default: dprint("UNKNOWN"); break;
|
||||||
}
|
}
|
||||||
dprintf("[%X:%02X]", action.kind.param>>8, action.kind.param&0xff);
|
dprintf("[%X:%02X]", action.kind.param>>8, action.kind.param&0xff);
|
||||||
|
|
|
@ -65,6 +65,24 @@ bool process_record_quantum(keyrecord_t *record);
|
||||||
#if !defined(NO_ACTION_LAYER) && defined(PREVENT_STUCK_MODIFIERS)
|
#if !defined(NO_ACTION_LAYER) && defined(PREVENT_STUCK_MODIFIERS)
|
||||||
extern bool disable_action_cache;
|
extern bool disable_action_cache;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Code for handling one-handed key modifiers. */
|
||||||
|
#ifdef ONEHAND_ENABLE
|
||||||
|
extern bool swap_hands;
|
||||||
|
extern const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS];
|
||||||
|
#if (MATRIX_COLS <= 8)
|
||||||
|
typedef uint8_t swap_state_row_t;
|
||||||
|
#elif (MATRIX_COLS <= 16)
|
||||||
|
typedef uint16_t swap_state_row_t;
|
||||||
|
#elif (MATRIX_COLS <= 32)
|
||||||
|
typedef uint32_t swap_state_row_t;
|
||||||
|
#else
|
||||||
|
#error "MATRIX_COLS: invalid value"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void process_hand_swap(keyevent_t *record);
|
||||||
|
#endif
|
||||||
|
|
||||||
void process_record_nocache(keyrecord_t *record);
|
void process_record_nocache(keyrecord_t *record);
|
||||||
void process_record(keyrecord_t *record);
|
void process_record(keyrecord_t *record);
|
||||||
void process_action(keyrecord_t *record, action_t action);
|
void process_action(keyrecord_t *record, action_t action);
|
||||||
|
|
|
@ -108,6 +108,8 @@ enum action_kind_id {
|
||||||
/* Other Keys */
|
/* Other Keys */
|
||||||
ACT_USAGE = 0b0100,
|
ACT_USAGE = 0b0100,
|
||||||
ACT_MOUSEKEY = 0b0101,
|
ACT_MOUSEKEY = 0b0101,
|
||||||
|
/* One-hand Support */
|
||||||
|
ACT_SWAP_HANDS = 0b0110,
|
||||||
/* Layer Actions */
|
/* Layer Actions */
|
||||||
ACT_LAYER = 0b1000,
|
ACT_LAYER = 0b1000,
|
||||||
ACT_LAYER_TAP = 0b1010, /* Layer 0-15 */
|
ACT_LAYER_TAP = 0b1010, /* Layer 0-15 */
|
||||||
|
@ -178,6 +180,11 @@ typedef union {
|
||||||
uint8_t opt :4;
|
uint8_t opt :4;
|
||||||
uint8_t kind :4;
|
uint8_t kind :4;
|
||||||
} func;
|
} func;
|
||||||
|
struct action_swap {
|
||||||
|
uint8_t code :8;
|
||||||
|
uint8_t opt :4;
|
||||||
|
uint8_t kind :4;
|
||||||
|
} swap;
|
||||||
} action_t;
|
} action_t;
|
||||||
|
|
||||||
|
|
||||||
|
@ -295,6 +302,7 @@ enum backlight_opt {
|
||||||
BACKLIGHT_STEP = 3,
|
BACKLIGHT_STEP = 3,
|
||||||
BACKLIGHT_LEVEL = 4,
|
BACKLIGHT_LEVEL = 4,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Macro */
|
/* Macro */
|
||||||
#define ACTION_MACRO(id) ACTION(ACT_MACRO, (id))
|
#define ACTION_MACRO(id) ACTION(ACT_MACRO, (id))
|
||||||
#define ACTION_MACRO_TAP(id) ACTION(ACT_MACRO, FUNC_TAP<<8 | (id))
|
#define ACTION_MACRO_TAP(id) ACTION(ACT_MACRO, FUNC_TAP<<8 | (id))
|
||||||
|
@ -306,7 +314,7 @@ enum backlight_opt {
|
||||||
#define ACTION_BACKLIGHT_STEP() ACTION(ACT_BACKLIGHT, BACKLIGHT_STEP << 8)
|
#define ACTION_BACKLIGHT_STEP() ACTION(ACT_BACKLIGHT, BACKLIGHT_STEP << 8)
|
||||||
#define ACTION_BACKLIGHT_LEVEL(level) ACTION(ACT_BACKLIGHT, BACKLIGHT_LEVEL << 8 | (level))
|
#define ACTION_BACKLIGHT_LEVEL(level) ACTION(ACT_BACKLIGHT, BACKLIGHT_LEVEL << 8 | (level))
|
||||||
/* Command */
|
/* Command */
|
||||||
#define ACTION_COMMAND(id, opt) ACTION(ACT_COMMAND, (opt)<<8 | (addr))
|
#define ACTION_COMMAND(id, opt) ACTION(ACT_COMMAND, (opt)<<8 | (id))
|
||||||
/* Function */
|
/* Function */
|
||||||
enum function_opts {
|
enum function_opts {
|
||||||
FUNC_TAP = 0x8, /* indciates function is tappable */
|
FUNC_TAP = 0x8, /* indciates function is tappable */
|
||||||
|
@ -314,5 +322,23 @@ enum function_opts {
|
||||||
#define ACTION_FUNCTION(id) ACTION(ACT_FUNCTION, (id))
|
#define ACTION_FUNCTION(id) ACTION(ACT_FUNCTION, (id))
|
||||||
#define ACTION_FUNCTION_TAP(id) ACTION(ACT_FUNCTION, FUNC_TAP<<8 | (id))
|
#define ACTION_FUNCTION_TAP(id) ACTION(ACT_FUNCTION, FUNC_TAP<<8 | (id))
|
||||||
#define ACTION_FUNCTION_OPT(id, opt) ACTION(ACT_FUNCTION, (opt)<<8 | (id))
|
#define ACTION_FUNCTION_OPT(id, opt) ACTION(ACT_FUNCTION, (opt)<<8 | (id))
|
||||||
|
/* OneHand Support */
|
||||||
|
enum swap_hands_pram_tap_op {
|
||||||
|
OP_SH_TOGGLE = 0xF0,
|
||||||
|
OP_SH_TAP_TOGGLE,
|
||||||
|
OP_SH_ON_OFF,
|
||||||
|
OP_SH_OFF_ON,
|
||||||
|
OP_SH_OFF,
|
||||||
|
OP_SH_ON,
|
||||||
|
};
|
||||||
|
|
||||||
|
#define ACTION_SWAP_HANDS() ACTION_SWAP_HANDS_ON_OFF()
|
||||||
|
#define ACTION_SWAP_HANDS_TOGGLE() ACTION(ACT_SWAP_HANDS, OP_SH_TOGGLE)
|
||||||
|
#define ACTION_SWAP_HANDS_TAP_TOGGLE() ACTION(ACT_SWAP_HANDS, OP_SH_TAP_TOGGLE)
|
||||||
|
#define ACTION_SWAP_HANDS_TAP_KEY(key) ACTION(ACT_SWAP_HANDS, key)
|
||||||
|
#define ACTION_SWAP_HANDS_ON_OFF() ACTION(ACT_SWAP_HANDS, OP_SH_ON_OFF)
|
||||||
|
#define ACTION_SWAP_HANDS_OFF_ON() ACTION(ACT_SWAP_HANDS, OP_SH_OFF_ON)
|
||||||
|
#define ACTION_SWAP_HANDS_ON() ACTION(ACT_SWAP_HANDS, OP_SH_ON)
|
||||||
|
#define ACTION_SWAP_HANDS_OFF() ACTION(ACT_SWAP_HANDS, OP_SH_OFF)
|
||||||
|
|
||||||
#endif /* ACTION_CODE_H */
|
#endif /* ACTION_CODE_H */
|
||||||
|
|
10
tmk_core/common/virtser.h
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
#ifndef _VIRTSER_H_
|
||||||
|
#define _VIRTSER_H_
|
||||||
|
|
||||||
|
/* Define this function in your code to process incoming bytes */
|
||||||
|
void virtser_recv(const uint8_t ch);
|
||||||
|
|
||||||
|
/* Call this to send a character over the Virtual Serial Device */
|
||||||
|
void virtser_send(const uint8_t byte);
|
||||||
|
|
||||||
|
#endif
|
|
@ -26,6 +26,10 @@ ifeq ($(strip $(BLUETOOTH_ENABLE)), yes)
|
||||||
$(TMK_DIR)/protocol/serial_uart.c
|
$(TMK_DIR)/protocol/serial_uart.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(VIRTSER_ENABLE)), yes)
|
||||||
|
LUFA_SRC += $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/CDCClassDevice.c
|
||||||
|
endif
|
||||||
|
|
||||||
SRC += $(LUFA_SRC)
|
SRC += $(LUFA_SRC)
|
||||||
|
|
||||||
# Search Path
|
# Search Path
|
||||||
|
|
|
@ -231,9 +231,15 @@ const USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
|
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
|
||||||
|
|
||||||
.USBSpecification = VERSION_BCD(1,1,0),
|
.USBSpecification = VERSION_BCD(1,1,0),
|
||||||
|
#if VIRTSER_ENABLE
|
||||||
|
.Class = USB_CSCP_IADDeviceClass,
|
||||||
|
.SubClass = USB_CSCP_IADDeviceSubclass,
|
||||||
|
.Protocol = USB_CSCP_IADDeviceProtocol,
|
||||||
|
#else
|
||||||
.Class = USB_CSCP_NoDeviceClass,
|
.Class = USB_CSCP_NoDeviceClass,
|
||||||
.SubClass = USB_CSCP_NoDeviceSubclass,
|
.SubClass = USB_CSCP_NoDeviceSubclass,
|
||||||
.Protocol = USB_CSCP_NoDeviceProtocol,
|
.Protocol = USB_CSCP_NoDeviceProtocol,
|
||||||
|
#endif
|
||||||
|
|
||||||
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
|
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
|
||||||
|
|
||||||
|
@ -643,8 +649,112 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
|
|
||||||
.TotalEmbeddedJacks = 0x01,
|
.TotalEmbeddedJacks = 0x01,
|
||||||
.AssociatedJackID = {0x03}
|
.AssociatedJackID = {0x03}
|
||||||
}
|
},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef VIRTSER_ENABLE
|
||||||
|
.CDC_Interface_Association =
|
||||||
|
{
|
||||||
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_Association_t), .Type = DTYPE_InterfaceAssociation},
|
||||||
|
|
||||||
|
.FirstInterfaceIndex = CCI_INTERFACE,
|
||||||
|
.TotalInterfaces = 2,
|
||||||
|
|
||||||
|
.Class = CDC_CSCP_CDCClass,
|
||||||
|
.SubClass = CDC_CSCP_ACMSubclass,
|
||||||
|
.Protocol = CDC_CSCP_ATCommandProtocol,
|
||||||
|
|
||||||
|
.IADStrIndex = NO_DESCRIPTOR,
|
||||||
|
},
|
||||||
|
|
||||||
|
.CDC_CCI_Interface =
|
||||||
|
{
|
||||||
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
.InterfaceNumber = CCI_INTERFACE,
|
||||||
|
.AlternateSetting = 0,
|
||||||
|
|
||||||
|
.TotalEndpoints = 1,
|
||||||
|
|
||||||
|
.Class = CDC_CSCP_CDCClass,
|
||||||
|
.SubClass = CDC_CSCP_ACMSubclass,
|
||||||
|
.Protocol = CDC_CSCP_ATCommandProtocol,
|
||||||
|
|
||||||
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
|
},
|
||||||
|
|
||||||
|
.CDC_Functional_Header =
|
||||||
|
{
|
||||||
|
.Header = {.Size = sizeof(USB_CDC_Descriptor_FunctionalHeader_t), .Type = DTYPE_CSInterface},
|
||||||
|
.Subtype = 0x00,
|
||||||
|
|
||||||
|
.CDCSpecification = VERSION_BCD(1,1,0),
|
||||||
|
},
|
||||||
|
|
||||||
|
.CDC_Functional_ACM =
|
||||||
|
{
|
||||||
|
.Header = {.Size = sizeof(USB_CDC_Descriptor_FunctionalACM_t), .Type = DTYPE_CSInterface},
|
||||||
|
.Subtype = 0x02,
|
||||||
|
|
||||||
|
.Capabilities = 0x02,
|
||||||
|
},
|
||||||
|
|
||||||
|
.CDC_Functional_Union =
|
||||||
|
{
|
||||||
|
.Header = {.Size = sizeof(USB_CDC_Descriptor_FunctionalUnion_t), .Type = DTYPE_CSInterface},
|
||||||
|
.Subtype = 0x06,
|
||||||
|
|
||||||
|
.MasterInterfaceNumber = CCI_INTERFACE,
|
||||||
|
.SlaveInterfaceNumber = CDI_INTERFACE,
|
||||||
|
},
|
||||||
|
|
||||||
|
.CDC_NotificationEndpoint =
|
||||||
|
{
|
||||||
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
.EndpointAddress = CDC_NOTIFICATION_EPADDR,
|
||||||
|
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
|
||||||
|
.EndpointSize = CDC_NOTIFICATION_EPSIZE,
|
||||||
|
.PollingIntervalMS = 0xFF
|
||||||
|
},
|
||||||
|
|
||||||
|
.CDC_DCI_Interface =
|
||||||
|
{
|
||||||
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
.InterfaceNumber = CDI_INTERFACE,
|
||||||
|
.AlternateSetting = 0,
|
||||||
|
|
||||||
|
.TotalEndpoints = 2,
|
||||||
|
|
||||||
|
.Class = CDC_CSCP_CDCDataClass,
|
||||||
|
.SubClass = CDC_CSCP_NoDataSubclass,
|
||||||
|
.Protocol = CDC_CSCP_NoDataProtocol,
|
||||||
|
|
||||||
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
|
},
|
||||||
|
|
||||||
|
.CDC_DataOutEndpoint =
|
||||||
|
{
|
||||||
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
.EndpointAddress = CDC_OUT_EPADDR,
|
||||||
|
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
|
||||||
|
.EndpointSize = CDC_EPSIZE,
|
||||||
|
.PollingIntervalMS = 0x05
|
||||||
|
},
|
||||||
|
|
||||||
|
.CDC_DataInEndpoint =
|
||||||
|
{
|
||||||
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
.EndpointAddress = CDC_IN_EPADDR,
|
||||||
|
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
|
||||||
|
.EndpointSize = CDC_EPSIZE,
|
||||||
|
.PollingIntervalMS = 0x05
|
||||||
|
},
|
||||||
|
#endif
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -104,6 +104,21 @@ typedef struct
|
||||||
USB_MIDI_Descriptor_Jack_Endpoint_t MIDI_Out_Jack_Endpoint_SPC;
|
USB_MIDI_Descriptor_Jack_Endpoint_t MIDI_Out_Jack_Endpoint_SPC;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef VIRTSER_ENABLE
|
||||||
|
USB_Descriptor_Interface_Association_t CDC_Interface_Association;
|
||||||
|
|
||||||
|
// CDC Control Interface
|
||||||
|
USB_Descriptor_Interface_t CDC_CCI_Interface;
|
||||||
|
USB_CDC_Descriptor_FunctionalHeader_t CDC_Functional_Header;
|
||||||
|
USB_CDC_Descriptor_FunctionalACM_t CDC_Functional_ACM;
|
||||||
|
USB_CDC_Descriptor_FunctionalUnion_t CDC_Functional_Union;
|
||||||
|
USB_Descriptor_Endpoint_t CDC_NotificationEndpoint;
|
||||||
|
|
||||||
|
// CDC Data Interface
|
||||||
|
USB_Descriptor_Interface_t CDC_DCI_Interface;
|
||||||
|
USB_Descriptor_Endpoint_t CDC_DataOutEndpoint;
|
||||||
|
USB_Descriptor_Endpoint_t CDC_DataInEndpoint;
|
||||||
|
#endif
|
||||||
} USB_Descriptor_Configuration_t;
|
} USB_Descriptor_Configuration_t;
|
||||||
|
|
||||||
|
|
||||||
|
@ -141,8 +156,15 @@ typedef struct
|
||||||
# define AS_INTERFACE NKRO_INTERFACE
|
# define AS_INTERFACE NKRO_INTERFACE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef VIRTSER_ENABLE
|
||||||
|
# define CCI_INTERFACE (AS_INTERFACE + 1)
|
||||||
|
# define CDI_INTERFACE (AS_INTERFACE + 2)
|
||||||
|
#else
|
||||||
|
# define CDI_INTERFACE AS_INTERFACE
|
||||||
|
#endif
|
||||||
|
|
||||||
/* nubmer of interfaces */
|
/* nubmer of interfaces */
|
||||||
#define TOTAL_INTERFACES AS_INTERFACE + 1
|
#define TOTAL_INTERFACES (CDI_INTERFACE + 1)
|
||||||
|
|
||||||
|
|
||||||
// Endopoint number and size
|
// Endopoint number and size
|
||||||
|
@ -180,11 +202,24 @@ typedef struct
|
||||||
# define MIDI_STREAM_OUT_EPNUM (NKRO_IN_EPNUM + 2)
|
# define MIDI_STREAM_OUT_EPNUM (NKRO_IN_EPNUM + 2)
|
||||||
# define MIDI_STREAM_IN_EPADDR (ENDPOINT_DIR_IN | MIDI_STREAM_IN_EPNUM)
|
# define MIDI_STREAM_IN_EPADDR (ENDPOINT_DIR_IN | MIDI_STREAM_IN_EPNUM)
|
||||||
# define MIDI_STREAM_OUT_EPADDR (ENDPOINT_DIR_OUT | MIDI_STREAM_OUT_EPNUM)
|
# define MIDI_STREAM_OUT_EPADDR (ENDPOINT_DIR_OUT | MIDI_STREAM_OUT_EPNUM)
|
||||||
|
#else
|
||||||
|
# define MIDI_STREAM_OUT_EPNUM NKRO_IN_EPNUM
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef VIRTSER_ENABLE
|
||||||
|
# define CDC_NOTIFICATION_EPNUM (MIDI_STREAM_OUT_EPNUM + 1)
|
||||||
|
# define CDC_IN_EPNUM (MIDI_STREAM_OUT_EPNUM + 2)
|
||||||
|
# define CDC_OUT_EPNUM (MIDI_STREAM_OUT_EPNUM + 3)
|
||||||
|
# define CDC_NOTIFICATION_EPADDR (ENDPOINT_DIR_IN | CDC_NOTIFICATION_EPNUM)
|
||||||
|
# define CDC_IN_EPADDR (ENDPOINT_DIR_IN | CDC_IN_EPNUM)
|
||||||
|
# define CDC_OUT_EPADDR (ENDPOINT_DIR_OUT | CDC_OUT_EPNUM)
|
||||||
|
#else
|
||||||
|
# define CDC_OUT_EPNUM MIDI_STREAM_OUT_EPNUM
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if defined(__AVR_ATmega32U2__) && MIDI_STREAM_OUT_EPADDR > 4
|
#if defined(__AVR_ATmega32U2__) && CDC_OUT_EPNUM > 4
|
||||||
# error "Endpoints are not available enough to support all functions. Remove some in Makefile.(MOUSEKEY, EXTRAKEY, CONSOLE, NKRO, MIDI)"
|
# error "Endpoints are not available enough to support all functions. Remove some in Makefile.(MOUSEKEY, EXTRAKEY, CONSOLE, NKRO, MIDI, SERIAL)"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define KEYBOARD_EPSIZE 8
|
#define KEYBOARD_EPSIZE 8
|
||||||
|
@ -193,6 +228,8 @@ typedef struct
|
||||||
#define CONSOLE_EPSIZE 32
|
#define CONSOLE_EPSIZE 32
|
||||||
#define NKRO_EPSIZE 16
|
#define NKRO_EPSIZE 16
|
||||||
#define MIDI_STREAM_EPSIZE 64
|
#define MIDI_STREAM_EPSIZE 64
|
||||||
|
#define CDC_NOTIFICATION_EPSIZE 8
|
||||||
|
#define CDC_EPSIZE 16
|
||||||
|
|
||||||
|
|
||||||
uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
|
uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
|
||||||
|
|
|
@ -60,6 +60,10 @@
|
||||||
#include "bluetooth.h"
|
#include "bluetooth.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef VIRTSER_ENABLE
|
||||||
|
#include "virtser.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
uint8_t keyboard_idle = 0;
|
uint8_t keyboard_idle = 0;
|
||||||
/* 0: Boot Protocol, 1: Report Protocol(default) */
|
/* 0: Boot Protocol, 1: Report Protocol(default) */
|
||||||
uint8_t keyboard_protocol = 1;
|
uint8_t keyboard_protocol = 1;
|
||||||
|
@ -127,6 +131,34 @@ USB_ClassInfo_MIDI_Device_t USB_MIDI_Interface =
|
||||||
#define SYS_COMMON_3 0x30
|
#define SYS_COMMON_3 0x30
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef VIRTSER_ENABLE
|
||||||
|
USB_ClassInfo_CDC_Device_t cdc_device =
|
||||||
|
{
|
||||||
|
.Config =
|
||||||
|
{
|
||||||
|
.ControlInterfaceNumber = CCI_INTERFACE,
|
||||||
|
.DataINEndpoint =
|
||||||
|
{
|
||||||
|
.Address = CDC_IN_EPADDR,
|
||||||
|
.Size = CDC_EPSIZE,
|
||||||
|
.Banks = 1,
|
||||||
|
},
|
||||||
|
.DataOUTEndpoint =
|
||||||
|
{
|
||||||
|
.Address = CDC_OUT_EPADDR,
|
||||||
|
.Size = CDC_EPSIZE,
|
||||||
|
.Banks = 1,
|
||||||
|
},
|
||||||
|
.NotificationEndpoint =
|
||||||
|
{
|
||||||
|
.Address = CDC_NOTIFICATION_EPADDR,
|
||||||
|
.Size = CDC_NOTIFICATION_EPSIZE,
|
||||||
|
.Banks = 1,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Console
|
* Console
|
||||||
|
@ -311,6 +343,12 @@ void EVENT_USB_Device_ConfigurationChanged(void)
|
||||||
ConfigSuccess &= Endpoint_ConfigureEndpoint(MIDI_STREAM_IN_EPADDR, EP_TYPE_BULK, MIDI_STREAM_EPSIZE, ENDPOINT_BANK_SINGLE);
|
ConfigSuccess &= Endpoint_ConfigureEndpoint(MIDI_STREAM_IN_EPADDR, EP_TYPE_BULK, MIDI_STREAM_EPSIZE, ENDPOINT_BANK_SINGLE);
|
||||||
ConfigSuccess &= Endpoint_ConfigureEndpoint(MIDI_STREAM_OUT_EPADDR, EP_TYPE_BULK, MIDI_STREAM_EPSIZE, ENDPOINT_BANK_SINGLE);
|
ConfigSuccess &= Endpoint_ConfigureEndpoint(MIDI_STREAM_OUT_EPADDR, EP_TYPE_BULK, MIDI_STREAM_EPSIZE, ENDPOINT_BANK_SINGLE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef VIRTSER_ENABLE
|
||||||
|
ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC_NOTIFICATION_EPADDR, EP_TYPE_INTERRUPT, CDC_NOTIFICATION_EPSIZE, ENDPOINT_BANK_SINGLE);
|
||||||
|
ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC_OUT_EPADDR, EP_TYPE_BULK, CDC_EPSIZE, ENDPOINT_BANK_SINGLE);
|
||||||
|
ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC_IN_EPADDR, EP_TYPE_BULK, CDC_EPSIZE, ENDPOINT_BANK_SINGLE);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -432,10 +470,15 @@ void EVENT_USB_Device_ControlRequest(void)
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef VIRTSER_ENABLE
|
||||||
|
CDC_Device_ProcessControlRequest(&cdc_device);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Host driver
|
* Host driver
|
||||||
|
p
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
static uint8_t keyboard_leds(void)
|
static uint8_t keyboard_leds(void)
|
||||||
{
|
{
|
||||||
|
@ -827,6 +870,61 @@ void MIDI_Task(void)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
* VIRTUAL SERIAL
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
#ifdef VIRTSER_ENABLE
|
||||||
|
void virtser_init(void)
|
||||||
|
{
|
||||||
|
cdc_device.State.ControlLineStates.DeviceToHost = CDC_CONTROL_LINE_IN_DSR ;
|
||||||
|
CDC_Device_SendControlLineStateChange(&cdc_device);
|
||||||
|
}
|
||||||
|
|
||||||
|
void virtser_recv(uint8_t c) __attribute__ ((weak));
|
||||||
|
void virtser_recv(uint8_t c)
|
||||||
|
{
|
||||||
|
// Ignore by default
|
||||||
|
}
|
||||||
|
|
||||||
|
void virtser_task(void)
|
||||||
|
{
|
||||||
|
uint16_t count = CDC_Device_BytesReceived(&cdc_device);
|
||||||
|
uint8_t ch;
|
||||||
|
if (count)
|
||||||
|
{
|
||||||
|
ch = CDC_Device_ReceiveByte(&cdc_device);
|
||||||
|
virtser_recv(ch);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void virtser_send(const uint8_t byte)
|
||||||
|
{
|
||||||
|
uint8_t timeout = 255;
|
||||||
|
uint8_t ep = Endpoint_GetCurrentEndpoint();
|
||||||
|
|
||||||
|
if (cdc_device.State.ControlLineStates.HostToDevice & CDC_CONTROL_LINE_OUT_DTR)
|
||||||
|
{
|
||||||
|
/* IN packet */
|
||||||
|
Endpoint_SelectEndpoint(cdc_device.Config.DataINEndpoint.Address);
|
||||||
|
|
||||||
|
if (!Endpoint_IsEnabled() || !Endpoint_IsConfigured()) {
|
||||||
|
Endpoint_SelectEndpoint(ep);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
while (timeout-- && !Endpoint_IsReadWriteAllowed()) _delay_us(40);
|
||||||
|
|
||||||
|
Endpoint_Write_8(byte);
|
||||||
|
CDC_Device_Flush(&cdc_device);
|
||||||
|
|
||||||
|
if (Endpoint_IsINReady()) {
|
||||||
|
Endpoint_ClearIN();
|
||||||
|
}
|
||||||
|
|
||||||
|
Endpoint_SelectEndpoint(ep);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* main
|
* main
|
||||||
|
@ -918,6 +1016,10 @@ int main(void)
|
||||||
sleep_led_init();
|
sleep_led_init();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef VIRTSER_ENABLE
|
||||||
|
virtser_init();
|
||||||
|
#endif
|
||||||
|
|
||||||
print("Keyboard start.\n");
|
print("Keyboard start.\n");
|
||||||
while (1) {
|
while (1) {
|
||||||
#ifndef BLUETOOTH_ENABLE
|
#ifndef BLUETOOTH_ENABLE
|
||||||
|
@ -936,6 +1038,11 @@ int main(void)
|
||||||
#endif
|
#endif
|
||||||
keyboard_task();
|
keyboard_task();
|
||||||
|
|
||||||
|
#ifdef VIRTSER_ENABLE
|
||||||
|
virtser_task();
|
||||||
|
CDC_Device_USBTask(&cdc_device);
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !defined(INTERRUPT_CONTROL_ENDPOINT)
|
#if !defined(INTERRUPT_CONTROL_ENDPOINT)
|
||||||
USB_USBTask();
|
USB_USBTask();
|
||||||
#endif
|
#endif
|
||||||
|
|