1
0
Fork 0

Merge remote-tracking branch 'origin/master'

This commit is contained in:
dbroqua 2016-10-01 18:28:48 +02:00
commit 7cd210722d
24 changed files with 1234 additions and 675 deletions

View file

@ -0,0 +1,66 @@
// This is the personal keymap of Jeremy Cowgar (@jcowgar). It is written for the programmer.
#include "atreus.h"
#include "action_layer.h"
#include "keymap_colemak.h"
#define PREVENT_STUCK_MODIFIERS
// Each layer gets a name for readability, which is then used in the keymap matrix below.
#define ALPH 0
#define NUMS 1
#define CURS 2
#define SYMB 3
#define FKEY 4
// Some handy macros to keep the keymaps clean and easier to maintain
#define KM_SAVE LGUI(CM_S)
#define KM_CLSE LGUI(CM_W)
#define KM_OPEN LGUI(CM_O)
#define KM_COPY LGUI(KC_C)
#define KM_CUT LGUI(KC_X)
#define KM_PAST LGUI(KC_V)
#define KM_UNDO LGUI(KC_Z)
#define KM_REDO LGUI(LSFT(KC_Z))
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[ALPH] = {
{KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TRNS, KC_Y, KC_U, KC_I, KC_O, KC_P},
{KC_A, LT(NUMS, KC_S), LT(FKEY, KC_D), KC_F, KC_G, KC_TRNS, KC_H, KC_J, LT(CURS, KC_K), LT(SYMB, KC_L), KC_SCLN},
{KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LALT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH},
{KC_LCTL, KC_ESC, KC_NO, KC_LSFT, KC_SPC, KC_LGUI, KC_ENT, KC_RSFT, KC_NO, KC_ESC, KC_RCTL}
},
[NUMS] = {
{KC_TRNS, KC_TRNS, KC_TRNS, KC_ASTR, KC_SLSH, KC_TRNS, KC_TRNS, KC_7, KC_8, KC_9, KC_SLSH},
{KC_TRNS, KC_TRNS, KC_EQL, KC_PLUS, KC_MINS, KC_TRNS, KC_LPRN, KC_4, KC_5, KC_6, KC_ASTR},
{KC_TRNS, KC_TRNS, KC_DOT, KC_COMM, CM_SCLN, KC_TRNS, KC_RPRN, KC_1, KC_2, KC_3, KC_MINS},
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_DOT, KC_EQL, KC_PLUS}
},
[CURS] = {
{KC_TRNS, KC_BSPC, KC_UP, KC_DELT, KC_PGUP, KC_TRNS, KC_TRNS, KM_SAVE, KC_TRNS, KM_OPEN, KC_TRNS},
{KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_TRNS, KM_UNDO, KC_LALT, KC_TRNS, KC_LGUI, KC_TRNS},
{KC_TRNS, KC_VOLD, KC_MUTE, KC_VOLU, KC_MPLY, KM_COPY, KM_REDO, KM_CLSE, KC_TRNS, KC_TRNS, KC_TRNS},
{KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TAB, KM_CUT, KM_PAST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
},
[SYMB] = {
{KC_BSLS, KC_EXLM, KC_LABK, KC_RABK, CM_COLN, KC_TRNS, KC_UNDS, KC_DLR, KC_QUES, KC_TRNS, KC_PERC},
{KC_AT, KC_AMPR, KC_LPRN, KC_RPRN, CM_SCLN, KC_TRNS, KC_COMM, KC_DOT, KC_QUOT, KC_TRNS, KC_TILD},
{KC_HASH, KC_PIPE, KC_LCBR, KC_RCBR, KC_SLSH, KC_TRNS, KC_TRNS, KC_GRV, KC_DQT, KC_TRNS, KC_CIRC},
{KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
},
[FKEY] = {
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12},
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F5, KC_F6, KC_F7, KC_F8},
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4},
{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 macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
switch(id) {}
return MACRO_NONE;
};

View file

@ -0,0 +1,45 @@
Jeremy's Atreus Key Mapping
===========================
I am a programmer by trade that suffers from the beginning stages of RSI. As a programmer I use letters, symbols and cursor navigation most often. To prevent strange finger gymnastics, I wrote a script to rank which non-letter characters occurred in my primary source projects most often and then placed these characters in the easiest to reach locations, for me. I made heavy use of momentary layer toggling.
My layout is also geared toward a software based Colemak mapping. I would like it to be hardware, but I use my Laptop on the go frequently and thus my laptop keyboard. I have moved the keycaps to reflect the Colemak layout. My laptop is a MacBook Pro (2015).
## Main Layers
1. [Letters](http://www.keyboard-layout-editor.com/#/gists/6861cb9df09ce78efaddf8aa7471e3ac)
2. [Symbols](http://www.keyboard-layout-editor.com/#/gists/8956a18b508a78e93b9c38ec3fcccaa5)
3. [Navigation](http://www.keyboard-layout-editor.com/#/gists/6ed492b714a7f54eb1c5de09b87fd8c4)
4. [Numbers](http://www.keyboard-layout-editor.com/#/gists/399ceb5624e8388e48a3a5eacac8e973)
5. [Function Keys](http://www.keyboard-layout-editor.com/#/gists/7fd7dc24c7048316f3724b1893c64e89)
## Notes
### General
Some characters can be accessed multiple ways. This was done because you may be in a given layer, such as numbers, where when doing math, you may need quick access to the parentheses characters for grouping. This prevents some layer switching.
I own an ErgoDox and plan on porting this as a base layer, then using the extra keys the ErgoDox provides accordingly. My goal, though, is to be fully functional on this base setup and build everything into muscle memory.
### Symbol Layer
1. I placed characters that deal with an if statement close together, such as !, & and |.
2. All matching brace/bracket characters are together as well.
### Number Layer
1. Everything I did was a compromise when trying to mimic a ten-key. I did the best I could.
2. Operators are duplicated on the right and left. I do not find it comfortable to use my pinky much, so I tend to use my left hand for +, -, * and / but those were also placed on the right hand to mimic the ten-key.
3. Parentheses were added for typing on the calculator.
### Cursor Layer
1. It includes basic audio controls because they didn't really fit anywhere else
2. It contains basic file manipulation. I'm not sure that was a good idea. I do save all the time, but Cmd+S isn't exactly hard.
3. It contains the backspace and delete keys right on top of the left and right arrows.
4. Cmd and Opt keys are duplicated. This makes for very easy navigation, for example on a Mac, Opt+Left/Right moves word by word. It also backspaces or deletes word by word.
### Function Layer
1. Almost all other layers I saw grouped the F keys into a bunch of three. This only gives nine function keys in order if you attempt to stay as close to the home row as possible. I went with a group of four, which gives all twelve function keys to the right hand, one row below and above the home row.
2. I duplicated the Command and Option keys the same as on the cursor layer. This makes it dead easy to hit modified function keys such as Cmd+Opt+F5. It's also easy to toss in a Shift modifier in there with the right thumb since the bottom row is preserved.

View file

@ -0,0 +1,24 @@
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"
// swap-hands action needs a matrix to define the swap
const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
/* Left hand, matrix positions */
{{0,13}, {1,13}, {2,13}, {3,13}, {4,13}, {5,13}},
{{0,12}, {1,12}, {2,12}, {3,12}, {4,12}, {5,12}},
{{0,11}, {1,11}, {2,11}, {3,11}, {4,11}, {5,11}},
{{0,10}, {1,10}, {2,10}, {3,10}, {4,10}, {5,10}},
{{0,9}, {1,9}, {2,9}, {3,9}, {4,9}, {5,9}},
{{0,8}, {1,8}, {2,8}, {3,8}, {4,8}, {5,8}},
{{0,7}, {1,7}, {2,7}, {3,7}, {4,7}, {5,7}},
/* Right hand, matrix positions */
{{0,6}, {1,6}, {2,6}, {3,6}, {4,6}, {5,6}},
{{0,5}, {1,5}, {2,5}, {3,5}, {4,5}, {5,5}},
{{0,4}, {1,4}, {2,4}, {3,4}, {4,4}, {5,4}},
{{0,3}, {1,3}, {2,3}, {3,3}, {4,3}, {5,3}},
{{0,2}, {1,2}, {2,2}, {3,2}, {4,2}, {5,2}},
{{0,1}, {1,1}, {2,1}, {3,1}, {4,1}, {5,1}},
{{0,0}, {1,0}, {2,0}, {3,0}, {4,0}, {5,0}},
};

View file

@ -1,3 +1,6 @@
/* Setup to approximate a Kinesis Advantage with an eye to use in a
* Mac/OSX environment
* This version adds a hand swap feature to flip the keyboard */
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"
@ -18,10 +21,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
* | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 |
* |Grv/L1| \ |AltShf| Left | Right| | Up | Down | [ | ] |Grv/L1|
* `----------------------------------' `----------------------------------'
* ,---------------. ,---------------.
* |Ctrl/Esc| Alt | | Alt |Ctrl/Esc|
* | LGUI |Al/Esc| |Al/Esc| RGUI |
* ,------|--------|------| |------+--------+------.
* | | | Home | | PgUp | | |
* |Backsp| Del |------| |------| Enter | Space|
@ -31,33 +34,34 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// 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_LGUI,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(1),
KC_LCTL, 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,
CTL_T(KC_ESC), ALT_T(KC_APP),
KC_HOME,
KC_BSPC,KC_DEL,KC_END,
// right hand
KC_APP, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
TG(1), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),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_ENT, KC_SPC
),
// left hand
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LGUI,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(1),
KC_LCTL, 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),
KC_FN1, KC_BSLS, LALT(KC_LSFT), KC_LEFT, KC_RGHT,
KC_LGUI, ALT_T(KC_ESC),
KC_HOME,
KC_BSPC, KC_DEL, KC_END,
// right hand
KC_APP, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
TG(1), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN), 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,
ALT_T(KC_ESC), KC_RGUI,
KC_PGUP,
KC_PGDN, KC_ENT, KC_SPC
),
/* Keymap 1: Symbol Layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
* | PrScr | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 |
* | ScrLk | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
* | Pause | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
@ -74,14 +78,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// 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,
KC_PSCR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
KC_SLCK, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_TRNS,
KC_PAUS, 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,
@ -92,6 +96,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS
),
/* Keymap 2: Media and mouse keys
*
* ,--------------------------------------------------. ,--------------------------------------------------.
@ -135,10 +140,6 @@ KEYMAP(
),
};
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
@ -154,6 +155,10 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
return MACRO_NONE;
};
const uint16_t PROGMEM fn_actions[] = {
[1] = ACTION_SWAP_HANDS_TAP_KEY(KC_GRV) // FN1 - Tap = Grave/Tilde - Hold Momentary swap hands
};
// Runs just one time when the keyboard initializes.
void matrix_init_user(void) {

View file

@ -0,0 +1,14 @@
The kastyle keymap was originally intended to remap the ErgoDox EZ to more
closely approximate the layout of a Kinesis Advantage. Notable changes
over the stock ErgoDox layout include:
* Re-arragnement of tab, enter, space, and delete to match the Kinesis
* Addition of print screen, pause, etc. keys following the kines-ish keymap
on L1
* GUI keys have replaced Ctrl on the thumb keys (for Mac use), and Alt keys
are mapped to allow Esc on tap (good for Vi users)
* Most notably, the addition of a momentary one-handed mode for quick and
easy access to keys on the other half of the keyboard, e.g. while using a
mouse in one hand, one may add text to a dialogue box with the other without
having to reach across the keyboard or remove one's hand from the mouse.

View file

@ -0,0 +1,5 @@
# Ergodox EZ for OS X
This keymapping is designed to be reasonably familiar to an ordinary Mac keyboard while taking advantage of the Ergodox EZ's features. Caps lock instead enables a layer which allows a user to use HJKL as arrow keys and to control media. Shift and control have additional mappings on S and D to provide easier access while holding down caps lock.
If you choose to compile this yourself, be sure to compile with `#define PREVENT_STUCK_MODIFIERS` in your `config.h`. Firmware built using [qmk_firmware](https://github.com/jackhumbert/qmk_firmware/).

View file

@ -0,0 +1,144 @@
// Media keys work on OSX, but not on Windows.
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"
#define BASE 0 // Default layer
#define AUXI 1 // Auxiliary layer
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 0: Basic Layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | ~` | 1 | 2 | 3 | 4 | 5 | 6 | | 7 | 8 | 9 | 0 | -_ | += | Bkspc |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | Tab | Q | W | E | R | T | L1 | | Del | Y | U | I | O | P | |\ |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | L1 | A | S | D | F | G |------| |------| H | J | K | L | ;: | Enter |
* |--------+------+------+------+------+------| {[ | | }] |------+------+------+------+------+--------|
* | LShift | Z | X | C | V | B | | | | N | M | <, | >. | ?/ | "' |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* |LCtrl | | | | Esc | | | | | | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | |Power | |
* ,------|------|------| |------+--------+------.
* | | | | | | | |
* | LGui | LAlt |------| |------| Bkspc |Space |
* | | | | | Del | | |
* `--------------------' `----------------------'
*/
// 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_6,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, MO(1),
MO(1), KC_A, KC_S, KC_D, KC_F, KC_G,
KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC,
KC_LCTL, KC_TRNS,KC_TRNS,KC_TRNS,KC_ESC,
KC_TRNS,KC_TRNS,
KC_TRNS,
KC_LGUI,KC_LALT,KC_TRNS,
// right hand
KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSPC,
KC_DELETE, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH,
KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_ENT,
KC_RBRC, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_QUOT,
KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
KC_PWR, KC_TRNS,
KC_TRNS,
KC_DELETE, KC_BSPC, KC_SPC
),
/* Keymap 1: Auxiliary Layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | | | | | | TRNS | | | Mute | VolDn| VolUp| Play | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | TRNS | |LShift| LCtrl| | |------| |------| LEFT | DOWN | UP |RIGHT | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | LShift | | | | | | | | | MPrv | MNxt | | | | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* |LCtrl | | | | | | | | | | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | LGui | LAlt |------| |------| Bkspc| Space|
* | | | | | Del | | |
* `--------------------' `--------------------'
*/
// AUXILIARY
[AUXI] = KEYMAP(
// left hand
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_LSHIFT,KC_LCTL, KC_TRNS, KC_TRNS,
KC_LSHIFT,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_LCTL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_LGUI, KC_LALT, KC_TRNS,
// right hand
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS,
KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY, KC_TRNS, KC_TRNS,
KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,KC_TRNS, KC_TRNS,
KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_PWR, KC_TRNS,
KC_TRNS,
KC_DELETE, KC_BSPC, KC_SPC
),
};
const uint16_t PROGMEM fn_actions[] = {
[1] = ACTION_LAYER_TAP_TOGGLE(AUXI) // FN1 - Momentary Layer 1 (Auxiliary)
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
// MACRODOWN only works in this function
switch(id) {
case 0:
if (record->event.pressed) {
register_code(KC_RSFT);
} else {
unregister_code(KC_RSFT);
}
break;
}
return MACRO_NONE;
};
// Runs just one time when the keyboard initializes.
void matrix_init_user(void) {
};
// Runs constantly in the background, in a loop.
void matrix_scan_user(void) {
uint8_t layer = biton32(layer_state);
ergodox_board_led_off();
ergodox_right_led_1_off();
ergodox_right_led_2_off();
ergodox_right_led_3_off();
switch (layer) {
// TODO: Make this relevant to the ErgoDox EZ.
case 1:
ergodox_right_led_1_on();
break;
case 2:
ergodox_right_led_2_on();
break;
default:
// none
break;
}
};

View file

@ -26,3 +26,4 @@ SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend
NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
MIDI_ENABLE ?= no # MIDI controls
UNICODE_ENABLE ?= yes # Unicode
ONEHAND_ENABLE ?= yes # Allow swapping hands of keyboard

View file

@ -24,7 +24,9 @@ void matrix_init_kb(void) {
};
void shutdown_user(void) {
PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
_delay_ms(150);
stop_all_notes();
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
_delay_ms(150);
stop_all_notes();
#endif
}

View file

@ -14,14 +14,21 @@ extern keymap_config_t keymap_config;
#define _BASE 0
#define _MOVE 1
#define _SYMB 2
#define _FUNC 3
#define _MOUSE 3
#define _FUNC 4
enum planck_keycodes {
BASE = SAFE_RANGE,
MOVE,
MOVE = SAFE_RANGE,
SYMB,
FUNC,
LOCK
CMDLEFT,
CMDRGHT,
BELOW,
ABOVE,
DASH,
GBP,
VOLUP,
VOLDN
};
// Fillers to make layering more clear
@ -33,73 +40,91 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* BASE
* ,-----------------------------------------------------------------------------------.
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | - |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Bksp | A | R | S | T | D | H | N | E | I | O | " |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | K | M | , | . | / |Shift |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Func | Ctrl | Alt | GUI | Symb |Enter |Space | Move | GUI | Alt | Ctrl |Caps |
* | Bksp | A | R | S | T | D | H | N | E | I | O | " |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | K | M | , | . | / | Shift|
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Func | Ctrl | Alt | Cmd | Symb | Enter| Space| Move | Cmd | Alt | Ctrl | Func |
* `-----------------------------------------------------------------------------------'
*/
[_BASE] = {
{KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_MINS},
{KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT},
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT},
{FUNC, KC_LCTL, KC_LALT, KC_LGUI, SYMB, KC_ENT, KC_SPC, MOVE, KC_RGUI, KC_RALT, KC_RCTL, KC_CAPS}
{FUNC, KC_LCTL, KC_LALT, KC_LGUI, SYMB, KC_ENT, KC_SPC, MOVE, KC_RGUI, KC_RALT, KC_RCTL, FUNC }
},
/* MOVE
* ,-----------------------------------------------------------------------------------.
* | Esc | | Home | Up | End | | | Home | Up | End | | Esc |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Del | | Left | Down |Right | | | Left | Down |Right | | Del |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | | |Pg Up |Pg Dn | | |Pg Dn |Pg Up | | | |
* | Esc | | Cmd-L| Up | Cmd-R| | | Cmd-L| Up | Cmd-R| | Esc |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | | |
* | Del | | Left | Down | Right| | | Left | Down | Right| | Del |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | Pg Up| Pg Dn| Above| | Pg Dn| Pg Up| | Caps | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | Below| | | | | | |
* `-----------------------------------------------------------------------------------'
*/
[_MOVE] = {
{KC_ESC, _______, KC_HOME, KC_UP, KC_END, _______, _______, KC_HOME, KC_UP, KC_END, _______, KC_ESC},
{KC_DEL, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_DEL},
{_______, _______, _______, KC_PGUP, KC_PGDN, _______, _______, KC_PGDN, KC_PGUP, _______, _______, _______},
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
{KC_ESC, XXXXXXX, CMDLEFT, KC_UP, CMDRGHT, XXXXXXX, XXXXXXX, CMDLEFT, KC_UP, CMDRGHT, XXXXXXX, KC_ESC },
{KC_DEL, KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_CAPS, KC_DEL },
{_______, XXXXXXX, XXXXXXX, KC_PGUP, KC_PGDN, ABOVE, XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, XXXXXXX, _______},
{_______, _______, _______, _______, _______, BELOW, _______, _______, _______, _______, _______, _______}
},
/* SYMB
* ,-----------------------------------------------------------------------------------.
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Esc |
* |-----------------------------------------------------------------------------------.
* | Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | £ |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | ~ | ` | + | = | | | \ | [ | ] | { | } | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
[_SYMB] = {
{KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_ESC },
{KC_DEL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL },
{KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, DASH },
{KC_DEL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, GBP },
{_______, KC_TILD, KC_GRV, KC_PLUS, KC_EQL, KC_PIPE, KC_BSLS, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, _______},
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
},
/* MOUSE
* ,-----------------------------------------------------------------------------------.
* | | | ACC-2| ACC-1| ACC-0| | | SW-L | M-U | SW-R | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | MB-3 | MB-2 | MB-1 | | | M-L | M-D | M-R | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | SW-D | SW-U | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
[_MOUSE] = {
{XXXXXXX, XXXXXXX, KC_ACL2, KC_ACL1, KC_ACL0, XXXXXXX, XXXXXXX, KC_WH_L, KC_MS_U, KC_WH_R, XXXXXXX, XXXXXXX},
{XXXXXXX, XXXXXXX, KC_BTN3, KC_BTN2, KC_BTN1, XXXXXXX, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, XXXXXXX},
{_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_WH_D, KC_WH_U, XXXXXXX, XXXXXXX, _______},
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
},
/* FUNC
* ,-----------------------------------------------------------------------------------.
* | F12 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 |
* |-----------------------------------------------------------------------------------.
* | | Play | Prev | Next | BL+ | | | Lock | | | | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | Mute | Vol- | Vol+ | BL- | | | | | | | |
* | Reset| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | Vol+ |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | |Reset |
* | | F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | Vol- |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | F21 | F22 | F23 | F24 | | | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | Prev | Mute | Play | Next | | | | |
* `-----------------------------------------------------------------------------------'
*/
[_FUNC] = {
{KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11 },
{_______, KC_MPLY, KC_MPRV, KC_MNXT, KC_PAUS, _______, _______, LOCK, _______, _______, _______, _______},
{_______, KC_MUTE, KC_VOLD, KC_VOLU, KC_SLCK, _______, _______, _______, _______, _______, _______, _______},
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET }
{RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, VOLUP },
{XXXXXXX, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, VOLDN },
{_______, KC_F21, KC_F22, KC_F23, KC_F24, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______},
{_______, _______, _______, _______, KC_MPRV, KC_MUTE, KC_MPLY, KC_MNXT, _______, _______, _______, _______}
}
};
@ -109,20 +134,20 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
case MOVE:
if (record->event.pressed) {
layer_on(_MOVE);
update_tri_layer(_MOVE, _SYMB, _FUNC);
update_tri_layer(_MOVE, _SYMB, _MOUSE);
} else {
layer_off(_MOVE);
update_tri_layer(_MOVE, _SYMB, _FUNC);
update_tri_layer(_MOVE, _SYMB, _MOUSE);
}
return false;
break;
case SYMB:
if (record->event.pressed) {
layer_on(_SYMB);
update_tri_layer(_MOVE, _SYMB, _FUNC);
update_tri_layer(_MOVE, _SYMB, _MOUSE);
} else {
layer_off(_SYMB);
update_tri_layer(_MOVE, _SYMB, _FUNC);
update_tri_layer(_MOVE, _SYMB, _MOUSE);
}
return false;
break;
@ -134,15 +159,91 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
return false;
break;
case LOCK:
case CMDLEFT:
if (record->event.pressed) {
register_code(KC_RSFT);
register_code(KC_RCTL);
register_code(KC_POWER);
register_code(KC_LGUI);
register_code(KC_LEFT);
} else {
unregister_code(KC_POWER);
unregister_code(KC_RCTL);
unregister_code(KC_RSFT);
unregister_code(KC_LEFT);
unregister_code(KC_LGUI);
}
return false;
break;
case CMDRGHT:
if (record->event.pressed) {
register_code(KC_LGUI);
register_code(KC_RGHT);
} else {
unregister_code(KC_RGHT);
unregister_code(KC_LGUI);
}
return false;
break;
case BELOW:
if (record->event.pressed) {
register_code(KC_LGUI);
register_code(KC_RGHT);
unregister_code(KC_RGHT);
unregister_code(KC_LGUI);
register_code(KC_ENT);
unregister_code(KC_ENT);
}
return false;
break;
case ABOVE:
if (record->event.pressed) {
register_code(KC_LGUI);
register_code(KC_LEFT);
unregister_code(KC_LEFT);
unregister_code(KC_LGUI);
register_code(KC_ENT);
unregister_code(KC_ENT);
register_code(KC_UP);
unregister_code(KC_UP);
}
return false;
break;
case DASH:
if (record->event.pressed) {
register_code(KC_LALT);
register_code(KC_MINS);
} else {
unregister_code(KC_MINS);
unregister_code(KC_LALT);
}
return false;
break;
case GBP:
if (record->event.pressed) {
register_code(KC_LALT);
register_code(KC_3);
} else {
unregister_code(KC_3);
unregister_code(KC_LALT);
}
return false;
break;
case VOLUP:
if (record->event.pressed) {
register_code(KC_LALT);
register_code(KC_LSFT);
register_code(KC_VOLU);
} else {
unregister_code(KC_VOLU);
unregister_code(KC_LSFT);
unregister_code(KC_LALT);
}
return false;
break;
case VOLDN:
if (record->event.pressed) {
register_code(KC_LALT);
register_code(KC_LSFT);
register_code(KC_VOLD);
} else {
unregister_code(KC_VOLD);
unregister_code(KC_LSFT);
unregister_code(KC_LALT);
}
return false;
break;

View file

@ -2,42 +2,70 @@
This is a layout for the grid planck, built with a few ideals in mind:
- Minimal response times should be maintained. i.e. keys that react differently depending on whether they are tapped or held, keys that react differently if they are double tapped, etc. should be avoided — they inevitably send their keycode later than a normal key, interrupting the immediate feedback from the screen. Therefore we restrict ourselves to chording.
- Minimal response times should be maintained. Keys that react differently depending on whether they are tapped or held, keys that react differently if they are double tapped, etc. should be avoided they inevitably send their keycode later than a normal key interrupting the immediate feedback from the screen. Therefore we restrict ourselves to chording as our only means of getting more than one symbol out of a single physical key.
- The hands should never need to leave the home position. The usual culprit for this is the arrow cluster, so the arrow cluster should be as close to home as possible.
- There should be two of every modifier (one on each side), otherwise certain long key combinations become hard to make.
- Backspace should be in the “capslock position” in the colemak tradition.
We have four layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow cluster etc, a `SYMB` layer, with numbers and symbols; and a `FUNC` layer, with function keys and media keys.
We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow cluster and other movement keys; a `SYMB` layer, with numbers and symbols; a `FUNC` layer, with function keys and media keys; and a `MOUSE` layer, with mouse emulation.
## The `BASE` layer
![](http://i.imgur.com/tVNI3SE.png)
```
/* BASE
* ,-----------------------------------------------------------------------------------.
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | - |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Bksp | A | R | S | T | D | H | N | E | I | O | " |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | K | M | , | . | / | Shift|
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Func | Ctrl | Alt | Cmd | Symb | Enter| Space| Move | Cmd | Alt | Ctrl | Func |
* `-----------------------------------------------------------------------------------'
*/
This is the default layer; in [colemak](https://colemak.com). `esc` and `del` are conspicuously absent but are especially easy to reach from either of the other main layers (see below). The `backspace` location is standard colemak. The `caps` key is still on the `BASE` layer but only because I dont really use the bottom corners so theres nothing else I would rather put there. Having `enter` on a thumb means I can still have `quote` immediately to the right of `O`, something that would have annoyed me endlessly otherwise. `minus` is in the upper right because I had an extra space and its probably my next most used key that didnt yet have a home.
/* MOVE
* ,-----------------------------------------------------------------------------------.
* | Esc | | Cmd-L| Up | Cmd-R| | | Cmd-L| Up | Cmd-R| | Esc |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Del | | Left | Down | Right| | | Left | Down | Right| | Del |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | Pg Up| Pg Dn| Above| | Pg Dn| Pg Up| | Caps | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | Below| | | | | | |
* `-----------------------------------------------------------------------------------'
*/
The `MOVE` and `SYMB` layers are reached by holding down the `move` and `symb` keys respectively. The `FUNC` layer is reached by holding down both the `move` and `symb` keys simultaneously, *or* by holding down the `fn` key. The intended use is that whenever both hands are on the keyboard, the former method is used, and the latter is only used when, for example, reaching over to the keyboard with one hand to access the media controls.
/* SYMB
* ,-----------------------------------------------------------------------------------.
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | £ |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | ~ | ` | + | = | | | \ | [ | ] | { | } | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
## The `MOVE` layer
![](http://i.imgur.com/KXRSuHT.png)
/* MOUSE
* ,-----------------------------------------------------------------------------------.
* | | | ACC-2| ACC-1| ACC-0| | | SW-L | M-U | SW-R | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | MB-3 | MB-2 | MB-1 | | | M-L | M-D | M-R | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | SW-D | SW-U | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
This is fairly self explanatory. I almost exclusively use the right hand cluster so that movement is a one handed affair, but the left hand cluster is there if its needed.
On *macOS* I recommend using [Karabiner](https://pqrs.org/osx/karabiner/) and ticking *Use PC Style Home/End #2* and *Use PC Style PageUp/PageDown* so that `home` and `end` jump you to the beginning and end of the line respectively and so that `pg up` and `pg dn` move the cursor instead of just scrolling.
None of the modifiers are overwritten so that `shift-alt-arrows` etc work as expected.
## The `SYMB` layer
![](http://i.imgur.com/thh1ne2.png)
The symbol layer has all the numbers and their usual corresponding symbols in the first two rows, with the symbols on the home row since I use them more frequently than the numbers. The third row contains all the remaining symbols, arranged roughly so that the most used symbols are accessible with the strongest fingers.
`esc` and `del` are repeated here since I wanted to be able to reach either, one handed, with either hand.
Again none of the modifiers are overwritten so that shortcuts involving numbers or symbols work as expected.
## The `FUNC` layer
![](http://i.imgur.com/1VKFBBU.png)
The only things of note here are that `bl+` and `bl-` are short for *backlight up* and *backlight down*, and in firmware are actually `KC_PAUS` and `KC_SLCK` respectively, since *macOS* interprets these as the backlight keys. And that `lock` is currently a macro hard coded to turn off the screen on *macOS*. (By activating the shortcut `shift-ctrl-power`.)
## Other changes from the default
I have LEDs and sound disabled, simply because I have no need of them.
/* FUNC
* ,-----------------------------------------------------------------------------------.
* | Reset| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | Vol+ |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | Vol- |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | F21 | F22 | F23 | F24 | | | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | Prev | Mute | Play | Next | | | | |
* `-----------------------------------------------------------------------------------'
*/
```

View file

@ -3,6 +3,9 @@
#include "../../config.h"
#define LEADER_TIMEOUT 300
#define BACKLIGHT_BREATHING
/* cbbrowne user configuration */
#define randadd 53
@ -16,5 +19,3 @@
#endif

View file

@ -65,10 +65,11 @@
*/
enum layers {
_QW = 0, /* Qwerty mapping */
_LW, /* Lower layer, where top line has symbols !@#$%^&*() */
_RS, /* Raised layer, where top line has digits 1234567890 */
_KP, /* Key pad */
_QWERTY = 0, /* Qwerty mapping */
_LOWER, /* Lower layer, where top line has symbols !@#$%^&*() */
_RAISE, /* Raised layer, where top line has digits 1234567890 */
_KEYPAD, /* Key pad */
_ADJUST, /* Special Adjust layer coming via tri-placement */
};
enum macro_id {
@ -76,37 +77,60 @@ enum macro_id {
M_USERNAME,
M_RANDDIGIT,
M_RANDLETTER,
M_VERSION
M_VERSION,
MACRO_UPPER,
MACRO_LOWER,
};
#define M_LOWER M(MACRO_LOWER)
#define M_UPPER M(MACRO_UPPER)
#define ROT_LED M(M_LED) /* Rotate LED */
#define QWERTY DF(_QWERTY) /* Switch to QWERTY layout */
#define KEYPAD DF(_KEYPAD) /* Switch to keypad */
#define USERNAME M(M_USERNAME) /* shortcut for username */
#define RANDDIG M(M_RANDDIGIT)
#define RANDALP M(M_RANDLETTER)
#define CTLENTER MT(MOD_RCTL, KC_ENT)
#define SHIFTQUOTE MT(MOD_RSFT, KC_QUOT)
#define ALTRIGHT MT(MOD_LALT, KC_RGHT)
#define MVERSION M(M_VERSION)
/* Note that Planck has dimensions 4 rows x 12 columns */
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QW] = { /* Qwerty */
[_QWERTY] = { /* Qwerty */
{KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
{KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, MT(MOD_RSFT, KC_ENT)},
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT },
{KC_TAB, M(M_LED), KC_LALT, KC_LGUI, MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
{KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, CTLENTER},
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SHIFTQUOTE },
{KC_TAB, KC_LALT, ROT_LED, KC_LGUI, M_LOWER, KC_SPC, KC_SPC, M_UPPER, KC_LEFT, KC_DOWN, KC_UP, ALTRIGHT}
/* Note that KC_SPC is recorded TWICE, so that either matrix position can activate it */
},
[_RS] = { /* RAISE */
[_RAISE] = { /* RAISE */
{KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
{_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
{_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DF(_QW), DF(_KP), DF(_KP), RESET, _______},
{_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, QWERTY, KEYPAD, KEYPAD, RESET, _______},
{_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
},
[_LW] = { /* LOWER */
[_LOWER] = { /* LOWER */
{KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC},
{_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
{_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DF(_QW), DF(_KP), DF(_KP), RESET, _______},
{_______, DF(_KP), _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
{_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, QWERTY, KEYPAD, KEYPAD, RESET, _______},
{_______, KEYPAD, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
},
[_KEYPAD] = { /* Key Pad */
{KC_ESC, USERNAME, MVERSION, KC_F10, KC_F11, KC_F12, KC_PGUP, KC_KP_ENTER, KC_7, KC_8, KC_9, KC_BSPC},
{KC_LCTL, RANDDIG, KC_F5, KC_F6, KC_F7, KC_F8, KC_PGDN, KC_KP_MINUS, KC_4, KC_5, KC_6, KC_PIPE},
{KC_LSFT, RANDALP, KC_F1, KC_F2, KC_F3, KC_F4, KC_DEL, KC_KP_PLUS, KC_1, KC_2, KC_3, KC_ENTER},
{KC_TAB, KC_LALT, ROT_LED, KC_LGUI, M_LOWER, KC_SPC, KC_SPC, QWERTY, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT}
},
[_KP] = { /* Key Pad */
{KC_ESC, M(M_USERNAME), M(M_VERSION), KC_F10, KC_F11, KC_F12, KC_PGUP, KC_KP_ENTER, KC_7, KC_8, KC_9, KC_BSPC},
{KC_LCTL, M(M_RANDDIGIT), KC_F5, KC_F6, KC_F7, KC_F8, KC_PGDN, KC_KP_MINUS, KC_4, KC_5, KC_6, KC_PIPE},
{KC_LSFT, M(M_RANDLETTER), KC_F1, KC_F2, KC_F3, KC_F4, KC_DEL, KC_KP_PLUS, KC_1, KC_2, KC_3, KC_ENTER},
{BL_STEP, M(M_LED), KC_LALT, KC_LGUI, KC_NO, KC_SPC, KC_SPC, DF(_QW), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT}
}
[_ADJUST] = { /* Adjustments - gonna shift the wild tools in here */
{ROT_LED,USERNAME,MVERSION, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
{_______, RANDDIG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
{_______, RANDALP, _______, _______, _______, RESET, RESET, _______, _______, _______, _______, _______ },
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }
}
};
/* What is fn_actions actually used for??? */
@ -171,6 +195,39 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
unregister_code (KC_A + rval);
}
break;
case MACRO_UPPER:
if (record->event.pressed)
{
layer_on(_RAISE);
#ifdef BACKLIGHT_ENABLE
breathing_speed_set(2);
breathing_pulse();
#endif
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
else
{
layer_off(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
break;
case MACRO_LOWER:
if (record->event.pressed)
{
layer_on(_LOWER);
#ifdef BACKLIGHT_ENABLE
breathing_speed_set(2);
breathing_pulse();
#endif
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
else
{
layer_off(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
break;
}
return MACRO_NONE;
};

View file

@ -24,7 +24,26 @@ doing sundry experimentation:
- Key [2][2] aka "a" uses a random number generator to select a digit 0-9 at random
- Key [3][2] aka "z" uses a random number generator to select a letter a-z at random
- Key [1][3] aka "e" spits out the keymap version number
* Minor use of Space Cadet Shift; my SHIFT key has switched to KC_LSP0, so that when I just hit SHIFT, I get a left parens: ( which is great for Lisping. I don't have a Right Shift, so I don't get an autoclose; I think I'll live with that until a Planck successor with more lines of keys :-)
* Trying out sgoodwin's "hold Enter down to get Shift"
- Liking this Quite Well Enough...
- Applied this to both Shift and Quote
- It seems likely that Alt should get a right-hand-side, akin to this...
- Alt needs to move, and get a RHS
- Hence ALTRIGHT, and shifted ROT_LED over
- Emacs likes this!!! :-)
- I'm suspicious that I'll want to shift ROT_LED another location over,
so some modifier can replace the OS/KC_LGUI key
* I have added an alternate ADJUST layer that is activated via update_tri_layer()
- e.g. - LOWER+RAISE simultaneously
- This seems entirely more useful for handling my "special keys"
like the random numbers, user name, and such, than the keypad layer
* The _ADJUST layer provides a good place to have RESET
- But this isn't strictly enough; I want RESET somewhat accessible from
main layer lest an error hide that layer
- I never use the OS/KC_LGUI key (that's Command on MacOS, Windows
Key on Windows), so that's a good place to have it as a chord of
some sort
2. Some code structure ideas
---------------------------------------------------
@ -43,8 +62,8 @@ doing sundry experimentation:
only need to fit 4 symbols onto each line, rather than 12.
I used enums to manage layer IDs and macro IDs so that I don't need
to care (beyond "start at 0", and arguably that's not needed) about
their values.
to care (beyond "start at 0", and arguably even that's not needed)
about their values.
3. Things I did not like about the default mapping
---------------------------------------------------------
@ -57,12 +76,27 @@ doing sundry experimentation:
and shift ESC off the first column so KC_LCTL and KC_LALT can
be on the first column.
* I needed to swap ' and ENTER
4. Unuseful experiments
---------------------------------------------------------
I have tried some things out that didn't turn out particularly well.
I'll note some of these for posterity, hopefully helpful in not doing
unwise things again...
* I tried added Workman alongside Dvorak and Colemak
- Boy, oh boy, these don't help!!!
- I have done 30 years of learning of Emacs key mappings, and
these alternative keyboards massively mess me up
4. TODO
* Space Cadet Shift; switching L_SHIFT to KC_LSP0, so that when I
just hit SHIFT, I get a left parens. In principle, this is great
for Lisping.
- Unfortunately, there are times when mouse interfaces use SHIFT
to allow selecting multiple items, and this really interferes
with that
5. TODO
---------------------------------------------------------
* I use tmux quite a lot; the mollat keymap seems to have some
@ -77,4 +111,3 @@ doing sundry experimentation:
* The jeebak keymap seems to have some neat ideas:
- Number layer which is aggressive about having numbers in several places
- Touch layer seems interesting
* Trying out sgoodwin's "hold Enter down to get Shift"

View file

@ -26,10 +26,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION ROW2COL
// #define BACKLIGHT_PIN B7
// #define BACKLIGHT_BREATHING
// #define BACKLIGHT_LEVELS 3
#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
@ -124,10 +123,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* disable debug print */
//#define NO_DEBUG
// #ifndef NO_DEBUG
// # define NO_DEBUG
// #endif
/* disable print */
//#define NO_PRINT
// #ifndef NO_PRINT
// # define NO_PRINT
// #endif
/* Only print user print statements */
// #define USER_PRINT
/* disable action features */
//#define NO_ACTION_LAYER

View file

@ -2,19 +2,19 @@
# change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically
#
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = yes # Console for debug(+400)
COMMAND_ENABLE = yes # Commands for debug and configuration
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE = yes # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = yes # Console for debug(+400)
COMMAND_ENABLE = yes # Commands for debug and configuration
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE = yes # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
ifndef QUANTUM_DIR
include ../../../../Makefile

View file

@ -4,25 +4,44 @@
#include "../../config.h"
#include "matrix_types.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID GET_PID(NUMERIC_NORMAL, HOMING_MAX_TEENSY)
#define DEVICE_VER 0x0001
#define MANUFACTURER IBNobody
#define PRODUCT Vision Division
#define DESCRIPTION Full / Split Keyboard
#define MATRIX_ROWS 6
#define MATRIX_ROWS 6
#define MATRIX_ROW_PINS { C2, C3, F4, F5, F6, F7 }
#define MATRIX_COLS GET_MATRIX_COLS(NUMERIC_NORMAL, HOMING_MAX_TEENSY)
#define MATRIX_COL_PINS GET_MATRIX_COL_PINS(NUMERIC_NORMAL, HOMING_MAX_TEENSY)
// !!! MAKE SURE THAT THE LEFT/RIGHT PCB DEFINES MATCH ON ALL OF THESE COLUMNS
#define UNUSED_PINS
// **LEFT** **RIGHT**
#define PRODUCT_ID GET_PID( NUMERIC_NORMAL, NUMERIC_MAX_TEENSY)
#define MATRIX_COLS GET_MATRIX_COLS( NUMERIC_NORMAL, NUMERIC_MAX_TEENSY)
#define MATRIX_COL_PINS GET_MATRIX_COL_PINS( NUMERIC_NORMAL, NUMERIC_MAX_TEENSY)
/*#define KEYMAP( \
#define KEYMAP(MATRIX_LAYER, \
k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, k11C, \
k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, k21C, \
k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, k31C, \
k401, k402, k403, k404, k405, k406, k407, k408, k409, k40A, k411, k412, k413, k414, k415, k416, k417, k418, k419, k41A, k41B, k41C, \
k501, k502, k503, k504, k505, k506, k507, k508, k509, k50A, k511, k512, k513, k514, k515, k516, k517, k518, k519, k51A, k51B, k51C, \
k601, k602, k603, k604, k605, k606, k607, k608, k609, k60A, k611, k612, k613, k614, k615, k616, k617, k618, k619, k61A, k61B, k61C \
) \
KEYMAP_MASTER(MATRIX_LAYER, NUMERIC_NORMAL, NUMERIC_MAX_TEENSY, \
k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, KC_NO, KC_NO, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, k11C, \
k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, KC_NO, KC_NO, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, k21C, \
k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, KC_NO, KC_NO, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, k31C, \
k401, k402, k403, k404, k405, k406, k407, k408, k409, k40A, KC_NO, KC_NO, k411, k412, k413, k414, k415, k416, k417, k418, k419, k41A, k41B, k41C, \
k501, k502, k503, k504, k505, k506, k507, k508, k509, k50A, KC_NO, KC_NO, k511, k512, k513, k514, k515, k516, k517, k518, k519, k51A, k51B, k51C, \
k601, k602, k603, k604, k605, k606, k607, k608, k609, k60A, KC_NO, KC_NO, k611, k612, k613, k614, k615, k616, k617, k618, k619, k61A, k61B, k61C \
)
// Example Keymap Macros
/*
#define KEYMAP(MATRIX_LAYER, \
k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, k10B, k10C, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, k11C, \
k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, k20B, k20C, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, k21C, \
k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, k30B, k30C, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, k31C, \
@ -30,16 +49,18 @@
k501, k502, k503, k504, k505, k506, k507, k508, k509, k50A, k50B, k50C, k511, k512, k513, k514, k515, k516, k517, k518, k519, k51A, k51B, k51C, \
k601, k602, k603, k604, k605, k606, k607, k608, k609, k60A, k60B, k60C, k611, k612, k613, k614, k615, k616, k617, k618, k619, k61A, k61B, k61C \
) \
KEYMAP_MASTER(NUMERIC_MAX_TEENSY, NUMERIC_MAX, \
KEYMAP_MASTER(MATRIX_LAYER, NUMERIC_MAX_TEENSY, NUMERIC_MAX, \
k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, k10B, k10C, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, k11C, \
k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, k20B, k20C, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, k21C, \
k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, k30B, k30C, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, k31C, \
k401, k402, k403, k404, k405, k406, k407, k408, k409, k40A, k40B, k40C, k411, k412, k413, k414, k415, k416, k417, k418, k419, k41A, k41B, k41C, \
k501, k502, k503, k504, k505, k506, k507, k508, k509, k50A, k50B, k50C, k511, k512, k513, k514, k515, k516, k517, k518, k519, k51A, k51B, k51C, \
k601, k602, k603, k604, k605, k606, k607, k608, k609, k60A, k60B, k60C, k611, k612, k613, k614, k615, k616, k617, k618, k619, k61A, k61B, k61C \
)*/
)
*/
#define KEYMAP( \
/*
#define KEYMAP(MATRIX_LAYER, \
k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, \
k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, \
k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, \
@ -47,7 +68,7 @@ KEYMAP_MASTER(NUMERIC_MAX_TEENSY, NUMERIC_MAX, \
k501, k502, k503, k504, k505, k506, k507, k508, k509, k50A, k511, k512, k513, k514, k515, k516, k517, k518, k519, k51A, k51B, \
k601, k602, k603, k604, k605, k606, k607, k608, k609, k60A, k611, k612, k613, k614, k615, k616, k617, k618, k619, k61A, k61B \
) \
KEYMAP_MASTER(NUMERIC_NORMAL, HOMING_MAX_TEENSY, \
KEYMAP_MASTER(MATRIX_LAYER, NUMERIC_NORMAL, HOMING_MAX_TEENSY, \
k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, KC_NO, KC_NO, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, KC_NO, \
k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, KC_NO, KC_NO, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, KC_NO, \
k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, KC_NO, KC_NO, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, KC_NO, \
@ -55,5 +76,6 @@ KEYMAP_MASTER(NUMERIC_NORMAL, HOMING_MAX_TEENSY, \
k501, k502, k503, k504, k505, k506, k507, k508, k509, k50A, KC_NO, KC_NO, k511, k512, k513, k514, k515, k516, k517, k518, k519, k51A, k51B, KC_NO, \
k601, k602, k603, k604, k605, k606, k607, k608, k609, k60A, KC_NO, KC_NO, k611, k612, k613, k614, k615, k616, k617, k618, k619, k61A, k61B, KC_NO \
)
*/
#endif

File diff suppressed because it is too large Load diff

View file

@ -139,28 +139,29 @@
// Changable Row Macro
#define KEYMAP_ROW(LEFT_TYPE, RIGHT_TYPE, \
#define _KEYMAP_ROW( _LEFT_TYPE, _RIGHT_TYPE, \
k001, k002, k003, k004, k005, k006, k007, k008, k009, k00A, k00B, k00C, k011, k012, k013, k014, k015, k016, k017, k018, k019, k01A, k01B, k01C \
) \
KEYMAP_ROW_LEFT_ ## LEFT_TYPE(k001, k002, k003, k004, k005, k006, k007, k008, k009, k00A, k00B, k00C), KEYMAP_ROW_RIGHT_ ## RIGHT_TYPE(k011, k012, k013, k014, k015, k016, k017, k018, k019, k01A, k01B, k01C)
KEYMAP_ROW_LEFT_ ## _LEFT_TYPE( k001, k002, k003, k004, k005, k006, k007, k008, k009, k00A, k00B, k00C ), \
KEYMAP_ROW_RIGHT_ ## _RIGHT_TYPE( k011, k012, k013, k014, k015, k016, k017, k018, k019, k01A, k01B, k01C )
// Changable Master Macro
#define KEYMAP_MASTER(LEFT_TYPE, RIGHT_TYPE, \
k001, k002, k003, k004, k005, k006, k007, k008, k009, k00A, k00B, k00C, k011, k012, k013, k014, k015, k016, k017, k018, k019, k01A, k01B, k01C, \
k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, k10B, k10C, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, k11C, \
k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, k20B, k20C, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, k21C, \
k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, k30B, k30C, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, k31C, \
k401, k402, k403, k404, k405, k406, k407, k408, k409, k40A, k40B, k40C, k411, k412, k413, k414, k415, k416, k417, k418, k419, k41A, k41B, k41C, \
k501, k502, k503, k504, k505, k506, k507, k508, k509, k50A, k50B, k50C, k511, k512, k513, k514, k515, k516, k517, k518, k519, k51A, k51B, k51C \
#define KEYMAP_MASTER(_MATRIX_LAYER, _LEFT_TYPE, _RIGHT_TYPE, \
k001, k002, k003, k004, k005, k006, k007, k008, k009, k00A, k00B, k00C, k011, k012, k013, k014, k015, k016, k017, k018, k019, k01A, k01B, k01C, \
k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, k10B, k10C, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, k11C, \
k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, k20B, k20C, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, k21C, \
k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, k30B, k30C, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, k31C, \
k401, k402, k403, k404, k405, k406, k407, k408, k409, k40A, k40B, k40C, k411, k412, k413, k414, k415, k416, k417, k418, k419, k41A, k41B, k41C, \
k501, k502, k503, k504, k505, k506, k507, k508, k509, k50A, k50B, k50C, k511, k512, k513, k514, k515, k516, k517, k518, k519, k51A, k51B, k51C \
) \
{ \
{ KEYMAP_ROW(LEFT_TYPE, RIGHT_TYPE, k001, k002, k003, k004, k005, k006, k007, k008, k009, k00A, k00B, k00C, k011, k012, k013, k014, k015, k016, k017, k018, k019, k01A, k01B, k01C ) },\
{ KEYMAP_ROW(LEFT_TYPE, RIGHT_TYPE, k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, k10B, k10C, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, k11C ) },\
{ KEYMAP_ROW(LEFT_TYPE, RIGHT_TYPE, k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, k20B, k20C, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, k21C ) },\
{ KEYMAP_ROW(LEFT_TYPE, RIGHT_TYPE, k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, k30B, k30C, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, k31C ) },\
{ KEYMAP_ROW(LEFT_TYPE, RIGHT_TYPE, k401, k402, k403, k404, k405, k406, k407, k408, k409, k40A, k40B, k40C, k411, k412, k413, k414, k415, k416, k417, k418, k419, k41A, k41B, k41C ) },\
{ KEYMAP_ROW(LEFT_TYPE, RIGHT_TYPE, k501, k502, k503, k504, k505, k506, k507, k508, k509, k50A, k50B, k50C, k511, k512, k513, k514, k515, k516, k517, k518, k519, k51A, k51B, k51C ) },\
[_MATRIX_LAYER] = { \
{ _KEYMAP_ROW( _LEFT_TYPE, _RIGHT_TYPE, k001, k002, k003, k004, k005, k006, k007, k008, k009, k00A, k00B, k00C, k011, k012, k013, k014, k015, k016, k017, k018, k019, k01A, k01B, k01C ) },\
{ _KEYMAP_ROW( _LEFT_TYPE, _RIGHT_TYPE, k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, k10B, k10C, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, k11C ) },\
{ _KEYMAP_ROW( _LEFT_TYPE, _RIGHT_TYPE, k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, k20B, k20C, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, k21C ) },\
{ _KEYMAP_ROW( _LEFT_TYPE, _RIGHT_TYPE, k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, k30B, k30C, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, k31C ) },\
{ _KEYMAP_ROW( _LEFT_TYPE, _RIGHT_TYPE, k401, k402, k403, k404, k405, k406, k407, k408, k409, k40A, k40B, k40C, k411, k412, k413, k414, k415, k416, k417, k418, k419, k41A, k41B, k41C ) },\
{ _KEYMAP_ROW( _LEFT_TYPE, _RIGHT_TYPE, k501, k502, k503, k504, k505, k506, k507, k508, k509, k50A, k50B, k50C, k511, k512, k513, k514, k515, k516, k517, k518, k519, k51A, k51B, k51C ) },\
}

View file

@ -63,7 +63,7 @@ COMMAND_ENABLE ?= yes # Commands for debug and configuration
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE ?= yes # USB Nkey Rollover
BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default
BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality on B7 by default
MIDI_ENABLE ?= no # MIDI controls
UNICODE_ENABLE ?= no # Unicode
BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID

View file

@ -24,5 +24,45 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
void led_set_kb(uint8_t usb_led) {
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
if (usb_led & (1 << USB_LED_CAPS_LOCK))
{
// HI
DDRD |= (1<<4);
PORTD |= (1<<4);
}
else
{
// Hi-Z
DDRD &= ~(1<<4);
PORTD &= ~(1<<4);
}
if (usb_led & (1 << USB_LED_NUM_LOCK))
{
// HI
DDRD |= (1<<5);
PORTD |= (1<<5);
}
else
{
// Hi-Z
DDRD &= ~(1<<5);
PORTD &= ~(1<<5);
}
if (usb_led & (1 << USB_LED_SCROLL_LOCK))
{
// HI
DDRD |= (1<<6);
PORTD |= (1<<6);
}
else
{
// Hi-Z
DDRD &= ~(1<<6);
PORTD &= ~(1<<6);
}
led_set_user(usb_led);
}

View file

@ -7,7 +7,9 @@ int midi_offset = 7;
bool process_midi(uint16_t keycode, keyrecord_t *record) {
if (keycode == MI_ON && record->event.pressed) {
midi_activated = true;
#ifdef AUDIO_ENABLE
music_scale_user();
#endif
return false;
}
@ -63,4 +65,4 @@ bool process_midi(uint16_t keycode, keyrecord_t *record) {
return false;
}
return true;
}
}

View file

@ -38,7 +38,7 @@
* | | | |
* = = = =
* | | 32KB-4KB | | 128KB-8KB
* 0x6000 +---------------+ 0x1FC00 +---------------+
* 0x7000 +---------------+ 0x1E000 +---------------+
* | Bootloader | 4KB | Bootloader | 8KB
* 0x7FFF +---------------+ 0x1FFFF +---------------+
*
@ -64,8 +64,8 @@
#define BOOTLOADER_START (FLASH_SIZE - BOOTLOADER_SIZE)
/*
* Entering the Bootloader via Software
/*
* Entering the Bootloader via Software
* http://www.fourwalledcubicle.com/files/LUFA/Doc/120730/html/_page__software_bootloader_start.html
*/
#define BOOTLOADER_RESET_KEY 0xB007B007
@ -137,7 +137,7 @@ void bootloader_jump_after_watchdog_reset(void)
#if 0
/* Jumping To The Bootloader
* http://www.pjrc.com/teensy/jump_to_bootloader.html
*
*
* This method doen't work when using LUFA. idk why.
* - needs to initialize more regisers or interrupt setting?
*/

View file

@ -384,9 +384,6 @@ static bool command_common(uint8_t code)
debug_mouse = true;
} else {
print("\ndebug: off\n");
debug_matrix = false;
debug_keyboard = false;
debug_mouse = false;
}
break;